« first day (3075 days earlier)      last day (1883 days later) » 
00:00 - 16:0016:00 - 00:00

12:36 AM
morn
 
1:05 AM
morn tavo
 
 
1 hour later…
2:14 AM
curious if anyone has experience with this: I have some node code running where it reads a Key off of a config.json file every time it runs, is that a terrible practice? My instinct is to NOT do that, but I just don't have a better solution for the moment.
 
2:33 AM
Hi everyone
 
@puja 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.
 
i m opening a url in android inappbrowser, but it is not getting loaded just shows a blank page
whereas if i open the same url in chrome from the device it i sopening
and also working fine in ios inappbrowser
const browser = this.iab.create('loginDetails.serverURL','_blank','location=yes,toolbar=yes')
 
 
2 hours later…
4:44 AM
Hello anyone on?
 
user8871181
Why does everyone freak out and ping @StackStatus when Stack Overfow goes down for 10 minutes?
 
they can always load the cached version
like i just did
 
user8871181
It reminds me of when Facebook went down a couple of days ago..
The SES (state emergency services) had to put out a tweet to get people to stop calling police
 
user8871181
We know Facebook & Instagram are down. Please don't call triple zero to let us know. https://twitter.com/sunriseon7/status/1105947438173442048
 
but why would people call the police?
 
user8871181
4:57 AM
..because thats where humanity has taken a downward spiral
 
idk man. I'm reading the biography of Alexander Hamilton and it's been fun comparing the times
 
 
2 hours later…
7:22 AM
@demonhunter24 the info being said is not correct. pedestrian.tv/news/…
 
 
1 hour later…
8:33 AM
can someone help me out please?
 
user986408
suppose you have a core application and external components. would you use a message queue to emit certain events and have your components receive and process them, or would you directly call all the components from the core application in an orchestrated way? are there any drawbacks with either solution?
 
I'm trying to make an API call to from RN to a local server I've got running on my computer and it works fine on the computer and chrome on the phone, but I can't get it working in the app. I'm not using HTTPS
@codepushr I can't tell whether that was directed at me
Sorry
 
@DavidKamer Adopt a loved pet, it will reduce your work time. Work time ≠ Output
 
haha yea, I need a parrot
 
Output ≠ Earn
 
user986408
8:36 AM
@JacobSchneider are you using the right local ip address of the server, cuz on the computer you are probably dialing localhost
 
no, I'm using my computer's IP
 
o.o
what is RN?
 
user986408
react native
 
React-Native
yeap
 
what do you mean "cannot get working in the app"
mobile app? application itself? the deployed application on the server?
 
8:39 AM
no the mobile app
 
ah, good ol' systems administrator problems
We're a freakin' bank which spans cities and even countries working together on a daily basis, and we still get internet issues
 
hahaha try living in australia
the whole internet is an issue
 
user986408
i mean, back in the day we (iOS devs) had to include a permission setting in the info.plist of the xcode project to allow http calls to a local ip address
 
don't they have a landline to australia?
like one of those super internet cables?
If they can connect the americas to europe that way, how difficult would it be to connect australia?
 
8:42 AM
we only got NBN last year (fibre optic)
like, there was no such thing as fibre optic before last year
 
maybe fibre optic has improved over the years, but in my experience it's crap
they sell it to you like you get this huge bandwidth boost, but the signals travel at the speed of light, which is no faster than "traditional" means
it's also very fragile.. it happened several times that internet was down for a while because someone doing construction accidentally got too close to the wire with a shovel
 
oh dear
So, I really need help with this, can someone help me out, RN is being a pain
 
RN?
random number?
 
@Neil he's talking about "local" internet
that is a kinda challenge to provide good network in countries such as australia.
@Neil Did not know that. Asked that as well. It is about React Native
@HelloWorldPeace world
 
oh, didn't know we were at the point where that was a known acronym :)
@KarelG local for australia
 
8:49 AM
badum tish
 
9:04 AM
what do you get when you throw a sheep, a drum, and a snake over a cliff?
BAAA DUM SSSSSSS!
 
would like a quick review of an app. anyone up for it?
Here's the link
 
hi , im trying to make theme for youtube and currently i'm trying to select each individual thumbnail and pull the herf attribute from it but i couldn't
 
does it work, does it throw errors in the console? is the structure of the code clean? etc
 
