See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| #!/usr/bin/python | |
| from bcc import BPF | |
| from time import sleep | |
| # This outputs a count of how many times the clone and execve syscalls have been made | |
| # showing the use of an eBPF map (called syscall). | |
| program = """ | |
| BPF_HASH(syscall); |
See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "html/template" | |
| "github.com/gorilla/sessions" |
belongs_to association does not automatically save the object. It does not save the associated object either.has_one association, that object is automatically saved (in order to update its foreign key).has_one association) is unsaved (that is, new_record? returns true) then the child objects are not saved. They will automatically when the parent object is saved.| #!/usr/bin/perl | |
| use Mysql; | |
| use strict; | |
| use vars qw($school_name); | |
| use vars qw($pass); | |
| require "./cgi-lib.pl"; |
| public class AnimatedActivity extends Activity | |
| { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) | |
| { | |
| super.onCreate(savedInstanceState); | |
| //opening transition animations | |
| overridePendingTransition(R.anim.activity_open_translate,R.anim.activity_close_scale); | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/usr/bin/python | |
| # | |
| # Example usage | |
| # $ ./gangnam.py | gnuplot | |
| # 9 | |
| # 0 0 | |
| # 1 1 | |
| # 2 2 | |
| # 0 2 | |
| # 1 1 |
| #include<iostream> | |
| using namespace std; | |
| #define odd(x) (x&1) | |
| #define even(x) (!(x&1)) | |
| int main(){ | |
| int x; | |
| cin >> x; |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |