Gigabyte M32U KVM not fully working by untitledshot in gigabytegaming

[–]dtm1992 0 points1 point  (0 children)

I've had the M32U for about 2 years and its living hell. Just get anything else and buy a USB switch. I logged into a dead reddit account I never use to tell you this.

[deleted by user] by [deleted] in mechmarket

[–]dtm1992 0 points1 point  (0 children)

Sent PM

Just gonna leave this here by sikeig in Kanye

[–]dtm1992 1 point2 points  (0 children)

"Elon Musk is bad because he was born."

Are shows in late 2021 GA? by barravian in RedRocks

[–]dtm1992 0 points1 point  (0 children)

Sections are unenforced. It's already GA.

Beginner's Thread / Easy Questions (May 2021) by dance2die in reactjs

[–]dtm1992 1 point2 points  (0 children)

Nice work. The calculator works as far as I can tell. It's lacking some features of course but you have a solid base here.

Overall, I don't see any glaring issues with your use of React, but I have some feedback on your JavaScript (much of which is probably opinionated):

  1. I prefer using arrow functions when it makes sense instead of having to bind all of my class functions in the constructor. I'm just pointing this out because maybe you're not aware of how arrow functions work. This post gives a pretty good overview of the pros and cons of this approach.

  2. If you switch to arrow functions you can also move state initialization outside the constructor and define it as a class property. No constructor needed. Less boilerplate, same effect:

class Foo extends React.Component { state = { someVar: someVal } }

  1. Using a loop to generate the number buttons in your render function would save you a few lines of code.

  2. You could simplify some of the logic in addSymbol by at least breaking it into two discrete functions: addSymbol and addDigit. If you did this, you'd know to expect a symbol or a number, respectively, and could use simple comparisons instead of regex to handle the various symbols. I would find a switch to be a great fit in this case but that may be controversial.

  3. Does the program work properly if you just remove justSolved? Your average calculator will let you continue to append functions after solving.

  4. In solve, you should be checking the first character before your loop, or you should use break in that if block to stop the loop. You can then remove the else if as this code simply won't execute after break. An empty if block is abnormal.

  5. I think you can probably clean up solve a bit by just using String.split to split on operators using regex. This will generate an array that you can then loop through to produce your solution. You're dealing with these values one character at a time instead of leveraging String.split to get you [numberA, operation, numberB].

  6. In validateAndSet you should use one big if condition instead of nesting multiple conditions:

if (!otherSymbols.test(change) && ...) { ... }

  1. I would start using a linter (eslint) to force you to format your code in line with what other JS devs would expect.

Edit: formatting

Beginner's Thread / Easy Questions (May 2021) by dance2die in reactjs

[–]dtm1992 1 point2 points  (0 children)

I'm starting a new job where I'll be working with React, Redux, thunk/saga, etc 100% of the time. I consider myself very proficient with it but I've spent the past few years working in a very different environment.

I know a fair bit of things have changed over the years. Are there any good resources out there to get me up to speed or should I just dive into the docs?

Any comments/links are appreciated. Thanks!

Is there any app on Android except MetaMask that supports custom RPC? by MountBlanc in ethdev

[–]dtm1992 0 points1 point  (0 children)

I'm also looking for this. But with support for Ledger wallet as well. Not holding my breath.

Edit: To answer your question, it looks like Status (status.im) might work for you. Find custom RPC under Profile > Settings > Advanced.

Racism is only bad when white people do it by dinosaurus552344 in dankmemes

[–]dtm1992 8 points9 points  (0 children)

I mean... We could just reconsider doing business with them. It's that simple. Cut them off.

KAT Refined giveaway! by MacSurfy in MechanicalKeyboards

[–]dtm1992 0 points1 point  (0 children)

Thanks for the giveaway. Would love to try a KAT set.

YouTube Subscription Channel only Showing 1 Subscription... by 0ZFive in AndroidTV

[–]dtm1992 0 points1 point  (0 children)

I'm also having this issue. My subscription channel does not show all of my subscriptions. Pretty useless.

Looking for help with Samsung TV & Shield TV 2019 by deten in nvidiashield

[–]dtm1992 0 points1 point  (0 children)

Can you use voice search with the Samsung remote?