« first day (566 days earlier)      last day (4385 days later) » 

12:27 AM
@david well no
it's more about shared code whereever possible
for example recent toys with the idea
have shared data sources and shared domain
so all your app and business logic is shared
and your input / rendering logic is handlede seperately
which is pretty cool
because you can see how the client talks to the domains and how the server does.
 
any of u guys knowledged on A* path finders
 
I wrote one once
in Java :D
3 years ago.
 
i got an unusual problem where its finding the longer path
 
A* is pretty simple, there are hundreds of tuts around
 
The algorithm should be trivial to implement if you read wikipedia
 
12:29 AM
but it finds the shorter path for any other type but this one random path configuration it seems to not find the shorter one it defies logic
it goes red to purple.. notice it found the longer one :P
 
12:41 AM
You probably have a bug in there somewhere then, what are you using as the heuristic?
 
 
1 hour later…
1:41 AM
Hello, I'm trying to make a image map href call my jquery, but it doens't seem to be working... the code is as follows..

$(GameOpen() {
$(".character-popout").css("display", "inline");
});

and the href is just href="javascript:GameOpen();"
 
$( GameOpen() { } ); is syntax error
do you mean to do
function GameOpen() {
    $(".character-popout").css("display", "inline");
}
 
2:06 AM
let me try it out
it says $ not defined
 
Sam
why do you encapsulate 'GameOpen()' with '$()'?
 
I was trying jquery which I'm new at...I'm just trying to get a class to become visible with the click on an image map.
I've tried doing it with javascript (which I do this all the time)

function GameOpen() {
document.getElementById("character-popout").display = "inline";
}

and it's not working either....
 
it should be
function GameOpen() {
    document.getElementById("character-popout").style.display = "inline";
}
 
Sam
@Matt and with JQuery, you don't need to encapsulate functions with $(); it's only for selectors
sorry for pinging
 
okay Isee,, I knew i was forgeting something, the style.display fixed it Esa, thanks :)
but how can I get something by class rather than id on javascript?
 
2:17 AM
depends what browers you want to support
document.getElementsByClassName for example doesn't work in old internet explorers
 
Sam
non-JQuery; you can check for the class attribute, and compare it to the class you need
 
2:36 AM
aah I see
thanks ^^
 
Sam
no problem; did it work?
 
yea it worked ! Thanks :)
 
> Jacob Thornton leaned back in his chair, folding his hands behind his head. He was left with another free afternoon in the office of Twitter from all the time saved in not inserting unnecessary semi-colons. Yes, life was beautiful.
 
Sam
lol
you are welcome, Matt
 
 
2 hours later…
4:22 AM
0
Q: JqueryTools plugin custom effect for caching ajaxed tabs

PheliosThis is a custom effect for jQuery tools that enable caching for ajaxed tabs. Please advice on anything that I can improve. Note that I'm not sure where to put the loading indicator, so, at least have a look at that. Thanks. $.tools.tabs.addEffect("ajax_cache", function(tabIndex, done) { //c...

 
@Esailija lol
 
 
2 hours later…
6:39 AM
@Zirak because I'm getting html from a webservice
 
@Zirak u dont need to find it ,[ the cors ] its as easy setting a single header
 
Hi! @Abhishek
 
@Raynos like meteor/derbyjs?
@Abhishek o/
 
6:55 AM
0
Q: Javascript removeEventListener not working

Jinu J DI have the following code to add eventListener area.addEventListener('click',function(event) { app.addSpot(event.clientX,event.clientY); app.addFlag = 1; },true); It is working correctly as expected..Later in another function i tried to remove the event l...

 
user986408
err guys.. when using the event touchmove the target always returns the parent element.. is it somehow possible to get the element inside? ergo get the target element like using e.g. onmouseover
 
@FlorianMargaine \o
sorry am busy reading .
 
@ThatWebNerd the event is triggered once per element, bubbling up
so first the lowest element, then its parent, then its parent, etc
@Abhishek np
 
@FlorianMargaine what up with u
@rahulserver hello
 
just learning about the data property on DOM elements
0
Q: javascript to read content between <a> tags

rav83Below is my html page: <html> <head> <title>My Cat website</title> </head> <script type="text/javascript" src="script12.js"></script> <body> <h1> <a href="http://www.petwebsite.com/cats.asp" id="message">My_first_cat_website</a> &...

I can't see any docs around this in mdn tho
 
7:09 AM
it's custom property by the OP
either intentional or more likely unintentional given the style of code
:D
the html5 data attributes are stored in .dataset
 
yeah... however it's working there jsbin.com/obeleh
yup I know about dataset, that's why I'm surprised
and it's working in the jsbin... I just don't get it
 
hmm wait
maybe labels have that property
I only checked div
 
:p
it's an anchor element there
 
no it doesn't have data either
nor labels
 
how come the jsbin works then?!
aaaaaaah
it's a textNode
 
7:13 AM
oh right textNodes contain their text in .data and also in .nodeValue
I just use nodeValue though
and nodeName
 
user986408
@FlorianMargaine so.. if i have a box or something and circles in it which i want to drag.. how can i access them when touchmoving?
 
