解答・コメントを送る方法
コメントを送るには2つの方法があります。
- 匿名でコメントを書くログインせずにコメントを書くことができます。 名前は「匿名」となります。
- アカウントを作成してコメントを書くアカウントを作成すると、記名での投稿ができます。 また、プロフィールページが作成され、 簡単なプロフィールや 統計情報が表示されるようになります。
投稿ボタンを押す前に以下の文章を確認してください
- 当サイトへの投稿は クリエイティブ・コモンズ・ライセンス BY(表示)および、その解釈に同意するものとみなされます。各ページには下のようにライセンス表示が行われます。
- あなたの投稿したコード・コメント・トピックが再利用・添削されることを望まない場合は、投稿をお控えください。
- 自分が書いていない、ウェブサイトや書籍などからの無断コピーは著作権の侵害です。著作権者の了解を得るか、自分で0から書いてください。
- 著作権の侵害、名誉毀損、など投稿内容に問題がある場合、削除することがあります。
- これらのことにあなたはあらかじめ同意したものとみなされます。
Post comment
Post a comment to the following challenge:
lessの実装
(Nested
Flatten)
As a reply to the following comment: sumim: Squeak Smalltalk で。(#6887) [show]

sumim
#6887()
[
Smalltalk
]
Rating1/1=1.00
Squeak Smalltalk で。
| file font nLines cr sp goNextPage goPrevPage findNext prevLine | file := FileStream fileNamed: 'in.txt'. font := TextStyle defaultFont. cr := Character cr. sp := Character space. nLines := Display height // (font height + font descent). goNextPage := [nLines timesRepeat: [file nextLine]]. prevLine := [file binary. [file position = 0 or: [file back = 13]] whileFalse. file ascii]. goPrevPage := [nLines timesRepeat: [prevLine value]]. findNext := [:pattern | pattern notEmpty ifTrue: [file upToAll: pattern]. prevLine value]. [ | string | string := String streamContents: [:ss | | position | position := file position. nLines timesRepeat: [ file nextLine ifNotNilDo: [:line | ss nextPutAll: line]. file peek ifNotNil: [ss cr]]. file position: position]. Display fillWhite. string asDisplayText display. [Sensor keyboardPressed] whileFalse. Sensor keyboard caseOf: { [$q] -> [file close. ^World restoreDisplay]. [$g] -> [file reset]. [$G] -> [file setToEnd]. [sp] -> [goNextPage value]. [$f] -> [goNextPage value]. [$b] -> [goPrevPage value]. [cr] -> [file nextLine]. [$e] -> [file nextLine]. [$y] -> [prevLine value]. [$/] -> [findNext value: (FillInTheBlank request: 'pattern:')] } otherwise: [] ] repeatRating1/1=1.00-0+
[ reply ]