|
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 February 25 2017 05:53 Blisse wrote:Also in other news, words cannot describe how much I'm disgusted by indie developers. Been meaning to do foobar2000 development for a while, but never got into it because of the high barrier to entry, so I finally sat down yesterday to plow through getting a build to... build. So many Visual Studio issues to work through, like hardcoded library paths, hardcoded build scripts, missing libs... and the code quality is also so poor. Like seriously, single 3000-line file. the nice part is refactoring stuff will help me learn what's what. Be fair, you're disgusted by bad developers, not indie developers.
|
On February 25 2017 07:28 spinesheath wrote:Show nested quote +On February 25 2017 05:53 Blisse wrote:Also in other news, words cannot describe how much I'm disgusted by indie developers. Been meaning to do foobar2000 development for a while, but never got into it because of the high barrier to entry, so I finally sat down yesterday to plow through getting a build to... build. So many Visual Studio issues to work through, like hardcoded library paths, hardcoded build scripts, missing libs... and the code quality is also so poor. Like seriously, single 3000-line file. the nice part is refactoring stuff will help me learn what's what. Be fair, you're disgusted by bad developers, not indie developers.
There's no difference! *mouth froths uncontrollably*
|
Germany2685 Posts
On February 25 2017 05:53 Blisse wrote:Also in other news, words cannot describe how much I'm disgusted by indie developers. Been meaning to do foobar2000 development for a while, but never got into it because of the high barrier to entry, so I finally sat down yesterday to plow through getting a build to... build. So many Visual Studio issues to work through, like hardcoded library paths, hardcoded build scripts, missing libs... and the code quality is also so poor. Like seriously, single 3000-line file. the nice part is refactoring stuff will help me learn what's what.
Don't you dare criticize our dear lord and savior Peter P.
|
|
+ Show Spoiler +http://imgur.com/a/QQaZdWhat am I missing about this question? (we include 0 as natural numbers) Do i need sleep or something? a and b are natural numbers. make a = 0 and b = 0 4 * 0 + 5 * 0 = 0 0 >= 0 (i guess they want a and b to not be equal? but is that some rule that I don't know about? they didn't explicitly say that)
oops. click the spoiler if you want to see stupidity. I definitely do need sleep. I see my mistake now. I was thinking "there exists n >= n_0 instead of "for all n >= n_0"
|
Hyrule18773 Posts
0 is not a natural number
|
it is in our class.
(in other news, I got an interview with amazon)
|
It has to hold for all n > n_0 It works for 0 but not for 1,2,3,6,7,11
|
Hyrule18773 Posts
On February 25 2017 11:51 travis wrote: it is in our class.
(in other news, I got an interview with amazon) well then your class is wrong
good luck with the interview
|
On February 25 2017 12:35 tofucake wrote:Show nested quote +On February 25 2017 11:51 travis wrote: it is in our class.
(in other news, I got an interview with amazon) well then your class is wrong good luck with the interview
why is the class "wrong". A google search show's that it's pretty obvious there is no consensus.
|
It seems like we have a quorum. As a C developer I'm officially crazy!
In other news I'm going to start working on a device driver at work, which should be fun. I'm wondering if the fact that I'm looking forward to it is a symptom of my insanity.
|
Working with device drivers truely is a special kind of insanity.
Good luck, may the data sheet be with you... (Although the real funny part doesn't start until you realize the data sheet is lying, or you have a different HW rev from the one described where there's a change for no apparent reason)
|
Hyrule18773 Posts
On February 25 2017 12:49 travis wrote:Show nested quote +On February 25 2017 12:35 tofucake wrote:On February 25 2017 11:51 travis wrote: it is in our class.
(in other news, I got an interview with amazon) well then your class is wrong good luck with the interview why is the class "wrong". A google search show's that it's pretty obvious there is no consensus. well then your homework thinger is wrong
|
there is something in this project I am having so much trouble putting together we are supposed to find every instance of a substring in our array of strings, and replace the substring with a new string (of varying length)
but we can't use dynamic memory allocation
it's... a bit beyond me. They didn't really explain how to do this.
So, I have an idea to start.. use strstr in a loop to find pointers to the locations where the targets are found
then I guess I need to copy the string into a new string up to that point then copy the replacement from that point then copy the rest of the original string after THAT point
and then replace the original string with my new one
but.. I don't really know how to do this
edit: I think I've figured it out using strcat and strcpy
edit: uh oh. stack smashing detected. that's new for me. think maybe I am copying too much into my string!
|
Sorry if that's a stupid question, but how do I express iteration in JS?
Let's say I have a quadratic formula, f(x) = x^2 + 1. f(0) = 1, so the next step is to find out f(1), which is 2, so the next step is to find f(2), which is 5, so the next step is to find f(5), which is 26, so the next step is to find f(26) and so on.
I'm not sure what I should even google, neither in German nor English.
|
could do it recursively, or in a loop, depending on what you need. In a loop, it's pretty trivial:
x = 0; while(<condition>) { x = x^2 + 1; //not quite sure on squared syntax in JS, it might be x**2. If in doubt, just write x*x }
|
How would it look recursively?
|
that's easy to do but what are you wanting to do with it? just print the outputs?
like, print out
1 2 5 26
etc?
|
recursive would be just as simple x = 0; function(int x) { x = x^2 + 1 function(x) }
of course you'd need to stop it at some point
note: this may not be the syntax for javascript because I don't know javascript
|
Jesus, that's much easier than I expected.
"like, print out
1 2 5 26"
Exactly. Each change to X should be printed out.
|
|
|
|