This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Signal.hpp | |
// | |
// Simple Signals and Slots implementation for C++11 | |
// | |
#pragma once | |
#include <cassert> | |
#include <functional> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "0.1.0", | |
"command": "C:/Windows/sysnative/bash.exe", | |
"isShellCommand": true, | |
"showOutput": "always", | |
"args":[ | |
"--login", | |
"ant", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple way to perform an asynchronous closure synchronously | |
* | |
* Simply use the **run** method to execute the given closure that executes something with an | |
* asynchronous closure and signal when its complete. | |
* | |
* Sync.run { sync in somethingWithAsyncCallback { sync.signal() } } | |
*/ | |
public struct Sync { | |
private var semaphore: dispatch_semaphore_t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
if (indexPath.row < self.timeline.count) | |
{ | |
NSDictionary *tweet = self.timeline[indexPath.row]; | |
NSAttributedString *string = [TLTimelineViewController decorateLabelStringForMessage:tweet]; | |
// Measure the string, it's height is dynamic based on content. We calculate | |
// a width for the string by assuming the cell will fill the width of the table | |
// minus some padding applied around elements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in 1...100 | |
{ | |
var isDivisibleBy3 = ((i % 3) == 0) | |
var isDivisibleBy5 = ((i % 5) == 0) | |
if isDivisibleBy3 && isDivisibleBy5 | |
{ | |
println("FizzBuzz") | |
} | |
else if isDivisibleBy3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Knight Rider | |
Strobe a set of LEDs like the Knight Rider car! | |
*/ | |
// Number of LED in our array | |
enum { kLedCount = 8 }; | |
// Array of pins controlling LEDs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using std::cout; | |
using std::endl; | |
int main(int argc, const char * argv[]) | |
{ | |
for (int i = 1; i <= 100; i++) | |
{ | |
bool isDivisibleBy3 = ((i % 3) == 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usual Hello World script in Python. | |
# Hey look, this comment is longer than the code! | |
print "Hello World" |