« first day (2321 days earlier)      last day (2850 days later) » 

00:14
rrrr
stop fucking pinging me dammit
@rlemon No.
oh dat monners :D
hai monners
00:29
Hello, I am doing a small JS project to learn JS. It is a small shop with some functions. Does someone can help me?
Here is its link: oudreams.com/shopping.html
00:43
Anyone have experience with the authentication layer on SPA (single page application)s?
@JacobBridges Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
Has anyone worked with VueJS2? Do you like it?
01:26
hi
@phenomnomnominal I was thinking if I did it that way, I wouldn't have to specify the child routes on a parent component route if the tab component is used.
god dang this place gets weird after hours
just a sea of questions
@phenomnomnominal what would you recommend?
01:59
I totally just randomly spotted this:
I have an eye for dildos
3
 
1 hour later…
03:01
in react, what to do once data has been altered? on my component, I have a constructor where I initilise my data (say articles) to rows that I get through get request to a rest service. If I delete one row (one article), i am making a delete request to the rest, but once this action is done, how should I refresh my table?
i think i answered my own question
yeeeaa done
04:06
mmm how can I delete an element that is dynamically added? I know that I would normally do for example $('#notdynamic').remove('#dynamicsomeid');, but I need to delete it from its parent which is 2 level above, so $('#notdynamic').children('#dynamicsomeid').parent().parent().remove(); but since its dynamic it doesn't work, as in $('#notdynamic').children('#dynamicsomeid').lenght is 0. any ideas?
to complicate it a bit more, its not a client event, comes from a websocket, as in:

			notifications.bind('delete-item', function(data)
			{
				deleteItemCallback(data);
			});
