« first day (1301 days earlier)      last day (3664 days later) » 

12:00 PM
Try this function I made:
function yoda(aString) {
    String.prototype.splice = function (idx, rem, s) {
        return (this.slice(0, idx) + s + this.slice(idx + Math.abs(rem)));
    };
    var stringSentences = "";
    var arraySentences = aString.split(/[.?!]/).filter(Boolean);
    var tableChar = [];
    [].forEach.call(aString, function (v, i) {
        if (/[.?!]/.test(v)) tableChar.push({"index": i, "char": v});
    });
    arraySentences.forEach(function (sentence) {
        sentence = sentence.split(" ").sort(function () {
 
Don't you have a bug to fix today, you ?
 
:(
 
@none_ 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.
 
yeah, you're right but I'm really stuck
I think I'm gonna give the project as it...
 
@SteamFire Sorting like that (Math.random() < .5) isn't actually random, btw. @rlemon did that for a while, and then we checked. The distribution is all wrong.
 
12:02 PM
@vegemite4me 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.
 
Well, it's random, just not uniformally random like you'd get with Fisher-Yates
 
which is hugely important for a yoda function
 
haha
 
(just bitching)
 
If you're gonna do something, do it right?
 
12:03 PM
@dystroy true
@Zirak okay so, give me a better logic ^^
 
@SteamFire He already did
 
> Well, it's random, just not uniformally random like you'd get with Fisher-Yates
 
Everybody use Fisher Yates when we want something not too biased
(and fast enough)
 
grr, I should've kept that illustration...I made a nice graph showing the bias of the two methods...
 
something like that:
function shuffle(array) {
  var copy = [], n = array.length, i;
  while (n) {
    i = Math.floor(Math.random() * array.length);
    if (i in array) {
      copy.push(array[i]);
      delete array[i];
      n--;
    }
  }
  return copy;
}
 
12:07 PM
There it is! liveweave.com/TsLUVB (hit the fullscreen button)
delete arr[i]?
i in array?
What madness is this?
It's also not actually random. That's the naive method. Fisher-Yates does better. Google it.
 
function shuffle(array) {
  var copy = [], n = array.length, i;
  while (n) {
    i = Math.floor(Math.random() * n--);
    copy.push(array.splice(i, 1)[0]);
  }
  return copy;
}
Hum better:
function shuffle(array) {
  var m = array.length, t, i;
  while (m) {
    i = Math.floor(Math.random() * m--);
    t = array[m];
    array[m] = array[i];
    array[i] = t;
  }
  return array;
}
 
That's Fisher-Yates
 
Oh it seem's like your's
function fisher (arr) {
    var ret = arr.slice(),
        i = ret.length,
        j, tmp;
    while (i) {
        j = Math.floor(Math.random() * i);
        i -= 1;
        tmp = ret[i];
        ret[i] = ret[j];
        ret[j] = tmp;
    }
    return ret;
}
but I prefer the other (more compact)
 
Morning you good to rlemon!
Hey I've updated my script:
function yoda(aString) {
    String.prototype.splice = function (idx, rem, s) {
        return (this.slice(0, idx) + s + this.slice(idx + Math.abs(rem)));
    };
    var stringSentences = "";
    var arraySentences = aString.split(/[.?!]/).filter(Boolean);
    var tableChar = [];
    [].forEach.call(aString, function (v, i) {
        if (/[.?!]/.test(v)) tableChar.push({"index": i, "char": v});
    });
    arraySentences.forEach(function (sentence) {
        sentence = shuffle(sentence.split(" ")).join(" ");
No more rlemrandom dumb random
 
12:17 PM
@NarendraPrajapati 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.
 
Fisher Yates is so sexy
 
any one help to implement twitter in phone gap
 
@NarendraPrajapati easy, build it...
 
@Loktar ^^^
:( I force myself to listen to the entire thing if it is posted on a friday
 
12:21 PM
I know
 
@Realist 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.
 
that's why I posted it
 
bastard :P
 
To good rlemon morning you! good rlemon morning you to!Morning you good to rlemon!Rlemon good you to morning! good rlemon you to morning!You morning rlemon to good!Morning rlemon good to you! morning to good rlemon you!Good morning rlemon to you!Good you morning to rlemon! rlemon good to you morning!
 
I can't help but laugh when I see the 12 year olds driving cars.
 
12:22 PM
hello fellers
you know what I am about to say
 
the game?
 
No
 
@SteamFire i am new for phone gap i have try to implement github.com/ObjetDirect/phonegap-plugins/blob/master/Android/… and github.com/EddyVerbruggen/… this example but not success can you give any link or sample example which can help
 
Victory !
 
Actually, defeat.
 
12:23 PM
fridaay
 
!!youjustlost
 
the true trick is not to tell the loser about the game, just.. make him think about it :p
 
@Loktar get'in down on friday!
Partying, Partying (Yeah!)
 
@rlemon And without safety belt!!!!
 
12:24 PM
@jAndy THE And what would the point of that be? GAME
 
vs7
hey guys
 
that's sexist.
 
its too easy just tell the loser.. everybody can do that. True victory and full satisfaction is when you just make him lose, without mention it directly
its a cruel cruel game
 
vs7
i have a doubt can we transfer some data over the tabs using JavaScript ?
 
@jAndy feel free to use the above video
@vs7 only with browser extensions
 
12:26 PM
@rlemon Hum, didn't saw any girls anytime here...
 
@vs7 Why do you say "I have a doubt" and not "I have a question"?
 
@SteamFire ummm... excuse me?
 
@vs7 localstorage
@CapricaSix You're a robot.
not a woman
 
@Zirak I see this a lot from a certain place in the world.
 
@SteamFire ...are you calling our bot a slave?
 
12:27 PM
no anytime...
 
(man I really need to clean up the room access panel...)
room mode changed to Gallery: anyone may enter, but only approved users can talk
 
hum
 
@SteamFire Any last words? Apologies, maybe?
 
What was that?
 
Caprica's not a woman?
 
vs7
12:29 PM
like i perform some task on Facebook, as when i open my Facebook my custom js code automatically inserted over Facebook , which track some event ...


Now the problem is how i can get that response ...
As Facebook disallow ajax,iframe and scripts ...
 
then how come looking at her bits turns me on
 
@Zirak Sorry, it's a nice kind gentle pretty female robot
 
vs7
@rlemon @Zirak @SteamFire
 
ping pong ping...
!!tell vs7 google localstorage
 
12:30 PM
here is your answer...
 
@AbhijeetAshokMuneshwar 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.
 
@SteamFire That's what I thought...
 
I love her
 
@Zirak @rlemon any option to let the bot google image search ? (linking images here directly)
 
@jAndy easily implementable...
 
12:33 PM
It was implemented in one fork of the bot. The results were horrible and annoying.
 
you can do the same as google
 
blasphemy
 
@jAndy you should install my snippets manager
 
I should retrieve a blowjob from Emma Watson
 
I'm first in that line
 
12:35 PM
the line is .. horribly pretty long
 
jesus. she would put me in the 90's club
 
its actually so long it might be long enough to go around the globe.. so we could both be first in line
very likely
 
She's a 7 at best
 
I'd give her a high 8 low 9
 
its above 10
 
12:37 PM
Olivia Wilde wins.
 
!!s/a high 8 low 9/the String.fromCharCode(68)/
 
@rlemon I'd give her the String.fromCharCode(68) (source)
 
easily a 9 if not 10!
 
@Zirak her cheek bone structure intimidates me
 
Her overpowering sexuality intimidates you.
 
12:38 PM
I don't like a woman with a more rugged jawline than me.
 
@rlemon if thats all thats stopping you.......
 
sure she is pretty. but I would take Emma over her any day
 
Yeah, that picture isn't so flattering
 
@Zirak aren't you into Alison Brie?
 
^ ohh god
 
12:40 PM
 
@FlorianMargaine Currently? I'll have to say no.
 
not even close to Emma
 
Alison Brie is a 15
 
no shot
 
12:41 PM
ok I just found out I indeed need to get rid of lemon now
 
I do count myself lucky, i have a nice slim, petite red head for a fiancee! (that said if she knew i was talking about watson and scoring her, i wouldbnt get any for a month!)
 
EMMA - IS - MINE
 
@Gigi2m02 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.
 
@jAndy on weekdays with a T in them, other wise she is mine!
 
12:41 PM
Now, Alison Brie is hot and all, but I count her as more "sexy" than "pretty"
 
alison brie FTW!
 
well, I'd take my wife anyday over the three of them.
 
how about all four?
 
I'm off to the bathroom
 
12:43 PM
@rlemon Parallel, or consequential?
 
@Zirak I'd take my fiancee too, but only because i actually stand a chance of speaking to her ever in my life
 
@Zirak they listen to you. your choice.
!!mute
 
So is this some alter-universe where I have mind control?
 
nope. drugs are a powerful thing.
room mode changed to Public: anyone may enter and talk
 
12:46 PM
If so, is this the only scenario in which I have mind control? What about after the act? Can I have Wilde make pancakes while Brie covers Emma with a thick layer of cream cheese?
 
I don't understand the one who adore stars... there are so many real people outside that we can meet...
 
What about lettuce? I want to start a lettuce farm. Can they be field hands?
What was the subject?
 
@Zirak yes, but they are not allowed clothing. and I get to watch.
 
@SteamFire true, but emma watson is attractive....and smart!
 
@SteamFire hrm, tried that. Walked up to someone, said "Hi! I'm Zirak! Want to be my friend?" and gave them a lollipop. That someone's mother wasn't so pleased, called me a "pedophile" or something.
 
12:49 PM
Hey guys one question. On my page i have an iframe which uses jquery. Do i have to load jquery again to use on my page, or is the one "inside page" the iframe enough?
 
@SteamFire I adore them as well. unfortunately there are not stills of them on the internet for me to oogle.
once I get my google glass however.
 
@BikerJohn load again
 
I'm interested in performances of integer square matrix creation, can you please run this jsperf ? jsperf.com/matrix-creation
 
@SteamFire I don't "adore" Alison Brie or Olivia Wilde. I enjoy their acting and their appearance.
 
@DrogoNevets thanks
 
12:50 PM
(results are interesting, especially as most perfs pages advise against using new Array(N))
 
However, I do adore David Gilmour. He's just the best.
 
@dystroy chrome/mobile/ff done
 
ok I have a possibly very stupid question
 
@BikerJohn You should test it out.
 
here goes
 
12:51 PM
@rlemon You can also stalk real girls in google and facebook... Niarkniarkniark
 
@rlemon thanks
 
I don't have FB
 
@vimes1984 Only if you're prepared to get a possibly very stupid answer.
 
and g+ is a bad stalker platform
 
@Zirak yeah i'm prepared!!
ok here goes I'm pulling a json array from a php file to send it over to Angular JS in my seperate JS file like so:

<script type="text/javascript">
//this is a global var not the best but we need to echo the php froma php file.
ARRAYFULL = <?php echo getusers(); ?>
</script>
using a global variable
 
12:52 PM
!!tell vimes1984 format
 
@SteamFire Command formatting does not exist. (note that /tell works on commands, it's not an echo.)
@SteamFire Command formating does not exist. (note that /tell works on commands, it's not an echo.)
@vimes1984 Format your code - hit Ctrl+K before sending and see the faq
 
sorry
 
..
 
@SteamFire NOOB!
 
@Zirak do you not have my one touch gallery userscript?
 
12:53 PM
@SteamFire Command sorry, does not exist. (note that /tell works on commands, it's not an echo.)
@SteamFire sorry, was a joke, you're my master
 
@rlemon At least twice a week.
 
is there any other way to get the php json into my extrnal JS file?
 
Gallery is as easy as one click from the main screen ^^
 
Oh yeah, cleaning the access page. On it.
 
12:54 PM
I just avoid that page completely.
moved all important tools to this window.
 
what is jquery getScaleFactor equivalent?
 
ok any anwsers? was my question that stupid?
 
im try to convert javascript to jquery
this one
panels.preview.scrollTop = (panels.preview.scrollHeight - panels.preview.clientHeight) * getScaleFactor(panels.preview);
 
@vimes1984 you can use xhr to get the data
or jsonp
after the page has loaded
 
^-- approved
 
12:58 PM
google returns nothing ...
 
otherwise what you are doing is okay I suppose
 
so good night evrone
 
@user3586251 None of this is related to jquery
 
@user3586251 why?
 
jquery documentation neither
 
12:58 PM
why would you want to slow down your code?
 
getScaleFactor is a function you made
 
why would you want to code at all
 
and add a dependency ?
@BartekBanachewicz code webpage, get bitches?
 
there is already jquery dependency loaded ...
 
@rlemon does that work for you?
 
12:59 PM
and im want to convert to jquery for file size
3
 
@user3586251 I am proactively laughing at you right now.
 
@Zirak am see xD
var getScaleFactor = function (panel) {
        if (panel.scrollHeight <= panel.clientHeight) {
            return 1;
        }
        return panel.scrollTop / (panel.scrollHeight - panel.clientHeight);
    };
 

« first day (1301 days earlier)      last day (3664 days later) »