« first day (842 days earlier)      last day (4118 days later) » 

12:03 AM
@Cygwinnian \o
Link?
 
...link to code
 
hello people
question about proxy use in FireFox
when I play the javascript in iMacros i get error "proxy_jslib_handle is not defined"
anyone had problems with that?
 
I'm using this $(this)[0].contentWindow.document.body.offsetHeight to get the content height of an IFRAME, but it doesn't seem to include the margin of BODY in the value. What can I use to include that as well in the calculation? Thx =o)
 
innerHeight ?
No, that's something different
scrollHeight
 
hey everyone.
 
12:28 AM
hello
 
@copy that doesn't work either, still getting the same value =o(
 
Sorry, the pause is over
 
guys someone care to answer my question?
 
i'm an idiot :( guess what I just did
 
Did you just implemented something that parses BNF in a way other than recursive descent?
 
12:37 AM
You wrote code in PHP ?
 
yes -_-,
 
Yes to who?
 
At least you didn't do it in PHP
 
12:52 AM
looks like phonegap is down eh
 
1:03 AM
yay, 10 lines of recursive descent ftw
 
1:20 AM
Can anyone get on MDN?
!!/mdn document.cookie
 
Hmm, it's down for me
 
i'm getting into api programming
and learning ajax
 
API programming?
 
1:30 AM
yup
i know its redundant
 
You're redundant.
 
@phenomnomnominal I use this site a lot in this sort of case downforeveryoneorjustme.com/developer.mozilla.org/en-US/docs/…
 
Yeah I use that a lot too, and it's saying it's up, just wanted to make sure
 
I'm parsing natural language with jQuery lol, this is so awesome :)
 
1:48 AM
What bit do you need jQuery for?
 
I'm using a jQuery port called CsQuery which is amazing
I get a syntax tree, I figured that since the DOM is a tree once I serialize it to XML I can use all the nifty tree manipulation features
So I serialize the tree to XML and put it in CsQuery, now I can do tree manipulations easy :)
 
Noiiiiccceeeee
Sounds fun!
 
it's actually amazing, javascript tree manipulation with css selectors and other methods (all the get element by) is so much more powerful than other available solutions
 
2:13 AM
Yep, anyone who already used Backbone.js?
 
yeah
but I'm not a fan
 
Is there a way to say a model "read this effing url, populate yourself like a big boy, and just fire the change event"
 
.fetch() ?
 
It looks so complicated to use.<
 
it's not complicated, you just expect it make you write less code, but it doesn't, it makes you write more code
 
2:15 AM
I'm still lost with the need of underscore json2 and jQuery.
 
I think it goes against the dynamic nature of JS, your models have to be defined as such, as do views, etc
On the upside, it's not too complicated, if you want a model to fetch you just set it's url and call fetch
 
I do not have problem writing code, if it helps me to understand how works my app in 2 years
 
I do, I hate configuration over convention
If I write 10 apps and they all follow the same convention, I'll have no problem understanding one of them in 10 years
 
So MyModel.url = myUrl; MyModel.fetch() and it's good?
 
2:17 AM
I do not see this use in any of the tutorials I read
 
If MyModel is part of a collection you don't have to specify the URL it'll use the collection's
 
I'm like "Why is the so complicated..."
If the url has a collection?
 
you're not supposed to fetch a single model normally, you usually fetch collection
the model
If you added your model to a collection you can call fetch on it and it'll know which url to use based on the collection
 
Example: A model is a user, a collection is a list of user?
 
If you get to choose your framework I think angular and knockout are pretty good
@dievardump yep
 
2:19 AM
Ok
No it's a test for a job, but I think I will do it, send it to them, and say "I do not like Backbone, I won't come work for you, sorry"
They work with Backbone Sass and Kohana
 
I'm not a big php fan either :P
 
When I read Kohana coding conventions, I almost threw up.
 
I do like SASS a lot
 
Sass is for me linked to ruby
So it just make me sad
And less is so easy to use
 
SASS and less are very similar in that regard
 
2:22 AM
less works in the browser.
 
