if (self.feeling(you.leaving) === "sad") {
print("I wish you didn't leave\n");
}
I wish you didn't leave.
~$ _
... | |
"mounts": [ | |
"type=bind,source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=/home/vscode/.gitconfig,readonly", | |
"type=bind,source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,readonly", | |
"type=bind,source=${localEnv:HOME}${localEnv:USERPROFILE}/.gnupg,target=/home/vscode/.gnupg,readonly", | |
"type=bind,source=${localEnv:HOME}${localEnv:USERyyPROFILE}/.ssh,target=/home/vscode/.ssh,readonly" | |
], | |
... |
## requires a `pip install vobject` | |
import vobject | |
import io | |
import csv | |
reader = io.open("contacts.vcf", "r", encoding="utf-8") | |
output_file = open('contacts.csv', mode='w') | |
writer = csv.writer(output_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) | |
writer.writerow(["username", "name.first", "name.last"]) |
function getStats(code) { | |
const flatten = (arr, depth = 1) => arr.reduce((a, v) => a.concat(depth > 1 && Array.isArray(v) ? flatten(v, depth - 1) : v), []); | |
const words = (str='', pattern = /[^a-zA-Z-]+/) => str.split(pattern).filter(Boolean); | |
const stats = {}; | |
const { _id: session, document } = db.sessions.findOne({ code }); | |
const { pages } = db.documents.findOne({ _id: document }); | |
stats.pageCount = pages.length; | |
const pageObjects = db.pages.find({ _id: { $in: pages } }); |
pragma solidity ^0.4.0; | |
contract TodosContract { | |
address private _owner ; | |
struct Todo { | |
string title; | |
bool completed; | |
} |
// The number of leds represent how many | |
// degrees Celsius are above 15C | |
// run and compile at https://pxt.microbit.org | |
const getLedArray = (temp: number) => { | |
const n = Math.max(0, temp - 15); | |
return[ | |
Math.min(5, n), | |
Math.max(0, Math.min(5, n - 5)), |
FROM learnfwd/lfa | |
RUN mkdir -p /app | |
WORKDIR /app | |
ENV PORT 80 | |
ENV NODE_ENV development | |
ENTRYPOINT ["bash"] | |
CMD ["bash"] |
(defn powow | |
[n] | |
(let [ | |
exp (fn exp [x n] (reduce * (repeat n x))) | |
pow (str (exp 2N n)) | |
len (count pow) | |
sum (reduce | |
(fn | |
[sum x] | |
(+ sum (- (int x) (int \0)))) |
if (self.feeling(you.leaving) === "sad") {
print("I wish you didn't leave\n");
}
I wish you didn't leave.
~$ _
De cat timp faceti manuale electronice? O sa va rog sa descrieti foarte pe scurt si pe intelesul unor oameni simpli ce face un manual electronic produs de dumneavoastra. Care e diferenta fata de manualele electronice din sistemul de invatamant romanesc.
Learn Forward face manuale electronice de trei ani.
În martie 2013 am lansat în colaboare cu Holcim într-un proiect CSR ceea ce a fost recunoscut de Ministerul Educației drept "Primul Manual Digital". Detalii aici și aici. Această tehnologie nu o mai folosim pentru că deși era extrem de ușor de folosit mergea doar pe iPad-uri și calculatoare Apple. (aceasta este prima iterație)
În septembrie 2013 am lansat în colaborare cu Samsung, sistemul de management al învățării (Learning Management System) destinat claselor lor digitale din România și Bulgaria. În urma discuțiilor cu profesorilor am aj
// 1. Load an image in a new tab | |
// 2. Open JS console. Leave it open | |
// 3. Paste this | |
var s = document.createElement('script'); | |
s.setAttribute('src','https://code.jquery.com/jquery-2.1.4.min.js'); | |
document.head.appendChild(s); | |
// 4. Then paste this | |
var oldx = 0, oldy = 0; |