|
I think Java2D is pretty easy to work with, but if you don't already know Java there's a fair amount of stuff you need to do up-front. Here's a basic Java application that opens a window and provides a Graphics object, the basis of all Java2D drawing:code:
|
# ? Jul 26, 2011 04:04 |
|
|
# ? Jun 8, 2024 23:07 |
|
That seems simple enough, and Java is one of the two modern languages I know (the other being Python). I'll give it a shot!
|
# ? Jul 26, 2011 05:18 |
|
Reisen posted:That seems simple enough, and Java is one of the two modern languages I know (the other being Python). I'll give it a shot! Pygame is pretty simple too. I would say it a little easier to use and a little more intuitive than Swing, but the documentation isn't too good; Java definitely has the advantage in that department. Here's a bunch of Pygame examples if you choose to go that route: http://cs.simpson.edu/?q=node/26
|
# ? Jul 26, 2011 17:02 |
|
I am lucky enough to have work pay for some java training for me. I used to program, but have not done any real coding in at least 5 years. I have narrowed it down to 3 courses that seem to fit what I need, but I don't know which one, if it matters, would be best. Have any of you taken classes or courses with any of these places, and if so do you have a recommendation? Does it not really matter in the scheme of things? Exitcertified http://www.exitcertified.com/sun-microsystems-training/fundamentals-java-programming-language-sl-110-se6-D66374GC10.html Learningtree http://www.learningtree.com/courses/471.htm Hands on Technology Transfer http://www.traininghott.com/CityCourses/Philadelphia-PA-Learning-Java-Programming-Classes.htm All of the above have onsite offerings which I would prefer. Just so much easier and nicer for me to learn at than a virtual class.
|
# ? Jul 27, 2011 21:47 |
|
I don't know C++ or Windows programming at all, so...could anyone tell me why the compiled version of this source isn't printing its output to stdout? It outputs to the console just fine, but if I try to redirect it from the command line like "compiled.exe > test.txt" I get a blank file...same results if I try to capture stdout by calling it from Python's subprocess or popen. I see it's using wprintf to output, but from my meager Googlin' that's supposed to write to stdout...
|
# ? Jul 27, 2011 22:53 |
|
Thermopyle posted:I don't know C++ or Windows programming at all, so...could anyone tell me why the compiled version of this source isn't printing its output to stdout? It outputs to the console just fine, but if I try to redirect it from the command line like "compiled.exe > test.txt" I get a blank file...same results if I try to capture stdout by calling it from Python's subprocess or popen. nesbit37 posted:I am lucky enough to have work pay for some java training for me. I used to program, but have not done any real coding in at least 5 years. I have narrowed it down to 3 courses that seem to fit what I need, but I don't know which one, if it matters, would be best. Have any of you taken classes or courses with any of these places, and if so do you have a recommendation? Does it not really matter in the scheme of things? Is there any reason you're looking at these types of classes as opposed to something that will add value to your resume? Vulture Culture fucked around with this message at 02:13 on Jul 28, 2011 |
# ? Jul 28, 2011 02:09 |
|
Misogynist posted:When you redirect to a file, does the output still appear on the console? Nope. I've tested it on two Win7 64 bit computers and it didn't work on either, but it does work on a Vista 32 bit computer... Here it is compiled. It's an exe on the internet, so don't download it if you don't feel like it, but that is the source I just posted. Just to show my utter ignorance in this area...I haven't actually compiled this source, another goon did it for me. Would it have to be compiled differently for 64 and 32 bit architectures? Thermopyle fucked around with this message at 03:12 on Jul 28, 2011 |
# ? Jul 28, 2011 03:03 |
|
Misogynist posted:When you redirect to a file, does the output still appear on the console? I'm going to agree and say that those classes are horrible. You'll be getting the time off work to go for a week, see if they'll just buy you a laptop and a couple books and a Starbucks card with the $2495. Then just sit around writing code.
|
# ? Jul 28, 2011 03:13 |
|
Misogynist posted:The best way to code is to just, well, code. I think that classes like these, where they teach you nothing of value and just dick around with Swing and JDBC, are an awful way to spend money. Because they are paid for, structured, and are in a time block that will force me to work on learning to code in Java. My main purpose at work and my personal life is not coding, its a secondary if not tertiary aspect of my job and now we have grant funding to pay for it. I don't particularly want to spend my free time teaching myself to code, nor do I want to assume that I will teach myself to do it in the same time when I have other work I could be doing instead. If I was paying for this myself and I was in my early 20s I would totally agree with you, but right now life doesn't seem to work that way for me and the opportunity is here. Bottom line is I have a fixed amount of money that must be spent on programming training, specifically java. If there are better structured classes or methods out there that's fine, but go and buy a couple a books and teach yourself isn't an option. Not so much because I can't do it, but because I know won't do it if it goes that way (and the money can't be spent that way, federal grants are very strict).
|
# ? Jul 28, 2011 04:22 |
|
So you don't care enough to actually learn, but you still need to spend money to make it look like you're learning. Got it.
|
# ? Jul 28, 2011 04:29 |
|
No, I want to learn, but I also know what does and does not work for me, and I have limits on how and when the funds can be spent. Just because buying a couple books and sitting in a coffee shop for a week working through them works for some of you does not mean it works for me or that it is even an option I can consider. If you have a suggestion for a structured learning method with instruction that costs around $2500 I am all ears. If you think all 3 of those places are crap, that's equally valid. If you have experience that one is better than the other I would like to hear it. I do have to ask, have you attended the ~5 day bootcamp type courses before or only believe they are terrible? Its also not like I haven't coded before. I did get my undergraduate education in computer science in the late 90s and did programming work for a few years after wards. Coding just has not been a big part of my responsibilities lately and they are not going to become a major part of them anytime in the near future.
|
# ? Jul 28, 2011 04:50 |
|
nesbit37 posted:If you have a suggestion for a structured learning method with instruction that costs around $2500 I am all ears. There's a very common sentiment among programmers that all (or nearly all) such "structured learning methods" are a waste of time. So I'm not surprised to see you get little help here. (And I think saying "it needs to cost $2500" is putting people off--maybe just say your grant is for $2500. Surely you'd accept a workable solution that cost $10?) You say you got your undergrad in CS. Did the classes that involved programming work for you? If they did, or you think they would, why not take your grant and enrol in a course for a semester at a local college? Call up an advisor or someone and explain your situation, see if they have a course that might work for you. $2500 might get you close enough for tuition for one course, and you can stretch your week off into a few hours off a week to attend lectures.
|
# ? Jul 28, 2011 07:27 |
|
Yes, that is certainly true that I am open to other less expensive suggestions as well. I am sorry if I came off as abrasive, but it was a little frustrating to ask about the quality of trainers and then be presented with the idea that your wasting your time and the only way to learn to program is to teach yourself. The courses in my program did teach me and I liked how they went. Its just that not only have I not written code in quite a while, but I learned in Object pascal and last wrote things in C++. I, too, furthered my own education after school and work by coding for fun and just trying new things, but I have an opportunity right now to have something structured paid for to get me back into it so I can hopefully do some support and possibly even plugins for our open source platforms. I did look into local schools and, unfortunately, they are not going to work. The community collage would have been an option but they don't have an applicable course available this coming semester. The other area colleges won't accept me without enrolling as a student and into the program, and they didn't want an auditor for a course like this. As far as I can tell, and I very well could be wrong, but these boot camp type courses are all that are available that fit the stipulations of the grant.
|
# ? Jul 28, 2011 14:16 |
|
nesbit37 posted:I do have to ask, have you attended the ~5 day bootcamp type courses before or only believe they are terrible? I've never taken a Java one, but I have for things like HTML and SQL. They buzz through a book and some examples, skip a ton of stuff, and you don't really learn much. Why? There's just not enough time to actually explain things, ask questions, and learn from each other. Now, they can be a good way to get started with a new technology. But if you look at the amount of things they plan on covering in the class, you'll see there's no way they can spend any more than 10 or 15 minutes on each thing. You could literally spend 3 days going over just classes in Java, along with the application/examples of them. Usually, the classes are full of fucktards who are forced to go their by their jobs. And most of them just play around on the internet all day. Those schools are in it for the money and know corporations will pay. But it's like companies don't care (or don't know) that they are literally gaining nothing by sending their employees to poo poo like this. You just can't learn programming in 5 days. Second, do you personally want to learn Java or is your employer making that decision for you? Unless you have a personal project you want to do in Java (Android stuff for instance) I would run like hell and take a class on C# or Ruby or PHP or anything else.
|
# ? Jul 28, 2011 15:43 |
|
Bob Morales posted:Second, do you personally want to learn Java or is your employer making that decision for you? Unless you have a personal project you want to do in Java (Android stuff for instance) I would run like hell and take a class on C# or Ruby or PHP or anything else. Its a bit of both. I would like to get back into coding a bit, but I have so much stuff on my plate right now professionally and personally that I can't be too choosy. Java fits work needs, as we have 3 open source platforms that are all based on java, and I can make it fit for most things I might want to do personally. I was a little worried these types of classes might be like that. I'll probably just have to make the best of it. If nothing else I am hoping that it also makes me more eager to work on coding more. Even if the class itself isn't the best that doesn't mean it can't be an inspiration to start messing around more on your own with at least some sort of grounding to start from.
|
# ? Jul 28, 2011 15:57 |
Just to run it into the ground, let me just link the classic Teach Yourself Programming in Ten Years essay. If you do decide to take one of those courses, I would suggest to bring one of your own projects and work on it when the teacher is just rambling, then take any chances to ask the teacher for advice on any problems you face with your own project.
|
|
# ? Jul 28, 2011 16:12 |
|
nesbit37 posted:I was a little worried these types of classes might be like that. I'll probably just have to make the best of it. If nothing else I am hoping that it also makes me more eager to work on coding more. Even if the class itself isn't the best that doesn't mean it can't be an inspiration to start messing around more on your own with at least some sort of grounding to start from. If it's free, go right ahead.
|
# ? Jul 28, 2011 16:19 |
|
nielsm posted:Just to run it into the ground, let me just link the classic Teach Yourself Programming in Ten Years essay. Thanks for the article, that was a good read. I am not expecting to be a java expert after one of these courses, but to at least have a better standing afterwards than I do with my current coding foundation. The class is indeed free for me, so if there is no discernible difference between the organization teaching them I guess I will just go with whoever fits my schedule best and make the most of it.
|
# ? Jul 28, 2011 17:28 |
|
Quick question here, but is it possible to stop an application from stealing global hotkeys on Windows? I've got a game (not fullscreen) that eats my foobar global hotkeys. They aren't media keys but rather Alt + numpad keys (I don't care about using them for special characters). Autohotkey is strangely unaffected, so I've got an Autohotkey script that will temporarily change focus from the game when I press these keys. This is still not the best as the double-focus switch is far from instantaneous. Any better solutions? I've tried using Autohotkey's SendControl function but it isn't working with foobar. Edit: Basically, what's the best way to capture and redirect the keystrokes to foobar without using Autohotkey's SendControl function or changing window focus. I'm happy to use a proper language to make this if it's going to work, I'm just not sure where to look. Met48 fucked around with this message at 21:58 on Jul 28, 2011 |
# ? Jul 28, 2011 21:46 |
|
can someone with much more regex kung-foo than I whip an expression that will match: [any upper character or digit 0-9][dash][any upper character or digit 0-9] (for php) example data AAAA-BBBB A123-B456 1234-4567 DEFG-HIJK edit: I tried ([A-Za-z0-9-]+) with some online regex maker but it only seems to match the 1st valid needle in a haystack and not any of the others, i want to be able to feed the expression a bunch of data containing the above strings and be able to have it returned into a cleaned array
|
# ? Jul 28, 2011 23:50 |
|
The regex is a straightforward translation of your description. [any upper character or digit 0-9] = [A-Z0-9] [dash] = - So the regex is [A-Z0-9]-[A-Z0-9] As for the actual problem - given a string and a regex, return a list of all substrings matching that regex - there's bound to be something in PHP's string library that does that, right? (I don't know PHP.) Quarantini posted:edit: I tried ([A-Za-z0-9-]+) with some online regex maker but it only seems to match the 1st valid needle in a haystack and not any of the others, i want to be able to feed the expression a bunch of data containing the above strings and be able to have it returned into a cleaned array The problem with that is not the regex (although it is wrong) but presumably the fact that you're searching using a function that returns the first match rather than all matches.
|
# ? Jul 28, 2011 23:57 |
|
Quarantini posted:can someone with much more regex kung-foo than I whip an expression that will match: If you're only doing four before the dash and four after, try [A-Za-z0-9]{4}-[A-Za-z0-9]{4} or (if PHP supports regex character classes) [:alphanum:]{4}-[:alphanum:]{4}
|
# ? Jul 28, 2011 23:57 |
|
Quarantini posted:can someone with much more regex kung-foo than I whip an expression that will match: The example data you're giving doesn't match the expression you guessed. "[any upper character or digit 0-9][dash][any upper character or digit 0-9]" is written as [A-Z0-9]-[A-Z0-9]. The examples you're giving, however, would return A-B, 3-B, 4-4 and G-H if you used that expression. Then it looks like you're trying ([A-Za-z0-9-]+). Why did you put a-z in there if you specifically want "any upper character"? Also, this expression matches nonsense like 0 and ---23097FSGSDHkadsf-d-. Assuming that the examples indicate what you actually want better than anything else, your answer is probably [A-Z0-9]{4}-[A-Z0-9]{4}.
|
# ? Jul 29, 2011 00:49 |
|
Also: http://php.net/manual/en/function.preg-match-all.php
|
# ? Jul 29, 2011 00:49 |
|
I'm a CS undergrad looking to get much more involved in the field past my mandatory coursework. I don't know much about the field as a whole and looking to explore my options. Do any of you have any solid resources on the following?: -Notable communities, forums, blogs, etc. that I should be watching and participating in. -Comparisons/explanations of the various subfields and specializations of computer science. -Notable opensource projects that a beginner could work on.
|
# ? Jul 29, 2011 01:49 |
|
Thermopyle posted:Nope. I can't explain why it's happening, but fflush isn't being called during program shutdown. If he adds fflush(stdout) before main returns, it should work fine.
|
# ? Jul 29, 2011 03:13 |
|
qntm posted:The example data you're giving doesn't match the expression you guessed. "[any upper character or digit 0-9][dash][any upper character or digit 0-9]" is written as [A-Z0-9]-[A-Z0-9]. The examples you're giving, however, would return A-B, 3-B, 4-4 and G-H if you used that expression. Then it looks like you're trying ([A-Za-z0-9-]+). Why did you put a-z in there if you specifically want "any upper character"? Also, this expression matches nonsense like 0 and ---23097FSGSDHkadsf-d-. He might want to anchor that too, make sure that it matches the entire string and not just a substring. This may not be needed, depending on the language and how the data is organized. Is the data you are searching in seperate variables/strings, or are they all in one string separated by newlines or some other character? ^([A-Z0-9]{4})-([A-Z0-9]{4})$
|
# ? Jul 29, 2011 18:36 |
|
I'm trying to figure out if it's possible to pass something like a pointer to a member function in lua. Given the followingcode:
code:
|
# ? Jul 29, 2011 22:06 |
fankey posted:I want to be able to pass either a plain function or a function associated with a particular table instance to another function that will end up calling it. Is my only option the last one? I'm not much into the actual semantics of the OO-ish notations in Lua, but as far as I know you have to use that last idiom. You can of course wrap it into something simpler. You know, one thing you could do was override the table lookup metamethod for your objects, such that looking up one of the functions in the class using the regular . operator yields a function bound to the object. code:
|
|
# ? Jul 29, 2011 22:16 |
|
^^ Looks like it should work to me. Of course, this means that while foo.Test(3) will work, and DoSomethingFourTimes(foo.Test) will work, foo:Test(3) will not (which can be an interesting surprise violation for other Lua coders looking at your program). I'm pretty sure that there's an unofficial patch on the lua-users wiki that makes foo:bar syntactic sugar for function(...) return foo:bar(...) end, which you could use if you don't mind breaking compatibility with "stock" lua. Alternately, you can wrap it in something more explicit: code:
|
# ? Jul 29, 2011 23:11 |
|
Here's something someone might be able to help me with: I'm integrating Lua support into my application and I built both 64 and 32 bit static Lua libraries using TDM-GCC; these of course correlate to the 64 and 32 bit builds of the program I'm integrating Lua into. I have no problem with either build on my 64-bit machine (using gcc flags -m64 and -m32). I'm on my laptop though and it's 32-bit only, and attempting to build a 32 bit on it provides me with these errors: code:
|
# ? Jul 30, 2011 18:46 |
|
I asked this in the 'Random Questions' megathread in Ask/Tell but did not receive a response. Maybe this is a better place? I'm trying to properly categorize an application for my resume. This application allows users to log on and send subject data to our company via an internet browser per FDA rules. The user can give us details about the transfer, see past transfers, write on a message board, read and answer queries, ask questions, and download information regarding their specific trials. This application runs on a server at our data center in NJ. The client needs to download an ActiveX plug-in and that's it. Is this SaaS CRM? SaaS CMS? Just SaaS? Just CRM? Just CMS? ASP? None of the above? I don't know! At present I'm calling it a content management system/data transfer application. However that strikes me as wrong, misleading, outside of the industry nomenclature, and unprofessional. So yes, please let me know how best to describe this application. Thanks in advance.
|
# ? Aug 1, 2011 16:55 |
|
Abel Wingnut posted:At present I'm calling it a content management system/data transfer application. However that strikes me as wrong, misleading, outside of the industry nomenclature, and unprofessional. Real answer: tailor it to the job descriptions if it's that important to you. Calling it content management software is pretty misleading though.
|
# ? Aug 1, 2011 18:20 |
|
Whatever you call it, if you really have written it to adhere to federal guidelines/rules then I'd talk that aspect up too because it shows you take care to follow the regulations of your industry. Better still if it had to pass validation/certification/whatever.
|
# ? Aug 1, 2011 18:47 |
|
baquerd posted:Real answer: tailor it to the job descriptions if it's that important to you. Calling it content management software is pretty misleading though. Yeah, this. Keep a master resume full of everything you've ever done, then make a copy and cut that down so it fits whatever job you're applying for to a tee. Keep the master resume up to date, try to add new stuff to it at least once a year so you don't forget all the kickass projects you can mention having worked on. This also helps when negotiating a raise, as you'll be able to point to stuff that added value or whatever.
|
# ? Aug 1, 2011 19:46 |
|
Oh yea, I definitely tailor my resume per the job. I'm just wondering if there's a short, accurate, industry-standard way of describing this program without me having to waste a line detailing what it does. Thanks for the info, guys.
|
# ? Aug 1, 2011 21:17 |
Abel Wingnut posted:Oh yea, I definitely tailor my resume per the job. I'm just wondering if there's a short, accurate, industry-standard way of describing this program without me having to waste a line detailing what it does. It sounds pretty CRM-ish to me. I'd only add the SaaS qualifier if it's actually built such that you can (relatively) quickly set up a new, independent instance for a new organisation.
|
|
# ? Aug 1, 2011 23:06 |
|
nielsm posted:It sounds pretty CRM-ish to me. I'd only add the SaaS qualifier if it's actually built such that you can (relatively) quickly set up a new, independent instance for a new organisation. Thanks. It is specifically made to add new users/trials/studies in a few seconds so I'll add the SaaS qualifier.
|
# ? Aug 2, 2011 03:31 |
|
I've got some jquery that looks like this:code:
The question is, how do i set these so that the ?id=nn is set to the correct item value. Excuse the goofy code, its bit of a deadline o_O e: Solved quote:
duck monster fucked around with this message at 04:07 on Aug 2, 2011 |
# ? Aug 2, 2011 04:03 |
|
|
# ? Jun 8, 2024 23:07 |
|
I am attempting to resolve an error message in a set of php code and I am struggling to determine why. Note: I am not a very experienced programmer (to say the least) and I was given this code by our programming team to adapt and modify for use in our department. I have been able to resolve every error and issue up until this point, but now I am struggling. The page itself is a listing of different values for a given trainee, each of which is selectable in a form which can be submitted to updated the given information in the database. I am consistently getting the error message quote:Warning: Invalid argument supplied for foreach() in /home/kaplanho/public_html/Testing/KTDP/ktdp/scheduling/admin/headers.php on line 45 I am assuming this is because the argument in that foreach() loop is either null or not an array, but I cannot figure out why that is true. The posted changes do get saved, but I cannot figure out how to get rid of that error message. Here is the code in question. First, a portion of the revelant trainee.php page code: code:
code:
I don't understand how the argument could be null or not an array given the check that's used the line before the offending line to ensure the contents of the posted field. Any and all help is hugely appreciated!!!
|
# ? Aug 2, 2011 21:02 |