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
result = special_matrix.add(usual_and_boring_matrix) |
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
result = usual_and_boring_matrix.add(special_matrix) |
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
def fibonacci(n): | |
a,b = 0,1 | |
ret = [a] | |
for i in range(n): | |
a,b = b,a+b | |
ret.append(a) | |
return ret | |
def consumer(n): | |
work = fibonacci(n) |
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
def fibonacci(n, consumer): | |
a,b = 0,1 | |
consumer(a) #ret = [a] | |
for i in range(n): | |
a,b = b,a+b | |
consumer(a) #ret.append(a) | |
#return ret | |
fibonacci(10, print) |
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
def fibonacci(): | |
a,b = 0,1 | |
yield(a) #consumer(a) | |
while True: | |
a,b = b,a+b | |
yield(a) #consumer(a) | |
total = 0 | |
for i in fibonacci(): | |
total += i |
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
// taken from http://isocpp.org/files/papers/N3858.pdf | |
future<int> f(shared_ptr<stream> str) | |
{ | |
shared_ptr<vector<char>> buf = ...; | |
return str->read(512, buf) | |
.then([](future<int> op) { // lambda 1 | |
return op.get() + 11; | |
} | |
); |
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
// taken from http://isocpp.org/files/papers/N3858.pdf | |
future<int> f(stream str) resumable | |
{ | |
shared_ptr<vector<char>> buf = ...; | |
int count = await str.read(512, buf); | |
return count + 11; | |
} | |
future<void> g() resumable |
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
From ca22c8a63ea80f36044fdf76888041404e0a1974 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Vin=C3=ADcius=20dos=20Santos=20Oliveira?= | |
<vini.ipsmaker@gmail.com> | |
Date: Mon, 3 Feb 2014 21:30:21 -0300 | |
Subject: [PATCH] Fix mount options for vfat filesystems on automounting | |
Hot-plug device monitoring is done by udev. On OpenPandora, the file | |
/etc/udev/rules.d/local.rules guide udev to call the script | |
/etc/udev/scripts/mount.sh to handle aumounting. This is the script | |
changed in this commit. |
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
new_moc.output = moc_${QMAKE_FILE_BASE}.cpp | |
new_moc.commands = $$absolute_path(moc, $$[QT_INSTALL_BINS]) -DQT_VERSION_MAJOR=$$QT_MAJOR_VERSION -DQT_VERSION_MINOR=$$QT_MINOR_VERSION -DQT_VERSION_PATCH=$$QT_PATCH_VERSION ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} | |
new_moc.input = NEW_HEADERS | |
new_moc.variable_out = SOURCES | |
new_moc.target_predeps = true | |
QMAKE_EXTRA_COMPILERS += new_moc |
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
# This | |
pacman -S mingw-w64-{cmake,toolchain,qt4,qt5-base,sdl2} | |
# have the same effect of | |
pacman -S mingw-w64-cmake mingw-w64-toolchain mingw-w64-qt4 mingw-w64-qt5-base mingw-w64-sdl2 | |
# This | |
mv inkscape{-git,} | |
# have the same effect of | |
mv inkscape-git inkscape |
OlderNewer