Category Archives: Uncategorized

Ordering Tagged Items by Similarity

So I’ve got this web-based image gallery. The images in it are organized with simple tags (there’s a many-to-many relationship between images and tags). Every image has at least one tag, and almost all images have several tags. When a … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Basic Spatial Hashing with Boost

So let’s say you’ve got some particles in 2-dimensional space. There they are. Now let’s say you want any two particles which are very close to each other to interact. You need to know which pairs are close enough. You … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

2007 wants its page files back

compcache. Use it. The general idea is to set apart some physical memory as swap space, with compression on the pages going in. Much of what’s in RAM is very compressible, so a fast compression algorithm can do a lot. … Continue reading

Posted in Uncategorized | Leave a comment

Fishwars: OpenGL Yes, Minimap Meh

Switching over to OpenGL to do the scaling and presenting was almost criminally easy: rather than inherit QWidget the pixelated view object inherits QGLWidget. That’s it. The CPU load is alleviated without any other changes. With some simple benchmark animation … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Fishwars: Qt’s Scaling Is Ungood

I found that using the scaled() method of the drawing surface could be replaced by a scaling factor set in QPainter to improve performance slightly. The former method creates a scaled up copy of the entire source which is then … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment