« first day (2795 days earlier)      last day (2155 days later) » 

1:50 AM
Good morning.
 
 
1 hour later…
3:05 AM
Hey guys, why am I getting an error doing const num = 15 as Number with babel? Is as operator not supported?
 
that's typescript, not vanilla javascript
are you using the typescript babel stuff?
 
@david hey, thanks for the reply. I am kinda trying this github.com/facebook/create-react-app out and seems like they have preconfigured babel .
yeah, its not vanila js. its jsx
 
jsx still doesn't have typescript, you need .ts
 
babel doesnt care about file extension right? do you think it's correct if I start exploring babel typescript support?
or i should really not rely on babel for this
 
i have no idea what create-react-app's support for typescript is like, so if you want to use typescript you're kinda on your own
webpack will pick which preprocessor to use... it may be set up to only run ts files through babel+typescript
 
3:18 AM
@david ack.. am so stupid.. you gave me enough keyword to proceed, thank you..
to support .tsx (typescript)
 
yeah that sounds about right
 
3:30 AM
hi guys i need a small help with react
 
@MontyGoldy 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 am mapping over an array and want to add onclick to each item. But if i click one it opens all of them.
Any help will be appreciated
 
3:49 AM
anyone here good with firebase?
trying to get the user push ID string generated by firebase
via web api
@MontyGoldy assign a different key to all of them
 
4:04 AM
how to create a border like this snag.gy/oMhWIa.jpg ?
 
 
4:50 AM
Why does learning programming cause fatigue?
 
5:01 AM
when i try to vote my own post how does it know it's the OP that's trying to vote
 
5:21 AM
@Nobody you have logged in and its your post?
 
yes
 
5:41 AM
can anyone help me with firebase
 
6:26 AM
@FlyingGambit seems that svg got used. Or a superb CSS3 trick
or a transparent png image
 
@Naveen 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.
 
6:53 AM
Does anyone know about this problem ?
0
Q: How to cover unit test branch in object property as function

N SharmaHello I am writing unit test case of my function which is like const Services = { test: async (token) => { .. ... } } I have written unit test of this function, report says test covered all lines of this function but async (token) => { shows in yellow background in report which m...

 
GOOOOOOD Morning EVERYONE :D
 
B̡̺̳̬͎̞̳̠̮̜̩͕̣͕̩̠͇̺͔͟͟A̷̢̛̖̟͍͎̰͝ͅĄ̢̹̙̳̭͞A̵͍̳̪̼̤͚͉͉̞͙̩̬̲͉͍̦̫̳̕A̢͍̱͇̟͓͖̠͡D̵̨̛͈̥͕͘‌​̰̻̺̰̳̖̼͍͔̮̹̗͕ͅD̨҉̵̺̙̻̬D̶̛̻̺̖̲̳̲̯͕͖͈͔̺̯͓̰̯̞̹Ḑ͔͇̟̗̞̳̜̱̺͈̝̳͉͎͈̱̬̀͘͜͝ ̵̢̧͖̺͈̠̭͕͟ͅm̢҉̪̝̲̳͚͔͉͉̗͈̤̹̫o҉͏̶̲̭̗̘̰̘̩̬̟͈͇̟͔̫ó̶̵̭̝̥̮̠͉̞̥͕͖̼̰͜ͅo̵̢͚̺͈͍̣̝̼̺͚̠͜o̡͘‌​̭̱̮͈͔͝ŕ̲̮͓͖̺̮͡͝n̸̟͎͚͎͓̪̙͚̪͇̖̣̗̭̹͕̮̠̜͢i͝͏̖͈̳͖̮̹͎͇̣͓͚̣̜͓n̷̡̛͈̝̜̘͍̥͍̳͕̙̰̬͞g͝͏̤̜͓͎͍̀‌​̜̖͎̯̝͈͕͕̪̞
*nips from coffee*
 
@KarelG that looks like bad hangover...
 
Never had a hangover. Just not enough sleep last 2 days
 
partying all weekend?
 
6:59 AM
I slept ... 4 hours in total over 3 days.
not only that, but also receptions
renewed my certificate at the red cross and another reception for a local social workplace were we have collected money for (as voluntary firemen)
we collected money by running a small marathon (20 km) with a full suit
 
Damn dude, your own fault then for not getting sleep. Kudos on doing volunteer work. But don't let that shit mess with your sleep cycles.
 
ah well, it can happen that I get a busy weekend. Just not often. I could leave earlier at parties but I am just that kind of person that can stay long
 
I hear you. I just like my sleep to much. Sleep and Warframe. :D
 
7:24 AM
warframe?
 
7:49 AM
 
how can i get current drilldown's point / id with multi level chart ?
 
@New_2_Code seems interesting
 
@KarelG It's really an awesome game. (If you don't mind grinding.)
 
