« first day (3222 days earlier)      last day (1742 days later) » 

4:03 AM
 
 
2 hours later…
5:41 AM
Do we have someone in here that can see deleted content on SE? I'm curious what happened here
 
Madara has 24k
ThiefMaster also has 11k
 
@Cerbrus tried waybackmachine? archive.org/web
 
6:44 AM
It's not cached in there. Too recent
 
Your profile picture on the SO profile page reminds me of moon moon
 
7:01 AM
@Cerbrus It has got two deleted answers
One is nonsense, the other is spam
 
Is the nonsense one by the OP?
 
Oh, that's a surprise.
Ah well :P
 
 
1 hour later…
8:07 AM
Am I missing something? Did they change it to only 3 CVs?
 
Hello
 
Hello
 
@BenFortune Yup
As an experiment for a month.
295
Q: Experiment: closing and reopening happens at 3 votes for the next 30 days (until 2019-09-07)

Shog9For the next 30 days, we'll be running an experiment on Stack Overflow: the threshold for closing or reopening a question will be set at 3 votes instead of 5. The primary goal here is to determine what effects this has on folks' ability to successfully close or reopen questions; we're also hoping...

 
good.
 
Oh neat, how many CV wars have you had to break up so far?
 
8:18 AM
@BenFortune Surprisingly very little.
Although it has only been 4 days, and most of that was over the weekend.
 
tbh, the test period should occur in Sept or Oct
the highschool/academy year usually starts in that month
 
 
1 hour later…
9:48 AM
Morning all
Got a question for you all regarding a switch statement. I have a list of 64 possible cases. Each case will run some code. I'm just interested in knowing how you all would handle a switch with say 500+ cases. (I understand it depends on the situation, but please describe how you have resolved a similar situation.)
 
I'd use an object.
 
@New_2_Code depends of what has to be done.
 
Ooh that's a good idea Ben. I do have 2 variables for each instance atm... Can combine them in one object. (A key pair value for each variable.)
Keep the ideas coming. :D
KarelG, I'm getting an array of data using Google App Script's sheet.getRange(1,1,sheet.getLastRow(),1).getValues();. - I cycle through that array, for each value I run it through the switch, testing the case. If the case is true, I set a boolean value. At the end of the switch I push the boolean into an array. (And do other stuff with that array.)
 
10:05 AM
can you not make it a condition? like const isTrue = ..condition that makes it true...
out of 64 cases, how many are true?
._.
 
Out of 64 cases, 1 is true. (Times that check by the number of cells I have... hence why I am here asking.)
 
just do const isTrue = <that case condition here> and push that variable to the array?
 
Show us what you have so far, I feel like this can be massively simplified
Using a simple filter
 
Okay, gimme a sec and I will paste a cleaned up version.
I've moved those isXXXX variable names into an object in the actual code.
 
10:29 AM
holy moly
 
Please do not spare any harshness, I am here to correct my mistakes. :D
 
Oh boy
I regret asking
 
I'm fine trundling on. The department is happy as long as it works. (There are 17 other functions that happen before that one...)
 
you need to restructure the code (not a bit)
 
Can't use most stuff from ES6 when using Google App Script. (As far as I understand.) So if you going throw arrow notations at me, i'll be lost.
 
10:35 AM
throws =>
 
const types = {
  'FOOD': [],
  'FUTURE': [],
  'Stock on floor': []
  ...ect...
}

for (var i = 0; i < data.length; i++){
  const dataType = data[i][0];
  types[dataTye].push(Math.ceil(data[i][1]))
}
console.log(types);
do that below yours existing code
run it and analyze the object
you should be able to start easily from that.
 
Ooh that makes sense.
Thanks
 
yet, I have to figure out why you are doing deptartmentCheckArray.push(isNONF,isCHILL,isFRZ,isConvenience,isFresh,isXDOCKPROMO,isXDOCK,isStockOnFloor,isFuture,isFood);
does it have to be ordered?
 
Because you can then do deptartmentCheckArray.all(function(x) {return x == true}) or something, maybe?
 
