start new:
tmux
start new with session name:
tmux new -s myname
| // Inspired by https://github.com/logicalparadox/backbone.iobind/blob/master/lib/sync.js | |
| // Overwrite Backbone.sync method | |
| Backbone.sync = function(method, model, options){ | |
| // create a connection to the server | |
| var ws = new WebSocket('ws://127.0.0.1:1234'); | |
| // send the command in url only if the connection is opened | |
| // command attribute is used in server-side. | |
| ws.onopen = function(){ |
If you're coming to the Property-Based TDD As If You Meant It Workshop, you will need to bring a laptop with your favourite programming environment, a property-based testing library and, depending on the language, a test framework to run the property-based-tests.
Any other languages or suggestions? Comment below.
.NET (C#, F#, VB)
Python:
| module Alphabet ( | |
| Alphabet, | |
| encodeWithAlphabet, | |
| decodeFromAlphabet | |
| ) where | |
| import Prelude | |
| import Data.List(elemIndex, mapAccumR) | |
| import Data.Maybe(fromMaybe) |
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't:
Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.
If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
-moz-appearance to none. This will "reset" the styling of the element;text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;| <!-- Video element (live stream) --> | |
| <label>Video Stream</label> | |
| <video autoplay id="video" width="640" height="480"></video> | |
| <!-- Canvas element (screenshot) --> | |
| <label>Screenshot (base 64 dataURL)</label> | |
| <canvas id="canvas" width="640" height="480"></canvas> | |
| <!-- Capture button --> | |
| <button id="capture-btn">Capture!</button> |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |