Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms (2)

0
votes
0answers
36 views

Java - Object declaration out of while loop

Could you explain to me which code is better (more optimal) and why? Vesion 1: while(something){ Runnable task = (Runnable) taskQueue.dequeue(); Throwable ex = null; ... } Version 2: Runnable ...
0
votes
0answers
14 views

Optimizing mass inserts into sqlite [closed]

Possible Duplicate: Optimizing mass inserts into sqlite I am trying to optimize inserts from a returned JSON which contains data from multiple tables on the remote server. My code is ...
1
vote
2answers
30 views

Optimizing mass inserts into sqlite

I am trying to optimize inserts from a returned JSON which contains data from multiple tables on the remote server. My code is working, but I just want to figure out a way for it to work better. I ...
0
votes
0answers
29 views

Why is using a variable in a for loop faster than some function output? [migrated]

On Symfony blog, in support of Symfony being faster, it was mentioned that for ($i = 0; $i<count($my_array); $i++) is slower as compared to for ($i = 0, $count = count($my_array); ...
1
vote
1answer
75 views

Comparing strings

My question is What's the fastest (quality is important too, but a little less important) way to compare two strings? I'm looking for the most efficient way to compare two strings. Some of the ...
1
vote
2answers
40 views

Can I adjust this code which displays a table to run faster?

this.displayData = function () { var i; var $thead = $(thead); var $tbody = $(tbody); var numberOfFields = columnDataFields.length; var numberOfRows = data.length; // ...
1
vote
1answer
45 views

Return the ids of failed logins

I have a query to return the ids of failed logins that are newer than a supplied date, and new than the last successful login. Table: ####################################################### # ...
1
vote
2answers
64 views

C++ Vector2 Class Review

Quite some time ago I started this question: Looking for more knowledge on how to make my C++ Vector2 class better and have since improved on it. I've been using it and it seems to work fine, but I'm ...
2
votes
1answer
47 views

How to improve this SmartDownloader?

This is a class that downloads files in a smart way: it tries to download from different sessions. This do speed up things. How can I Improve it? import os import urllib2 import time import ...
1
vote
0answers
65 views

Markov Encryption API in Python 2.5

The module in question provides classes used to execute Markov encryption and decryption on arrays of bytes. ME was inspired by a combination of Markov chains with the puzzle of Sudoku. This version ...
1
vote
1answer
41 views

Create Directed Acyclic Graph (DAG) from XML-Tree

I've written a program that creates the (minimal unique) directed acyclic graph from the tree structure of an XML-document. The program prints a Bplex-Grammar to cout. I'm interested in all kinds of ...
8
votes
4answers
250 views

Good method to check whether a string is a valid number?

I'm developing a Java Helper Library which has useful methods developers don't want to type out over and over. I'm trying to think of the best way of checking whether a string is a valid number. I've ...
1
vote
2answers
77 views

Improving file reading

Iam programing in C language and have created the below functions to read files. There are 2 functions that i can use to read files. I wanted to know how i can further improve these two in terms of ...
0
votes
1answer
47 views

How is this for compressing (zipping) files?

I'm writing a Java Helper Library. I want to include a method to zip files together. This is what I've come up with. I'm using the java.util.zip.* library (ZipOutputStream and ZipEntry specifically). ...
1
vote
2answers
129 views

How to Improve This Program, Add Comments, etc.?

Do you have any suggestions to improve or extend this script? Any ideas for removing or adding comments/docstrings? import dbm import subprocess import time subprocess.call("clear") try: # Tries ...

1 2 3 4 5 17
15 30 50 per page