This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! defclass { | |
(class $name:ident;) =>{struct $name;}; | |
(class $name:ident {$($contents:tt)*}) =>{defclass!{$name,,{},$($contents)*}}; | |
(struct $name:ident;) =>{struct $name;}; | |
(struct $name:ident {$($contents:tt)*}) =>{defclass!{$name,pub,{},$($contents)*}}; | |
($name:ident,$($visible:ident)*,{$($field:tt)*},public:$($rest:tt)*) =>{ | |
defclass!{$name,pub,{$($field)*},$($rest)*} | |
}; | |
($name:ident,$($visible:ident)*,{$($field:tt)*},private:$($rest:tt)*) =>{ | |
defclass!{$name,,{$($field)*},$($rest)*} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding:utf-8 | |
import sys | |
MAX_LINE_SIZE=32 | |
a = [] | |
if len(sys.argv) > 1: | |
with open(sys.argv[1],'r') as f: | |
for l in f: | |
a.append(int(l)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nodamushi.jfx; | |
import javafx.scene.control.TextArea; | |
import javafx.scene.control.skin.TextInputControlSkin; | |
import static javafx.collections.FXCollections.observableArrayList; | |
import static javafx.collections.FXCollections.unmodifiableObservableList; | |
import java.util.ArrayList; | |
import java.util.List; |