@Shog9 just for the record, my comment about a CM etc etc was not intended to come off as supporting threatening behavior, it was simply trying to drive a point that said user causes issues (etc) and when questioned, we usually default to what past things have been said, in this case it was you saying we have the liberty to kick appropriately. That’s all, apologies for the confusion.
Hey Guys! I have a simple question but can't really get my head around it today..
What would be the cleaniest way of doing this:
My string looks like this: size-42 colour-black escarpin blabla
I would like to extract the "colour-black" to set a variable with it. This one can be in any position, I mean it can be at the end after blabla or the first occurence of the full String.
However I have the "colour-" variant already setup
so how do I slice the part of my string containing "colour-xxxxxx"
@BenFortune because it doesn't work, and it gives me an extreme sense of pain and of being caged into their uber opinionated framework and way of thinking
The reply allowed html style with inline button but unfortunately it is not possible to use markdown style with inline button.
const inlineButtons = () => {
const inlineLinks = [
{
title: 'Google',
link: 'https://www.google.com/',
},
{
title: 'DuckDuckGo.com',
...
@KarelG Thank you but I am basically living my life on that page, it doesn't work becasue the custom server.js file it gets completely ignored even if you change the script
you can put anything in there but the server is ignored
so this page which is supposed to get the data from the server by the id parameter it doesn't get anything
today i have written a piece of code that uses a boolean variable with three states, null, true, and false, the var is called testWasTakenSuccessfuly it starts with null value, so the modal is not shown, and when the process gives a error i set it to false, otherwise, if the process goes well, i set it to true
the modal is used to show error or sucess message, it only appears when you have a trueor falsevalue on that variable, otherwise, when null the modal is not shown.
i want to know if it is a good practice to use that only one boolean variable to handle that
this is also another huge drawback of next.js because you can make a beautiful working application but when you deploy it everything you have done goes to the trash
@BenFortune so yeah in localhost everything always works very well
Hi, I've got question regarding downloading files from server and opening it in client. How could I open particular file in preview mode in application responsible for handling particular file's filetype? I.e. when downloading excel sheet, I'd like to open it in Excel right after downlaoding to local, when downloading .csv I'd like to open it in i.e. Notepad.
Is there any builtin method which automagically handles and decides which app should be invoked?
My question is about Javascript Good Practices, that is, i am using a boolean variable that is having three verified states, null; true; and false and i am using these three states to verify wether a Modal is not visible, is on Success mode or is on Error mode.
but since a boolean is meant to have two states usually, true or false only, so i doubt if using the null state as a thing, also, is ok.
i have two checks, `if (booleanVar === false) show error modal` `if (booleanVar === true) show sucess modal` otherwise the value is `null` and it does not enter in any of two ifs
so the modal is not shown.
this way i am using only one variable to control modal behaviour
@PauloRoberto I personally prefer using maps when I have more than a true|false scenario i.e. ({"1": ()=>{...}, "2": ()=>{...}...}[currentCase] || (_=>_))()
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: start
4 verbose stack at run (C:\Users\eduardo.herrera\AppData\Roaming\nvm\v10.16.0\node_modules\npm\lib\run-script.js:155:19)
4 verbose stack at C:\Users\eduardo.herrera\AppData\Roaming\nvm\v10.16.0\node_modules\npm\lib\run-script.js:63:5
@ndugger Really? But with the second one, to find Corn you have to iterate through the entire list and sub list, but with the first one, you just iterate once.
node index.js
body-parser deprecated bodyParser: use individual json/urlencoded middlewares api\auth.js:16:12
body-parser deprecated undefined extended: provide extended option node_modules\body-parser\index.js:105:29
body-parser deprecated bodyParser: use individual json/urlencoded middlewares api\routes.js:35:11
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open 'C:\Users\eduardo.herrera\codes\codefrompanama\ssl\ssl.key'
at Object.openSync (fs.js:443:3)
at readFileSync (fs.js:343:35)
@samayo I do understand what you're saying, but you're wrong. The way you've structured the data you now have to do what you're claiming you have to do with the second way
Plus, I don't think the interviewers wanted you to change their data layout
I'm desperately trying to clone a blob in javascript without using an external library (such as jQuery).
I've tried JSON.parse(JSON.stringify(blob)) without success.