« first day (900 days earlier)      last day (4047 days later) » 

6:00 PM
in this case you would need to use the new RegExp invocation
 
i dont know much regex, goes way over the head
:S
 
var replaceString1 = new RegExp(lsResult + allowedChars, "g");
assuming the regex is correct
didn't look too hard at what the vars are containing
 
Should I use named function expressions? e.g. $(function init () { ... });
 
Of course not.
 
/[A-Za-z]/g is the same as new RegExp("[A-Za-z]", "g");
 
6:03 PM
ohk
 
@rlemon I don't know if he has to deal with the whole regex as a string... but if he does, he could use this:RegExp.apply(this, /^\/(.*)\/([gim]{0,3})$/i.exec("/" + lsResult + allowedChars + "/g").slice(1));
 
@KendallFrey Was that for me? :-)
 
@rlemon -the change hasnt changed anything in the functionality m working on
:S
according to me my issue lies in formatIncludes
it should have provided me --
 
@ŠimeVidas That would be my bot :)
 
@KendallFrey Huh? Your bot?
You were talking to your bot?
 
6:07 PM
var r = "/" + "(\D)" + "/g";
console.log("1234 abcd".match(r));
null

console.log("1234 abcd".match(/(\D)/g));
[" ", "a", "b", "c", "d"]
@Varun
see, that regex is not valid the way you are building it
 
@ŠimeVidas No, that was my bot.
 
ohk
can u pls refer me some good and easy tutorial on regex
 
there is none
regex isn't good or easy
 
6:09 PM
!!/rot13 'banana hammock'
 
@Shmiddty Command rot13 does not exist.
 
@Varun I only saw the last message, but based on that, when you need to dynamically build a regexp, you need to escape the escapes: '\D' gives you D; '\\D' gives you '\D'
 
both are about the best you will get
 
@rlemon Liar
 
@KendallFrey Oh thats super. Let's just bots chat with our identities.
Nothing can go wrong.
 
6:10 PM
I don't know if you recall all the other bots doing the same at one point?
 
seriously?
 
@Shmiddty I don't see a rot13 converter being useful for the bot
probably just get annoying
 
@Zirak or he could just use new RegExp()
 
@rlemon That's the source of the problem? He wouldn't need a double-escape if he used a regexp literal.
 
6:12 PM
but did you see how he's building the literal?
 
(lazy as fuck)
0
Q: How does HashMap determine where to put things?

dalawhHow does the add method in HashMap determine where a key goes in a HashMap? Like, if I was trying to put "S","T","A","C","K" into the HashMap of size 10, how does it determine where each letter goes?

 
he would need to double escape that as well
 
@Zirak What is that owl doing to the other owl? Did we just walk in on something naughty?
 
goood morning!
 
@Varun just be thankful you don't have to code in REBEL
 
6:13 PM
any one here to help me?
 
@rlemon :)
 
@relmon thank you.
 
m59
@SandeepPattanaik ask your question
 
:/
 
I want to use bellow code for 3 times.
 
6:14 PM
I'm being thanked? I better not get the question now
format or I bin it
srsly.
1 message moved to Trash can
window.document.onkeydown = function (e) {
    if (!e) {
        e = event;
    }
    if (e.keyCode == 27) {
        lightbox_close();
    }
}

function lightbox_open() {
    window.scrollTo(0, 0);
    document.getElementById('light').style.display = 'block';
    document.getElementById('fade').style.display = 'block';
}

function lightbox_close() {
    document.getElementById('light').style.display = 'none';
    document.getElementById('fade').style.display = 'none';
}
PPL - Y U NO LRN HOW USE CHAT?!
 
i am using SO chat for the second time only
 
nope, I am using first time
 
the rules are not official but a good idea
the top will help with formatting and features
 
@rlemon wait i will give you the jsfiddle link
 
m59
I have no idea by what you mean "use it 3 times"
 
6:17 PM
Need to make the bot auto-trash unformatted code blobs and repost them with fixed font
 
why window.document in one place but document.getElementById in another without window.??
 
@rlemon wait, i will give u the link
 
@rlemon - can u pls help me out
on the fiddle i gave?
 
var light = document.getElementById('light'),
    dark = document.getElementById('fade');
document.addEventListener('keydown', function (e) {
    if (e.which === 27) {
        lightbox_toggle();
    }
}, false);

function lightbox_open() {
    window.scrollTo(0, 0);
    lightbox_toggle();
}

function lightbox_toggle() {
    light.hidden = dark.hidden = !light.hidden;
}
@Varun nope, I gave you some good hints and Zirak as well.
too much code for me to identify and correct issues and I hate reading plugins
but mostly because I hate reading plugins
 
@rlemon bro, look at my fiddle
 
6:24 PM
no issues
 
when you clicked the linked ffffffff, it open popup
 
and what is the issue?
 