I have no experience with Kohana, like I said, I'm not a huge PHP fan for the last 2 years
SASS doesn't?
 
Last time I checked, it couldn't compile in the browser.
Does it now?
 
It does not say that it compiles in the browser
 
I know, it just seemed useful, I'm not sure it does
 
2:24 AM
It is usefull.
Sadly dev decided to do that only for Chrome.
So I boycott.
 
It's just part of my build process, when I press F5 to compile it also compiles the stylesheets if those changed
 
.x-hone #x-main #mainMenu li a
Seriously? :'(
 
lol
There is a good backbone.js book by Addy Osmani
I loved his other javascript design patterns book which is awesome, but he couldn't get me to like backbone
 
Thanks
 
2:48 AM
1
Q: Nested if nightmare, there has to be a better way

user1732521There has to be a better way of checking on variables than this nightmare of ifs. It works, but I don't think it's good code at ALL. My HTML has three divs, each id tagged with the logic behind my object (ma/shadow/traps) which contain 10 div each (every icons), also id tagged according to the ...

 
3:20 AM
 
Diddle.
 
Hm.. Since I am working with Node.js. And I would do a update loop that creates a callback for each unit. Would faster callbacks "return" first? Foodline comparison: Would the cheeseburger that was ordered AFTER the fancy lobster be delivered first? I realize that callback is about returning when finished, but not so sure since I want to do a loop of callbacks.
 
@OliverSchöning Got a code example?
 
No, :-s, its only a thought so far.. Should I come back with some code?
 
Yeah, that'd help conceptualize
 
3:37 AM
People should just learn to read my mind :) working on some pseudo code
 
Yeah, it doesn't need to run, but it'd be nice to see something code-form
 