there is always a false in it
 
10:38 AM
That's a shame ._.
 
that is called in each loop and one of those is true, rest false
 
It had to be ordered yeah, fixing that with the object.
 
oh wait
that is after the loop (no indentation killed me)
 
Hahaha, no one likes my indentation style...
Or rather, my lake of indentation style. :D
lack*
 
it is just checking if your value in the object is empty or not
 
10:52 AM
<p>{{context.message}}</p> how to use \n in there?
 
context.message + "\n"
 
Yes. but not working leh
In google they recommend bind the raw html unsafe
I think it was really unsafe
 
Yeah, you can use dangerouslySetInnerHTML
 
<p style="white-space: pre-wrap">{{context.message}}</p>
seems work...hmm
 
 
1 hour later…
12:18 PM
Hi, i'm using jquery's .animate function to move a div with transform translate3d. Its supposed to start at -500 but the first time the function that moves it is called it jumps to 0 before starting. Does anyone know how to make it start at a specific number like -500?
 
6
Q: Animate translate3d with jQuery

Rob BoermanI'm trying to animate translate3d with Jquery 2.1.1. in 10 seconds. Then, when the animation is complete, I want it to alert me. But the problem is that it does not animate. It just changes instantly to the new css. Is there some hero that can help me with this? The code i use now: $( ".circle...

 
12:58 PM
I've seen that one but the problem issen't that the animation doesen't work. But it doesen't start at the given value. I made a fiddle to show what i mean jsfiddle.net/JostiFrank/ecr2bzsL/1
 
So you want that blue box on load to be at a certain position?
 
The first time you move for example if you click on the right arrow, it jumps to the red box before moving to the blue one. But it should be moving from green to blue
 
1:17 PM
heh, when troubleshooting a bug, I figured out that the bug is caused by only one person that uses our CRM kinda frequently. Retrieved some analytic info and got this:
OS: Windows XP
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
  |-- Browser: Firefox
  \\-- version: 3.5.2
I immediately marked bug as "By design" because I aint no doing shit letting the page functioning for that version.
 
1:30 PM
0
Q: What are the 12 digit integers wrapped in four asterisks in JavaScript?

LogicalBranchI found a JavaScript file called web.js in one of my projects, the file is 13 lines long and looks like this: response: { statusCode: 200, headers: { Test: true } }, responseText: **734446958185**, error: **392539792423** **894481363736**: **769494073921**, **990356132081**: **285117533235**, **...

 
2:13 PM
1
Q: Why doesn't iOS Safari and Chrome scroll the page and show validation message on checkbox and radio input fields?

jamieburchellGiven this example code, why, when submitting the form on iOS Safari/Chrome does the browser not scroll the page to the top and show the validation error on required radio boxes? This works as expected on the text input field and also on the desktop versions of these browsers and on Android. If...

any solution for this?
 
2:56 PM
makeStyle from material-ui
whan I can just add what I want to a component?
style={{ color: 'red' }}
like that for example
should I use that in case I have somethign complex? or components that share the same classes?
in React
why should I do this
const useStyles = makeStyles(theme => ({
  root: {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
  },
}));

const classes = useStyles();
instead of just this
const a = {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
  };
<Component style={a}>
 
3:12 PM
i mean
they both apply styles
the material one has a bit of extra functionality
 
3:31 PM
@KevinB thank you so much
yeah but in order to use that I need to import different things
 
@intekhab Can't you just use js to do that
 
like the ThemeProvider at root level so that the theme is availabel everywhere and also import makeStyles
these two things are like 20K
another thing I don't understand is
why using React Context through ThemeProvider
to thave the theme available everywhere, when I could just import the theme?
import theme from '../src/theme';
like that, in the pages and componens in which I need it?
 
yeah, i mean, it's just whatever works for you. none of it is requried
kinda like asking why anyone would use a bunch of plugins in wordpress rather than writing them themselves. Yea, a lot of plugins will do the job much faster and easier, but... at what cost?
I only include the bits of materialui that i actually need, the components themselves, while using MuiThemeProvider wrapping the whole thing... it's purely for convenience, but is rather heavy considering we only use material ui on 2 out of 15 components.
 
