« first day (3174 days earlier)      last day (1778 days later) » 
00:00 - 17:0017:00 - 00:00

12:18 AM
@Cerbrus he wants a boyfriend that knows javascript and I said "I know a guy"
He's super cute too
That's him: Edited
Thank you for your consideration
 
morn
 
hey hola
 
1:17 AM
This is program of complex mapping, I sketched the left side, and its mapping was sketched by computer on the right side. What I wanna do is, create a grid on the left side and map it on the right side, but I have no idea how to start?
Just to be concrete, I wanna do this ^ .
I ain't on screen-touch laptop, so I cannot draw grid by hand.
 
1:55 AM
Anyone interested enough to see the program?
 
 
1 hour later…
user8729657
3:02 AM
man I wish I could create an app that requires a database, everything I create never does.
 
Tried GeForce NOW
 
@ShrekOverflow nice, how was that
 
@ShrekOverflow what's that?
 
are you familiar with Steam game streaming
like Steam Link
 
oh...
 
3:16 AM
it's like that, but built into the graphics card
 
yeah i tried that once and i couldn't handle it
where does it stream from? do you still need a pc somewhere?
 
well normally yeah you stream it from an nvidia graphics card
I think there's a cloud service too though
 
If I have two numbers:
239687
236789
What is the best way to find the first digit that's different between the two
From left to right
In this case it's 6
I had tried looping:
function smallest (n) {
  let array = Array.from(String(n)).map(Number);
  let sorted = Array.from(String(n)).map(Number).sort((a, b) => a - b);
  for (let i = 0; i < array.length; i++) {
    if (array[i] !== sorted[i]) {
      return sortedArray[i];
    }
  }
}
console.log(smallest(209917));
Ik I'm probably missing a second loop, but don't know where to put it
Or is that correct - it's the concept of sorted[i] that's throwing me off, because we're looping over array.
i < array.length
 
4:03 AM
help
0
Q: Push event not fired

DwighI've downloaded this https://github.com/Minishlink/web-push-php-example. There is a send notification button in it which fetch a php file which pushes a notification using webpush https://github.com/web-push-libs/web-push-php. It was working for a while and then just stopped working. After it st...

it works now after i restart my pc. why wasnt it working yesterday. does it have something to do with serviceworker registration on reload or something
 
4:56 AM
Problem: Flexbox with one child, child is taller than the viewport but container doesn't extend past initial viewport, so when you scroll down you can see the container border just slices right through the child
 
5:23 AM
i < array.length correct as long as you don't push an item at specific index e.g

array[100] = 'test'; array.length = 101
 
This works somehow

+String(236789).slice(-String(Math.abs(239687-236789)).length)[0]
 
6:15 AM
Guys can someone take a few minutes to look at my question stackoverflow.com/questions/56744809/… ? how should i structure the reducer to take all 3 parameters which are dependant on each other
 
7:08 AM
hi there
 
@AmitJS94 focus on ensuring that the parameters are "consistent" with what would be a valid request to the server, and then making the backend simply refuse any invalid request
it should be easy enough to do if your search form is separate from the form you use to switch pages
just always send "page=1" when a search is performed
@AbhishekPandey yo
 
I need a regex for +91000000000
number with plus prefix
though I'm able to find some, but in those regex I'm able to put + sign in between number
I don't want it
 
\+91000000000
"\\+91000000000" or /\+91000000000/
 
I just want number followed by + prefix, but it's not mandatory to have + sign
 
try question mark?
 
7:16 AM
\+?\d+
 
@Neil It works, but it also allows me to put + sign in between numbers
 
@AbhishekPandey No it doesn't, not if that's the whole string
^\+?\d+$
apply that to 5+5 and it won't match
 
Nice
worked :)
 
:)
 
I'm always pissed with regex
 
7:20 AM
the ^ and $ symbols mean "it must match the entire string given"
if you didn't do that, then it would simply match +5 of "5+5"
 
@Neil not sure if that is correct :P
 
ahh, that sounds a good knowledge
 
better to say what both characters does
 
can you suggest me a good article on regex?
 
