Wednesday, July 29, 2009

fractals

I got this book called 'chaos in wonderland' and decided to try out mathematica to create some of the fractals in the books. the fractals are 'dynamical systems' described by basically differential equations (x[n+1] can be thought of as a discrete form of dx) [1]

x[n+1] = sin(y[n]*a) + c*sin(y[n]*b)
y[n+1] = sin(x[n]*a) + d*sin(y[n]*b)

my first attempt at code

ListPlot[Table[
xn = N[Sin[y*b] + c*Sin[x*b]];
yn = N[Sin[x*a] + d*Sin[y*a]];
{x = xn, y = yn},
{i, 0, 10000}]]




this worked great. but to create a more functional style of iterated programming, I use the nestlist function which creates a list {x, f(x), f(f(x)), ...}, however instead of the one parameter 'x', I have parameters {x, y}. to deal with this I have to pass nested lists that I flatted at the end

Iter[list_] :=
{
{{x, y}} = list;
xn = N[Sin[y*b] + c*Sin[x*b]];
yn = N[Sin[x*a] + d*Sin[y*a]];
{xn, yn}
}

FSystemsPlot[l_, ax_, bx_, cx_, dx_] :=
{
a = ax; b = bx; c = cx; d = dx;
list = NestList[Iter, {{0.1, 0.1}}, 10000];
ListPlot[Flatten[list,1]]
}]


the book had a list interesting parameters for this system that created these graphs

http://img198.imageshack.us/g/image10jhh.png/

Tuesday, July 28, 2009

someone has set us up the bomb

a new hack is going around that checks what sites you've been too. guess how? the script has a little database of sites and it just checks whether the link is the changed color of when it has been visited

 var link = document.createElement("a");
link.id = "id" + i;
link.href = websites[i];
link.innerHTML = websites[i];

document.body.appendChild(link);
var color = document.defaultView.getComputedStyle(link,null).getPropertyValue("color");
document.body.removeChild(link);

if (color == "rgb(255, 0, 0)") // the site has been visited :)


demo - http://ha.ckers.org/weird/CSS-history-hack.html

Monday, July 27, 2009

foobar last.fm radio

so, I just found this component that plays last.fm radio straight from foobar, and i couldn't control my love. beautiful!!! it constantly updates a playlist of like 4-7 songs from the last.fm radio, and you can play any of those tracks. i never listened to the last.fm radio before this, but playing 'your personal last.fm radio' from foobar is awesome!!!

http://www.unkempt.co.uk/fb2k/foo_lastfm_radio.html

Saturday, July 25, 2009

dammit dell

"Is there anyone who is not happy with the audio quality of the E6500? I have found that even through high quality headphones, the audio quality is very tinny and lacks proper equalization. If anyone has managed to sort the problem out, it would be great if you can share." http://en.community.dell.com/forums/t/19235508.aspx

I'm pretty mad about this because these awful IDT audio drivers are pretty much to blame for this. the fix? uncheck the mysterious "PC Spk Mute" button in the volume control panel. apparently this setting disables the on-board laptop speakers, and unintuitively, makes headphone/external sound a billion times better. I listened to music for months with the bass turned up to try to compensate for the horrible sound.

Friday, July 17, 2009

physics


I've recently taken an interest in physics (well, so much as to absorb my reading of books and wikipedia articles constantly) because there's just so many interesting explanations for such things as gravity and matter the more you keep reading about it

today, I found these lectures that richard feynman did at cornell in 1964 that bill gates and microsoft have published. they aren't like scientific lectures about physics (typical feynmann lectures are way beyond) this series is called 'the character of physical law' and they're just really entertaining (7 lectures)

http://research.microsoft.com/apps/tools/tuva/

1. The Law of Gravitation, an example of Physical Law
2. The Relation of Mathematics to Physics
3. The Great Conservation Principle
4. Symmetry in Physical Law
5. The Distinction of Past and Future
6. Probability and Uncertainty
7. Seeking New Law

Thursday, July 2, 2009

cool devtools

http://www.resedit.net/ - free resource editor for .rc resource compiler scripts - the dialog wysiwyg editor is great. you can hardcore hardcode handcode win32 stuff but don't code the gui layout, that's tedious

http://www.codeguru.com/cpp/c14981 - visual studio add-on that auto-increments versioninfo in .rc and .rc2 resource scripts, works for almost all versions of visual studio

the version auto-increment is fun, and so far we're at version 1, 3, 1, 137



versioninfo resource http://msdn.microsoft.com/en-us/library/ms647003(VS.85).aspx