« first day (962 days earlier)      last day (4211 days later) » 

00:00
@san.chez Knockout >>> Backbone
@san.chez Yes, I think Backbone is quite horrible to be honest, making you write a lot more code, and helping you with very little. I strongly suggest you evaluate several options and decide for yourself though, it's a matter of personal taste.
@BenjaminGruenbaum Benjamin!!!
@lawm Socket.IO still works on Heroku, it just uses long-polling instead of WS.
@SomeKittens so...
@lawm Why the ping?
00:01
no ws://
@BenjaminGruenbaum this!
document.getElementById("frame").textContent+=("test");
:9789474 document.getElementById("frame").textContent+=("test");
@lawm Create a fiddle
@BenjaminGruenbaum kk
@BenjaminGruenbaum I added learn.knockoutjs.com as 1st thing on my fav bar, will definately check it out
00:02
@san.chez Backbone doesn't do data binding, it has the right idea of separation of concerns, it just doesn't provide you with a particularly helpful way to do that. I also like Angular and Ember :)
wtf it IS working!
@lawm You don't say...
@BenjaminGruenbaum ...in jsfiddle
durrdurrdurrdurr
hurrrm
@san.chez I can recommend a few other books, but if you're good enough to read "The Good Parts" and "Learning JavaScript Design Patterns" there is no point in you reading the rhino book or anything like that. My best suggestion is quantity over quality, write a lot of code and formulate an educated opinion on common language practices :) JavaScript weekly is a nice weekly newsletter
@SomeKittens Also, how is not helping someone nearly the same as hating them?
STUPID JS CONSOLE
VAT?
00:05
!!> 'hate on' === 'hate'
TypeError: 'null' is not an object (evaluating 'document.getElementById("frame").textContent')
@SomeKittens false
I love how the bot has become a method of expressing abstract things
that came out badly
@SomeKittens Just because I'm not willing to spend my own time helping such people? I don't think there is much point in helping vamps, doesn't mean I hate them, or hate on them.
@BenjaminGruenbaum I get this error...
TypeError: 'null' is not an object (evaluating 'document.getElementById("frame").textContent')
00:06
It's easy to dismiss new people who don't know better as vamps instead of guiding them to a point where they can start guiding others.
I've found most tend to reject newcomers wholesale.
You've seen me here, I'm willing to spend hours helping people here, that doesn't mean I should spend my time helping people who don't show minimal research.
@BenjaminGruenbaum :) I am also trying to learcn by answering js questions. It is so hard :) and have to be so quick. The answers are poping up like mushrooms
@san.chez That's good :) I answer JS questions in SO from time to time, but mostly I'm in the chat. It's good to answer questions in SO, you get free community feedback, if you do something wrong, they let you know.
@san.chez Often I don't answer new ones. Rather, I dig up old ones with a lot of up votes with no answers and try to solve them.
@san.chez if you want something that'll take a lot of research and force you to learn you can try and solve this.
@BenjaminGruenbaum I looked at some older ones but 'no chance' for me on them :) ok let me have a look
@BenjaminGruenbaum Then why not teach them how to research? Teach a man to fish...
This is why I pointed out his age. Most likely, no one's ever taught him how.
We treat Google like a magical answer-giving box (which it mostly is), but sometimes one needs guidance in using the box.
00:16
@SomeKittens All I'm saying is that his age is not really relevant. He asked a bad question that shows little, if any research effort. I'm sorry but even googling something like "Canvas Tutorial" would have solved his problem, not even mentioning an SO search, or a more specific query. I'd like you to name one constructive member of this community who started not willing to perform such research before asking people for help.
We're all professionals with jobs, we're all (or at least I'd like to think) here because we try to help the language and its eco-system improve and grow. We all have limited time, helping people who are not willing to help themselves seems like a waste.
@BenjaminGruenbaum I don't think I have enough knowledge at this time to even understand that question :) I would need to read what web workers are
@san.chez It's a hard question, which is why I put a 100 rep bounty on it. If I thought I had enough knowledge to answer it, I would have done so myself :) All I'm saying is that these questions in general are all great learning experiences, as well as a great way to share knowledge. You can even trick other people into learning
I get your point :)
'Ok, I lied, there is a simpler way!' :D
Good night!
Good night! Thanks for a chat
Good motivation
 