You won't see me playing such games
I do not have that much time :|
 
8:04 AM
Dude Space Ninjas... You must make time. :D
 
Hi guys how to chain my promises here:
mengupdate_data_profil(req, res) {
        var nama_unit_org = req.body.nama_unit_org;
        var nama_ketua_unit_org = req.body.nama_ketua_unit_org;
        var nip_nim = req.body.nip_nim;
        var email = req.body.email;
        var no_hp = req.body.no_hp;
        var params;
        var user;
        if (helper.isExist(nama_unit_org) && helper.isExist(nama_ketua_unit_org) && helper.isExist(email)
            && helper.isExist(nip_nim) && helper.isExist(no_hp)) {
            if (nip_nim !== req.user.nip_nim) {
Please help. Thank you
 
8:33 AM
 
when i try to vote my own post how does it know it's the OP that's trying to vote.. are they passing the logged in user and checking on each click if clicker is op
 
"your own post"
is it not pretty straightforward?
just check user new vote to the list of existing votes and post owner ID
 
hm
 
Think it is probably IP based in server or client side check?
 
you can mark your own answer as answer though
 
8:49 AM
@KarelG Voting is meant to be anonymous.. Dont think SO would have a table like that... Its not there in data.stackexchange.com
 
if they made the table public then the votes are not anonymous anymore right ? :)
 
rite
 
not all tables are accessible via the SO query
 
select user, password from User
 
heh
 
8:50 AM
ez hax
TIL in russia you can not get banned for using hacks in games
well, more like TODIL
 
todil ?
 
the other day I learned
 
cheating is probably allowed in their culture
 
it's because when you buy a game it belongs to you
so they can not ban you, cause that is like stealing the game you bought
 
on your own game yes
 
9:00 AM
so if you want to sell games in russia you have to accept that
 
but cheating in online is not
 
they can not ban you
 
if the server is outside russia you can :P
 
I don't think it's about the server location
it's about goverment
if you want to sell games there, it's fine, but don't ban anyone
 
but fyi, if you want to have first access to hacking tools, best to learn russian
 
9:02 AM
yes
 
most tools that got renewed/patched were made there. Fortunately some russians contribute to provide an english translation on a darknet forum I have been visiting
 
that's so dark
 
They only demanded to not attack them
+1
( = I take it in as joke)
 
can we use multiple drilldown event function(e) in highchart ?
 
9:52 AM
docker/mongo help: I'm setting up a docker-compose.yml on something that will be open sourced. One of the services is mongo, and I'd like to add a user/password. It seems that adding MONGODB_USER and MONGODB_PASSWORD in the environment object in docker-compose.yml would work, but then if I push it, the credentials are visible to everyone
maybe there's a nice solution in which docker/-compose / yml allows you to execute a js file to get the contents of that env variable, or maybe mongo has something like that too, so I can add it in a volume
or maybe there's a way to make mongo only visible to the backend server that would access it, so it wouldn't need authentication either way
the current horrible (but usable) solution I can think of is to have some other command that generates the yml on the fly, and runs docker-compose, but urgh
 
oh, that's neat!
 
hey guys i have a script that creates a text area after click event. the problem is it has only to create once. But i am able to create now more than 1 wich is not good
can some1 help me with this code
function reactfor(that) {
    id = that.parentElement.parentElement.id;
    $("#" + id).after("<div><textarea id='com'></textarea><button type='button' id='btnoke'>Oke</button></div>");
    $("#commentinput").keypress(function(e) {
        if (e.which ===13){
        savecomment();
        alert("enter pressed");
    }
    });
    $("#btnoke").click(savecomment);
}
its a onclik event
 
@namzaG not related but you should use let/const for variable declarations, it appears you don't use any
id = that.parentElement.parentElement.id; unless id is a global variable?
 
10:07 AM
thats not a problem
its about this function
 
use let
 
@namzaG it could be a problem in the future. for the function, it looks like you have to add a piece of logic that checks for the existence of the textarea before the creation
 
now out of curiosity: what's your $ which node?
 
mine? /usr/local/bin/node
 
10:22 AM
@johnmarinelli the reason for this function is that if i click on reply button it will add a textarea but if i click more than 1 it will add more than 1 textarea
 
@namzaG if (text_area_Already_Exsists != true) {do the following}
 
^ that, except instead of != true you can just use the not operator !text_area_Already_Exists @New_2_Code
 
Hello friends if anyone know highcharts then stackoverflow.com/questions/50618957/…
help in this question
 
in this angular code   $http.get('/PrescriptionMgmt/Get_BrandName').then(function (d) {
        $scope.Productlist = d.data;
    }, function () {
        alert('Failed');
    });
in above code only minimum value is working but max 100000 value it's not working
 
lol what is minimum what is max i see no instances of those variables in that code
 
10:34 AM
for example minimum 10 records it's working
in above picture return 10000 . in that code going to alert section
 
@IvinRaj the error function returns an error object. you might want to log that and check
function (err) {
        alert(`${err}`);
}
crap kept pressing cmd + k instead of ctrl + k
 
okay wait
@SurajRao
showing this error Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
 
@IvinRaj then your json response is too long
 
max of value json ???
 
@IvinRaj you probably shouldn't be returning 11k rows from your server... i don't know your business case but it just sounds wrong
 
10:45 AM
test out your apis using a rest client like postman
before trying in your client app
 
10:56 AM
@IvinRaj what is the payload of that getBrand request?
*getbrandname
there are not that much brand names
 
user9674579
Hi all
 
okay @SurajRao thank you
 
@IvinRaj you can use the streaming api. But that is an overkill :P
why do you not add it to the document when generating the html page at the server? By this the brands list is present from the start
 
does people from outside stackoverflow (let's say something.stackexchange.com) with 10k+ rep receive flag alerts?
 
@SurajRao ^--
you know SE network better than I do
 
11:08 AM
@SurajRao @KarelG
 
@Neoares yeah... they would.. I sometimes get flag in ru.stackoverflow.com chat .. Though its harder for me to understand
 
oh, but that's stackoverflow
I was talking about another stackexchange chat
from chat.stackexchange.com
 
I dont remember that case. Maybe if you happen to be in a chatroom of the same domain
@IvinRaj maybe you should start thinking along the lines of pagenation.. depends on your scenario ofcourse
 
I hate it when such committees are not finding a consensus
 
11:28 AM
@SurajRao @KarelG I added this code in my web.config
<configuration>
   <system.web.extensions>
       <scripting>
           <webServices>
               <!-- Update this value to change the value to
                    a larger value that can accommodate your JSON
                    strings -->
               <jsonSerialization maxJsonLength="86753090" />
           </webServices>
       </scripting>
   </system.web.extensions>
</configuration>
now it's working
 
seems plugin specific
but that is a lengthy json
 
yes record will open very slow
how to solve this issue
 
> why do you not add it to the document when generating the html page at the server? By this the brands list is present from the start
 
no now i changed html to json
 
why ?
 
11:33 AM
pagination, infinite scroll etc... send in smaller amounts?
 
you do not have to put everything as json
or use pagination as suraj suggested
 
why send that much at a time
 
or use streaming
but as said before, it is an overkill
 
@SurajRao because of 111k record
@KarelG any idea how to increase speed
 
are you dumping 111k records on a single page? o.O
 
11:36 AM
@KarelG yes
 
Oh Lord Have Mercy!
Won't someone think of the load times!
 
@IvinRaj imagine SO dumping entire questionlist at once in your browser
this is madness
 
there are more than 100k questions :P
but yes ... use pagination with search tool lol
 
okay i will reduce in my records
 
@IvinRaj Reducing records is not going be the solution here. Limiting the number of responses per query is what you need to do.
 
11:39 AM
i don't know exactly @New_2_Code
 
o/
Is there a user script to automatically filter questions with > 20 LoC in the question?
@AsafFisher why does your address say NYC?
Also...
> "Signed by my country to a special Cyber class at Lady Davis High School that included learning the Assembly Language(8086)."
Signed by my country?
 
USM
12:08 PM
Is angularJs same as JavaScript
 
nope
one is a framework other is language
 
USM
so aJs use JS?
 
angularJS 1.x uses plain JS
angular v2+ uses TS
 
12:49 PM
and TS uses javascript
 
1:04 PM
guys how do i download javascript
6
 
@Michael one does not simply download JavaScript
 
Just script in Java, it's close enough
 
@Michael unlike your primitive statically typed compiled languages, our superior code medium requires no "download"
it's truly write one deploy anywhere, unlike the dinosaurs of lore (cough Java cough)
s/one/once
 
1:16 PM
@Michael If you want to run javascript on a server, you want to download node
If you want to run javascript in the browser, you want to load the javascript file in the browser
 
@Cereal whoosh
 
Oh I should have clicked his name
 
where to download javascript browser plugin?
 
i have a perl script that does it for you
let me find it
 
I think there's a rails gem that should load javascript for you
 
1:18 PM
There's an npm module that installs a browser with javascript pre-installed
And there's an AUR wrapper for it
 
yeah npm install java,script
 
Hey guys, what is the right way to do this ?
  let flashAlerts = [];
  let type = "";
  let message = "";
  type = "success";
  message = "This is a success message";
  flashAlerts.push( { type : message } );
  console.log(flashAlerts)
I'd like to get something like {success: "this is a success"}
But instead I'm getting {type: "This is a success"}
How can I specify that I want the value of type as first argument ?
 
@Baldráni flashAlerts.push( { [type]: message } )
ES5+ stuff tho
 
Nicyyy
 
IE no support
 
1:28 PM
Where can I found documentation of this ?
Well, IE /shrug
 
a sec
 
Sure =)
 
MDN Object initializer -> scroll to "computed property name"
or just check ecma
 
where should I ask deep learning questions?
it seems that SO has more questions about it than datascience.stackexchange.com
 
SO is kinda a main portal
 
1:40 PM
but where am I going to get a better/fast answer?
the question got 11 views in more than 1 hour
 
idk. I just got my answers by either research or asking my professor
:)
 
I mean, it looks even more dead than this chat
can you ask him something from my part? :D
 
Ty KarelG
 
ok googled nana to have a random image and got only females
 
your google is biased, karel
 
2:28 PM
does anyone have experience with solving download issues in IE?
the server sets the content type to application/x-download
but it somehow does not work in IE: it tries to download the URL instead of the file.
 
can i do an animated change of words index?
example: come home lome dome zome
 
that's not an animation
 
come slowly goes up and lands on a random index maybe: home lome come dome zome
the words will just be slowly randomly changing their locations
 
the answer is: very likely. I just still don't really know what you're saying
 
emm...
when the page loads
you see either a <p> or <img> anything i feel like using
suppose it is 4 span elements and it displays like:
HOME LOME DOME ZOME
 
2:38 PM
make some drawings
I'm more confused than before
you mean a carousel?
 
okay
lemme open sketch
it may take some time
no not a carousel
a carousel will show:
Home...
(clears and show)
Lome
 
@Michael you already have it installed :O
Probably 30 times
Search your computer for a node_modules folder - find one?
 
Hi 😃
 
posted on June 11, 2018 by Mathias Bynens

This post describes the garbage collection technique called concurrent marking. The optimization allows a JavaScript application to continue execution while the garbage collector scans the heap to find and mark live objects. Our benchmarks show that concurrent marking reduces the time spent marking on the main thread by 60%–70%. Concurrent marking is the last puzzle piece of the Orinoco project

 
2:54 PM
Glancing over that post ^ (wow)
 
3:04 PM
An other question for you guys :
is there a way to do like this -> https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
But with method ?
Something like
   let method = "success"
   myFunction.method(args)
 
o/
@Baldráni yes
 
user1596138
@KevinB I started seeing the icon on my Chrome too. I am also annoyed now
 
people need to stop changing shit
 
user1596138
Oh wait no
 
user1596138
It reversed itself...
 
user1596138
3:08 PM
I used to see the one with a legit photo with the photo. Nothing on the one with my initial "J"
 
user1596138
Now it's reverse. Stupid lol I got real confused
 
@KevinB So shall I do something like window.function[method](args) ?
 
depends on what you've got
 
Or window[function][method](arg) ?
 
what is function?
 
3:10 PM
Its a library
toastr actually
But I could redefine the function
 
Has anybody tried deno ?
 
1 message moved to Trash can
@Baldráni Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
at this poitn i have no idea what you're trying to do. but, your original code would look like this:
   let method = "success"
   myFunction[method](args)
assuming myFunction has a success property
 
Beautifull ! That helped me a lot
Ty =)
 
