7
votes
3answers
107 views

Compare string with wildcard string

I have the following function to compare a string with a wildcard string (containing ? and *), as C# doesn't seem to have a builtin function to do it. ...
6
votes
2answers
120 views

Tight loop, string manipulation and calculations

I'm working on some precompilation operations for a world compiler. Currently to identify flags placed by the level designer I need recognize when a specific entity exists at specific coordinates from ...
3
votes
1answer
50 views

What's your opinion on this approach to creating a repetitive string in Common Lisp?

I needed to have a Lisp function that could produce a string of a certain length, created by repeated concatenations of a another string given as argument (so for example by giving 10 and "abc" i ...
7
votes
3answers
102 views

Collect and calculate average times from log, then display top 10 longest durations

Here's a novel-length summary of the issue: I'm trying to write a VB.net program to help me collect remote site statistics from system-generated logs, but I'm a little like a carpenter who only knows ...
1
vote
1answer
107 views

Getting limited user input, with echo

I've written a code snippet that will get a (max.) 14 character string from the user input, and while the user is typing, simultaneously echo it out to the screen. It seems a bit long and ugly, so I ...
19
votes
6answers
1k views

How can I make this mess of Java for-loops faster?

I'm trying to find all the 3, 4, 5, and 6 letter words given 6 letters. I am finding them by comparing every combination of the 6 letters to an ArrayList of words ...
1
vote
1answer
113 views
5
votes
1answer
891 views

Efficient looping procedure to find the longest common substring

I retrieved 200 tweets using jersey API. I want to find two tweets which have the longest common substring. This is what I have ...
7
votes
2answers
2k views

Constant time string comparision in PHP to prevent timing attacks

I've been advised that when checking the password hash for a user I should use a string comparison function that always takes the same amount of time, to avoid timing attacks. So I wrote this: ...
11
votes
4answers
779 views

Different character outputs using loops and strings

I've just given this as a response to an absolute beginner on SO, and I'm wondering how terrible it is. Output for an odd number of lines: ...