This file contains hidden or 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
$ lsof -p $(pgrep leaky) | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
leaky 16095 laban cwd DIR 0,30 4096 10936796 /home/laban/devel/private/learning/c/leak_descriptors | |
leaky 16095 laban rtd DIR 252,1 4096 2 / | |
leaky 16095 laban txt REG 0,30 11267 10919599 /home/laban/devel/private/learning/c/leak_descriptors/leaky | |
leaky 16095 laban mem REG 252,1 1811128 19136595 /lib/x86_64-linux-gnu/libc-2.15.so | |
leaky 16095 laban mem REG 252,1 149280 19136932 /lib/x86_64-linux-gnu/ld-2.15.so | |
leaky 16095 laban 0u CHR 136,19 0t0 22 /dev/pts/19 | |
leaky 16095 laban 1u CHR 136,19 0t0 22 /dev/pts/19 | |
leaky 16095 laban 2u CHR 136,19 0t0 22 /dev/pts/19 |
This file contains hidden or 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
$ sudo gdb -p $(pgrep leaky) | |
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04 | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://bugs.launchpad.net/gdb-linaro/>. |
This file contains hidden or 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
$ lsof -p $(pgrep leaky) | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
leaky 16095 laban cwd DIR 0,30 4096 10936796 /home/laban/devel/private/learning/c/leak_descriptors | |
leaky 16095 laban rtd DIR 252,1 4096 2 / | |
leaky 16095 laban txt REG 0,30 11267 10919599 /home/laban/devel/private/learning/c/leak_descriptors/leaky | |
leaky 16095 laban mem REG 252,1 1811128 19136595 /lib/x86_64-linux-gnu/libc-2.15.so | |
leaky 16095 laban mem REG 252,1 149280 19136932 /lib/x86_64-linux-gnu/ld-2.15.so | |
leaky 16095 laban 0u CHR 136,19 0t0 22 /dev/pts/19 | |
leaky 16095 laban 1u CHR 136,19 0t0 22 /dev/pts/19 | |
leaky 16095 laban 2u CHR 136,19 0t0 22 /dev/pts/19 |
This file contains hidden or 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
Leaks all over the place | |
$ lsof -p $(pgrep leaky) | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
leaky 16095 laban cwd DIR 0,30 4096 10936796 /home/laban/devel/private/learning/c/leak_descriptors | |
leaky 16095 laban rtd DIR 252,1 4096 2 / | |
leaky 16095 laban txt REG 0,30 11267 10919599 /home/laban/devel/private/learning/c/leak_descriptors/leaky | |
leaky 16095 laban mem REG 252,1 1811128 19136595 /lib/x86_64-linux-gnu/libc-2.15.so | |
leaky 16095 laban mem REG 252,1 149280 19136932 /lib/x86_64-linux-gnu/ld-2.15.so | |
leaky 16095 laban 0u CHR 136,19 0t0 22 /dev/pts/19 | |
leaky 16095 laban 1u CHR 136,19 0t0 22 /dev/pts/19 |
This file contains hidden or 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
$ ./leaky | |
Iteration 1 | |
Iteration 2 | |
Iteration 5 | |
Iteration 6 | |
Iteration 2147483647 | |
Iteration -2147483648 | |
Iteration -2147483647 |
This file contains hidden or 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
# load datasets | |
library(fields) | |
library(ncdf) | |
# Load land data | |
landFrac <-open.ncdf("land.netcdf") | |
land <- get.var.ncdf(landFrac,"LAND_surface") |
This file contains hidden or 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
events <- read.csv("events.csv") | |
> head(events) | |
timestamp event | |
1 2013-04-03 22:59:05.061Z A | |
2 2013-04-03 22:59:05.061Z B | |
3 2013-04-03 22:59:07.109Z C | |
4 2013-04-03 22:59:07.115Z D | |
5 2013-04-03 22:59:07.209Z E |
This file contains hidden or 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
require("ggplot2") | |
# data load | |
n_squared = read.csv("nth.csv", header=T) | |
n_modulo = read.csv("nth_modulo.csv", header=T) | |
n_modulo$nth_log <- log(n_modulo$nth) | |
n_modulo$time_log <- log(n_modulo$time) | |
n_squared$time_log <- log(n_squared$time) | |
n_squared$nth_log <- log(n_squared$nth_prime) |
This file contains hidden or 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
/* | |
# php -v | |
PHP 5.3.15 with Suhosin-Patch (cli) (built: Jul 31 2012 14:49:18) | |
Copyright (c) 1997-2012 The PHP Group | |
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies | |
Takes 0.6 seconds per hash at 100000 rounds | |
# time php test.php | |
Original password: password | |
Salt (hex) : 8454780bed43 |
This file contains hidden or 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
** installing vignettes | |
** testing if installed package can be loaded | |
Error : .onLoad failed in loadNamespace() for 'RMySQL', details: | |
call: dyn.load(file, DLLpath = DLLpath, ...) | |
error: unable to load shared object '/usr/local/Cellar/r/3.0.1/R.framework/Versions/3.0/Resources/library/RMySQL/libs/RMySQL.so': | |
dlopen(/usr/local/Cellar/r/3.0.1/R.framework/Versions/3.0/Resources/library/RMySQL/libs/RMySQL.so, 6): Library not loaded: libmysqlclient.18.dylib | |
Referenced from: /usr/local/Cellar/r/3.0.1/R.framework/Versions/3.0/Resources/library/RMySQL/libs/RMySQL.so | |
Reason: image not found | |
Error: loading failed | |
Execution halted |