assuming myFunction has a success property
 
3:21 PM
@ton.yeung kek
 
user1596138
3:41 PM
@KevinB Hella confusing
 
indeed
 
we use backbone at work but it's my first time using it. i have come to a situation where this.$el refers to 5 elements. i looked at the initializer, and it's using el: 'body', is this why it picks up multiple references? (there are indeed 5 elements with the same selectors on the page, but I need to select only one)
 
$el is a jquery collection
it can contain any number of elements
but... i wouldn't expect 'body' to result in 5 elements, there's only 1 body. something else is going on
 
does jQ read from iframes? Might be that
 
no
i mean, it can, but it won't do so automagically
 
3:49 PM
@KevinB, we use 'body' in the initializer, but somewhere it gets changed to some .class that indeed has 5 elements on the page
 
In this case it's a backbone component, so it's going to have whatever the component was initialized with. i've never used backbone, but it doesn't make sense to me for a "component" to contain multi elements in .$el
 
so that's explainable. now i'm not sure why we are using body. either way, i need to pick up only one element
 
which one?
it's a jquery collection after all, you could simply call .first, or .eq to get a specific one.
 
@KevinB, so I set an onClick listener on this particular Backbone view. inside of it, I get the data-ref value of the element. the problem is that only some of the elements have the data-ref value, and I need the value from the specific element that i clicked on
 
