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
pub struct Foo; | |
fn main() { | |
recheck(); | |
let f = Foo; | |
let x = f.quux::<{ | |
impl Foo { | |
pub fn quux<const N: usize>(&self) -> usize { | |
N |
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
enum HAMTOverlay<K, V, Hash> { | |
Empty(), | |
FullTable(&[Self; 32]), | |
SingleKey(Hash::Hash, K, V, Rc<Self>), | |
SingleSubtree(Hash::Hash, Rc<Self>, Rc<Self>), | |
} | |
impl ... for SingleKey { | |
fn lookupWithHash(&self, k: K, h: Hash::Hash) -> Option<V> { |
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
(function() { | |
// Copyright 2018 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// https://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software |
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
# ... | |
# usage: mkrmrln <goinfre path> <home folder path> | |
function mkrmrln() { | |
mkdir -p $1 | |
rm -rf $2 | |
ln -s $1 $2 | |
} | |
mkrmrln /goinfre/$(whoami) ~/goinfre |
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
Parameters: | |
Count: This is literal. The count parameter specifies how many particles to spawn at once | |
with these exact same parameters. | |
Spread: The starting position of each particle is a normal number with mean of the Location | |
and standard deviation of the Spread, e.g. (Norm(Loc.X, Spread.X), Norm(Loc.Y, | |
Spread.Y), Norm(Loc.Z, Spread.Z)). This means that 68% of the particles will be | |
within the bounding box of +/- 1*Spread, 95% will be within +/- 2*Spread, and 99.7% | |
will be within +/- 3*Spread for each coordinate. | |
Speed: The effect of this is determined by each particle. |
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
XYZA.EPSILON = math.pow(6 / 29, 3) | |
XYZA.KAPPA = math.pow(29 / 3, 3) | |
XYZA.WHITE = XYZA.fromRGBA(255,255,255,1) | |
function bit2linear(channel) | |
--[[ | |
http://www.brucelindbloom.com/Eqn_RGB_to_XYZ.html | |
This converts rgb 8bit to rgb linear, lazy because the other algorithm is really really dumb | |
]] | |
-- return Math.pow(channel, 2.2); -- use in shader cores |
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 <signal.h> | |
#include <stdio.h> | |
#include <malloc.h> | |
#include <setjmp.h> | |
#include <stdbool.h> | |
static jmp_buf omg; | |
struct list { | |
char dummy[16384]; |
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
@-moz-document domain("tweetdeck.twitter.com") { | |
html.dark .column, | |
html.dark .stream-item { | |
background-color: #222426; | |
} | |
html.dark .detail-view-inline-text { | |
background: #fff; | |
color: #8899a6; | |
} | |
html.dark a, |
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
kane@kane-TECRA-Z40-B:~/gocode/src/livesplit$ cat core.go | |
package livesplit | |
func Hello() int { | |
return 43 | |
} | |
kane@kane-TECRA-Z40-B:~/gocode/src/livesplit$ cat cmd/livesplit/livesplit.go | |
package main | |
import "fmt" |
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
~/tmp$ wget -O poly.poly https://raw.github.com/mauke/poly.poly/master/poly.poly | |
~/tmp$ file -r -k poly.poly | |
test: Python script text executable | |
- C++ source text | |
- awk script text | |
- C source text | |
- C source text | |
- makefile script text OS/2 REXX batch file text | |
- HTML document text | |
- HTML document text |
NewerOlder