560 Posted Topics
Re: Regex's anyone? from re import search, I from os import listdir print [f for f in listdir('.') if search("\.py$|\.txt$", f, I) != None] | |
Re: > The only reason people still use Fortran or Cobol is because of inertia. Most buisinesses use cobal due to inertia. It's what they have been using, and it's what they're comfortable with. The problem with cobal is it's a terrible language - and the people who write cobol often … | |
Re: > Write a java application We're not going to do it for you. | |
Re: This is dependant on a number of things, but from [this](https://developer.apple.com/library/mac/qa/qa1419/_index.html) it looks like you can just flag the linker. May I ask why you're trying to change the stack size? Generally speaking, there is a way around increasing the stack size. | |
Re: In unix, http://stackoverflow.com/questions/3324619/unix-domain-socket-using-datagram-communication-between-one-server-process-and Except your using PF. | |
Re: So what have you written already? What are you having trouble with? | |
Re: I have no idea either. Quick search though the standard: According to ISO/IEC 14882:2011 section 24.4.4.2: 23.4.4.2 map constructors, copy, and assignment [map.cons] explicit map(const Compare& comp = Compare(), const Allocator& = Allocator()); 1 Effects: Constructs an empty map using the specified comparison object and allocator. 2 Complexity: Constant. Ah. … | |
Re: One thing: Using a salted hash alone isn' nearly enough. For the sake of other peoples security, please please please don't roll out your own, unless you know what your doing, and you have people review it. Use a [Key Derivation function](http://en.wikipedia.org/wiki/Key_derivation_function) that an experienced cryptographer made for you. Examples … | |
Re: I found that [Twitters Bootstrap](http://getbootstrap.com/) takes a lot of the work out of some of the messy stuff from html/css, and makes modern looking web interfaces. You can use this in addition to a backend framework. In addition to the frameworks mentioned above, there is also django to consider. EDIT: … | |
Re: First off, I feel like your going into the Advanced Startup options in Windows XP instead of the bios boot screen. First just try to boot from the cd directly (by going to your bios with F1 F2 F10 F12 Esc Del, one of those usually works), and choosing the … | |
Re: Welp. An `int` can only hold integers. So, can you guess what happens when `Y = (1 / 60) * M` runs? What about lines 17 and 18. Use doubles instead, and see what happens. | |
Re: First off, I'm not an expert at GIL. I'm basing what I say based off of what I see at [here](http://stlab.adobe.com/gil/html/group___t_i_f_f___i_o.html). I don't see an option to look at a page in a tiff. Why don't you take a look at [libtiff](http://www.libtiff.org/), I found it in a quick google search. … | |
Re: Python is nice. It has very clean syntax, and it is actively used in many fields. (Making apps, say with [kivy](http://kivy.org/), or say scientific and numeracle computing with the scipy stack, web development with, say django, or even system programming just by itself). This one probably most fit's your criteria. … | |
Re: First off, this has nothing to do with set theory, or set's for that matter. A set contains one of each element, and order is not relavent. (Ie, the set of real numbers, or the set of dvd's you own). Second off, I have no idea what's going on with … | |
Re: a is initialized as a b e 0 1 2 An easy way to visualize `a[2:2]` is to consider `a[2:3]`, which references `['e']`. Thus, `a[2:2]` refences the empty list before 'e'. Setting `a[2:2] = ['c', 'd']` inserts c&d after 'b', giving the final result of: `['a', 'b', 'c', 'd', 'e']`. … | |
Re: Keep in mind that 'c' is just a language. Computer Science leans towards algorithms and analysis that don't depend on any languages. So, simply put, there are two logical directions for you to go: 1. Learn more languages, and paradimes. You mentioned you might do OOP and some low level … | |
Re: This is a very inefficient way to do it. Instead of continuously checking if a button is pressed, you should "do something" ONLY when the button is pressed. What are you using to draw your button? If your using swing, use an ActionListener to print "connected". There's an example [here](http://www.tutorialspoint.com/swing/swing_jbutton.htm). … | |
Re: First off, DeadNeighbors seems useless and redundant. Unless I'm missing something at a glance, it's exactly the same as LiveNeighbors. So, get rid of it. -- Now, let's slow down and consider lines 85 to 89: if (life[row][col] == true && life[row][col-1] == true && col-1 >= 0) { neighbors++; … | |
Re: I've just skimmed through your code, and theres some problems. First off it's interesting to note that "Brennan Flory" and "Michael Leto" apperently have identical code, other then the names on top. Second, you don't need to have the ".h" at the end of your includes. Down to your second … | |
Re: > @AD What does line 7 do? I have never seen that. He probably intended `while (myfile.getline(line,','))`. > i can't get your while loop .. its giving an error 'An error' isn't helpful information. Which error? | |
Re: Yes, you will need two loops if you want to be able to shoot repetitively; the outer one is your event loop, and the inner one is for animating the shot. You have the right idea for where you should put the loop; inside your if statement. I have no … | |
Re: Try reading the array backwards until you hit something that isn't -1. Create a new array of the appropriate size, and read everything up to that point into it. | |
Re: Well, since you already have a method of archiving your folder into a file, you can just read it into the [JCA](http://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html) and write it to a file. | |
Since trivial problems bore me, I thought I might make a weekly programming challenge for a bit of fun. Sometimes I find it fun to solve a problem, and compair it to other peoples solutions. Let me know what you think about the idea (if you like the idea, if … | |
Re: Disclaimer: I'm not familiar with the acl2 dialect. Your answer seems too complicated. Clearly, your base case is `(if (< (len xs) 2) #t ...)`. That is saying, if your list has 1 or 0 elements, return true (I'm not sure if it's #t in acl, but you get the … | |
| |
Re: [URL="http://www.youtube.com/watch?v=59ZX5qdIEB0"]Listening to what ever this is.[/URL] | |
Re: Epiphany (gecko) with plugins, bascly a smaller firefox. It works great with the aspire one! :) | |
Re: Uhh... Awsome geek, geek of all trades, geek on a aspire one :) | |
Re: This is the second time this old thread came back to life. Let this thread RIP! Use code tags, don't use conio.h, there is no int infront of your main and don't post code without OP doing any work! | |
Re: Wait, is it multiplication like your title says, or is it addition? How many polynomial's will their be? If there are only 2 polynomial's and you want to add: Load monomial's into list 1 (store coefficient and vairable) for polynomial 1. Do the same in another list for polynomial 2. … | |
Re: Project in linux? Make a compiler for linux.. Even better, make a cross platform compiler that uses a portible assembler. That seems somewhat perfect for you (low level). But really, you don't know what the *nix's are? There only used for... about every magor computing field there is! You need … | |
Re: You don't have any divide's in there. You can't just use modulo for the whole thing. Also, you forgot to read the number backwards. | |
Re: I found [URL="http://www.youtube.com/watch?v=6AZNeiq2e90"]this[/URL] interesting. It's about Stephen Harper (Canadian government). | |
Re: >[COLOR="Red"]You can't do a gotoxy function in pure C, you'll have to read into the O/S dependent libraries for your system (I don't know what that is)[/COLOR] gotoxy() doesn't have much to do with os dependancy. It's a function that is not part of C, so many compiler's do not … | |
Re: Well, here's the pattern: Start with 1. 1) Put a zero infront of the current number. 2) Invert the number. You can do this with a linked list, or a variable length array. If you want to make it faster, instead of inverting the whole container, just invert what you … | |
Can anyone help me with doing problem 12 on project euler? The question is asking which triangle number has more than 500 factors. The first few triangle numbers are: 1, 3, 6, 10, 15, 21, 28 ... Hope you understand the pattern, cause a can't explain it in words vary … | |
Re: Okay... Plan out your function first! Look at your scanf in createArray(). What element are you writting to (over and over again)? Look at your displayArray(). Why do you need to print "This is our array to sum:" over and over again? Take it out of the loop. Also note … | |
Re: Use MS Bing instead of google... Hahahahahahahahaha.:twisted: And what? Let [URL="http://www.kmfms.com/whatsbad.html"]Microsoft[/URL] kill another market? No chance. Let's put it this way. Microsoft kills markets by using it's OS dominence and unfair buisiness practices. Becouse they have an OS dominance, they can convince people that their programs are always better. After … | |
Re: [URL="http://www.cplusplus.com/reference/clibrary/ctime/"]time.h[/URL]. Look at the example on difftime(). | |
This code snipplet will find the placement of each letter in a array(string), from another array(character set). For example: the input would be something like this: string[256] = "gfdc" chrset[256] = "abcdefg" and the output would be: num[256] = 6, 5, 2 and 3 | |
Re: When you post code, use code tag's like so: [B][noparse][code=C][/noparse][/B] <code here> [B][noparse][/code][/noparse][/B] [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/qsort/"]qsort()[/URL] is what your looking for. | |
Re: How do you fit a a name and an email address in char's? You probably want: [icode]char studName[256];[/icode] and [icode]char email[256];[/icode]. To be safe against buffer overflow's, use fgets() to get the strings. Good luck. | |
Re: What do you mean by version 3 C? There are only 2 versions made by ANSI/ISO; C89 and C99. Anyway's, what compiler and operating system are you using? What is the exact error message? Does it do this for all code, or only some specific code? If the former, you'll … | |
Re: Yeah, you never returned anything out of main. After "Run Calculator Again? (y/n)" is printed, the program immediatly exits. This is becouse there is newline left in your buffer. Use getchar() to eat it up. I do not have to press enter twice at any part of your program. It's … | |
Re: I don't understand what the problem is, can you be more specific? Where about's in the code are you talking about? | |
Re: Just a guess, but the assembly stage would probably be used for computing the location of lables and such. It would be more efficiant to compute them at this stage than cumputing them from higher stage's. Also it probably add's flexibility to the entire gcc. | |
Re: Replace [icode]wordoffset = -1;[/icode] with [icode]wordoffset--;[/icode]. :P | |
Re: >[COLOR="Red"]The problem is how write the codes using all functions such as if else statements,switch and ext..[/COLOR] You need to learn the [URL="http://www.cprogramming.com/"]basics[/URL] befor you can do this problem. |
The End.