« first day (644 days earlier)      last day (4287 days later) » 
00:00 - 16:0016:00 - 21:00

12:19 AM
Anyone see anything wrong with this?
` init: function(){
$.get("./seeds/Ag.txt", function(data){
pageExecute.fileContents = data;
}, "", "text");

pageExecute.pagePrefix = pageExecute.fileContents.substring(0, pageExecute.fileContents.indexOf(':'));
pageExecute.slides = pageExecute.fileContents.substring(pageExecute.fileContents.indexOf(':')+1).split(',');

return false;
}`
It works fine up to the substring function
I am guess it's trying to cut up something other than a string, but I can't prrove it
 
12:33 AM
0
Q: Platformer movement and collisions

hustlerincI'm working on a platformer but I'm stuck at the player movement and collisions. Right now I'm not including the grid at all in the movement, but it's time I do it. I've read this article on how to do it. But there's no real code examples just theory. I like the second example and that's the on...

 
12:47 AM
I have a simple (and really really naive question)
 
naïve
 
Yes
I have a combo-box (HTML select), and a text-area. I want to change the content of the text-area when I change the value of the combo-box. I want to get the content from a data-base...
I'm thinking that what I need to do is execute a PHP function when the selected item has changed, but I (read that I) will need to use Ajax to do that... So my question is, is there an easier way to do that?
 
Sorry, I have never written a single line of js, ajax, jquery or php. I only do Haskell and Assembler
 
@copy: it's Ok. Thanks anyway. I guess I will try the PHP chat room...
 
lol, @copy I was about to ask you about ajax.
I can't figure out how facebook sends information when you write a comment
 
12:58 AM
@jmlopez: What do you think of my question :) ?
 
@jmlopez Related: gist.github.com/3086939
 
@RoronoaZoro, sorry, I'm fresh out of the boat, this is the first time that I'm getting involved with issues of sending data.
 
@jmlopez: it's all good. Good luck
 
@Copy, you may be able to help though. I'm having trouble with events.
I can't seem to be able to intercept an event.
Last time when rlemon was here he showed me how to change the definition of a onsubmit event
and then how to execute the original onsubmit command
 
@jmlopez you help me fix this Haskell code first: pastebin.com/ShLXTkLM
Kthx
 
1:02 AM
Alright, let me see what I can do
crap baskets
this is the first time I hear of Haskell
 
1:33 AM
0
Q: What is the optimal way to implement these features into a Entity System engine?

BaneNote: I say "optimal", as there isn't really a standard anything concerning ES's. "Abstract" just refers to objects that aren't game entities, and have a hard time being described as components or systems in my current implementation too. After asking two questions on Entity Systems (1, 2), and ...

HTML spec now has an inputmode attribute for specifying input mode (number, url, tel, kana, etc) for input form fields. http://www.whatwg.org/specs/web-apps/current-work/#attr-inputmode
 
1:54 AM
CSS Blending draft spec (control how colors mix in areas where shapes overlap) https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html http://blogs.adobe.com/webplatform/2012/07/17/new-blending-features-in-css/ from @rcabanier
 
2:46 AM
any one about
 
 
3 hours later…
user405398
5:40 AM
@RoronoaZoro:
 
user405398
@RoronoaZoro:what you have to do is, just bind change event on the select element using jquery, from the change event callback take the value from the element, send that value using an ajax call using jquery to your php class or whatever, on success callback of the ajax call, you will get what ever you return from server. Then just put that value in the textarea using jquery function .html() or .val(). Good luck.
 
0
Q: Has jQuery become synonym to JavaScript nowadays?

Kuba WyrostekI thought I'd ask publicly a question that bothers me for months now. I perfectly understand what jQuery is and how does it allow to write shorter and usually much more readable code. I generally understand the advantages. What I don't understand I that why "knowing jQuery" has - in my opinion - ...

 
HI freinds
any one here?
 
Nope
Internet's still asleep at 6 am GMT
 
5:59 AM
@copy hi
 