1 hour later…
01:35
@CSharp 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.
@CarlPritchett 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.
02:11
I can simulate mouse/keyboard events using JS now on the browser but it doesn't work on the embedded element. I just wanted to create a bot for this chrome game. damn.
@Jon 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.
02:24
anybody know the javascript implementation of the N-Queens Problem?
specifically the one mentioned in this article? wired.com/wiredenterprise/2013/06/43651
@yassine_hell 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.
any nba game live streaming link pls in mobile?
@Elegiac 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.
thanks :)
@Happyninja interesting, I tried to do the same thing with rendering
02:40
did it works?
1
Q: Backbone call fetch on every get

neolaserI have setup a basic modal where I can call fetch() and the model will update. However, I want fetch() to be called every time you attempt to access an attribute. so I have something like this get: function () { this.fetch() Backbone.Model.prototype.get.call(this, attr); } This clearl...

comments are funny sometimes
03:56
aargh. The easiest way to give someone reputation is to downvote his currently active question.
Huh? How so?
Some people seem to upvote just anything that has a negative score
@CallMeDummy What is love Baby, dont hurt me Dont hurt me no more Baby dont hurt me Dont hurt me no more
04:14
0
Q: Is my Backbone.View organized properly and stylistically correct?

Sean AndersonI'm learning BackboneJS and I just made an attempt at converting a pre-existing module to a Backbone.View. I was hoping to get some feedback on my attempt and learn. I've been using the annotated ToDo source as a guide. Here's some HTML to give you a rough idea: <div id="VolumeControl"> <di...

Does anyone know how to set the max height or max rows displayed in a datalist element?
04:32
If you mean <dl>, I've never used it. However, try out the max-height CSS attribute.
04:59
Man oh man, my mobile providers account page has been down all day for 'upgrades' l2 heroku fuckin scrubs
05:18
@icey502 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.
05:31
i have a javascript ajax functio like this:


	function ajaxFunction(){
			var ajaxRequest;
	try{
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
	    try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				alert("Your browser broke!");
				return false;
			}
		}
	}

	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('ajaxDiv');
