-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.tas
executable file
·105 lines (105 loc) · 2.74 KB
/
example.tas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"selectedContext": 1,
"contexts": {
"1": {
"name": "untitled",
"selectedTags": [
10
],
"selectedSnippet": 3
},
"2": {
"name": "untitled",
"selectedTags": [
11
],
"selectedSnippet": 2
}
},
"tags": {
"1": {
"name": "Файлы",
"bitMask": "1",
"parent": -1
},
"2": {
"name": "Чтение текстовых файлов",
"bitMask": "2",
"parent": 1
},
"3": {
"name": "Запись в текстовые файлы",
"bitMask": "4",
"parent": 1
},
"4": {
"name": "Строки",
"bitMask": "8",
"parent": -1
},
"5": {
"name": "Поиск подстроки",
"bitMask": "16",
"parent": 4
},
"6": {
"name": "Замена подстроки",
"bitMask": "64",
"parent": 4
},
"7": {
"name": "Языки программирования",
"bitMask": "128",
"parent": -1
},
"8": {
"name": "JavaScript",
"bitMask": "256",
"parent": 7
},
"9": {
"name": "Python",
"bitMask": "1024",
"parent": 7
},
"10": {
"name": "Java",
"bitMask": "2048",
"parent": 7
},
"11": {
"name": "C",
"bitMask": "4096",
"parent": 7
}
},
"snippets": {
"1": {
"bitMaskSum": "2064",
"contents": "String input = \"Android gave new life to Java\";\nboolean isFound = input.indexOf(\"Android\") !=-1? true: false; //true\n",
"cursorPosition": {
"row": 2,
"column": 0
},
"highlight": "java"
},
"2": {
"bitMaskSum": "4100",
"contents": "FILE *f = fopen(\"file.txt\", \"w\");\nif (f == NULL)\n{\n printf(\"Error opening file!\\n\");\n exit(1);\n}\n\n/* print some text */\nconst char *text = \"Write this to the file\";\nfprintf(f, \"Some text: %s\\n\", text);\n\n/* print integers and floats */\nint i = 1;\nfloat py = 3.1415927;\nfprintf(f, \"Integer: %d, float: %f\\n\", i, py);\n\n/* printing single chatacters */\nchar c = 'A';\nfprintf(f, \"A character: %c\\n\", c);\n\nfclose(f);",
"cursorPosition": {
"row": 20,
"column": 10
},
"highlight": "c_cpp"
},
"3": {
"bitMaskSum": "2050",
"contents": "Path path = Paths.get(\"/myfolder/myfile.ext\");\ntry (BufferedReader reader = Files.newBufferedReader(path)) {\n // Read from the stream\n String currentLine = null;\n while ((currentLine = reader.readLine()) != null)\n //do your code here\n} catch (IOException e) {\n // Handle file I/O exception...\n}\n",
"cursorPosition": {
"row": 9,
"column": 0
},
"highlight": "java"
}
}
}