Kim Sullivan

Czech Republic

Age: 31

Dec
5
awarded Teacher
Aug
11
awarded Supporter
May
22
awarded Yearling
May
1
awarded Famous Question
Nov
24
accepted Storing weekly and monthly aggregates in Oracle
Nov
24
accepted How to get rid of unmanaged code in VW 3.1d and ENVY
Nov
24
revised How to programmatically determine the document root in PHP?
Moved the answer to an answer instead of it being part of the question.
Nov
24
accepted How to programmatically determine the document root in PHP?
Nov
24
answered How to programmatically determine the document root in PHP?
Nov
19
comment Glorp and Oracle: limiting query result
Does Glorp use cursors in the background when working with Oracle, or does it actually pull all the results in memory?
Nov
17
comment Why do so few people use Maven? Are there alternative tools?
Your points may be valid, but the original question is - why do many developers NOT use maven. Could you make that part of your answer more prominent?
Oct
24
comment Java Code for Simple Animation only runs on Windows
The code now much better illustrates your point - calculating the offsets and switching movement directions in the thread and just painting at the proper offset whenever you get to actuallly painting. Also, the repaint() in the timer is a nice touch - while it doesn't actually force a repaint, it tells the system that shomething changed and a paint should be done next time the system gets around to do it.
Oct
23
comment Java Code for Simple Animation only runs on Windows
In your improved example, you forget that the J and K for loops are what's actually doing the animation (in the original, it first draws the oval, then sleeps, then erases the oval using the background color and goes on the next iteration). The J loop is for animating "down", the K loop is for animating "up".
Oct
23
comment Java Code for Simple Animation only runs on Windows
It's not about your repaint statements - the paint() method should be written so that it only ever draws a single frame of the animation, so no for-loops that do the animating inside the paint method - you have to keep the "state" (i,j,k in your example) separately, and draw the frame based on the current state. It gets a bit complicated to explain in a few words, have a look at how to write a "game loop" on java-gaming.org/index.php?topic=24220.0 - you can simplify it some, but the basic idea holds.
Oct
23
awarded Supporter
Oct
22
comment Java Code for Simple Animation only runs on Windows
Not sure if the difference is really about thread scheduling, more on how graphics contexts work. In windows, it seems that the updates are propagated immediately do the graphics memory - I can imagine that OS X implicitly uses a double buffer, in which case the whole animation is drawn to the buffer first (the delay), and only the last frame of the animation is flipped from the buffer to video memory.
Oct
22
answered Interview : Is it possible to create a class without name?
Jul
11
answered Smalltalk - Inserting a TAB character (Visual Works)
Jul
11
comment Smalltalk - Inserting a TAB character (Visual Works)
Except that in some versions of VisualWorks, the class Character doesn't implement asString. Checked it it in VW 3.5 and 7.8. This is one of the reasons why I almost always use WriteStream.
Jun
19
comment Getting authentication prompt for sockets.ny.stackexchange.com on every page load?
I locked myself out of my AD account several times because of this (had an old password stored in FF). Entering the correct password doesn't seem to work.
1 2 3 4