Copy that
hi
}}}O_O{{{{
....||.....
 
DextOr
coudl you help mepls
 
will try
plz ask
 
I need a function for getting the content of the html excluding the tags
i need to pass the content as string to a view
could you please help me
@DextOr
 
6:18 AM
this can be done using jQuery
better show me some code to play with
 
i do not really know both of them
all i was told was i need to do it with java script
thats is why asking you pls
 
ok on which language you are working
ok fine jQuery is also new farther of JS
 
i am working on android
now i want to get the content of the html so that i can pass the content as string to a view
 
lols no idea about android.. sorry
 
 
2 hours later…
8:03 AM
0
Q: How can my "world" provide the information required to render itself?

alexI am writing a JavaScript game that provides a top down view of the player, to eventually create a ray caster that can render the view in faux 3D (the top down view will end up as the mini-map). A while ago, I asked the question Should actors in a game be responsible for drawing themselves?, to ...

 
 
2 hours later…
9:34 AM
Hello
How to clear cache using JS.?
 
Magic
 
You can't. It's not up to you to clear the user's whole browser cache.
If you just want to load something without caching, add a query string containing e.g. the current time or a random number.
 
@ThiefMaster PLZ HELP ME
JAVA and SQL problem is here
 
...
 
9:49 AM
in java when no records are returned using SQL then it gives error
"Illegal operation on empty result set."
 
This is a JavaScript channel, not a Java channel.
 
Owners must have knowlegd of every thing
 
You can't be serious... besides that, I'm not an owner of this channel.
 
and there is no java room with active users
 
try android room
 
9:51 AM
Why not ask your question on SO?
 
But moderator in S.O
right?
 
Naturally, when the bakery's closed, I go to the mechanics to help me out
 
from all programming languages, javascript is the worst possible channel for java
 
Yes, so what? Do you really expect me to have knowledge of every single technology and programming language?
Actually a SO mod could do his tasks without being really familiar with a single programming language.
 
@Zirak we are brothers :O
 
9:53 AM
Then I have no brother spits on the ground, whirls around and walks away
 
@Esailija why they both start with J ... HAHAHAH
 
true but the philosophies and developer mindsets are opposite
 
ok guys ..... there's no harm to ask
just calm down n chill
//////
\\\\\\
//////
OO
 
@DextOr I once walked up to a girl at a bar and asked her "how much for 2 hours?" My genatalia tells me that there is harm in asking.
 
it's like asking some gang on the street about chess (Ok zirak beats me at these, what are these, analogies?)
 
9:57 AM
I call them Ziraklings
Named after a truly great man
Winston Churchill
 
I see
 
10:20 AM
Java is to Javascript what a Car is to a Carpet.
That's it.
 
Hem
ha ha Florian .... nice description :-)
 
10:41 AM
@Esailija I can't believe how many people actually post answers that convert the 
 instead of simply using \n
 
I am writing a follow up edit
I hate this blind leading the blind
@ThiefMaster what do you think of the edit stackoverflow.com/a/11591227/995876
 
I'd say a better example for the setAttribute would be "><div>hello</div>
i.e. something that would actually break stuff when used in plain HTML
 
ok
 
<div title="<b>hi</b>">hello</div> is not valid HTML but it works fine
 
10:57 AM
><b>hi</b>" works too. it's surprisingly resilient
 
Kind of stupid that you actually have to escape it in this case, the string should be sufficient...
Makes sense, it's still inside the attribute string
 
oh right
so something with quotes
 
Interesting, at least in HTML5 that's perfectly valid without escaping
<!doctype html><title>hello</title><div title="</div>">hi</div>
 
yeah it's inside quotes
only a quote would break it
 
Yeah, but I think it's not valid in XHTML - not sure though and too lazy to lookup the proper doctype for it to test it
 
10:59 AM
really? It should allow arbitrary content since it's a title
but only another quote would "break" any parser
 
I think < or > always needs to be written as an entity in XML
 
oh
 
That's why XSLT test attributes look so disgusting when they contain lower-than comparisons
 
I can't believe it, that's so stupid design. It's a frigging quoted string.
even email addresses allow arbitrary character inside quoted string I think
"<div>hello</div>"@hotmail.com :D
 
11:05 AM
I see, I still stand by my opinion
 
It's very stupid
 
that's like javascript strings not allowing var inside them
 
They don't allow </script> inside them if it's not a separate file ;)
 
XML is made out of a myriad of stupidities
 
lol
0, 1 or n
there is no 4
:P
 
can anyone please have a quick look why this class toggle doesnt work? jsfiddle.net/QqVCu/1
 
you have .onclick
Uncaught TypeError: Object [object Object] has no method 'onclick'
it should be .click
 
what should i use instead?
 
and you should look at the console for javascript errors by yourself
 
yes it works, thanks. :) Yes sorry, im kinda new to JS
 
Or even better, use .on('click', function(e) { ... });
That's the preferred way to go in jQuery 1.7+
 
eh, you don't need jquery for something like that
 
He's already using it though
 
yes
thanks guys
 
11:24 AM
I assume his whole project is not just this one click handler
 
And toggleClass etc. are annoying to write by yourself thanks to the class list being just a plain string instead of e.g. an array
 
Hello people!!!!!!!!!!!!!!!!
 
your_last_message = your_last_message[:-15]
 
I was told something today that made my mind question myself 1,000,000,000,000,000,000,000 times
 
at least | | <- this many times?
 
11:26 AM
may i share the fact that i was told here [its regarding garbage and variable allocation ]
So my trainer (at c training) told me that if i declare a variable in c, with the auto keyword. and somebody else declares the same variable name in some other program
after my programs execution is finished
if he runs his program the variable with the same name will automatically get initialized by the value that variable contained in my program at the time of end of execution.
 
Why would anyone use the auto keyword?!
 
@Esailija My penis is |<-------->| this big (not to scale)
 
idk she just told me
and the reason she gave me was even brilliant
 
what is the auto keyword, sounds very VB
 
Besides that, this fact sounds like bullshit.
@Esailija: It's the default for any variable.
 
11:30 AM
she told us that after program runing is finished all the variables goto garbage cleaner and when the new program runs it just fetches the value from GC
 
4
Q: Where is the C auto keyword used?

peterIn my college days I read about the auto keyword and in the course of time I actually forgot what it is. It is defined as: defines a local variable as having a local lifetime I never found it is being used anywhere, is it really used and if so then where is it used and in which cases?

 
In C? Where there's no GC?
 
yes.
 
Hem
C is having garbage collection feature ???
 
nope but i was told . :-/ by my trainer
 
11:31 AM
dafuq
 
i fell in dipression after hearing all that
 
ah, it's like static
 
There are GCs available for C, but i don't think they are actually used in any serious code
 
So, you send the variable to the non-existent GC, and when you get back, this non-existing entity gives it back to you?
 
as in "dont create this everytime I run this function" but opposite
 
11:31 AM
This sounds a lot like prayer to me
 
Hem
you can do one thing...better u change the institute from where you are getting trained...go for a good institute...tht will solve lots of your problem
 
Was your trainer on crack, by any chance?
 
@Abhishek there's no GC in C, your case may work for memory leaking code, but that's another thing.
 
@FlorianMargaine you know she actually told me this why C is not used when writing server code
and added that Java is the best language for doing so .
 
and it's not about the variable's name, it's about the memory allocation space
 
11:35 AM
@FlorianMargaine i know that , just wanted to make sure my understanding of computer is real
 
for example, if a program is leaking memory, you can access this memory space (knowing the hex) in another program
 
i know that bro (x_x)
 
your trainer is fucking stupid
ask her why linux isn't written in java
 
i was just horrified by the person's knowledge who was going to teach us " C "
 
oh wait, linux isn't a server?
 
11:36 AM
C isn't used for writing server-side code because it's a gianormous pain in the ass. A server-stack is not an easy thing. The pain caused by C and C++ is why Java was born.
 
apache is written in C though
 
Also, isn't Apache written in C? ninja'd
 
LOL
same thought
 
Hem
server side code and C !!!!!!! my head is spinning ...
 
wow, the creator of apache is named "Robert McCool"
 
11:39 AM
what about jvm? in which language is it written?
 
IIRC, C++
Oracle's JVM (which had some retarded name), at least, is written in C++
 
@Hem i do server side code in C++ and yes it is gigantic pain.
okay on monday i will get the trainer into a debate :3
 
Just tell her to stop smoking crack
 
Hem
lol zirak ...
 
lol
 
11:42 AM
@Abhishek there's no debate there, she's just stupid, I don't think you'll be able to reason her
 
@FlorianMargaine apache isn't "server-side code" which means application code in this context
 
C fun time: What does this mean? (((char)(*))((*)())(((*)((foo)))())([(N)]));
 
Hem
right Esailija...
 
(hopefully chat didn't mess with parens...)
 
I CBA to write a parentheses parser that would indent that shit
 
11:48 AM
"an array of N pointers to functions returning pointers to functions returning pointers to characters"
 
lol
 
@Zirak yeah i was about to say that
jk jk
@Esailija btw :-) thanks for an old time help
when u showed me how to hijack and get value out of a private variable of a class in c++ ;-) ;-)
 
@Zirak so something like this?
var a = function(){return d;},
    b = function(){return e;},
    c = function(){return f;},
    d = function(){return g;},
    e = function(){return h;},
    f = function(){return i;},
    g = "a",
    h = "b",
    i = "c",
    arr = [a,b,c];
an array of function references that return function references that return "char" "references"
@Abhishek should you do that? maybe they are private for a reason ;D
 
12:12 PM
@Esailija i shoudn't but it was fun to get internals out :-) of ffmpeg to understand how it works better :-)
 
[document.createTextNode("hai")].toLocaleString();
"[object Text]"
WHY
also why am I tied with this guy stackoverflow.com/a/11592042/995876
 
@Esailija Something like it; except it's real pointers
erm, references
 
12:48 PM
@Esailija Because you're calling Array.prototype.toLocaleString, which calls Text.prototype.toLocaleString, which is actually Object.prototype.toLocaleString, which simply calls toString
 
yeah but my point is WHY
 
document.createTextNode('blah').data.toLocaleString()
 
why cannot it just return nodeValue
 
isn't it possible to use label to have some tail call optimization in js? developer.mozilla.org/en/JavaScript/Reference/Statements/label
 
12:49 PM
to map array of textnodes to strings, you need a custom map function
 
Correct
 
it's stupid and needs to change
 