@Prix You need some way to get hold of the dynamic element - either it need a unique id (that your system keep track of) which you can put into jQuery, or you need some way to find it.
As long as the structure does not change, you only need to use the correct selector to remove its grandparent (and it).
@Sheepy the id is unique, the problem is that its dynamically generated, if I were able to do this $('#notdynamic').on('click', 'dynamicsomeid', function(e) then I can acquire it just fine but I don't have any events for it
what I mean is that I don't have a user-driven event like that for that purpose since it comes from the websocket.
@user4447655 Did you return the updated dataset as part of the response? that's typically what I do. Easier than trying to maintain disparate data sets on client and backend.
@Prix I don't see how triggering code from websocket would be different from ui event. You can remove the dom as long as you can get hold of it, regardless of whether you are on a websocket event, timer event, mouse event, or what else. I think I am missing some piece of the problem here...
or maybe I am lol, I will try to dump a few things and see if its my own mistake somewhere along the road
thanks for the insight
04:16
If it's a global event then just do your querySelector in the callback. Otherwise, bind to a higher element and query the children on the event
window.addEventListener('someCustomEvent', () => {
  const target = document.querySelector('.dynamicallyAddedElement');
  target.doSomethingWithMe();
}
think I found my mistake I was using children but its not a direct element on the first level thus it wouldn't work I guess? I would need to use find or another method?
and yes it works ;P thanks @Sheepy
@monners that's interesting, thanks for the hint
04:53
@monners yeah, when dispatching on success from remove request, I assigned an updated data set to the payload
Spotted a question I thought you guys might appreciate:
0
Q: I have a program running on the diagnostics of my iPhone called JS ON and I want to know what it's doing and how can I stop at

Robb demos I have been getting hacked on my iPhone and I believe this program is doing something! I have did a factory reset many times. The program always returns??

I love how that guy has been doing factory resets on his iPhone to stop the evil JSON program, but it keeps coming back.
I almost down-voted him
05:09
Lol
I am looking for a free wysiwyg editor, let me know if anyone know of a good one
user5886482
05:56
Hi good mrng all
@vinay Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
It's 3 in the morning here.
user5886482
okay
!!cowsay Good Morning
 _____________
< Good Morning >
 -------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
06:01
Ha, that is funny.
 
1 hour later…
07:16
Hi, I have a question with show - hide div in IE,
@MRah Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
okay, thank you
07:37
hey, how can i force recaching of my script from the browser?
@HardSpocker Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@HardSpocker ctrl+F5
@MRah welcome, and feel free to ask your question
@KarelG ive done browser refresh (f5), deleted cache and cookies from the browser, nothing happens, deleted all history, cache, etc., restarted apache2, restarted pc, still nothing happens. i tried to change the script filename then its get updated. but when i turn it back to its file name, the update is removed.
the browser refresh F5 doesn't purge the cache. Using the ctrl key together with F5 instructs the browser to load resources without checking the browser's cache first (but still writes to it)
but your problem is different
you need to explain that file name change. Did you change the script file name or just the url on your page
07:53
@KarelG i changed the filename and the url, eg. style.js -> style1.js
the
@KarelG i changed the filename and the url, eg. style.js -> style1.js
the changes are then updated on the web app. but when i rename it back to style.js
the updates are rolledback
you can edit your previous message if you accidentally has hit the enter key
that "apache2" = apache tomcat ?
that server is known to have weird resource management if you make changes :)
@KarelG Thanks
check the publishing option and ensure that "automate update when changes are made" or something in that direction is enabled
I asked a question a few days ago and I don't have an answer... Maybe I didn't ask it well....
0
Q: Copy google charts to another div doesn't work in IE

MRahMy HTML page using css materialize tabs. I build all my google chart graphs in 'show' table divs, after it I 'hide' them and when the user click on tab I replace the html tab with the correct one from the 'hide' divs. In google chrome and firefox it works good, but in IE it doesn't work :( <di...

I have tabled with google charts and it display correct but when I replace the tab div with the table div html the graph doesn't display the bars of the bar chart
I think that the problem is that I hide the divs after I replace the html.
Because when I don't hide the divs the tab display correctly.
08:11
that requires some inspection of your gode
still, why replacing html content ?
@KarelG its from my apache HTTP server running on ubuntu 12.04 lts, apache2
when changing tab, just provide the dataset that is associated with the selected tab to the graph
that would require additional redrawing true. but if all tabs aren't checked, then it's advantageous to not generate all charts
google charts need to be drawn on display divs to keep their properties, so I drawn all the charts in show divs and AFTER it replace the correct one acording to user selected tab
It works fine in google chrome and firefox
I checked it if the charts hide after the user select tab (in the first) and it also works fun in IE
The problem is just when I hide the divs after all the looad
I know that it after all the function because I use callback for it
So what the different between them? when I hide the divs after all function or after user select tab???
IE doesn't support all js functions ya know. is there really no errors in the console ?
No errors :(
08:40
user image
2
How we do Canadian dollars @ TipRanks
cc @rlemon @Mosho @BenjaminGruenbaum
nice

@HardSpocker Ctrl + shift + N and try, if it persists then the issue lies somewhere else
^ Thats for chrome
@Mosho I bet you haven't searched for Roman Dildos yet
o/
08:56
@MadaraUchiha Haha awesome
I added pictures to my question...
Thanks!
@MRah Lazy People would show more interest if you provide them a fiddle
09:43
hey people
stupid question. what happens if I decided my web app's html needs to have a "cool-level" attribute. So all the html will be <div coolness=4 class...> content </div>
why is it considered "invalid"?
because that prop "coolness" only means something to me?
(obviously this is hypothetical)
its not invalid
<div coolness="4">Hello World</div> is valid. I don't know why its throwing error for you
I'm reading an article that says - <div foo="bar" class="baz"></div>
This is invalid html because the ´foo´ attribute isn’t a valid html attribute.
You will also get an warning from React
@FlyingGambit I'm just thinking in theory, I'm not coding at the moment :P I wanna brush up in some patterns and acessibility guidelines before digging deep into making my react component :D
In react prefix this data-
and does this have any impacts in terms of SEO?
Custom attributes should always be data attributes.
09:50
In react. If I'm creating "dumb" components, that eat props and output HTML.
@Thaenor Not sure about SEO, but custom attributes are allowed
What's the overall different between making that component a class or simply a function?
In terms of performance or code readability... I can't decide which I prefer.
turns out someone recorded the last 10mins of my 12min talk: goo.gl/photos/wcmP7GCaMKb2Sqwp7
very pool quality, but at least I have something :P
How to create an array like [1,1,1,1,1,1]
using code like [].map(6) or something?
@FlyingGambit Thank you for your idea!
09:53
@Mr_Green const array = [1,1,1,1,1,1]
😃
no automated code
const array = Array.from({length: 6}).fill(1);
@Mr_Green Array(6).fill(1)
Open jsfiddle.net/wjqwd467 in google chrome and in IE...
Thanks
09:58
@BenFortune Is it possible to search transcripts using a keyword ?
@towc says "video will be ready soon". What's it about?
oh, is it not working?
@MadaraUchiha Thanks I always forget :)
10:00
wait for it to load? It's my talk from last wednesday
@MadaraUchiha you hang out in the PHP room quite a bit, right?
@GNi33 Yup
@BenFortune where is that button ?
I don't want to be ripped to shreds over there for asking this, so maybe you could help me out if there's a short answer.
Why do they hate Laravel so much?
10:03
@B
@BenFortune I don't think it's the problem
If I don't copy it to the tab it show correctly in IE.
@MRah No, it is.
@BenFortune Please look it now in IE jsfiddle.net/wjqwd467/3
I'm sorry I don't understand what you mean
@MRah Still doesn't work, IE doesn't support Object.values.
Dec 9 '15 at 15:35, by Awal Garg
@PieroAlberto Are you sure you wanna use DES or even crypto JS? DOM has builtin crypto services now.
Is that true ?
Yaya, web workers
10:11
@BenFortune "ReferenceError: window is not defined"
thats awesome, now I dont need CryptoJS for AES
Sure you do, there's not much to the API at the moment
Oh, SubtleCrypto
You think I should use that ? I am not finding any easy to implement AES using that
@BenFortune why not that little search box at upper right ?
it opens a tab with search result
i think thats the room search
oh no both are same
10:18
yes, both are same
@BenFortune Anyways I will come to the point, yesterday (I think), you showed some one how to convert IV to Bytes for AES encryption. I am not able to find that chat with the code you showed him
found this developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/encrypt but cant use it as it has no support for safari and IE
Shouldn't be doing crypto on the client though.
^--
still, the SO chat search doesn't function well
SO is down? or something wrong with my PC?
10:22
Maintenance
they forgot to update the status blog somehow
Yes thats true, but the management has decided that we will compare the aes bits of the password instead of sending the password in raw form
Thought they only did that on an outage
@FlyingGambit That's stupid
ah can be true
@FlyingGambit how do you auth ? at the client side ?
Send it through HTTPS as you usually would.
@BenFortune Stupid it may be , but I have no say in this
10:24
Say that authenticating on a client side is same as leaving the key at the house's door lock.
Then put up a fight. NEVER trust the client for any cryptography.
@KarelG a password, a random image pin and a 3 eye thing
Everyone can twist the key to enter the house
Give the key to the person behind the door
@BenFortune I changed it but it doesn't resolve my issue.
@MRah code?
10:26
@BenFortune Nah, I am just a week away from leaving this company once and for all
@FlyingGambit Not really an excuse lol
@FlyingGambit 3 eye thing ?
Unless they're doing something really shady
@KarelG Forgot the exact term , but when someone tries to login , they are sent a random number to their phone, then the user has to use that number to solve a image puzzle
10:29
ah 2 factor authentication
o/
Are there some typeahead users here? I have to do somewhere a JSON parse I guess.. because in my search result I always have the full json result .. that's not really what I am looking for. So far I got this.. kopy.io/n2UxJ Dropdown etc etc is all working. Only when clicking the selected result . . . the full json result appears in my tt-input textfield from typeahead
@BenFortune The thing, the company I work mostly consists of Java (these ppl never worked on frameworks) developers, me being the only JS dev here. They are trying to convert their Swing GUI to a JS based web app. Being a banking company they are paranoid about almost everything. The AES encryption thing arised when I told them that anything in a page can be changed from the console (me showed off my skills in changing Google to my name).
!!afk meeting
@Villemh Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
1 message moved to Trash can
@Villemh Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
@FlyingGambit Exactly, anything can be spoofed on the client. What's to stop people spoofing that?
Hi,

Is there any way to check in JS if function was executed successfully?
For example I have:
value = value.replace('$','')

I want to do something if the replace was successful but if it wasnt, I want do something else

can I do something like:
value = value.replace('$','')
if(success) {
action1
}
action2

?
10:39
const newValue = value.replace('$', '');
if(newValue !== value) {
    // Something changed
}
Guys it there a way to use google marker cluster and add style to each marker?
Icon I mean*
@WorkingPig Just loop through getMarkers()?
Someone can check it jsfiddle.net/wjqwd467/6 in IE?
@BenFortune Ow yea Your are right, I was looking in the wrong section of my code, Still thanks :)
@MRah sure
@MRah it does not work
10:47
github.com/KELiON/cerebro Pretty neat little program.
@BenFortune bit like alfredapp.com
@FlyingGambit you have shown that you can do everything on a page, but they still want to do client side auth? I know that managers can suck, but they really suck. What for a bank is that?
@KarelG FlyingGambit is afk: meeting
Yeah, but it's free, open-source and cross-platform.
noajs
@GURURAJDHARANI Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@WorkingPig In my IE it works... Does it work for you in google chrome?
affinelayer.com/pixsrv <-- you get sometimes quite funny images
Can someone suggest me any JavaScript's OOPs tutorial video?
Best one
I'm looking for a "naive" datetime picker in angular which doesn't include timezone. Actually I'll have a timezone picker on the right. Both these pickers together will let me create arbitrary times.

