Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
/* | |
* Function that handles the drawing of a circle using the triangle fan | |
* method. This will create a filled circle. | |
* | |
* Params: | |
* x (GLFloat) - the x position of the center point of the circle | |
* y (GLFloat) - the y position of the center point of the circle | |
* radius (GLFloat) - the radius that the painted circle will have | |
*/ | |
void drawFilledCircle(GLfloat x, GLfloat y, GLfloat radius){ |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
import time | |
import random | |
class MatrixFibonacci: | |
A = [[1, 1], | |
[1, 0]] | |
def __init__(self): | |
self.__memo = {} |
#include <iostream> | |
#include <sstream> | |
#include <bitset> | |
#include <vector> | |
#include <iomanip> | |
#include <cstring> | |
// By: hak8or | |
// To compile: g++ -std=c++0x SHA_256_hak.cpp -o SHA_256_hak | |
// To run self test just run the following: SHA_256_hak |
$small-desktop: 960px; | |
$large-desktop: 1200px; | |
$handheld: 768px; | |
$handhelds-landscape: 1024px; | |
$mobile: 640px; | |
$mobile-landscape: 480px; | |
@mixin respond-to($media) { | |
@if $media == largeDesktop { | |
@media only screen and (min-width: $large-desktop) { @content } |
<!-- Iterate N times (replace N with a number --> | |
{% for i in "x"|ljust:"N" %} | |
<!-- Access numeric variable (0-based index) --> | |
{{ forloop.counter0 }} | |
<!-- Access numeric variable (1-based index) --> | |
{{ forloop.counter }} | |
{% endfor %} | |
<!-- For example, iterate from 0 to 3 --> |
Many different applications claim to support regular expressions. But what does that even mean?
Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.
The information here is just copied from: http://regular-expressions.mobi/refflavors.html
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
import os, asyncnet, asyncdispatch | |
proc callback1(): Future[int] = | |
var retFuture = newFuture[int]("callback1") | |
echo "Callback1: Waiting" | |
sleep(3000) | |
retFuture.complete(10) | |
return retFuture |