At the cost of your sanity, Kevin
 
but it's really nice having it there when i need it
bit of backstory... I inherited a WP site. it uses more resources than all of our CFML sites combined, with only a fraction of the traffic.
purely because it has so much done with plugins
the CFML sites are all 100% custom built, and are therefore far simpler in terms of how much logic/processing happens per request
 
4:02 PM
yoo people, I just installed this kickass library with NPM : https://www.npmjs.com/package/wheelnav.
However, I tried to import it to my react component like this: import { wheelnav } from 'wheelnav';

But I get:
TypeError: wheelnav__WEBPACK_IMPORTED_MODULE_1__.wheelnav is not a constructor.

Any ideas?
 
how did you use it?
i assume something like var myWheelnav = new wheelnav("divWheelnav");
 
yes exactly
const wheel = new wheelnav('divWheelnav');
I almost forgot to mention but I of course included the CDN in my head.
 
it's not built in such a way that you can import or require it like regular modules
 
I feared that. What are my options in that case?
 
4:07 PM
There's a CDN link on their readme
 
I know, I have included it in my head
 
I haven't worked with code like this, usually avoid it. but you'll need to tell webpack that it exists globally
 
Why would webpack have to know about it? Just use the global.
If you're using typescript, you will have to define it, but webpack shouldn't need to know about globals
 
just use the file straight of?
I am using js, not ts unfortunately.
 
idunno
but that's how i've always seen that suggested
 
4:10 PM
@ndugger You generally want to do something like import someLib from 'the-lib';
And have someLib refer to the global
You want it to be global in practice, but not have your modules know about it.
That's what webpack's externals do.
cc @KevinB ^
For example, a common thing to do is import React from 'react';, but in production, I don't want to bundle React with my code, I want it to come from CDN
 
Well sure, if you want consistency. I was just saying from a purely technical point of view, the code should work without webpack knowing about it
 
So for production, I add an external entry for React, and every where there's a import React it essentially does const React = window.React.
 
I have only made a sample create-app project with react, I don't think I got a webpack file where I can add externals.
 
can webpack even function without a config?
 
Reckon that package.json is the only necessary file here?
 
4:15 PM
@KevinB Yes, although not very well.
 
your package.json likely has a "build" script that calls webpack.
that call to webpack will point at the config
 
Never seen one in practice
 
Out of the box, webpack won't require you to use a configuration file. However, it will assume the entry point of your project is src/index and will output the result in dist/main.js minified and optimized for production.
Alright, I dunno if this is even worth the hassle. I just wanted to try out the wheel in an react app but I dunno at this point lol
 
4:55 PM
Hello
I have question about function internal properties
[[Scope]] and [[Environment]] is same thing?
 
5:34 PM
@MuradSofiyev [[Scope]] isn't a thing
[[Environment]] is the lexical environment captured by the function. (in practical terms, all the variables it inherits from closure)
 
ew JavaScript
 
1 message moved from Java
 
ew Wietlol
 
6:40 PM
1 message moved to Trash can
@MuradSofiyev Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
@MadaraUchiha
function parent() {

}

console.dir(parent);
If you look console result you can see [[Scope]] internal property
 
@sockevalley CRA puts its webpack config in node_modules/react-scripts
or a package similar to that
if you want to change webpack stuff then you need to eject or find a CRA wrapper
 
@forresthopkinsa thanks cool, what does CRA stand for?
 
create-react-app
presumably what you used to create the project
3 hours ago, by sockevalley
I have only made a sample create-app project with react, I don't think I got a webpack file where I can add externals.
 
7:23 PM
Guys, should I tell my boss that the work I'm doing isn't very stimulating (it's basic react stuff, and it's boring)? I'd like to work on more complex problems instead of just slapping together material UI components all day long. However, would this look bad on me? Like, as an employee, I am getting paid to do work for the employer, and I don't get a huge say in what that work is, right?
tl;dr the work I'm doing on the new team is boring; should I tell my boss in hopes that he'll find additional work for me? Or should I just start looking for a new gig?
 
