|
Too Poetic posted:This might be more of a math question but it's beyond me. I'm not even sure if it's possible. Start by building a program that finds solutions for just the first category. Then add checks for the later categories one by one.
|
# ? Jul 27, 2010 14:15 |
|
|
# ? May 31, 2024 21:34 |
|
Regular expressions (PCRE) question. Let's say I have a string like RRRABABABFF and the amount of ABs varies, but should always be AB and not BA or AA or AB or anything like that. Is there a way to match it without enclosing the AB in parens? /R+(AB)+F+/ matches properly, but captures the match which is unnecessary. /R+[AB]+F+/ will match properly, but will also match any number of As or Bs.
|
# ? Jul 27, 2010 18:26 |
|
Doctor rear end in a top hat posted:Regular expressions (PCRE) question. (search for clustering in perlre)
|
# ? Jul 27, 2010 18:52 |
|
Works perfectly, thanks. That's been bugging me for a while.
|
# ? Jul 27, 2010 18:58 |
|
SO I've tried to search online and failed to find what I was looking for, however I found a name for it. I'm trying to implement an algorithm that takes in n strings and finds the longest common substring for all n. My google searching has only found implementations that examine only 2 strings at a time. I have already attempted to use this type of algorithm and it doesn't work. Using my current method, lets say I look at three strings: SAF-Mendo Offs SAF-N Mendocin SAF-N Coast Of From visual inspection, one would expect to get "SAF-". However, I instead get 'N'. From my algorithm, after the first comparison, I get out "Mendo". I then compare that result to the next string and receive 'N'. I was wondering if anyone knew a good generalized algorithm or where I could find one.
|
# ? Jul 27, 2010 22:06 |
|
crazylakerfan posted:SO I've tried to search online and failed to find what I was looking for, however I found a name for it. I'm trying to implement an algorithm that takes in n strings and finds the longest common substring for all n. Summary: quote:- I found an algorithm (but won't tell you its name) Maybe I'm just being picky, but it would be useful if you told us the algorithm you are using and what you did to modify it and possibly your thought process.
|
# ? Jul 28, 2010 00:16 |
|
crazylakerfan posted:SO I've tried to search online and failed to find what I was looking for, however I found a name for it. I'm trying to implement an algorithm that takes in n strings and finds the longest common substring for all n. You basically have to perform the dynamic programming approach but extend your table to higher dimensions. http://en.wikipedia.org/wiki/Longest_common_substring_problem#Dynamic_programming Edit: Actually I take that back, the suffix tree approach on the same page seems much more effecient. I hadn't heard of it until now. Eggnogium fucked around with this message at 00:46 on Jul 28, 2010 |
# ? Jul 28, 2010 00:42 |
|
Does anyone remember how to program simple BASIC? I want to write a short program that allows one to input two numbers, i.e. 14356 and 14992 and it will print out a list of all the numbers from the first number to the second number. It sounds really simple, but my 17 year old self forgot BASIC sometime around 1989. Any help will be appreciated.
|
# ? Jul 28, 2010 21:03 |
|
Liquid Chicken posted:Does anyone remember how to program simple BASIC? code:
|
# ? Jul 28, 2010 21:56 |
|
can someone recommend me some kind of structured system for managing documentation for multiple projects? I've seen wikis used before like here http://wiki.slideshowpro.net/SSPfl/UG-UserGuide, and I know Adobe has a product (help robot? help bot? robohelp?) for structuring documentation. But I'd like something pretty turn key and preferably free. suggestions? Google kept seriving me results for 'document management software', which, while I do need one of those, was not what Im looking for today. The only relevant result was opendocman.com, which at the time of posting was down. Suggestions? edit: turns out robo help is for making knowledgebases and framemaker is for making documentation...
|
# ? Jul 28, 2010 22:36 |
|
Painless posted:
Thank you!!!!!! I'm using Just Basic which I found for free and the closest thing to ye olde basic of my ancient Kaypro PC. I'll be able to tweak that little program to create template lists for Ebay and Delcampe which I'll just copy and paste into a word processing program and play Mad Libs to fill in item specifics. The numbers relate to item numbers which are also used for photo links since I host my own. I sell things all philatelic and can tweak the program template as needed. To do it straight with Turbo Lister will drive one mad (awkward) and too easy to make errors. Again thanks! I was trying silly goto routines that made never ending crazy lists.
|
# ? Jul 28, 2010 23:04 |
|
Liquid Chicken posted:Thank you!!!!!! I'm using Just Basic which I found for free and the closest thing to ye olde basic of my ancient Kaypro PC. I'll be able to tweak that little program to create template lists for Ebay and Delcampe which I'll just copy and paste into a word processing program and play Mad Libs to fill in item specifics. The numbers relate to item numbers which are also used for photo links since I host my own. I sell things all philatelic and can tweak the program template as needed. To do it straight with Turbo Lister will drive one mad (awkward) and too easy to make errors. Again thanks! I was trying silly goto routines that made never ending crazy lists. Just curious why you chose to use BASIC.
|
# ? Jul 28, 2010 23:35 |
|
Modern Pragmatist posted:Just curious why you chose to use BASIC. Because it's simple, quick and free. I have no other use for it except to make my templates and I've never used any other form of computer programming software.
|
# ? Jul 29, 2010 01:37 |
|
Liquid Chicken posted:Because it's simple, quick and free. I have no other use for it except to make my templates and I've never used any other form of computer programming software. Doing anything more advanced than printing out a range of integers is going to be 10 times more headaches in basic than modern scripting languages like perl or python.
|
# ? Jul 29, 2010 01:41 |
|
tripwire posted:I thought you were interested in basic itself for some reason. If you just want a language thats simple quick and free you can do much better. Or put another way, its hard to do much worse than basic. Nah, that little 5 line program does exactly what I want and it's done. I'm not a programmer. I just want to create a list of my templates to sell stamps for ebay.
|
# ? Jul 29, 2010 10:30 |
|
Err, I'm not sure if this question has already been asked, but, generally speaking, if one were to consider getting into programming, is it a good idea to get an MS degree in computer science? Or is it better to get into it via certifications and job-training?
|
# ? Jul 29, 2010 16:25 |
|
I.. had no idea someone would seriously use BASIC for anything today Good thing that it worked, I guess
|
# ? Jul 29, 2010 16:58 |
|
Lamb-Blaster 4000 posted:can someone recommend me some kind of structured system for managing documentation for multiple projects? I've seen wikis used before like here http://wiki.slideshowpro.net/SSPfl/UG-UserGuide, and I know Adobe has a product (help robot? help bot? robohelp?) for structuring documentation. But I'd like something pretty turn key and preferably free. We use http://www.dokuwiki.org/ here where I work. It's not bad for creating stuff as you go along, but I don't know how good it would be at managing existing documentation.
|
# ? Jul 29, 2010 17:01 |
|
Mandals posted:Err, I'm not sure if this question has already been asked, but, generally speaking, if one were to consider getting into programming, is it a good idea to get an MS degree in computer science? Or is it better to get into it via certifications and job-training? If you want to "get into programming", grad school certainly isn't the way to do it. Sure, you can look at undergraduate CS programs, and if you were to continue on to get a M.Sc., there are certain jobs that will open up and/or treat the years you spent getting the second degree as job experience, but going back for a master's isn't the typical case for most software developers. Programming certifications are uniformly poo poo, but, even if you've got a degree in CS, on-the-job training is a huge part of becoming a seasoned developer. There's a big disconnect from industry and school that you can only really bridge by getting experience. That said, the best programmers I know are those who, by and large, learned on their own. This doesn't mean they didn't go to school or learn anything on the job as well, but they're the ones who were perpetually working on side projects, contributing to open source projects, and whatnot. (And, really, you don't know whether it's something you'll actually enjoy until you've put some time into it anyway, so before you run off to university to major in CS you've got no reason not to pick up a Python book or something yourself)
|
# ? Jul 29, 2010 18:04 |
|
Munkeymon posted:We use http://www.dokuwiki.org/ here where I work. It's not bad for creating stuff as you go along, but I don't know how good it would be at managing existing documentation. Awesome, thanks, I dont have much, if any documentation (which is why Im looking for a system), so that wont be a worry. update: I installed it and wrote a page, super easy, just what I needed! Lamb-Blaster 4000 fucked around with this message at 20:05 on Jul 29, 2010 |
# ? Jul 29, 2010 19:09 |
|
Anybody know much about the windows command prompt? I need to extract the name of the last folder in a UNC. Basically, I have an environment variable that specifies a full UNC path, for example "\\foo\bar\duh" and I need to save "duh" into another environment variable. The length of the UNC is potentially variable, I just always need the last folder. Is there a way to do this, preferably in a single line?
|
# ? Jul 29, 2010 19:32 |
|
Lamb-Blaster 4000 posted:can someone recommend me some kind of structured system for managing documentation for multiple projects? I've seen wikis used before like here http://wiki.slideshowpro.net/SSPfl/UG-UserGuide, and I know Adobe has a product (help robot? help bot? robohelp?) for structuring documentation. But I'd like something pretty turn key and preferably free. SHARE.POINT
|
# ? Jul 29, 2010 21:07 |
|
shoulda mentioned I need a free solution
|
# ? Jul 29, 2010 21:24 |
|
I'm making a raytracer and want to expand from just spheres to different primitives. So I'd like a superclass called Mesh and the subclasses like Sphere, Cube, Plane etc. At the moment I have a vector<Mesh> theMeshes and have added a Sphere object to it with theMeshes.push_back(Sphere() ). But when I try to access variables from the Sphere object in the vector the compiler tells me it's a Mesh and that it doesn't have the variables I'm trying to access. I tried googling but only found people talking about virtual functions but I want specific variables for the different subclasses, like spheres have a radius while cubes and planes doesn't. Here's what I'm trying to accomplish in pseudo code: code:
|
# ? Jul 29, 2010 22:19 |
|
Claeaus posted:Here's what I'm trying to accomplish in pseudo code: Do intersection should be a method in the Mesh interface, with each subclass providing its own implementation. So the inner loop would just be object->do_intersection(line).
|
# ? Jul 29, 2010 22:24 |
|
Ok, I've changed it so that I now have:code:
|
# ? Jul 29, 2010 23:03 |
|
Google "object slicing". Your vector contains copies of the Mesh subobject of everything you try to insert into it. You would get a diagnostic about this if you'd properly made Mesh an abstract class by having checkIntersection be a pure virtual method. Only references and pointers to objects can be polymorphic (i.e. can refer to objects of dynamic type different from their static type). You can't make a vector of references, so that leaves pointers; theVector should be a vector<Mesh*> or something similar.
|
# ? Jul 29, 2010 23:17 |
|
vector<Mesh*> seems to be working, thanks guys!
|
# ? Jul 29, 2010 23:33 |
|
With checkIntersection being marked as virtual in the Mesh class. This is what virtual does, it allows you to delegate behaviours to subclasses. edit: nm, seems you've got it.
|
# ? Jul 29, 2010 23:34 |
|
Lamb-Blaster 4000 posted:shoulda mentioned I need a free solution That's okay, I was kidding. Letting SharePoint into your environment is like being a bank manager and being coerced by your mother to let your crack addicted just out of jail cousin to sleep over in your bank vault.
|
# ? Jul 30, 2010 20:50 |
|
Is it possible to have XML schema as follows:code:
|
# ? Jul 30, 2010 22:09 |
|
Fitret: I forget the precise XSD syntax for it, but it sounds like you want a choice- something likecode:
|
# ? Jul 30, 2010 22:21 |
|
Internet Janitor posted:Fitret: I forget the precise XSD syntax for it, but it sounds like you want a choice- something like The documentation implies that choice means I could only do "add" or "remove" but not both. However, you are correct and this works - thank you!
|
# ? Jul 30, 2010 23:22 |
|
How do I escape a variable in a shell script? I'm using "$4" for a file name, but some of the file names have spaces etc in. How can I make the output for use in the command line either escaped or in quotes?
|
# ? Aug 1, 2010 04:28 |
|
I took some classes on Visual C++ back in 2006, and just recently, I decided to pick up the Visual C++ Express Edition just to putz around with, and I found out that instead of being the C++ I actually learned, it defaults to some kind of mutant "managed C++/CLI" language if I want to make a forms application. Is there a way to turn it back to normal C++?
|
# ? Aug 1, 2010 13:59 |
|
Well, Forms is a .net thing and C++/CLI is the extension that lets C++ talk to .net things directly. I guess you will have to tell visual studio you want to make a winapi project or something stupid instead.
|
# ? Aug 1, 2010 14:02 |
|
LittleBob posted:How do I escape a variable in a shell script? I'm using "$4" for a file name, but some of the file names have spaces etc in. How can I make the output for use in the command line either escaped or in quotes? Honeymoon posted:I took some classes on Visual C++ back in 2006, and just recently, I decided to pick up the Visual C++ Express Edition just to putz around with, and I found out that instead of being the C++ I actually learned, it defaults to some kind of mutant "managed C++/CLI" language if I want to make a forms application. Is there a way to turn it back to normal C++?
|
# ? Aug 1, 2010 15:21 |
|
Mustach posted:Which shell? Bash
|
# ? Aug 1, 2010 16:44 |
|
Doublequotes.code:
|
# ? Aug 1, 2010 17:40 |
|
|
# ? May 31, 2024 21:34 |
|
Bah. I can't think of the term for this kind of chart to look one up. I know I've seen interactive versions before, it's a tag-similarity kind of thing. Didn't really know where else to ask. The idea being that as you move from one node to another, nodes similar to that one pop up and you can just keep on navigating like that.
|
# ? Aug 4, 2010 19:16 |