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
| public class App { | |
| static String x8mil200µm; // micro symbol | |
| static String x7mil175μm; // mu letter | |
| static int aβc = 10; | |
| static final double π = 3.14159265359; | |
| public static void main(String[] args) { | |
| x8mil200µm = "Y"; | |
| x7mil175μm = "N"; |
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
| def variable_dict(module): | |
| v = vars(module) | |
| return {x:v[x] for x in v if not x.startswith('__')} | |
| import a | |
| import b | |
| A = variable_dict(a) | |
| B = variable_dict(b) | |
| A.update(B) |
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
| ~/codigo/kakoune/src (master)$ git log -1 --oneline | |
| 67559da file.cc: try more portable use of struct stat::st_mtime | |
| ~/codigo/kakoune/src (master)$ LANG=C make | |
| g++ -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -DKAK_DEBUG -MMD -MP -MF .event_manager.d -c -o .event_manager.o event_manager.cc | |
| g++ -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -DKAK_DEBUG -MMD -MP -MF .buffer_manager.d -c -o .buffer_manager.o buffer_manager.cc | |
| g++ -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -DKAK_DEBUG -MMD -MP -MF .exception.d -c -o .exception.o exception.cc | |
| g++ -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -DKAK_DEBUG -MMD -MP -MF .selectors.d -c -o .selectors.o selectors.cc | |
| In file included from buffer.hh:6:0, | |
| from selection.hh:4, | |
| from selectors.hh:4, |
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
| from PyQt4 import QtGui, QtCore, uic | |
| def p(x): | |
| print x | |
| class MainWindow(QtGui.QMainWindow): | |
| def __init__(self): | |
| QtGui.QWidget.__init__(self) | |
| uic.loadUi('redirect.ui', self) |
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
| #!/usr/bin/env python | |
| def add_to_path(path, item): | |
| return '{}[{}]'.format(path, repr(item)) | |
| def dictcompare(old, new, path, differences): | |
| old_keys = set(old.keys()) | |
| new_keys = set(new.keys()) |
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
| (function () { | |
| var width = 500, height = 200, padding = 40; | |
| var max = 10; | |
| var dataset = d3.range(10) | |
| .map(function () { return 1 + Math.random() * (max - 1); }); | |
| // Coordinate scaling functions | |
| var x = d3.scale.linear() | |
| .domain([0, dataset.length]) | |
| .range([padding, width - padding]); |
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
| def dictcompare(da, db): | |
| ka = set(da.keys()) | |
| kb = set(db.keys()) | |
| if ka & kb: | |
| if ka - kb: | |
| print 'Keys only in A:', ka - kb | |
| if kb - ka: | |
| print 'Keys only in B:', kb - ka | |
| else: |
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
| sudo apt-get install -y git | |
| sudo apt-get install -y curl | |
| curl https://raw.github.com/creationix/nvm/master/install.sh | sh | |
| # Load nvm and install latest production node | |
| source $HOME/.nvm/nvm.sh | |
| nvm install v0.10.12 | |
| nvm use v0.10.12 | |
| npm install -g jshint |
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
| var a = { | |
| name: 'a', | |
| fun: function () { return this; } | |
| }; | |
| var bFunc = function () { return this; }; | |
| var b = { | |
| name: 'b', | |
| fun: bFunc | |
| }; |
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
| #http://www.youtube.com/watch?v=1CjG0CitrbQ | |
| http://www.youtube.com/watch?v=m9vUrgftdE4 | |
| http://www.youtube.com/watch?v=TIwIE0p0Wow | |
| http://www.youtube.com/watch?v=GcKngtLYC9Y | |
| http://www.youtube.com/watch?v=jUKmXmReyms | |
| http://www.youtube.com/watch?v=5FdUh66As2c | |
| http://www.youtube.com/watch?v=DfgHEGNf3NA | |
| http://www.youtube.com/watch?v=X43eEqXBzI8 | |
| http://www.youtube.com/watch?v=CyRFG2dTal4 | |
| http://www.youtube.com/watch?v=A_0Gkxj1uh8 |