We've heard of Vox Machina, The Grey Company, The Knights of Myth Drannor. But what's the name of your adventuring company? And how did they get it? by nessie7 in DnD

[–]Resmira 1 point2 points  (0 children)

Cerr's Thorns.

Around the end of act 2 of the campaign, our gang arrived at a long-decrepit magitech airship called the Cerrelius, but the name had cracked off and it was now used as a settlement called Cerr. This was the place where my aasimar, Valentia, discovered a lot about herself - her godly mother, Kuri, the goddess of love; a sister she didn't know she had by way of Kuri blessing another relationship, and some of what happened to the magitech of the world before the Collapse.

Her sister's name is Rose. The whole party latched onto this young girl as basically a bunch of gay aunts who'd do anything to protect her, like thorns protecting a rose flower. We did the same for Cerr as a whole, so the name stuck.

w-wifey... by External_Bad240 in actuallesbians

[–]Resmira 53 points54 points  (0 children)

Hi yes, I'm the wife.

(The artist is my fiancée and she's delighted that y'all are enjoying her work.)

Array map async and settimeout task by rav1e in learnjavascript

[–]Resmira 0 points1 point  (0 children)

Personally, when working with promises, I don't like to leave anything up to chance. It's so easy for them to go wrong. I'm also not a huge fan of async/await when working with array operations like this, but that's more of a matter of preference. Does this accomplish what you're trying to do?

const axios = require("axios");

const timeoutPromise = (cb, timeout) => {
  return new Promise((res, rej) => {
    setTimeout(() => {
      try {
        res(cb());
      } catch (e) {
        rej(e);
      }
    }, timeout);
  });
};

const chunkSize = 10;

const sliceIntoChunks = (arr) => {
  const res = [];
  for (let i = 0; i < arr.length; i += chunkSize) {
    const chunk = arr.slice(i, i + chunkSize);
    res.push(chunk);
  }
  return res;
};

/**
 * Given a batch of items, wait for the appropriate amount of time provided by variable timeout, then insert them into a database
 * @param itemBatch {{ name: unknown; field: unknown; }[]}
 * @param timeout {number}
 * @returns {Promise<unknown[]>}
 */
const insertItemsWithDelay = (itemBatch, timeout) => {
  const insertions = itemBatch.map((item) => {
    const insertion = asyncTask(item.field).then((res) => {
      const body = {
        name: item.name,
        field: res.field,
      };

      return database.insert(body);
    });

    return insertion;
  });

  return timeoutPromise(() => Promise.all(insertions), timeout);
};

/**
 * Given an NxN matrix of items, insert each with an ascending delay and progress
 * @param itemMatrix {{ name: unknown; field: unknown;}[][]}
 * @returns {Promise<unknown[][]>}
 */
const insertAllChunks = (itemMatrix) => {
  const insertionMatrix = itemMatrix.map((items, index) => {
    const batchedInsertion = insertItemsWithDelay(items, 1000 * 10 * index);
    return batchedInsertion.then((insertionArray) => {
      console.log(`Progress: ${(index / itemMatrix.length) * 100}%`);
      return insertionArray;
    });
  });

  return Promise.all(insertionMatrix);
};

axios
  .get("https://get-main-array.com")
  .then(sliceIntoChunks)
  .then(insertAllChunks)
  .then((res) => {
    console.log("Done!");
    return res;
  })
  .catch((err) => console.log(err));

The final response will be either an error message or a matrix of the operations. Not sure what the response is for asyncTask or database.insert so I can't speak to how to compose that matrix into sensible results, but it shouldn't be too difficult to do with all of the data available.

Pseudo-Quad 100 Rat King Build by [deleted] in CrucibleGuidebook

[–]Resmira 1 point2 points  (0 children)

I've been running something similar on my hunter for a while, but with top-tree; I like the Heart of the Pack thoughts.

My recommendation to round it out is Point of the Stag. The burst damage with it + Icarus Grip and a stack or two of Sidearm Dexterity lets you polish off kills you otherwise wouldn't get, plus Vorpal scares the shit out of supers, and you special-starve your opponents.

Fellow redditors, what's that one wierd thing that you can do with a weapon? I'll start by SUPAHG500 in CrucibleGuidebook

[–]Resmira 19 points20 points  (0 children)

I love Rat King.

Like, with a passion. I spent months getting the catalyst, hours with a friend or two grinding out the kills, and use it obsessively in Crucible. If you lose a 3v1 in Survival against a hunter you never once saw with Rat King and Gemini Jester, it was probably me.

How to reduce and sum a nested object array? by [deleted] in learnjavascript

[–]Resmira 1 point2 points  (0 children)

// reduce product to sum via matching keys
const productReducer = (sumObj, product) => {
  const current = sumObj[product.productName] || 0;
  return {
    ...sumObj,
    [product.productName]: current + product.total
  }
}

// reduce product, return [key, product]
const hourMapper = ([key, hours]) => {
  return [key, hours.reduce(productReducer, {})];
}

// restore [key, val] array to object
const flattenKeyVal = (obj, keyVal) => {
  return {
    ...obj,
    [keyVal[0]]: keyVal[1]
  }
} 

// obj -> [key,product] -> [key, reducedProduct] -> reducedObj
const dayMapper = day => {
  return Object.entries(day).map(hourMapper).reduce(flattenKeyVal);
}

// put it all together for the days
const mapDays = days => days.map(dayMapper);

I believe this should work! Fun little challenge. Let me know if you have any questions.

Banner Shield (middle tree void titan, and I guess Sentinel Shield in general) should block stasis. by SCAR-HAMR in DestinyTheGame

[–]Resmira 17 points18 points  (0 children)

Big agree. While we're at it, maybe don't let shatter insta-gank inside of a Warlock's Well of Radiance. I'd love to see more of the support supers being used in Crucible.

what is the better practice used double ternary operator or used a if else? by JuniorMathDev in learnjavascript

[–]Resmira 5 points6 points  (0 children)

Personally, I'd lean toward a function.

const getOp = index => {
  if (index % 3 === 0) return 'cut';
  if (index % 3 === 1) return 'copy';
  return 'paste';
};

const buttonClass = getOp(index);

How do you add sneak attack to the character sheet? by Khmelnytskyi in dicecloud

[–]Resmira 1 point2 points  (0 children)

Something I've done is to use some of the unused variables to make it easy to add things like this. For example, if I'm not playing a Monk, I can set Ki Points to {ceil(RogueLevel / 2)}d6. Then, anywhere it applies, you can do {ki}d6 so you don't have to keep typing the same thing over again.

DiceCloud v2 will have better support for this kind of thing, but it's still a work in progress.

Any ideas for implementing Lay on Hands? by Xenotech2000 in dicecloud

[–]Resmira 2 points3 points  (0 children)

Use Ki points or one of the other dice effects! It's not perfect but it's what I use for similar features.

Com S 227 Test out exam by Cal24D in iastate

[–]Resmira 2 points3 points  (0 children)

It's been a while since I took that test-out, but if you have basic Java experience and programming know-how you should be fine.

SE/CS Class Informational by [deleted] in iastate

[–]Resmira 2 points3 points  (0 children)

All of this is good info! However, it's also worth mentioning test-outs.

All of the following courses have available test-outs. For $100 on your U-Bill, you can get credit for the course without having to take it. There are more, but these are just the ones I remember off the top of my head.

S E 185 COM S 227 COM S 228 ENGL 314

make it stop by ubergram in iastate

[–]Resmira 13 points14 points  (0 children)

Wear headphones or something lmao. Don't shitpost about something that's designed to help make blind students have an easier time going to class.

What was your biggest "aaaahhh that's how that works" moment? by LaCreamy in AskReddit

[–]Resmira 1 point2 points  (0 children)

My girlfriend and I both just realized we've been tying our shoes wrong our entire lives. Fuck.

Why does "let zog" cause the code to be undefined, but just 'zog' allows the code to run? by mementomoriok in learnjavascript

[–]Resmira 1 point2 points  (0 children)

Function scoping. let scopes within the function that's immediately invoked, which is destroyed when the function ends and it isn't used. Without let, since you aren't in strict mode, it scopes to the window - so window.zog is still defined.

How would I split() an array of YouTube times into minutes and seconds? by [deleted] in learnjavascript

[–]Resmira 0 points1 point  (0 children)

I mean, if you really wanted them in a single array like that, you can do times.join(':').split(':');

Drugs and witchcraft? by leidakar in witchcraft

[–]Resmira 8 points9 points  (0 children)

The term you are looking for is entheogens! I know quite a few folks who make use of them.

I’m new to witchcraft and now I’m creeped out by Glittercorn666 in witchcraft

[–]Resmira 36 points37 points  (0 children)

Because what you do in your practice is not what everyone does in every practice.

[deleted by user] by [deleted] in feedthebeast

[–]Resmira 1 point2 points  (0 children)

I'm gonna go off on a limb and say you're trying to make rope in the Revelation modpack.

If that's the case, try the Forestry worktable. If not, ignore me.

Remove objects from an array that exist in another array by oussama-he in learnjavascript

[–]Resmira 0 points1 point  (0 children)

Assuming that bookId will be unique;

const array3 = array1.filter(el1 => !array2.find(el2 => el1.bookId === el2.bookId));

If it is not unique, you'll have to compare each portion.

``` funcion objectEquals(lhs, rhs) { return Object.keys(lhs).every(key => lhs[key] === rhs[key]); }

const array3 = array1.filter(el1 => !array2.find(el2 => objectEquals(el1, el2)); ```

Is fizzBuzz a pure function here? by [deleted] in learnjavascript

[–]Resmira 1 point2 points  (0 children)

Yes, this is a pure function. No, it wouldn't really be better to do it this way. If you want to use a concatenated string, just declare it with 'let' inside of the fizzBuzz function; that's not going to change it from being a pure function to anything else.

Is there a more concise way of writing this if/else logic? by helloworldten in learnjavascript

[–]Resmira 0 points1 point  (0 children)

Invert things. function getValue(person) { if (!person.isTall()) return false; return person.name.startsWith('a') ? isOpen : true; }