Archive for the ‘SQL’ Category

Want to show your source code to someone else?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
Monday, December 17th, 2007

Today i stumbled across a nice tool called Pastie. Pastie helps you if you want to show some bits of your source code to someone else. e.g. you need some help, advice (or you just want to show off with your code). You paste an excerpt of your code and pastie saves it for under a unique URL. Then you send this URL to the person you want to show the code. The big advantage here is that the syntax is nicely highlighted … very nice for remote troubleshooting! I have created a code snippet for demonstration.

pastie.jpg
(i’ve used code sections to create more sections.)

Toggle states like active, deleted, etc. (bitwise negation in SQL)

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...
Saturday, December 2nd, 2006

Just a little trick which might be useful. It’s not new but I always enjoy using it and therefore its worth a quick post. In a lot of cases you find records in your database which hold a bit value 1/0 for fields like isActive, deleted, approved, etc. Usually they are toggled from 0 to 1 or the other way round. Here comes a nice and quick solution to solve this toggling… (more…)