« first day (1713 days earlier)      last day (3460 days later) » 

06:00
@Mr_Green: You're welcome! I would not necessarily look at it from a JS perspective, but really look at it generically. This is also a good read, related to how values are passed to variables or functions: en.wikipedia.org/wiki/Evaluation_strategy
2
Yep, V8 is implemented in C++
I wish I could understand V8.... but I don't have anything to do with C++
Learning a language without having to use it is hard...
in jquery is $(function()) the same as document.onready = function() ? where is this thing written in the source :(
@argentum47 sort of
what does it do actually
06:04
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", completed );

// A fallback to window.onload, that will always work
window.addEventListener( "load", completed );
load will be triggered when all the images and frames are loaded? and ready is just the DOM is loaded
I've read articles about how V8 optimizes usage of objects
it makes my head spin
I have another doubt.

function abc(){
    this.b = "hello";
}
abc();
abc.b;  //undefined, but I need to get "hello"
06:06
@Mr_Green Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
@Mr_Green new abc().b
@Mr_Green abc is a function in this context
You need to do var myvar = new abc(); console.log(myvar.b);
Using new just means, to run the function and return "this", pretty much
function abc(){
    abc.b = "hello";
}
abc();
abc.b;  //"hello"
^ I can also do like this right?
In fact, if you changed the code to this: function abc() { this.b = "hello"; return this; }, you could do abc().b
@Neil thanks that explains
06:09
yeah, that's fine, when you do abc(); this === 'window',
outside the scope of the function, "this" changes, yeah
Hi. Is there anyone who can help me on this problem.

http://stackoverflow.com/questions/30523083/image-gallery-in-masonry-grid-with-random-width-random-height
though you typically just use "new" to do what you're describing
!!> function abc() { console.log(this); } abc();
@argentum47 "undefined" Logged: "undefined"
06:10
@Neil but I was thinking functions by default returns this, if nothing has been returned. isn't that true?
Only if the function is called with new.
!!> var e = eval; e('function abc() { console.log(this); } abc();')
@minitech TypeError: cyclic object value
@Mr_Green no, undefined is returned by default if not specified
06:11
By default functions return undefined
@Mr_Green no when you do new abc(); it will always return this; even if you do return this.b;
!!> var e = eval; e('function abc() { console.log(this.constructor); } abc();')
@minitech "ReferenceError: constructor is not defined"
there are tricks for hiding members by returning an object containing a subset of methods to call
!!> var e = eval; e('function abc() { console.log({}.toString.call(this)); } abc();')
06:12
@minitech "undefined" Logged: "[object DedicatedWorkerGlobalScope]"
There we go
@Neil I may be wrong but if I use the function as an expression, that works right? like... if(someFunc()){ // enters here }
var test = (function mixin() {
    function hello() { console.log('hello'); }
    function world() { console.log('world'); }
    return {
        hello:  hello
    };
})();
// assert !!test.hello && !test.world
I mean if it is returning undefine then it should not enter into the if statement
@Mr_Green When you call a function, you're using what gets returned
06:14
I am not returning anything in this case
If you use new function(), then this (context within function) gets returned if not specified otherwise
@Mr_Green Why would that be true? Right
@Neil ahh yes got it
you see functions get used as a function in the traditional sense as well as sort of objects
they're always the same object, just used in different ways
yeah
being able to define functions within functions means functions can call functions within itself and those using those functions as objects can call those functions (if visible)
in ecma6, they're introducing classes, which is just syntactical sugar for this sort of thing, but it looks a lot nicer
06:19
Or return those functions, arrange deferred execution of those functions, pass those functions as callback to other functions...
the name of the game in javascript is context :P
I think class is for simplifying common prototype use cases. ES7 public/private would be for method visibility.
if you understand how context works, then you can do mostly anything
(And prototype)
@Sheepy yeah, I don't think it lets you do anything you couldn't do otherwise
the constructor is nice though
finally putting a name to something we've had to emulate all this time
06:21
@Neil private/public would. super is also something really, really hard to do correctly without language support, but I don't count it as part of class.
@Sheepy Nah, you can hide members now if you wanted
@Neil Those are not exactly members. And those tricks are not exactly efficient.
super is possible, though it is a lot more convoluted than it should be
There’s a proposal for private? Ew.
I thought the spec already call prototyped functions "constructors" in ES5?
06:23
@Sheepy Meh, whatever you want to call them then. They do the same things though
Oh hai @minitech how have you been lately?
@minitech Proposed ever since ES4. Being a proposal ever since ES4.
@BenjaminGruenbaum Hi! Busy with exams. You?
@minitech same, but also work (we're growing), and working on a RegExp.escape proposal (please do take a look and leave comments!), and some other less exciting stuff.
Let me guess: the current proposed implementation is for unenumerable properties with symbols as keys?
06:24
I've had a crazy (every-day-out) week.
@Sheepy been proposed before too.
@minitech no, but I'm not a fan of private either :D
You can have real privacy since ES3 with closures anyway and since ES2015 with private symbols.
@BenjaminGruenbaum symbols are not really private :( but closures yeah :/
@AwalGarg name one language with really private stuff?
Privacy is about the contract you're exposing and not about security. Unless you're Mark Miller that is
Yeah. I'm using symbols. Private enough for me.
@BenjaminGruenbaum Don’t give in to the / escaping! It’s so unnecessary.
@minitech Leave that in a comment!
On the issue tracker.
I think it's unnecessary too, but @Zirak strongly disagrees.
Because @Zirak is a tool. He's a part of the system.
06:28
@BenjaminGruenbaum Is this something that hasn’t been said, or are you using the issue tracker for voting, or…?
s/voting/general-stat-gathering/
I need more discussion on the issue tracking in general and more people who have interesting things to say involved.
I could definitely use more backwind with it though.
@BenjaminGruenbaum :D
Well, if you actually understand privacy and security by all means root for privacy, but otherwise please don't :D
If you don't know what an object capability model is and want to add private to the language then you don't have my attention, basically.
Which issue, @BenjaminGruenbaum?
#29?
06:31
css can't be insulted enough
Hello all
@AwalGarg css is terrible but getting better.
i want to apply print report functionality
but how to handle table scroll in print report functionality?
Aw. I like CSS. =(
any help with that?
06:33
I don't know why the comment got flagged.. lol
THE
THE
sorry I had to leave yesterday like that
@FelixKling hey, haven't seen you here before.
hello any one know print report plugin then kindly do let me know
the population here is growing consistently
@FelixKling well, a good way to start understanding v8 is mraleph's blog, there is also a old (but good) blog series on the internal object representation in v8 that is worth reading. The fact they're in the middle of the process of swapping the JIT (crankshaft -> turbofan) isn't very helpful.
06:37
Guys please check this link out
I have a question about it
@AwalGarg :(
@Mr_Green like a yeast population or something you'd find in a petri dish
@ZahidSaeed sorry I didn't intend to type it here :/
What I wanted to do is when user types something in the input fields the total is calculated
I need more workspaces :/ 4 are apparently not enough
Just got myself a pair of Bose QuietComfort 25 and holy shit can I recommend them
06:38
@BenjaminGruenbaum, what’s this about numeric literals?
@Neil haha ya kind of
But the user can also add more rows in the table
@minitech it's a pretty interesting case, see github.com/benjamingr/RegExp.escape/issues/17
Right now I'm using the setInterval() function
Which adds all the amount values and calculates the grand total
But it fires off after every 1 second
Isn't it bad ?
@BenjaminGruenbaum Oh, I was reading “at the start of the regex” rather than “at the start of the string” for some reason
Not sure about ! and :, though; (? and (?< aren’t valid alone…
06:41
Anyone ?
Was the fact that new RegExp("\\u1" + RegExp.escape(s)) will need [a-fA-F] as the first character escaped mentioned?
@ZahidSaeed clear the interval
@Mr_Green What do you mean ?
@minitech no, I don't think so - raise an issue, although that regexp isn't valid anyway is it?
Should I remove that piece of code ?
06:43
@BenjaminGruenbaum I didn’t think it would be, but it seems to work…
@ZahidSaeed we can clear a interval using method clearInterval. I have never used it. but check it once. developer.mozilla.org/en-US/docs/…
Bad example; "\\u111" + RegExp.escape(s), rather
ok. I will check it
!!> [/\u111/.test('\\u111'), /\u1111/.test('\\u1111')]
@minitech [true,false]
06:44
But is there any other appropriate method to do it ?
@SomeGuy later in private
Guys, expecting some one from this room to help me.

http://stackoverflow.com/questions/30523083/image-gallery-in-masonry-grid-with-random-width-random-height
@srikanth_naalla I have no idea but upvoted
btw, It will be better if you create a fiddle showing the issue
I have a fiddle but i made through css column count.
just share it
@srikanth_naalla are these your project images?
don't share confidential content in public unless you are the boss
I've downloaded the latest node version. isn't it support es6?
@RoyiNamir Some parts, with the --harmony flag
@Mr_Green thanks for the concern. No, these are grabbed from images.
oh
Thank you.
06:52
Some parts without (including and possibly limited to sets and maps)
from google*
those images are great.. nice pick
Doesn't work ...?
@Mr_Green Thankyou. Can I expect some guidance on the issue?
@BenjaminGruenbaum: I think I know about the object blog post. I just really like to understand the code. But I'll have a look again, thanks :)

Also, yeah, I think it's enough that I'm addicted to the main site don't need the chat on top of that ;) (though it's quite fun.

I actually just came here to ask somebody to close http://stackoverflow.com/q/31040386/218196 ;)
06:55
@BenjaminGruenbaum, I’m leaning towards escaping everything with \uxxxx as a really good option… =P
@srikanth_naalla no idea. will look into it. btw, you can use lorempixel.com to get random images. here is the modified fiddle
@minitech Added the flag but doesn't it support let ?
@RoyiNamir Version 0.12?
I think you need to run transpiler for that.. like Babeljs.io
@RoyiNamir Anyway, you’ll need to be in strict mode
06:58
@minitech Yes
@RoyiNamir When things like this happen to me, the thought always crosses my mind that I'm the target of a troll many years in the making.
Like the developers are snickering behind a wall.. "He thought he could use let.." *snicker* "I can't believe that worked..."
@RoyiNamir, nodejs --harmony --use-strict
@minitech +1. Great Thanks.
Working
07:01
Hi. Does grunt-ngannotate help with concat too? github.com/mzgol/grunt-ng-annotate#usage-examples
Strange, I got two upvotes for this comment, and then it became one
As you can see, you have special characters instead of double quotesMr_Green 2 mins ago
Someone presumably unupvoted it
I was thinking it not possible for comments
or is it?
yes we can do it.. may be new feature
It is for one minute without navigating now
Hello
i am trying to print my page
but its not giving me correct format
07:05
@BenjaminGruenbaum @ssube something you might find interesting. maayybe... awal.js.org/especser
its not even including css
any help
@AwalGarg dude is that yours website?
Maybe you should write a detailed question on Stack Overflow, @MuneemHabib
@Mr_Green yep
great
07:06
Hi can any one please advice on stackoverflow.com/questions/31020081/…
i stuck on this last 3 days :(
@Mr_Green @Mr_Green I found some thing similar to my requirement. But not sure how it was developed.
07:25
can i pass objects to a web worker?
i think i can with postMessage right??
@vamsiampolu i think it's only strings? but this is me without looking it up
THE
THE
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.cssClass { color: #F00; }';
document.getElementsByTagName('head')[0].appendChild(style);
why is this code not workable in IE8 ?
114
Q: How to dynamically create CSS class in JavaScript and apply?

HimadriI need to create a CSS stylesheet class dynamically in JavaScript and assign it to some HTML elements like - div, table, span, tr, etc and to some controls like asp:Textbox, Dropdownlist and datalist. Is it possible? It would be nice with a sample.

I don't want to apply it, just to create
Morning
THE
THE
    var css = 'myPe { background: red; }',
    head = document.head || document.getElementsByTagName('head')[0],
    style = document.createElement('style');

    style.type = 'text/css';
    if (style.styleSheet) {
        style.styleSheet.cssText = css;
    } else {
        style.appendChild(document.createTextNode(css));
    }

    head.appendChild(style);
where can i find this in developer tools console ?
is it a css class I am adding ?
it's style tag, found it
I am not able to find this myPe style
what can i do ?
anyone please
07:50
You can see the <style> tag you've added to the end of the <head>?
Is your text in it?
Also, is "myPE" a css class name or an element name?
08:18
@FlorianMargaine congrats! now enjoy the sleepless night s for the next 4 years :)
I am looking for info on world energy resources. if someone has some interesting info or links please share
@Mr_Green what kind of info?
THE
THE
@AvnerShahar-Kashtan I found it now, thanks :)
@Mr_Green are you looking for open data
@DrogoNevets availability of world energy resources
@THE yes
THE
THE
08:20
!! tell @Mr_Green open data engergy source
THE
THE
i give up lol
!!tell MR_Green google open data energy source
@DrogoNevets thanks useful but of 2012
08:23
@Mr_Green you didnt say it had to be up to date :P
Guys I know how to google. I asked if you guys have any interesting info.
@DrogoNevets np
ok all, what school boy error am i making?
it cant find RemarksController for some reason.....
if you want the controller just ask
nvm, figured it out
forgot to delete the old file which had a controller with same name
THE
THE
would updating css class's height going to force effect on elments AUTOmatically ?
08:40
0
A: User information as global var on front-end

Madara UchihaThe best solution against users tampering with global variables, is to not have global variables. But that's more of a good practice thing than a security thing. You seem to have a small misunderstanding about how client-side code work. Client-side code runs on the client. You have no control ov...

People seem to fail to understand this
crl
crl
Is it restful, if when I do a PUT with a quantity of 0, I do a remove internally?
@MadaraUchiha I have experience in commercial obfucation services that actually prevent users from opening debug consoles (by blowing up the browser). But I won't create an answer for them...
@Sheepy Please don't.
No of course I won't :)
@Sheepy Also, all it takes is someone building a "Hacker's version" of FF or Chromium which can bypass those console-busters, and we're back to square one.
08:48
@AvnerShahar-Kashtan Or robots that give you what they want regardless of your JS. Hmm, but then there would be no global variables to temper with.
Can anyone help me on this? forum.jquery.com/topic/…
@ArupRakshit I don't even know you can select a range with jQuery datepicker. Even their official demo use two datepickers, for start and end. I'll pass.
Or do you actually have two pickers?
I have only one ... I just want to do multiple select on the same picker
anything can be done using CSS or whatever
if you see my code, you can see one package type there.. as based on the value I need to add 3 or 6 etc once some one select one date manually, the next 3 or 6 dates has to be selected also..
I see one Fiddle jsfiddle.net/gydL0epa ,, but not able to understand if it really meets my need or not.. I think it is not..
It is not that simple. Even if you can hack it to highlight a range, jQuery datepicker is not designed to hand out multiple dates or date range for your form. Look for other datepickers that support range may make your life easier.
@Sheepy can you give me some names of other datepickers which does what I want.
But the thing is I need to use the Jquery plugin in my Rails project.. I don't know how to add other plugins,, datepicker came with ActiveAdmin natively..
09:01
@ArupRakshit Sorry, I cannot help with that. But many people write specialised jQuery plugins, including various UI components, so gives Google a go.
@BenjaminGruenbaum, I still don’t understand what ! and : need to be escaped for
/(?pattern)/ and /(?<pattern)/ are not syntactically valid
If all braces are escaped, I also think !, <, ^, : should be safe.
Hello everyone!
Got a question: can I use/include other libraries in a web worker? If so, how?
!!google web worker import script
09:06
@CapricaSix There you go, @IonicăBizău
I agree. This is my first time when trying to use web workers. Ha! :) Thanks!
Some people need to learn the technology they claim to be able to develop in!!
0
Q: Payload not passed to web worker

vamsiampoluI am trying to pass the data to a web worker in order to perform an expensive operation like this: var getPromiseFromWorker = function getPromiseFromWorker(layerLabel) { var callWorker = function callWorker(layerLabel) { var deferred = Q.defer(); var payloa...

@DrogoNevets *Most people
I'd rather say every programmer should learn Google - and use it.
09:19
i have built a simpler web worker before but in this case,the potentially expensive operation has to be isolated and has to be performed in a .map scenario
have a BA cum Developer who argues the toss on industry standard things and has no clue why, other than he doesnt like me
Sounds like the dislike is mutual :)
09:35
@ivarni no idea about the person, i dislike his work ethic and his work
09:53
hello
why i am not getting table style in printpreview
please help
@Mr_Green The question is not specific enough. You need to state why renewable is a big lie. Whatever you want to prove, claims the opposite, and you will get your prove when they counter you point to point.
morning
@Sheepy Thanks I got your point.
10:12
if I'm using window.open to open a pop up, how can I close it again?
@AaronHarding window.open returns a handle. handle.close()
so
var window = window.open(etc);
wait
var w = window.open()
w.close()
10:13
awesome
w.close();?
yes because w is the handle
THE
THE
jquery $.getJSON (....)

.Done,
.Fail,
.Always

is Always always going to be after done and fail has been executed
w is not the handle. w is the opened window object. setTimeout returns a handle - which is just an integer.
@THE Correct
10:18
@Sheepy yes
I'd kill the guy that created function .Always that gets run only most of the time
@Neil jQuery promises suck
amen
Preaching to the choir, man
THE
THE
Thanks
@MadaraUchiha Or various jqXHR objects that have both a done and completed continuation.
10:42
I am n00b in JS field.. Wanna to know one thing about refererring to the other plugin lib. I am planning to use keith-wood.name/datepick.html .. But the confusion is -- Do I need to do step 1 and step 2 both or either one ?
@ArupRakshit Both.
from where I will get this jquery.plugin.js file ?
and "js/jquery.datepick.js"
improved the question and updated issue for Firefox stackoverflow.com/questions/31045967/…
@ArupRakshit Presumably it's part of the plugin.
*checking*
Yes, it's provided as part of the plugin's ZIP package.
@ArupRakshit Step 2: **Download** and include the base jQuery Datepicker CSS and JavaScript in the head section of your page.
There is a download button at top section of the page.
10:53
scope = $rootScope.$new is telling me that $scope.$on is undefined, Wha?!
Just making sure - Document.elementFromPoint() is the right way to find the element being hovered over, right? I'm using JQuery UI's Draggable/Droppable and I want to give some visual indication on elements already inside my Droppable container.
Still not quite sure how to do it. I want to subtly nudge the elements that will be siblings of the soon-to-be-dropped element.
So uhh... dumb question, but how do you work with promises in an API? Do you have to make the response syncronous?
@Sheepy I have downloaded it.. and seeing too many files.. Not sure which one to use here..
@corvid An API call returns immediately with a promise object. Internally, it keeps a reference to that promise object, does its work asynchronously, and when it's done, it Resolves the promise, prompting the client code to call the continuations.
@minitech what about other escape sequences?
11:10
Router.route('/orders/charged', {
  auth_required: true,
  role_required: 'admin'
}, {
  get: function () {
    var Stripe = StripeAPI(process.env.STRIPE_KEY);
    Stripe.events.list({
      limit: 4,
      type: 'charge.succeeded'
    }).then(function (response) {
      var orders = Orders.find({
        _id: {
          $in: _.map(response.data, function (data) {
            return data.data.object.metadata.orderId;
           });
         }
        }
      }).fetch();
      // welp. Now what?
hey
can anyone recommend a js client router that's can be, or already, built on top of History.js?
Not sure I understood. Stripe.events.list returns a promise. When it's fulfilled, the thenhandler is called. What else?
i've been using my own router but now the app is scaling up and i can't manage it :p
@AvnerShahar-Kashtan Can't just return from an asyncronous promise, can you? That orders contains the correct data, but not sure how to manage the response from there
11:28
Morning
Guys, the words "Happy Coding :)" at the end of an answer: Noise or not?
Stubborn user... Even when I link to a meta discussion about removing noise...
Anyone use lodash? I am trying to union two arrays (remove duplicates) based off the property ID that exists in each array, but cannot get it to work.
$scope.integrations = _.uniq([{'ID':$scope.integrations}, {'ID':company.Integrations}], 'ID');
Hi guys, I'm trying to insert some rows in a table but things arent working as expected... please check this snippet and tell me what I'm missing: pastebin.com/4Apm3icy
11:43
Ooh, just read the stars. Congrats Florian.
Is he your first?
Oh wow! Congratulations, @Florian :-)
11:58
@Cereal Nice utopia, but won't work. Just look at reddit and the way they keep adding more and stricter rules every time something bad happens. You can't just expect people (even if it is just a minor group) to behave like decent human beings. In the end, things will go sideways
@Kippie Reddit's more due to investors, though
I love sublime text. How I fixed tabs to spaces:
Can't you just find and replace in vim equally easily?
Probably
I'm not hipster enough to use VIM on a computer with a desktop environment
12:15
somebody used Socket.IO recently?
where does it keep real room names? I don't mean ids of rooms
I just use vim because I prefer to do everything in terminal. It's a pain to switch between terminal and other programs. WebStorm is good because of that
@Cereal why not just:
wah, it wasn't selected
but "convert indentation to spaces"
@AaronHarding It was all mixed tabs and spaces
it still manages tho, doesn't it?
Didn't do it automatically
For existing files
12:21
it just converts all tabs to 'tab width', so in my case 4
oh :(
@corvid If I knew all the hotkeys and commands for vim, I'm pretty it'd be faster to use vim than anything else to be honest
webpack is giving me grief. I can't get it to load /bower_components/foundation/scss through an alias. My webpack config is: github.com/luggage66/jsx-test/blob/master/webpack.config.js
and I use webpack in another project so i know HOW to use it.. not sure what I'm missing.
There's also the tabs-to-spaces at the bottom right
It's the same options as in view
Oooohhh
I didn't see the convert options
crl
crl
Is it a good practice to do <script type="text/javascript" src="js/app.js" defer="defer"></script> to make the code execute after DOM loading?
!!mdn script defer
Hi , I written one test case for directive while running grunt:test on the command line I am getting the error i attached the error into the following link please tell me why is it coming this is the link gist.github.com/mpamidimarri/a8e3a4dc17334b563573
MDN says defer is decently supported, but I jsut stick my <script> as the last element in the body and that works well.
Anyone here use ngrok? Ultrahook is pissing me off
"Secure tunnels to localhost". My first though is "why?"
But then I read more.
For testing webhooks locally mostly
like if you configure a mandrill webhook and want to see it in action rather than forming a fixture of some sort.
12:54
@ssube No.. it'll throw an error
!!> 1++;
@uselesschien "SyntaxError: invalid increment operand"
yay I get to do a new project with Angular.js and ES6!

« first day (1713 days earlier)      last day (3460 days later) »