For 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...
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.)
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.)
yet, I have to figure out why you are doing deptartmentCheckArray.push(isNONF,isCHILL,isFRZ,isConvenience,isFresh,isXDOCKPROMO,isXDOCK,isStockOnFloor,isFuture,isFood);
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?
I'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...
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
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
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.
I 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**,
**...
Given 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...
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.
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.
@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
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
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
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
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
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.
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"?
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