I really couldn't believe it myself. The carpal tunnel has of course crept back in, the tendons in both my arms (though still dominant in the left) always feel tense now. I even pulled an all-nighter last night just because I was so absolutely interested in coding the kit generator.
Once in a while we hold breeding season on PI for Felishorn owners to breed two Felishorns together and get a kit carrying some resemblance of their parents. There's always the thrill of the unexpected, and an excuse to drool over the cutest pieces of art in the world. It's quite a bit of work for everyone though, especially the colorists, but I wanted to make a generator that could roll through all the probabilities for gender, breed, mutations, etc so that Jean wouldn't have to spend so much time on that logistic, and more on making sure everyone's up to task. In the past, we've pulled out random.org and generated random numbers, but I thought it might be cool to be able to generate information for a breeding immediately, especially when dealing with litters.
The entire project taught me more about PHP codes, but for the most part I wrote a couple hundred if statements. The entire code for the results page isn't that long, but certainly dense with logic statements. Check out some of the coolest parts of the code after the cut.
Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts
Saturday, January 8, 2011
Thursday, January 6, 2011
Directory Complete
I did it! Yesterday in-between Bio42 lecture and Physics 23 discussion section I went to the Falconer library and finished that pagination code. Actually, early that morning I had written the majority of it, having thought of the idea just as I was falling asleep.
Sunday, December 26, 2010
PHP: Results in Multiple Pages
http://www.vbulletin.com/forum/showthread.php/37641-A-couple-of-php%5CmySQL-questions?s=
http://www.evolt.org/node/19340
I've been working on the Felishorn directory (search engine), teaching myself enough PHP to make a MySQL database and create a functional search. But with 2000+ entries in our database, I have to figure out how to paginate large queries. It's difficult, and the links above lead to two tutorials I've tried to implement without much success. Before I was stuck figuring out how to make empty fields search as 'all' as oppose to 'missing', and there were tutorials for it that I couldn't get working, so I made my own solution. Doubtlessly un-elegant, but it works, and now I'm starting to think I'll have to do the same for this pagination problem. Yikes.
It's fascinating. I think I'm more inclined for programming after taking Stats141, since I can make sense of the programming logic.
My right pinky hurts from having to reach for the shift key so much.
ETA: Argh! I don't get this! I even started looking at Silvanon's code for the pages because nothing I tried was working. I think she and I have the same idea: redirects the page to itself, but so that the result shown differ each time you load the page. But the theoretical doesn't work! And now all I want to do is play with the electric mixer Sister gave back. Cooking is so much easier, faster, and comes out much better, with the mixer! But there's just already, too much food in the house, and I have no one else to feed beside the family, that I can't make anymore. So I'm watching Annie, instead.
http://www.evolt.org/node/19340
I've been working on the Felishorn directory (search engine), teaching myself enough PHP to make a MySQL database and create a functional search. But with 2000+ entries in our database, I have to figure out how to paginate large queries. It's difficult, and the links above lead to two tutorials I've tried to implement without much success. Before I was stuck figuring out how to make empty fields search as 'all' as oppose to 'missing', and there were tutorials for it that I couldn't get working, so I made my own solution. Doubtlessly un-elegant, but it works, and now I'm starting to think I'll have to do the same for this pagination problem. Yikes.
It's fascinating. I think I'm more inclined for programming after taking Stats141, since I can make sense of the programming logic.
My right pinky hurts from having to reach for the shift key so much.
ETA: Argh! I don't get this! I even started looking at Silvanon's code for the pages because nothing I tried was working. I think she and I have the same idea: redirects the page to itself, but so that the result shown differ each time you load the page. But the theoretical doesn't work! And now all I want to do is play with the electric mixer Sister gave back. Cooking is so much easier, faster, and comes out much better, with the mixer! But there's just already, too much food in the house, and I have no one else to feed beside the family, that I can't make anymore. So I'm watching Annie, instead.
Wednesday, December 8, 2010
Thursday, November 18, 2010
Cancerous Genes
I'm working on a BioStats141 homework investigating the correlation between gene expression and cancer. There are a set of 22283 genes we have data for from 107 individuals. So each of the 107 individuals expresses each of the 22283 to varying degrees. If an individual has a higher expression of Gene# than others, and they smoke, are they more likely to get cancer?
I've been trying to piece together this question since 9am, and now I'm starting to be overwhelmed by all the data and different correlations I'm finding. I'm not quite sure which data is the important ones that I need to correlate, so I'm going to take a break, have lunch, print out the question on paper and see if I can't annotate and get some new insight.
I am a master of looping now, haha! Show you the code later.
I've been trying to piece together this question since 9am, and now I'm starting to be overwhelmed by all the data and different correlations I'm finding. I'm not quite sure which data is the important ones that I need to correlate, so I'm going to take a break, have lunch, print out the question on paper and see if I can't annotate and get some new insight.
I am a master of looping now, haha! Show you the code later.