I'm currently using https://dalelotts.github.io/angular-bootstrap-datetimepicker/ and it has timezone information included in the timestring.

Any help/code is appreciated
11:03
My problem is between the google chrome and IE in jsfiddle.net/wjqwd467/6
I changed the Object.values ...
*The different between...
11:21
0
Q: Add image in dropdownlist

Ivin Raj1) I want to add image with the options in the dropdownList .I have attached screen shot 2) and also i want to select the language first and country which are related to this language should be selected.It is working fine ,the problem is when i select the language the country drop downlist a...

mornin
so .. guys .. how do you handle the authentication state in AngularJS?
@KarelG Its banking related, in the sense that banks use our product as their dashboard. Mostly European banks and recently ICICI (CEO claims that they tried to build something similar to ours and failed so they decided to buy our product). The new web app is still in research phase so many things would change over the coming months
@IvinRaj there is no effort from your side ... look for ::before or simply google it ...
eh, that wouldn't pass through the security measurements that my banks uses ( i hope )
I've an account at three banks and they don't use java or some bootstrap shit.
anyways, your manager is a dumb person or stubborn
!!afk lunch
11:38
@MadaraUchiha cute
though there is an "official" way to mark canadian dollars
@Mosho CA$ or some shite
It's ugly though
fair enough
@KarelG oh as a bank account user, you will never see our app. The accountants however use them. I mean to say that people working in bank use them not their customers so the chances are you might not have ever seen it
@FlyingGambit KarelG is afk: lunch
11:58
1 message moved to Trash can
how can one move a message into trash can?
@jacobian Room owners and moderators can.
People whose names are italics or blue (like mine)
Caprica's name is in italics
"Torvalds uses the pay-for proprietary software to manage the Linux source code (obliging other kernel developers to follow suit), but last week its owner, Bitkeeper CEO Larry McVoy, yanked the license, pushing Torvalds to look for an alternative. "
What does yanked mean in that context ? ^
12:13
@FlyingGambit Pulled away, revoked.
It means that they stopped allowing them to use their software
In the sense that the CEO made it open source ?
No, in the sense that the CEO stopped allowing Torvalds to use their software.
They probably revoked the free licenses they've been offering.
Okay, let me try and explain, I am suppose to give a GIT overview tomorrow, so I thought I would give a little history detail on it before starting off. But I am not understanding why Linus Torvalds really moved away from BitKeeper. So I turned to Google and found this article
The quote was from that article
other idea: I hate signing up with google/facebook to things, and on the other hand I also like only having to push a single button to get into things. A service made exactly for the purpose of signing in/out of things and managing them (on google, I have no idea how to see what things I've signed up to) would be lovely, with a simple iframe button and/or api to export to different sites
this can actually open up revenue possibilities based on the companies who might want additional api/button services
12:19
firefox breaks if you move it's window to your second screen's top to maximize there ._.
ads wouldn't be very profitable, as I wouldn't expect people to go on the page to manage their accounts very often
huge potential revenue could be selling the information to verious marketing services, but that's the exact thing I'm trying to avoid
question is: are there any sites like this, and how quickly did they fail?
linux kernel has so many drivers for hardware built in and that's why ubuntu is faster. while windows kernel are lean and you need to install drivers for the hardware to work.
@jacobian I thought Ubuntu used Linux kernal
do you check your sentences before sending them ?
12:23
@jacobian Some of the shit you say, jesus christ lol
2
so how can one applied to be room owner and moderators here? is it once every 4 years?
do one have to do some campaigning here
@jacobian Room owners are up to a specific room
Moderators are elected every once in a while
Moderators are for the whole site, not just a specific room
I am standing up for the next election, vote me up for free pizzas and table flips on Fridays
@jacobian Gotta cosy up to the other room owners here, maybe bribe them a bit
@BenFortune I don't worship jesus christ so don't use that on me.
12:29
Don't take it as an offense, he just meant to say that your statement did not make much sense.
@FlyingGambit you could have figured that it was for jacobian. But your comment has reached the network before mine did ;)
@MadaraUchiha @littlepootis Thanks, I understood now, Linux being an open source was given free Bit keeper license which was then revoked
@FlyingGambit Yes
@towc uhh, there's the web credentials API, you might want to look into it
did i just saw some hebrew thingies brewing up ?
12:31
@KarelG Just wanted to make sure :) before starting off with my debate :P
I saw them too
Madara was quick to change it
איפה אני יכול להשיג וודקה טובה?
hebrew, thai or armenian :D?
Hebrew ... use Google Translator
wuuut, is Hebrew RTL? Google just docked my query to the right
I wish for a simple OR statement instead of re-using the selector chain ... like .row .clickedCell (.bgYellow | .bgBlue) instead of .row .clickedCell .bgYellow, .row .clickedCell .bgBlue
12:47
well, at least nesting is in the spec cssnext.io/features/#nesting
@FilipDupanović @MadaraUchiha can give us some insight
@FilipDupanović Yes, Hebrew is RTL
@FlyingGambit אצלנו במשרד
LOL ... I would love to work there ^
@FilipDupanović forgot to add that it's for the querySelector function in js :)
@MadaraUchiha באמצע הרחוב שלנו
12:51
-1
Q: I cannot place variable in javascript code

