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 BinkiBinarySearch { | |
/** | |
Input: `arr` is a sorted array, `sought` is a sought value, | |
`cmp` a comparer which when called like `cmp(a, b)` returns -1 | |
if `a` comes before `b`, 0 if `a` and `b` are of the same | |
order, and 1 if `a` comes after `b`. | |
Returns: -1 if something equivalent to `sought` is not found, | |
index of any element matching `sought` otherwise. | |
**/ |
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
C:\Users\ohnob>.\readUnicodeCsv.py | |
勇気 |
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.Linq; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
intr($"asdf{""}{"bsdf"}"); // Format=asdf{0}{1}, Arguments=“”,“bsdf” | |
intr($"asdf{""}bsdf"); // Format=asdf{0}bsdf, Arguments=“” | |
} |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ |
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
#!/usr/bin/env python | |
def something(): | |
pass | |
def hi(): | |
something() | |
something() | |
bye = 5 | |
sigh = 10 |
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
import haxe.macro.Expr; | |
import haxe.macro.MacroStringTools; | |
import haxe.macro.Printer; | |
class MoreLiteral { | |
static function main() { | |
var x = 2; | |
trace(Util.xpand(34)); | |
} |
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
<?php | |
class NotStream { | |
public function write($s) { | |
echo $s; | |
return $this; | |
} | |
} | |
class std { |
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
import haxe.ds.StringMap; | |
import haxe.macro.Expr; | |
import haxe.macro.Printer; | |
class XmlLiteral { | |
public static function main() { | |
// See https://gist.github.com/binki/9d09ea0ae8ea43788505af08844dae79 | |
// It would be cool if the following: |
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.Xml.Linq; | |
class XElementDemo | |
{ | |
static void Main(string[] args) | |
{ | |
var tree = new XElement( | |
"x", | |
new XAttribute("y", $"uh, {1+4}"), |
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.Reflection; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
foreach (var value in typeof(MyClass).GetCustomAttribute<MyAttribute>().Values) | |
{ | |
Console.WriteLine(value); |