Unless you hijack Text.prototype.toString
@FlorianMargaine How?
 
dunno, that's kinda like a goto
 
Labels can only be targeted by break and continue; there is no goto
 
12:51 PM
thought there could be some hack
I'll think about it later
 
label is pretty boring
 
you can do this
sup: {
     console.log("hello");
     break sup;
     console.log("don't see this");
}
 
!!> test: { console.log('begin'); continue test; console.log('end'); }
@Zirak "SyntaxError: Undefined label 'test'"
Interesting
 
how is that even executed?
 
12:54 PM
{} creates a block
Which is completely useless, because js doesn't have block scope
 
right
looks too much like an object literal :p
 
!!/spec block
@Zirak 12.1 Block
And it's the reason Crockford's canonical reutrn \n {...} is valid js
return //semi-colon insertion
{ //starts a block
   blah : 42 //42, a valid statement, with a label blah
}; //ends a block
 
Hi folks,
I have a doubt.
Why does my site does infinite redirect when I disable Cookies in my site using Web Developer add-on in Firefox?
 
@naveen consider showing us code ?
what you asked is asking , why am i feeling ill to a doctor without even going to him for checkup
 
1:27 PM
@Abhishek: Thanks for the help offer. Actually there was a setting in my config that searches for cookies and that was the issue
 
@naveen glad that you found the fix .
 
@Abhishek: long day :)
 
:-)
 
1:38 PM
 
:)
 
Hi, got a small issues when using Ajax Posts to a function
 
@Esailija I answered him , you just do nothing!
lol
 
its a PDO sql statement, but its not working as it should, how can i somehow feedback the errors from it?
 
You print the result on the server...?
 
1:45 PM
or you just log out the errors or flush to client via some sort of british mumbo jumbo!
 
Ever looked at the node source code? ugh...
 
@Zirak i do that everyday
whats up ? lol
 
So ugly :(
 
2:05 PM
:-)
try reading libuv
its better :-)
 
@Abhishek He means setTimeout?
 
@Amaan i know and i showed him how to implement setTimeout
but i find it cute <3
 
I was confused for a bit :p
 
Nearly everyone means sleep
 
He's making a game when he doesn't know about setTimeout?
 
2:08 PM
Which is actually "do absolutely nothing for some time"
 
ok Some dickweed is downvoting my old answers
especially this gem which was very wrongly downvoted in the first place stackoverflow.com/a/10813607/995876
 
2:45 PM
javascript needs a sleep function LOL
wait there exists.
$($);
 
let's remain in pure javascript
and find the shortest function to crash a browser
 
function sleep(x) { var now = new Date; while(new Date - now < x); }
 
heh
I think I found it
while(1){}
 
close()
 
for(;;);
 
2:49 PM
@copy nice
 
But that's not a crash
 
@Abhishek dunno if you saw the view helpers' support added
 
thats an actual sleep :D
havent got a chance mate
i am still repairing damage done to my brain :-?
 
