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
/*! | |
* Cedric Van Goethem | |
* Rudimentary Twinkle Twinkle Little Star demo for | |
* http://wavepot.com/ | |
*/ | |
var transpose = 0.5; | |
var volume = 0.1; | |
var tempo = 2; | |
var notes = {'A': 440, 'B': 493.88, 'C': 523.25, 'D': 587.33, 'E': 659.25, 'F': 698.46, 'G': 783.99 }; |
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
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Net.Mail; | |
using System.Threading; | |
namespace ConcurrentSMTP |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Diagnostics; | |
using System.Threading.Tasks; | |
namespace ShiftAnd | |
{ | |
class Program |
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
static void PrintFrame(string[] args) | |
{ | |
var maxLen = args.Select(s => s.Trim().Length).Max(); | |
for (var i = 0; i < maxLen + 4; ++i) | |
Console.Write("*"); | |
Console.WriteLine(); | |
var center = maxLen / 2; | |
foreach (var s in args) | |
{ |
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
static double Pi() | |
{ | |
var value = 1d; | |
for (var i = 1; i < 10000; i++) | |
value += Math.Pow(-1d, i) * (1d / (2*i + 1)); | |
return value * 4d; | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
namespace WlanPasswords | |
{ |
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
// Go-language square root implementation | |
package main | |
import ("fmt") | |
func Sqrt(x float64) float64 { | |
z, precision := 1.0, 2.22e-15 | |
for { | |
z = (z + x/z)/2 | |
if abs(z*z - x) < precision { |
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
#!/bin/bash | |
echo '# Linux mod for RK3188 rooting script - Zepheus #' | |
echo 'Rooting device...' | |
adb shell mv /data/local/tmp /data/local/tmp.bak | |
adb shell ln -s /data /data/local/tmp | |
adb reboot | |
read -p "--- Reboot 1/3 - Press Space Bar once the device has rebooted" | |
adb shell rm /data/local.prop > nul |
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
-- Description: A red-black tree implementation in Haskell | |
-- Author: Cedric Van Goethem | |
-- Version 1.1, 2013 | |
type Tree a = Node a | |
data Color = Red | Black deriving (Eq, Show) | |
data Node a = Node a Color (Node a) (Node a) | Nil deriving (Eq, Show) | |
tree :: (Ord a) => a -> Tree a | |
tree x = Node x Black Nil Nil |
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
/* | |
* HashSet.cs: A quadratic probing implementation of a HashSet | |
* Author: Cedric Van Goethem | |
* Revision: 1 | |
*/ | |
using System; | |
using System.Collections.Generic; | |
namespace DataStructures |
NewerOlder