@KarelG well it gets more complicated with multiline flag, but that's the gist of it
@AbhishekPandey I'll do you one better
that site is wonderful for seeing how matching works
it also explains in detail what is happening and breaks down each individual rule
 
7:27 AM
@Neil Haha, I'm already using this site :D
 
very useful right?
 
yeah, it's very useful
 
7:48 AM
@Neil Console it "+9100".match('^\+?\d+$');
 
!!> "+9100".match('^\+?\d+$');
 
@Neil "SyntaxError: nothing to repeat"
 
a new twist in the movie
:D
 
!!> "+9100".match(/^\+?\d+$/);
 
@Neil ["+9100"]
 
7:49 AM
In a string, the backslashes get interpreted as escaping the next character
 
ohh gosh, regex :D
 
...
regex has to be escaped if you use a regex-string
 
I guess I will never get to understand regex
:p
 
I wish more languages had a "regex" syntax like in javascript
 
Java is a failure on that field (regex strings) @Wietlol
 
7:51 AM
why so?
 
though to be fair, kotlin has triple quotation marks, which means to interpret the string as a literal
 
@Wietlol \\\\[a-z] ...
 
it's awful creating a regular expression string in java
general rule of thumb is if you're unsure, escape it
 
ofcourse there is one difference
IntelliJ
intellij deals with all the escaping
 
Hello
 
7:53 AM
@Sheeraz 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.
 
sometimes intellij says "redundant escaping"
hello Sheeraz
but it is wrong lol
 
only when you paste stuff that wasnt necessary in the first place
 
Can anyone help me on socket.io connection error
Error: xhr poll error
 
sure. just ask your question (see room rules)
@Wietlol ^ intellij
 
yes?
the first is redundant, the second isnt
when you copy that regex, your clipboard contains: ([^\|\s]*)(\|(?<title>[\w ]+))?
 
7:59 AM
I don't copy/paste regexes, I write it myself.
it is just that it has problems to decide the redundancy factor while it is not even redundant in the first part. The second part is not marked as redundant
 
the first is redundant, the second is not
 
it is not
 
[a|b]
consider this regex
this means anyOf('a', '|', 'c')
not either('a', 'b')
 
If I remove that \ I get \|\\s
 
in the second case, you have the pipeline outside of the brackets
 
8:01 AM
java then interprets it as |\s
and pass it to regex. Really.
 
there, you need to escape the pipeline to use it as a character rather than an or operator
 
that \ must be included (well negated)
 
you should use "[^|\\s]"
 
I miss \
 
you dont need it
 
8:03 AM
I NEED IT AS PART OF THE NEGATE GROUP
 
> this means anyOfNot('a', '|', 'c')
 
NEGATE <-----
 
the pipeline is a character
 
YES
it has to be negated as well
if i remove that \\, the unit test fails
 
oh wait, I understand
 
8:04 AM
parsing of characters inside [] in regex work a little differently
 
^
 
Like [-0123456789] and [0-9] are not the same things
 
but still, IntelliJ is right here
it is redundant
 
...
 
the hyphen is actually a character in the first case, but it must be the first character after the ^
 
8:05 AM
[^|] == [^\\|]
 
grrr
 
[^|] != [^\\\\|]
if you want to have a backslash as character, you need the latter
your regex doesnt make sense
https://i.imgur.com/XWQlTo9.png
https://i.imgur.com/SbVTBFe.png
https://i.imgur.com/dqNmRsJ.png .
in regex:
[^|\s]
[^\|\s]
[^\\|\s]
in Java:
"[^|\\s]"
"[^\\|\\s]"
"[^\\\\|\\s]"
1 and 2 are the same
only the third is different
you use option 2
which has a redundant backslash
when in doubt, IntelliJ is always right
 
8:33 AM
What is difference between css modules and css loader?
Both allows to import css, however css modules also generates unique classnames.
Am I right?
 
@NatGeo 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.
 
@NatGeo hmm, I'd think that css modules would provide sample css while css loader would convert from like say less
I could be wrong though
 
I have a folder structure like this:
Folder1/Folder2/src
I have done a "git add ." in the Folder1, and it is just adding the folder1
How can I do to add all them?
and the things inside src?
 
git add *
 
