I want to be able to store an atomic model in an OpenGL program I'm writing. Nothing fancy; just constant mesh vertex values stored as GLfloat[3], plus simple textures. I also want the model to be able to move and rotate freely and as a single object. Here's what I have so far:
typedef struct _coordnode {
GLfloat *pts; /* ...
I've been poking around mscorlib to see how the generic collection optimized their enumerators and I stumbled on this:
// in List<T>.Enumerator<T>
public bool MoveNext()
{
List<T> list = this.list;
if ((this.version == list._version) && (this.index < list._size))
{
this.current = list._items[this.index];
this...
In one Activity, I am doing this:
Every minute, I update the GPS location to the cloud.
Then, after the location is updated, I download a list of 10 people and their icons...and update them in the list. (each icon is 80x80 and about 2Kb)
This is done every minute, over and over.
My problem is: It seems to be a little slow? Sometime...
I have a program that is very heavily hitting the file system, reading and writing to a set of working files. The files are several gigabytes in size, but not so large as to not fit on a RAM-disk. The machines this program runs on are typically Ubuntu Linux boxes.
Is there a way to configure the file manager to have a very very large...
I'm looking for an "efficient" way to persist a binary state when given to two integers. Giving these two integers A an B, A is always less than B and the range of values which they will contain is 0 through N. The integer N will be greater than 2 and less than 256.
The simple solution is to create a two-dimensional array of Boolean v...
First off, I'm programming a game. Currently in the render function there are two calls to two different functions. One renders some text, one renders sprites.
On my computer (AMD Phenom(tm) II X4 955 Processor (4 CPUs), ~3.2GHz, 4096MB RAM DDR2, NVIDIA GeForce GTX 285) I have a render speed of ~2200 FPS when rendering around 200 sprite...
I have a kernel which uses 17 registers, reducing it to 16 would bring me 100% occupancy. My question is: are there methods that can be used to reduce the number or registers used, excluding completely rewriting my algorithms in a different manner. I have always kind of assumed the compiler is a lot smarter than I am, so for example I o...
As far as my understanding goes, shared memory is divided into banks and accesses by multiple threads to a single data element within the same bank will cause a conflict (or broadcast).
At the moment I allocate a fairly large array which conceptually represents several pairs of two matrices:
__shared__ float A[34*N]
Where N is the nu...
This question escaped my mind last night, but I remember it again. Is it possible that in the development of a vb.net application that you can reduce the amount of memory that it will consume once you deploy it.
We are making a simple system that we will deploy in a small company (for free) but we don't know if the computer hardware in ...
Ok, so say you have a really big Range in ruby. I want to find a way to get the max value in the Range.
The Range is exclusive (defined with three dots) meaning that it does not include the end object in it's results. It could be made up of Integer, String, Time, or really any object that responds to #<=> and #succ. (which are the only ...
I am going to build a PHP web application and have already decided to use Codeigniter + DataMapper (OverZealous edition).
I have discovered that DataMapper (OverZealous edition) requires the use of an extra association table even when there is actually just a one-to-many relationship.
For example, a country can have many players but a ...
I'm trying to optimize some slow web pages, and my guess is that the problem has to do with SQL blocking (doesn't seem to be a matter of CPU or I/O utilization on the web server or database server). What's the quickest way to find out what queries are getting blocked and what queries are doing the blocking?
...
I've lots of lookuptables from which I'll generate my webresponse.
I think IIS with Asp.net enables me to keep static lookuptables in memory which I can use to serve up my responses very fast.
Are there however also non .net solutions which can do the same?
I've looked at fastcgi, but I think this starts X processes, of which anyone c...
I'm working on an interactive contact search page (contacts are returned via ajax as you type or select criteria). I want this page to be very responsive.
There is a complex set of rules to determine which contact records a given contact can see; these rules are rolled up into a user-defined function, DirectoryContactsByContact(@Contac...
I need to display and manipulate, in a browser, a grid of up to 10,000 simple cells (say, 100 by 100). These cells are basically just a colored-in rectangle. Manipulations include changing cell colors using Javascript, handling a click on each cell, etc. Using 1 div per cell, and 1 div to wrap groups of cells into a row, I can get down t...
Is there anyway to config IIS to serve static file like CDN? Like Gzip, Cache, E-tag, Mod-date?
And how should we config to make it very robust on massive requests?
I know it's a short question but that's all I want to ask.
To the question on the IIS version, i prefer 6 and 7 IIS. You can give your answer on either 6 or 7 :)
Thanks...
Hi
I'm working on a website that's already been designed by someone else. The designer has used a big image (900x700 100KB) which contains a big logo right across the top, then the background for two columns.
This image loads every time a page is loaded as it forms the basis for the website. What should I do with it to improve loading ...
Hi,
I have the a for loop which perform the following function:
Take a M by 8 matrix and
1) Spilt it into blocks of size 512 elements (meaning X by 8 of the matrix == 512, and the number of elements can be 128,256,512,1024,2048)
2) Reshape the block into 1 by 512 (Number of elements) matrix.
3) Take the last 1/4 of the matrix and put i...
I am creating a page where people can post articles. When the user posts an article, it shows up on a list, like the related questions on stackoverflow (when you add a new question). It's fairly simple.
My problem is that i have 2 types of users. 1) Unregistered private users. 2) A company.
The unregistered users needs to type in their...
Hello,
I've read the MSDN article about the layouts pass, that states:
When a node is added or removed from the logical tree, property invalidations are raised on the node's parent and all its children. As a result, a top-down construction pattern should always be followed to avoid the cost of unnecessary invalidations on nodes tha...