What is wrong with installing something?
Some people like working off a flash drive if they don't have a laptop.
What is wrong with installing something?
No, Xcode's about right for OS X. It's tied to the hip with LLVM/Clang which is a very solid environment for modern C and C++ development, and it installs a complete distribution of Clang command line tools the first time you launch it. LLDB and Instruments are well integrated for debugger workflow.any c++ IDE recommendations for Mac? I'm not going to be writing any GUI/DX/production code, just some research bits and pieces. Something that automates building, gives me some basic refactoring tools, plays well with git, doesn't screw with the working directory too much and gives me some auto-complete functionality would be ideal.
Xcode seems like the obvious choice, but it might be overkill. I'm already very familiar with Eclipse and vim, but I feel like vim might be a little too lightweight (yes, I know what you're about to type, stop typing) for the project and last time I checked Eclipse's C++ plugins weren't spectacular.
Some people like working off a flash drive if they don't have a laptop.
If you're really interested in audio programming, I've been slowly making my way through the following book, which has been suggested by a few websites for the purpose of developing virtual musical instruments of the VST sort, for use in Cubase or Pro Tools.
The Audio Programming Book starts with a quick intro to C, just enough C++, and goes into several examples of real time audio programming with the Csound library. Half the almost 900 page book (no joke) is a crash course discussion of C/C++ programming fundamentals with occasional references to music theory, as they've tried to make this accessible to a wider audience.
I like the coverage of material, and I don't think it skips out on stuff. It does make me want to try a course that covers music composition and playing someday, maybe a Ukulele course is in my future?
That's probably the sanest way to dive in that I know of. Csound abstracts a fair number of audio recording and capture APIs that can be either messy to manage and very OS specific or too high level to do anything interesting with, and it offers some nice plugin interfaces to change waveforms in real time. It's cool stuff.
Give it a shot, take it easy, and don't get too intimidated. It's a fascinating subject on its own.
This isn't a programming question, but given the OT, I assume there are quite a few CS grads in here. I'm hoping someone can help me out.
I'm going to be starting at my local university this fall for a degree in Computer Science, and I potentially have the opportunity to receive $5k a year of tuition reimbursement through my employer. However, I need to explain to them how my CS degree will be job-related and beneficial to the company. They normally only offer this to people getting a degree in Mechanical Engineering, Chemical Engineering, and business.
About the company I work: they are a leading provider of mission-critical manufacturing support services and contamination detection and protection products to the semiconductor, microelectronic, and solar industries.
Basically, we clean used engineering equipment. Any advice on what I can say to show how my degree is beneficial to the company? I hate asking for help on this, but I'm at a loss for what to say.
Thanks
Pluralsight is pretty good, although they have a slight preference towards Microsoft products. Still, plenty of courses focus on other technologies, and they also offer courses to help career development with courses on for example interviewing, job hunting or LinkedIn usage and such.
Google "kernel module programming 101"Bit of a request.
I have never used Linux before. Ever.
I am taking an Operating Systems class that wants us to write a Hello, World program in Kernel Module. Writing in Bash was no problem. However, this kernel stuff is tough for a newcomer.
If anyone is available to help me, I can offer some type of compensation. I know, very simple for Linux guys- but tough for Windows and Mac guy who only has used Java. I am not asking you to do it for me, not at all, just tell me what to do. I am a total NEWB so the terminology is foreign to me.
I have watched some videos and they assume too much.
Hope I was clear. Pardon my lack of understanding!
I've had this sitting in my inbox for a few months. I haven't jumped into it yet, but if you can't find the help you need there's this and Kernel Newbies to get started.Bit of a request.
I have never used Linux before. Ever.
I am taking an Operating Systems class that wants us to write a Hello, World program in Kernel Module. Writing in Bash was no problem. However, this kernel stuff is tough for a newcomer.
If anyone is available to help me, I can offer some type of compensation. I know, very simple for Linux guys- but tough for Windows and Mac guy who only has used Java. I am not asking you to do it for me, not at all, just tell me what to do. I am a total NEWB so the terminology is foreign to me.
I have watched some videos and they assume too much.
Hope I was clear. Pardon my lack of understanding!
The web dev Gaf thread would be able to help you more, but from following it you might want to look into Javascript libraries like Angular and figure out hosting solutions. I'm no web developer though.Just told an honor society I could build a website for them even though I only really know basic CSS/HTML and JS (did an intro to web dev class a while back). What else would I need to know to properly build a website in 2015? They pretty much just want it to have info and pictures, so I could technically do it with what I know but I want to know what the best practices would be. What should I use?
So how are these subscription based websites like Treehouse for someone who likes to continue to improve their skills and keep up with new trends? I hear great things about it for those who want to learn who know nothing (Jon Snow).
I have heard good things about Upcase, how are they?
I'm currently using Treehouse and I'm one of those who started from knowing nothing. Though I'm still subbed, I've stopped actively watching videos since I'm attempting to build a web page from scratch. And I've gotta say I'm either stupid or the learning curve for CSS is steep lol. It's taking me awhile to get my head around positioning and sizing.
Nah, IMO CSS just kind of sucks. I don't work on UI every day or even every couple weeks, but I've done a bit here and there over the years. I still find myself like ....duhhh how do I do this again?
UI kits like Bootstrap make a lot of positioning related BS stupid easy now. I'd start with something like that if you're able.
I'm currently using Treehouse and I'm one of those who started from knowing nothing. Though I'm still subbed, I've stopped actively watching videos since I'm attempting to build a web page from scratch. And I've gotta say I'm either stupid or the learning curve for CSS is steep lol. It's taking me awhile to get my head around positioning and sizing.
Also never heard of Upcase and Pluralsight. Right now my main issue with Treehouse is I've learned the basics and how most HTML and CSS work but not how to use it in a practical way. Like Treehouse hasn't been of much use in helping me get a project off the ground. I've had to look elsewhere and learn on my own for that. Otherwise I would have just continued taking courses without any actual work to show for it besides the step for step code I learned on Treehouse.
Quick basic question. What should I do if I need to change the value of an integer or array in the main method using a different method.
Quick basic question. What should I do if I need to change the value of an integer or array in the main method using a different method.
That's the thing about programming. Every problem is completely different. Even if they showed you how to build something and put all the pieces together into a finished product, it would be inapplicable to almost anything else you could do. You wouldn't understand why X was the right tool for the job, or the tradeoffs from choosing Y or Z, or gluing stuff together in a different way.
The bottom up approach is best. Learn how stuff works, then you can figure out anything. Yes, the figuring out part is hard, but that's why programmers get paid. There's a reason companies want experience more than education. Because experience means you've done stuff. And doing stuff is where you get the real education.
It's valuable to have people who understand software development. Knowing how software is designed and built, you may be able to identify areas where potential cost savings could be realized through automation.This isn't a programming question, but given the OT, I assume there are quite a few CS grads in here. I'm hoping someone can help me out.
I'm going to be starting at my local university this fall for a degree in Computer Science, and I potentially have the opportunity to receive $5k a year of tuition reimbursement through my employer. However, I need to explain to them how my CS degree will be job-related and beneficial to the company. They normally only offer this to people getting a degree in Mechanical Engineering, Chemical Engineering, and business.
About the company I work: they are a leading provider of mission-critical manufacturing support services and contamination detection and protection products to the semiconductor, microelectronic, and solar industries.
Basically, we clean used engineering equipment. Any advice on what I can say to show how my degree is beneficial to the company? I hate asking for help on this, but I'm at a loss for what to say.
Thanks
So should I drop straight CSS for now? Goal is to become a front-end web dev since design isn't really my thing since I'm terrible with photoshop and all that jazz. Am open to trying other languages though I was told learn and master html/css/javascript as a base then go on from there..
That's the thing about programming. Every problem is completely different. Even if they showed you how to build something and put all the pieces together into a finished product, it would be inapplicable to almost anything else you could do. You wouldn't understand why X was the right tool for the job, or the tradeoffs from choosing Y or Z, or gluing stuff together in a different way.
The bottom up approach is best. Learn how stuff works, then you can figure out anything. Yes, the figuring out part is hard, but that's why programmers get paid. There's a reason companies want experience more than education. Because experience means you've done stuff. And doing stuff is where you get the real education.
No, don't. If you work on the front-end, you will need CSS. Even if you pick up a pre-processed flavor such as LESS (http://lesscss.org/) or SASS (http://sass-lang.com/) you will still need to grasp the basic concept of CSS and grasp it very well. No amount of frameworks will save you there, unless you want each and every site of yours look like the default Bootstrap theme. If the designers do the layout for you in Photoshop, you can't do that without CSS. If the designers do the layout in HTML/CSS, where does that put you? I guess you can do away with just JavaScript dev'ign, but still you are heavily gimped there when you have to interact with any of the DOM elements.
There's a general web dev thread here that can hel you out when you run into troubles: http://www.neogaf.com/forum/showthread.php?t=756776
@Test
public void testAddressEmbedded() {
IAddress address = modelFactory.createAddress();
address.setCity("city1");
address.setStreet("street1");
address.setZipCode("zip1");
IModerator m = new Moderator();
m.setFirstName("John");
m.setLastName("Doe");
m.setAddress(address);
EntityTransaction tx = entityManager.getTransaction();
tx.begin();
entityManager.persist(m);
entityManager.flush();
tx.commit();
IModerator mod = daoFactory.getModeratorDAO().findById(m.getId());
assertEquals("John", mod.getFirstName());
assertEquals("Doe", mod.getLastName());
assertEquals("city1", mod.getAddress().getCity());
assertEquals("street1", mod.getAddress().getStreet());
assertEquals("zip1", mod.getAddress().getZipCode());
}
Experience is why I've put watching videos on hold in favor actually building something myself. But I get you mean. I just wish I could find more help on sizing and spacing since I'm kinda just putting random px, % etc in the css until it looks right. I kinda understand the theory but when I get lost whenever I use it in practice even if it makes complete sense when I've had it explained to me. That and i'm having a grand time trying to figure out how to place everything where I want it to be lol. Otherwise I'm kinda starting to make sense of how everything comes together from looking at old code and looking at other web sites and their code.
Besides those issues I am actually having fun learning and figuring out stuff. And Treehouse is the first learning tool I've tried that actually helped make sense of programming. Since last year I thought I programming was for me but gave up since I got stuck in a coursera python course. Then I tried traditional schooling and my teacher was useless and expected me to type up c++ without explaining well anything. I tried reading books but nothing clicked. I'm glad I currently having something presentable but I won't be satisfied until the page is responsive and everything looks right including making sure my code is nice and organized with comments, spacing etc.
Look up passing by reference vs passing by value.
C/C++ has pointers, C# has ref/out, Java doesn't really have that explicit pattern lol.
Depends on the language. If you're using C/C++, how would you change the value of something, say int variable, within the function without using variable?
I have to work with Java. Here's the gist of it: I have a variable declared in the main method. That variable is declared by keyboard input, which works fine. But I made a method that sets that variable(or is supposed to) to a different number. Let's say the person put in the number 5 for x, and I make a method that changes whatever is in x to 13. How would I go about doing that? I can't just make an x in the method because that only changes the variable for that method, not the whole program. I could take it out of the method and make it as part of the main program but I don't think I'm able to.
Pass x into the function as a parameter, than have it return the new value.
x = fn(x);
Shouldn't that be all you need?
If you instead make a size 1 array to hold x, you can pass the array and update the element. In which case you would then be updating that value globally.
Stack overflow is a great place for getting those very specific types of questions answered .
For a different point of view, from someone who argues against using Learn You A Haskell, see http://bitemyapp.com/posts/2014-12-31-functional-education.html
Bit of a mixed programming / Maths question here but I'm at a loss :
I have 5 variables with this condition : a + b + c + d + e = 1
with a > b, b > c, c > d, d > e and e >= 0.05.
How do I go about automating a program ( or Excel? I've tried the solver with no luck) that randomly generates these numbers for me ?
e = random_double(0.0, 0.05)
d = random_double(e, e + (1.0 - e)/4)
c = random_double(d, d + (1.0 - d)/3)
b = random_double(c, c + (1.0 - c)/2)
a = 1.0 - b
Better to write this as a single inequality chain, much easier to understand. So you've got two conditions:
1) 0.05 <= e < d < c < b < a
2) a + b + c + d + e = 1
Pseudocode:
Code:e = random_double(0.0, 0.05) d = random_double(e, e + (1.0 - e)/4) c = random_double(d, d + (1.0 - d)/3) b = random_double(c, c + (1.0 - c)/2) a = 1.0 - b
e = random_double(0.05, 0.15)
d = random_double(e, e + (1.0 - e)/4)
c = random_double(d, d + (1.0 - (d+e))/3)
b = random_double(c, c + (1.0 - (c+d+e))/2)
a = 1.0 - (b+c+d+e)
Better to write this as a single inequality chain, much easier to understand. So you've got two conditions:
1) 0.05 <= e < d < c < b < a
2) a + b + c + d + e = 1
Pseudocode:
Code:e = random_double(0.0, 0.05) d = random_double(e, e + (1.0 - e)/4) c = random_double(d, d + (1.0 - d)/3) b = random_double(c, c + (1.0 - c)/2) a = 1.0 - b
I'm not sure I understand your pseudo code completely :
e is a random double between 0 and 0.05 (should be >0.05 but < d)
d between e and e+(1-e)/4
c between d and d+(1-d)/3
b between c and c+(1-c)/2
a is 1 - b ?
Wouldn't that just mean a + b = 1 and defeat the purpose of the second condition ?
e = random_double(0.05, 0.2)
d = random_double(e, (1-e)/4)
c = random_double(d, (1-e-d)/3)
b = random_double(c, (1-e-d-c)/2)
a = 1-e-d-c-b
Ahh sorry you're right. Let's try this again:
1) 0.05 <= e < d < c < b < a
2) a + b + c + d + e = 1
We can deduce e < 0.2 because if e >= 0.2, then d, c, b, a are > 0.2 and a+b+c+d+e > 1
So
Code:e = random_double(0.05, 0.2)
After e is chosen, you now can change the conditions:
1) e < d < c < b < a
2) a + b + c + d = 1-e
So we can now deduce d < (1-e)/4 for the same reason we could deduce e < 1/5. So
Code:d = random_double(e, (1-e)/4)
Continuing in this fashion, we have:
Code:c = random_double(d, (1-e-d)/3) b = random_double(c, (1-e-d-c)/2) a = 1-e-d-c-b
Hopefully I got it right this time.
Edit: An example run of this algorithm might be like this:
e = random_double(0.05, 0.2) = 0.1634
d = random_double(0.1634, (1 - 0.1634)/4) = random_double(0.1634, 0.20915) = 0.2012
c = random_double(0.2012, (1 - 0.1634 - 0.2012)/3) = random_double(0.2012, 0.2118) = 0.2101
b = random_double(0.2101, (1 - 0.1634 - 0.2012 - 0.2101)/2) = random_double(0.2101, 0.21265) = 0.2113
a = 1 - .1634 - .2012 - .2101 - .2113 = 0.2140
0.05 <= 0.1634 < 0.2012 < 0.2101 < 0.2113 < 0.2140
I coded this up and the algorithm will work as long as your random number generator is non-inclusive of the range. My version is range inclusive (my number generator I just Googled for) and most of the time it generates a correct result but I wrote some unit tests and after I changed the testing times from 1000 to 10,000 it started finding some invalid results.
Thanks for the help, I was really stumbling against a wall there and you showed me the way
I'll try to implement it over the week-end and report back if something is amiss.
Using php, by the way, should be easy enough using mt_rand() !
public function random_double($min, $max)
{
$value = mt_rand()
$result_normalized = $value / mt_getrandmax()
return ($max - $min) * $result_normalized
}
public function random_double($min, $max)
{
$value = mt_rand()
$result_normalized = $value / mt_getrandmax()
return array( ($max - $min) * $result_normalized, $value)
}
Not sure if this the right thread but here we go.
I'm interested in buying an Arduino. I've been learning C for 5-6 months now and I'm moving to C++ soon. Does the investment on an arduino worth it and will it be a good way to practice?
Direction 1: 00 <-> 01 <-> 11 <-> 10 <-> 00
Direction 2: 00 <-> 10 <-> 11 <-> 01 <-> 00
00 01 11 01 11 01 11 10 10 00
Need some help here for a very clean solution to the following problem:
I want to sense directional movement using two sequential PIR motion sensors where a sensor outputs 1 if triggered and 0 otherwise. So for a full pass to occur, the dual sensors need to exhibit the following state transitions
The system is allowed to traverse both back and forth in the above patterns. So the following will be a valid pass for direction 1
All this will need to be done in real time so I need the code to be as streamlined as possible. Any ideas?
I know someone who had an experience with the Nintendo DS SDK, and apparently much of the documentation was in Japanese. I don't recall if that extended to kernel level functions also being in some form of romanized Japanese, but it might have. Wouldn't surprise me.Do developers in other countries program in their native language, or is English universal? Like, would a developer in Japan type "string" in English or Kanji?
Do developers in other countries program in their native language, or is English universal? Like, would a developer in Japan type "string" in English or Kanji?