ZetIn my script I want to place a variable and I don't know how: function myFunction() { var screenHeight = screen.availHeight; var wrap = document.getElementById('wrapper'); var wrapHeight = document.getElementById("wrapper").clientHeight; if (wrapHeight < screenHeight) { wrap.style.height = 6...

lol
@KarelG Wait what
Wait, is = 600px valid? What?
@KarelG just wondering, someone might have written a nice tag for parsing CSS selectors q'.row .clickedCell (.bgYellow & .bgBlue)'
sounds plausible... what's up with sizzle, wasn't it a parser?
13:25
It's a selector engine.
someone should write a extension to react called JSZ. all the classes can be jay z songs.
he said it's working with 600px
can anyone tell me why i'm failing to change all the previous siblings color?
$(evt.target.parentElement).prevAll().css({"color":"black"});
log what evt.target.parentElement is
probably undefined
er, or not what you'd expect
it isn't I just logged and it does what I exprect it does
13:35
okay, now log .prevAll()
see if it is what you'd expect
it is what I expect
then it should work
matter of fact I even found a fiddle that does what I'm looking for but I cannot apply it to what I need
so this is the working one?
show me your attempt that breaks.
$(this).parent().siblings()
wtf
oh
13:40
This is my "you didn't format your code" stick:
@luggage do you have any project that uses sqlite3 effectively? Browsing github is showing me a lot of useless stuff
in node or just standalone?
github.com/mapbox/node-sqlite3 the project page has a sample of using it in node.
node ideally
Although you'll want to use something like Sequelize.
sequelize hides the SQL and learning SQL is one of his goals
13:44
@Luggage yeah, that presents the only 2 scripts that seem to be of any utility...
everything else is a slight modification or just useless leftover stuff
what do you mean?
@Luggage His means who ?
it provides the script in the readme, and the one in examples/
whenever I look for other stuff to learn about it, it mainly just gives you a variation of the two
the attempt that breaks is that line I gave you before
That is just an example of sending a database query and getting a result
13:46
yeah
Everything else is done by sending a different query in SQL.
so that's all there is to it.
I need to use this command
$(evt.target.parentElement).prevAll().css({"color":"black"});
well, for example I noticed that khan academy lets students learn by giving them a query file that is later ran
if prevAll works and the parent element of the target event is what I expect it to be then what I'm doing wrong?
I can't seem to find a nice way to just parse and run a file using sqlite
13:47
you just send it the text of the query. It is it's job to parse and run.
That's what a DB engine does.
takes a query as a string, executes.
  0 var sqlite = require('sqlite3').verbose()
  1   , db = new sqlite.Database( 'test.db' )
  2   , fs = require( 'fs' );
  3
  4 fs.readFile( 'test.sql', 'utf-8', ( err, data ) => {
  5
  6   db.serialize( () => {
  7
  8     db.each( data, (...x) => {
  9       console.log( x );
 10     } );
 11   } );
 12
 13 } );
I tried this, for example
but it gives me the error that the database isn't open
well, I did try db.run( data ) first instead, and used a standard query for everything on db.each
but still same error
so it looks like the only sane way is to have some prepared statements and run/finalize those
and I really don't see why
shouldn't be.. lemme try.
Error: SQLITE_MISUSE: Database is closed
    at Error (native)
    at Database.<anonymous> (... blah blah)
maybe it's the sql that was actually wrong...
what's in test.sql?
CREATE TABLE if not exists test (info TEXT)
INSERT INTO test VALUES ('lol')

SELECT * FROM test
sorry for the vim line numbers
13:51
morning everyone
It's telling me that it has a problem with line 2 of test.sql, think it's missing semicolons
@MadaraUchiha a bit. Didn't really get into it
CREATE TABLE if not exists test (info TEXT);
INSERT INTO test VALUES ('lol');

SELECT * FROM test
same error
I don't get an error connecting ot the DB.. do you have access to create the file?
or does the file already exist?
you're messing semicolons
13:56
oh wait...
I had db.close() at the end of the file for some reason, leftover from another thing and after a ton of commented out code...
working now...
sorry and thanks

« first day (2321 days earlier)      last day (2850 days later) »