Search Results

Search found 1091 results on 44 pages for 'efficiency'.

Page 23/44 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Explicit disable MySQL query cache in some parts of program

    - by jack
    In a Django project, some cronjob programs are mainly used for administrative or analysis purposes, e.g. generating site usage stats, rotating user activities log, etc. We probably do not hope MySQL to cache queries in those programs to save memory usage and improve query cache efficiency. Is it possible to turn off MySQL query cache explicitly in those programs while keep it enabled for other parts including all views.py?

    Read the article

  • What is the most efficient way to clone a JavaScript object?

    - by jschrab
    What is the most efficient way to clone a JavaScript object? I've seen: obj = eval(uneval(o)); but that's not cross platform (FF only). I've done (in Mootools 1.2) things like this: obj = JSON.decode(JSON.encode(o)); but question the efficiency. I've also seen recursive copying function, etc. I'm pretty surprised that out-of-the-box JavaScript doesn't have a method for doing this.

    Read the article

  • efficacy of register allocation algorithms!

    - by aksci
    i'm trying to do a research/project on register allocation using graph coloring where i am to test the efficiency of different optimizing register allocation algorithms in different scenarios. how do i start? what are the prerequisites and the grounds with which i can test them. what all algos can i use? thank you!

    Read the article

  • How to tile a 30000 x 6000 image for a 480 x 320 screen?

    - by Horace Ho
    (this is related to another question about implementation on iPhone) I have a large image, size around 30000 (w) x 6000 (h) pixels. You may consider it's like a big map. I assume I need to crop it up into smaller tiles. Questions: what is the tile strategy? Requirements: whole image (though cropped) can be scrolled up/down/left/right by swipes zoom in (up to pixel-to-pixel) out (down to screen-fit-by-height) by the 2-finger operation memory efficiency by lazy loading tiles Thanks!

    Read the article

  • Optimum size of transaction in Postgres?

    - by Joe
    I'm running a process that does a lot of updates ( 100,000) to a table. I have the choice between putting all the updates in a single transaction or committing transactions every 1000 or so. Ignore for the moment the case where a transaction fails and is aborted. I'm interested in the best size of transaction for memory and speed efficiency.

    Read the article

  • Sorting a DropDownList? - C#, ASP.NET

    - by scrot
    I'm curious as to the best route (more looking towards simplicity, not speed or efficiency) to sort a DropDownList in C#/ASP.NET - I've looked at a few recommendations but they aren't clicking well with me. Edit: Folks, I do not have control over how the data comes into the DropDownList - I cannot modify the SQL.

    Read the article

  • How is Java Process.getOutputStream() Implemented?

    - by Amit Kumar
    I know the answer depends on the particular JVM, but I would like to understand how it is usually implemented? Is it in terms of popen (posix)? In terms of efficiency do I need to keep something in mind (other than using a Buffered stream as suggested by the javadoc). I would be interested to know if there is a general reference about implementations of JVMs which answers such questions.

    Read the article

  • How to define and work with an array of bits in C?

    - by Eddy
    I want to create a very large array on which I write '0's and '1's. I'm trying to simulate a physical process called random sequential adsorption, where units of length 2, dimers, are deposited onto an n-dimensional lattice at a random location, without overlapping each other. The process stops when there is no more room left on the lattice for depositing more dimers (lattice is jammed). Initially I start with a lattice of zeroes, and the dimers are represented by a pair of '1's. As each dimer is deposited, the site on the left of the dimer is blocked, due to the fact that the dimers cannot overlap. So I simulate this process by depositing a triple of '1's on the lattice. I need to repeat the entire simulation a large number of times and then work out the average coverage %. I've already done this using an array of chars for 1D and 2D lattices. At the moment I'm trying to make the code as efficient as possible, before working on the 3D problem and more complicated generalisations. This is basically what the code looks like in 1D, simplified: int main() { /* Define lattice */ array = (char*)malloc(N * sizeof(char)); total_c = 0; /* Carry out RSA multiple times */ for (i = 0; i < 1000; i++) rand_seq_ads(); /* Calculate average coverage efficiency at jamming */ printf("coverage efficiency = %lf", total_c/1000); return 0; } void rand_seq_ads() { /* Initialise array, initial conditions */ memset(a, 0, N * sizeof(char)); available_sites = N; count = 0; /* While the lattice still has enough room... */ while(available_sites != 0) { /* Generate random site location */ x = rand(); /* Deposit dimer (if site is available) */ if(array[x] == 0) { array[x] = 1; array[x+1] = 1; count += 1; available_sites += -2; } /* Mark site left of dimer as unavailable (if its empty) */ if(array[x-1] == 0) { array[x-1] = 1; available_sites += -1; } } /* Calculate coverage %, and add to total */ c = count/N total_c += c; } For the actual project I'm doing, it involves not just dimers but trimers, quadrimers, and all sorts of shapes and sizes (for 2D and 3D). I was hoping that I would be able to work with individual bits instead of bytes, but I've been reading around and as far as I can tell you can only change 1 byte at a time, so either I need to do some complicated indexing or there is a simpler way to do it? Thanks for your answers

    Read the article

  • what's Static type safety ?

    - by symfony
    Static type safety – an integral property of languages of the family to which C++ belongs and valuable both for guaranteeing properties of a design and for providing runtime and space efficiency. Can someone illustrate by a demo? Thanks

    Read the article

  • is c++ STL algorithms and containers same across platforms and performance?

    - by Abhilash M
    After learning good amount of c++, i'm now into STL containers and algorithms template library, my major concerns are, 1) Is this library same across different platforms like MS, linux n other os? 2) will quality or efficiency of program c++ module decrease with more use of STL containers and algorithms, i think i can't customize it to all needs. 3) Is this template library good to use in linux system programming, kernel modules? 4) lastly can i use this in programming contests, because it relives a lot of coding and pressure off shoulders.

    Read the article

  • Using Java Script to pass data

    - by Doodle
    How can I pass data from client to server? I have a very simple text editor created on a site and every few minutes or so I would like to send the information that has been typed in back to the server as a text file. I am trying to create an effect similar to the live type of googleWave. Speed and efficiency isn't all that important at the moment. A quick and dirty way would be suffice.

    Read the article

  • Convert MSAccess Project Management Application to PHP/MySQL: Which Methodology?

    - by zzapper
    I've got to convert a not terribly complicated bespoke project management system from MsAccess Application to PHP/MySQL. I've been programming for donkey's years but embarrassingly know practically nothing about modern methodologies. So the old 'learning curve' versus 'improved efficiency' conundrum rears its ugly head once again. Although I've Googled up some stuff I don't want to prejudice your suggestions, where would you start, I'm at your mercy?

    Read the article

  • Multithreading, when to yield versus sleep

    - by aaa
    hello. To clarify terminology, yield is when thread gives up its time slice. My platform of interest is POSIX threads, but I think question is general. Suppose I have consumer/producer pattern. If I want to throttle either consumer or producer, which is better to use, sleep or yield? I am mostly interested in efficiency of using either function. Thanks

    Read the article

  • Serializing persistent/functional data structures

    - by Rob
    Persistent data structures depend on the sharing of structure for efficiency. For an example, see here. How can I preserve the structure sharing when I serialize the data structures and write them to a file or database? If I just naively traverse the datastructures, I'll store the correct values, but I'll lose the structure sharing. I'd like to be able to save data-structures with shared components to a file, restore them, and still have most of the structure shared in the restored data.

    Read the article

  • How to design an exception logging table using HyperTable and access it via the Java client?

    - by ikevinjp
    If I have the following table schema to log an exception (in standard SQL schema): Table: ExceptionLog Columns: ID (Long), ExceptionClass (String), ExceptionMessage (String), Host (String), Port (Integer), HttpHeader (String), HttpPostBody (String), HttpMethod (String) How would I design the same thing in HyperTable (specifically, what is the best approach for efficiency)? And, how would I code it using the HyperTable Java client?

    Read the article

  • php: how do i store an array in a file to access as an array later with php?

    - by Haroldo
    I just want to quickly store an array which i get from a remote API, so that i can mess around with it on a local host. So: i currently have an array i want to people to use the array without having to get it from the API There are no needs for efficiency etc here, this isnt for an actual site just for getting some sanitizing/formatting methods made etc is there a function like store_array() restore_arrray() ?!

    Read the article

  • How many keys are too many in memcached?

    - by jack
    I currently have about 650,000 items in memcached (430MB memory used) and the number is still increasing. It's expected to exceed 1,000,000 items before going flat. Current hit/miss ratio is 25:1 so the efficiency is pretty good. I just wanted to ask is one million items in memcached on single server too many? If no, how many is too many?

    Read the article

  • Three-way full outer join in SQLite

    - by Vince
    I have three tables with a common key field, and I need to join them on this key. Given SQLite doesn't have full outer or right joins, I've used the full outer join without right join technique on Wikipedia with much success. But I'm curious, how would one use this technique to join three tables by a common key? What are the efficiency impacts of this (the current query takes about ten minutes)? Thanks!

    Read the article

  • Combining C++ and C#

    - by cam
    Is it a good idea to combine C++ and C# or does it pose any immediate issues? I have an application that needs some parts to be C++, and some parts to be C# (for increased efficiency). What would be the best way to achieve using a native C++ dll in C#?

    Read the article

  • Another Memory Alignment Question?

    - by utxeeeee
    I understand why data need to be aligned (and all the efforts made to accomplish it like padding) so we can reduce the number of memory accesses but this assumes that processor just can fetch addresses multiples of 4(supposing we are using a 32-bit architecture). And because of that assumption we need to align memory and my question is why we can just access addresses multiple of 4(efficiency, hardware restriction, another one)? Which is the advantages of doing this? Why cannot we access all the addresses available? hugs

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >