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
var again = function() { | |
console.log("Again at " + new Date()); | |
setTimeout(again, 1000); | |
}; | |
again(); |
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
alert(); |
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
;// paste this code in REPL and enjoy | |
'(1, 2, 3) ;// list of numbers | |
'("ashish" "negi" "is" "writing" "this" "line") ;// you do not need comma anywhere in clojure :) | |
'("ashish" 1 "negi" 2) ;// lists can have multiple |
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
( + 1 2) ;// it would output 3 | |
;// ( func-name arguments ) | |
( clojure.string/join " " ["ashish" "negi" "is" "writing" "this" "post"] ) | |
;// output | |
3 | |
"ashish negi is writing this post" |
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
<html> | |
<head></head> | |
<body> | |
<script> | |
document.getElementById("my-fancy").innerHTML = "Hello world !!!" | |
</script> | |
<div id="my-fancy"> | |
</div> | |
</body> |
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
<html> | |
<head></head> | |
<body> | |
<div id="my-fancy"> | |
</div> | |
<script> | |
document.getElementById("my-fancy").innerHTML = "Hello world !!!" | |
</script> | |
</body> | |
</html> |
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
(setq inhibit-startup-message t) | |
(switch-to-buffer "*scratch*") | |
;(global-linum-mode) | |
(global-set-key (kbd "\C-x c") 'clipboard-kill-ring-save) | |
(global-set-key (kbd "\C-x p") 'clipboard-yank) | |
(setq make-backup-files t) | |
(setq version-control t) | |
(setq backup-directory-alist (quote ((".*" . "~/.emacs.d/.emacs_backups/")))) |
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
(ns fpcontest.expression) | |
(def Term) | |
(def Factor) | |
(def ToMod (int (+ 1000000000 7))) | |
(def toPrint true) | |
(defn myprintln [& args] |
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
;; ------- Euler Functions --------------- | |
(set! *unchecked-math* true) | |
(def ToMod (int (+ 1000000000 7))) | |
(def toPrint false) | |
(defn myprintln [& args] | |
(if toPrint | |
(apply println args))) |
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
;; ------- Euler Functions --------------- | |
(set! *unchecked-math* true) | |
(def ToMod (int (+ 1000000000 7))) | |
(def toPrint false) | |
(defn myprintln [& args] | |
(if toPrint | |
(apply println args))) |
OlderNewer