0
votes
0answers
3 views

Chaining method calls and “bubbling” the results

I need a way to build up a sort of stack of places to search for an item. What I would like to do is to have each layer searched for an item, and if it is found at that level, then it should be ...
0
votes
2answers
25 views

Quick Sort Implementation

I have written below code for Quick Sort in Java. void quicksort (int[] a, int lo, int hi) { // lo is the lower index, hi is the upper index // of the region of array a that is to be sorted ...
0
votes
0answers
21 views

Quick Sort Implementation [closed]

Possible Duplicate: Quick Sort Implementation I want to implement Quick Sort in Java. I have written below code. void quicksort (int[] a, int lo, int hi) { // lo is the lower index, ...
0
votes
1answer
11 views

Nested while loop for getting db data. Timing out at random times because of the PHP. Any way to make this more efficient?

So today I jumbled together a script that would get data from a database, from different tables and such. I had wanted to just use simple ifs without the whiles, but I couldn't make it possible. The ...
2
votes
2answers
33 views

What is better? For-loops or list descritpors (in cases like this)

Which version of this code is better? Ver 1. a = 0 for i in xrange( 1000 ): if i % 3 == 0 or i % 5 == 0: a += i print a Ver 2. from operator import add print reduce( add, ...
2
votes
1answer
37 views

Python Markdown Static Blogger program

I was hoping I might get some of the brains in Stack Overflow to take a look at my Python static blogger application. I've been using it a few years in a pretty hacked up form. Lately I decided to ...
0
votes
0answers
18 views

Can this code be improved? jQuery with SharePoint

I have written some javacript code with jquery to create collapsable webparts in SharePoint 2010. Can someone suggest some improvements as i think that the methods i am using for selectors are not ...
1
vote
1answer
22 views

filter out password in xml string

We're storing the xml communications with an external service in a text in the db and in a before_create I've got the following: # filter opera password def remove_password! ...
1
vote
2answers
41 views

Search with filters code

I have this method for searching a DB based on filters I was wondering if anyone thought as I do that this code is excessive, and secondly if you have any suggestions to shorten the code. private ...
3
votes
1answer
33 views

Feedback of working javascript code

I am quite new to javascript and I wonder if you experts can see any obvious mistakes (bad javascript coding) below? Or if there are any good improvements? The code is working... Noted improvements: ...
2
votes
1answer
19 views

PHP DAO classes inherit from a generic DAO classes and only change the table name

I am building a web app that needs to access various tables in a given MySQL db. To do that, I have created a generic class, see DAO_DBRecord.php below, and I create children classes for each table I ...
2
votes
4answers
20 views

Improving search through XML file

I'm working on a function that extracts information from an XML document and compares to what the user has typed in. Can you suggest any ways in which I can improve it? The variables in the XML file ...
0
votes
0answers
15 views

Improving search through XML file [closed]

Possible Duplicate: Improving search through XML file I'm working on a function that extracts information from an XML document and compares to what the user has typed in. Can you suggest ...
2
votes
3answers
91 views

optimizing a few lines of c# code

I'm writing a custom JavaScript converter to deserialize some JSON. Here's a few lines I'm writing: public override object Deserialize(IDictionary<string, object> dictionary, Type type, ...
3
votes
3answers
76 views

Any issues (be picky) for this extension method

I'm just curious how this (simple?) code might go in a review with high standards. Anything at all, I won't be insulted. using System; using System.Web; namespace ...

15 30 50 per page
1 2 3 4 5 146