| 😄 | 😆 | 😊 | 😃 |
😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷
😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨
// https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ | |
function buildWaveHeader(opts) { | |
var numFrames = opts.numFrames; | |
var numChannels = opts.numChannels || 2; | |
var sampleRate = opts.sampleRate || 44100; | |
var bytesPerSample = opts.bytesPerSample || 2; | |
var blockAlign = numChannels * bytesPerSample; | |
var byteRate = sampleRate * blockAlign; | |
var dataSize = numFrames * blockAlign; |
// Named constants with unique integer values | |
var C = {}; | |
// Tokenizer States | |
var START = C.START = 0x11; | |
var TRUE1 = C.TRUE1 = 0x21; | |
var TRUE2 = C.TRUE2 = 0x22; | |
var TRUE3 = C.TRUE3 = 0x23; | |
var FALSE1 = C.FALSE1 = 0x31; | |
var FALSE2 = C.FALSE2 = 0x32; | |
var FALSE3 = C.FALSE3 = 0x33; |
import "js/web.jsx"; | |
class Util { | |
static function image2Canvas(image : HTMLImageElement) : HTMLCanvasElement { | |
var document = dom.window.document; | |
var canvas = document.createElement("canvas") as HTMLCanvasElement; | |
canvas.width = image.width; | |
canvas.height = image.height; | |
var ctx = canvas.getContext("2d") as CanvasRenderingContext2D; | |
ctx.drawImage(image, 0, 0); |
<?php | |
// Comparison and Formatting | |
$start = new DateTime('now'); | |
$end = new DateTime('2014-02-01'); | |
echo 'Start: ' . $start->format('d M Y') . "\n"; | |
echo 'End: ' . $end->format('d M Y') . "\n"; | |
$diff = $end->diff($start); | |
echo 'Comparison: ' . ($start < $end ? 'Start is less than End' : 'End is less than Start') . "\n"; |
| 😄 | 😆 | 😊 | 😃 |
😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷
😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨
/** | |
* Author: Richard Willis - badsyntax.co | |
* Example here: http://demos.badsyntax.co/places-search-bootstrap/example.html | |
* | |
* Please note: This is not a reliable method of geocoding the address. Using the | |
* PlacesService is a much better approach. View the example above for an example | |
* of using the PlacesService to geocode the address. | |
*/ | |
var service = new google.maps.places.AutocompleteService(); |
# Railscast | |
http://railscasts.com/episodes/308-oh-my-zsh | |
# Install Zsh | |
sudo apt-get update && sudo apt-get install zsh | |
# Install Oh-my-zsh | |
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh | |
# Make ZSH default shell |
<?php | |
// required Facebook PHP SDK v4.0.9 or later. | |
// include required files form Facebook SDK | |
require_once( 'Facebook/HttpClients/FacebookHttpable.php' ); | |
require_once( 'Facebook/HttpClients/FacebookCurl.php' ); | |
require_once( 'Facebook/HttpClients/FacebookCurlHttpClient.php' ); | |
require_once( 'Facebook/Entities/AccessToken.php' ); | |
require_once( 'Facebook/Entities/SignedRequest.php' ); |
(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.
As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.
You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :