« first day (1276 days earlier)      last day (3902 days later) » 

00:00
document.cookie.match(/Counter=([^;]+)/);
@Bilal basically I wanted to code something similar to that code that is to store the number of visits to that page and display it.. so i thought it would help me to plan mine when I understand it...
ok let me write you a fiddle
@Bilal but I guess Im lost
@Bilal wow you would do that? Top man!!! thanks in advance mate!!
We are trying to figure out this stackoverflow.com/q/23049642/3475930?stw=2
or an alternate to that at least
00:06
9
Q: Paginate the Access List on chat rooms

Second RikudoThe reason should be clear enough, but if it isn't, here's a nice DoS page against Stack Overflow :D Seriously though, this is getting ridiculous.

@RobertHarvey no clue
@RobertHarvey whats this about?
That's what I'm trying to figure out. The Meta question seems to suggest the problem is banning certain users from the chat room, but it seems to me that it's the opposite problem: too many users granted write access because they don't have 20 reputation to talk.
@RobertHarvey Hey
It's our method of banning users. We go to gallery, but automatically give everyone access
except for those who have been muted
!!mute
@Bilal thanks Bilal let me have a look
^^ Users who have been muted, for how long, with a link to the muting message (for context)
@codebreach 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.
@Bilal fiddle is not loading... problem with servers of my connection/ browser?
What sort of heresy are some users committing that forces you to use gallery mode?
@envyM6 it doesn't work for me too now
00:13
@Bilal dammit... servers I guess
OK, so how does one buy a "write-access" ticket into this room? Just curious.
@Bilal any alternatives?
@RobertHarvey no clue :|
Sheesh. Who's in charge here?
@robertharvey like I said, that message has links to where the user was muted, so you can read the context
@RobertHarvey It's our emulation of banning single users
It's a special mode in which every user automatically gets write access and we make the room protected
00:16
Mute is rarely used, and the user is usually warned several times
So then we can exclude single users from the list, effectively banning them
@envyM6 var number = document.cookie.match(/visits=([^;]+)/);

if (number) {
number = number[1];
}
else number = 0;

number++;

document.cookie = 'visits=' + number + ';expires='+ (+new Date() * 10) +';';

document.write(number);
Warned about what?
Their behavior
We usually use it on people who repeatedly confuse there and their
00:18
I.e. please stop insulting users or we will mute you
@Bilal is that the code?
@envyM6 yeah
@Bilal let me run it :)
The system was only implemented after SO declined to implement it natively
IIRC, it would require a whole restructuring of the auth code
Maybe they declined it for a reason. Maybe they decided that the chat areas would become too insular if they implemented it. Don't flags work?
00:21
@Bilal my goodness it does the same thing as that gigantic code!!
The decline reason was code complexity
What about flags?
@Bilal can you make that expire cookie button to work? so that the counter resets please?
Not to put too fine a point on this, but annoyance isn't a sufficient reason to ban users. That's what "ignore this user" is for.
@Bilal <input type="button" id="btn1" value="Expire Cookie"/> this bit
00:23
1 message moved to recycle bin
@envyM6 please format your code (ctrl+k)
@Loktar my apologies Im new
112
Q: Flags in chat are defective by design

Benjamin GruenbaumYes, I know the topic has been discussed before. I know that Meta already has threads that complain about how flagging doesn't work. I wanted to give a practical example. Today, a user came in to the JavaScript chat and asked the following question: Hey guys, as soon as I embed javascript,...

@envyM6 <input type="button" id="btn1" value="Expire Cookie" onclick="document.cooke = 'visits=0'" />
Also, @BenjaminGruenbaum is in charge.
<html lang="en">
<head>
<meta charset="utf-8">
<title>cookie count</title>
<script>
var number = document.cookie.match(/visits=([^;]+)/);

if (number) {
number = number[1];
}
else number = 0;

number++;

document.cookie = 'visits=' + number + ';expires='+ (+new Date() * 10) +';';

document.write(number);
</script>
</head>

<body>

<input type="button" id="btn1" value="Expire Cookie"/>

<div id="out1">
</div>

</body>
</html>
00:27
@envyM6 add the onclick="document.cookie = 'visits=0'" to the button, even if it's bad practice but you're just learning , i assume.
@Bilal yep i am learning :)
@Bilal it resets it but does update the page to reflect the results
I have to refresh to get the result
@Bilal Can i update it as soon as I have pressed the button?
@envyM6 <input type="button" id="btn1" value="Expire Cookie" onclick="document.cookie = 'visits=0';document.write(0);" />
@SomeKittensUx2666 Ahoy hoy
@Bilal Wow... thanks!!
I get distracted by work for five minutes and the room lights up!
00:35
@Bilal btw are we updating the cookie or just wring 0 on the page?
@envyM6 both
pst check out my grapple hero progress
2
@envyM6 keep in mind this is not the best way to do it.
the music is so kickass worthy
still says the video is processing.. has a bit of choppiness game itself doesnt though
@SomeKittensUx2666 wurt
00:36
@Loktar i like that.
Thanks @Bilal
@rlemon read up like umm 33 mins?
33 mins ago, by Robert Harvey
What is going on here? http://chat.stackoverflow.com/rooms/info/17/javascript?tab=access
@Bilal alright... thanks again man... you are a top buddy... btw what would be the standard practice? create a function and add it to an event handler to reset it? ie assigning that function to the button?
@Loktar Agreed. That music is awesome.
@parth 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.
@Loktar i also been making some 3d tests with opengl youtube.com/watch?v=SKAU46__YTg
00:38
It's lookin' pretty smooth now.
@Bilal damn nice
@Loktar thats some nice work!!! keep it up!!
@monners yeah the video was annoying me because the game runs at 60fps
Hey, how come I didn't get greeted like I'm a total noob?
00:39
some rooms stay constantly in gallery. we have a workaround for a less than user friendly system
0
Q: Firebase - Angular $on listener returns data undefined value on callback

Alexandros SpyropoulosI'm Trying to fetch some data from a firebase , I'm using angular firebase plugin. I double checked debugging in inspector, the url is the correct one. It responds back, that means that the url is correct but the callback's arguments is undefined. I'm using loaded because I need it to fire once....

@MichealHampton 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.
@envyM6 based on my understanding, using addEventListener better than on* event attributes.
Much better, thank you!
@Bilal looking at ur one makes me realize im right at the bottom of the ocean... really loooooooooong way to cath up to you guys :(
00:41
@envyM6 we're all noobs.
@Bilal thats pretty nice work though
@Bilal thanks for the advice
@rlemon Mods looking to shut down mute
On hangout with inlaws, so someone else needed to take over
@SomeKittensUx2666 is there more than just one mod wanting to shut it down?
alright Ill retire for tonight... gooddnight everyone
So far, no, but you know what happened last time
00:44
see ya @envyM6
@SomeKittensUx2666 I know.. I posted my thoughts on twitter
!!afk inlaws
@Loktar looks great
thanks @Mosho
@envyM6 see ya
worked on it a bit this weekend.. still so many things to add
like the blocks the crumble when you grapple them
shooting for a May release
but I was excited to show off the music lol
00:46
what's your record
did you compose it?
no I didn't compose it
what do you mean my record?
like in the game?
yeah
^ thats the dude who did the music
I don't really count any records yet since I'm just testing.. but my daughter is the only one I know who's beaten the lite vs on the google play store so far
@Bilal sorry man just realized need a bit more explanation with this line var number = document.cookie.match(/visits=([^;]+)/);
@Bilal what does this means (/visits=([^;]+)/) ?
@envyM6 if you try to apply the regexp on this string 'visits=100;' it will match 100
@envyM6 it's like saying match the string after 'visits=' till ';'
00:52
@Loktar damn, totally thrown off by the little boxes
oh hah yea
that level is a bit hard
the blocks that bounce you back suck too
I need to update the site actually, incorporate the new art and branding
@Bilal dont get it... I guess ill try tomorrow... thanks mate
alright game of thrones time o/
@nathan-unleashed 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.
01:16
@guest271314 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.
01:40
0
Q: Node JS Promises not console logging

user243340I am trying to write a simple example using Node JS Promise library. However, it seems either the promise is not working fine or the console logging. Here is the code function function1 () { setTimeout(function(){var a = 10;},3000); return "abcde"; } Please tell me where i am going...

!!wiki god object
In object-oriented programming, a god object is an object that knows too much or does too much. The god object is an example of an anti-pattern. The basic idea behind object-oriented programming is that a big problem is separated into several smaller problems (a divide and conquer strategy) and solutions are created for each of them. Once the small problems have been solved, the big problem as a whole has been solved. Therefore there is only one object about which an object needs to know everything: itself. Likewise, there is only one set of problems an object needs to solve: its own. ...
@Loktar I've decided I want to make a game too
pointers? :D
02:01
@Drew 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.
02:51
@Mosho: make a game? What type? :)
@Mosho hmmm
start simple :p
try not to let too many features creep in. Finishing is the most important part imo.
Indeed, I've been too ambitious so many times and found myself swimming in the deep end :\
03:09
@undergroundmonorail 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.
03:23
0
Q: Making multiple scripts loader with jQuery Deferred object, am I doing it right?

