Sunday, 17 January 2010

Adding navigation links to drupal

The menu item I was looking for is Home � Administer � Site building � Menus >Primary links

Friday, 8 January 2010

Opera Mobile 9.5 Tab Limit

Opera on my mobile limits me to two tabs.

The trick to fix this is go to opera:config and search for 'tab'. Then change the value, save and restart.

Saturday, 12 December 2009

Dodgy ram

After effects of running a computer with some seriously broken RAM sticks:

Thursday, 19 November 2009

R and Datetimes and stuff

You may have figured out at this point that these posts' primary purpose is so I don't have to figure out this stuff again if I stop using R for 6 months.

Anyway, if you've got some strings and you want dates, use
as.Date(x)


But if you want datetimes (i.e. don't want to lose the time component), use
as.POSIXct(x)


Also, subset is nice:
subset(dat1, (t > '2009-01-01') & (t < '2009-01-05'))


Create a frame:
#make up some data
x = seq(-2*pi, 2*pi, by = 0.05)
#create the frame
datx = data.frame(x=x)
#add another column
datx$sinx = sin(datx$x)
#show the columns
names(datx)
#gives: [1] "x" "sinx"

See also http://www.statmethods.net/input/datatypes.html for a nice brief intro to R's different structures.

ggplot2 is awesome

I like R, but R+ggplot2 is awesome.



library("ggplot2")
x = seq(-2*pi, 2*pi, by = 0.05)
x1 = x + rnorm(length(x))/10
qplot(x, sin(x1), color=rgb(abs(sin(x)),0,1), geom = c("point", "smooth"))


Requires that you
install.packages()
ggplot2, of course.

I'm currently working through Getting started with qplot (pdf).

Wednesday, 18 November 2009

The R Project for Statistical Computing

I've been playing with The R Project for Statistical Computing. I quite like it.

Here's a few of the first things I did, just playing around:



x = seq(-pi, pi, by = 0.01)
plot(sin(x), col = rgb(abs(sin(x*3)), 0, 0), cex=.2+3*abs(sin(x)), pch=16)
points(cos(x), pch=16, cex=.5, col = rainbow(length(x)))




n = 10000
breaks = 100
plot_count = 5
cols = rainbow(plot_count)

plot(x = c(), xlim=c(-0,1), ylim=c(0,3), main = "distribution of random sums", xlab = "Sum of N random numbers between 0 and 1/N", ylab = "density")

runifrep = function(n, reps) {
tot = 0;
for (i in 1:reps) {
tot = tot + runif(n)
}
tot/reps;
}
for (i in 1:plot_count) {
a = hist(runifrep(n, i), breaks=breaks, plot=0)
lines(y = a$density, x = a$mids, col = cols[i], pch=3, cex = .1, xlim=c(-4,4), lwd = 3)
}


Note that cex is symbol size, pch is symbol and lwd is line width. http://www.harding.edu/fmccown/R/#misc has a nice list of symbols.

Monday, 19 October 2009

.com.au registration prices

I just spent half an hour looking at every auDA Accredited Registrar's website, looking at how much it costs to register a .com.au domain.

Sometimes they actually listed prices, but often the easiest way was to just search for a random domain and wait for them to tell me what it would cost. It's just a quick survey, and it's quite possible that I got some of them wrong. All the prices should be for 2 years, but I didn't read the fine print too carefully. I expect some of the URLs won't work without the POST data, but they're really only there as hints for the auDA list.


http://www.aussiehq.com.au/business/domains/
$59

https://manage.planetdomain.com/order/execute/multiDomainSearch?domainName=asdgasdfasdf&tlds=.com&tlds=.net&tlds=.org&tlds=.mobi&tlds=.asia&tlds=.biz&tlds=.info&tlds=.com.au&tlds=.net.au&tlds=.co.uk&tlds=.org.uk&tlds=.us.com&tlds=.us&tlds=.ca
$33

http://www.clickngo.com.au/domains-pricing.html
$59

http://www.webaccess.com.au/domain_names/home.html
$49.50

http://www.ddns.com.au/prices.php
$65

http://intaserve.com/
$27.95

http://www.domaincandy.com.au/pricing.asp
$99

http://www.domainregistration.com.au/
$127

http://theconsole.netregistry.com.au/order/execute/domainSearch
$26.97

http://www.mdwebhosting.com.au/myaccount/domainchecker.php
$18

https://secure.westnethosting.com.au/signup/stage2.aspx
$88

http://www.austdomains.com.au/pricing.html
$69

http://www.domaincentral.com.au/
$37.95

http://www.namescout.com/dot_au.asp
$27.45

http://www.melbourneit.com.au/cc/order/vieworder?&action=addtobasket&d-asdasdfasdf.net.au=asdasdfasdf.net.au&recheck=true&d-asdasdfasdf.com.au=asdasdfasdf.com.au&added_catalog=1895165,1895166,1895167,1895168
$140

http://www.domainbandit.com.au/site/domain_search.cfm
$66

http://www.tppinternet.com.au/domains/search-results.php
$99

http://www.safenames.net/DomainNames/DomainRegistration.aspx
?

https://ssl.smartyhost.com.au/signup
$40

http://www.cheaperdomains.com.au/hspc/index.php
$35

http://www.bottledomains.com.au/
$99

https://www.enetica.com.au/register.cgi?action=lookup&ludomain=asdfasdf&x=79&y=11&domaintype=.com.au&domaintype=.com&domaintype=.net.au
$69

http://www.domain8.com.au/
auction

https://www.instra.com/en/domain-application/login/step-01
login before price

https://www.anchor.com.au/domain-name-registration/domain_order.py
$69

http://www.explorer.net.au/show.php?f=pricing
$99

http://www.godomains.com.au/welcome/
$98

http://www.connectwest.net.au/termsconditions/tc.cgi?domainName=asdgasdgasdfg&tld=com.au
TOC before price