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
package main | |
import ( | |
"fmt" | |
"github.com/zacg/htm" | |
"github.com/zacg/htm/utils" | |
) | |
func main() { | |
tps := htm.NewTemporalPoolerParams() |
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.Web; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Converters; | |
using System.Web.Mvc; | |
using System.IO; | |
using System.Globalization; | |
using System.Dynamic; |
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
public class SimpleTextAdapter<T> | |
: BaseAdapter<T> | |
where T : new() | |
{ | |
private T[] items; | |
private Activity context; | |
private Func<T,string> displayName; | |
private Func<T,long> itemId; | |
public SimpleTextAdapter(Activity context, T[] items, Func<T,string> displayName, Func<T,long> itemId) |
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
//Returns an array of boolean values representing | |
//every possible combination of n binary digits | |
function binaryCombos(n){ | |
var result = []; | |
for(y=0; y<Math.pow(2,n); y++){ | |
var combo = []; | |
for(x=0; x<n; x++){ | |
//shift bit and and it with 1 | |
if((y >> x) & 1) | |
combo.push(true); |
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
func RenderLowerJson(o interface{}) revel.Result { | |
return RenderLowerJsonResult{o, true} | |
} | |
type RenderLowerJsonResult struct { | |
obj interface{} | |
lowerFirstChar bool | |
} | |
func (r RenderLowerJsonResult) Apply(req *revel.Request, resp *revel.Response) { |