Here’s a useful tip for beginning programmers. We’ve all used Switch statements lots of times. As a student, you learn that you need to include a break statement after the body of each case to avoid the spill-over effect. I’ve always chalked this up to language design, and never saw value in the “spill-over”… until...
Read More
Tears slide – my stretch-marked face; tears stretched – a sinner’s sulk. Two hours for two minutes; three for three and so it goes. One thousand plus, on its way back for taps, tickles, and thanks. [embedded content]
Read More
I wanted to add a specific anchor in a link_to()’s URL in rails. This should have been a simple task, but it was quite a headache since the hash kept getting escaped into the “%23” code. I tried unescaping the html string using HAML’s filters, to no avail. I also tried various forms of interpolation...
Read More
Dedicated to Antonio “Tat” Gonzalez (1929-2009): beloved grandfather, father of seven, and fisherman. The sea, contains endless depth – like you: stubborn, refusing rest. But today, the sun-seared waves that forever called, are still and silent; for the sea, like us – dear grandfather – hath lost its captain… Author’s Note: I believe it is...
Read More
The lukewarm cup of coffee looks back at me, as did the previous five; my only companions through the hours. My insomniac kitten even snores; signaling that I should sleep. When will it end? I wonder; programmatically programming this program. These professors must hate me, maniacally assigning projects the same week. Is it too late...
Read More
If you need to connect your Android phone/physical-device to a local (PC) WAMP server, then you’ll need to fulfill the following points. Proper URL In your android app, make sure that the URL you’re using to connect to the server is not "http://localhost/your-desired-resource..." but corresponds to the actual local (router-assigned) IP of your server/PC. You...
Read More
I’ve blown a few hours trying to get this important idea to work. I figured my findings and working sql code should serve as a helpful reference. Here’s the code before we dissect it: SET global event_scheduler = 1; DROP EVENT IF EXISTS Archive_Old_Posts; USE teamof4; CREATE EVENT Archive_Old_Posts ON SCHEDULE EVERY 1 MINUTE DO...
Read More
I tried compiling a C++ program only to get a cryptic error similar to “symbols not found for architecture x86_64.” Thanks, g++, for not making any sense. The problem was that I had a prototype declared in a global scope like: //#include stuff here// This is a function "prototype"// Make the existence of badFunctionName() known...
Read More