|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On August 30 2013 01:38 Teim wrote: Does anyone know if OpenCL has some kind of frame limiter? I've run the same application on a few different graphic cards of varying quality (both AMD and NIVIDA) and they all max out at the same 10 milliseconds per update (100 frames per second) barrier. It's important for me to be able to measure differences in performance and when they all appear to be performing the same...
Anyway, thanks for your time.
Turns out my issue was nothing to do with OpenCL but to do with glutTimerFunc. I changed that and fixed a couple of other issues and now my software is running about about 15 times faster... Which is great but has now exposed some issues with my memory management as I am generating 15 times more data.
Woo programming!
|
On August 30 2013 11:06 sob3k wrote:CSS/HTML I want a div to start somewhere midpage and go all the way to the edge of the page in one direction. Like the blue box in pic below: ![[image loading]](http://i.imgur.com/j5KpO4g.png) How do I do this?
Been awhile since I did any page work, but I assume floating could get the job done here:
http://www.elated.com/articles/css-floats/
You could float the left margin div, the red square div, and the blue div, and have the right margin div non float.
Take my advice with a grain of salt though, I'm sure a more experienced person will have a better answer for you.
|
On August 30 2013 11:06 sob3k wrote:CSS/HTML I want a div to start somewhere midpage and go all the way to the edge of the page in one direction. Like the blue box in pic below: ![[image loading]](http://i.imgur.com/j5KpO4g.png) How do I do this?
Set the padding-left or margin-left to whatever distance you want it off the left side (% or px). Set the width to 100% (or appropriate number of pixels).
But just as any fyi, it seems like you're doing a lot of lay-out from scratch, which is just reinventing the wheel. Google for body wrappers and boilerplates, and you'll probably find something close to what you want and can modify.
If you're doing it just for experience, then knock yourself out and start from scratch (I had to do something similar for a class way back when). But if you're actually trying to build something useful, use an existing template (even a minimal one), so you don't have to make the wrapper work right.
|
On August 30 2013 11:06 sob3k wrote:CSS/HTML I want a div to start somewhere midpage and go all the way to the edge of the page in one direction. Like the blue box in pic below: ![[image loading]](http://i.imgur.com/j5KpO4g.png) How do I do this?
<html> <head> <style type="text/css"> body { background-color: #000000; }
#red { background-color: #FF0000; height: 500px; width: 80%; margin-top: 10%; margin-left: 10%; } #blue { background-color: #0000FF; height: 100px; width: 90%; margin-left: 10%; } </style> </head> <body> <div id="red"> </div> <div id="blue"> </div> </body> </html>
That should like your picture.
The two relevant lines are width: 90%; margin-left: 10%;
Alternative to the 90% you could also just write "auto"
|
On August 31 2013 00:26 Yoshi- wrote:Show nested quote +On August 30 2013 11:06 sob3k wrote:CSS/HTML I want a div to start somewhere midpage and go all the way to the edge of the page in one direction. Like the blue box in pic below: ![[image loading]](http://i.imgur.com/j5KpO4g.png) How do I do this? <html> <head> <style type="text/css"> body { background-color: #000000; }
#red { background-color: #FF0000; height: 500px; width: 80%; margin-top: 10%; margin-left: 10%; } #blue { background-color: #0000FF; height: 100px; width: 90%; margin-left: 10%; } </style> </head> <body> <div id="red"> </div> <div id="blue"> </div> </body> </html>
That should like your picture. The two relevant lines are width: 90%; margin-left: 10%; Alternative to the 90% you could also just write "auto"
The problems might appear when he wants to add something on the left side in the future. This would put the blue box out of position. You would have to play with z-indexes then, which can be a headache. Just a heads-up on possible problems  I once run into such shitty layout, with a shadow spanning the entire width behind the actual content, like so:
![[image loading]](http://i.imgur.com/jwutL0p.png)
It was a nightmare of mine (what you see in the picture is an actual project I was working on and keep it on my machine as a stark reminder of how stupid people doing the graphics can be).
|
Afraid i need some help with a COMException, here is the log:
2013-09-03 10:56:50,105 [9] FATAL MailMerge.LogDirector [(null)] - Fatal System.Runtime.InteropServices.COMException (0x800A13E8): EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCARDTEXTCHARFORMATCHI (GP invitation letter_Adult.docx) at Microsoft.Office.Interop.Word.DocumentClass.SaveAs(Object& FileName, Object& FileFormat, Object& LockComments, Object& Password, Object& AddToRecentFiles, Object& WritePassword, Object& ReadOnlyRecommended, Object& EmbedTrueTypeFonts, Object& SaveNativePictureFormat, Object& SaveFormsData, Object& SaveAsAOCELetter, Object& Encoding, Object& InsertLineBreaks, Object& AllowSubstitutions, Object& LineEnding, Object& AddBiDiMarks) at MailMerge.MainForm.SaveWordDocument(Object InName, Object saveAs) in C:\C#\AL\AL\MainForm.cs:line 307
Basically the program opens a word document, alters it, saves it under a different name, and then closes the word document. This process can work for any seemingly random amount of times, and then i get the COMException. Always the same one. Having looked around, i couldn't find anything that made sense. Some people suggested network path names and other stuff similar to that (like permissions), however if that was the case, it shouldn't even work for the first.
Does anyone know why this error occurs in detail? If you need any more information, just ask.
Cheers.
|
How are you using Interop? Are you 100% sure that you keep closing all your Word applications, as an example.
Some code around where you're saving could be nice as well.
|
Hey, can anyone recommend some good Java tutorials for someone who has prior programming experience in C/C++ and Python?
A couple of my classes this year are using Java, but with the assumption that if you don't already know the language, you'll be able to pick it up quickly yourself. So, I'm looking for some online tutorials I could use to bring myself somewhat up to speed.
I've already found this page, and I've been going through some of the tutorials/information:
http://www.oracle.com/technetwork/java/index-jsp-135888.html
Does anyone know any other resources that have more code examples or are slightly more structured, though? I find having more than one place to learn from is beneficial, in case part of one resource is badly written/explained.
If anyone has book recommendations, feel free to share as well.
I tried the links in the OP, and I think one of them is a deprecated link to the Oracle site, and the blackbelt one seems to not exist anymore. Haven't tried downloading the .doc though.
|
^ Try coursera.org and do one of the java classes. You can enroll for an old one to audit it, which means you can look through the video lectures and try some of the automated assignments. Definitely check out the other free online university stuff like Udacity, edx etc for other resources too.
My question is one completely unrelated to the sartorial arts. After I program a lot, my brain gets really tired. I don't know what to call it. What are the ways I can can increase my mental fortitude, be able to focus for longer, and replenish the best?
|
On September 05 2013 13:59 KurtistheTurtle wrote: ^ Try coursera.org and do one of the java classes. You can enroll for an old one to audit it, which means you can look through the video lectures and try some of the automated assignments. Definitely check out the other free online university stuff like Udacity, edx etc for other resources too.
My question is one completely unrelated to the sartorial arts. After I program a lot, my brain gets really tired. I don't know what to call it. What are the ways I can can increase my mental fortitude, be able to focus for longer, and replenish the best?
Eat better! And drink lots of water. Not coffee or pop. Sleep regularly, even if you don't sleep a full 8 hours a night - do it at the same time every night. For real - so many programmers have the worst diet because we look at food as a distraction. If you find yourself getting burnt out before you want to be finished for the day, either stop programming for twelve hours a day or start eating three meals a day and drinking eight glasses of water ^^
EDIT: And GOOD meals too. Vegetables. Meat. Et cetera. Not fast food or anything someone else made for you, unless it's home cooked =P It's the thing that made long days start being tiring and stop being an extended, drug-out hellhole of exhaustion. It's also the same advice that a lot of pro gamers expound upon pretty heavily in a lot of blogs (Fluff and TLO both if memory serves, as well as countless others).
|
^ This is some good advice. Two pieces of to add:
DON'T WORK TOO MUCH! Part of the reason your brain gets tired after programming a lot is that it's really fucking hard and taxing. Doing development for 10+ hours a day is not sustainable.
And second, the actual programming will get much easier with experience. Eventually you'll get faster at putting the code out, to the point where the design of the interfaces you need is the hard part, and then hammering out the code is more like an afterthought. You still can't work too much, because it's still really mentally taxing though
|
Hyrule19060 Posts
On September 08 2013 14:36 Cyx. wrote:Show nested quote +On September 05 2013 13:59 KurtistheTurtle wrote: ^ Try coursera.org and do one of the java classes. You can enroll for an old one to audit it, which means you can look through the video lectures and try some of the automated assignments. Definitely check out the other free online university stuff like Udacity, edx etc for other resources too.
My question is one completely unrelated to the sartorial arts. After I program a lot, my brain gets really tired. I don't know what to call it. What are the ways I can can increase my mental fortitude, be able to focus for longer, and replenish the best? Eat better! And drink lots of water. Not coffee or pop. Sleep regularly, even if you don't sleep a full 8 hours a night - do it at the same time every night. For real - so many programmers have the worst diet because we look at food as a distraction. If you find yourself getting burnt out before you want to be finished for the day, either stop programming for twelve hours a day or start eating three meals a day and drinking eight glasses of water ^^ EDIT: And GOOD meals too. Vegetables. Meat. Et cetera. Not fast food or anything someone else made for you, unless it's home cooked =P It's the thing that made long days start being tiring and stop being an extended, drug-out hellhole of exhaustion. It's also the same advice that a lot of pro gamers expound upon pretty heavily in a lot of blogs (Fluff and TLO both if memory serves, as well as countless others). Coffee is amazing. It shouldn't be used as a crutch, for sure, but there are a bunch of studies which show that up to 4 (liquid measure) cups a day is actually beneficial.
|
|
On September 08 2013 21:17 tofucake wrote:Show nested quote +On September 08 2013 14:36 Cyx. wrote:On September 05 2013 13:59 KurtistheTurtle wrote: ^ Try coursera.org and do one of the java classes. You can enroll for an old one to audit it, which means you can look through the video lectures and try some of the automated assignments. Definitely check out the other free online university stuff like Udacity, edx etc for other resources too.
My question is one completely unrelated to the sartorial arts. After I program a lot, my brain gets really tired. I don't know what to call it. What are the ways I can can increase my mental fortitude, be able to focus for longer, and replenish the best? Eat better! And drink lots of water. Not coffee or pop. Sleep regularly, even if you don't sleep a full 8 hours a night - do it at the same time every night. For real - so many programmers have the worst diet because we look at food as a distraction. If you find yourself getting burnt out before you want to be finished for the day, either stop programming for twelve hours a day or start eating three meals a day and drinking eight glasses of water ^^ EDIT: And GOOD meals too. Vegetables. Meat. Et cetera. Not fast food or anything someone else made for you, unless it's home cooked =P It's the thing that made long days start being tiring and stop being an extended, drug-out hellhole of exhaustion. It's also the same advice that a lot of pro gamers expound upon pretty heavily in a lot of blogs (Fluff and TLO both if memory serves, as well as countless others). Coffee is amazing. It shouldn't be used as a crutch, for sure, but there are a bunch of studies which show that up to 4 (liquid measure) cups a day is actually beneficial.
Well sure - I just meant make sure you're getting a lot of water in you too ^^ I still drink both coffee and Coke pretty religiously but just try to make sure that when I'm actually thirsty I drink water, and when I want something tasty I drink something else =)
|
I'm looking for any Java GUI book or a tutorial. I need to bring my Java GUI to university standard or even better.
|
On September 08 2013 14:36 Cyx. wrote:
Eat better! And drink lots of water. Not coffee or pop. Sleep regularly, even if you don't sleep a full 8 hours a night - do it at the same time every night. For real - so many programmers have the worst diet because we look at food as a distraction. If you find yourself getting burnt out before you want to be finished for the day, either stop programming for twelve hours a day or start eating three meals a day and drinking eight glasses of water ^^.
I really never understood this attitude. Through school and my career I've seen so many people work like 10-12+ hour days and speak about it like a point of pride. I come into work, work hard for 7-8 hours a day, go home, and never think about code outside the office. I get my work done, but I'm not in love with programming. I can't remember the last time I worked on a peice of code outside of work, except for as a favor to friends. Am I destined to be a mediocore software engineer ?
|
On September 08 2013 14:36 Cyx. wrote:Show nested quote +On September 05 2013 13:59 KurtistheTurtle wrote: ^ Try coursera.org and do one of the java classes. You can enroll for an old one to audit it, which means you can look through the video lectures and try some of the automated assignments. Definitely check out the other free online university stuff like Udacity, edx etc for other resources too.
My question is one completely unrelated to the sartorial arts. After I program a lot, my brain gets really tired. I don't know what to call it. What are the ways I can can increase my mental fortitude, be able to focus for longer, and replenish the best? Eat better! And drink lots of water. Not coffee or pop. Sleep regularly, even if you don't sleep a full 8 hours a night - do it at the same time every night. For real - so many programmers have the worst diet because we look at food as a distraction. If you find yourself getting burnt out before you want to be finished for the day, either stop programming for twelve hours a day or start eating three meals a day and drinking eight glasses of water ^^ EDIT: And GOOD meals too. Vegetables. Meat. Et cetera. Not fast food or anything someone else made for you, unless it's home cooked =P It's the thing that made long days start being tiring and stop being an extended, drug-out hellhole of exhaustion. It's also the same advice that a lot of pro gamers expound upon pretty heavily in a lot of blogs (Fluff and TLO both if memory serves, as well as countless others).
With regards to food, avoid simple head carbs. Personally I think vegetable sushi is the go to food for seriously tough days, I avoid coffee due to IBS but its not bad, as mentioned. Good sleep patterns are essential but also planning your day around your own 'schedule'. I often feel super tired around 1-2pm so I make sure I'm doing different stuff then, basic tasks, email etc
Go for some walks and find good excuses to switch between sitting and standing, I often stand up, tilt my monitors and pace around a bit when I'm thinking / researching and I find it keeps your fresh.
Exercise properly, big one IMO, healthy body healthy mind!
|
On September 09 2013 05:44 Pawsom wrote:Show nested quote +On September 08 2013 14:36 Cyx. wrote:
Eat better! And drink lots of water. Not coffee or pop. Sleep regularly, even if you don't sleep a full 8 hours a night - do it at the same time every night. For real - so many programmers have the worst diet because we look at food as a distraction. If you find yourself getting burnt out before you want to be finished for the day, either stop programming for twelve hours a day or start eating three meals a day and drinking eight glasses of water ^^. I really never understood this attitude. Through school and my career I've seen so many people work like 10-12+ hour days and speak about it like a point of pride. I come into work, work hard for 7-8 hours a day, go home, and never think about code outside the office. I get my work done, but I'm not in love with programming. I can't remember the last time I worked on a peice of code outside of work, except for as a favor to friends. Am I destined to be a mediocore software engineer ? I've heard that great programmers sometimes get a "rush" where they can't think of anything but their current project day and night for a couple of weeks. I've had one of these too, so I am a great programmer! Or not, the implication goes in the other direction...
Anyways, I don't think you have to be working 12 hours a day to get better than mediocre. It could help since you get more experience, but it could hurt just as well because you're overdoing it. I do think though that your chances to become great at anything are better if you enjoy that anything so much that you can still do it for recreation after a day of work. Not exactly the same thing you did for work though, a private project instead.
|
On September 08 2013 14:36 Cyx. wrote:Show nested quote +On September 05 2013 13:59 KurtistheTurtle wrote: ^ Try coursera.org and do one of the java classes. You can enroll for an old one to audit it, which means you can look through the video lectures and try some of the automated assignments. Definitely check out the other free online university stuff like Udacity, edx etc for other resources too.
My question is one completely unrelated to the sartorial arts. After I program a lot, my brain gets really tired. I don't know what to call it. What are the ways I can can increase my mental fortitude, be able to focus for longer, and replenish the best? Eat better! And drink lots of water. Not coffee or pop. Sleep regularly, even if you don't sleep a full 8 hours a night - do it at the same time every night. For real - so many programmers have the worst diet because we look at food as a distraction. If you find yourself getting burnt out before you want to be finished for the day, either stop programming for twelve hours a day or start eating three meals a day and drinking eight glasses of water ^^ EDIT: And GOOD meals too. Vegetables. Meat. Et cetera. Not fast food or anything someone else made for you, unless it's home cooked =P It's the thing that made long days start being tiring and stop being an extended, drug-out hellhole of exhaustion. It's also the same advice that a lot of pro gamers expound upon pretty heavily in a lot of blogs (Fluff and TLO both if memory serves, as well as countless others). Food isn't a distraction. Just an unwanted necessity at times :p
I think if you're doing any kind of activity that requires your mind/body to be sharp you should try not to eat too much, or if you do, be prepared to take a nap for 40 minutes.
|
Brain fart dammit:
(if it matters I am currently trying to use C) How does one go about validating user's input from a string/char to int or vice versa?
I can do it if there is some sort of scope (choose a number between a range) but when it is obscure as choose an integer (from negative infinity to infinity) to do some calculation how do I make sure the user doesn't put in a string or a char (from my understanding C will try to convert the char into a int value if the variable is casted 'int')
tl;dr how to validate user input
edit: after more google it seems I can use 'isdigit' I was wondering if there is a different way of doing so? I am attempting to do a hw but I don't know if the prof is going to allow us to use that
|
|
|
|