notice that on google maps you can input the address any way you like. as long as it is a valid address...google maps will read it.
In some ruby book I had seen code snippet for something like this, but with phone numbers.
Any ideas how this could be done for addresses?
in language of your choice.
EDIT:
i dont care about a "valid" ...
I'm tasked with developing an application for retrieving, storing and searching data about books, magazines and the like, something very similar to a library application. While researching the topic I was stunned with the magnitude of different standards and acronyms, ISBNs, EANs, IANs and many more... so, are there any books or articles...
My team will soon be launching a web app in Beta. At what point does the Beta tag need to go?
Google seems to hold on to the Beta tag for a long time while others do it for a month or so. Is there some rule of thumb like all known bugs fixed to follow or a time frame or some other methodology for this?
Of course when Beta is gone then ...
What are the purposes of having private/protected members of a class/structure in object-oriented programming? What's the harm in having all members be public?
...
If I wrote
1) a C# SQL database application (a simple program consisting of a GUI over some forms with logic for interfacing with the SQL database)
2) for home use, that doesn't do any network communication
3) that uses a simple, reliable, and appropriate SQL database
4) whose GUI is properly separated from the logic
5) that has c...
There are several useful answers on SO regarding prevention of brute forcing a password of a web service by applying throttling. I couldn't find any good numbers though and I have little expertise in this area, so the question is:
How many attempts does it usually take to brute-force an average password of 6 or more characters (with no ...
I have a list of objects with property id and parent_id.
I want to build a tree to link up those children and parents.
1 parent may have several children and there is an object which will be the ancestor of all objects.
What's the fastest algorithm to implement that?
I use C# as programming language, but other languages are also okay.
...
Should the people who analyse the output and results of an algorithm be aware of its design?
By analysis I mean finding cases where the algorithm failed and returned bad results.
...
I am building a demo dataset for my webapp. I would like thousands of "real looking" names. They should not be names of famous people or fiction heroes or names that will evoke associations. They should all have various and different sounding but realistic male and female names and surnames.
Birth dates and other data can be randomly ge...
I need to provide some indication of the way a value is changing between time periods.
This value could move in any of the following ways:
0 -> some positive value
some positive value -> 0
positive value -> larger positive value
positive value -> smaller positive value
I have initially looked at providing a % change value, however thi...
Are there techniques for this, or does it come down to the individual language and compiler?
...
I am required to implement a functionality similar to SO voting. I tried to look up some existing questions around this topic and noticed that most people are stuck with how to vote up and down. i am past that. my problem is related to how to handle after a vote has been upvoted. here is what i have done till now.
Vote up, Down and Sco...
If you are re-designing a system, and you are writing a SyRS for the re-designed version of the system, following IEEE 1233 how do you make backreferences to "the old design" and mention what was wrong with it?
I can think of 2 ways to do it:
The old system should be summarized outside the new SyRS, and the new SyRS should simply spec...
What is the name of the following method/technique (I'll try to describe the best I could, background on "memoization" is probably needed to understand why this technique can be very useful):
You start some potentially lenghty asynchronous computation and you realize that an identical computation has already been started but is not done...
I'm looking to calculate entropy and mutual information a huge number of times in performance-critical code. As an intermediate step, I need to count the number of occurrences of each value. For example:
uint[] myArray = [1,1,2,1,4,5,2];
uint[] occurrences = countOccurrences(myArray);
// Occurrences == [3, 2, 1, 1] or some permutation...
It's no secret that application logs can go well beyond the limits of naive log viewers, and the desired viewer functionality (say, filtering the log based on a condition, or highlighting particular message types, or splitting it into sublogs based on a field value, or merging several logs based on a time axis, or bookmarking etc.) is be...
What is a thread quantum, and how can I identify it on my system?
...
Inspired by http://xkcd.com/710/ here is a code golf for it.
The Challenge
Given a positive integer greater than 0, print out the hailstone sequence for that number.
The Hailstone Sequence
See Wikipedia for more detail..
If the number is even, divide it by two.
If the number is odd, triple it and add one.
Repeat this with the n...
I need to calculate permutations iteratively. The method signature looks like:
int[][] permute(int n)
For n = 3 for example, the return value would be:
[[0,1,2],
[0,2,1],
[1,0,2],
[1,2,0],
[2,0,1],
[2,1,0]]
How would you go about doing this iteratively in the most efficient way possible? I can do this recursively, but I'm int...
Would it be OK to put my public interfaces into their own package (for my organisation only).
for example
com.example.myprogram - contains all normal code
com.example.myprogram.public - contains public accessible interfaces
com.example.myprogram.abstract - contains abstract classes
Is this a good or a bad thing to do, are there any...