Rockstar with PhD
My favorite band is always Queen. Three years ago, I was thrilled to known that The band's guitarist, Brian May, just got his PhD in astrophysics two weeks after my graduation procedure is filed. At that time, I can't contemplate how it was to be a rock star and to holds scientific PhD at the same time.
Today, after reading 7 of the Smartest Rock Stars Ever, I am more amazed to learn that Greg Graffin, the lead vocalist of "Bad Religion" holds PhD in Zoology and have been a lecturer for years. He teaches at Cornell this semester. I have not had a chance to listen to "Bad Religion". Maybe I could grab their latest album somewhere soon.
- Log in to post comments
Install cafe-grader on Lucid Lynx
apt-get install ruby ruby-dev gem install passenger
- Log in to post comments
FARR
I have been using Launchy for a long time. It is a very good keystroke launcher, a best tool for keyboard fanatic. However, it takes too much ram on my Win7 machine and keeps crashing constantly. After googling a while, I found [FARR]("The Ultimate Program for Keyboard Maniacs") (Find and Run Robot), a highly configurable, full-featured keystroke launcher which brands itself as "The Ultimate Program for Keyboard Maniacs". This one is less eye-candy than Launchy but definitely a tool for a fanatic. It sports regular expression matching with customizable scoring. Best of all, it takes only a minimal amount of ram.
Try it.
- Log in to post comments
Displaying TIS620 mysql on UTF8 page
The ghost from the past is my MySQL database encoded in tis620. Worse, the table and the column itself is labelled as iso-8859-1. Of course, if the web page is to be "viewed" as tis620, all I must to is to simply use
SET NAMES tis620;
SET CHARACTER SET tis620;
In my php code. However, this is not the case because the page itself is utf8.
What comes to help me is iconv. In short, this is what I did.
db_query(\"SET CHARACTER SET latin1\");
$query = \"SELECT * FROM table1
$result = db_query($query);
$number_of_rows = $result->rowCount();
foreach ($result as $record) {
printf iconv(\"ISO-8859-11\", \"UTF-8\", $record->comment)
echo '</tr>'.\"\\n\";
}
db_query(\"SET CHARACTER SET utf8\");
- Log in to post comments
ATI Driver for openSUSE
Data Structure, HW03
You must create a class ArrayCollectionByList from this stub.
You are not allow to declare any additional member, i.e., you cannot declare [code]public int size[/code] nor [code lang="java"]public Object [] elementData[/code], you have to do everything via col only
[code lang="java"] public class ArrayCollectionByList implements Collection { private ArrayCollection col;
public ArrayCollectionByList (int c) { //fill your code here } public int size() { //fill your code here } public boolean isEmpty() { //fill your code here } public boolean contains(Object e) { //fill your code here } public void remove(Object e) { //fill your code here } public void add(Object e) { //fill your code here } public Object[] toArray() { //fill your code here } } [/code]
- Log in to post comments
2110211, Solution to Quiz00 (12 Nov 2010)
#0 size = 0 , elementData =
#1 size = 4 , elementData = BANGKOK,PHUKET,BANGKOK,SONGKLA
#2 size = 3 , elementData = BANGKOK,SONGKLA,BANGKOK
#3 size = 6 , elementData = BANGKOK,SONGKLA,BANGKOK,CHIANG MAI,CHIANG RAI,CHIANG MAI
#4 size = 5 , elementData = BANGKOK,SONGKLA,BANGKOK,CHIANG MAI,CHIANG RAI
#5 size = 9 , elementData = BANGKOK,SONGKLA,BANGKOK,CHIANG MAI,CHIANG RAI,LOEI,TAK,PATTAYA,TAK
- Log in to post comments
Data Structure, Quiz 00
For each comment line in the form // #0, answer the value of size and elementData. For example, your answer should be
#0 size = 0, elementData =
#1 size = 4, elementData = BANGKOK,PHUKET,BANGKOK,SONGLKA
Please send answer as Email to [email protected] subject: [data] Quiz00 ID include a file named Quiz00_ID.txt
[code lang="java"]
public class Main {
public static void main(String[] args) {
Collection c = new ArrayCollection(10);
System.out.println(c.isEmpty());
// #0 (size ==? element data ==
c.add("BANGKOK");
c.add("PHUKET");
c.add("BANGKOK");
c.add("SONGKLA");
// #1
System.out.println(c.size());
c.remove(\"PHUKET\");
// #2
c.add(\"CHIANG MAI\");
c.add(\"CHIANG RAI\");
c.add(\"CHIANG MAI\");
// #3
c.remove(\"CHIANG MAI\");
// #4
c.add(\"LOEI\");
c.add(\"TAK\");
c.add(\"PATTAYA\");
c.add(\"TAK\");
// #5
System.out.println(c.contains(\"PHUKET\"));
System.out.println(c.contains(\"BANGKOK\"));
}
} [/code]
The solution is here
- Log in to post comments
Basic version of ArrayCollection
This is a basic version of ArrayCollection
[code lang="java"] /*
- โครงสร้างข้อมูล : ฉบับวาจาวา
- http://www.cp.eng.chula.ac.th/~somchai/books */ package dataStructures;
/**
- คลาสที่สร้างคอลเล็กชันด้วยอาเรย์
- @author สมชาย ประสิทธิ์จูตระกูล */ public class ArrayCollection implements Collection { private Object[] elementData; private int size;
public ArrayCollection(int c) { elementData = new Object[c]; size = 0; }
public int size() { return size; }
public boolean isEmpty() { return size == 0; }
private int indexOf(Object e) { for (int i=0; i<size; i++) if (elementData[i].equals(e)) return i; return -1; }
public boolean contains(Object e) { return indexOf(e) != -1; }
public void remove(Object e) { int i = indexOf(e); if (i != -1) { size--; elementData[i] = elementData[size]; elementData[size] = null; } }
public void add(Object e) { elementData[size] = e; size++; }
} [/code]
- Log in to post comments
Intro to Robotics
#News
- Link to Azolla simulator http://sites.google.com/site/auraliusproject/lua-based-2d-robot-simulator
- Motion planning demo http://www.nattee.net/files-dae/motione1.zip.
- Forward Kinematics Homework here. Put your code in method drawArm(), you can use drawTube() to draw arm length.
- On Jan 26, there won't be midterm exam. (But we have a class as usual)
- Final at 19th floor. 1630 - 1930. Open book. see ya.
#Slides & Readings
- Log in to post comments