Shortcut | Description |
---|---|
Ctrl + 3 | Opens a filterable list of all available actions. |
Ctrl + D | Delete the current line. |
Ctrl + L | Go to line. |
Ctrl + O | Gives an outline of the code allowing quick navigation between definitions. |
Ctrl + / | Toggles commenting of the selected region or the current line. |
Ctrl + F11 | Runs the current code. |
Ctrl + Shift + F | Format the selected code or the current file. |
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
Exception in thread "nREPL-worker-0" java.lang.NoSuchMethodError: clojure.tools.nrepl.StdOutBuffer.length()I | |
at clojure.tools.nrepl.middleware.session$session_out$fn__7630.doInvoke(session.clj:43) | |
at clojure.lang.RestFn.invoke(RestFn.java:460) | |
at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$ff19274a.write(Unknown Source) | |
at java.io.PrintWriter.write(Unknown Source) | |
at java.io.PrintWriter.write(Unknown Source) | |
at clojure.core$fn__5471.invoke(core_print.clj:191) | |
at clojure.lang.MultiFn.invoke(MultiFn.java:231) | |
at clojure.core$pr_on.invoke(core.clj:3392) | |
at clojure.core$pr.invoke(core.clj:3404) |
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
package com.drguildo.stdlib.algorithms | |
fun fletcher16(data: ByteArray): Int { | |
var sum1 = 0 | |
var sum2 = 0 | |
for (d in data) { | |
sum1 = (sum1 + d) % 255 | |
sum2 = (sum2 + sum1) % 255 | |
} |
I hereby claim:
- I am drguildo on github.
- I am drguildo (https://keybase.io/drguildo) on keybase.
- I have a public key whose fingerprint is 8ACF 5D22 C3CE 5B92 7288 51A2 A848 A3BA D352 170C
To claim this, I am signing this object:
wow very donations: D5Rf8dB75kaW1AfHs1pZSvNgCJ3dweKEiZ
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
import json | |
import string | |
import urllib2 | |
data = urllib2.urlopen("http://pubapi.cryptsy.com/api.php?method=singlemarketdata&marketid=132") | |
doge = string.join(data.readlines()) | |
doge = json.loads(doge) | |
doge = doge['return']['markets']['DOGE'] | |
print(doge['lasttradetime'] + " " + doge['label'] + ": " + doge['lasttradeprice']) |
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
;;; bentley-theme.el --- Emacs 24 theme with a dark background. | |
;; Copyright (C) 2014 , Simon Morgan <sjm@sjm.io> | |
;; Author: Simon Morgan <sjm@sjm.io> | |
;; | |
;; Version: 0.1 | |
;; Package-Requires: ((emacs "24")) | |
;; Created with emacs-theme-generator, https://github.com/mswift42/theme-creator. |
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
if (buffer.startsWith(" ")) { | |
String trimmed = buffer.trim(); | |
matchStart += buffer.indexOf(trimmed.charAt(0)); | |
buffer = buffer.substring(matchStart); | |
} |
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
mod simple; | |
use simple::Expr::{Number, Add, Multiply}; | |
fn main() { | |
println!("Let's compute!"); | |
let e = Add(Box::new(Add(Box::new(Number(1)), | |
Box::new(Number(1)))), | |
Box::new(Multiply(Box::new(Number(2)), |
OlderNewer