Forked from Rogie's Pen SVG zigzag.
A Pen by Captain Anonymous on CodePen.
var exec = require('child_process').spawn; | |
var node = exec('node', process.argv.splice(2), {stdio: 'inherit'}); |
long count_bits(long number) { | |
// Accumulates the total bits set in `number` | |
unsigned int count; | |
// This loop initializes the count, loops only until all bits have been cleared and | |
// increments the count each time through the loop. | |
for (count = 0; number; count++) { | |
// Clear the least significant bit set | |
number &= number - 1; | |
} |
Forked from Rogie's Pen SVG zigzag.
A Pen by Captain Anonymous on CodePen.
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
#!/usr/bin/env ruby | |
require 'json' | |
require 'set' | |
package_dir = "#{ENV['HOME']}/.atom/packages" | |
packages = Dir[File.join(package_dir, '*')].select { |file| File.directory?(file) } | |
dependencies = {} | |
packages.each do |package| |
import java.util.Random; | |
Random random = new Random(); | |
int number = random.nextInt(5); // Rock = 0, Paper = 1, Scissors = 2, Lizard = 3, Spock = 4 |
The guidelines will follow the convention described in Microsoft's .NET Framework Design Guidelines:
The guidelines are organized as simple recommendations using DO, CONSIDER, AVOID, and DO NOT. For example, a Do guideline is one that should virtually always be followed. On the other hand, Consider guidelines should generally be followed, but if you fully understand the reasoning behind a guideline and have a good reason to not follow it anyway, you should not feel bad about breaking the rules. Similarly, Do not guidelines indicate something you should almost never do. Less strong, Avoid guidelines indicate that something is generally not a good idea, but there are known cases where breaking the rule makes sense.
Some more complex guidelines are followed by additional background information, illustrative code samples, and rationale.
'.source.java': | |
'private static final': | |
prefix: 'psf' | |
body: 'private static final' | |
'private static final String': | |
prefix: 'psfs' | |
body: 'private static final String' | |
'JUnit Test': | |
prefix: 'test' | |
body: """ |