« first day (2326 days earlier)      last day (2614 days later) » 

12:33 AM
How does one get JavaScript to execute a jar file and retrieve the output?
 
@JonahSloan you don't
JavaScript has nothing to do with Java
It's just inconveniently named
 
node ./jar.js
 
@ndugger Can't javascript start an executable though?
 
@JonahSloan Not in and of itself, it needs to have access to the operating system
 
That makes things trickier.
 
12:38 AM
I don't understand how.
 
@JonahSloan Are you trying to do it in-browser, or via node?
 
Or perhaps something awful like WSH?
I used WSH professionally for several years, lmao
 
Wall Street Hournal?
 
@ndugger in-browser
 
Yeah, you definitely can't do that
 
12:44 AM
@JonahSloan Webpage JavaScript does not have access to the operating system or user files
At minimum you'll need a proxy to do that
 
 
2 hours later…
user6820627
2:37 AM
Can CSS 3D handle coplanar polygons?
 
@LearnHowToBeTransparent Probably depends on what you mean by "handle"
 
user6820627
3:00 AM
@KendallFrey i mean will it fail like painter's algorithm
 
user6820627
> Overlapping polygons can cause the algorithm to fail
 
user6820627
 
3:14 AM
make a test case, would be interesting to see
 
3:34 AM
NG2 question:

Has anyone been able to do data-binding with dynamically added components via router-outlet?

For example, In my profile page, I have 3 tabs. When i click on the first tab, it generates a child component; When the child component initializes, I make an API request to get data and bind the data to the template.
 
Sorry I only know Angular 4
2
 
same
 
=(
 
user image
2
> We couldn't find the candles for the numbers.
 
3:50 AM
Hey! :)
 
why
 
4:39 AM
@ndugger WSH = Windows Script Host
 
 
2 hours later…
6:35 AM
1
Q: get selected checked value from patosai tree multiselect

Alexander ChandraIm trying to get value from checkbox that has been checked, but for some reason the value is shuffled in some weird pattern here jsfiddle (try to check fruit and then click disable) <input id="checkedTree" type="text"/> <select id="test-select" onchange="getCheckedTree()"> <option value="1" d...

 
 
2 hours later…
@metalhead101 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.
 
instead of $('#container1').highcharts
 
