This file contains hidden or 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
{ | |
"src": "/tmp/scratch-desktop/", | |
"dest": "/tmp/", | |
"arch": "i386", | |
"icon": "/tmp/scratch-desktop/resources/Icon.png", | |
"categories": [ | |
"Education" | |
] | |
} |
This file contains hidden or 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
void main() { | |
var counterStream = | |
Stream<int>.periodic(const Duration(seconds: 1), (x) => x).take(15); | |
var mas = <int>[]; | |
counterStream.listen((num) { | |
mas.add(num); | |
print("mas: ${mas}"); | |
}); | |
} |
This file contains hidden or 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
void main() { | |
final a = 10; | |
final inside = a.clamp(1, 11); | |
final outsideMax = a.clamp(1, 9); | |
final outsideMin = a.clamp(11, 20); | |
print('inside: $inside, min: $outsideMin, max: $outsideMax'); | |
} |
This file contains hidden or 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
import 'dart:async'; | |
void main() { | |
final controller = new StreamController<int>(); | |
controller.add(10); | |
controller.stream.listen((a) => print('receive: $a')); | |
final contrtoller2 = new StreamController<int>.broadcast(); | |
This file contains hidden or 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
void main() { | |
int i, b = 1, n = 11; | |
final mas = new List(n); | |
mas[0] = 1; | |
for (i = 1; i < n; i++) { | |
mas[i] = b; | |
b = mas[i-1] + b; | |
} | |
for (i = 0; i < n; i++) { |
This file contains hidden or 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
https://seanlin0800.gitbooks.io/async-performance/content/source/ch4/breaking_run_to_completion.html |
This file contains hidden or 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
root = true | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
charset = utf-8 | |
indent_style = tab | |
[*.{dart,less}] | |
end_of_line = lf |
This file contains hidden or 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
"url\\([\"'\s]*([^'\"()]+?)[\"'\s]*\\)(\s+(-?\d+)(?:px)?\s+(-?\d+)(?:px)?)?" | |
Matching url() at css rule |
This file contains hidden or 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
Music For Hackers | |
== | |
To a hacker, there's something distracting about booting up a GUI to listen to your tunes. You live your life in the terminal, you treat the mouse like a high voltage tap. | |
So give these commands a run in the terminal, and toss on your headphones. | |
sudo apt-get install mplayer | |
echo "alias defcon-start='nohup mplayer http://sfstream1.somafm.com:6200 > /dev/null 1>&2 &'" >> ~/.bashrc | |
echo "alias defcon-stop='killall -9 mplayer'" >> ~/.bashrc |
This file contains hidden or 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
LOCALE_EN := 0x4090409 | |
LOCALE_RU := 0x4190419 | |
CapsLock:: | |
if WinActive("ahk_class ConsoleWindowClass") { | |
PostMessage, 0x50, 0x02, 0,, A | |
} | |
else { | |
SetFormat, Integer, H | |
WinGet, WinID,, A | |
ThreadID := DllCall("GetWindowThreadProcessId", "UInt", WinID, "UInt", 0) |
NewerOlder