interesting. In an old js file, I found element.createTextRange. It is not even documented anymore. (microsoft's IE specific function)
 
8:38 AM
@Neil nothing added to the commit
 
try it in the root folder
 
had to hack through the rerouting process: msdn.microsoft.com/en-us/ie/ms536401(v=vs.94)
(removing the (...) at the end redirects you to mdn)
 
I am in the root
 
do git status
 
@QuicoLlinaresLlorens then I dunno, I was just taking a cue from this: stackoverflow.com/questions/17743549/…
 
8:40 AM
are there untracked changes?
 
not sure if this will work
git add . *
 
or not staged ones?
if everything got tracked + staged, then you got all your files to be commited
 
github for desktop
 
@QuicoLlinaresLlorens it is dangerous to do commits on a master branch.
 
8:46 AM
yes, I know
it is just an init
It is an example project
 
do git add example
is example a folder or file?
if it is an empty folder, git does not like to add it btw
git works only with files. Empty folder does not have value for it
 
no, it has things inside of it
but nothing is being included
it is like git is not following the changes inside of the second folder
Because I have added it to sourcetree and if I cange something doesn't appears any commit.
 
hmmm
update its index then
git update-index --really-refresh
 
nothing
just works moving the files inside the second folder into the first one
1
Q: Cannot add a folder to github using git

HenryI tried to add a new folder to my github using "git add *", "git commit -m "something", and then "git push". This is a screenshot of my GitHub repo, where I have added "angular2-webpack-starter", but it is not even a folder. I tried to do commands above again, and it shows On branch master...

It seems I had a .git folder in the second folder
 
9:11 AM
was going to ask that if the above thing does not work
 
9:27 AM
peeps !!!!
cheer up...
FRIDAY is coming !!
 
Anyone used Bull for node.js?
 
@grrigore what's that
 
Looks like an MQ
 
I need to execute some code on a specific date & time, like 11.04.2019 10:00
And I can't find a solution..
After I make a request to the api, the code should execute on that specific date, but without blocking the "request"
 
9:36 AM
node-cron
 
I've tired it, but if I made another request it crushed
this is what I tried.. I don't really understand where should I execute the cron code
 
What's CronJob?
 
var CronJob = require('cron').CronJob;
 
And you've made sure jobDate is correct?
What's the error that it's crashing with?
 
It would just log this: console.log(date + " " + hour);
And if I make another request to this post seems like cronJob is cancelled
Let me run this again
 
9:49 AM
HI
 
Hi, I have to Know Js Advance Concept, Can u share like here ?
 
@karthik 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.
 
Ok @CapricaSix
 
10:14 AM
Hello any one about electron JS, I want little help
 
10:29 AM
Hi Guys..
 
Hello
 
I have a button in a datatable using fa fa-filter when it clicked,I want to show as loading image icon as long as it does some operation and after it reloads datatable I want to same i class fa fa-filter but in disabled mode.
 
I think oLanguage property will helpful @Sheel
 
I am using javascript,how it will help??
I do not know about oLanguage property.
 
@Sheel its datatable property of javascript library
 
10:42 AM
Ok thanks let me know if you have some useful links,I am also trying to find out.
 
11:01 AM
Any Express Guru here ?
want a informal, no agenda chat
 
no agenda chat?
you have reason to think most chat here is agendaful?
 
@Neil lol, I said that so no one reply with "just ask the question, and whoever knows going to answer this..."
 
oh, sorry. :)
 
11:32 AM
!!> JSON.stringify({a: 'normal', b: 'ñötÑörmál'});
 
@KarelG "{\"a\":\"normal\",\"b\":\"ñötÑörmál\"}"
 
Hmm is there a way to make flow actually choke on "any" types - even in external libraries?
Or well, if the external library code is used by userland code
 
is it me or is the replacer argument broken in JSON.stringifiy ?
 
why would anyone use express over any of these framework
https://expressjs.com/en/resources/frameworks.html
 
@Mathematics those are frameworks built on top of express?
 
11:54 AM
@KarelG well I'd think you'd have a hard time using JSON.stringifiy because it doesn't exist
 
@KarelG I know, but question remains there
 
With any framework built on "top" of another there is always the risk of having to "fight" the framework when developing non trivial things. You'll also quickly run into decision paralysis on what framework will support what you wish to do best.
 
