« first day (1717 days earlier)      last day (3234 days later) » 

8:00 AM
...history
 
@AwalGarg "undefined"
 
or var self=this
 
well.. in the console
 
@AwalGarg Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
@JanDvorak I didn't get you
 
8:00 AM
eh, a function in a function in an object to get its private name
 
@JanDvorak yeah that is one way but seems not wow to me
@AwalGarg yeah but looking for some best way
just for discussion sake
 
I told you the best way.
The best way would be what @JanDvorak said. avoid nesting.
 
one way is:
var name = "ganesh";
var obj = {
    name: "venkateshwar",
    getName: function() {
        (function xyz(that) {
            console.log(that.name);
        }(this));
    }
}
 
@Mr_Green IIFE: a poor man's variable assignment?
 
lol
 
8:03 AM
why do you want to wrap a function in a function to get a private variable ? Please keep it simple ...
 
It is just a doubt I am not doing anywhere in my project
 
*question
 
*Question
 
*question
 
@Mr_Green if name is in the global scope, why not just use window.name?
 
8:04 AM
ok
 
@Mr_Green the Indian dialect specific words are usually frowned upon here, so giving a heads up :)
 
oh, right. Don't touch the global scope.
 
so the best option would be to use var that = this right?
 
...
 
No.
 
8:05 AM
There is one more way.
 
ok avoiding nested functions
 
that.
 
...
 
but just for learning sake, what should I do if I get something like this?
no es6 pls :)
 
@Mr_Green run
 
8:06 AM
maybe in future
 
@AwalGarg "undefined"
 
i'm not sure if caprica supports ES6
 
she does. just behaving weirdly with multiline code :/
 
0
Q: Is it possible to have multiple select modes in one dynatree

anath2I have a dynatree which requires selectMode:1 and selectMode:3 . The scenario is something like this :- The tree :- |---- Their Car |----------- Cars ----- |---- My Car | Objects ----------- |-----...

Anyone?
 
Anybody got a hold of octavien ?
 
8:21 AM
hello, anyone can help me little bit with kendo template?
 
@Dinone Welcome to the JavaScript chat! Please review the room pseudo-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.
 
0
Q: How to match a word and sort by an order with a minimum in pouch db?

