« first day (2868 days earlier)      last day (2305 days later) » 

00:00
i think he got banned for being unwelcoming to a vampire and decided he didn't want to be a part of this anymore?
Oh
Probably should unban him then
he comes around occasionally
Aug 1 at 14:28, by ndugger
What kind of diagram is this called usually? https://i.redd.it/li02cubsgo0z.png
@ndugger come back idiot
Jul 31 at 19:28, by ndugger
> Catherine Kuck
00:36
Finally home
Hi there! I've got a jquery validator issue. I'm working on a form that when the user hits the button, it sends credit card data to the gateway server who returns a token, then the form it's submitted to my server. But in order not to submit the cc and ccv data to my server, I delete those values just before submitting the form. However, jquery validator stops the submission because these two fields are not filled anymore. How do I get around this?
Attended the first say of Software Engineering today
Hi
Hi all, has anyone had any experience with the Veracross API? I am struggling with one part of it, and the documentation is very vague. Thanks.
00:42
@gkgkgkgk Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
01:02
Hello, did you try web speech api?
01:31
When react says `Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application`
is that an actual permanent memory leak or do they just mean that the component can't be garbage collected until the pending promise resolves?
(assuming the warning comes from some kind of fetch().then(setState) data loading thing
01:51
@david It could mean many things, for example if you have some code like
foo.on('bar', (args) => this.setState(args));
unless some weakmap magic happens somewhere (which I don't think it does)
it's always promises, no event emitter type things that would hold on
@david the only way you'll know is if you simulate an extended run
i'm prettttyyy sure that once that promise resolves nothing should reference the unmounted component
just give it a few 1000 cycles of moutn and unmount and see if it bloats
@david possible
hmm, i guess so
it happens when we change routes too quickly
i could just automate that for a while
 
3 hours later…
04:31
@SomeGuy o/
05:00
Facebook?
05:52
im unable to get webpack/babel/npm to compile JSX
@AlexBollbach Are you using create-react-app?
i installed babel-preset-react, babel-env, babel-loader. i created a babel.rc file. i connected to that in my webpacks loader rule
no
a lot of things changed w/ babel, webpack and npm since the last time i boot strapped a projects
so it just says i might be missing the relevant loader
Honestly I would just run create-react-app, remove the service work and load your code into it's entry point. I think that's what even the react website advises, but I'll try to help you out if that's not an option.
i would not run create-react-app
if you're capable of bootstrapping yourself it's far more rewarding, and easier to maintain too
@david yay doing things the hard way lol
05:56
i'm a masochist i'm too far in to turn back
i've bootstrapped 5 times before
that last one has been a tough one
a bunch of babel packages in one node_modules@babel/ . what not?!?
@AlexBollbach nonsense too far lol. Let me just get the file that I know will do what you want and present it to you lol.
it says its missing a loader, i want to know which
I think that this will probably have something yours doesn't.
i see babel-plugin-transform-react-jsx sitting in node_modules
what does your babel rc file say?
you want to have 'react' in the presets
and you want to have a use: babel-loader in your rule for js/jsx files
that should in theory be enough
06:04
{
presets: ["env", "react"]
}
1 message moved to Trash can
@AlexBollbach Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
rules: [
      {
        include: path.resolve(__dirname, "/src/index.js"),
        test: /\.js$/,
        exclude: /node_modules/,
        query: require("./babel.rc"),
        loader: "babel-loader"
      }
    ]
why do you have that include entry?
doesn't that mean it will only compile /src/index.js?
i'm not sure what that query line does either... we don't have that
but if you need it to load the config then f ine
@AlexBollbach do you have babel-core
@KarelG holy god
what is that?
06:16
just a bad formulated question
@KarelG It read more like a plead for help
I'm not trying to be rude, but it seemed to be a request to design a webpage for free
with a lot of fear of failure
07:12
Anyone have any good articles on javascript memory best practices?
any one worked on slack api with nodejs ?
@JigneshVagh Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
Hey Guys..

I am trying the load the credentials of AWS in server side using AWS javascript/nodejs SDK..

var credentials = new AWS.SharedIniFileCredentials({profile: 'test'});
AWS.config.credentials = credentials;

But in browser, i get this error:
TypeError: AWS.SharedIniFileCredentials is not a constructor
I have already included the AWS sdk in code.
while the call
var s3 = new AWS.S3()

works fine
as a newbie in JS, am i missing smthing?
07:30
@CodeQuestor Your first step should be to look at the value of AWS in a debugger, and see what capabilities it has
The error says that AWS.SharedIniFileCredentials isn't a constructor and so using it in new is invalid.
@MoonEater916 there is no "memory management" like in eg C or C++ in javascript. Just write with respect to control flow and if you encounter performance problems (you can monitor it with dev tools), you can refactor the code to tackle it
@MoonEater916 Apply Common Sense™️.
There are no tricks or tips. As long as you don't do crazy stuff, you shouldn't have too many problems.
07:48
@MadaraUchiha that is how AWS documentation told me to use in that way.
@CodeQuestor Then perhaps you don't have the correct library, or the correct version of the library
08:04
Sure thanks
08:30
G'mornin y'all
good morning
mhm I want to load a script with `async` but it requires an URL (dynamic assigned by template) to work correctly.

I came with
<script>const MY_URL = '${...}';</script>
<script async="true" src="doItDammit.js"></script>
08:48
Quite a common way to do it.
I hoped to have a means to pass a parameter :P but people would use it incorrectly, leading to horror or something
<script async="true" src="doItDammit.js">
  const MY_URL = '${...}';
</script>
bad idea
Are you serving the file from your own server, or distributing it?
there is a HTML page with a lot small pieces of data (100 requests ... ) and I have to add another piece of data, a bigger one. But marketing wants to have it being loaded together with the main html data
<script>
  const MY_URL = '${...}';
  const dammitWorker = new Worker('doItDammit.js'
</script>
seems promising
09:03
don't you need to use postMessage?
I do yes. gotcha add it. Just a small example. It would be much easier if I could use promise :|
rallying stuff
@KarelG put the url in code and then import it instead of using a script tag?
forgot to add: support min: IE9
:)
😭
not allowed
requirements... I did not talk with the clients. I am doing this issue because nobody of my team wants to do it because "I want to keep my sanity"
@KarelG Define "not allowed"
oww worker is IE10
You do realize you can just inline a polyfill into your bundle
const promise = require('native-or-bluebird'); // or whatever it's called
function import(url) {
  var scr = document.createElement('script');
  scr.type = 'module'; // don't do this if you don't export as ESM, probably
  scr.src = url;
  return new Promise((resolve, reject) => { scr.onload = resolve; scr.onerror = reject; });
}
09:08
TypeScript will add its own polyfills for language features like async/await and generators seamlessly, but runtime features that aren't available still need to be polyfilled.
the document is probably made by government. Here are excerpts from it
... no usage of "bundlers" or external resources...

Reasons:
- internal page (no external request configured via Content Security Policy)
- secure data
- our developers do not have a background in JavaScript: provide a solution to keep maintainability level high.
- (other jizzle)

Requirement
- Support Internet Explorer: after Windows Internet Explorer 9, released March 14, 2011.
- other browsers
frankly, it is the first time I have seen such a formal "functional" requirements documentation
there is even a 4 lines long paragraph with 8 ,'s
Their reasoning is sound.
They want to dumb it down as much as possible for their incompetent R&D department
Have you tried Java applets?
I want to keep my sanity. Thanks.
went with the worker route. It runs very well.
Oi question
Can you minify filenames easily with webpack?
Something that would work with common plugins i guess
I wouldnt Expect something like that to exist though
Since its Almost Absolutely negligible
you can specify the output file name. But that requires eg gulp to keep track of a map and replacing references to those other files. I never tried that though. What I did with that output option was to put the minified file in a different directory (with respect to the structure)
09:26
@KamilSolecki filenames of what?
Resourced handled by file-loader?
09:49
Hi I have a doubt
can we call a class in a js file from another js file ( reactjs)
Sure, why not?
how to do it please share the document
I am new to OOPS js
If you have two different classes, in two different files, and both files are included on the page, it's like there aren't different files
Error: Cannot find module './en/login.js' throws when compile but
10:08
Can anyone give me some convincing points against "solo reading of a formal specification document"...PS: memes will do...
"solo reading"?
Do you think you need multiple guys to read a formal spec?
https://pastebin.com/H2q5pNd7 please check my simple code
and the error thrown message is https://pastebin.com/kB6wFiJM
So, it can't find login.js
Are you sure that exists?
Hello guys,
Just a quick question for vue user
@click="function() {console.log({e: $event}) } "
Is there a way to do direct call of a function without using method ?
Well, yes. But preferably with someone who has knowledge in the specific domain...
10:19
@Cerbrus see above image
@Srini ./login.js
You need to give it a relative path, otherwise it's going to check your installed module.
@BenFortune pastebin.com/b3XJQBhz error thrown
Are you starting it in that folder?
0
Q: How to get the position of object in Three.js relative to the camera to draw a trail?

SuisseI have an object (a pen) in my scene, which is rotating around its axis in the render loop. groupPen.rotation.y += speed; groupPen.rotation.x += speed; and I have also a TrackballControls, which allows the user to rotate the whole scene. What I now want is to get the "real" position...

10:34
@BenFortune starting what?
The server
@BenFortune I am working on github.com/facebook/Docusaurus my Admin have installed it (Docusaurus). I have very less knowledge about the installation
Yeah I'm not going to read through that
yeah haha
var/www/html/ is the path where we installed
11:01
hmm is it possible to have this in flex: a div container has two children. The first child has smaller elements. The height varies from person to person. The second child has multiple data blocks (vertically placed). There should be a scrollbar (overflow-y) if the height of all those data blocks is > height of first child.
thing is, idk the height of the first one
can anyone think of a reason why a click event handler wouldn't get called when I click on an element?
I can trigger it by triggering the click event with jQuery .click(), but not by actually clicking
did you set the listener correctly?
I thought it might be some bubbling/capturing issue, but this is a leaf node in the DOM
well I set it with jQuery's .click()
let me try adding it manually
can you give the snippet?
jQueryobject.click(...)
hah, adding it manually makes it work
11:07
could be taht you are using named function with () ? Some users make that error
1 message moved to Trash can
@JackM Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
$("#sidebarToggle").click(function(e) {
          e.preventDefault();
          $("body").toggleClass("sidebar-toggled");
          $(".sidebar").toggleClass("toggled");
});
that's where the listener is set
strange
I added this to the script
document.querySelector("#sidebarToggle").addEventListener("click", () => console.log("Clicked"));
and that handler isn't getting called when I click the element
but if, after the page loads, I add the same event listener from the console
then it works
what... the hell?
okay, it's a problem with getElementById or something
the problem could be that the element with that ID is not loaded in already
jQuery gives an empty object if it cannot select by the given selector
no... first of all, the script tag is in the body, at the bottom
but also, it actually doesn't work from the console either
so
if in the console I use getElementById to set the listener, it doesn't work
but if in the console I right click on the element in the inspector and use "use in console", it does work
the Id is definitely correct
11:20
ah, got it
there was another thing with that same Id on the page
@MadaraUchiha I have a canonical about it somewhere lemme look
just needed a rubber duck
Also, their "fixed code" has a bug
11:58
hi, Anyone familar with jquery datatables?
12:11
yeah
!!welcome manoj
@manoj Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
12:23
Misread that as jQuery databases
12:41
Make it
jQDB
Oh dear
Hello guyz, i m having little problem with a jquery script which i posted here https://stackoverflow.com/questions/51986107/uncaught-typeerror-cannot-read-property-todataurl-of-null-canvasjs

Can anyone please have a look and probably can suggest me what could be the issue.
Thanks
oh, they updated jsfiddle again
omg what happened to the tidy button
12:58
ive been at this for hours now i can't get JSX t transpile
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: Unexpected token (6:11)
i followed like 5 tutorials on this and its not working
@user7747472 At least make your fiddle workable
i know that though
i installed it like 10 times
Well you haven't, because it's not in your package.json
13:04
but i did
i ran the command at least three time last night and once this morning
i might have cleared it out after finding that it didn't work
npm install --save-dev @babel/preset-react?
yeah i did that too
i'm confused about which style package name to use!
Your preset should be @babel/preset-react, not just react
is it babel-preset-env or @babel/preset-env
latter
13:06
yeah i installed @babel/preset-react and @babel/preset-env
i'm also getting Error: Couldn't find preset "env" relative to directory
see above
{
  presets: ["@babel/preset-env", "@babel/preset-react"]
}
@BenFortune what's this now?
the page you linked doesn't say that
I say start again, because half of your dependencies aren't even in your package.json
because they all get placed in @babel/
13:08
Linked the wrong one, my bad
@AlexBollbach yeah, no
that was what i assumed. yeah running npm install @babel/preset-react doesn't result in a new entry in the package file
maybe its my npm version
Your deps should be something like
"devDependencies": {
    "@babel/preset-env": "*",
    "@babel/preset-react": "*",
    "@babel/core": "*",
    "babel-loader": "^8.0.0-beta",
    "webpack": "*",
    "webpack-cli": "^3.1.0"
 }
right
yeah npm installs are just not placing entries in
-D or --save-dev
its not even placing it in dependencies. i read that the latest npm doesn't require anything but npm i package
13:13
what version of npm are you on?
and wtf
Alexanders-MacBook-Pro:pokemon-viz alexanderbollbach$ npm install react
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! Maximum call stack size exceeded
640
6..4..0
1 message moved to Trash can
@AlexBollbach Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
dunno what was wrong, package.json was corrupted or something but no errors
0
Q: Error: Implementing AntiCrossSiteForgery POST Request from Angular6 to ASP.NET Core 2.1

jsonGPPDGood day, I'm receiving a 400 bad request while sending post request on my ASP.NET Core Web API 2.1. I have 2 projects. First is Angular6 as my rest client and second is my ASP.NET Core 2.1 Web API as my rest server. To show you what I've done, here is my angular spa codes: I have a metho...

13:42
hey everyone
@BenFortune, hi sorry those cropperjs and those i added but did not get saved, now i added again please have a look , thank you
please fact check me. const query = { ...options } || {}; means query will have the same properties as options, unless that parameter has not been passed, in which case query will be {}
correct?
13:55
What's up with const query = options || {};?
if its empty it will already be empty no
why are you spreading the object back into an object?
ahhhhh I see, I think whomever wrote that code actually meant to do query = options || {};
also you can have default params
because const query = {...options} || {} will never do the ||
13:58
function foo(options = {}) {

}
or that could work too
Hi folks. In one of our nodejs based github projects, github itself is reporting vulnerabilities...what is the tool I can run on my local machine that reports the same thing github is reporting?
> For more help managing security issues, check out our security partners in the GitHub Marketplace.
tbh, it doesn't look like they offer anything outside of github for this. but if you look at the tools they can suggest I'm sure you can find an alt.
14:13
I set the encoding to UTF-8 in Intellij, but it's still unable to interpret special characters in properties files. Have you guys ever run into a similar problem?
user1596138
@Thaenor You can || for a spread.
user1596138
const query = {...options || {}}
user1596138
Maybe not what you need. But worth pointing out
user1596138
Otherwise obviously if options isn't iterable it will throw an error
user1596138
Defaulting the argument is best if possible tho.
14:27
Also, are we all going to ignore the fact that Christian Matthew has a reputation of 666?
@LuckyKleinschmidt That's... I'm fairly sure that's invalid
Unless operator precedence sucks.
@MadaraUchiha I'm with you but it seems to work. Looks like it should be more like {...(options || {})}
Yup, operator precedence sucks.
@BenFortune Yeah, It's rather surprising that || has higher precedence than ...
@MadaraUchiha unless the operator is {... }
which it probably is
@Mosho What do you mean?
We're talking specifically about {... }
14:34
it's not just the ...
it includes the curlies
so whatever is inside the {... } gets spread
or something
these are starting to look like regExp... hahahaha
@Mosho No, that's not true
!!> a = null; b = {foo: 'bar', ...a || {bar: 'baz'} }; b;
@MadaraUchiha {"foo":"bar","bar":"baz"}
that doesn't mean anything
It's not necessarily surrounded by { } and it's not necessarily true that whatever is inside of the {} gets spread.
Only that specific parameter
14:39
but if you are looking for a counter example
!!> {...{},{}}
@Mosho "SyntaxError: expected expression, got '...'"
you can't spread a block
wat
it's not a block
{} isn't always an object
it is in the case
14:41
{a;} vs {a}
the comma operator makes those expressions
can't be blocks
uh they are blocks that have an expression
{...{},{};}
if it could run this would be the same thing
!!> {},{}
@Mosho "SyntaxError: expected expression, got ','"
@ShrekOverflow 27" 4k. What do you mean by "two rectangles"?
14:43
hmm
@Luggage something whcih denotes where your monitors are
i am trying to optimise my layout
well that's how it is in chrome
it just sits on my desk in front of me.
@Luggage so you don't use your laptop monitor ?
Desk setup 😃 Pl0x
I use my laptop monitor when I am on the laptop, and when I plug it into the docking station, I use the desktop monitor
15:01
@ShrekOverflow desktop monitor layout not keyborad right ?
@William would be nice
15:15
hi
ohai
would be nice I'm confused by that statement
I'm assuming you mean yes
it means 'yes'
I am printing out stickers of the changed keys on my keyboard
Because my keys are black
I'm doing white on black text on stickers to match
not for my benefit but for others essentially
how often do you people let others touch your keyboards?
a keyboard / mouse is personal.
15:25
my mac fairly often
it used by creatives/video editors
its only like 3-4 keys that are changed
the modifier keys I have switched around essentially
the other part that is for my benefit is to put the stupid mac shorcut labels on th keys
⌥ is what the shorcut menus say
but I always have to spend like 2 seconds thinking about it
the reality is I can always remove it if I don't like it
I have a regular expression that I only want the string format to have the following format: CN123456 or cn123456. No more than 8 characters and only take CN in the beginning followed by 6 numbers. I'm not sure what else I'm missing.
var regexPat = /^[CN]{2}\d{6}+$/;
The most glaring problem is the + after \d{6}. What is that intended to do?
I think it's a syntax error
15:48
Hello

« first day (2868 days earlier)      last day (2305 days later) »