document.querySelectorAll("ytd-thumbnail")
this provides me with all thumbnails with the herf link inside but i don't know how to target the herf attribute
 
element.getAttribute('attrName')
 
9:13 AM
@za001a you need to select further. That element itself is the wrapper around it
 
document.querySelectorAll("ytd-thumbnail")[0].getAttribute('href')
that didnt work
 
use
document.querySelectorAll('#items ytd-thumbnail > a')[0].href
do that in the console
you can then use document.querySelectorAll('#items ytd-thumbnail > a') to have your collection. Loop through it and use .href to get the info you want
 
OR that ^^^
 
yea that work @KarelG @HelloWorldPeace thank you
could u please explain to me what ('#items ytd-thumbnail > a') means
its my first time to see it
 
it is a selector
#items ytd-thumbnail > a means "check for element with ID "items", then inside that, get all elements with <ytd-thumbnail> tag. Then for each such tags, pick the first-child <a> found in such tag."
 
9:25 AM
oh i get it @KarelG so this "> a" means get the first child with tag "a" ?
 
let's say you have
<div>
  <a>..1..</a>
  <p>
    <a>..10..</a>
  </p>
  <a>..2..</a>
</div>
doing div > a yields in two results: those ..1.. and ..2..
the <a>..10..</a> is not selected because it is not a first-child item of <div>
 
by "first-child" I think the first direct descendant found
he means you search no further than the direct descendants of the parent with >
If you know that to be your case, then you should probably use it.. it could avoid problems later
 
9:40 AM
there are some wrapped anchor tags within it
 
@kar
@KarelG & @Neil i got it now , that is amazing !!
thanks a lot , I'll be using it from now and on :):)
 
In my project, I make an AJAX call and get an HTML page in response.
I load that response into an HTML div tag.
The problem is, it throws 'jquery1.min.js:12 Uncaught RangeError: Maximum call stack size exceeded' whenever div tag is not empty
If the div tag is empty Or If I empty it myself using "innerHtml = ''", it works fine.
can someone please explain, why is that happening?
 
9:58 AM
@za001a :)
@TBag well what does the returned html look like?
if it isn't valid html, bad things happen
 
@Neil It's a valid HTML
 
can someone help me with React Native
 
@TBag ok, well then do this test for me.. humor me please
take the data returned by the ajax call, and completely replace it with the string "<span>This is a test</span>"
run it and tell me what happens
 
@Neil Alrighty
@Neil looks good working fine
 
@TBag ok, so then the issue is the string content, will you agree?
are you dumping an entire html page? like <html><head>...</head><body></body></html>?
you can't nest an entire html page like that without using an iframe
 
10:11 AM
@Neil But the page is loading properly if i first empty the innerHTML. If there was some problem in the page/String content it would not load at all in the emptied innerHtML, right?
 
@TBag if you're assigning innerHTML, then you're replacing the contents entirely
Does that make any difference using my string?
I wouldn't think so
But try assigning innerHTML using my string without clearing first
 
@Neil That's what I did.
I didn't clear it before assigning your string
 
@TBag ok, again, so it matters not if you clear it beforehand
it is always an issue of the content
could you show me what you're trying to assign to innerHTML? use pastebin.com
 
@Neil It would be a lot of work! I am working for an organization and the code has confidential data in it. I would have to remove everything to paste it. its big
 
I just saw your mod proposal @SterlingArcher
I hope you can make SO great again
 
10:19 AM
Hi guys)
Need some help. What is the proper way to use jQuery Datatables in a react app?
Some third party module? or use datatable APIs in react component's lifecycle methods? or something else?
Anybody please?
 
@TBag well just answer me this, is it an entire page? or just html content?
 
@Neil it's an entire page
By entire page you mean along with <Html> tag right?
 
@TBag yep
You can't do that
you need to use an iframe
document.getElementById('iframe1').contentWindow.document.write("<html><body>Hello world</body></html>");
 
@Neil ok.. But then why should it work after clearing the div tag?
 
@TBag maybe the browser is trying to keep you happy by showing you content anyway
just like using blink tag, it'd probably work in most browsers but you shouldn't use it
 
10:31 AM
@Neil Sorry but I am not convinced by this. I got it that I shouldn't be loading an entire page but it is working fine every single time I clear the div tag. No matter how many times I make the ajax call. anyway, thanks for your time.
 
@TBag to do it properly, it wouldn't even be particularly difficult to do
but you're welcome to do it your way.. just beware that it may not work with all browsers
 