anvozI am working on a better version of $.getScript function which can: load multiple scripts at once cache already loaded scripts trigger a callback after all required scripts were loaded You may suggest some libraries such as requirejs or LABjs but I think I could make a similar one by using jQ...

 
1 hour later…
@OneKitten User Elusio proved elusive.
@OneKitten Caprica Six (http://stackoverflow.com/users/1839506/caprica-six) has 1106 reputation, earned 0 rep today, asked 0 questions, gave 4 answers, for a q:a ratio of H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ.
avg. rep/post: 276.5. Badges: 0g 5s 9b
05:09
@Loktar Damn! Who did the music?
05:58
@govindsinghnagarkoti 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.
0
Q: In angular.js, Promise does not resolve when ui-router state changes

Abhishek OzaI am using below routes for my angular app. For both the states, I want the data loaded from server. So, I used resolve to get the promise object. This works fine when I go to state1. But when I make a transition to state2, the resolve does not work. No, server request is made. I have tried using...

@JeffLing 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.
@gabe 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.
good morning everyone
It certainly is a morning. Not sure whether it's good, though
Closer to good night for me :)
06:26
morning - midday - night... Time in chats are optional
I use Universal Gretting Time
Good morning when I come, good night when I go...
I can say good morning, and then, 10min lather, good night
Fair Enough. XD
Look at UGT ;)
> Local time of any member of channel is irrelevant. Resistance is futile.

Too funny.
06:31
Well then good (utg) night XD
good night!
Yeah it's a special way to say goodbye
@DhrumilShah 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.
07:03
@SomeKittensUx2666 Wanna help me with something real quick?
An internet cookie to anyone who can tell me how medium.com/desktop-diaries/c77e763bcc12 are calculating the opacity change of the heading on scroll
@anvoz no you're not.
@RobertHarvey hi, we really don't like !!mute, but we're stuck there. Also, just for the record - we got permission before we implemented it and it's rarely used.
"my own little code". Really ? — dystroy 20 secs ago
07:08
@monners It's somewhere in this line:
1 <= c || (b = this.zh.Ba(b), b = b.yd.ib + b.Le(), this.Lz = Yn(this.ln, this.Lz, c, b, a), (0,z.vf)(a, "opacity", 1 - c));
@dystroy: personal butler service is now available
morning all
Morning
enjoy your meal
@SteamFire :( i have been told we cant afford that if we want a honeymoon
so was shreddies for me
dammed weddings
no more meat on the morning?
:O
07:16
oh well, 4 day weekend coming up!
Yeah!
i know! the day we get back after being married is going to be a meat fest!
Oh it's until the marriage!
she want that you fit in you suit
:P
nah, its the ((£2.87 * 5) * 4) that she wants to cut out
07:18
thats £750ish a year!
such money
thats virtually the cost of the photographer
@phenomnomnominal lol, yeah I got that far.
@LukasIgnatavičius 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.
@monners Do you ever visit main?
07:20
Hey, javascript question: By default, if we push enter key in a field from a form, it will submit, doesn't it?
@SteamFire in most browsers; also, not sure about textareas
afaik yes
Yes, also - that's a DOM question not a JS question.
yeah dom
@JanDvorak I think text areas will just append a linebreak (might be shift-enter, but I'm pretty sure it's just a line break)
07:21
@SteamFire it should do yes
what if it doesn't?
@SteamFire catch the keycode and if (keycode == keycodeForEnterKey) { form.submit(); }
@SteamFire then you have something happening on key down/up/press or submit that is return false
@SomeGuy Main?
@RUJordan that's a quick fix but seems legit
07:24
@monners StackOverflow, i.e. not chat
Yeah, how else do you think I got all this rep? :P
@SteamFire well there really isn't another way to do it lol
@monners dat 1k status
@SteamFire only if its not something disabling it, in which case you have to make sure that you one happens first and not last....
Haha, cool. I never see you replying to pings you got while you weren't here, so I was wondering if you just missed the notifications
Also:
!!stat
@SomeGuy That dude sucks
07:25
Well, shit.
@RUJordan don't hate
Procreate?
i can live with that
@monners: Hate cannot drive out hate
Emasculate
user924016
07:26
Mornings
@OneKitten Yeah, don't ya just hate that?
masturbate
@monners totes h8in
what am i meant to be doing today?
user2509223
mornin
07:27
@monners: I hate hate so much that hate appears hateful inspite of my own hate of the fact hat hate cannot drive out hate, nor can aliens hate to drive out hate.
@RonniSkansing @derylius good morning
user2509223
@OneKitten just fuckd up my day, thx a lot
-1
Q: How to select random data with interval of 5 row in table?

hiren panchalSorry, I couldn't figure out how to do it without an image:

Mah holy spaghetti cat...
@derylius: and I shall hate that.
@RUJordan i forgot the event...
keypressed?
07:30
You talking about keypress?
oh keydown
@SteamFire dpnt forget key up too
@SteamFire there's a couple you could use -- keypress/keydown are essentially the same, and keyup is the more common one
keydown often causes issues for me
so for a submit, it's better to use keypress
the issue with keydown is, that it would submit the form whils tthe user is still pressing enter, and if they dont release intime, might submit something on the other page
07:32
ho, keyup
@JanDvorak the nerve of that OP to tell an answer it isn't optimized enough...
user2509223
onkeypress, onkeydown, onkeyup, onkeythrownoutwindow
@SteamFire is say key up
http://jsonlint.com/
good tool
If it's for catching key presses, use keypress. If it's for list of keys pressed, keyup/keydown.
Else you're doing it wrong.
07:33
@derylius normally the entire keyboard is
user2509223
@jesse quite
@jesse look up googles one, i prefer it
@jesse wat? No. Too critical
Lint is evil.
@SomeGuy Sorry 'bout the incognito to pings. Been uber busy recently
user2509223
07:33
@JanDvorak yeah but you can detect it one by one
user2509223
also onkeyboardpress
!!phucket
user2509223
onkeyboardup (where?)
oncatsitonkeyboard
07:34
@monners All good. How's it going?
@jesse What about this one?
Yeah good. Just got a small project I'm trying to smash out before Easter Break
It's for lawyers
@derylius true. If you know the keyboard layout you can even determine which way the keyboard went through and at what speed by simply timing the per-key events.
@SteamFire better~~
@SteamFire does it work for anything but JSON?
07:35
no, only json
what for do you want to use it? xml?
NSA say they didnt know about heartbleed.....hmmmmm yea right
Yup. Nevereverever heard of it.
And totally didn't put it there themselves.
Like, totally.
@bjb568 and i was born yesterday
like totally sounds wrong?
@Drogo Ah, really? Me too! We can celebrate our 12^n plank time birth anniversaries together!
07:40
Thank you, @Feeds. Good bot.
@monners Command 666 learned
!!666
ಊ(╰◣▂ ◢╯)Ψ
Hooray...
07:42
What's around the bowtie ?
coller?
0
Q: How to add an var to list in jquery

Rajasekhar PI have a requirement to create a variable and add it to a list and check whether that variable is present in the list already or not in jquery. Sample code: String lCheck = lListCheck.get(i); List<String> lList = new arrayList<String>(); if(!lList.contains(lCheck)){ lList.add(lCheck); } I...

-2
Q: Increase or decrease value using jquery

Unknown UserI have a javascript variable which is the day number of current date. I wanted to give the user to go to previous date by clicking on a button. Here's the fiddle. Tried googling but I didn't understand or anything did help me. I'm able to decrease just one day by giving -1 in the day variable...

@dystroy voted as unclear
0
Q: Jquery validation with array

user3518669with this function i want to validate my form out of my html. The array errorM is out of 3 different error MEssages the first should appear in the first span in the first input and so on. <script> (function($) { $.fn.validate=function(){ var emailRegex = /^[A-Z0-]+@[a-z]...

07:46
@Sarah 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.
o/
@CapricaSix Alright
Today is a big moderation night.
hey guys and gals
That sounds weird...
@tereško Hi.
07:48
I have a question about jquery
can i rewrite it to look less like an ars:
        var target = $(event.target),
            dropdown = target.parents('.dropdown');

        dropdown = target.hasClass('dropdown')
                 ? target
                 : dropdown.hasClass('dropdown')
                     ? dropdown
                     : null;
I have a website www.abc.com that has a login link. On clicking login, www.xyz.com/login opens in a separate tab. I would like to prevent the user from directly entering the URL www.xyz.com/login in to the address bar. The user should always navigate to this page from my website. My website is in php running on Apache while the login page is in html running on IIS. Any pointers?
it is code from event handler
@Sarah It's a bot ;)
@tereško Looks fine to me… Of course everything in jQuery looks like the same hellishness...
Morning!
07:49
@IonicăBizău Morning.
Does anybody know how to convert a rgba color in a supported terminal color via NodeJS? :-) colors.js is not enough for me.
@tereško that's probably as clean as it will get
=/
ok , I will take you at your word
@Sarah Impossible. You cannot not show data and show data.
@tereško I would rewrite it with 2 or 3 if, to be easier to understand. But it's a matter of opinion.
07:50
there are ways to rewrite this for sure, but I think it would just get more unreadable
@Sarah you can check the referrer, but the user can spoof that if he really wants to.
I was thinking of posting a variable along when the user clicks on the link so I know whether the user has clicked from my site or directly entered the url. If the variable exist, load the link else redirect. Something like that, possible ? @bjb568
@JanDvorak I tried the referrer but lost with that too..
@Sarah check how sessions work, then
Yup. +1
but "accessed" != "seen" anyways, so...
07:53
So it is not possible at all? @JanDvorak
@Sarah Give a secret something (cookie), make it all cryptographically whatever and stuff (secure). And yay (then it will be perfect secrecy).
@Sarah can both servers share data? (session-id?)
@bjb568 one problem - I dont know how to :( All i know if through the htaccess but that too isnt helpful since it will be a continuous loop back.
user2509223
and now lets implement some CMS
user2509223
i guess ill need some coffee for that
user2509223
07:56
!!morecoffee
I'm stupid, how do I fix it?
@DrogoNevets no cannot share data, there is just this one page in there. sessions not helping.
Google Geocode help!!!!!!!!!!!!!!!!!!!!!!111
@SamHolguin 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.
07:57
@jolly.exe shoot
call that urkl
I want to print values in json data returned
@Sarah You can start by googling "session cookie". Anyway, I'm tired. Bai.
07:58
you can call JSON.parse @jolly.exe
@sarah can you console data in jsfiddle ???
you are not telling me they nazi's upstairs have blocked jsfiddle?!
You cannot json to another domain...
@Oleg not strictly true
JSONP
@Oleg The response has Access-Control-Allow-Origin: * though
07:59
@Oleg unless that domain lets you
sure, but that jsfiddle doesn't use any of those
My prob is m not able to get address_components
user2509223
@Sarah what about downloading and serving the login site from your server?
My google chrome uninstalled itself :(

« first day (1276 days earlier)      last day (3902 days later) »