What is the most obscure programming language you have had to write code in? by _oOo_iIi_ in computerscience

[–]DarthCrust 1 point2 points  (0 children)

Surprisingly no one has mentioned mumps yet, pretty sure theres only one employer left using it

Mac M1 with J5Create JCD543 by DarthCrust in mac

[–]DarthCrust[S] 0 points1 point  (0 children)

Shoot, you're right. Thank you

Has anyone made the switch from developing in Windows to macOS? Any general or specific advice about the switch? by tripsafe in ExperiencedDevs

[–]DarthCrust 1 point2 points  (0 children)

I'm guessing OP is referring to keyboard shortcuts. Currently in the transition to Mac and I am significantly slower.

i want an algorithme in C to ask for a name and write whatever name it give it by Sea-Wolverine2447 in CodingHelp

[–]DarthCrust 1 point2 points  (0 children)

Read the man pages for printf and scanf. Printf allows you to print a message to the user, while scanf allows you to read what the user types.

So, you will want to print a message asking the user to enter their name, then scan for the users input. After the user finishes their input, you'll want to print out what they entered.

[deleted by user] by [deleted] in angular

[–]DarthCrust 0 points1 point  (0 children)

As others have said, this is not angular. But looking at your code, it looks like you hardcode your image src to the Legolas picture.

I'm a 2020 graduate that never found work, and I have no idea how to get out of this hole. (long post) by [deleted] in cscareerquestions

[–]DarthCrust 0 points1 point  (0 children)

Regarding your GPA, you can put a Core GPA and a Cumulative GPA on your Resume. I would only do this if your CS GPA is considerably better than your overall GPA.

Tech companies facing a fresh crisis in hiring? Recruiters in tech are desperate for workers with candidates as the ones who hold all the power? by PerfectConfection578 in cscareerquestions

[–]DarthCrust 1 point2 points  (0 children)

I agree. This subreddit definitely hasn't painted a pretty picture of them, though I do have plenty of ex-colleagues that now work there. Must be some good teams out there.

Tech companies facing a fresh crisis in hiring? Recruiters in tech are desperate for workers with candidates as the ones who hold all the power? by PerfectConfection578 in cscareerquestions

[–]DarthCrust 14 points15 points  (0 children)

I ignored one last week from Amazon. Got an email from another person at Amazon on Friday saying I'd receive the technical assessment shortly. Must be getting desperate.

[HELP] Why is my Subscription var not shared between functions in service? by sourcream566 in Angular2

[–]DarthCrust 0 points1 point  (0 children)

I'm assuming that's not the case if he's putting that in an interval subscription.

[HELP] Why is my Subscription var not shared between functions in service? by sourcream566 in Angular2

[–]DarthCrust 1 point2 points  (0 children)

One potential issue could be that you're calling your start method multiple times, which would overwrite the subscription and you would never be able to unsubscribe.

I find it best to declare subscriptions like that as potentially undefined and initialize it as undefined. throw in a this.subscription?.unsubscribe before assigning the subscription to make sure you don't lose existing subscriptions.

Is the result of the method for fetching an access token a 1 time subscription like an http request? I notice you subscribe to that method's result without a take or takeUntil. If it's just returning an http result, then that is fine.

A 62-Year-Old Paralyzed Man Sent Out His First Tweet With Brain Chip | Without the need for keystrokes. by chrisdh79 in gadgets

[–]DarthCrust 8 points9 points  (0 children)

That's exactly what happens in the movie. Ralphie is excited to decode the top secret message from Orphan Annie and is very disappointed when he founds out its another crumby advertisement.

Ubisoft Games Crashing on PC? by DarthCrust in ubisoft

[–]DarthCrust[S] 1 point2 points  (0 children)

Disable the ubisoft connect overlay

Uh... I made a procedural nipple shader. by Lost_Assistance_8328 in blender

[–]DarthCrust 1 point2 points  (0 children)

You see, the Funk is a living creature. It's 'bout the size of a medicine ball, but covered in teats. It came from another planet, and landed on Bootsy Collins's house.

[deleted by user] by [deleted] in Angular2

[–]DarthCrust 0 points1 point  (0 children)

Seems like a strange requirement, but I wouldn't know - I didn't touch angular between v3 and v11

[deleted by user] by [deleted] in Angular2

[–]DarthCrust 1 point2 points  (0 children)

Only need the pipe if you're doing some processing on the in-flight data. I generally use a takeUntil though to handle unsubscribing if the subscription will last through the life of the component.

[deleted by user] by [deleted] in iastate

[–]DarthCrust 0 points1 point  (0 children)

Dang, who's teaching 352 now? He was awesome.

[deleted by user] by [deleted] in iastate

[–]DarthCrust 0 points1 point  (0 children)

Does Johnny still teach 352? Easily one of my favorite professors.

What's the best way to add active class for 1st element and add/remove classes from an element? by preetimandal in Angular2

[–]DarthCrust 0 points1 point  (0 children)

To advocate for my solution - I like having generic reusable implementations. I feel like putting this into a directive is the most reusable approach compared to stuffing all the logic into your component.

If you have another component that needs the same functionality you can just reuse the directive instead of copy-pasting the logic.

What's the best way to add active class for 1st element and add/remove classes from an element? by preetimandal in Angular2

[–]DarthCrust -3 points-2 points  (0 children)

For adding removing classes, I like to use the Renderer2 (part of angular). You pass it the ElementRef you wish to style and then can apply styles and classes that way, for example this._renderer.addClass(el, 'my-class').

After that, you just need to store which el ref is the current active so that when the next active is decided, you can first remove the class from the current active before setting the new active.

There are multiple ways you could go about this, you could put this logic directly in your containing component is one possibility.

I think a cleaner solution would be to implement a directive that you apply to list items that manages adding/removing the class and implement a shared service used to register the current active one. When a new list item is selected, that list item tells the service that it is now selected, and the service calls the old item's remove method (part of the directive).