• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revisionb25f829c150a48be8c385d842824edfc73fd7b0d (tree)
Zeit2008-06-26 00:36:15
Autorikeji <ikeji@f836...>
Commiterikeji

Log Message

add uniq plugins

git-svn-id: http://dev.ikejima.org/src/svn/pragger/trunk@386 f8368ae4-1e99-dc11-9799-0018f35ab5fa

Ändern Zusammenfassung

Diff

--- /dev/null
+++ b/plugin/Filter/uniq.rb
@@ -0,0 +1,15 @@
1+## uniq -- IKeJI
2+##
3+## it looks like uniq command in unix
4+
5+def uniq(config,data)
6+ result = {}
7+ data.reverse.each_with_index do|i,ind|
8+ result[ (i.link rescue i) ] = [ind,i]
9+ end
10+ data = []
11+ result.values.sort{|a,b| a[0]<=>b[0]}.each do |a|
12+ data << a[1]
13+ end
14+ return data
15+end