Pradžia: dabar Pabaiga: 2013-10-01 Atsakingi: Antanas Uršulis ir Motiejus Mėnesį testuojame ir taisome; 2013-11-01 paskleidžiame mokykloms.
Pradžia: dabar.
-module(btree). | |
-export([bt/1, lookup/2, ins/2, del/2]). | |
%% UNBALANCED BINARY TREE | |
bt(Val, Left, Right) -> { Val, Left, Right }. | |
bt(Val) -> bt(Val, nil, nil). | |
lookup(nil, _) -> nil; | |
lookup({Val, _, _}, Val) -> Val; | |
lookup({Val, L, _}, Elem) when Val > Elem -> lookup(L, Elem); |
==== shell session ==== | |
motiejus:~$ erlc *.erl && erl -sname yadd | |
Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false] | |
Eshell V5.8.4 (abort with ^G) | |
(yadd@skveez)1> gen_server:start_link({global, pb}, pb, [], []). | |
{ok,<0.40.0>} | |
(yadd@skveez)2> gen_server:start_link({global, pb}, pb, [], []). | |
{error,{already_started,<0.40.0>}} | |
(yadd@skveez)3> gen_server:start_link({global, go}, go, [], []). |
*.txt.gz | |
all.txt | |
filelist.mk |
Section "ServerLayout" | |
Identifier "aticonfig Layout" | |
Screen 0 "aticonfig-Screen[0]-0" 0 0 | |
EndSection | |
Section "Module" | |
EndSection | |
Section "Monitor" | |
Identifier "aticonfig-Monitor[0]-0" |
#!/bin/bash | |
ERLS=`find src apps -name '*.erl' 2>/dev/null` | |
HRLS=`find include -name '*.hrl' 2>/dev/null` | |
records= | |
for hrl in $HRLS; do | |
records+=$(grep -e '-record(' $hrl | perl -pe 's=-record\(([^,]+).*=\1=') | |
done |
#!/usr/bin/env python | |
import os | |
import sys | |
from datetime import datetime, timedelta | |
try: | |
from gtimelog import TimeWindow | |
from gtimelog import Settings | |
except ImportError: |
#!/bin/sh | |
set -e | |
usage() { | |
echo "Usage: $0 MYSQL_USER MYSQL_PASSWORD PREFIX" | |
echo | |
echo "Converts as many as possible SSP MySQL tables to MEMORY" | |
echo | |
} |
test: t.beam | |
erl -eval 't:bench(), init:stop()' | |
t.beam: t.erl | |
erlc -smp +native $< | |
[motiejui_in] | |
exten => 1111,1,Answer | |
exten => 1111,n,Echo | |
exten => _X.,1,Goto(s,1) | |
exten => motiejus,1,Goto(s,1) | |
exten => s,1,Dial(SIP/precise/precise&SIP/e63/e63) | |
exten => s,n,Hangup |