![]() |
PHP Coders. $30 PayPal first Person who posts...
The code for an easy script.
Details. I need a script that will build a list of character strings and have these variables. & = any letter a - z @ = any number 0 - 9 So if I input &&& it would build a list that looks like. aaa aab aac aad ... ... zzz If I put @&& it would build a list that looks like. 0aa 0ab 0ac .... .... 9zz Also want to be able to add letters or numbers in combination with the variables. So if I put @89&& it would build a list that looks like. 089aa 089ab 089ac ..... ..... 989zz Doesn't need a fancy interface just tell me where I need to change inputs in the file and where to specify the output file and that's it. When you post leave your PayPal addy. As soon as I get it to work I'll send you payment. Feel free to bump :) |
you wan tot control how many you get in the list
|
I should add. The first person who posts working code that does exactly what I need.
|
Quote:
|
Bump!!!!
|
good luck on getting that for 30 I wouldnt waste my time doin that for 30 bucks sorry
|
Give me a minute
|
lotta code for 30 bucks
bump it to 100 |
PHP Code:
|
my thoughts exactly
|
Quote:
I keep hearing that. If it's alot of code how long would it take for someone to code it. In all honesty I figured someone would have had it posted by now. |
if no one calls on this i could make it. will take about 1h.
and by "any" you mean random, right? |
I read your post wrong, I listed code for an easy A-Z index. Haha, sorry. I will add the correct code in a minute
|
Quote:
I figured $30 was reasonable guess not. ICQ me if you want to do it 265054864 |
btw that "any" was confusing, its not any nor random, its from 0 to 9 & from A to Z
by your example |
Quote:
ok gotta load my icq 1 min |
Quote:
That's right. |
Quote:
|
just did a quick assesmnet and htis is a pretty complicated request for $30
|
holographs got it.
Thanks. |
damn good job man
|
Quote:
|
Quite a useful exercise: might give this as a problem to people we interview for coding jobs. Here's what I just knocked up - had 10 minutes to kill before the paper shop opens - just in case anyone else is in need of a similar morsel of code. No guarantees: it's worked a couple of times. Could be improved as well - the obvious one would be to have it cope with an arbitrary number of ?s and @s.
Dave <? // Template $template = "?0?@"; $fn = "/tmp/test"; // Work out limit variables $ll = array(); $ul = array(); $cp = array(); $ix = 0; for ($i=0; $i<strlen($template); $i++) { if (substr($template, $i, 1) hahahaha '@') { $ll[$ix] = 48; $ul[$ix] = 57; $cp[$ix++] = $i; } elseif (substr($template, $i, 1) hahahaha '?') { $ll[$ix] = 97; $ul[$ix] = 122; $cp[$ix++] = $i; } } // Output to file $fp = fopen($fn, "w"); for ($i0=$ll[0]; $i0<=$ul[0]; $i0++) { for ($i1=$ll[1]; $i1<=$ul[1]; $i1++) { for ($i2=$ll[2]; $i2<=$ul[2]; $i2++) { $template = substr_replace($template, chr($i0), $cp[0], 1); $template = substr_replace($template, chr($i1), $cp[1], 1); $template = substr_replace($template, chr($i2), $cp[2], 1); fwrite($fp, "$template\n"); } } } fclose($fp); ?> |
ok so i should still keep workin gon mine then, i just thought holographs was a damn super genious, i am going to get head bbl
|
Oh, for fuck's sake, the BBS software appears to have replaced = = (remove the space) with hahahaha in the if.. and elseif.. lines.
--Dave |
yes it take some time to think how to make this..:)
|
Quote:
|
Nice work Dave.
:thumbsup |
nice one dave.. :)
|
good job dave, hats off to you
|
Muff, thanks for the challage, it's a good exersise, my brains needed that.
You've got email. Dave, pretty close. |
Good job Dave, but I'm late :(
|
All times are GMT -7. The time now is 05:16 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123