|
litghost posted:Could getting the map output help here? It would at least tell you which module it is in. Dijkstracula fucked around with this message at 01:55 on Jul 18, 2010 |
# ? Jul 18, 2010 01:53 |
|
|
# ? May 16, 2024 18:26 |
|
Not sure if this is the right thread, but how can I write a script which initialises a new screen session, creates 3 separate sessions within screen, and then runs a certain program in each of the sessions? If a screen session already exists then a script like code:
Nodrog fucked around with this message at 04:31 on Jul 18, 2010 |
# ? Jul 18, 2010 04:19 |
|
Nodrog posted:Not sure if this is the right thread, but how can I write a script which initialises a new screen session, creates 3 separate sessions within screen, and then runs a certain program in each of the sessions? If a screen session already exists then a script like You could try using pidof or pgrep to see if there is a running session, and start one if necessary. mr_jim fucked around with this message at 04:39 on Jul 18, 2010 |
# ? Jul 18, 2010 04:37 |
|
Thanks, but I mean how do I start a session of screen so that it runs in the background, so I can send commands to it? "screen &" doesnt work. Also I've just realised the way I was sending commands to an existing screen session doesnt work properly either. Lets say I want to run a copy of R (a programming language) in a new screen session. Then I can do "screen -X screen R" and it works fine. But if I want to start up R with some command line arguments like "screen -X screen R < script.r" (which is meant to start R and execute script.r) then it doesnt work. Ive tried screen -X "screen R < script.r" and that doesnt work either. Im guessing the < character is breaking it?
|
# ? Jul 18, 2010 05:24 |
|
Nodrog posted:Thanks, but I mean how do I start a session of screen so that it runs in the background, so I can send commands to it? "screen &" doesnt work. From looking at the man page, "screen -d -m" will do what you want. I'm not sure about the second part of your question. For what it's worth, tmux seems to be more amenable to scripting. This page has an example of starting a session, creating windows, and starting commands from a script. If tmux is available on your system, or you can install it, it might be worth looking in to. mr_jim fucked around with this message at 13:49 on Jul 18, 2010 |
# ? Jul 18, 2010 13:25 |
|
Hey guys, I was wondering where I could find some programming exercises for someone who's had a few college courses in programming but hasn't taken any courses in it since then and wants to get back up to speed and get better at various languages. I've had Intro, Discrete Math, and Data Structures, all passed with B+'s or higher, but I stopped because a medicine I was taking kinda put me in a fog and made it harder to work on math and logic. I'm thinking of possibly getting a minor in CS to get background in case I want to work as a programmer (I would try to get an MS in this case), or in case I just wanted to keep programming as a hobby. The short version is I'm looking to pick programming back up and need some things to do. Also, I'd like to learn some GUI frameworks if there's anything on those (Cocoa, GTK+, etc.). Thanks!
|
# ? Jul 20, 2010 22:44 |
|
Look Around You posted:Hey guys, I was wondering where I could find some programming exercises for someone who's had a few college courses in programming but hasn't taken any courses in it since then and wants to get back up to speed and get better at various languages. I've had Intro, Discrete Math, and Data Structures, all passed with B+'s or higher, but I stopped because a medicine I was taking kinda put me in a fog and made it harder to work on math and logic. I'm thinking of possibly getting a minor in CS to get background in case I want to work as a programmer (I would try to get an MS in this case), or in case I just wanted to keep programming as a hobby. After that, maybe try some problems at https://www.projecteuler.net. It's a bunch of math problems that you solve by programming.
|
# ? Jul 20, 2010 23:23 |
|
Another place to look is TopCoder. They have an incredible array of varying difficulties of coding problems and you can solve them with Java, C# or C++. They also have competitions, if you like that sort of thing.
|
# ? Jul 20, 2010 23:57 |
|
I don't know if this is the right place to be asking this, but Google recently updated their image search to use some crazy new interface that I'm not used to. The old interface is still available but you have to scroll all the way to the bottom of the results (all of the results) and click "Switch to basic version" to access it, and then it only lasts until you navigate away then you have to click it again. What how does this relate to programming? Well I was hoping someone could help me out with a greasemonkey script to do this automatically. I don't know anything about greasemonkey so I wouldn't know where to begin.
|
# ? Jul 21, 2010 05:08 |
|
Look Around You posted:Hey guys, I was wondering where I could find some programming exercises http://code.google.com/codejam/contests.html and http://www.facebook.com/careers/puzzles.php have a bunch of not-so-trivial problems to solve, maybe they are fun! quote:Also, I'd like to learn some GUI frameworks if there's anything on those (Cocoa, GTK+, etc.). I think the best you can do here is working through their non-reference documentation (like the free Gtk+ "book"), then imitating how other people do things in the framework.
|
# ? Jul 21, 2010 14:20 |
|
Vanadium posted:http://code.google.com/codejam/contests.html and http://www.facebook.com/careers/puzzles.php have a bunch of not-so-trivial problems to solve, maybe they are fun!
|
# ? Jul 21, 2010 14:48 |
|
Gtk+ is the only gui framework that does not make me tear my hair out five minutes into it. It takes at least half an hour or so.
|
# ? Jul 21, 2010 16:04 |
|
Is there any way to access the itunes Applescript reference without having a Mac with itunes installed available? I'm assuming the Windows version doesn't include this but I can't find it in anywhere else and it would be the most useful thing.
|
# ? Jul 21, 2010 17:06 |
|
Vanadium posted:Gtk+ is the only gui framework that does not make me tear my hair out five minutes into it. I guess the grass is always greener... gtk is what I am stuck using at work, and I hate, hate, hate it. Do you do everything by hand? The glade app is mediocre, amateur, barely-functional toy software.
|
# ? Jul 21, 2010 18:20 |
|
I honestly do not do much with it and can see how it is a great deal inconvenient, and no, I do not like glade either. I like the gtkmm API and most other language bindings a great deal more than other frameworks', and Gtk+ seems to do a bunch more plumbing for me like properly layouting poo poo or dealing with fonts and whatnot.
|
# ? Jul 21, 2010 18:40 |
|
I use Glade constantly and love it. It's spoiled me on other GUI frameworks because seriously, gently caress laying out all of my widgets using code, I have better things to do, like writing the actual program logic.
|
# ? Jul 21, 2010 22:24 |
|
ToxicFrog posted:I use Glade constantly and love it. It's spoiled me on other GUI frameworks because seriously, gently caress laying out all of my widgets using code, I have better things to do, like writing the actual program logic. [*]It crashes, it vomits gtk errors and warnings all over the console, it's painfully sluggish, half the time it flat-out refuses to let you select widgets by clicking on them, the UI is (irony!) sloppy and kludgy and inconsistent, it lacks trivial but useful features, signal autoconnect is a cruel joke, it makes many common tasks needlessly complicated... ...and don't even get me started about glade-2 (which I am still stuck using on a few platforms) where such exotic features as "cut and paste", and "undo" never actually functioned at all. Like I said, it's toy software, akin to some undergrad team project, and similar in quality. BigRedDot fucked around with this message at 02:45 on Jul 22, 2010 |
# ? Jul 22, 2010 02:37 |
|
Oracle/Site Studio/FCKeditor question I have a client that I believe wants me dead. Today my they sent me the following message: batshit insane client posted:I need you to make a customization to the FCK editor to add an option list that produces an idocscript service call. Honestly guys, I don't know what the gently caress here. I'm cool with Oracle and Site studio, buzzing right along there. But out of nowhere I'm hit with a request to modify poo poo I just enduse. Should I: a) Ask for help on the forums b) Tell the client it's out of my league c) Tell the client I'll do it for $??? then farm it out? d) Ask you guys what resources I need to learn how to do this, I'm feeling a little from column "a" and a little from "d".
|
# ? Jul 23, 2010 00:21 |
|
Why do I get error: ‘ifstream’ was not declared in this scope error: expected ‘;’ before ‘infile’ with this code: code:
Edit: Fixed it Claeaus fucked around with this message at 15:04 on Jul 23, 2010 |
# ? Jul 23, 2010 14:47 |
|
Claeaus posted:Why do I get I think it's because ifstream is not fstream.
|
# ? Jul 23, 2010 14:50 |
|
baquerd posted:I think it's because ifstream is not fstream. ifstream is in fstream. But you can't forget using namespace std!
|
# ? Jul 23, 2010 15:04 |
|
Just use std:: everywhere, then you do not have to remember to put the using thing elsewhere.
|
# ? Jul 23, 2010 15:09 |
|
Vanadium posted:Just use std:: everywhere, then you do not have to remember to put the using thing elsewhere. Just modify your fstream header and add the using statement there!
|
# ? Jul 23, 2010 16:18 |
|
Ugg boots posted:Just modify your fstream header and add the using statement there! Please don't suggest this within earshot of my coworkers.
|
# ? Jul 23, 2010 18:40 |
|
I need to navigate a folder structure that looks like thiscode:
Right now I am using VBScript and it works pretty much alright. I can get this to work by opening the image in the default image viewer and then popping up a message box. What I want to do is have the image open up next to the yes/no option. Like this: code:
|
# ? Jul 24, 2010 07:37 |
|
Two questions. The first is basically to be pointed in the right direction for getting a better than basic understanding of html and css. I've been through the W3 stuff but need some more. Second, because the excel thread requires archives I'm generating a report from google analytics which requires me to build a data sheet so the eventual report can look nice for the people who read it. The reporting on the adwords campaigns (or really anything else that might come up similar) will change size as different campaigns are added. Is there a way to automatically adjust for new rows in the data table to display in my actual report sheet? As it stands it's no problem if the current table decreases in size, I don't know how to adjust for larger rather than just adding space in my current sheet in case things show up there.
|
# ? Jul 24, 2010 07:38 |
|
transient posted:The first is basically to be pointed in the right direction for getting a better than basic understanding of html and css. I've been through the W3 stuff but need some more. You've read http://www.w3.org/TR/html4/ and read http://www.w3.org/TR/CSS2/? If you've read them already, then make some webpages.
|
# ? Jul 24, 2010 23:34 |
|
I am aimlessly trying to teach myself Perl and/or Python, mainly because I'm bored. I have extremely basic knowledge with programming in general. I've decided on a project I can work towards other than a 'number guessing' game. I want to create a program that will look at a website for upcoming DVD releases, pull the names of the new releases and send them to me in an email. Could somebody point me in the direction to try and achieve something like this? What topics or subjects would cover this type of program? Would it be simpler with perl or python, considering I'd have to teach myself how to do it with either language. *If what I'm trying to do is way too complicated for a beginner, let me know.
|
# ? Jul 25, 2010 19:42 |
|
Hughmoris posted:I am aimlessly trying to teach myself Perl and/or Python, mainly because I'm bored. I have extremely basic knowledge with programming in general. I've decided on a project I can work towards other than a 'number guessing' game. WWW::Mechanize Email::Sender Shouldn't be too bad at all
|
# ? Jul 25, 2010 19:46 |
|
Otto Skorzeny posted:WWW::Mechanize Thanks for the links. WWW::Mechanize looks intimidating as hell but I think I can handle the Email::Sender. I was just toying with Python and I figured out how to open up the website and write all of its contents to a text file. I'll see if I can use Perl to search the text file for a specific string format like: [code] <a href="/dvd/DVmfGsqoQVoWqq"><img src="http://c0181311.cdn.cloudfiles.rackspacecloud.com/DVmfGsqoQVoWqq_2_s.jpg" width="125" height="178" alt="Sutures" title="Sutures" /></a> [code] Then print whatever is between the quotation marks following alt= Hughmoris fucked around with this message at 20:54 on Jul 25, 2010 |
# ? Jul 25, 2010 20:35 |
|
Hughmoris posted:Thanks for the links. WWW::Mechanize looks intimidating as hell but I think I can handle the Email::Sender. I was just toying with Python and I figured out how to open up the website and write all of its contents to a text file. Now, the title of the movie can always be found in the text file in this format: If you are more comfortable with python, my recommendations are twill and pyquery. Twill itself is just a wrapper around mechanize's functionality and will take care of things like logging into the website, saving cookies if need be, submitting forms and that kind of thing. You can call twill's get_html method and feed the results into pyquery to enable you to manipulate the contents of the page easily. With pyquery, finding the alt text for an image could look like this: code:
|
# ? Jul 25, 2010 20:50 |
|
tripwire posted:What youre talking about sounds fragile. Thank you for the input and example. I'm really not comfortable with any language. I can manage loops and conditional statements for both at the moment, thats about it. I will definitely look at twill and pyquery though.
|
# ? Jul 25, 2010 20:59 |
|
Hughmoris posted:Thanks for the links. WWW::Mechanize looks intimidating as hell but I think I can handle the Email::Sender. I was just toying with Python and I figured out how to open up the website and write all of its contents to a text file. I'll see if I can use Perl to search the text file for a specific string format like: WWW::Mechanize is very featureful, which makes it look more complex than it is. If you search on the CPAN search site, you'll find a package full of examples of its use. Additionally, although Perl has the best support for regular expressions and other text-munging facilities of any language in the history of the universe (the standard regex library other languages use is called PCRE, which stands for Perl-compatible regular expressions), you probably want to use an html parser rather than trying to parse HTML with regexes for a whole host of reasons I won't go into here; in my Mechanize projects, I've used HTML::TreeBuilder for this purpose of parsing the html I get.
|
# ? Jul 25, 2010 22:29 |
|
http://pastebin.com/H2jd6dVF This is driving me insane. I can't for the life of me get ConfigurationManager in C#/.net to work! If the 'configuration.Sections.Add("Login", loginConfig);' is in there, I get an XamlParseException if either 'loginConfig.SectionInformation.ForceSave = true;' or 'loginConfig.Email = "ffff";' are there. Right now I'm just trying to save an Email address as a string... If they're not there but the Sections.Add is the resulting file is: code:
fizzbin fucked around with this message at 00:50 on Jul 26, 2010 |
# ? Jul 26, 2010 00:40 |
|
Don't recall the specifics, but it looks like you're going to have to actually define a block with that section name.code:
E: Err, well maybe that's it, but I see your class is LoginConfig but your section is Login. Maybe that's it? I just cant remember off the top of my head and I don't have access the code I wrote for this stuff right now, sorry :| Factor Mystic fucked around with this message at 02:29 on Jul 26, 2010 |
# ? Jul 26, 2010 02:26 |
|
This may be a stupid question... no wait, it is in fact a stupid question: Why, when streaming a video, does it not always buffer the video far enough in advance? I assume that translated from layman's terms "buffering" means "giving the information enough space between the download and the length of the video so as to avoid playback interruptions; so why is playback ever interrupted? I ask only because I'm waiting for a GIANT GAY PO - because I'm sure the answer is interesting. Interest me.
|
# ? Jul 27, 2010 03:36 |
|
blarzgh posted:This may be a stupid question... no wait, it is in fact a stupid question: Same reason why droughts occur, the supply rate is dynamic so it's impossible to exactly predict the amount required to buffer to create seemless playback through out the length of the video. Though I'm honestly not sure if they do sometype of downloadrate based buffer size.
|
# ? Jul 27, 2010 04:05 |
|
From a scalability point of view you want the servers to be rate limited so they have enough headroom for latency of the majority of the client base but not too much to cause too much server resource overhead that eats into the maximum number of simultaneous clients. It's an interesting CS/engineering issue that causes basic HTTP delivery to win out in real terms as it is always cheaper to deliver TCP offloaded HTTP streams than dynamic RTSP streams.
|
# ? Jul 27, 2010 09:36 |
|
This might be more of a math question but it's beyond me. I'm not even sure if it's possible. Basically I'm trying to find a solution to a combination. Like let's say theres an item that raises the value of another item when used in several different categories but not all of them. There are several items and I'm trying to figure out in what quantity and which combination they would need to be used to reach a certain final value. Like Base 0, 0, 0, 0 Item 1 5, 0, 5, 0 Item 2 0, 5, 5, 0 and I'd be trying to get a final value of something like 10, 5, 15, 0 I hope that's clear enough. If someone could even point me in the right direction I'd be quite grateful.
|
# ? Jul 27, 2010 11:27 |
|
|
# ? May 16, 2024 18:26 |
|
MrMoo posted:From a scalability point of view you want the servers to be rate limited so they have enough headroom for latency of the majority of the client base but not too much to cause too much server resource overhead that eats into the maximum number of simultaneous clients. What are you talking about?
|
# ? Jul 27, 2010 13:29 |