AbhishrekI am trying to create contacts app while trying to learn pouch db. I wish to sort queries by the frequency of contact. frequency is a simple integer that is incremented every time the person is contacted. So far i have tried to build my view such as by_frequency: function(doc){ emit(doc.disp...

 
If document.form refers to a form element, how do I select the input named "text" from it?
Do I have to use getElementsByName()?
 
!!mdn form fields
 
8:28 AM
I kinda for not being able to solve this T_T
 
@Charly document.form.text
 
I'm curious where they teach about document.forms but not document.forms[...].elements
 
Yeah that's what I thought... but let me retry.
Thank you.
 
Can anyone atleast upvote it ? In hopes that i gets the answer fasterer.
 
no.
 
8:40 AM
:-(
 
well, technically we can, but...
 
how may i improve my question sir, jan ?
 
but we can't
 
Okay i said the magic word, PLEASEEEEEEEEEEEEE!
now by the power of unicorns you must upvote !
 
wtf?
 
8:41 AM
@Abhishrek users will definitely upvote/downvote if they like/dislike. so no need to mention..
 
@Mr_Green i know -_- duh
can i not just joke ?
like seriously x_x
 
@Abhishrek i know -_- duh
 
Btw coming from sql background
 
Isn't upvote begging against the rules?
 
select * from table where name like "some%" sort by frequency
sounds trivial to me
 
8:43 AM
we might kick for excessive begging, but running the risk of downvotes is why you shouldn't beg here
 
and then you find couchdb
where satan forbid it.
 
48 mins ago, by Mr_Green
var name = "ganesh";
var obj = {
    name: "venkateshwar",
    getName: function() {
        function xyz() {
            console.log(this.name);
        }
        xyz();
    }
}
^ So guys, what do you prefer for this?
please no jokes I really need to learn this
 
Don't use nested functions needlessly. I'm not joking.
 
^
what is that ?
 
I will definitely not use it. but what should I do in such cases?
 
8:47 AM
@Mr_Green you know you can just create a getter right ?
 
why are they nested?
 
nope
 
@Mr_Green what scope are you in?
 
oh wait are you asking why should u use a getter ? ps nested functions are bad
 
@JanDvorak I am learning..
it is not from any project
 
8:48 AM
oh. If they need to be nested, Function#call is a decent solution
 
var name = "ganesh";
var obj = {
    name: "venkateshwar",
    getName: function() {
        function xyz(that) {
            console.log(that.name);
        }
        xyz.call(this);
    }
}
^ like this?
btw, it is throwing error Cannot read property 'name' of undefined
 
user4039781
can anyone able to solve this stackoverflow.com/questions/31108465/…
 
@SaiKiran Welcome to the JavaScript chat! Please review the room pseudo-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.
 
user4039781
anyone is free?
 
@Mr_Green look at the documentation for call
 
8:54 AM
!!> var obj = { name: "stringie", getName: function() { return this.name; } }; obj.getName();
 
@KarelG "stringie"
 
@Mr_Green look at this simple example
 
user4039781
Having tough time solving this can anyone please help stackoverflow.com/questions/31108465/…
 
you changed the example :/ @KarelG
 
you want to get venkateshwar ?
@SomeKittens : noticed your gif and my old PC has ATI GPU / AMD CPU... never got BSOD. :o
but nowadays, NVIDIA releases better GPU's i have to admit
 
9:00 AM
@KarelG GPU prices are pretty much proportional to their price
nvidia just have the more expensive ones
 
that's why i spent a lot hours comparing those hardware ;)
 
Hey, anyone used dynatree? If yes, could anyone tell me if I can use more than one select mode in one tree?
 
@KarelG yes
 
what is this "blue tear" on this anchor link, and how can i disable it?
 
@KarelG the general order is 960, 280x, 380x, 970, 290x 390x, 980, furyx, 980ti, titan x
 
9:02 AM
lol
 
it's hard to place the 295x2
 
"android blue tear on anchor link" doesn't come up with much
 
Isn't that the marker for maps?
 
@Gemtastic yeah i thought so too, but it's appearing over this anchor link?
 
Because it's an anchor?
 
9:04 AM
..which has no relation to google maps?
it's literally just
<a class="button" id="age_gate-button-no">No</a>
 
It's the text selection marker
 
how do I overload the CPU usage of my browser?
 
The maps marker is the other way around and red
 
@OliverSalzburg oohhhhhhh
@OliverSalzburg so it's trying to select the text
 
though, @KarelG, if you are making microITX box, then the list gets a lot smaller
 
9:05 AM
@AaronHarding I guess so
 
@OliverSalzburg yeah i think you're right
i'll try ` user-select
` user-select` *
 
2266
Q: CSS rule to disable text selection highlighting

anonFor anchors that act like buttons (for example, Questions, Tags, Users, etc. at the top of the Stack Overflow page) or tabs, is there a CSS standard way to disable the highlighting effect if the user accidentally selects the text? I realize this could be done with JavaScript, and a little googli...

Just in case ;D
 
@OliverSalzburg dankjewel
 
@AngularHarsh Welcome to the JavaScript chat! Please review the room pseudo-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.
@AngularHarsh Welcome to the JavaScript chat! Please review the room pseudo-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
@AngularHarsh Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
You are using your call method not correctly.
var name = "ganesh";
var obj = {
name: "venkateshwar",
getName: function() {
function xyz(that) {
console.log(that.name);
}
console.log(this);
xyz.call(this, this);
}
}

obj.getName();
 
9:10 AM
@AngularHarsh Bro, do you even read?
 
When formatting JS code, should the arg braces be spaced out from the function name?
 
@StevensHaen "As every language, JavaScript has many code style guides. Maybe the most used and recommended is the Google Code Style Guide for JavaScript, but we recommend you read Idiomatic.js. "
 
@Gemtastic ahh..getting a hang of chat room. :(
 
Always read the rules if there is one when you enter any chat room on any site. #WelcomeToTheInternet
 
Nice bug finding @Bergi
 
9:17 AM
@BenjaminGruenbaum link?
 
@BenjaminGruenbaum oh, nice
 
Yeah, totally
 
soooo... tau was named by a living person?
 
damn I was about to comment "status-no-repro" on that issue
 
9:40 AM
@StevensHaen I do. Many people don't. Suit yourself.
 
hello everyone...if i use this to unload a element from a page: document.getElementById("video1").innerHTML = ' ';...what do i have to do to reload the element if the user returns to the page?
 
why?
The browser knows not to waste CPU cycles rendering an off-screen video
 
9:57 AM
i´m sorry, this is the correct code: document.getElementById("galeria").innerHTML = ' ';
 
quite different
 
@Japa The child elements are gone for good. You can restore innerHTML to its previous value, but the child elements would be brand new. If you want to keep elements for reuse, use remove or removeChild method instead.
 
i have a simple galeria, when the user clicks the btn, pictures fadeToggle....the first time the user enters the page, everything works has expected...but when the user navigates to another page and then returns and clicks the btn, the pictures appear and fade quickly, i mean, the user doesn´t have time to see the picture..
the behavior i want is a simple galeira, you click the btn and you see a picture, then you click again and the previous one fades and shows another one ( this happens the first time the page is loaded) now image if you click the btn and the picture appears and fades right away...i´m sorry if my explanation is too rookie.
 
10:14 AM
1 message moved to Trash can
@SuperUberDuper Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
so more than 52 members come to this chatroom
 
Cool. Who's the black queen?
 
function solveProblem(programmer, problem){
    if ( programmer.canSolve(problem) === false ){
         programmer.take(Coffee, 4).then( betterNow => solveProblem(programmer, problem));
    }
}
^ Always works.
 
Warning: unused function argument "betterNow" in lambda function on line 3
 
@Abhishrek You depress me.
 
10:26 AM
@Abhishrek lol === false
 
@BenjaminGruenbaum now what did i do ?
 
Warning: comparison to boolean on line 2. U suk.
 
` === false, then`, the syntax, etc.
@FlorianMargaine how's fatherhood? Getting sleep?
 
:-(
 
:„
 
10:28 AM
!!summon 26424
 
@AwalGarg I will appear in that room after 1 more invocation(s)
 
async function solveProblem(programmer, problem){
    if ( !programmer.canSolve(problem) ){
         await programmer.take(Coffee, 4);
         return solveProblem(programmer, problem);
    }
}
this better ?
 
!!summon 26424
 
q: let's always use valid JS syntax for emoticons in this room
;}
 
nope
 
10:31 AM
ok ):
 
fuck am late for driving class.
 
@Abhishrek y u no loop?
 
!!afk honking horn at cows.
 
async function solveProblem(programmer, problem){
    while(!programmer.canSolve(problem)){
         await programmer.take(new Coffee(mug)); //`mug` is a hidden dependency
    }
    // now what?
}
how about this?
also, the side effect of incrementing bloodPressure should probably be documented somewhere...
 
10:39 AM
the ios android room is so nice
 
Is this answer appropriate ?
0
A: Javascript admission challenge? need assistance

Jaromanda XThis should get you started - tested and works in Mosaic, Lynx 2.0, Slipknot and nightly versions of Agora declare mYArray as Array set MyArray = [first = "Timur Ozkup", second = "skype handle"] declare cutName as function(arg as string) = ( result = makeArrayFrom(arg.words) ) new object lit...

 
@DenysSéguret great troll lol
 
Yeah, it's nicely done. If not I would have downvoted
 
Is that a real language?
 
I don't think so, it's not consistent
 
10:43 AM
is that javascript? xD
declare mYArray as Array
o.o
 
no. Visual basic?
 
but the OP is asking for JS
 
> tested and works in Mosaic, Lynx 2.0...
 
"Slipknot"
 
Why don't recent pulls show up when git log? It shows my last commit, but it's supposed to point to the tip of the branch, which my last commit is not
 
10:46 AM
@StevensHaen git log starts from HEAD.
 
is he trolling or what xDDDDD
 
If you're not seeing further commits, it means you aren't on the branch you think you are.
 
I do see my own commits all the way up to the HEAD. However, I don't see the guys commits, I just pulled
 
did he push?
 
10:48 AM
did he finish pushing before you started pulling?
 
I can checkout his commit by just checking out the branch as a whole, but it's inconvenient that his commit doesn't show up on git log
 
Otherwise known as Margaret the Destroyer, I will bring pain to the the Great One. Then again, maybe I won't.
3
 
11:13 AM
Uh oh
 
Anyone familiar with this boot-error in ubuntu 15.04 ? ACPI PCC Probe Failed Starting Version 219
 
@afonsomatos I had it a few weeks ago after having updated to the last ubuntu
Boot Repair solved it
 
@DenysSéguret How do you boot repair?
 
@afonsomatos you start on a ubuntu usb key
 
let me check
 
11:19 AM
@afonsomatos well... you make one...
 
I have one
I'll see if I can get it to work
brb
 
Be sure to have a recent version of Boot Repair
 
No option to "boot repair"
JUst try ubuntu.. install ubuntu
and check for disk errors (I did and it found 2, I don't know if it solved them or something?)
 
TIL my laptop has a dvd player
 
11:35 AM
That's handy...
 
hmm ... I wonder
 
mine was delivered with no dvd player and a dvd with the OS
which was less handy
 
just discovered that this laptop has no option to insert a disc
 
11:53 AM
hii
 
@Atiq Welcome to the JavaScript chat! Please review the room pseudo-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.
 
document.getElementById("EnvAutoCreate") is returning null
 
0
Q: Weird gradient border effect

afonsomatosWhen applying a transparent border over an element with a linear-gradient as the background, I get a weird effect. Notice the left and right sides of the element don't have the proper colours (they're some way switched) and are weirdly flat. HTML <div class="colors"> </div> CSS .colors { ...

 
it is properly working in ie but not in chrome
 
@BenjaminGruenbaum yeah, not the wife tho
 
12:00 PM
@afonsomatos border != content and so borders != background
 
@AaronHarding Not true, try setting the background of an element, and putting a transparent rgba border around it. The border will have the same color as the background.
 
yeah true
but then the gradient starts in the "content"
which makes sense?
 
still doesn't explain the desired effect in top and bottom, and weird effect in the left and right side
 
it does to me. to an infinite length to the left, the background is the first colour, and so on with the 2nd colour
 
oh I think I am starting to get it
 
12:04 PM
jQuery is great, isn't it?
 
crl
How can you browse the <div> elements containing an <h2>?
- $('div h2')
- $('div').has('h2')
- $('div:children(h2)')
- $('h2', 'div')
 
the same is true of this gradient
 
@crl .find
 
infinite left < purple, infinite right > orange
it carrys on upwards infinitely
the gradient just starts within the padding-box
 
12:05 PM
@AaronHarding You can start the gradient at different points
 
@AaronHarding answer the question and I might consider it correct
 
@AaronHarding that color combo...
 
or add stops in the middle, either way
 
if it explains the problem with proper links
 
@Gemtastic lmao photoshop standards
@afonsomatos ah, i'm not so great with words rn
i'll try my best :c
 
12:06 PM
@AaronHarding My eyes... They bleed...
 
someone downvoted
and didn't leave any comment.. oh well kids
 
:(
also, stackoverflow.com/a/31115173/3924022, this guy seems to get it close?
 
back
 
front
 
@afonsomatos That's why I hate asking questions on SO.
inb4 shitstorm of hate.
 
12:08 PM
this works very well ^
 
Much easier on the eyes
wipes blood out of eyes
 
@afonsomatos ahh that's nice
 
Not my idea.
 
@afonsomatos did you also see jsfiddle.net/a1h2yh11 ?
 
would you still like me to contribute an answer? ;p
 
12:10 PM
yes
 
burp
 
but too much work put into a single element
 
ideas of cheap food that you can eat ?
 
i'm still gonna use the example of purple and orange gradient ^^
 
:C
@AaronHarding Why do you hate us?
 
12:11 PM
@Gemtastic heuhuehe
 
Evil, just pure evil...
 
it's an adobe preset
 
As if that makes it ok
 
and imho, it's proooobably the best one out of this seleciton
 
B/W is the best one hands down
 
12:12 PM
looks great now
 
But yeah.. all of them are hideous
@afonsomatos agreed
 
when is the use of eval justified?
 
@StevensHaen parsing code comming from an outside (safe) source
 
@StevensHaen when using say an unchangeable api, and it was returning some data in a string, you can eval it into an object/array
 
@AaronHarding But it's poor style to use it in general, right?
 
12:17 PM
@StevensHaen yeah, but more importantly, not necessary
when building a general script in js, i really don't see it being necessary
do you have an example of what you had in mind? :c
 
@StevensHaen pouchdb map reduce, otherwise no-god-damned where
 
@AaronHarding Just curious in general, I don't have a problem at hand
 
@afonsomatos hell no
eval is not for parsing code
 
@AwalGarg For example if you are running a bot and want to run some code sent from the admin user.
Not parsing, evaluating
It seems a reasonable case to use eval.
 
there would still be better ways than eval. The problem with eval is not just of security. It is magical scoping and interpretation.
evaluation in a browser can be done via dynamic script tags, for instance. Or better, in a service worker. For node, there is a VM module.
 
12:23 PM
linq anyone ?

string a = dataTable.Select(p => p.StartDate).Min().ToString(Constants.C_DateFormat);
this throws error when startDate is null
 
in old days, a json polyfill used eval to parse json after verifying that it is proper json.
 
Holy balls, Florian's message about his new son got 53 stars. I've never seen that many stars on one message before
 
Holy balls at work I guess
 
how long do messages stared stay in that list? >>
 
@afonsomatos i don't know :(
 
> Room owners can also pin messages, which permanently affixes them to the top of the room sidebar for up to 14 days.
 
@Gemtastic touche'
 
I wasn't the first to comment on it though
 
in PHP, Feb 25 '13 at 9:40, by DaveRandom
Star this if you want Uncle @Gordon for moderator
72 stars
 
When your db makes you query all documents and then filter in memory, you switch to other db.
 
12:27 PM
At least if you're doing JS
 
I have an assignment that goes like this: "Create a JavaScript plugin that takes a form as parameter and validates fields inside it (input, textarea, checkboxes, selects and radios). The validation result should be array of error objects (decide on object class structure) with messages. Print thre result in page in error box. You can also create methods for setting the fields as validated or not (class with red border for example)"
How should I go about passing the form to the , say, constructor in the script?
 
new Constructor(form)
 
you have a javascript assignment?
 
nope
 
@AwalGarg I mean, how do I stuff the html form into a variable?
 
12:29 PM
@StevensHaen document.getElement(s)* methods.
or document.forms[index]
 
Thanks, I'll research this
 
np :)
 
I am trying to pass back data using Breeze to an endpoint of

DeleteUser([FromBody] JObject postBody)
var userId = (Guid) postBody["userID"];

I checked my network and I am sending a post, along with the userID. Do I have to do any special stuff to get it into this postBody thing?
 
user2620028
God i am really hating Unity3d right now lol
 
You should change your nick to Hater is Mad ;)
 
12:35 PM
Or Haters are Mad ;)
 
user2620028
Wow if i had a nickel for every time someone said that :/
 
h8rs gotta h8
 
gr8 h8 m8
 
user2620028
i think i need to go get my cocaine substitute
 
@HatterisMad sugar?
 
user2620028
12:39 PM
@gemtastic oreos.......... and cocaine
 
Sugar.
nods to self
 
user2620028
Its not the filling that i love its the cracker
 
good grief I read that wrong
 
user2620028
Hahahaha
 
Hmm.. I still don't get how I get node.js to listen to another software for changes inside of it...
Like ElasticSearch..
 
12:47 PM
elasticsearch has a push api?
e.g. webhooks or similar?
 
Is that what I'm supposed to look for? A push api?
 
no idea
 
Well, me neither.
 
Xan
@Gemtastic Define "changes"
 
To me it seems like there has to be something inside of the application to alert the changes to my node app if it's supposed to know...
@Xan Any change. Update, edit, new, deleted...
 
12:50 PM
@Gemtastic ES must support this kind of feature.
 
If I'm correct about that then... well.. I will feel less awkward asking if the api supports it...
 
!!afk lunch
hahahaha fail
!!afk fail
 
(It's not actually ElasticSearch I'm using in this regard but it works in a similar manner and pushes to ES)
 
I'm voting to close this question as off-topic because this is just a puzzle, not a real question — Denys Séguret 18 secs ago
 
Xan
@Gemtastic I suppose this is what you're looking for: npmjs.com/package/elasticsearch-watcher
 
12:54 PM
 
senpai pls
 
Se-senpai... notice me, onegai
 
does IE 8, 7 support background: transparent?
 
sneaks a peek at @rlemon
 
12:58 PM
@uselesschien that has nothing to do with what I'm asking
opacity != transparent background
 
Does anonymous function give any kind of performance gain, or is their main benefit only that they don't take up any name space?
 
I need to upload an image and set it to a property attribute. Right now I am using FormData (like this jsfiddle.net/JeJenny/ZG9re), which was going to point to an endpoint. But now, we want to set it to an attribute and just call a save change (which should work for our setup). Do I need to change this much, or do I need to switch over to a FileReader instead?
 

« first day (1717 days earlier)      last day (3234 days later) »