|
furtheraway posted:I only want the numerals between the first parenthesis and the percent sign. That group can contain from one to three numerals. How do I extract it? code:
re_format(7) posted:Obsolete (``basic'') regular expressions differ in several respects. `|'
|
# ¿ Feb 29, 2008 01:16 |
|
|
# ¿ Apr 28, 2024 23:03 |
|
Appa Time! posted:
Reverse of the empty list is the empty list. Reverse of any list is taking the first element off, reversing the rest, and appending the first element back onto the end. When you try to reverse an empty list: (reverse ()), mylist is null so the return is () When you try to reverse one: (reverse (1)) is: append (reverse (rest (1))) (list (first (1))) rest (1) is () and first (1) is 1 which is append (reverse ()) (1) which is append () (1) which is (1). reverse (2 1) is: append ( reverse (rest (2 1))) (list (first (2 1))) rest (2 1) is (1) and first (2 1) is 2. append (reverse (1)) (2) reverse (1) is (1) from above, and (list 2) is (2) append (1) (2) which is (1 2).
|
# ¿ Mar 2, 2008 01:57 |
|
Can we get The book thread sticked? This is the second or third time we've had one now and it would be nice to keep one. Aside: I'm tempted to write a FAQ but really the only frequent question is "WHat Language should I learn?" Edit: I'm sure I meant to post this in the other sticked thread tef fucked around with this message at 18:06 on Mar 4, 2008 |
# ¿ Mar 4, 2008 13:02 |
|
N.Z.'s Champion posted:This is a bit of a weird question but what programming languages use :: (double colon) as part of their syntax and for what? Info on any language would be appreciated, particularly if the syntax has different uses. http://merd.sourceforge.net/pixel/language-study/syntax-across-languages.html
|
# ¿ Mar 4, 2008 13:05 |
|
csammis posted:And the answer is "don't bother asking because you won't listen anyway" "Who needs a project to learn a language when I can post a thread to ask moot questions" tef fucked around with this message at 17:33 on Mar 4, 2008 |
# ¿ Mar 4, 2008 17:26 |
|
The Practice of Programming by Kernighan and Pike is an excellent tome on style and methodology. It's short, concise and well written. A very accessible book with broad coverage with summaries at the end of each Chapter. http://plan9.bell-labs.com/cm/cs/tpop/ If anything you will gain most experience from reviewing your own code and others, and asking people to do the same for your code (don't forget to write more code). A book will encourage you to think in a good way, but it will take time for the new practices to become standard. P.s. feel free the resurect the last book thread
|
# ¿ Mar 11, 2008 17:22 |
|
You might be better off using \(\[^'\]\) over .*. \[...\]is a character class, so \[abc\] matches a,b, or c. \[^...\] is the negation, so \[^abc\] matches anything but a,b, or c.
|
# ¿ Mar 28, 2008 10:32 |
|
6174 posted:What I'm looking for is numbers that look like XXXX.YYYY (with the . and Y optional) that are not of the form XXXX.YYYYDZZZ. This seems to work for me: /(\b(\d{1,4}(?!\.)|\d{1,4}\.\d{1,4})(?!D\d{3})\b)/ Although you may want: /(\b(\d{4}(?!\.)|\d{4}\.\d{4})(?!D\d{3})\b)/ code:
|
# ¿ Apr 2, 2008 17:57 |
|
poofactory posted:Hopefully someone can give me an answer. I know perl isn't the most popular language right now. You realise that "Amount" is a string and "$Amount" is the string containing the variable $Amount ? I would suggest continuing this over in the perl thread here
|
# ¿ Apr 2, 2008 18:00 |
|
Chiming in with the whole "You can write bad unreadable code in any language" point. I would recommend the shell if you were on a unix machine, as it is perfectly capable of small text processing tasks. Do what bonus says and go and look at some examples and pick one. Really the advantages and disavantages between the choices of ruby, perl and python are trivial at best for the tasks you want.
|
# ¿ Apr 2, 2008 23:25 |
|
Why don't you two take this outside and settle this like real programmers ?
|
# ¿ Apr 3, 2008 15:57 |
|
nbv4 posted:I have a form on a webpage that has like 50 checkboxes. I'm using a javascript function to validate the form. I'm trying to formulate an IF statement that returns true if there are more than one of those boxes checked. Put an on change in each checkbox - when it is set add one to a total, and when it is unset substract one. The form is valid if the total is greater than one?
|
# ¿ Apr 5, 2008 11:02 |
|
What you are looking for is called 'Sniping software'
|
# ¿ Apr 10, 2008 10:42 |
|
It is a pretty similar mode of operation: Refresh until conditions are met, then execute an action. Another thing would be to look at macros for web browsers.
|
# ¿ Apr 10, 2008 10:49 |
|
It is an in-place O(n) shuffle when implemented correctly, so finding something faster might be a challenge. Why are you shuffling the table?
|
# ¿ May 7, 2008 17:32 |
|
You don't own the root directory, and so you can only put the file uploader in a subdirectory.
|
# ¿ May 16, 2008 16:04 |
|
If you are trying to pick the toolset to learn so as to aid your course in industry, pick the buggiest, most frustrating toolkit you can find. The patience you develop will be a useful skill.
|
# ¿ May 30, 2008 19:24 |
|
Atltais posted:What's the easiest way of getting the terminal type from a remote client in a telnet session? the TERM variable, try echo $TERM, however many terminals lie.
|
# ¿ Jun 3, 2008 03:55 |
|
Vanadium posted:10:44 -!- 1 - #cobol: ban *!*@synIRC-F5376B42.mibbit.com [by rocketsauce, 14847 secs ago] Unbanned now. We should use the (eugh) unreal extentions to ban people by whois info for mibbit clients.
|
# ¿ Jun 18, 2008 09:49 |
|
fankey posted:([\w.]+|"[^\"]*") . means every character, so '"toot toot"' would match as '"toot', and 'toot"'. You might want something like [^"]\S+|"[^"]+" to be a general case - match either someting that doesn't start with " followed by non whitespace characters, or " followed by anything that isn't a " then a final ".
|
# ¿ Jun 26, 2008 01:58 |
|
fankey posted:Is there something I'm missing? No, I'm missing something - . means match everything, but when it is in a character class it just means period, i.e \. is the same as [.]
|
# ¿ Jun 26, 2008 09:01 |
|
Geno posted:this is probably a stupid question but what do you guys think are better for programming: macs or PCs? If you are writing mac software, macs. If you are writing windows software, pcs. Why not ask this in sh/sc as I am sure this sensible question will get a sensible answer. Beyond that I think the answers are in the realms of personal preference. I would suggest avoiding anything with Vista
|
# ¿ Jul 14, 2008 08:44 |
|
Scaevolus posted:Silly tef, an open ended question is clearly a plea for personal opinions and anecdotal evidence. So - how do you pronounce Mac OS X, do you say ecks or ten ? Can we at least have one thread where we don't derail it into moot arguments about trivialities? (probably not)
|
# ¿ Jul 14, 2008 09:09 |
|
Ugg boots posted:If the original poster still thinks this is a good question, can we move it to a thread.
|
# ¿ Jul 14, 2008 17:35 |
|
Div posted:to quickly and easily make nice diagrams There is always xfig Have you thought of emailing the guy you mentioned to ask him what he uses? tef fucked around with this message at 14:35 on Jul 16, 2008 |
# ¿ Jul 16, 2008 14:33 |
|
Hidden surface determination ?
|
# ¿ Jul 29, 2008 16:58 |
|
If you're using python - lxml will do xpath over html. It's pretty awesome.
|
# ¿ Jul 31, 2008 18:03 |
|
It seems it is something that doesn't handle Cross Site Scripting Errors: http://www.virginradio.co.uk/vip/index.html?msg=%3Cscript%3Ealert(document.cookie)%3C/script%3E&action=login&url=&username=&email= Aside: The server is clamining to be "apache" without a version string, which does suggest it might not be apache. Although the date on this page is http://www.virginradio.co.uk/event/333 unix epoch, so it might be on a unix system. (it says 1 am because it is midnight in gmt :3) Also, one of the subsections is hosted on another domain which uses asp.net Ooh, another XSS: http://www.virginradio.co.uk/about_us/for_your_site/email.html?url=--%3E%3C/script%3E%3C/textarea%3E%3Cscript%3Ealert(document.cookie)%3C!-- tef fucked around with this message at 00:53 on Aug 1, 2008 |
# ¿ Aug 1, 2008 00:38 |
|
On a complete aside, we set up a last.fm group http://www.last.fm/group/cobol
|
# ¿ Aug 14, 2008 09:50 |
|
more falafel please posted:The XOR trick is not an optimization, it's a trick. I did this to annoy my tutor in CS1. He retaliated by making me explain it to the rest of the group. The group who were told to chant "public static void main" as he had abandoned all hope of getting them to be able more than one question.
|
# ¿ Aug 26, 2008 16:30 |
|
Scaevolus posted:How long did it take for them to understand the binary representation of integers? A while, or at least they were good at nodding. Suprisingly enough from first principles most of them were able to follow the explanation -- although I doubt much of it made it's way into their memory. On the other hand, chanting "public static void main" is going to stay with me for a while.
|
# ¿ Aug 26, 2008 16:38 |
|
outlier posted:I'm casting about looking for a suitable cross-platform installer Mac applications tend to come stand alone - you drag Application.app into /Applications Installers aren't very popular.
|
# ¿ Aug 29, 2008 12:16 |
|
On a complete aside: If you are curious about joel atwood and jeff spolsky's latest adventure 'stackoverflow', but not enough of a rockstar to get in the beta, fear not: Go to: http://beta.stackoverflow.com Change your cookies - type this into the address bar: javascript:alert(document.cookie="soba=-9999999"); (any big negative number seems to work) And then go back to: http://beta.stackoverflow.com and refresh! Volia! tef fucked around with this message at 17:57 on Aug 29, 2008 |
# ¿ Aug 29, 2008 16:55 |
|
JawnV6 posted:Thank god, with this sort of crucial information I can finally ditch experts exchange. http://beta.stackoverflow.com/questions/35185/finding-a-single-number-in-a-list#35190 quote:Memory isn't always free, you know, so just because your time complexity is O(N) and mine is O(N*lgN) it doesn't mean that yours is better.
|
# ¿ Aug 31, 2008 13:42 |
|
Vanadium posted:Now if only someone would take all the cool features and put them into a useful language. Man C++ needs a seperate symbol table for functions and variables.
|
# ¿ Sep 16, 2008 22:08 |
|
CryptoDerk posted:Alternately, I could do this in Perl. I'm less familiar with Perl, but I can do the regexp stuff. If you pick perl: http://search.cpan.org/dist/WWW-Mechanize/lib/WWW/Mechanize.pm
|
# ¿ Oct 2, 2008 10:23 |
|
It depends what you're learning from. If you are constantly hitting a wall it might be that your learning technique and materials aren't suited to you, or that you are trying to learn too quickly. Learning doesn't normally get easier - it still requires a lot of work, patience and thought in any subject - but once you have the fundamentals nailed down, you don't have to learn as much to understand things. What I would suggest is: Be a little more patient - if it takes you longer to understand something you may well come away with a better understanding of it. Try different materials - look for slides, video lectures, books, exercises to learn from instead of just one source of information. You may find that learning from one is prefferable to the others. Talk to other people - you could ask for help in this forum rather than asking for reassurance.
|
# ¿ Oct 8, 2008 12:12 |
|
http://uk.php.net/function.parse-url Also PHP Thread: http://forums.somethingawful.com/showthread.php?threadid=2802621
|
# ¿ Oct 14, 2008 23:46 |
|
ZorbaTHut posted:Here's a wacky question. I would suggest the following things in order:
Does this help any - I remember this being at a codecon: http://www.geekness.net/tools/aura/ Can't you just rely on the network layer to provide anonynimity )and what is your threat model for it anyway)?
|
# ¿ Nov 8, 2008 11:33 |
|
|
# ¿ Apr 28, 2024 23:03 |
|
ZorbaTHut posted:World of Warcraft. Yeah, I'm a geek. quote:I want a system where people can rate other players up or down based on their skill. How will you deal with cycles ? quote:I'm failing, and I'm not sure it's possible, but I'd feel more comfortable if I could somehow prove it was not possible. If it's distributed, then it's public. There might be some really really smart ways around this, but you're just raising the bar for attacks. quote:Right now it's mostly annoying me. Technical solutions to social problems often work out this way.
|
# ¿ Nov 9, 2008 20:38 |