1 message moved to Trash can
@metalhead101 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
 
 $(document).ready(function() {
              var buttons = Highcharts.getOptions().exporting.buttons.contextButton.menuItems;
                var options = {
                    chart: {
                        renderTo: 'mylineChart',
                        defaultSeriesType: 'line',
                        spacingLeft : 60,
                        zoomType: 'x'

                    },
I want one legend for both the chart
 
is it possible to do a form validation if my field is looped?
like if i have a textbox that generates dynamic dropdowns
based on user input
would i be able to do a validation on it?
 
8:16 AM
@ranger Why not?
 
for example if same data are chosen from the two dropdowns it shouldnt insert?
I'm not really a javascript genius im just learning atm but isn't the validation like comparing two variables?
lets say the dropdown name is called
question_dropdown
but if i entered 5 on the textbox that generates those dropdowns
it will be named
question_dropdown1, question_dropdown2, question_dropdown3, etc
since it's on a loop
and thoes dropdowns are dispplaying the same data
from the database
the dropdown is dynamic
 
What is it with the answerer here always using extremely obscure methods when it comes to array manipulation?
(While answering a question where the issue is that the OP can't tell an array from an object)
 
using a hashtable ? lol
 
If you're gonna use one, at least make the use of it a little simpler. And Object.create(null)? Come on...
 
0
A: How to put validation on a dynamic dropdown when inserting in PHP?

Rufat AskerovYou can check values in this way function check_values(){ if($('.dropdown1').val()==$('.dropdown2').val()){ alert('dropdown values the same '); } } You can check values in when change dropdown value . For this you need add common class your all dropdowns like my-dropdown $(do...

 
8:23 AM
has anyone used zeit/micro? github.com/zeit/micro
 
wait
 
they recommend using the harmony flag for native async functions in Node.js 7, but I think someone mentioned there's a known memory leak or something?
 
checked the code more closely aaaannnd ... it's not really "hashtable" mapping
she does it again
 
Hello guyz I am having trouble with high chart.. what I want is to have single legend to control the multiple line chart as shown in this link jsfiddle.net/teEQ3
 
1 message moved to Trash can
@metalhead101 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
 
8:26 AM
instead of $('#container1').highcharts I have used this
$(document).ready(function() {
              var buttons = Highcharts.getOptions().exporting.buttons.contextButton.menuItems;
                var options = {
                    chart: {
                        renderTo: 'mylineChart',
                        defaultSeriesType: 'line',
                        spacingLeft : 60,
                        zoomType: 'x'

                    },
I am beginner in javascript so guyz plz help
 
@metalhead101 You being a beginner doesn't mean you should get more or less help.
 
cerbrus
 
Now, please, provide a clear problem statement. What should it do, What does it do, What doesn't it do?
 
Currently I am working in high chart. I have two chart one show data yearly montly etc and the next chart shows only 24 hours data. What i need a single control(legend ) to control both chart
how to send screenshot here?
 
@Sheepy: Mind if I snippetify that arrays answer?
Uncaught ReferenceError: p is not defined <-- @Sheepy
 
8:40 AM
@Cerbrus You mean the array consolidation? Must be an earlier edit. The current answer should works. Snippetify it mean adding data to it, which is something I intentionally skip for such short code, but I don't mind it if you think it'd be better.
 
@cer
@Cerbrus can you help me with my problem?
 
@Sheepy Yea, that one. The if(p[date]) should've been if(result[date])
 
Good catch! Thanks!
 
Trying to validate a form
 
8:43 AM
Fair enough on the "no adding data"
!!welcome ranger
 
@ranger 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.
 
Sorry
 
So please don't ping me at random, just ask your question in here.
 
@Sheepy how's the support of your ES6 thing ?
 
But yeah I'm triyng to validate a form that will prevent me to submit if my dropdown fields have the same data
 
8:44 AM
@KarelG Latest everything except IE.
 
right now i have a textbox that generates dynamic dropdowns
 
nice
 
@KarelG That can actually be delete-voted
 
based on user input
these dynamic dropdowns have different name
so im wondering how i will prevent it to submit if i choose the same data on the dropdown
 
I actually tried to find a dup, but I don't like the answers I found. Too long for my taste.
 
8:45 AM
all answers uses regex lol... gotcha put a DOMParser myself
 
!!xkcd regex
 
@Sheepy Something went on fire; status 403
 
Too bad.
 
@Cerbrus maybe a warning to passing-by users would be more useful ? This is a XY problem
 
Having the whole question "not exist" would be even more useful, imo
 
8:51 AM
the risk is to have it asked again and the warning not made
In any case I commented
 
@Sheepy there are multiple xkcd regex comics :P
just checked my mobile
!!xkcd 1171
 
I wanted the heroic one :)
 
i know that from mind :P 208
!!xkcd 208
 
9:01 AM
can a RO instruct cap to reduce that image ? ---^
 
Uh, I think only @rlemon can do that.
 
reduce ? It would be hard to read. Maybe we should teach cap to say no when somebody asks for a comic everybody already saw many times :p
 
Oh, she's got it running
 
i thought that she only reduces / minimizes .gif images
 
9:28 AM
Riiiight. One of our biggest client - the one with 1000 tables in the database - is infested by ransomware. The whole internal website is now encrypted and the IT called me to see whether I kept a backup. Nice.
 
@Sheepy What do you have to do with it?
 
eh that infection is caused by an internal or there may be a poor security
 
@MadaraUchiha I maintained it. Fixing bugs and keep it working. Before I resigned, that is.
 
@Sheepy Aha
sux2bthem in that case.
 
Aha indeed. I actually found a 2014 backup. If that doesn't work, well, I have resigned.
 
9:33 AM
Given how widespread and public ransomware attacks became lately, I'm surprised you aren't hearing more moaning about the general state of cybersecurity from the public.
 
@Sheepy the one for which you have to support discontinued versions of IE and Windows :D?
 
@FilipDupanović No. Not that one. That one is a new client so we didn't get to work with their big stuffs.
They are not the first anyway. Last year we have had another client who got TBs worth of data encrypted. The best part? They tried to restore backups and realise that the backups are the encrypted version.
 
wtf
 
It happens if you don't keep old enough backup and discover it too late.
 
a backup strategy that i usually recommend is year (everything) / month (everything)/ week (important components) / daily (core components).
 
9:41 AM
But then, they didn't get their site encrypted. Ramsomware is getting smart.
 
phew, I'm mostly getting hit by bots that scrape GH for developer emails
 
I know my ex-company is keeping a lot less backup since I resigned. Tried to say it's no good but "the IT has their reasons". Nothing I can do. Not going to help them keep backup on my computers.
 
do you have backups at home ?
I have those yearly backups stored in my locket at home
and from some months
 
If you mean personal data, only the photos, but on more offline harddrives than I care to count. :p
 
10:06 AM
company data :P
i barely backup my own data
oh google <3 "java checking html in string" gave me SO answers with regex
 
Company data, my personal backup policy is I don't delete them. So I still have projects from over 10 years ago that I know is nothing like what the client is using now :p
 
I know a company that uses 3.5" desktop internal HDD drives to store backups. If it's full, they just remove it and plug a fresh HDD in that.
their answer was "it's cheap"
had to grin
 
That's my policy too lol. Last year I moved because of baby, and I have a box of harddisks. Last month I gave the newer ones to my dad. A month later, I find that I am studying hdd benchmarks yesterday as I compose my list for a planned new computer :p
 
Current depressing task: replacing functional looping with good old for loops to solve performance problems...
 
You'd have thought the js engines are smart enough to produce code that runs as fast as for loop. :)
I have done something more depressing. Rebuilding a big chunk of UI factory to string based, so that the result is one simple insertAdjacentHTML instead of 10k DOM operations.
 
10:20 AM
that's a common one, and yes it's depressing
and I did that today too (small code though), and had to remove some protections by carefully concatenating some strings instead of properly using textContent=...
(locally produced strings, so no danger for now)
Chrome's timeline is a precious tool, there
 
I swear by Firefox :D
And I am helpfully contributing beta crash report on a daily bias (sigh).
 
I guess there's a similar timeline feature in Firefox ?
 
Of course. :) And the fact that Firefox is slower (sorry Mozilla) kind of helps too because the functions run longer.......
So, in order to speed it up, I am determined to upgrade to Ryzen XDDDDD
 
You can set up some throttling in Chrome dev tools if your browser speed a concern
 
ah i couldn't wait for ryzen
got an i7 setup last month
 
10:30 AM
My main problem is that everything which is instant is normal browsers can feel sluggish in IE11 and that's hard to investigate
 
but i have a small problem with my hdd
it's a dual setup, (500GB) SSD + (1TB) HDD.
the ssd reacts fine, but the response time of my HDD is slow (300~500 ms). I thought that it's broken, but it isn't. I even used a new one and same problem. The "not sleep" option is enabled
R/W speed is normal. it only responds late to the events from the OS
 
Consistently or only after idle? Model?
 
How would you go about implementing a dynamic table component in React? Something that could take in filters for sorting and/or checkboxes to select multiple rows.
This would require several components I'm just not sure how deep to go. I'm thinking of a component row being the lowest level one.
 
@Thaenor I don't think the table should be aware of its own sorting
Mainly because the sorting might come from outside the table (controls in a sidebar, for example)
 
@Sheepy the newest seagate Barracuda
even the old seagate barracuda 7200.12 has same behavior
 
10:39 AM
@MadaraUchiha what about checkboxes to select 1 or more (or all) rows
 
i used the last first from my old PC. But it reacted slow, so i thought it was broken. So bought a new hdd one
but that has same problem too ...
idk where to search lol - the problem is consistently
ya know the formatting (without "fast" checkbox) took a whole night ... unusual
currently I have steam on it with mad max and it loads ... slow
had to wait 20~30 sec when the game is done with launching. Then it goes OK unless it's saving.
GTA V on my SSD loads super fine
 
@Thaenor I think the question of what you do with selected rows matters here
Regardless, I think the logic of allowing this would have to be in the table.
 
10:54 AM
@KarelG Hmm. If benchmark turns out on par, then it's the harddisk's own power save feature - nothing you can do to disable it. And HDD always feel slow compared with SSD, even VelociRaptor :)
 
You'll need to come up with a way to externalize the selected rows.
 
@MadaraUchiha the logic would have to be inside the table?
 
@Thaenor Yes, an external component wouldn't know which rows are selected (or even rendered)
 
@MadaraUchiha so I couldn't have an external component controlling the table?
 
I'd imagine you'd have to make the table accept a callback for getSelectedRows which will return the selected rows in some fashion to the outside world.
@Thaenor Not the selection, anyway.
 
10:57 AM
I'm so confused now... 😕
 
@KarelG I personally avoid seagate, though. Their record is bad enough that I don't want to try my luck. I've been going to HGST for my hdd needs.
 
something like this Hmm, no, it's a bit tougher than that.
 
@Sheepy i know that a hdd is slower, but a reaction time above 300ms ?
didn't know that it has an internal power save feature.
can you not keep it active, even OS instructs to keep it alive ? -.-
 
btw, seagate is a solid brand IMO
 
10:59 AM
Take a look at this example.
 
even peeps on reddit suggests them :P
 
@KarelG A very close model, the 7200.11, had a firmware bug that'd brick them after a few months of use. And if you look at the blackblaze report.... Sure, even for the worse model most of the drives are fine. Like I said, on a personal level it's down to luck :)
 
that 7200.11 version is like the geforce gtx 970 fiasco
damages the company rep, but other products are still decent / good
 
<3 backblaze
 
eh, i have plenty seagate drives and didn't have experienced failures with them
 
11:07 AM
Every seagate I've owned has died within a year
I exclusively use WD now
 
really ?
i hope not WD black
 
Green usually
I have WD red in my server
 
@KarelG Neither do I, to be honest. My last main pc had a seagate main hdd and it worked fine for five years until I switched to SSD. Dad have had two bad drives though. That's when I learned from his experience and only by higher class harddisks :)
 
11:23 AM
Going offline. Bye everyone!
 
what's the best way to quickly test a react library? I want to use codepen but I can't just npm install to it... But I also don't want to create a single project with a buttload of files just to render some quick stuff
 
@BenFortune I can't just use that to test npm packages :)
 
@Thaenor runkit.com
Probably won't work though, just create a dev environment
 
11:43 AM
Is there some kind of this.props.setChildren method in react?
 
What do you expect setChildren to do?
 
change the children elements :p
Can the parent change the state of a child component?
 
Haha wtf
 
@Thaenor Not easily.
Unless they share a "store"
i.e.
let foo = {some: 'data'};

<Parent store={foo}>
  <Child store={foo} />
</Parent>
Changes to foo will be visible to both.
 
12:23 PM
@MadaraUchiha I've been talking with some people and apparently I just stumbled upon the need for a store.
that's why we're using redux.
 
@Thaenor Yes
The other solution is to handle all the state in the parent
 
(well, not now NOW, but eventually we'll use redux)
 
And pass that state via props to the children
 
simply put we'll have a component checkbox that as it's state controlled by the store.
 
@Thaenor If you get the choice, push for Mobx instead
Long story short, it's better.
 
12:24 PM
I have a Chromium that refuses to load maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/… It always shows net::ERR_INSECURE_RESPONSE
 
@MadaraUchiha I don't think we'll get to choose much on that subject. The team's mind is set on redux
 
However, on Chrome on my machine, the URL loads just fine
Any suggestions?
 
@OliverSalzburg send that hilarious gif "it works on my machine"
 
@OliverSalzburg Hmm
Certificate chain looks good to me.
Maybe the computer in question doesn't trust GeoTrust?
 
@OliverSalzburg could be a bug in the upstream when checking the certs
 
12:27 PM
On the failing machine, I get There are issues with the site's certificate chain (net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED).
When browsing directly to the CDN URL
 
or that the certs aren't "good" enough
 
Never seen that before
8
Q: Why is one of three browsers reporting an invalid HTTPS certificate?

Arseni MourzenkoA few days ago, Chromium started to report Flickr's certificate as problematic: The server presented a certificate that was not publicly disclosed using the Certificate Transparency policy. This is a requirement for some certificates, to ensure that they are trustworthy and protect against at...

 
ah it's a bug it seems
 
a very tenacious bug
!!urban tenacious
 
@FlyingGambit tenacious Preserverence; Not giving in easily.
 
12:36 PM
tenacious, n. preserverence
 
Hi guys.can someone help me
hen im sendind request ith Ajax on loclhost my headers are Post
when i upload exact same site on hosting they suddenly become OPTIONS
 
@BrightSun Cross origin, probably.
 
yes. but i cqnt get rid of it
 
@BrightSun By design.
The idea is that cross origin requests are dangerous, and so you're only allowed to send them if the receiving server supports them.
 
is this have soething to do with localhost maybe; or i need to hardcode my bas url somhere
 
12:49 PM
@BrightSun localhost is free of this limitation (in most cases), because it's on your local machine.
 
but on localhost they are post
oh
 
But anything other than localhost is not.
It's the localhost that's the exception here, not the other way around.
 
is there are wqy to fix it?
but ty for your help, got me confused
 
@BrightSun The server is expected to respond to the OPTIONS request with certain headers
Then the POST can be safely sent.
OPTIONS is the browser's way of asking the server if it's allowed to send the POST request.
Read about how cross origin AJAX works.
 
ic than you
 
12:58 PM
Pfff upvotes are really for the most trivial questions...
3
A: Following a tutorial, cant figure out my javascript syntax mistake

Denys SéguretUse semicolons, not commas, in the for construct: for (var i = 0; i < nomesTags.length; i++) { ^ ^ The reason the syntax error is after the increment is because the JS engine expects 3 statements inside of the for's brackets, but you only gave one (commas don'...

 
ya can explain what comma's do
 
1:24 PM
I found this codepen.io/loktar00/pen/jbCzt while cleaning my bookmarks
 
1:41 PM
@FlyingGambit nice! i might add some pieces here: github.com/lipsumar/day-dream-interfaces
 
@lipsumar 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.
 
var id = $(this).parent("div").attr('id');
var data = { id : $(this).text };
is it proper syntax?
 
Sure, it probably won't do what you want though.
 
@user6827096 it's valid but won't do what you want
you'll end up with data.id = something
where i suppose you want data.something = something
you need the bracket notation:
`data = {}; `
`data[id] = $(this).text;`
 
I think the larger issue is that text is a method
 
1:49 PM
@lipsumar thanks
 
oh, yes, that too :)
 
@rlemon o/
 
ahoy
 
how to use enter keystroke in this chat while writing more lines?
 
shift + enter
 
1:56 PM
shift enter
BOO
 
thanks
 
B
O
O
 
B
S
?
 
Is there a way to create File Upload using Visual Composer? There is no file upload in the documentation :(
 
> Visual Composer: Page Builder for WordPress
nothing about that sounds pleasant
 
2:02 PM
* shivers *
 
@lipsumar Bookmarked :D
 
good morning everyone
 
o/
 
@lipsumar I misread you name as lispkumar.
I just watched the Hugh Mungus video for the first time.
 
2:17 PM
@littlepootis :D
 
2:28 PM
rlemon I put in a lot of time trying to get hot module reloading working in electron. The commonjs module excluding we did for sqlite3 is causing some trouble. I haven't been able to get it working while keeping that.
 
@Luggage Don't you need to build electron from source for some native modules?
 
I didn't see that mentioned in what I read..
 
Oh, it's the other way around. You need some electron headers to build the module
 
Do you have a link to what you are talking about?
 
2:32 PM
hm.. OK. I'll look into that, but I / we only had problems with modules like sqlite3 when webpacking them.
So.. I'm not sure it's related.
 
Ah okay
 
Now I'm trying to setup HMR in my web project, which I thought would be simpler, but it's failing.
Gonna go through the tutorial again before I start asking for help.
ok, there we go.. had a path wrong.
 
neat.
but I stopped using sqlite3
 
well, i might be able to get webpack hot reload working if I stop making node_modules external, but it is useless to bundle all of those.
Also, there could easily be another module with native code in the future
 
Jetbrains Rider is amazing.
 
2:47 PM
Better than VS?
 
This thing is on another level. I've never used something like this.
@BenFortune I haven't used VS enough to comment on that.
 
looks like VS style intellisense.
also resharper is available to slow down VS if you want it there.
 
Had to pay for it last time I checked too
It was free at one point
 
If you like Rider, it's likely that you will like ReSharper in VS more
Just because no IDEA is involved
 
what if you don't need resharper ? :o
 
2:54 PM
Then just use VSCode.
or VS Heavy if you need some of it's features or project types.
I just say a video by MS showing off VS's new integration with Linux on Windows, letting you compile and debug linux binaries on windows.
 
why can't I handle the error?
 
1 message moved to Trash can
@Riccardo Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
if (xhr.responseText=='you are not authorised to view the page') {
// handle error
} else {
// handle success
}
 
@Luggage That'd be cool, along with the native Ubuntu integration
 
that's what it uses.
 
2:59 PM
Ooh
 

« first day (2326 days earlier)      last day (2614 days later) »