05:44
@blackbee you can safely assume XHR is available. The latest browser that didn't support it was IE6: developer.mozilla.org/en-US/docs/Web/API/…
At the very least, instead of trying to construct XmlHttpRequest, you could look if the constructor exists. If it does, you can safely call it.
u mean i can keep the code upto this
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
var ajaxDisplay = document.getElementById('ajaxDiv');
ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
}
in a seperate file and call it in another html page <script type=".." src="...">
and use it in another function??
I mean, you can drop the try/catch and everything inside the catch block. It will only break IE6 and lower.
o i c... but how to i seperate the code
You can create a function that creates the XmlHttpRequest and then returns it, or you can create a function that gets a callback in an argument, creates the XHR and then calls the callback from within onreadystatechange
IF there's one thing I would EVER, EVVERRR say use jQuery, it's for ajax, other than that, I would say screw it, but since it looks like you have a clue, using jQuery ajax would be a lot easier on yourself
05:51
@Gacnt I was getting to that ;-)
Use jQuery or another framework/library. Most frameworks already handle that.
^^
If you don't want jQuery for its size, look into Zepto. It's basically a stripped down version of jQuery.
aww.. then i have to learn jquery
guys, if you normally assign a byte value byte b = (byte) 129; and print the value out in console, do you get -127 ? I want the byte value to be literally 129.
No it's really simple
for ajax it's simple as
05:54
stackoverflow.com/q/16910305/1331430 I wonder how something so simple that must have been asked many times already gather so many votes in such a short time
$.ajax({
    type: 'GET',
    url: 'whatever/whatever',
    dataType: 'JSON/JSONP/XML',
    success: function(data) {
        console.log(data);
   }
}
@blackbee it's just $.get(url, dataObject, function(response){/*do something with the response*/})
I prefer $.ajax, but you can do $.get, $.post and so on
@FabrícioMatté are you jealous about those upvotes?
Or even $.getJson and get the response parsed automatically :-)
05:56
:P
Repost:
@Gacnt I recommend avoiding JSONP at all costs
@O0oO0oOO0ooO not really, I smell voting cycles
@JanDvorak how do you like dealing with CORS for APIs?
@Gacnt use CORS headers
Gimme example
05:57
okkk
@Gacnt must be supported by the server; hold on
@O0oO0oOO0ooO Call me paranoid, but I've been looking over the JS tag for over a year and this is completely abnormal.
Cross-origin resource sharing (CORS) is a mechanism that allows Javascript on a web page to make XMLHttpRequests to another domain, not the domain the Javascript originated from. It is more powerful than only allowing same-origin requests, but it is more secure than simply allowing all such cross-origin requests. How CORS works The CORS standard works by adding new HTTP headers that allow servers to serve resources to permitted origin domains. Browsers support these headers and enforce the restrictions they establish. Additionally, for HTTP request methods that can cause side-effects on us...
@FabrícioMatté hire a detective
what is the dataObject ?
05:58
like detective conan
@O0oO0oOO0ooO Nah, that's a job for the diamond moderators anyway
@blackbee the data: ?
@blackbee it contains data that will get converted to the query string; ex: {key:'value', key2:'value2'} => ?key=value&key2=value2
easiest way is just to serialize a form if you're sending all form data
In case of a POST request, it gets converted to the POST body
06:00
$('#formid').serialize();
^
@FabrícioMatté could be the Reddit effect
@JanDvorak Yeah that's a possibility =]
actualy i am trying to make something like reddit.. but for college purpose only.. :)
@blackbee in which case, my suggestion is: f* IE
06:03
Where f* stands for "forget about supporting"
ie makes everything so difficult might as well boycott them
why why?
or, rather: use jQuery OR forget IE
IE has severe functionality disability
ow, yaaa..... everything fails infront of ie
IE Is the only one attempting to make a competing standard to WebRTC, open shut case watson
06:06
can anyone tell me if it is possible to set the max amount of rows for a datalist element like a select has the "size" attribute?
Well I don't have to worry about that, SO moderators have good enough tools to track it in any case
Just that my 8th sense of EXTREME JUSTICE hardly ever fails, I suspected about a given user for a couple months and then stackoverflow.com/users/1479606/eli
IE7: forget completely; IE8: forget CSS3 support (they should be happy that the layout doesn't break); IE9: if you don't support it, it would be nice to mention why ;-)
Never mind it, what makes me suspect of that question is that everything looks pretty normal, except the vote/time coefficient
probably reddit effect as Jan said
stackoverflow also does have some features of reddit ..... i mean the design and the voting thing....
Reddit: Python
SO: .NET
06:09
IE9 lacks modern features, but at least it's a decent browser for web pages (unless you care about performance, that is)
I'm sooooooooòó bored
dang nobody?
Not surprisingly, the question I linked is the first one in the "highest voted" list of 10k mod tools
ie should be depriciated..... i don't understtand.. browsers like mozilla chrome are good ryt from start, what are they doing with windows and ie i don't quite get it.. the worst knightmare i had, when i heard they are making windows 8.1
@dylanmaxey at worst, you can hide by javascript
06:11
ew
lol
!!/tell blackbee google download firefox 1
Actually, W8.1 sucks less (to quote Microsoft) than W8
well, ok those are bad... but they developed
One big disadvantage of IE8 is that it doesn't upgrade
IE10 sucks less
06:14
python and django is so difficult... no good online tutorials..... i had to go back to php....
ew PHP
What about ruby on rails?
eak....
Ruby is a nice language. Not C-like, but powerful.
@blackbee There is a other method for administer the querystring
var $fm = $("#form");
$.get($fm.attr('${nextstep}'))\\${nextstep} is a action because I have the server in cherrypy
				    .done(function(data, ok){
				    var fr=$fm.serialize();

                                    if(document.getElementById("inputp"+contapara+"_visible").checked==false)
                                      fr=fr+"+%23+inputp"+contapara+"_visible%24+off";
					// data is the content of the response
				    document.location.href="index2?"+fr;})
