(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| ;;;; SHA-1 and SHA-2 implementations. | |
| ;;;; Uses R7RS bytevector and byte I/O interfaces. | |
| ;;;; Requires SRFIs 1, 26, 43, and 60. | |
| ;;; Auxiliary definitions to avoid having to use giant tables of constants. | |
| (define primes80 '(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 | |
| 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 | |
| 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 | |
| 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 |
| # Copyright (c) 2014 Lukas Fittl <[email protected]> | |
| # | |
| # Released in the public domain - fork as you wish. | |
| require 'rubygems' | |
| require 'mixlib/cli' | |
| require 'pg' | |
| require 'pg_query' | |
| require 'curses' |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
| #include "SDL.h" | |
| #include <OpenGLES/ES2/gl.h> | |
| #include <OpenGLES/ES2/glext.h> | |
| #include <iostream> | |
| #include <string> | |
| #include <memory> | |
| using namespace std; | |
| GLuint programObject; | |
| class Graphics |
| ; 1 2 3 4 5 6 7 | |
| ;01234567890123456789012345678901234567890123456789012345678901234567890 | |
| ;======================================================================= | |
| ;+---------------------------------------------------------------------+ | |
| ;| | | |
| ;| Example using brk() system call for dynamic memory allocations. | | |
| ;| | | |
| ;| DON'T CONFUSE that brk() used in C Function is different with brk() | | |
| ;| systemcall (systemcall 45 for x86 ASM). | | |
| ;| | |
| <html> | |
| <body> | |
| <script type="text/javascript" src="//mozilla.github.io/pdf.js/build/pdf.js"></script> | |
| <script type="text/javascript"> | |
| var url = "https://docs.google.com/document/export?format=pdf&id=1ML11ZyyMpnAr6clIAwWrXD53pQgNR-DppMYwt9XvE6s&token=AC4w5Vg7fSWH1Hq0SgNckx4YCvnGPaScyw%3A1423618416864"; | |
| var pages = [], heights = [], width = 0, height = 0, currentPage = 1; | |
| var scale = 1.5; | |
| function draw() { |
| AllCops: | |
| RunRailsCops: true | |
| # Commonly used screens these days easily fit more than 80 characters. | |
| Metrics/LineLength: | |
| Max: 120 | |
| # Too short methods lead to extraction of single-use methods, which can make | |
| # the code easier to read (by naming things), but can also clutter the class | |
| Metrics/MethodLength: |
| (require '[[clojure.cache :as cache] | |
| [clojure.string :as string] | |
| [cb-statsd :as statsd]]) | |
| (def STATSD_SAMPLE_RATE 0.01) | |
| (defn get-statsd-path | |
| [f] | |
| (as-> (str (type f)) fname ;; returns something like "class namespace$foo" | |
| (last (string/split fname #" ")) ;; parse out the "class " |
| This is ApacheBench, Version 2.3 <$Revision: 1604373 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking localhost (be patient).....done | |
| Server Software: Racket | |
| Server Hostname: localhost | |
| Server Port: 9000 |