$(this).attr('data-ref')
 
3:54 PM
so, it's not solvable by .first or a filtering method, but instead i need to select the element that was actually clicked
 
user1596138
IIRC he has to set el
 
Hi all I am using remote mac on cloud I am not able to select all ( ctrl + A) or save ( ctrl + S) on windows but when I am not remote mac these keys don't work Please tel me how to select all and save on remote mac
 
or if this isn't the clicked el, event.target
 
user1596138
So it's containing multiple elements because of his selector (which we have not seen)
 
supposedly the selector is body for this component
 
user1596138
3:54 PM
@johnmarinelli how did you define el
 
but i think we actually have a different component than that
 
user1596138
I don't know how he'd have 5 bodys tho lol
 
Any mac user please help me
 
right
 
I am not able to write javascript someone who uses mac please help
 
3:55 PM
i've never used mac
much less remote
 
@TeddyKoker 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 am on windows but I using mac on remote desktop
 
is ctrl the modifier key for mac?
 
I have windows keyboard but using mac remotely
 
user1596138
@stonerock it's one of the keys.. Alt, Winkey, Ctrl
 
user1596138
3:57 PM
Try them all
 
user1596138
WHat remote client are you using? It should accomodate this
 
@stonerock google.com/… this is a very google-able question
 
@SterlingArcher After googling for 25-30 min I am asking in chat room
 
user1596138
@SterlingArcher Also there are like 3 buttons. Pretty easy to push them all
 
user1596138
It's winkey
 
3:59 PM
I tried alt + A and ctrl + A none of them work also tried winkey + A no success
 
user1596138
1 min ago, by Jhawins
WHat remote client are you using? It should accomodate this
 
@stonerock humor me, what did you google?
 
@TeddyKoker 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
1 message moved to Trash can
 
@stonerock if you're on a Mac then use the cmd key
 

« first day (2795 days earlier)      last day (2155 days later) »