Friday, December 28, 2012
aptosid nvidia driver problem with kernel 3.7.0+
debian experimental repo
Wednesday, December 12, 2012
Sunday, November 25, 2012
Sunday, November 4, 2012
Saturday, November 3, 2012
display file with line number
Thursday, October 11, 2012
macvim font setting
:set guifont=*
This brought up my native font selector
and I got back the value of "guifont=Menlo Regular:h14″.
To set this style in my .gvimrc file:
set guifont=Menlo\ Regular:h14"
Saturday, September 22, 2012
r profile.site change options permanently
Saturday, September 15, 2012
a couple tips for mac
http://osxdaily.com/2012/02/21/add-color-to-the-terminal-in-mac-os-x/
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
install wget
./configure --with-ssl=openssl
Friday, August 24, 2012
configure windows 7 to support dnsmasq
Configure Windows 7 to resolve hostnames (source)
- Go into Network Connections (I just typed "Network Connections" om the start icon -> run box)
- Right click on your Network Adapter and go into Properties
- Select "Internet Protocol Version 4 (TCP/IPv4)"
- Under the General Tab click Advanced
- Under the DNS Tab select the radio button that says "Append these DNS suffixes (in order)"
- Click "Add…"
- Enter a single period in the text box and click "Add."
- Click OK in the "Advanced TCP/IP Settings" Dialog
- Click OK in the "Local Area Connection Properties" Dialog
And there you go.
copied from http://blog.edwards-research.com/2009/09/lan-dns-resolution-with-wrt54g-dd-wrts-dsnmasq-linux-and-windows-7/
Wednesday, August 8, 2012
Tuesday, August 7, 2012
Friday, August 3, 2012
convolution theorem
Tuesday, July 31, 2012
Saturday, July 21, 2012
Friday, July 20, 2012
Thursday, July 19, 2012
Sunday, July 15, 2012
Friday, July 13, 2012
Sunday, July 8, 2012
windows 7 chinese characters
Saturday, July 7, 2012
Tuesday, July 3, 2012
support chinese fonts on debian
Monday, July 2, 2012
Saturday, June 30, 2012
xfce application shortcuts
Thursday, June 14, 2012
Monday, June 11, 2012
Wednesday, June 6, 2012
LMDE 12 disable beep
Monday, May 21, 2012
Sunday, May 20, 2012
list 2 env in R
list2env {base} | R Documentation |
From A List, Build or Add To an Environment
Description
From a named list x
, create an environment
containing all list components as objects, or "multi-assign" from x
into a pre-existing environment.
c++filt - Demangle C++ and Java symbols.
Saturday, May 19, 2012
a couple of git branch cmds
Sunday, May 13, 2012
using the default constructor
Sunday, April 22, 2012
add date/time stamp to jpg
Thursday, March 8, 2012
vim tips
Wednesday, March 7, 2012
Tuesday, March 6, 2012
unix env for ld and execution
Thursday, February 23, 2012
create variables in a created environment inside global environment inside a function
# environment and create variables inside
# that environment
# ref: http://goo.gl/GCQhZ
foofun <- function() {
assign("env1", new.env(parent = globalenv()), envir = globalenv())
# this would not work
# env1 <- new.env(parent = globalenv());
assign("tmpv", "tmpv", envir = globalenv()$env1)
}
foofun()
ls()
ls(envir = globalenv()$env1)
rm("env1", envir = globalenv())
ls()
#
Friday, February 17, 2012
lme4 nested example
chapter 2, we have example of nested factors
cask is nested in batch
so
strength ~ 1 + (1 | cask) + (1 | batch)
is problematic,
the correct one is
strength ~ 1 + (1 | cask) + (1 | batch:cask)
though
it is equivalent to
strength ~ 1 + (1 | batch / cask).
Saturday, February 11, 2012
symbolic description of factorial models for analysis of variance
Symbolic Description of Factorial Models for Analysis of Variance
Friday, February 10, 2012
sftp by shell script
Thursday, February 9, 2012
R code to fit varying intercepts with nested structure linear model
## sim some data and fit an varying intercept model
##
a <- 1:3
b <- 1:4
intercepts <- rnorm(12)
intnames <- outer(a, b, FUN = function(x, y) { paste(x, y, sep = ':')} )
names(intercepts) <- as.vector(t(intnames))
N <- 10000;
x <- round(abs(rnorm(N)) * 10, 2)
noise <- rnorm(N);
ai <- sample(a, N, replace = TRUE)
bi <- sample(b, N, replace = TRUE)
beta <- 4;
y <- intercepts[ai * 4 + bi - 4] + x * beta + noise
ai <- as.factor(ai)
bi <- as.factor(bi)
table(ai:bi)
print(intercepts)
# varying intercepts model specification
fita <- lm(y ~ -1 + ai : bi + x)
# in R lm and lmer's model specification, A * B = A + B + A : B
# where A : B is the interaction of A and B. So in the above,
# ai : bi is used to specify varying intercepts and -1 to
# get rid of the global intercept.
short name for host under ssh
Saturday, January 28, 2012
R draw ellipse
2 N <- 100;
3 x <- numeric(N);
4 y <- numeric(N);
5 x[1] <- -100;
6 y[1] <- -100;
7 for (i in 2:N) {
8 x[i] <- rnorm(1, 2 + (y[i - 1] - 3) / 6, sqrt(115 / 3))
9 y[i] <- rnorm(1, 3 + (x[i] - 2) / 4, sqrt(115 / 2))
10 }
11 library(mixtools)
12 plot(y ~ x);
13 mu <- c(2, 3);
14 Sigma <- matrix(c(40, 10, 10, 60), ncol = 2)
15 ellipse(mu, Sigma);
16
Tuesday, January 24, 2012
detailed explanation of interp.lin in bugs/jags
is (x_i, y_i)]. The function give the y-coordinate for any x-coordinate given
by argument e.
Thursday, January 12, 2012
matrix to vector by row of by col in R
Monday, January 9, 2012
grep tab
grep -R " $" *where the tab character is inserted as Ctrl-v and then Tab.
Sunday, January 8, 2012
See Where a Package is Installed on Ubuntu
See Where a Package is Installed on Ubuntu
Once you use the apt-get utility to install a package, sometimes it seems to disappear into nowhere. You know it's installed, you just have no idea where.
If you know the name of the executable, you can use the which command to find the location of the binary, but that doesn't give you information on where the supporting files might be located.
There's an easy way to see the locations of all the files installed as part of the package, using the dpkg utility.
dpkg -L <packagename>