|
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 28 2017 10:02 Blisse wrote:Show nested quote +On February 28 2017 08:59 Hanh wrote: I forgot where but I remember reading or watching something where someone got mad at how so many programmers seem to have random coding preferences, like putting the comma in front. I get why, but I still find it hilarious to look at.
What is funny? The people who get mad or the comma in front? The thing I referenced was a funny rant. I personally think commas in front look hilarious.
I take it that you never had to write SQL
|
Hyrule18969 Posts
My queries don't have front commas...
|
On February 28 2017 05:32 travis wrote: I am pretty frustrated For my interview with amazon, I was sent an email and had to RSVP to a 2.5 hour coding assessment. I assume they invite however many students through it, and it's a series of challenges.
I followed the link to the RSVP and filled stuff out, and then when it was time to click if I could make the time or not, I somehow clicked "I can't make this time". I really don't know how... I really feel like I clicked the right thing but whatever.
So anyways it takes me to the next page, and i want to go back, and there was literally no way to go back in the form. The only option I had was to fill out as my reason for not making it "I do want to RSVP, I misclicked and can't go back in the form."
I emailed the recruiter about it but I just have this bad feeling he's never gonna check the email and I am going to miss the event.
You're supposed to have RSVP'd by the end of the day today, too.. Damn, that sucks. Yeah, I made a post sometime last year complaining about their horseshit recruiting process. Completely fucked system, and it wasted probably upwards of 3-4 hours of my time by breaking in the middle of a followup assessment, not to mention having some of the worst fucking conditions ever (they contract out to some terrible online proctor service) and use some of the most useless testing metrics I've ever seen. Sorry to hear about it, but yeah, as Blisse said, congrats on getting interest from them in the first place at least. >.<
|
|
|
|
Yeah, about that... how can I get the termcolor module to work in cmd.exe (win10)?
|
|
Interesting! I actually posted the question before going for a smoke because I just tried termcolor and it didn't work right away. 
I shall try this, thanks!
[edit] Amazing, works, thanks again.
|
Anyone here tried ubuntu on windows? It seems nice to have a unix shell however the terminal they provide just sucks...
|
Germany2686 Posts
You should be able to use any terminal you want, just use bash
|
Hyrule18969 Posts
On March 01 2017 05:45 sabas123 wrote: Anyone here tried ubuntu on windows? It seems nice to have a unix shell however the terminal they provide just sucks... it has issues with docker and vagrant which make it not really useful to me
|
On March 01 2017 05:45 sabas123 wrote: Anyone here tried ubuntu on windows? It seems nice to have a unix shell however the terminal they provide just sucks...
I use WSL (windows subsystem for linux) just for the nicer zsh shell versus janky solutions like git bash. Too much isn't supported, for example that mkfifo stuff a couple pages back compiles in WSL gcc but doesn't run since the Windows bindings don't exist. So anything that accesses network interfaces essentially will not work, so it has limited real world usage, and it's technically still in beta so big projects haven't moved on to adapt them. They're soon adding the ability to actually launch Windows programs from WSL, which will be great for pushing things forward. Currently you have to run a background daemon to do it.
However if you don't need any of that, such as writing simple programs like interview practice or some school work, it's great as-is.
I run ConEmu which launches a zsh shell, changed some settings, and it's basically similar to other Linux-based terminals I've used - I live do without the fancy windowing features and the better copy&paste. This is what mine looks like. I'm a huge fan. (blanked out my name)
![[image loading]](http://i.imgur.com/Rzx3ECo.png)
edit: Also want to mention I used cmder for a while before switching back to ConEmu. It looks and works great out of the box - worked for a long while, until it didn't... and I couldn't fix it with a re-install so I switched back.
|
Would it be possible for anyone to explain what is going on in this practice question for me?
Question: The prototype of a function is
int *select(void *data);
Define a function pointer variable named fptr that can be assigned the function fptr = select
Answer:
+ Show Spoiler +
So I have no idea wtf is going on here. Like, absolutely no idea. I also didn't even understand the question.
so our function pointer is int because the function type was in? And the (void *) in the function pointer means what exactly? Does it have to do with the void pointer parameter in the function?
|
int *(*fptr)(void *);
is read: fptr is a pointer to a function returning int* that takes in a single parameter of type void*.
int (*foo)(float)
is read: foo is a pointer to a function returning int that takes in a single parameter of type float.
also another thing I grumble about, putting a space between the type and the pointer asterisk. Keep them together! It's type information >_>
int* (*fptr)(void*);
|
perfectly clear, thank you
|
Hyrule18969 Posts
On March 01 2017 11:50 Blisse wrote: also another thing I grumble about, putting a space between the type and the pointer asterisk. Keep them together! It's type information >_>
int* (*fptr)(void*);
I disagree. The asterisk goes with the specific variable because it only applies to one, e.g.:
int *a, b;
int* a, b;
both are the same semantically
the first line makes it clear that only a is a pointer, whereas the second line implies that both a and b are pointers while only a is
|
Man, the new JetBrains stuff is quite astounding. I really like the function parameter name hinting and thanks to the editor backgrounds I now have my neighbor Totoro watching over my code at all times 
![[image loading]](http://i.imgur.com/AILslRJ.png)
|
On March 01 2017 13:01 tofucake wrote:Show nested quote +On March 01 2017 11:50 Blisse wrote: also another thing I grumble about, putting a space between the type and the pointer asterisk. Keep them together! It's type information >_>
int* (*fptr)(void*); I disagree. The asterisk goes with the specific variable because it only applies to one, e.g.: int *a, b;
int* a, b; both are the same semantically the first line makes it clear that only a is a pointer, whereas the second line implies that both a and b are pointers while only a is
I have "no multi-variable declaration on the same line" and "no uninitialized variables" rules that makes it so I have never encountered that situation :d
|
|
|
|
|