I use textContent :/
had to use nodeName already
for event bubbling to check if it's the correct kind for example
but never nodeValue
 
user986408
ok thanks
 
@ThatWebNerd add an event on the box and check the target's nodeName
or the target's id, class, whatever...
 
@FlorianMargaine textContent is for elements
and for most robust .textContent you want to recursively walk all child text nodes and add their nodevalues/data together P
 
7:16 AM
yup, and I never had to retrieve the text from a textnode
 
or just use jQuery.text which does that :D
it's actually Sizzle.getText
aliased to jQuery.fn.text
 
yeah I was on it to see how it was doing james.padolsey.com/jquery/#v=1.6.2&fn=jQuery.text
 
and for setting text it uses appendChild create textnode
(empties the element before that)
 
0..4 bits wut on earth is that supposed to mean @Esailija ?
my first assumption was 0 to 4 bits but now i am wondering wtf ?
 
with this context, I donät know :P
 
7:18 AM
how can be something of variable length ? and with no note on its length
 
I thought you were done with the decoder a week ago
 
yeap :P
but i am wondering with bugs now -.-
so just re-checking if i am doing things right lols
 
@FlorianMargaine yes
 
so you haven't decoded a file yet
or tested it
 
i did , but mostly it buggers
 
7:20 AM
what does that mean
 
well it works but at few frames it curropts data
and makes noise .-.
i think thats because its making a wrong read in binary
 
you can make noise just by writing math.random() samples to a wav file P
:D
 
lol some frames are decoded perfect :-)
so i think there is some single value which is making a bloody mess -.-
@Esailija and yeah thats fun!
Math.abs(Math.sin(Math.random()* new Date().getTime())) ; <- try that :3
 
why does node make sync versions of some calls
 
dunno
 
7:24 AM
@Esailija lulz
 
maybe for those who are sync friendly ?
 
no-one is sync friendly
node does it for the lulz
 
yeah but you don't do non blocking with blocking
 
lol
 
your entire server is blocked while that file is being read with sync
 
7:25 AM
@Esailija i read somewhere Node.js's IO is non-blocking
but whatever you write on the top of it is blocking
 
not if you use the sync methods :P
 
yeah
 callback_of_some_non_block(){ // Like this ?
 /* Do another work*/
 /* call another non-blocking with another callback */
}
 
I guess maybe they are for some kind of fast testing or somethng
where it doesn't matter
 
@Esailija maybe
but will ya help with the 0..4 bits mystery?
 
I can't even find it in the docs
 
7:27 AM
ah let me get u the page number
 
@Esailija any idea how to improve this? because I don't see how recursively walking to get nodeValue is any better than textContent jsperf.com/textcontent-vs-recursive-nodevalue
 
Page 20
 
0
Q: Value of this different when event handlers are assigned in two different ways

Jinu J DSee my code http://jsfiddle.net/kxATT/3/ When the first box is clicked,it alerts 12.And for the second box it alers txt1...Obviously in both cases although i'm calling the same function,'this' refers to different objects..I've heared that, for input elements,the element's object itself is passe...

 
if (blocksplit_flag[gr][ch] == 1 && block_type[gr][ch] == 2)
{
for (cb=0; cb<switch_point_l[gr][ch]; cb++)
if (scfsi[cb]==0) || (gr==0)
scalefac[cb][gr][ch] 0..4 bits uimsbf
for (cb=switch_point_s[gr][ch]; cb<cblimit_short; cb++)
for (window=0; window<3; window++)
if (scfsi[cb]==0) || (gr==0)
scalefac[cb][window][gr][ch] 0..4 bits uimsbf
}
else
for (cb=0; cb<cblimit; cb++)
if (scfsi[cb]==0) || (gr==0)
scalefac[cb][gr][ch] 0..4 bits uimsbf
Huffmancodebits (part2_3_lengthpart2_
length) bits bslbf
 
not for performance but robustness
 
7:28 AM
why?
 
there you are
 
well, try textContent and innerText in ie and see if they are truly the same
 
they're not?
I thought they were.
 
there is usually white space differences and ie conjuring up carriage returns out of nowhere
 
ok :/
74 questions, 3 answers
 
7:32 AM
@Esailija sync methods are suppose to be used either at startup or in CLI tool
 
yea that makes sense
 
@Abhishek 0..4 can mean several things stackoverflow.com/questions/4211037/…
 
@FlorianMargaine its not for javascript bro
 
for what then? I know it means a range in python
you can do something like for 0..4:
 
its written in mp3 docs
 
7:37 AM
0..4 uimsbf means 4 bits unsigned integer with most significant bit first
 
kind of not makes any sense
why 0..4 ?
i mean they have did 4 bits 3 bits and stuff like that all over the docs ?
 
might be 5
 
why specifically 0..4 ?
 
seems everything else in that code is x..y as well
 
:P
thats why i got confused as hell (XD)
reading up it says min & max operators
so i did a nice lil Max value fetch of 4 bits :P but that is giving me pain lol
 
7:43 AM
it's not explained in the docs
 
perhaps i think now
so tme to read jsMad src code again!
 