have you looked at react table?
https://github.com/tannerlinsley/react-table
 
@BkBaba 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.
 
@MohammadUsman ideally if its an existing jquery component, then I would understanding how I can use it along with the react lifecycle methods. I see that jQuery datatables is a very popular so if its possible to use it with react, probably there will be a repo on GitHub somewhere.
one word of caution, at times the jquery component would like to draw out the DOM themselves, those are tricky to use with react. The reason being you can't have 2 people managing the same DOM, react is primarily responsible of rendering to the DOM, so any time you want to change the DOM you will have to tell it what to do and it will, but sometimes a lot of jquery components want you to give it an HTML element and the lib more or less handles that whole dom section...
 
10:48 AM
@TBag does that page contain script tags in <head>?
and what is the original content of <div> where you want to inject that page?
IMO for security reasons, you should use <iframe>
 
I think datatables, seems to fall in the second category (from what I just read) so just tread with caution if you want to use it in your react app
 
(please ping back if you reply... super busy atm (half of team not in office))
 
@KarelG yes it has head tag. the div tag can either be empty or contains the same page i want to load.
 
> contains the same page i want to load.
best to cleanup
 
@KarelG so if it already contains the page i want to load i must clean up.
any specific reason for that?
 
10:59 AM
@BkBaba Ok, thanks for the input. I'll take a look on react table module
 
@TBag that depends. IT has various causes.
I think that there is an event from jQuery that - since there are multiple html pages - has overpopulated the stack frame
having two seems within the call stack range
 
11:31 AM
Hello folks
I got super drunk on friday
woke up on sunday afternoon (I am told I talked to people on saturday)
 
hi
 
feel like shit though (no hangover though)
 
trying to figure out how to mock a private setter call within a child import,
of the component I'm testing in React
 
@ShrekOverflow there is one solution: practice
 
AIL  src\modules\languageProvider\__tests__\LanguageProvider-test.js
  ● renders correctly

    TypeError: _this.strings.setLanguage is not a function
the setLanguage call is coming from a component imported by the LanguageProvider
 
11:43 AM
@Neil i compared the hex equivalent , there is the difference in few sequence

31392033313830343138353529OA3E3E (error file)
31392033313330373333343529OA3E3E


I tried utf8.encode using npm utf8 package And set utf encoding ContentType header, now it is not blank.

Looks like, i have to do some formatting and set proper encoding on the html

When i print the type of encoding on the html , it says UNICODE (And i do not know if its utf8 or 16). I need to transform javascript UNICODE format to UTF-16 may be
 
@Gauri nice work
yeah, utf-16 and utf-8 can look very similar if all your characters are 2 bytes or more
 
Thanks for help, @Neil

Any further pointers? :)
 
@Gauri my guess is that with your research, you're more expert than me at this point :)
I've only had some minor issues with encoding in the past
 
12:44 PM
@KarelG I am stupid, I shouldn't have drunk at all
My liver is hurting at the moment
@littlepootis What ?
 
@ShrekOverflow what? you went drinking on friday, and you don't remember anything of saturday?
 
@GNi33 yep
 
jesus, how much did you have?
 
No idea 😃
I am keeping alcohol away, probably will try some other ways to have fun on weekends
like ... improv lol
 
or, you know, stick to beer and don't get absolutely shitfaced
that's my approach now
 
12:55 PM
hey , Let's say i have 2 arrays A = [ 1,2,3 ] and B= [1,2,3,4,5 ] , what is the best and fastest way to get the difference between them ("4,5") stored in different array let's name it C ?
 
@za001a are they in order?
if you know they are in order, you can do it much faster
if not, you have to do two O(n^2) passes
 
@Neil yes they are
 
ok, good
so keep an index for A and index for B, both initially zero.
At each pass, you compare the values a and b respectively
if they're not the same, you add to C the smaller of the two
Whichever array you took it from, you increase its index
If they're the same value, you increment both indexes
if one array is empty, you add the rest to C
you'll have the difference in O(n) time
 
yes that is actaully what iam trying to do but should i use a for loop ? or 'difference' property ?
could u give me a quick example please ?
 
the only variables you need are the indexes for A and B
 
1:06 PM
thanks a lot :) @Neil
 
np
That works only if they're sorted
If they're not sorted, while you could sort them, you're no longer looking at top performance overall
would be quicker to simply cross reference every element with every other element in the other array at that point
 
