Skip to content

Instantly share code, notes, and snippets.

View rrichardson's full-sized avatar
💭
⚔️ Hacking Away

Rick Richardson rrichardson

💭
⚔️ Hacking Away
View GitHub Profile
import itertools
def possible_combos(n, m):
ary = [0,0,0,0]
j = 0
while j < m:
j += 1
for i in range(n-1, -1, -1):
ary[i] = ary[i] + 1
## ERRORS in Chess/Util.elm ####################################################
-- INFINITE TYPE ------------------------------------------------ Chess/Util.elm
I am inferring weird self-referential type for `g`
30| let group1 = foldl (\x (g::gs) -> if (x == head g) then (x::g)::gs else [x]::g::gs)
^
The bit of the type that is self-referential looks like this:
int write_to_ngx(void* req_ctx, void* buffer, size_t size) {
ngx_http_request_t *r;
ngx_http_lua_ctx_t *ctx;
void *p;
ngx_buf_t *b;
ngx_chain_t *cl;
ngx_int_t rc;
dd("Writing to nginx");
(=>) = (,)
navb : Address NavAction -> M.State -> List Html
navb addr model =
[ div [class "navbar-spacer"] []
, nav [class "navbar"]
[ div [class "centered container" ]
[
ul [class "navbar-list"]
[ li [class "navbar-item"] [
port signInNotify : Signal (Maybe String)
port signInNotify =
let tester act =
case act of
AuthGamerReply gamer tok -> Just gamer.id
_ -> Nothing
in
Signal.map tester results.signal
int write_to_ngx(void* req_ctx, void* buffer, size_t size) {
ngx_http_request_t *r;
ngx_http_lua_ctx_t *ctx;
void *p;
ngx_buf_t *b;
ngx_chain_t *cl;
ngx_int_t rc;
if (0 == size) {
WARN("0 size to write");
import Effects exposing (Never)
import Board exposing (init, update, view, Action(..))
import StartApp
import Task
import Window
import Signal
app =
StartApp.start
...
else if (LUA_TNUMBER == type) {
union horrible_hack hack;
hack.dbl = lua_tonumber(L, 1);
buffer = hack.ptr;
}
//extern crate mio;
use std::net::{TcpListener, TcpStream, Ipv4Addr};
use std::str::FromStr;
fn main() {
let server = TcpListener::bind("127.0.0.1:13265").unwrap();
let clientside = TcpStream::connect("127.0.0.1:13265").unwrap();
Factory Details:
Long name: x264enc
Class: Codec/Encoder/Video
Description: H264 Encoder
Author(s): Josef Zlomek <[email protected]>, Mark Nauwelaerts <[email protected]>
Rank: primary (256)
Plugin Details:
Name: x264
Description: libx264-based H264 plugins