I need to add db support
 
by the awesome trainer
 
2:50 PM
haha
 
function a() { a() } will actually crash
 
for(x="x";;)x+=x
 
I have a hunch there's an array trick to do it; though not sure if it'll be short
 
@FlorianMargaine now u understand why i asked how to skip (XD)
 
I wonder what the star world record is. @rlemon must be close.
 
2:58 PM
Array(4e9).join()
 
Even shorter: +Array(4e9)
 
how about ur function for
Infinity
sleep(Infinity); mwahhahahaa
 
Nice instant crash
 
:-)
 
In IE<9, an infinite loop of alerts will make the user do the crashing.
 
3:04 PM
@xtal thats stupid
cause firefux or chirome will give a "STOP BUGGING ME" feature
we want x-browser
and besides to crash internut exploder
// do anything heavy and it will die
 
@Abhishek Yep.
 
0
Q: How to call a function in main v8 loop from a different thread

AbhishekI am trying to implement an audio module for nodejs which involves a neural network. This neural network has 2 types of nodes 1. Pure C++ , 2. C++ based on JAVASCRIPT ( which involves calling a javascript function defined ) As far as i know its not possible to call any function which involves v...

 
3:19 PM
Don't use threads.
 
.@xtal :3
when i use threads in v8 i need to use em
 
How sure are you?
 
Offer: Implement an SO login system, and the next time I meet you, I'll buy you your favourite pizza.
I'm tired of this bs :S
 
@ThiefMaster About $($(x)) - I believe we use it when we have body inside another body. Is it not true? — Srcee 1 min ago
wth does he mean
 
<body> <body /> </body>
 
3:24 PM
I think he means Invasion of the Body Snatchers.
Or Alien.
 
Obviously
 
Or Russian dolls.
 
Alternatively, pregnancy, you sick, sick man.
 
@Zirak I have to balance that transaction against the cost of the flight.
@Zirak I saw $ and immediately thought of parasites. What can I say?
 
0
A: How to call a function in main v8 loop from a different thread

AbhishekI figured it out with the help of @indutny in the #libuv channel. What i do now is dispatch the call to main thread via uv_async_send function defined in libuv.h , since the function is non-blocking , I also use a semaphore to wait till the execution of the java script function is complete...

now i am embarrased XD
 
3:26 PM
@xtal I offer a belly-dancing service via telnet
 
@Zirak Will that work in my browser?
 
What's a browser? Bowser's evil twin?
 
Mosaic supported gopher://
Ooh, FF has support with a plugin.
So, who here has used Mosaic? :-)
 
@xtal fully
i nee to do audio processing and 200 of such instances
 
3:31 PM
do you think i can go non-asynchronous ?
hell that would make my server ir-responsive forever!
 
@Abhishek I have no idea. It's just that when I encounter a problem, I can either solve it, or eliminate it. Elimination is always the preferable option.
 
not when u are working in R & D :P
 
@Abhishek Especially when you are working in R&D! :-p
@Zirak What is this vision I see before me?
 
i cant just remove async
:P it wont just scale atall :-( :-( :-(
 
I didn't say you should.
 
3:34 PM
drools
 
now well farewell i need to code an uber complex traverse in a neural network with pure async spirit still keeping syncness .. aha! i am so crazy!
 
Nice website by the way: post-data.org/beige
 
@copy My eyes! My eyes!
 
Bet it looks fine in Lynx though. Must get that installed again.
 
3:36 PM
Do someone know how to make a shadow on logo and move them from left to right as in past we see it on movies when name of Media appear in starting.
 
@FlorianMargaine Not in browser js
 
in node js?
which runtime engine are you using?
 
Perl atm, but show me with node and I can port it
 
@copy 'site design: paul b. davis'. Love it!
 
3:39 PM
Logging into OpenID isn't very much a problem; logging into SO is
 
SO uses OpenID
 
I know. Which is what makes me confused and sad
 
how come #javascript is invite only on freenode while ##javascript is the main channel for it? -_-
maybe you aren't using https?
 
I haven't tried that library; I'll give it a shot
 
daFuq did i see ?
 
no finger interaction :-((
 
LOL
 
3:56 PM
That seems to be nice for CGIs, not so sure if it'll like me
 
00:00 - 16:0016:00 - 21:00

« first day (644 days earlier)      last day (4287 days later) »