@paul23 "non trivial things" I think that answers my question, I just wanted you guys opinion on this
 
My predecessor chose to use sails. But now that the application is actually almost finished I spent most time actually fighting the "features" sails brings.
Or well not fighting (you can always go back to the underlying framework) - but rather making the code "fit" the style of sails so that the codebase stays at least readable.
 
I think that is for most frameworks
you wind up a prototype in minutes and then spend 1000 hours to fix all edge cases
but winding up a protoype that looks production ready for the most simple use cases is the selling point
especially ui frameworks suffer from this
 
11:57 AM
Well for sails I know at least problem is that they try to do too much, more than the dev team can handle.
It means that gaping holes in the api/support are "just there".
I like the integration of build tools and routing, it's one of the better for keeping code clean in that aspect. But the ORM is just abysmal, without any ability to do joins or more complex queries, nor does it understand anything about foreign keys. Their solution? "Just write SQL yourself".
Also when I see things like: "Feathers: Build prototypes in minutes and production ready real-time apps in days." -- I really think "what does this mean, why would I pick that framework at all"?
Wish those statements more clearly state what their actual motivation is.
 
I tried sails once
once
 
I take it, it wasn't a good experience :P.
 
It wasn't as bad as meteor
 
Well the biggest problem is, the main dev of sails has a strange look on how self documentation should work. He's also the champion of "node-machine":
Instead of just imports sails kind of expects everything to do that.
 
@Neil meh
I even had to check if I did not made a typo
 
12:10 PM
gotcha :P
 
but I don't think that I understood that replacer argument.... or it just does not work.
it is for storing a locale meta-data in cookie. But there are problems with non a-z characters. So tried to get around that
i just expected some uri encoded values in the stringified obj
 
I tried using FormData to encode values for an ajax call
it isn't as straightforward as it was implied
 
12:36 PM
eh
 
yeet
 
1:06 PM
Ben; can you check the fiddle I just placed?
I am still not sure why it does not work as I would expect.
 
works fine for me
 
the with replacer part gives "object"
> with replacer: "%5Bobject%20Object%5D".
I expected a json stringified result with uri encoded vlaues
 
1:22 PM
hi neil
 
@objectiveME \o
 
@Neil i have an awesome project i am working on'
i could use some extra hands
purely javascript
 
@BasheerAhmed not what I want, but it shows that I misunderstood the documentation of it.
thanks anyways.
 
ok :)
 
1:25 PM
@objectiveME oh? whatcha working on?
 
@neil a gps mapping solution
i am at an advanced stage and everything works except for some small details i wanted help on
to do with geojson
 