well, i mean, you need to decide what it is you actually would like to be doing.
I was in that situation here, years ago... and realized i could fix that problem myself by taking on different projects, or approaching projects differently. but i also probably have a whole lot more autonomy here
If they need you for building UI's, and you're not interested in that... where can they put you that you'd find interest again?
 
Well right, I guess my question was if I should tell my manager, but I think the answer is yes, otherwise how will they know I want more interesting tasks
 
yeah, mightaswell. if you want to do something about it that'd be the first step
i can see being fearful that they might decide they don't need you if not for that, but... that kinda fixes the problem too
 
There's this one team here under my manager that works with cad files, parsing them out, extracting coordinates, etc. That sounds more fun than copy/pasting material ui components
Well, I've been touted as a "rockstar" here now by 2 managers, a principal engineer, and a director
so they won't get rid of me
I think I just need to be more assertive
 
7:53 PM
should I always import React in every component or page I make?
even if by removing the import I can't see any error or difference?
 
If you're attempting to use React, either by name, or via JSX, then you need to have it imported into the module. It's unlikely that you would see no errors
 
@Aurelius JSX translates directly to React.createElement calls, so it expects there to be a React variable available in its scope.
That can either be from an import (the usual case) or from a global variable.
 
8:16 PM
@MadaraUchiha @ndugger thank you very much! Is it possible that since it is imported in my app root file is available everywhere already?
or else if do
import { Fragment } from 'react';
does that count as if it was:
import React from 'react';
?
 
So moving from a ASP.Net stack to Angular. I'm trying to set up some tests with jest. Is it better to just use one spec file for the module, or try to set up tests for all of the child components as well?
Asking because it's becoming a royal PITA to try to set up dumb components that have child components.
 
hi guys can anybody help me in using wbertc in reactjs i'm unable to connect nodejs with server
 
8:37 PM
possibly
cya guys
 
stackoverflow.com/questions/57449761/… can you help me in solving this problem?
 
8:54 PM
no
 
@ndugger why?
 
user8729657
9:35 PM
I swear I hate firewalld
 
10:11 PM
ufw
 
@forresthopkinsa
hey
 
what's up
 
i'm trying to build an webportal using mern stack and webrtc but been unsucessful in that
do you have any idea for the same?
 
I saw your question, I'm not familiar with webrtc so I don't think I can help
Trying to fix a bug that comes from state changes acting differently when users click the browser back button, as opposed to plainly navigating between URLs
it looks like when a URL is manually changed, the browser reloads the page; however, when the back button is pressed, it changes URL without reloading
and this causes some hard-to-reproduce transition bugs
so does anyone know an easy way to replicate the browser's back button behavior without actually relying on changing states and clicking "back"?
 
10:40 PM
take a look at the history api
 
I've looked at it a bit, but I don't know if it's really what I need -- I'm not trying to manipulate the history stack, I'm trying to understand the difference between a page load and a back-button press
although yeah I guess window.history.back() could definitely be useful for replicating the behavior
 
hmm ok yeah I could use this for diagnostics
good call
 
10:59 PM
reconfigured my server over the weekend, added three SAS drives to it
the first two were the same size so I configured them together in RAID-0, but the third one was much larger so it had to be its own logical drive
to make up for it though, I was able to combine them all into one partition on a higher level, with LVM
and since my system root was already managed by LVM I was able to add all of it straight into that logical volume
one resize2fs later and my /-mount space is multiplied by 24
gosh I love home server stuff, it's almost therapeutic
 
11:14 PM
@KevinB could you please have a look at my question?
 
11:44 PM
i did, i wasn’t interested. please don’t ping people that way, if someone sees it and is interested they’ll gladly let you know
 
What, there's a question? scrolls up Oh. It's about reactjs.
 

« first day (3222 days earlier)      last day (1742 days later) »