@MirkoCianfarani formatting please
06:17
This a submit 's form
php java c# ruby are main streams i think... so competition is more.. but python is a developing platform, scopes are more... i think...
There's also Node.JS
@JanDvorak now I do format?
@MirkoCianfarani fix the indentation please
06:18
@MirkoCianfaranim i am trying to achieve something like SO, click on question and it will load the question with their votes...
select the whole code and press Ctrl+K
@blackbee jQuery will come in handy
now I can't edit because it's been too long but not function ctrl+ k in chat...
jQuery can also do animations (but don't overdo it; slideDown will suffice)
@MirkoCianfarani CTRL+K works for me just fine
@JanDvorak but in the my comment with code worked the format CTRL+K ?
06:22
animation i don't need.. a paginator will be juss fine... like either click to load more or scroll to load more.....
@blackbee http://stackoverflow.com/questions/13708265/particular-case-programmed-query-string-using-form-inside-dialog
info...
@MirkoCianfarani formatting did succeed, but the indentation is all wrong (which CTRL+K doesn't fix)
I not understand that is indentation but please explain this @JanDvorak
An indentation may refer to: * A notch, or deep recess; for instance in a coastline, or a carving in rock * The placement of text farther to the right to separate it from surrounding text. The first meaning is also applied in hardness measurement as in indentation hardness. For an example of the second meaning, this is an indentation of one non-breaking space:  Indented block because this is something and this is an indentation of two non-breaking spaces:   Indented block 2 In the written form of many languages, an indentation is often used at the beginning of a l...
In computer programming, an indent style is a convention governing the indentation of blocks of code to convey the program's structure. This article largely addresses the C programming language and its descendants, but can be (and frequently is) applied to most other programming languages (especially those in the curly bracket family). Indent style is just one aspect of programming style. Indentation is not a requirement of most programming languages, where it is used as secondary notation. Rather, programmers indent to better convey the structure of their programs to human readers. In par...
then is similar as syntax....
thx
06:32
can i use the $.get and sent a request to the php page.. which wouldnot only get the values from the database but also print them and then use something like
 $('#content').load('questions.php');
<div id="content"></div>
questions.phpl ??? @blackbee
writing mistake
$.load is basically a $.get which also sets the element's content to the response body.
so, your snippet is correct, assuming questions.php returns the HTML that should appear in #content
quiet @blackbee
ok.. yess.. i learnt so quickly... haha
holy shhh : "jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8."
06:37
@blackbee you're a couple months late dude
it's also faster than 1.x
and smaller
but now who use IE 6,7,8?? and why are we worrying about this??
also IE is a fucking browser...
@MirkoCianfarani People. China. USA Libraries and other brainless beings.
@MirkoCianfarani companies
then there are always some fucking pepole out there... :D
@FabrícioMatté actually i didn't bother myself with jquery... i wrote some javascript functions for myself that are of daily use... like for check input fields, like hiding and showing (increasing and decreasing opacity in a loop) etc etc..
06:40
@blackbee check out Zepto
@blackbee sure thing, on small projects you can write monkeypatches as you need. Reusable functions for validation/etc you'll make independently of using a framework or not. jQuery is just about not reinventing the wheel for cross-browser basic DOM methods that you use on a daily basis.
Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you already know how to use Zepto.
I not know Zepto!!! This is fail??
^ the codes here look familiar String.prototype....
@MirkoCianfarani step 1: write jQuery code
@MirkoCianfarani step 2: swap in Zepto for jQuery
:)
^ amazing tutorial
06:44
I have to learn many things still....
this is information age
I love panel#3
Zepto is awful
06:46
please elaborate
last slide in that picture is ridiculous
I actually hate the zepto source :p
but I just don't like the js-style in general which is used there
though the votes/time ratio is off the charts, it looks legit enough. Ok enough rambling about it
Gratz on the most voted question of the last 2 days on Stack Overflow. ;)Fabrício Matté 3 mins ago
@FabrícioMatté perhaps it was a hot question?
I think so
check the SE multicollider
06:49
It was the most voted so it should have landed on hot yes
Yeah it is on my Hot questions list from the MultiCollider SuperDropdown as well
so in the end, use zepto or not use zepto?
so in the end, I'd like to try it out
I guess the multicollider attracts even php guys to answer the JS question with PHP lol stackoverflow.com/a/16911429/1331430
downvoted for irrelevance
06:55
I would too but am not in voting mood, I know enough people will downvote the 1 rep guy anyway
@blackbee, sorry, I got called away, don't use Zepto
Unless it is the first library you are learning
@phenomnomnominal reason?
If you have ever used jQuery before, the change to Zepto is quite frustrating, as there are a few subtle things that don't exist in the Zepto API
Examples? I have noticed the aliases of animate missing. What else?
Especially if you are using them interoperable, for example if you have to support any IE and need jQuery for that
@JanDvorak, I can't think of any specific examples off the top of my head, but at least once a week at work someone in my team says "fucking Zepto"
06:59
@Gacnt The more I look into it, the less likely it seems.

« first day (962 days earlier)      last day (4211 days later) »