compare items by array
来源:互联网 发布:淘宝乐器店计划书 编辑:程序博客网 时间:2024/06/06 18:02
- $KCODE='SJIS'
- a=[]
- ha={}
- File.open("103.txt").each_line{ |l|
- a.push(l.strip.chomp.to_i)#number
- }
- a.sort!
- af=File.open("103.txt","w")
- af.puts(a)
- af.close()
- b=[]
- File.open("102.txt").each_line{|l|
- b.push(l.strip.chomp.to_i)#number
- }
- b.sort!
- bf=File.open("102.txt","w")
- bf.puts(b)
- bf.close()
- cc=File.open("same.txt","w")
- cc.puts(a & b)
- dd=File.open("diff.txt","w")
- dd.puts( b.size()>a.size()?(b-a):(a-b))#compare from - compare to
- =begin
- 102.txt
- -------
- 10
- 5
- 8
- 103.txt
- -------
- 30
- 5
- 20
- 8
- diff.txt
- -------
- 20
- 30
- =end
- compare items by array
- Array::Compare, compare(), full_compare()
- compare two array
- Query DynamoDB Items with Java By QueryRequest
- compare array between shell and tcl
- 浅谈 JavaScript array.sort(compare()) 实现原理.
- Find the 5 repeated items in an array
- Displaying ListView items - with class! by Rob Bir
- Separate list items by their class or kind_of in ruby
- compare
- compare
- compare:
- suffix array written by myself
- Sorting array elements by date
- Sorting array elements by date
- PHP array unset by value
- array to tree by js
- 2 VNCServer Scripts Compare[Merge by MS Word]
- 显示table栏位资料
- lvm代码分析(三)
- 类似Windows自带的画图软件mspaint的应用程序Draw
- Can't locate Config/IniFiles.pm in @INC
- 如何打乱一个数组的顺序
- compare items by array
- 不用IIS的网站
- 通过APP.CONFIG读取链接数据库字符串
- 正则表达式
- 审计署发布五家金融机构资产审计报告
- smartuplaod 文件上传组件 乱码
- 再理解ERP是管理
- Data-Driven Partitioning
- Bug总结