What is the correct arrow function syntax so that my menuSelectEvent works properly here?
  private menuSelectEvent(menuValue: string) {
    if (menuValue === 'saveForLater') {
      this.saveForLater();
    }
    if (menuValue === 'exit') {
      this.exitBuilder();
    }
  }

  private setMenuControlAndListener() {
    this.menu = new MDCMenu(this.mdcMenuEl.nativeElement);
    this.menu.listen('MDCMenu:selected', function(event: CustomEvent) => {
      const scheduleMenuValue = event.detail.item.dataset.value;
 
hi , is there is a way to check all yesterday's chat history on here ?
 
Hi, This is a simple react app: jsfiddle.net/frmkqyac
 
@objectiveME sounds interesting
 
1:34 PM
@Neil If interested we could do it together
 
@JoJo Did you fix the previous issue?
 
@objectiveME I'd like that, but my job has precedence of course
 
@BasheerAhmed yes, I found I had defined 2x
this.menu = new MDCMenu(this.mdcMenuEl.nativeElement);
 
if you don't mind help when I can spare it, I'll contribute when I can
 
guys
 
1:35 PM
Cool i dont mind that
 
is there is a way to check all yesterday's chat ?
 
@BasheerAhmed now I only define it in the listener, not also in the ngAfterViewInit
 
Hi, This is a simple react app: jsfiddle.net/frmkqyac which is working fine on this link. But in my project I am using some third party's <Button> component instead of native dom <button>, and things are not working. state is changing on button click, render() function calls but page doesn't change at all. What could be the issue?
 
@JRick Click on "load older messsages"
@objectiveME Is it open source project?
 
But now this.menuSelectEvent thinks this is the listener, not the class
 
1:37 PM
@BasheerAhmed Not fully opensource, there are parts that are opensource
 
@JoJo You don't need "function" keyword here

     this.menu.listen('MDCMenu:selected', (event: CustomEvent) => {
      const scheduleMenuValue = event.detail.item.dataset.value;
      this.menuSelectEvent(scheduleMenuValue);
      // this will be used as part of a future story
    });
 
Guys, can someone look at my issue please?
 
@objectiveME What is it about?
 
@BasheerAhmed okay, looking
@BasheerAhmed thank you sooooo much, it makes complete sense now. I would not have got that on my own. Thank you again.
 
@RahulJain Did you mean the stats props are changing but not reflecting on the web?
 
1:40 PM
Hey, need help to get this function to work in angular 7 / typescript
	return ([1e7] + - 1e3 + -4e3 + - 8e3 + -1e11).replace(/[018]/g, c =>
		(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
	);
Error: operator + cannot be applied to types number[] and -1000
 
@Maartenw I would break that up, it looks confusing, math wizard
 
@BasheerAhmed yes. like on clicking increment, it still shows 1.
 
@BasheerAhmed hugs :)
 
@BasheerAhmed Mapping
 
@Maartenw Why not using "Math"?
@JoJo :)
 
1:41 PM
needs to be a uuid
 
with google maps, here maps and leaflet
 
function b(
  a                  // placeholder
){
  return a           // if the placeholder was passed, return
    ? (              // a random number from 0 to 15
      a ^            // unless b is 8,
      Math.random()  // in which case
      * 16           // a random number from
      >> a/4         // 8 to 11
      ).toString(16) // in hexadecimal
    : (              // or otherwise a concatenated string:
      [1e7] +        // 10000000 +
      -1e3 +         // -1000 +
      -4e3 +         // -4000 +
 
@RahulJain If the stats are being changed then it should reflect as well otherwise I can't guess what could be wrong there
@objectiveME If I may be of any help then I may get time and will look into it
 
@BasheerAhmed cool, send over your email
 
bsr.anwar@gmail.com
 
1:47 PM
ok
 
managed to fix part of it
[1e7] + - 1e3 > '' + 1e7 +- 1e
 
@KunalAwasthi 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.
 
what if I put routes in controllers ?
anyone would back me up with that ?
 
@Mathematics What are controllers for?
 
first point of contact for the api ?
should routes be in seperate file like this
https://github.com/zurfyx/express-api-starter-kit/blob/master/src/routes/index.js

or should they be in controller
 
1:54 PM
Routes are to be separated and should not be part of the controller. The controller should be tiny
 
any folks here used the npm module called growl?
what does it do in a ci/cd environment?
 
2:06 PM
Nothing, likely
Probably throw an error
 
2:19 PM
hi
why does this fires on any page
if(window.location.href.indexOf("/something")){
          alert('URL include "/something"');}
what am i doing wrong ?!!
 
@JRick window.location.href.includes("/javascript")
 
@JBis thank you
 
indexOf will return a negative number if it is not found. Negative numbers are truthy:
 
i figured it out too though
 
!!> !!(-1 || -2 || -5 || -39)
 
2:24 PM
@JBis -1
 
if(window.location.href.indexOf("/something") > -1){
alert('URL include "/something"');}
yea :D
 
@JBis true
 
thank you !!
 
np :)
Is it problematic/indication of bad design to have huge state objects in React?
 
user8729657
How can I render a HTML string from an express back end to a React front end? Right now I just set a view using EJS.
 
2:42 PM
@OvieTrix why use React if still not have a logic on web application...
search tutorial..
 
 
1 hour later…
3:52 PM
🚽
 
4:17 PM
KendoUI or PrimeNg for angular component library?
.. gonna try Prime NG first
 
@KendallFrey damn, I didn't realize there's a rocket launch almost every day in the world: spaceflightnow.com/launch-schedule
 
00:00 - 17:0017:00 - 00:00

« first day (3174 days earlier)      last day (1778 days later) »