Friday, August 10, 2007
Scrolling Unfocused Windows
I've been looking for a way to do this for some time now: scrolling unfocused windows, in Windows. You can do it with a Mac (movie here) and on Linux. I became accustomed to it after prolonged Ubuntu-use on my laptop. (It's incredibly handy on lower resolutions too.)
So I posted a note (with replies) on Pownce...
So I'm using KatMouse now. Program is working perfectly fine, and was exactly what I had in mind.
Also: I'm beginning to like Pownce (much more than Twitter anyway).
So I posted a note (with replies) on Pownce...
So I'm using KatMouse now. Program is working perfectly fine, and was exactly what I had in mind.
Also: I'm beginning to like Pownce (much more than Twitter anyway).
Sunday, July 29, 2007
Simulating LIMIT with offsets in SQL
How can you do this (x is number of rows to fetch, y is offset):
or this:
in a DBMS that doesn't support LIMIT statements (take Oracle for example).
In Oracle, you can use ROWNUM, which holds the current row number:
You can also find a handy article on the IBM site describing how you can simulate row numbers.
SELECT * FROM my_table LIMIT x, y(Mysql)
or this:
SELECT * FROM my_table LIMIT x OFFSET y(PostgreSQL)
in a DBMS that doesn't support LIMIT statements (take Oracle for example).
In Oracle, you can use ROWNUM, which holds the current row number:
SELECT * FROMIn SQL Server (>2005), you can use a similar trick, using the ROW_NUMBER function:
(SELECT ROWNUM limit, * FROM my_table ORDER BY order_field)
WHERE limit BETWEEN x AND y
WITH ordered AS (When using another database (Access for example), you can use TOP when available:
SELECT ROW_NUMBER() OVER (ORDER BY order_field) AS limit, *
FROM my_table)
SELECT *
FROM ordered
WHERE limit BETWEEN x AND y
SELECT * FROMOr, another option:
(SELECT TOP x * FROM
(SELECT TOP x+y * FROM my_table ORDER BY order_field)
AS innerT
ORDER BY order_field DESC) AS outerT
ORDER BY order_field
SELECT TOP x * FROM my_tableSome databases don't allow TOP in subselects, so we have to use yet another method:
WHERE order_field NOT IN
(SELECT TOP y * FROM my_table ORDER BY order_field)
SELECT * FROM my_table outerTShould that fail too, you can always do:
WHERE
(SELECT COUNT(*)
FROM my_table innerT
WHERE innerT.order_field <= outerT.order_field)
BETWEEN y+1 AND x+y
ORDER BY outerT.order_field ASC;
SELECT TOP x * FROM my_table WHERE order_field > zwith z the last fetched order_field value from the previous page.
You can also find a handy article on the IBM site describing how you can simulate row numbers.
Friday, July 27, 2007
Game: Jade Empire - Special Edition
So I picked up Jade Empire for the PC a few days ago. I was astonished because I didn't even know it was released for the PC. (I've been jealous of console owners who could play the game and then I even miss the PC release!)
So after I quick install I was ready to go. I was more than happy to experience a new Bioware-experience. As coincidence would have it, I had been playing a few Neverwinter Nights premium modules the days before just because I wanted a Bioware experience. (And no, KotOR 2 and NWN 2 just aren't the same.)
And the game didn't disappoint. I you haven't played it yet: you should. The whole story was fantastic. The characters were well though out, and the combat was fun without being frustrating (I didn't die a single time on the easiest difficulty level).
If you are a hardcore PC RPG gamer you will notice that this game is a tad linear. Of course there are quite a lot of side quests but you can't roam very freely. This seems to be a typical characteristic of more 'modern' RPGs, like Fable, or even Overlord. On the other hand, this also has pros: at least you don't get lost or distracted. Also: Fable could learn a few things from Jade Empire, this is how a console RPG should be done: it's all about the story and the atmosphere. The game is fun, quick to pick up and you don't have to manage your inventory and character every two steps while still keeping enough numbers, statistics and options for you to look at.
I think I'm going to rest for a bit now after this marathon-gaming-session. But I think I'm going to replay the game with another character later.
Let's hope that Mass Effect comes to the PC as well.
Pros:
So after I quick install I was ready to go. I was more than happy to experience a new Bioware-experience. As coincidence would have it, I had been playing a few Neverwinter Nights premium modules the days before just because I wanted a Bioware experience. (And no, KotOR 2 and NWN 2 just aren't the same.)
And the game didn't disappoint. I you haven't played it yet: you should. The whole story was fantastic. The characters were well though out, and the combat was fun without being frustrating (I didn't die a single time on the easiest difficulty level).
If you are a hardcore PC RPG gamer you will notice that this game is a tad linear. Of course there are quite a lot of side quests but you can't roam very freely. This seems to be a typical characteristic of more 'modern' RPGs, like Fable, or even Overlord. On the other hand, this also has pros: at least you don't get lost or distracted. Also: Fable could learn a few things from Jade Empire, this is how a console RPG should be done: it's all about the story and the atmosphere. The game is fun, quick to pick up and you don't have to manage your inventory and character every two steps while still keeping enough numbers, statistics and options for you to look at.
I think I'm going to rest for a bit now after this marathon-gaming-session. But I think I'm going to replay the game with another character later.
Let's hope that Mass Effect comes to the PC as well.
Pros:
- Another Bioware classic.
- Amazing atmosphere.
- Great story.
- Cool styles and techniques.
- Original oriental setting of the game.
- A right amount of side quests.
- Well ported: no crashes, no control problems.
- Graphics are still good.
- Music.
- Camera misbehaves sometimes .
- Leaves you wanting much more ;).
Tuesday, July 03, 2007
Game: Overlord
This game took me a little longer to finish: two days.
The game itself is actually pretty good but not that special. I had expected a bit more from it: being more evil for example.
Pros:
The game itself is actually pretty good but not that special. I had expected a bit more from it: being more evil for example.
Pros:
- Nice story.
- Minions.
- Graphics are decent.
- Sound is nice.
- Maps and environments are awesome.
- Will remind you of Dungeon Keeper (and Fable too).
- Not evil enough.
- Very, very linear. No replay value, apart from the different endings (which you can watch anyway by installing RADTools).
- Could do with a bit more spells.
- Just needs more tweaking, Overlord 2 could be something really worth your while tho, so why not pick up this one?
Thursday, June 28, 2007
Game: Call Of Juarez
I started playing Call of Juarez today and... wait, I just finished it too.
All in all a nice game, I only had a small problem playing it on my computer, the game started with an Exception error. Installing the latest patch didn't help either.
I was ready to blame the copy protection (since those have been bugging a lot of games lately in my experience). But the no-dvd crack didn't help either. (It seems that official technical support people are giving those cracks to people who had problems. Makes you wonder...) There were a few other people with my problem too on the forums.
So then I tried the only other thing I could think of. I set the compatibility mode of the game to 'Windows XP'. If you have the same problem and are running Windows XP 64 bit, then give it a try, because after that the game started and worked perfect.
The game itself is actually pretty nice. Two playable characters, a mediocre story, a large environment, nice graphics, very fitting music and voice acting. Only the long stealth missions and platforming with Billy (one of the characters) got on my nerves. But the fact that you can play as an ass-kicking reverend afterwards is worth it.
So: pros:
All in all a nice game, I only had a small problem playing it on my computer, the game started with an Exception error. Installing the latest patch didn't help either.
I was ready to blame the copy protection (since those have been bugging a lot of games lately in my experience). But the no-dvd crack didn't help either. (It seems that official technical support people are giving those cracks to people who had problems. Makes you wonder...) There were a few other people with my problem too on the forums.
So then I tried the only other thing I could think of. I set the compatibility mode of the game to 'Windows XP'. If you have the same problem and are running Windows XP 64 bit, then give it a try, because after that the game started and worked perfect.
The game itself is actually pretty nice. Two playable characters, a mediocre story, a large environment, nice graphics, very fitting music and voice acting. Only the long stealth missions and platforming with Billy (one of the characters) got on my nerves. But the fact that you can play as an ass-kicking reverend afterwards is worth it.
So: pros:
- Enjoyable action! There is slowmo.
- Great music, good voice acting.
- Two characters. Two gaming styles.
- Great graphics (especially the maps, nature and towns).
- Multiplayer is quite fun.
- Original genre (well, we had Gun before tho).
- Doesn't really stand out.
- Long stealth and platforming missions.
- You'll need a potent machine to run it.
- Few glitches (Windows 64 bit problem, see before).
- Few map glitches (I managed to accidentally get to parts where I wasn't supposed to be - yet - and couldn't go back).
Thursday, May 24, 2007
Tuesday, May 01, 2007
The Number
Wow! The Internet is going crazy about some random number (and it's not 23). Apparently, typing out an hexadecimal value will get you killed / deleted / censored / jailed / destroyed / raped / ignored / access to HD-DVD content. It goes something like: 09 F9 11 02. But it also has 9D 74 E3 5B in it. Maybe D8 41 56 somewhere too. C5 63 56 may or may not have something to do with it. I will give away that it ends with 88 C0 tho. Digg is going nuts. Moderators are constantly deleting any article about this number. They are even deleting irrelevant posts to cover up their censoring tracks. However, they seem to forget that this is the Internet.
Articles about The Number (growing):
Also: Google is full with the stuff.
February 13th! Wired blog posts the key.
Reddit also seems to have no problem with the key.
Explanation about the key at Doom9.
igul222 also has a nice list about the number.
Let's see how this ends. I wonder how Mr. Rose will talk his way out of this. He'll probably will.
Update: this just in. Told ya :).
Articles about The Number (growing):
- Spread this number now. Article is deleted!
Mirror here. Picture here and here. - Slashdot does not censor the number. Thank you!
- Censorship 5. 70 diggs in 7 minutes!
- Wikipedia censors the number. You cannot create the page anymore.
- Free binary translation.
- May 1st: the day Digg died. (User got deleted.) lnxaddct made a nice remark:
Is this a violation of the DMCA too?
MDkgRjkgMTEgMDIgOUQgNzQgRTMgNUIgRDggNDEgNTYgQzUgNjMgNTYgODggQzA=n
hint: In python, "text".decode("base64") - Digg losing control of their site. With article.
- The number.
- Cowards.
- Freedom of speech.
- Digg is dugg.
- And it's growing every second...
Also: Google is full with the stuff.
February 13th! Wired blog posts the key.
Reddit also seems to have no problem with the key.
Explanation about the key at Doom9.
igul222 also has a nice list about the number.
Let's see how this ends. I wonder how Mr. Rose will talk his way out of this. He'll probably will.
Update: this just in. Told ya :).
Monday, April 30, 2007
Top 10 Presentations On Scaling Websites
A great blog post listing all those great scaling presentations. I really enjoy watching those (most of them are on Youtube too).
Here's one of them (about Twitter):
Here's one of them (about Twitter):
Ubuntu Feisty - Second Problem
Another problem (on another machine) was that it refused booting the new kernel.
Also: the live cd didn't work either, with the same error. A lot of people have problems of this kind, and most of the times they get the following errors:
ata2 is slow to respond, please be patient
ata2 failed to respond (30 secs)
ata2: command 0xa0 timeout, stat 0xd0 host_stat 0x20
And finally it quits to an initramfs shell:
/bin/sh: can't access tty; job control turned off
Note that this last message is normal and has nothing to do with the actual problem. This caused some confusion with some people.
So people have tried various things, here are a few suggestions, most of them came from users and developers:
Also: the live cd didn't work either, with the same error. A lot of people have problems of this kind, and most of the times they get the following errors:
ata2 is slow to respond, please be patient
ata2 failed to respond (30 secs)
ata2: command 0xa0 timeout, stat 0xd0 host_stat 0x20
And finally it quits to an initramfs shell:
/bin/sh: can't access tty; job control turned off
Note that this last message is normal and has nothing to do with the actual problem. This caused some confusion with some people.
So people have tried various things, here are a few suggestions, most of them came from users and developers:
- Is there a floppy in the drive? Remove it, otherwise, insert a floppy and see if that makes any difference. I didn't care much for this solution. However, it did work for some people...
- Check your IDE configuration in the BIOS, put it on Standard IDE.
- Boot with libata.ignore_hpa=0 added to boot options. (Press e to edit a menu item in the GRUB list, then go to the line which contains the kernel. Always remove quiet and splash and add the above command.) This didn't work with me.
- The solution which worked for me was the following one: add break=top to the boot parameters (see above), don't forget to delete splash and quiet. Once you boot, you will immediately break to an initramfs shell. Try the following commands.
modprobe piix
modprobe libata
modprobe pata_jmicron
modprobe ata_piix
modprobe ahci
modprobe ata_generic
modprobe ide-disk
modprobe ide-generic
Then type exit to continue booting. You don't have to try them all at once. I first tried ide-disk and ide-generic but those didn't work, then I tried only piix, which worked! If that doesn't work, I would suggest trying piix, libata, pata_jmicron, ata_piix, ahci and ata_generic.
Once you get it running, we must make sure these modules get loaded automatically (instead of always adding break=top). Edit the following file: /etc/initramfs-tools/modules/. E.g., type:
sudo gedit /etc/initramfs-tools/modules
And add the modules which worked for you (without modprobe). In my case, I only had to add piix. Save and exit the editor, then execute the following command:
sudo update-initramfs -u
Done. Try to restart normally. It should work now. If it doesn't, continue checking the forums and Launchpad.
Feisty Upgrade - First Problem
We recently updated all our Ubuntu machines from Edgy to Feisty. Updating went smooth, apart from a few problems.
The first problem was that X was freezing at random intervals. Xorg log said nothing special, but the GDM log did:
The first problem was that X was freezing at random intervals. Xorg log said nothing special, but the GDM log did:
So I did the only thing I could think of: I removed the Videoram lines from xorg.conf. And the freezes seem to have stopped.Error in I830WaitLpRing(), now is 7023360, start is 7021359
pgetbl_ctl: 0x3ffc0001 pgetbl_err: 0x0
ipeir: 0 iphdr: 1810000
LP ring tail: 9b38 head: 938c len: 1f801 start 0
eir: 0 esr: 0 emr: ffff
instdone: ffc0 instpm: 0
memmode: 306 instps: f0000
hwstam: ffff ier: 0 imr: ffff iir: 0
space: 129100 wanted 131064Fatal server error:
lockup
Saturday, April 07, 2007
Games: Supreme Commander And Command And Conquer 3
I've just finished all the campaigns of Command And Conquer 3. I must say I am pretty impressed.
I also played a bit of Supreme Commander but I didn't really like that game and I've already uninstalled it.
Supreme Commander is good because:
I also played a bit of Supreme Commander but I didn't really like that game and I've already uninstalled it.
Supreme Commander is good because:
- Huge maps.
- Cool units.
- Strategic zoom is really helpful.
- Multiplayer.
But bad because:
- Boring maps.
- Though you can build hundreds of units, they are all so tiny...
- Repetitive missions... always the same.
Command And Conquer has:
- Kane!
- Kaaaaaane! (Yes, he counts for two points!)
- Full-motion video is back and you can't help but love the cheesy acting.
- Nice detailed maps.
- A superb engine. The maps load incredibly fast, and there is no huge framerate drop - ever! Even with a lot of units on screen... how do they do it? (Supreme Commander takes ages to load.)
- Cool units.
- Fun multiplayer.
- Did I mention Kane?
- Spectacular effects.
It does need better patching though (especially for people without high-end systems). On my system however the game ran like a dream in 1600x1200 with all options on highest (except AA, which is level 1).
However, if you adored Total Annihilation, you will like Supreme Commander. If you loved C&C, you'll love Tiberium Wars. I liked both, but I do prefer to play a game of CC3.
Labels:
command and conquer
,
game
,
games
,
kane
,
review
,
supreme commander
,
tiberium wars
Wednesday, April 04, 2007
"Huh?" Or "Where have my past two days gone?"
I've been kinda bored lately. I enjoy playing a game when I stop working. The problem is that lately I haven't been able to find a really good game which kept me hooked. Where are the times of those good atmospheric games like Half Life 2 (Episode 1 if you wish), Beyond Good And Evil, Psychonauts, GTA San Andreas, Fahrenheit, Dreamfall (how I loved that game), Prince Of Persia... Wait a minute... Prince Of Persia.
I decided to reinstall The Two Thrones, which I didn't finish last time I played it. (I only played for half an hour through the game and then became distracted).
While I was thinking about the fact that installing this game would certainly take a lot of my time away I was listening to some PoP-game-music. Hearing Time Only Knows and I Still Love You again enough to convince me. I inserted CD 1.
We're now two days later, it's past midnight again, and I have completed the game. I must say: what an experience. The ending was fantastic. I just can't understand why I am so hooked on that game (I always believed I wasn't the guy for platformers).
Sigh... and now I'm bored again :), but at least I have a sense of accomplishment now (if you can call it that).
I decided to reinstall The Two Thrones, which I didn't finish last time I played it. (I only played for half an hour through the game and then became distracted).
While I was thinking about the fact that installing this game would certainly take a lot of my time away I was listening to some PoP-game-music. Hearing Time Only Knows and I Still Love You again enough to convince me. I inserted CD 1.
We're now two days later, it's past midnight again, and I have completed the game. I must say: what an experience. The ending was fantastic. I just can't understand why I am so hooked on that game (I always believed I wasn't the guy for platformers).
Sigh... and now I'm bored again :), but at least I have a sense of accomplishment now (if you can call it that).
Monday, March 26, 2007
Game: S.T.A.L.K.E.R.
Played a bit of Stalker yesterday. It's a nice first-person shooter but has some issues (don't try playing it on Vista, neither did I).
Good:
Good:
- Atmospheric: great graphics, huge maps, great architecture and maps!
- Immersive, open-ended... it seems there are 7 different endings.
- Survival - you get attacked by wild dogs.
- Horror!
- Lots to explore. Again: mapdesign is great!
- Lots of different factions.
- Inventory system could be smoother.
- Story could be clearer.
- High system reqs.
- Bugs!
- Overhyped game.
- Late release.
- Don't use Vista.
Tuesday, March 20, 2007
Saturday, March 10, 2007
Infographics And Animations
More interesting and cool videos.
The big brother state:
Trusted computing:
Remind me infographic:
Airport animation:
What Barry says:
Plaid - Itsu:
Google master plan:
Tried and tested method:
Questions about life:
The big brother state:
Trusted computing:
Remind me infographic:
Airport animation:
What Barry says:
Plaid - Itsu:
Google master plan:
Tried and tested method:
Questions about life:
Friday, February 09, 2007
Sunday, January 21, 2007
Your Jung Typology
The Jung Typology test was on Digg today. You can test yourself here.
My result was: INTJ - "Mastermind Rational" - Introverted, Intuitive, Thinking, Judging. But some other tests describe me as Introverted, Sensing, Thinking, Judging (INSJ).
A better description for INTJ (and other types) is here. Here is mine (bold parts emphasized by me).
The ISTJ is also a nice description but I think INTJ fits me better. It was also the first result I got.
My result was: INTJ - "Mastermind Rational" - Introverted, Intuitive, Thinking, Judging. But some other tests describe me as Introverted, Sensing, Thinking, Judging (INSJ).
A better description for INTJ (and other types) is here. Here is mine (bold parts emphasized by me).
To outsiders, INTJs may appear to project an aura of "definiteness", of self-confidence. This self-confidence, sometimes mistaken for simple arrogance by the less decisive, is actually of a very specific rather than a general nature; its source lies in the specialized knowledge systems that most INTJs start building at an early age. When it comes to their own areas of expertise -- and INTJs can have several -- they will be able to tell you almost immediately whether or not they can help you, and if so, how. INTJs know what they know, and perhaps still more importantly, they know what they don't know.True, that.
INTJs are perfectionists, with a seemingly endless capacity for improving upon anything that takes their interest. What prevents them from becoming chronically bogged down in this pursuit of perfection is the pragmatism so characteristic of the type: INTJs apply (often ruthlessly) the criterion "Does it work?" to everything from their own research efforts to the prevailing social norms. This in turn produces an unusual independence of mind, freeing the INTJ from the constraints of authority, convention, or sentiment for its own sake.
INTJs are known as the "Systems Builders" of the types, perhaps in part because they possess the unusual trait combination of imagination and reliability. Whatever system an INTJ happens to be working on is for them the equivalent of a moral cause to an INFJ; both perfectionism and disregard for authority may come into play, as INTJs can be unsparing of both themselves and the others on the project. Anyone considered to be "slacking," including superiors, will lose their respect -- and will generally be made aware of this; INTJs have also been known to take it upon themselves to implement critical decisions without consulting their supervisors or co-workers. On the other hand, they do tend to be scrupulous and even-handed about recognizing the individual contributions that have gone into a project, and have a gift for seizing opportunities which others might not even notice.Very flattering.
In the broadest terms, what INTJs "do" tends to be what they "know". Typical INTJ career choices are in the sciences and engineering, but they can be found wherever a combination of intellect and incisiveness are required (e.g., law, some areas of academia). INTJs can rise to management positions when they are willing to invest time in marketing their abilities as well as enhancing them, and (whether for the sake of ambition or the desire for privacy) many also find it useful to learn to simulate some degree of surface conformism in order to mask their inherent unconventionality.Watch out now:
Personal relationships, particularly romantic ones, can be the INTJ's Achilles heel. While they are capable of caring deeply for others (usually a select few), and are willing to spend a great deal of time and effort on a relationship, the knowledge and self-confidence that make them so successful in other areas can suddenly abandon or mislead them in interpersonal situations.Now this description is just spooky! It is completely true.
This happens in part because many INTJs do not readily grasp the social rituals; for instance, they tend to have little patience and less understanding of such things as small talk and flirtation (which most types consider half the fun of a relationship). To complicate matters, INTJs are usually extremely private people, and can often be naturally impassive as well, which makes them easy to misread and misunderstand. Perhaps the most fundamental problem, however, is that INTJs really want people to make sense. :-) This sometimes results in a peculiar naivete', paralleling that of many Fs -- only instead of expecting inexhaustible affection and empathy from a romantic relationship, the INTJ will expect inexhaustible reasonability and directness.
Probably the strongest INTJ assets in the interpersonal area are their intuitive abilities and their willingness to "work at" a relationship. Although as Ts they do not always have the kind of natural empathy that many Fs do, the Intuitive function can often act as a good substitute by synthesizing the probable meanings behind such things as tone of voice, turn of phrase, and facial expression. This ability can then be honed and directed by consistent, repeated efforts to understand and support those they care about, and those relationships which ultimately do become established with an INTJ tend to be characterized by their robustness, stability, and good communications.There is still hope :). This really is a good description of my personality.
The ISTJ is also a nice description but I think INTJ fits me better. It was also the first result I got.
Smashing Magazine...
...has released an enormous overview of 53 CSS-Techniques You Couldn't Live Without. It has Tabs, Bar Graphs, Round Corners, Diagrams, Image Maps, Calendars, CSS Based Forms, Percent Bars, Piecharts, and more! A great collection I certainly must keep in mind!
More Links, Tools, And Sites...
I continue - I'm in a posting mood.
JDarkRoom - simple text editor: written in Java, full screen (!), and you can choose colours. Strange stuff, but it is actually cool to use.
Pictures of illegal brands. Quite funny.
Table of equivalents. A huge (very huge) list of open source software alternatives. Even had names I didn't now about before. Be sure to check it out.
Pirates of Silicon Valley - see the full documentary online. If you want to know what the Apple vs. Microsoft battle was all about, then don't miss it. Also: I was surprised to see that Steve was such a douche. Bill looked much more charismatic, also towards his company (but still stole a GUI).
Interesting article about conciousness.
13 things I wish I learned in college. Nice post.
JDarkRoom - simple text editor: written in Java, full screen (!), and you can choose colours. Strange stuff, but it is actually cool to use.
Pictures of illegal brands. Quite funny.
Table of equivalents. A huge (very huge) list of open source software alternatives. Even had names I didn't now about before. Be sure to check it out.
Pirates of Silicon Valley - see the full documentary online. If you want to know what the Apple vs. Microsoft battle was all about, then don't miss it. Also: I was surprised to see that Steve was such a douche. Bill looked much more charismatic, also towards his company (but still stole a GUI).
Interesting article about conciousness.
13 things I wish I learned in college. Nice post.
Towers 2 Flash Game
My link dump/blog update continues...
Very addictive game! Check out Towers 2. I couldn't stop playing for days! It's based upon Warcraft III. You build various kinds of towers to stop the monsters from invading. Give it a try. Now that Flash 9 final is out for Linux, nothing should stop you ;).
Subscribe to:
Posts
(
Atom
)