« first day (1068 days earlier)      last day (3883 days later) » 

12:07 AM
@rlemon that 2nd tree is pretty cool
 
12:26 AM
@rlemon quick question about autocomplete, I finally got it working, but how can I do it so people can have multiple users?
like they type in one name, select it, its added, then type in another, repeat
		jQuery(document).ready(function(){
			$('#message_to').autocomplete({source:'../wp-content/plugins/messaging/userlookup.php', minLength:2});
		});
 
@BrandonGelfand you can form.reset()
 
even after they typed in someone else name and they want to add another?
wouldn't that remove the other person to?
@SomeKittens
 
Uh, store the data somewhere else?
 
no
I am using query autocomplete and they are sending a message to friends
the autocomplete searches friends and outputs them, then when they add a comma they should be able to add other friends
 
oh. then don't use autocomplete, it won't work for this.
 
12:32 AM
has to
They don't always know their friends username exact spelling
 
I mean autocomplete is fine, but don't use the jQuery plugin
it's not designed for this purpose.
 
No
I am not using a plugin, but I already figured it out
just noticed this in the api docs jqueryui.com/autocomplete/#multiple
@SomeKittens annnnnndddd done
<script>
  $(function() {
    function split( val ) {
      return val.split( /,\s*/ );
    }
    function extractLast( term ) {
      return split( term ).pop();
    }

    $( "#message_to" )
      // don't navigate away from the field on tab when selecting an item
      .bind( "keydown", function( event ) {
        if ( event.keyCode === $.ui.keyCode.TAB &&
            $( this ).data( "ui-autocomplete" ).menu.active ) {
          event.preventDefault();
        }
      })
      .autocomplete({
 
I am giggling like a little girl right now, lol
This is what I love about coding when I am able to make something like this happen
 
@ChrisJohnson 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.
 
12:44 AM
For the love of the flying spaghetti monster of whatever you believe in.. don't put goddamn whitespaces after ( or before )
 
@ThiefMaster What the heck are you babbling about?
 
function split( val ), $( this ), extractLast( request.term )
function split(val), $(this), extractLast(request.term)
 
Code styling is dependent on taste... or style guidelines. Depending on the project :P
 
JS is pretty much the only language where people seem to think the former is pretty (probably because jQuery uses this style). it's ugly.
@nderscore: Yeah I know, code styles are like assholes - everyone has one and few people like someone else's.
 
@ThiefMaster The assholes your referring to are the personality type right?...
 
12:48 AM
hey guys, i have got a problem. i cant be able to post a new question because some arseholes have put my topic on hold after when i found the solution.
 
If I'm putting something messy inside my parens, I'll occasionally pad it with spaces to make it easier for me to read (my dirty little secret)
 
Can anyone suggest me what I would need to do to allow me to post a new question?
 
@BrandonGelfand: Nope. :)
@nderscore: If it actually improves readability sure. But in most cases it's actually counterproductive...
 
@ChrisJohnson be happy you can still post question, I can't anymore because when I was a noob and still learning, apparently my questions were considered stupid. Still am a noob though, still am learning, I just don't ask stupid questions anymore.
lol
 
Can anyone help?
 
12:50 AM
Well whats your question?
Learn to just ask and not to ask to ask
 
You guys are question-banned. Did you read the link shown next to the question ban message?
 
It irritates people.
 
(TL;DR: Improve some of your negative-score questions)
 
@BrandonGelfand I want to make a new question about my code problem with jquery.
 
Well you can't, your banned from being able to
So ask your question here, its your only option
 
12:52 AM
@BrandonGelfand But now I cant make another new question because some idiots have put my off-topic on hold.
 
@ThiefMaster Yeah, I tried to but it wouldn't let me.
 
@ChrisJohnson: Your problem seems to be the very high amount of deleted questions. Consider undeleting some of them, maybe even posting answers if you solved the issues on your own
@BrandonGelfand: Editing works even while questionbanned; you just cannot post new questions.
 
@ThiefMaster I have solved the problem. Now I want to post a new question, can you help?
 
So ummm, how do I edit a question I don't need help with and don't have the answer?
Most of it was Objective-C which I tried for a bit but found web dev more fun
 
@ChrisJohnson: Unfortunately there's nothing I can do except suggesting you a way to lift the question ban which I already did.
 
12:54 AM
@ThiefMaster can you please tell me what I would need to do to lift the ban?
 
2 mins ago, by ThiefMaster
@ChrisJohnson: Your problem seems to be the very high amount of deleted questions. Consider undeleting some of them, maybe even posting answers if you solved the issues on your own
 
@ThiefMaster the problem is though, is the question is closed that made me get the ban
 
Didn't he just tell you? lol
 
I'm not sure if you can see your self-deleted questions in that list though... if not i can put the links to them in a pastebin and post you the link in here if you want that
 
@ThiefMaster can you give me a badge labeled Moron?
 
12:57 AM
@user2471501 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.
 
lol no, not even developers could
 
Ahhh man :/
At least I can be honest with people :P
 
@ThiefMaster I have marked the two questions as the answer which helped me to solved the problem.
0
Q: How to check on the if statement for the contain text on PHP dom?

Chris JohnsonI'm working on my website to extract the data. I'm stored the website link in MYSQL database where I can output the data in PHP and I'm using PHP DOM to extract the data. I have extracted the text which I got "CBS This Morning: Saturday NEW" using this code: <?php define('DB_HOST', 'localhost'...

0
Q: How to fix the warning file_get_contents and fatal error call?

Chris JohnsonI'm working on mysql database to store the data including the website links. I'm created the functions to make things much easier for me especially using db_connect and myfunction as a function to make things get separate. Here's the code: <?php function db_connect() { define('DB_HOST', 'loc...

 
Please do not use mod flags to mention something is solved...
 
@MatthewBobrowski 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.
 
1:00 AM
@ChrisJohnson: Actually, answering some questions to get more rep might also get you out of the question ban. I do not know this for sure though since not even mods know the exact details of the algorithm responsible for questionbanning people
 
@ThiefMaster is it possible if i could ask the mod to lift the ban as i had marked the questions as the answer?
 
I am a mod. Unlike a suspension question bans are a fully automated thing. We cannot do anything to lift question bans.
 
Hi all,
I want to build a online shop where the customer can add components to a base product which then updates the base product visaually so they can see what it will look like. Anyone can help?
 
Anyone here use twitter?
 
@ThiefMaster then who does know the algorithm?
 
@BrandonGelfand: Developers. and obviously they do not disclose details.
 
@TheGuyWhoCouldn'tTalkToTheGirl What does that have to do with JS and why do you want to know?
 
@ThiefMaster what I can do to lift the ban?
 
@ThiefMaster I think its a bit dumb though, when a stupid kid makes a few mistake he gets banned for life
Sounds perfectly logical
 
Or does anyone know the appropriate technology they would use for my problem?
 
1:03 AM
Its one thing for spam, its another thing for a few stupid answers or questions
 
If you browse through twitter, you will see that the page change is similar to ajax. So do they use ajax for everything?
 
@MatthewBobrowski I'd start by learning web development.
 
@ThiefMaster how long will i have to wait until the ban get lift?
 
@TheGuyWhoCouldn'tTalkToTheGirl yeah
 
You guys need to see it from a different point of view. We get A LOT of users who think SO is a place to dump crappy questions which could be easily answered using Google. Without question banning SO would be flooded with crap; probably scaring good users away.
 
1:04 AM
@BrandonGelfand It's not a lifetime ban.
 
@SomeKittens: It is if he doesn't do anything
 
@SomeKittens Yeah it is..
 
The ban is never lifted unless you take action! As I said, the high number of deleted questions you have is the most likely cause of the ban.
 
@ThiefMaster Heck, I think the current system leans a little too far towards the 'too many bad questions' side of things
@BrandonGelfand It's a ban-until-you-fix-the-problem
The new "On Hold" stuff is pretty nice though
 
@ThiefMaster I can't fix closed questions though, and why would I add back a stupid question?
 
1:05 AM
@ThiefMaster I haven't deleted questions, so if i did then shall i undeleted them to lift the ban?
 
Isn't that asking to get even more downvotes
 
@BrandonGelfand I haven't answer people a stupid question like you did.
 
@ChrisJohnson: You have a LOT of deleted ones. You probably cannot see them. Some of them looked pretty good though (containing code, an explanation, etc.)
 
I sound like a bumbling idiot, so of course I deleted it
Why would it be logical to add it back and take up space?
 
Looking at the timestamps you probably asked on SO very quickly and then figured it out on your own, irght?
True, it is not the perfect solution. But how else could we make people prove they are willing to improve questions and not continue to post crap. Feel free to suggest it on Meta Stack Overflow if you have a good idea. :)
 
1:07 AM
@ThiefMaster how about if I should contact the support if it would help??
 
@ThiefMaster So what do I do then?
Just not be able to ask questions/
I need to do homework, I will talk to you guys later
 
@ThiefMaster should I contact the support that I found the answers as my question was a good explation?
 
@ChrisJohnson: I pinged someone to look into it. I can't guarantee any positive result but feel free to ask again tomorrow.
 
@ThiefMaster thanks, I hope he will be able to lift the ban. And I hope it won't happens again.
 
That depends on your future questions ;)
 
1:15 AM
@ThiefMaster Please look at my question: stackoverflow.com/questions/18804568/…
@ThiefMaster I feel that those idiots should have been banned by ruined for other people on this site who are deperately looking for an answer.
 
@nderscore Then why not make the messy something cleaner, or extract it from the statement?
//instead of
something.func( aVeryComplicatedThing )
//maybe
var descriptiveName = aVeryComplicatedThing;
something.func(descriptiveName);
 
@ThiefMaster My question was not a messy when I gave a good explation, what pissed me off is those idiots are coming on here to ruined for other people.
 
@ChrisJohnson With that comment I'm really tempted to delete my message in the mod channel. The question got a proper answer and was not downvoted to oblivion. It was just closed because it IS a "debug my code plz" question which DOES show some lack of debugging skill.
Anyway, I'm out for tonight. 3 in the morning is a good time to sleep.
 
Bye bestie
 
Who the hell made you an owner? Boobie bonus? :P
 
1:19 AM
@ThiefMaster Oh ok I understand what you said it doesn't cause an offensive. Anyway have a good night sleep im going to bed soon anyway.
 
More like regular bonus
 
@Zirak did
 
The boobs were a plus.
 
@ChrisJohnson Ok. Just FYI, calling active users of this site idiots just because they closed your question is usually a good way to piss people off.
 
@ThiefMaster I didn't piss people off when I can't find the solution, you know nothing are perfect in this world when we can't find the solution, can't we?
@ThiefMaster I find this site really good which it bit like a community forum, but 100 times better. I can get the quick answer within few mins where you have to wait within 24 hours on most forums.
 
1:25 AM
True. But that's because of the high amount of users here. Imagine everyone posting 5 questions a day with simple "here's my code and this is crazy, fix it now since i am lazy" style questions....
Anyway, now I'm really out :P
 
yeah i know what you mean, but i don't posting 5 questions in a day lol
 
@Zirak I guess that's an option too :P
 
are there anyone on here who are good with jquery?
 
I'd say it's likely
 
blegh
 
1:34 AM
@nderscore are you good with jquery?
 
Only when it's a full moon
 
It's almost full
 
otherwise, I'm stuck using prototype/dojo/mootools/yui only
 
close enough for me
 
2:00 AM
@Zhegan hi
 
2:18 AM
No version of IE supports SSE?
I generally use redis and websockets, but just curious why SSE is not used often. And I read on wikipedia that no version of IE supports SSE
 
@Meistro 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.
@mechanicalfish 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.
 
@JohnMerlino What's SSE?
I can't find anything that's not some company.
 
Server-sent events is a technology for where a browser gets automatic updates from a server via HTTP connection. The Server-Sent Events EventSource API is standardized as part of HTML5 by the W3C. History The WHATWG Web Applications 1.0 proposal included a mechanism to push content to the client. On September 1, 2006, the Opera web browser implemented this new experimental technology in a feature called "Server-Sent Events". Overview Server-Sent Events (SSE) is a standard describing how servers can initiate data transmission towards clients once an initial client connection has been estab...
apparently this?
 
Oh, EventSource stuff?
Well, generally, when you want data from the server, you also want to send data back. Websockets are bi-directional; event-source are like reverse requests, only one way.
Having said that, I think SSE are just over http, so your server doesn't need special websocket stuff.
There could be other differences I'm not aware of, but...it's bi-directional vs. one-directional. And I may be just talking to myself.
starts singing Bad Company
 
2:38 AM
so it streams events over HTTP?
 
I don't know how the implementation works, but it seems to be over HTTP.
 
I've heard of some hack with GIF's, where you're able to to stream in IE, by never finishing the GIF download
 
Yes it's over HTTP whereas websockets use its own protocol. Websockets is good for gaming and chats but over the top if you just want to publish data to client, and that's what intrigues me about SSE. There are a number of techniques though to make it compatible with IE, I came across.
I was using a library that used a combination of node.js (so I had a node.js instance running as a process on my ubuntu server) and websockets. I had to run it in tmux (or on start), and some other configuration. Really all I needed was SSE. I think SSEE has its uses.
 
@JohnMerlino I guess this would be over the top too
That seems to be Java though, but there's ben ports to PHP and some other language. Maybe JavaScript too
Can someone explain to me the point of GIF sockets if it's only for Java?
 
Whoever wrote it had fun.
 
2:50 AM
Oh, that makes sense
 
3:14 AM
@David-CodingSerf 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.
 
hi guys
can you explain this "Don’t Yield to Browser Whims
Instead of relying on flaky browser behavior and hoping it works across the board...
"
 
The second half of the sentence is missing
 
it is that
 
There's a leek in the boat!
 
@Zirak But So Be It
@Zirak im a chinese ,i wanna translate this to chinese, and forgive my poor english
so, could you help me ?
i just dont understand the recondite english
can you explain it as a understandable english?
plz
 
3:25 AM
@David-CodingSerf No, because the second half of the sentence is missing.
"Instead" works on two things: "Instead of A, B". We were only given A
Maybe we can take the title, but it doesn't explain much, because it again describes A.
 
hmm...
Don’t Yield to Browser Whims , this is the title
Instead of relying on flaky browser behavior and hoping it works across the board... this is the first sentence of the paragraph
 
Judging from the context, flaky browser behavior would mean that it is inconsistent across more than one browser engine
 
@Retsam I'm sorry it took longer than expected to come back to the chat room. So, what were you about to suggest for replacing my SVG images with canvas?
 
To flake out of something, means that you said you were going to do it, but you didn't
 
thx @Shea
 
3:35 AM
You're welcome
 
and "Don’t Yield to Browser Whims" what's the meaning
 
@Ariane I have used this, which seems to work really well, but I have not used enough to swear by it.
 
i translate it like "dont be afraid of browsers' difference"
 
I think it's more like "don't succumb to X browser doing things differently if it's not the norm".
@Shea Oh I'm already using it. It traces my SVGs pretty well. Problem is that after I append my canvas to the document, I wanted to place it where the SVG was, and the only way I could think of was to absolutely position my canvas where the SVG was, which is horribly dirty code.
 
@David-CodingSerf Well, it's like Zirak said, half of the sentence is missing, that other half is really important
@Ariane Are you using img or object to embed the SVG?
 
3:40 AM
<img>
 
Why not just insert the canvas in the same parent as the SVG object, and put display:none on the SVG?
 
thx guys
 
Unless I'm misunderstanding something
 
@David-CodingSerf Not quite. To yield is to give in. The sentence is saying that even if a browser is doing something non-standard and stupid, you shouldn't accept that, you shouldn't follow it.
What should be done instead is the second part that is missing.
 
I like what Zirak just said, it's a makes a lot more sense than what I was saying
 
3:42 AM
@Shea Because well, one I'm not sure all SVGs are gonna have a parent that'll allow me to just throw the canvas in it, and two, most importantly, I have no idea how to insert the canvas otherwise than how it's done in the code I found then customized. See here: pastebin.com/UBNBXQ74
You see, I was only taught a tiny bit of Javascript, and I was taught it utterly wrong, and to top it off it's been a while since I've done any significant amount of JS.
 
@zirak
thx a lot
 
Enjoy
 
@Ariane Well hopefully this is not too confusing
I guess it doesn't really matter if it comes before or after the SVG, as long as the SVG gets hidden, but now that I think about it, putting it before the SVG would be a lot easier
 
@Shea Oh. insertBefore. Was too easy. xD
Bleh, both do the same to me. In my code I've already selected the SVG and all relevant properties anyway.
By the way, does there happen to be a way to tell my canvas to take every single style property of my SVG instead of targeting every property individually?
 
4:01 AM
Well, I suppose the easiest way would be to use getAttribute('style') on the img, and setAttribute('style', imgStyle) on the canvas. Then do the same for for the class. But I don't think this would account for styles set dynamically via element.style.
That's pretty explicit though
 
 
xkcd, what happened to you...
 
Out of ideas
I went from "LOL" to "heh." pretty quick
 
Time to go weekly instead of 3x week.
 
I miss the ones like this:
 
4:10 AM
@Shea getAttribute only takes inline style, not the style from the style sheet, right?
 
@phenomnomnominal I hate the knapsack problem.
I rammed into it so many times....at full speed and head on.
"Oh cool this algorithm should work.
*15 minutes later*
Fuck."
 
Pretty much
 
P=NP should be true just for the sweet, sweet revenge.
THOUGHT YOU WERE A TOUGH GUY!? EAT SHIT.
 
4:17 AM
@Ariane That's right, but that's why you need to do the class too. It wouldn't account of CSS set explicitly for IMG tags
 
@Shea Not to mention none of this is the computed style... Oh hey. .getComputedStyle... That thing, can it be iterated over for all of the CSS rules of an element?
 
@phenomnomnominal Last time I was here you called me sexist, and I lost sleep over that. lol. I was being pretty douchey though, so I wanted to say sorry, even though everyone probably has forgotten about it.
@Ariane That would be a good start, but you might want to check up on cross browser compatibility
 
Or, actually, nah, that's overkill and it'll put tons of useless inline style in the input code. I should just set the width and height and then see how I can fix it up with the style sheet.
And uhm, that canvg thing is exclusively for Android <3, which does support getComputedStyle.
For IE I'll need another workaround. I'm debating whether I'll try to find a way for PHP itself to decode the SVG and put a PNG instead, if it's possible, or whether to use that Flash thing.
 
@Ariane Not sure about it being exclusively for Android. I've used it in Chrome and Firefox on Windows
 
@Shea good man. Takes a big person to admit they were in the wrong and apologise. I probably over-reacted by the level to which I said you were a douche, so I'm sorry too.
 
4:23 AM
@Shea Why? Those browsers support SVG completely. I should note that I'm not doing anything fancy with my SVG images. I just want vector images that don't get pixelated when zoomed and resized.
 
@phenomnomnominal Yeah, when I really thought about it, I realize the person I was arguing with must've been having a bad day. So I should've considered that first. And thanks
 
(Hug! Hug! Hug! Hug! :D)
 
@Ariane Ooooh, I see what you mean
 
0
Q: IE8 incompatible

stephanieI have a rather annoying problem with my portfolio website. URL: http://sisforstephanie.com/ I used jquery and javascript to make elements open and close and it works pretty smoothly in all browsers so far except for IE8. I can see the main page (though some of my CSS formatting doesn't work),...

 
Seriously, I'm surprised so few people use basic SVGs. They're just as easy to use as normal images and you don't have to deal with size, the only problem being old browsers. Instead each time I've looked into ways to fix my SVGs people were always doing fancy stuff with them like constructing or changing them with JS or animating them.
Just freaking displaying SVGs everywhere is like the simplest thing to do but looks like no one ever bothered to make an all-in-one solution.
 
4:29 AM
I really like SVGs a lot too. I just haven't had much experience with finding out just how basic they are in smartphones.
 
Ehm, well, simple: they don't work on the old Android browser, and since the main method for rendering SVGs on incompatible browsers is SVG Web which uses Flash, and Flash isn't available on mobile devices, you gotta find something else. Luckily canvas works on old Android. But it doesn't on old IE, which will then need its own solution.
Thing I don't like with the Flash renderer is that even though I've never used it, I'm pretty sure it's gonna output some awful HTML. Thing is, I'm working on my Web portfolio, and the portfolio's code itself is gonna be a criteria for employers. :p
 
But then again, how resizable should they really be on devices with a standard resolution?
 
@Ariane No thanks, I've already eaten.
 
@Shea Well, I guess that depends on what you're trying to do, too.
 
@Shea Devices have a standard resolution? Actually I think my phone is 1920 x 1080 like my PC, with very high pixel density.
@Zirak Hah?
Anyway, a Web developer should never be saying what the user -should- want to do or what -should- be available/resizable/etc, IMO. It,s that sort of thinking that leads to the stupidity of portrait-only interfaces.
 
4:46 AM
guys can you please check this
<img src="'+com_img_array[index]+'" >
 
@Ariane You're going to find that I often think out loud here, as I complete a thought.
 
@Shea I see. Well anyway, I'll be going to bed. Thanks for your advice. Here's some advice in exchange: You should stop pinging yourself. It,s beyond confusing. I was certain it was someone else who had replied to you, because, well, people don't usually ping themselves.
 
Lol But how ever would you know I was just talking/thinking to myself? Anyways, you're welcome and good night.
 
I like AS3's trace truncate feature
Do you think One Direction is copy of Backstreet boys?
 
@Strings 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.
 
5:18 AM
var imagePath = "http://thetutorialhub.com/main/images/baby.jpg"
"<img src="+imagePath +">";
can anybody tell me is it valid ?
 
"\"" is how you do a double quote inside double quotes, likewise '\'' for single quotes
If you want to do a backslash it's "\\"
 
file:///mnt/sdcard/folder/1379480512911.jpg
this is my real image path form android phone
@Shea if i pass directly in <img src="file:///mnt/sdcard/folder/1379480512911.jpg" then its working but if i save in var and pass that var as above then its not working
 
@JainulKhan 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.
 
@JanDvorak @CapricaSix Hi How are you ?
 
@chintankhetiya You're missing the quotes. You want this: "<img src=\""+imagePath +"\">";
 
5:32 AM
@chintankhetiya:hi
@chintankhetiya:Can you help me in resolving the issue?
-1
Q: How to display Colorbox popup in "jQuery ajax() Method" in following scenario?

JSLoverI'm using PHP, Smarty, jQuery, AJAX, Colorbox - a jQuery lightbox, etc. for my website. There is some old code done using jQuery AJAX method to display the message in popup using standard jQuery library functions. Now I want to replace that typical popup using Colorbox popup. In short Iwant to ch...

 
Lets say I have an array [[1,20],[2,10],[4,5]]. How can i check the difference of the elements like 20-1,10-2,5-4
using javascript
 
@nderscore its too much confusing with brackets , let me try
@Gajini Is that two different array ?
 
0
Q: Screen X,Y to Isometric Grid X,Y

Danie ClawsonI've searched and read for hours, but I can't wrap my head around this. Maybe it's because of the way I'm doing my grid coordinates?? I need to determine which tile the mouse is hovering on, in an isometric view. Here is my jsFiddle.

 
no in a two dimensional array @chintankhetiya
 
i know if you can use two different array , otherwise we have to think
 
5:39 AM
@chintankhetiya think
 
[[1,20],[2,10],[4,5]].forEach(function(a){
console.log(Math.abs(a[0]-a[1]));
});
Math.abs will give you the absolute value
 
@Shea i am using two for loops to get those values
 
@Gajini yeah then you can write this code in second loop
Its perfect
 
getting NAN @chintankhetiya
 
That means you're trying to subtract something that's NaN (not a number)
 
5:43 AM
for(var i=0;i<res.length;i++)
{
for(var j=0;j<res.length;j++)
{console.log (Math.abs(res[0]-res[1]));
}

}
@Shea this is what i did @chintankhetiya
 
for (var a=0; a < res.length; ++a)
for (var b=1, c=res[a][0]; b < res[a].length; ++b)
c = Math.abs(c - res[a][b]);
Well, that might not be entire accurate
 
[just saying]there is a javascript chat room on SO. they will explain you clearly. :) — Mr_Green 15 secs ago
 
@Shea yes but how to know the from which two values the result is given ?
 
What exactly do you mean?
 
for
[[1,20],[2,10],[4,5]] i am getting c value as 1
which is nothing but 5-4 =1
how can i get that [4,5]
@Shea
 
5:58 AM
Well, c is going to be changed 3 times.
 
yes how can i get that resulting array elements ?
 

« first day (1068 days earlier)      last day (3883 days later) »