@GNi33 Well lets see, from what I remember I had beer x3, long island, gin and tonic, sake, whiskey x5+, tequila x4
Yeah I was pretty shit faced when I woke up xD
 
oh boy
 
those are the ones I remember
I apparently also bought all the bartenders drinks
and played jenga with complete strangers who loved it
 
in London?
 
1:16 PM
Yes
 
are you made of money?
 
Canary wharf of all places
 
I'll bet you were entertaining last night
 
@ShrekOverflow that's all?
 
@GNi33 no, I have relocated to a box
 
1:17 PM
Playing jenga with a drunk person is like racing a crippled boy
 
Hey hey hey, I won
 
were they drunk?
 
but yeah, Long Island AND whiskey + tequila shots is a recipe for disaster
 
Not more than me
 
Long Island basically checks that box on its own already
 
1:17 PM
but they weren't engineers 😃
 
well then props to ya
 
did you follow the natural law of beer before liquor ?
 
have yourself a moscow mule sometime
those are great
 
beer jenga?
there was some hype about "beer pong" a few years ago
 
@Neil I am staying away from alcohol
 
1:20 PM
I went with rum/vodka/whiskey
:P
 
I apparently also ended up flirting with bartenders
 
@ShrekOverflow me too
I mean the next time you stop staying away from alcohol
 
do.not.want
 
;)
 
hahaha\
 
1:22 PM
@ShrekOverflow male ones? :D
 
@GNi33 all
 
hahaha
 
Yeah I was pretty fucking hammered
 
proper blackout
I've had my fair share as well
 
I mean I woke up with a text from someone whose face is thomas the tank saying
"SHREEEEEEEEEEKKKKKK"
@GNi33 I think 😀 this is enough share for me lol
However, if anybody is coming to london, I'll grab 1 pint (max)
 
1:27 PM
@ShrekOverflow does a submarine count? :P
 
@KarelG ?
 
it is one glass of beer + a small bottle with (usually) a jagermeister in it
 
@ShrekOverflow Command stop already exists
 
1:29 PM
@ShrekOverflow Command cuestop learned
 
@ShrekOverflow What?
 
@KarelG do you guys do nuclear subs as well?
:D
 
I'm teaching a workshop on PHP in 3 days.
 
my condolences
 
I want to take a long, hard look at my life and what bizarre choices led me here but I'm too busy for that.
 
1:36 PM
haha
 
So folks am still feeling pukish / my stomach is still a bit upset
is this normal after that much quantity of alcohol ?
 
i'm having weird issue . when i do
var A = [];
console.log(A.length);
output >> undefined
but on console
output >> 0

why is that ?
 
should a .js dependency like this ever be found in a distributed app?
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.8/handlebars.min.js"></script>
 
@GNi33 o.o?
 
1:51 PM
nvm i got it , .length not Length ... -.-
 
@JoJo well, it's not ideal, but you can, sure
Better to have a local copy in production
 
@ShrekOverflow yes. That is a result from acetaldehyde
your body breaks the alcohol molecules into acetaldehyde, which is a toxin that leads to that stomach problems you were describing
it depends from person to person though. Some can have a higher volume of that in body without "feeling something" while another person would be super sick with the same volume.
 
@KarelG Wgat> ?
i didn't feel that yesterday though :/
 
just a normal metabolism effect :P
breaking it takes time
 
so i should wait for 1ish more day?
 
1:55 PM
also depends from person to person
just have some light meals.
 
just stay off the alcohol for a week, and give your body a chance to cleanse
too much over a long period of time can deal lasting damage if you're not careful
 
OH FUCK
I had a heavy sandwich
T_T
 
what is the best hangover food?
I find that coca-cola does wonders.. you wouldn't think so, but it kind of settles the stomach I find
 
@KarelG it's an imaginary drink anyways. at least I hope nobody ever tried it for real
 
2:29 PM
in the 1950s, they practically drank radioactive material
wouldn't surprise me if it was a tonic of some sort
 
3:19 PM
!!magic
 
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
 
Hi all...
 
hi ... pointless? AI
IMPOSSIBRU. You should crash with a reference error!
 
3:51 PM
not a good name ? lol
it's name of my youtube channel btw :P
 
@Neil YES YES YES
it does
thank you!
 
00:00 - 16:0016:00 - 00:00

« first day (3075 days earlier)      last day (1883 days later) »