#elif (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
abort(); // trap; generates core dump
#else
exit(1); // goodbye cruel world
#endif
file: qglobal.cpp
programming, databases and other IT something
#elif (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
abort(); // trap; generates core dump
#else
exit(1); // goodbye cruel world
#endif
file: qglobal.cpp
Posted in programming.
– July 29, 2010
PostgreSQL is a great database, in my opinion much better than Oracle, or the so widely used MySQL. The version 9.0 is going to be out soon. There is the quite huge list of ideas for the future improvements (hopefully in the next 9.1 version).
Depesz wrote his own list of things that he wants to see in the future versions, so I thought I would write my own.
Posted in database.
– July 21, 2010
/*** 2008 May 26**** The author disclaims copyright to this source code. In place of** a legal notice, here is a blessing:**** May you do good and not evil.** May you find forgiveness for yourself and forgive others.** May you share freely, never taking more than you give.************************************************************************************ This header file is used by programs that want to link against the** RTREE library. All it does is declare the sqlite3RtreeInit() interface.*/#include “sqlite3.h”
Posted in programming.
– June 30, 2010
While looking for some information on the web, I found quite nice piece of SQL, something like:
SET sql_mode=’STRICT_ALL_TABLES’; — Session scope for the purpose of this article
This sql_mode looked quite interesting, I’ve checked that in the MySQL documentation and well… it is a little bit terrifying.
– June 24, 2010
That was to be called naming convention. That obviously is better to have any than none. As I was writing, I noticed that the title doesn’t reflect what I wrote. All turned out to be not about convention but about comparing PHP to Python, but personally none of the languages is my favorite.
After reading the whole post, I realized that Python is not better than PHP, it is messed the same way, so why bother changing from PHP to Python?
Posted in programming.
– June 4, 2010
In Python blocks have to be indented just because the indentation level defines the logic. In C/C++/Java there are { and } while in Ruby there is begin and end. Of course indenting is helpful. Just like syntax coloring in editor.
In Ruby can do whatever you want with the indentation. That’s not a problem. Every good editor can fix the code layout due to some rules. Normally I use VIM for all those scripting languages, for programming in Ruby and Python too. In VIM after opening any file I can do the magic command:
Posted in programming.
– May 23, 2010
Well… once again Twitter turns out to be amazing piece of software (is this because it was implemented in Ruby?). Twitter has (had?) a bug where you could force someone to follow you just by
The flaw appears when a user tweets this format: “accept [Twitter Username]”. So, for example “accept TechCrunch”. Magically that user appears as one of your followers.
On the blog there is info that:
Follower/following numbers are currently at 0
On my account there are still correct numbers – I wouldn’t use that dirty hack (lovely feature?) just to have more followers. Why someone want’s to have more followers not interested in following? Is there any
Twitter really amazes me – I really couldn’t reproduce that error (feature?) in the soft that I write. Of course I could do that on purpose – but not by accident, no way.
This is really amazed what you’ve done, thank you for inspiring me how to create such hidden features. Good work.
Posted in wtf.
– May 10, 2010
There are some numbers and units. Numbers are numbers. Units are units. Numbers informs how many. Units inform about two things:
Posted in programming, software, web.
– May 6, 2010
Virtualenv is a great piece of software. It allows to create some virtual environments that have many different versions of Python across the whole system and having different sets of libraries.
This document is the first public draft. Some thing should be reviewed later and some will be added.
While creating this tutorial I used following tools and versions:
As usually: that depends. Normally you can create and use Python programs without that but using virtualenv can help a lot.
Such virtual environment provides many possibilities such as:
Posted in programming.
– April 30, 2010
I’ve already upgraded by laptop to Ubuntu 10.04. Strange, no problems at all. My friend wasn’t so lucky, his laptop doesn’t boot after the upgrade, now he uses Vista. This kind of problems I had last time. There were problems with drivers for my graphic card so I had to take new kernel and drivers from some unstable Ubuntu branch.
Now it just works, nice.
Posted in software.
– April 26, 2010