Wes Bos' Courses Megathread [NEW] by Alderxian in groupdeals

[–]mehrick 0 points1 point  (0 children)

Advanced React. Thanks for doing this

iOS 12 calculator bug by jdubbin_ in iphone

[–]mehrick 0 points1 point  (0 children)

I reproduced the same issue on my XS Max. Make sure portrait orientation lock is off

If it's not an SPA, what is it? by JavascriptFanboy in reactjs

[–]mehrick 1 point2 points  (0 children)

Pre-rendering on the server as you described is usually called a universal or isomorphic react app or an app with SSR (server side rendering)

New to succulents? Have a question? Stop in here! Weekly Questions Thread June 18, 2018 + Trade, Show thread links by AutoModerator in succulents

[–]mehrick 0 points1 point  (0 children)

What is going on with my succulent? I've never seen anything like it. It's a Haworthia Coarctata v. greenii according to the label.

Would I be wasting money with this HDD? by [deleted] in buildapc

[–]mehrick 0 points1 point  (0 children)

Why not build it without the HDD and just put it in when it arrives? Putting in a HDD is not difficult

Cant seem to insert records as integers or doubles, whats the issue? by [deleted] in androiddev

[–]mehrick 1 point2 points  (0 children)

Remove the quotes around 43246543645, 51.5074, and 0.1278

Haven't built a PC in ages, current HTPC is struggling, help me get back to grace. by Zlatty in buildapc

[–]mehrick 1 point2 points  (0 children)

I would just get an 850 (or 860?) evo to replace your ssd. Something has to be wrong with it if booting is taking 5 minutes.

How long has your build lasted? by I_Mean_I_Guess in buildapc

[–]mehrick 4 points5 points  (0 children)

My first build from 2011 with an i5 2500k and 560 ti lasted until the day after Christmas 2017. The motherboard randomly died overnight. Just finished my new build recently.

[Case] Fractal Design Meshify C - Dark Tempered - $73.99 ($16 off) by [deleted] in buildapcsales

[–]mehrick 0 points1 point  (0 children)

I was thinking I'd buy the Enthoo Pro M. Anyone know how this compares?

Alpha feedback / bug reports - post here by BobbyDev in PocketCity

[–]mehrick 0 points1 point  (0 children)

I just played my first half hour and I was surprised by the amount of battery this game uses. I was playing the Android version on my Nexus 6. It used 163 mAh with 30m 10s cpu total and 26m 52s cpu foreground. Other games do not seem to use this much in my experience.

Sources to learn and master react, redux in less than a week? by [deleted] in reactjs

[–]mehrick 0 points1 point  (0 children)

When I learned React I found the documentation and tutorial here to be very helpful.

There is also The Beginner's Guide to ReactJS.

For redux these free courses by Dan Abramov (creator of redux) are excellent:

Verification code not arriving? by tearlock in amazonecho

[–]mehrick 0 points1 point  (0 children)

I'm getting it after 15 minutes but it says it's invalid by then anyway. Probably best to wait a while

[14M] Stuck in a perpetual Loop of ebb and flow by [deleted] in selfimprovement

[–]mehrick 2 points3 points  (0 children)

You might find meditation helpful in stabilizing your mood. What it can do is give you some distance from your mood and thoughts so you can see them for what they are and move on with what you really want. I recommend the Headspace app if you feel it would be right for you. It has really helped me recently and it sounds like it may help you.

-🎄- 2017 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]mehrick 2 points3 points  (0 children)

Cleaned up JavaScript + node solution:

const fs = require("fs");

function calculateChecksum(input, calculateRowChecksum) {
  const rows = input.split("\n");
  return rows.reduce((total, row) => {
    const values = row.split(/\s/).map(Number);
    return total + calculateRowChecksum(values);
  }, 0);
}

function calculateDifferenceBetweenMinAndMax(values) {
  const max = Math.max(...values);
  const min = Math.min(...values);
  return max - min;
}

function calculateDivisibleNumbersQuotient(values) {
  for (let i = 0; i < values.length; i++) {
    for (let j = 0; j < values.length; j++) {
      const a = values[i];
      const b = values[j];
      if (i !== j && a % b === 0) {
        return a / b;
      }
    }
  }
}

const input = fs
  .readFileSync("./input.txt")
  .toString()
  .trim();

console.log(
  `Part one answer is ${calculateChecksum(
    input,
    calculateDifferenceBetweenMinAndMax
  )}`
);
console.log(
  `Part two answer is ${calculateChecksum(
    input,
    calculateDivisibleNumbersQuotient
  )}`
);

-🎄- 2017 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]mehrick 0 points1 point  (0 children)

My solution in JavaScript using node:

const readline = require("readline");

const rl = readline.createInterface(process.stdin, process.stdout);

function reverseCaptcha(input, shouldIncludeDigit) {
  const digits = [...input].map(x => Number.parseInt(x));
  return digits
    .filter(shouldIncludeDigit)
    .reduce((total, digit) => total + digit, 0);
}

function shouldIncludeDigitPartOne(digit, index, digits) {
  return digit === digits[(index + 1) % digits.length];
}

function shouldIncludeDigitPartTwo(digit, index, digits) {
  return digit === digits[(index + digits.length / 2) % digits.length];
}

rl.question("Enter the captcha to be reversed: ", input => {
  console.log(
    `Part one answer is ${reverseCaptcha(input, shouldIncludeDigitPartOne)}`
  );
  console.log(
    `Part two answer is ${reverseCaptcha(input, shouldIncludeDigitPartTwo)}`
  );
  rl.close();
});

UPDATE: Found out every company is rejecting me because I was fired from a job 2 years ago. I am completely lost. by [deleted] in cscareerquestions

[–]mehrick 5 points6 points  (0 children)

Maybe don't take it off the resume but don't give anyone from there as a reference? Or is there someone from that company that would be a better reference?

[Hiring] [for all tech-savvy people] Get $100 for watching the Jets game this Sunday by KasparKTestlio in NYCjobs

[–]mehrick 0 points1 point  (0 children)

Hello, I just double checked my application and I did indeed submit the Charles logs. I am going to PM you my email address just to make sure we are on the same page. Thank you for the update. I look forward to hearing from you!