This file contains hidden or 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
public bool IsEven(int num) | |
{ | |
int up = num; | |
int down = num; | |
try | |
{ | |
while(up != 0) | |
{ | |
up = up + 2; | |
} |
This file contains hidden or 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
from original import CallMe | |
CallMe() |
This file contains hidden or 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
{ | |
"formsoul": { | |
"url": "http://github.com/sluu99/formsoul", | |
"lastVersion": "0.0.1", | |
"allVersions": ["0.0.1"], | |
"cdn": "http://cdn.sluu99.com/formsoul/formsoul-<version>.min.js" | |
} | |
} |
This file contains hidden or 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
// sluu99 (C) 2013 | |
// Released under WTFPL | |
// Fakenode version 0.0.1 | |
window.require = function(x) { | |
if (x === 'resolverjs') { | |
return { | |
get: function(x, defaultVal) { return defaultVal; } | |
}; | |
} |
This file contains hidden or 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
void Commit(Row[] rows) | |
{ | |
// yield priority to commits that came before | |
GetGlobalLock(); | |
ReleaseGlobalLock(); | |
// attempt to lock all rows | |
int i = 0; | |
for (i = 0; i < rows.Length; i++) | |
{ |
This file contains hidden or 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
using System; | |
using System.Diagnostics; | |
namespace SunriseCalculator | |
{ | |
public class SolarInfo | |
{ | |
public double SolarDeclination { get; private set; } | |
public TimeSpan EquationOfTime { get; private set; } | |
public DateTime Sunrise { get; private set; } |
This file contains hidden or 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
/// <summary> | |
/// A stream reader which will puts the seek position to the right place after each line read. | |
/// </summary> | |
internal class LineReader | |
{ | |
private Stream stream; | |
private Encoding encoding; | |
/// <summary> | |
/// Creates a new instance of this class. |
This file contains hidden or 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Child1: {0}", new Child1().Caller); | |
Console.WriteLine("Child2: {0}", new Child2().Caller); | |
Console.WriteLine("Child3: {0}", new Child3().Caller); | |
} | |
public abstract class Parent |
This file contains hidden or 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
public Message Post([FromBody]Message message) | |
{ | |
if (message.Type == "Message") | |
{ | |
// calculate something for us to return | |
int length = (message.Text ?? string.Empty).Length; | |
// return our reply to the user | |
return message.CreateReplyMessage($"Hello from TallyBot! You sent {length} characters"); | |
} |
This file contains hidden or 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
public class Command | |
{ | |
public string Action { get; set; } | |
public string Parameters { get; set; } | |
public static bool TryParse(string text, out Command command) | |
{ | |
command = null; |