8:01 AM
> According to the Wikileaks press release, millions of Java source files have been run through a Perl script that removes all 'final' keywords except those required for hacking around the 15-year-old Java language's "fucking embarrassing lack of closures."
lolmao
 
read the article very funny steve-yegge.blogspot.com/2010/07/… .D
 
lol
lol
@Esailija amusement
they shall do the same with javascript!! // oh wait we dont have anything really private do we ?
 
not that many actually use the "private" variables pattern
I saw it in some plugin once and rewrote on the spot
but not that often
 
8:25 AM
> Morris Baldwin, a part-time developer for the CDT's C++ parsing libraries says: "We have a policy of releasing entire Java packages in which every single class, interface and method is deprecated right out of the box, starting at version 1.0."
is that post a troll?
it seems so serious, yet it's so troll
or there is something I don't get
 
It's satire
in other words, troll
:P
 
so whut du o do ?
 
is this post an answer to some kind of discussion going around in the java world?
@Abhishek your SO rep sucks
 
it's just making fun of java
 
@FlorianMargaine i know :-(
 
8:31 AM
and its silly private variables :P
 
read his about me !!
@FlorianMargaine i am working + studying like 20 hours a day :( i cant adjust time to get to improve my rep
 
:p
doesn't really matter :)
WTH?!
 
if no values are entered, that is ok. if all values are entere, that is ok too
wtf
 
what the hell is wrong with this plugin
I am trying to use it but its doesn't shut when i click on close
as a confirmatino box
 
any code?
 
8:43 AM
<script type="text/javascript" src="/_layouts/1033/jquery.js"></script>
<script type="text/javascript" src="BlockUI.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("input[id$='btDelete']").click(function() {
         $.blockUI({ message: $('#divConfMessage') });
        });
    });
</script>
<div id="divConfMessage">
<asp:Label runat="server" Text="Are You Sure ?" CssClass="itemtext"></asp:Label>
<br />
<br />
<br />
<asp:Button ID="btnConfOK" Width="200px" Height="25px" CssClass="gradientbutton" OnClick="btDelete_Click" Runat="server" Text="Yes"></asp:Button>
<asp:Button ID="btnConfCancel" Width="200px" Height="25px" CssClass="gradientbutton" Runat="server" Text="No"></asp:Button>
<br />
<br />
<br />
</div>
 
$("input[id$='btDelete']") can be $('#btDelete')
but I don't see it
 
id$='btDelete' means all ids ending with btDelete
 
peace :D
guys i got a license test .. wish me luck lols
// can code anything , but ain't got a license to drive ! wow! .i am a pro geek!
 
    <asp:Button ID="btDelete" runat="server" CssClass="gradientbutton" OnClick="btDelete_Click"
    OnClientClick="this.disabled=true;this.value='Please Wait...';" Text="Delete" Width="200px"  />
its asp.net control
so need to be in Input
 
the ID is unique
so you can select it
what's the difference between onclick and onclientclick?
 
8:50 AM
@FlorianMargaine google it ?
 
it's in your code and you don't even know what it does?
 
@FlorianMargaine I know what does it do, "Onclick" triggers after "onclientclick"
and only if onclientclick returns true
 
why do you need two onclick handlers?
btw event handlers don't work on disabled elements
this'd explain why your code doesn't work
 
code is working
problem is with css
like i said
maybe not :|
sorry your right
 
you also have some $.unblockUI code somewhere right?
 
8:54 AM
yup
 
so? did the change have any effect?
 
yeah, it comes up with a dialog asking for yes or no, but when i click yes, nothing happens and yu told me the reason as its disabling all the controls so it wont gonna work like that
 
cool :)
 
any solution please or any other plugin :)
 
no solution will work, disable the state after it's done
like in your btDelete_Click function
 
9:00 AM
disable the state
 
disable the input*
like

$("#btDelete").click(function() {
    $.blockUI({ message: $('#divConfMessage') });
    $("#btDelete").prop("disabled", true);
});
 
let me try, ta
 
9:14 AM
@FlorianMargaine didn't made any difference at all :/
 
did you debug to see what was wrong?
 
the "yes" button doesn;t work and its value is "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$cphSubmit$btnConfOK", "", true, "", "", false, false))"
 
wow
that's why I don't even want to try asp.net
 
9:44 AM
hi
i need help with some jquery elements
0
Q: When I combine JQuery dialog box and JQuery tabs inside it my form doesn't work good

Akoshai am trying to combine JQuery dialog box with two JQuery tabs. I made list of tabs inside dialog added form to one of tabs. That form without tabs is doing fine. I can change what I want and save. But when I introduce tabs it stops to work. The button is still working even on Firefox select box i...

 
o/
 
@GNi33 \o
how are you doing?
 
fine, fine
and you?
 
fine too, thanks
I should refactor some code of mine
but I don't have time :|
 
i know the feeling
there's a lot of ugly stuff lying around, but i don't even have the time to have a closer look at it
too much other stuff to do
 
9:59 AM
yeah
there is a codebase that's soo full of bullshit, I can't even touch it
 

« first day (566 days earlier)      last day (4385 days later) »