Archives
- January 2020
- October 2018
- September 2018
- August 2018
- June 2018
- April 2018
- February 2018
- January 2018
- July 2017
- June 2017
- March 2017
- October 2016
- July 2016
- September 2015
- August 2015
- February 2015
- October 2014
- September 2014
- August 2014
- June 2014
- May 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
Meta
Categories
- add
- admob
- algorithm
- android
- app
- App Idea
- beagleboard xm
- BigQuery
- broken
- C++
- cakephp
- case-sensitive
- clone
- codeigniter
- coding
- composer
- coursera
- cross compile
- crosstool
- dbus
- default value
- dependency injection
- diff
- eclipse
- emulator
- error
- file
- forbidden
- fragment
- gdb
- git
- gitolite
- google maps
- inorder
- install
- interview
- java
- jQuery
- link
- linux
- marakana
- mongodb
- NFS
- not working
- php
- preferences
- preorder
- process
- pulseaudio
- push
- qnx
- qt
- rails
- refactored
- reference
- relink
- remote
- ruby
- ruby on rails
- ruby on rails tutorial
- server
- service
- singleton
- svn
- TDD
- topcoder
- tortoisesvn
- troubleshooting
- ubuntu
- UI properties
- undefined
- user
- v3
- virtualbox
- zend
Top Clicks
- None
Tag Archives: coding
Java: JDBC Basics
Running through this tutorail: http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html Used JDBC before at Northrop figuring it out with working knowledge but never really went through a tutorial for it. Nice thing about the tutorial is that it populates a DB with data for you … Continue reading
Java: Reading/Writing File
Wrote a program that read a file for a company evaluation. I hastily put it together without looking too much at resources so it wasn’t the prettiest of things. Probably should’ve taken my time, so I will now and make … Continue reading
Add Two Numbers (C++) refactored
Realized I could make it even cleaner. Changed the while loop condition which makes the code much cleaner gets rid of some unnecessary code. ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { // Start typing your C/C++ solution below // DO NOT write … Continue reading
Add Two Numbers (C++)
This is from the http://www.ihas1337code.com/onlinejudge website. His onlinejudge testing is really neat. I’d like to setup something like that. // Definition for singly-linked list. // DO NOT modify this. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) … Continue reading
Iterative InOrder Tree Traversal 2 (C++)
Found this from another website, http://www.ihas1337code.com. It’s so much cleaner. void iterativeInOrderTraverse2(Node *root) { stack<Node *> nodes; Node *currNode = root; while(!nodes.empty() || currNode) { if (currNode) { nodes.push(currNode); currNode = currNode->left; } else { currNode = nodes.top(); nodes.pop(); printf(“%c … Continue reading
Iterative PreOrder Tree Traversal (C++)
PreOrder Traversal means displaying the root first, then traverse left subtree, and then traverse the right subtree. Because a stack is LIFO (last in first out), we need to be careful how we insert the nodes into the stack. We … Continue reading
Iterative InOrder Tree Traversal (C++)
InOrder Traversal: Left Root Right Stack Space: Proportional to the height of the tree void iterativeInOrderTraverse(Node *root) { stack<Node *> nodes; Node *currNode = root; while(true) { if (currNode) { Node *leftNode = currNode->left; nodes.push(currNode); currNode = leftNode; } else … Continue reading