thanks for the help any ways
 
@SandeepPattanaik works fine here
 
but all popup window contains same value
I gave different value to different popup, but it showing only first value @rlemon
 
6:25 PM
because they all have the same ID
:(
seriously dude?!
you have multiple elements with the same ID. how did you expect this to work
 
@SandeepPattanaik you are opening the same popup
every time
 
welcome to the wonderful world of javascript "programmers"
 
wait, nevermind
 
i changed the id in html
 
dude..... you need to open the correct ID
 
6:27 PM
pass the id along
 
and your mix of inline and external JS makes me sick :( and will be a nightmare for you to maintain
 
pls help me bro
 
when you are clicking the link
 
how can I help you here aside from re-teaching you javascript :P
sorry if that sounds mean... but it's true
 
re?
 
6:28 PM
lolz @ david
 
@relmon pls
 
ok, i'll help but you will have to do work yourself
 
gud night guys @rlemon thanks for the help buddy
 
@relmon yeah
 
is that kittens person online?
i want to know if he had any more luck with his wabsockets
 
6:29 PM
                      <a href="javascript:;" class="btn green button-submit">
                             Submit <i class="m-icon-swapright m-icon-white"></i>
                             </a>        i want to call form action after pressing this button ..how could i achieve this?
 
@rlemon proceed bro
 
Had luck-ish.
@david yarp, lurking.
 
Im getting left hand side expression on prefix operation on this:

navItems = document.getElementsByTagName('a');

for(var i =0; i < navItems.length;++1){}

Any ideas?
 
He did
@SomeKittens ^
 
I'm basically using long-polling
 
6:30 PM
@Batman ++1 (unlike ++i) is invalid and nonsensical
 
^
 
v.v socket.io longpolling or your own?
 
Hey, @relmon!
 
@JanDvorak oh crap
thanks
 
@david Socket.io (Neither my server nor Heroku supports websockets proper)
 
6:31 PM
Sorry, my internet is being crap, so my messages probably got delivered late and were out of context
 
i don't like socket.io... it seemed slow and overly complex and bloated when i tried it
 
my message got lost and no reply..:(
 
@david It works for me, which is enough. I like the way it falls back on other methods.
 
@relmon where are you bro
 
Yeah, @relmon! Why won't you reply to your pings?
 
6:34 PM
!!s/rel/rle/
 
@SomeKittens Yeah, @rlemon! Why won't you reply to your pings? (source)
 
there
also, i'm awesome
 
relmon sounds like a sort of monster i'd keep in my pocket
 
also, Amaan is smarter than I am bug him
 
6:35 PM
Hahahaha, you're an ass
 
@david I call my pocket monster pedro
 
@rlemon that's way more information than i ever needed
 
@relmon pls fix my bug bro
5
 
@SandeepPattanaik no
now you're spamming
 
hello
 
6:37 PM
@rlemon how can i do spam. can u explain
 
@rlemon got it all updated with bootstrap, will push to Heroku when I get out of class (College blocks all ports other than 80 on wifi)
Code's up on GitHub
 
I have a small question
 
@simonTifo I don't believe that you do.
 
@simonTifo did you read the rules for this doom?
 
@SomeKittens Demo?
@simonTifo No you don't.
 
6:41 PM
@ShotgunNinja Can't push to Heroku, ITS is blocking port on wifi. Will let you know when I get back to my room.
 
Awesome.
Another chatroom to fill with spam and cat gifs!
 
@ShotgunNinja It's more a learning experiment for me, instead of something useful. There's actually a surprising lack of good chat on node tutorials out there.
 
how do i run it @SomeKittens?
 
@david node app.js
should work
You'll need to install the dependencies
 
with npm install?
here we go
 
6:47 PM
yah, they're all in package.json
 
SomeKittens chat: ram.zk.io:8888
 
woohoo!
 
nope it's broken
 
RAGE
What's broken?
 
6:48 PM
Yeah, still trying to figure out how to not hardcode that.
Off, back later.
 
@MikeBoutin if you want to mirror things, just position half of them relative to left and half of them relative to right... left:7%; is mirrored by right:7%;
 
okay it works now
 
custom function (probably not the best but it works)

function pourcentAtCenter(obj){
var objPos = obj.position();
percentLeft = ((objPos.left+obj.width()/2) / thisWidth) * 100;

if(percentLeft <= 50){
percent = percentLeft;
}else{
percent = 100 - (percentLeft);
}

return (percent/100)*2;
}
ty
 
The cheapest, fastest, and most reliable components are those that aren’t there. [Gordon Bell]
 
@SandeepPattanaik asking the same Q over and over
repeating same or similar requests or information qualifies as spam
so is everyone using my GUI ? :P
or just @david
 
6:59 PM
@SOChatBot never been so true
@rlemon gui?
 

« first day (900 days earlier)      last day (4047 days later) »