Thought I'd get into a bit of life tracking / hacking and figure out what kind of patterns my body gets into and how they interelate.
First up is to track my sleeping patterns. I'm going to try to track when I fall asleep initially and when I wake up. I may follow this up with when I actually get into bed and when I crawl out of bed/hit the sleep alarm. who knows this might turn into something neat.
I think I might post weekly stats on this blog as I go... who knows.
Monday, July 25, 2011
Wednesday, June 8, 2011
Released Version 1.1 of Expenses Simply
So this is just a minor bug fix. I've released version 1.1 of my Android App Expenses Simply. Please give it a whirl and let me know if you are having any issues with it.
Tuesday, May 3, 2011
Replaced the screen on my Dell Streak
So I cracked the screen on my Dell Streak a couples of months back. It was still functional but the hair line cracks all over it were starting to get really annoying. I contacted Dell to ask what I would have to do to get them to replace it. They said I'd need to buy a whole new phone for about $250 ergg. I searched the web for directions on how to do this myself and came across this excellent article on XDA to replace it. I order a screen from GadgetFix on ebay and worked my way through the guide. All done, works perfectly took about 30 minutes to do it. I have a big thank you to all those on the internet that made it possible for me to do this on $75.
Wednesday, April 20, 2011
Enabling Foreign Keys in sqlite
Once again I must learn to read documentation carefully.
I was perusing the sqlite documentation on implementing foreign keys and created my tables in the way they said to and it wasn't working when I tried to create a row that violated my key constraint. After a lot of teeth gnashing I finally found a small paragraph in the documentation.
QUOTED:
Enabling Foreign Key Support
In order to use foreign key constraints in SQLite, the library must be compiled with neither SQLITE_OMIT_FOREIGN_KEY or SQLITE_OMIT_TRIGGER defined. If SQLITE_OMIT_TRIGGER is defined but SQLITE_OMIT_FOREIGN_KEY is not, then SQLite behaves as it did prior to version 3.6.19 - foreign key definitions are parsed and may be queried using PRAGMA foreign_key_list, but foreign key constraints are not enforced. The PRAGMA foreign_keys command is a no-op in this configuration. If OMIT_FOREIGN_KEY is defined, then foreign key definitions cannot even be parsed (attempting to specify a foreign key definition is a syntax error).
Assuming the library is compiled with foreign key constraints enabled, it must still be enabled by the application at runtime, using the PRAGMA foreign_keys command. For example:
sqlite> PRAGMA foreign_keys = ON; |
Foreign key constraints are disabled by default (for backwards compatibility), so must be enabled separately for each database connection separately. (Note, however, that future releases of SQLite might change so that foreign key constraints enabled by default. Careful developers will not make any assumptions about whether or not foreign keys are enabled by default but will instead enable or disable them as necessary.) The application can can also use a PRAGMA foreign_keys statement to determine if foreign keys are currently enabled. The following command-line session demonstrates this:
sqlite> PRAGMA foreign_keys; 0 sqlite> PRAGMA foreign_keys = ON; sqlite> PRAGMA foreign_keys; 1 sqlite> PRAGMA foreign_keys = OFF; sqlite> PRAGMA foreign_keys; 0 |
Tip: If the command "PRAGMA foreign_keys" returns no data instead of a single row containing "0" or "1", then the version of SQLite you are using does not support foreign keys (either because it is older than 3.6.19 or because it was compiled with SQLITE_OMIT_FOREIGN_KEY or SQLITE_OMIT_TRIGGER defined).
It is not possible to enable or disable foreign key constraints in the middle of a multi-statement transaction (when SQLite is not in autocommit mode). Attempting to do so does not return an error; it simply has no effect.
It seems I have to turn it on or off..
DOH.. Hopefully this blog entry will help someone.
Monday, April 18, 2011
Android Database Tutorial I found on the net
This is an extremely useful Android database tutorial I found on the net at Another Android Blog. I had been trying to wrap my head around an easy way to use sqlite in Android and this really put me over the top. Show the guy some love and send him a donation if it helps you.
Tuesday, April 12, 2011
Android in action, second edition
So I have this Safari Online account through work. As I get more and more into my Android development hobby I find my self referring to this book "Android in Action" a lot. I just thought I'd share it with the rest of whoever reads this blog.
10 useful solutions for Android developers courtesy of Shaman.sir
Here's a very useful article for Android developers courtesy of Shaman.sir
Subscribe to:
Comments (Atom)