Something that should help me a great deal is to know if the socket.io loop io.sockets.on('connection', function(socket) is a callback/asyncrous, because then I have a lot less trouble with not blocking the main loop with position updates / collision detection
 
4:34 AM
Hum, @BenjaminGruenbaum Collection.fetch() does not do the Ajax request by itself O_o
 
5:08 AM
@tereško It's good that it didn't, otherwise it would have probably turned to another grindy MMORPG
The gameplay is king
 
@Zirak Good morning.
 
gmorning
 
6:05 AM
0
Q: Simplify jQuery animation with callback

caleboLooking for feedback on how to better improve the code below to simplify the code below. var animateTop = $('body'); if ($('html').hasClass('lt-ie9')) { animateTop = $('html'); } $('.var').on('click', function() { animateTop.animate({ scrollTop: $('footer').offset().top }, { ...

 
!!/choose "go to bed" "write up next layer of sample data"
 
@SomeKittens write up next layer of sample data
 
!!/choose "clean room" "go to bed" "compilers"
 
@BadgerGirl compilers
 
6:20 AM
that bot is quite evil
 
6:32 AM
 
0
Q: How to find sum of the total amount of products for different orders?

VenkatHi I am working an application which produces invoices for different orders at the same time for same customer. So the following case raises for me. This following PHp code gives an html page like which i am gonna show in the below link. <form action="<?php echo ROOT_FOLDER ?>/home/po...

any one here
 
7:36 AM
.. why did i read a "bondage" instead of "badger" again ?! ..
4
 
Maybe because that's actually my real nickname. Bondage Girl.
!!/choose "sleep" "sleep" "no"
 
@BadgerGirl sleep
 
Thanks Bot. I love you.
 
since i have just arrived at work, i wind this cruel and in general - unfair
 
7:52 AM
Badger girl, sorry but I think i did the same as tersko reading your name as bondage
 
@Zirak go for it
		//before we continue, I would like to apologize to several people:
		//my mother, who through years of abuse has only made me come to this;'
		//my father, who had to put up with my mother and I;
		//my imaginary girlfriend, who took A LOT of crap;
		//to you, my good reader, for betraying a piece of your soul in this
		// stranger's journey.
		//last but not least, to future me. I'm sorry.
._.
 
8:17 AM
0
Q: Is the Socket.IO client loop asynchronous?

Oliver SchöningSo, Node.js handles I/O asynchronous.. That makes me wonder if the loop: io.sockets.on('connection', function(socket) { // Waiting for Client Input.. }); Can be considered to be asynchronous? It basically waits for Client input right? Rather than having a large Array of Units to iterate o...

 
 
1 hour later…
9:39 AM
@FlorianMargaine Hahaha, where is that from?
 
Let's say your marketing department asks you to deploy as Android applications their PPT presentations ? How would you do that ? I thought about using Phonegap and PPT to HTML conversion but that probably won't give a pretty result. Any other practical idea ? Any reliable solution to make HTML from PPT ?
 
guys, which process do you think heavier in general? creating methods in Javascript or creating objects in Java
 
9:58 AM
@TemporaryNickName Most JS engines use a JIT to compile methods so that's just once, no more. Creating objects has to be done every time... well neither is really heavy tho.
 
 
2 hours later…
11:29 AM
khanacademy
 
11:41 AM
@AmaanCheval I read that as Khana Academy...
I must be hungry...
 
Hahaha
 
Quick question. Is there a way to create private functions in js? Example :
var Test = { anotherTest: function() { }, andAnotherTest() { this.anotherTest(); } };
I want anotherTest to be private for internal use of var Test..
 
Sure. Closures
 
Could you give me an example ?
 
Don't make the object directly
Hold on
 
11:50 AM
I'm looking at an example from an SO question and it looks like it is private for a function inside a var and not just private for the var...
 
function Test() {
	var locals = {};
	// private
	locals.anotherTest = function() {
	};
	// public
	this.anotherTest = function() {
		locals.anotherTest(); // call private
	};
}

var test = new Test();
test.anotherTest();
 
var makeTest = function (){
    var obj = {};
    var privateFunc = function (){
        console.log('Private!');
    };
    obj.anotherFunc = function (){
        privateFunc();
        console.log('Public called');
    };
    return obj;
};

var test = makeTest();
test.anotherFunc();
 
Something like that might work. Not sure if you want to do this.
 
I don't like using the new keyword, but you can use that too
Yeah, like RoelvanUden did
 
Hi What is the preffered : $(".ddlCountry").val() or $(".ddlCountry :selected").val() ?
 
Hmm, let me try that
Erm, I'm doing like :
var Modal = {
 {...}
}
 
So change it
An object cannot have private properties
 
Hmm, awesome.
 
I think @AmaanCheval solution is better than mine, indeed. It is more elegant.
 
@dievardump myCollection.fetch() or myCollection.sync() just remember to do set up myCollection.url = myRestAPIAddr first
 
11:55 AM
any help ?
 
var obj = {}; == var obj = function() {}; ?
 
Oh, no, no way
But look at my code
I'm returning an object with the public properties
 
checking on a checkbox should do something. What should I do : onclick or on change ? in FF and chrome it is fine. but in IE9 it is not consistent.
 
So you mean that objcan't be called using the "namespace" ?
 
What?
 
12:01 PM
I won't be able to call Modal.obj from outside..
 
Ah. You can make the obj outside of the declaration of Modal
var Modal = {};
Modal.obj = makeTest();
 
Hm
Not what I asked but I understood what you meant ._.
I mean, not what I wanted to ask.. ah I screwed the question..
 
Hahaha, it's okay
 
F*cking laziness makes me ask retarded questions, I should test stuff before asking..
But, thanks for the help :)
 
No problem
 
12:03 PM
Just another example, because I was bored @AndréSilva
// CS
class Example {
	private _Var;
	public Var;
	private void _Test() {
		Console.WriteLine("Private function.");
	}
	public void Test() {
		_Test();
	}
}

// JS
var Example = function() {
	var privates = {
		_var: 0,
		_Test: function() {
			console.log("Private function.");
		}
	};
	var publics = {
		var: 0,
		Test: function() {
			privates._Test();
		}
	};
	return publics;
}
 
@RoelvanUden I think you screwed up on the private function name..
 
Fixed it before your message :D
 
Oh, you corrected haha
Ahh, that cleared my mind a bit... when you use return function and try to use the main var, it will call what it is in the return thing..
Ahh, got it..
brb. thanks for the help btw.
 
hello everyone
 
12:16 PM
@rlemon Done my duty
Where's my cookie ?
 
12:38 PM
This one is fun. Read also the last answer and related comments :
52
Q: New phenomenon: Rage Unaccepting

Sha Wiz Dow ArdNow that accept rate is no longer displayed users can silently unaccept answers without anyone noticing. I happened to notice by chance that this user (who is a long time member without any other activity for a long time) has just unaccepted all answers just like that. No single comment. Three r...

TLDR : oscillations
 
0
Q: Shift Javascript framework - What pattern is this? MVP, MVC

Erik LandvallI have created a very tiny framework to be able to get away from all the clutter while developing. The point of the framework is not to replace any library of choice but simply segregate the code to it's correct logic. You can see the source on github along with a few code examples: https://git...

 
any one know php .. in php chat room all are asleep ..?
 
In this room everyone is hiding when someone mention PHP
 
I don't agree with the decision to remove accept rates
 
I don't either
It wasn't really a big deal
 
12:42 PM
hey guys
 
ok I wont ask question
 
Sometimes there are good reasons not to accept answers and some users didn't even bother to look at the questions.
But the system should point to the user that it's not normal to have only unanswered questions. Most often the problem isn't in the lack of acceptance but in a bad question.
 
right, but 99% of times it shows that the user either did not read the FAQ or does not care enough to invest trust in the people who spent their own free time to help him
 
Oh... I can decline flags on my own offensive messages :)
 
@dystroy Really?
 
12:47 PM
can we decline flag on own message ?
 
guys can some advise me some books to read?
 
now that's a broad topic
but i guess you mean books about javascript, right?
 
im currently interested in async server client architecture stuff
yeah may be about js but really i know basics i just need some examples and tips on large async apps architecture
becouse when i create some apps i have a fealing that its not that good is can be becouse of my noob coding style))
i know alot about js architecture
i mean patterns , OOP and stuff
but when it comes to async client/server functionality i fail alot(((
 
Hum.. I think the best advice is what I was given, just write small modules of code to do something and worry about architecture later, whenever, and if, that ever becomes relevant.
 
@mikrowelt why do you need 'large async apps acchitecture' ? do you understand the basics?
 
12:52 PM
yes i do
 
@RoelvanUden completely agree, code should be seperated to small pieces of logic
@mikrowelt do you understand how a RESTful api works?
 
@RoelvanUden +1
 
what im trying is to create an app on nodeJS and using sockets to connect the client.... the problem that i am having is when i send like two same requests and cant handle the response correctly if the frist that was send responsed later thatn the second one
something like that sorry for my english
 
i'll just say it again
callbacks!
 
@mikrowelt draw your architecture gliffy.com/…
 
12:55 PM
Yeah, by the looks of it, you expect them to be synchronous
You just need to use callbacks. Tada, done!
 
@mikrowelt I think you shouldn't be too confident about your understanding of the basics. Really, read, read, read, read everything about callbacks, asynchronous behaviour, how NodeJS works (single thread with promises etc). And read.
 
node doesn't have promises :( they removed them early on. They think that people should choose the promises implementation they like, personally I like q
 
no i dont i have an callback action no problem with that.... but what if user u know like send two reponses at a time and they are the same and have the same response action, so if he sends them at the same time the reponse may be a little corupted becouse of async... couse my first can request can response after the second respose comes to me
 
Node had promises built in?
 
i know whta is callbacks i use flow control stuff
 
12:57 PM
@AmaanCheval yeah, on the very first few builds, the API really changed
 
i use async lib
for node
 
Err.. sorry I'm mixing terminology again. It's something I sometimes do.
 
@mikrowelt user can't send two responses at the same time
 
What I mean is the event loop. :)
 
almost the same time
 
12:59 PM
@mikrowelt have you read nodebeginner.org ?
 
ok i send 1 and 2... 1 st took 5ms, 2nd 1 took 2ms to reponse....
 
@mikrowelt If you're so worried about two requests doing the same thing at the same time, why not just disable the button/link while the request is pending to begin with?
 

« first day (842 days earlier)      last day (4118 days later) »