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
$ brew install nginx-full --with-headers-more-module | |
==> Downloading http://nginx.org/download/nginx-1.6.0.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/nginx-full-1.6.0.tar.gz | |
==> Patching | |
patching file conf/nginx.conf | |
==> ./configure --prefix=/usr/local/Cellar/nginx-full/1.6.0 --with-http_ssl_module --with-pcre --with | |
==> make | |
==> make install | |
Error: Not a directory - (html, /usr/local/var/www) |
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
(defn fancy-mod | |
"Takes the following parameters and | |
returns a function which takes two integer numbers. | |
- operator-fn => Mathematical Operator : + OR * OR / OR - | |
- mod-by => number to mod by, example 2. | |
- output-fn => str or int. | |
Example: | |
((fancy-mod + 2 str) 10 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
(require 'sml-mode) | |
(setenv "PATH" (concat "/usr/local/Cellar/smlnj/110.75/libexec/bin:" (getenv "PATH"))) | |
(setq exec-path (cons "/usr/local/Cellar/smlnj/110.75/libexec/bin" exec-path)) | |
;; README | |
;; To load a file and run sml repl -> Press C-c C-v inside a sml file. | |
;; To run the current files tests -> Press C-c C-r inside a sml file. It assumes the tests are inside the same directory. | |
;; For example, If your code file is hw1.sml your test file should be named as hw1tests.sml in the same directory |
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
| TestCase | Input | Output | Expected | | |
|----------+-----------------+---------------+----------| | |
| 01 | "" | "" | Error | | |
| 02 | "()" | "" | Error | | |
| 03 | " 1 + 2 " | Invalid Input | 3.0 | | |
| 04 | "11" | 11 | 11.0 | | |
| 05 | "2-4+6" | 22.0 | 4.0 | | |
| 06 | "2-4+6-1-1-0+8" | 21.0-18.0 | 10.0 | | |
| 07 | "1-1+2-2+4-4+6" | 11.02.02.0 | 6.0 | |
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
a | |
about | |
above | |
after | |
again | |
against | |
all | |
am | |
an | |
and |
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
(do | |
(require '[clj-time.format :as f]) | |
(require '[clj-time.core :as t]) | |
(defn get-week | |
[dt] | |
(f/unparse (:weekyear-week f/formatters) | |
dt)) | |
(println (get-week (t/now))) | |
(println (get-week (t/minus (t/now) | |
(t/days 30))))) |
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
#Py code | |
import cProfile | |
import urllib2 | |
def main(): | |
urllib2.urlopen('http://majorgeeks.com/page.php?id=1') | |
if __name__ == '__main__': | |
cProfile.run('main()') | |
main() |
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
#Py Code tested | |
import urllib2 | |
import cProfile | |
def main(): | |
url = "http://majorgeeks.com/page.php?id=" | |
for i in xrange(1,21): | |
tempurl = url + str(i) | |
res = urllib2.urlopen(tempurl) |
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
(defn getepoch [timestamp] | |
(int (/ (.getMillis timestamp) 1000))) |
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
(switch-to-frame 0) | |
(switch-to-active) | |
(send-keys "body" "Thanks to noidi_ :)") | |
(switch-to-default) ;This is switch back from iframe. | |
(click (find-element {:tag :button :type :submit})) ;to submit :) |
OlderNewer