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

2:00 PM
Guys why does unbind.click not work to stop a toggle?
 
what the heck is unbind.click supposed to do
 
unbind.click is not a thing
 
unbind.sauron
 
Well i'm trying to find a way to stop a toggle since for me add/remove doesn't help
 
if we assume you're using jQuery you would need to act on a jQuery wrapped set object
like $('#whatever').off('click');
 
2:03 PM
Hm .off might be what I need
 
unbind should do the same, but its pretty depricated
 
Oh that's quite good to know, thanks.
Didn't read that anywhere so far.
If var bla = element; would be defined could I do bla.off('click'); ?
 
@jAndy +1
 
let obama answer this
 
Haha! Awesome! : P
 
2:06 PM
@DavidH but that will also remove ALL click handlers on that element
 
Oh hm than i'd still be stuck
It's quite an annoyance for me since I add a class to each list item but you'd still be able to spam each list items clicks
Which I need to prevent with toggle..
 
but the good news is, .off() always accepts a second argument where you precisely can pass the event handler function to unbind
 
test
 
posted on April 22, 2014 by Nicholas C. Zakas

This past week I spent an hour debugging an issue that I ultimately tracked down to a silly problem: the property I was referencing didn’t exist on the given object. I had typed request.code and it should have been request.query.code. After sternly lecturing myself for not noticing earlier, a pit formed in my stomach. This […]

 
My name doesn't change ;_;
 
2:08 PM
I don't really get it, but it sounds like .off() isn't really the solution to your problem
 
No it's not actually
This really drives me insane allow me to explain.
 
Can it be that my profile picture is too big? Everytime I try to upload it SE apologizes in a rather cute way
 
@jAndy jsfiddle.net/4pcmS/12 Actually I have that(Changed the fiddle)
Wait
 
no worry, jsfiddle is again slow as shit
 
Awright, finally! I'm the strongest hacker ever, I managed to change my name on SO and am about to change my profile picture. No I don't do tutorials.
 
2:12 PM
won't work really, html structure seems wrong
 
My issue is quite stupid, the list item toggles 'active'. Than if it's active(didn't include in fiddle) it will add a param in the URL though if you toggle it again the same param will be added in the URL again which I'm trying to avoid
 
there is no "parent Li"
 
I know the HTML structure etc don't work but the code is what matters(It works on my actual site where the divs and everything are correct)
 
@DavidH have you looked at the jQuery .toggle() documentation?
 
2:14 PM
Of course I have, though I can't seem to find a solution for what I need to do there
 
that at least.. makes it somewhat 'functional'
 
Yea see that's how far i've gotten
Exactly that actually, after the removeClass it won't toggle again (Sorry for the untidyness there I just suck at reconstructing/making things simple)
The prop disable actually does nothing since it doesn't prevent you from clicking which makes it toggle any way
 
if you want to use event delegation, you have to keep track on the state for each element
 
@jAndy haha @pretty depricated
 
@DavidH something like? jsfiddle.net/4pcmS/16
 
2:21 PM
Hm let me try that for a sec
 
that would be the other case where we don't use delegation and use independent event handlers for each element
 
user1596138
@rlemon God dammit fine
 
user1596138
Guys who's the best dirt cheap host
 
the age old question...
 
How did you guys change your profile picture? I changed it in my SO profile but it looks like they use different pictures.
 
2:23 PM
@Jhawins what are you looking for?
what technologies
 
user1596138
PHP/Node
 
user1596138
Python
 
user1596138
Maybe not Node tho
 
Now we're at it, I've also been thinking in buying a hsot for testing mySQL stuff
 
if not node and just php/mysql get a shared host
hostgator is awesome for that.
 
user1596138
2:23 PM
Definitely need mysql
 
if node everyone swears by heroku
 
@hbentlov 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.
 
user1596138
Fuck hostgator's shit the last year...
 
Y U NO NODE
 
lol what did they do the last year
 
user1596138
2:24 PM
I just need to buy something now :P
 
user1596138
Fucked me so many times.
 
just get a vps then
 
user1596138
> dirt cheap
 
everyone wants cheap.. but they want perfect amazing performing servers lol
 
> I just need to buy something now :P
 
2:24 PM
you get what you pay for.
 
thats what she said
everytime..
all time
 
;_;
 
user1596138
Nah hostgator's support was bs. Service and uptime were great.
 
there are some cheap vps providers out there
 
@DrogoNevets This would still add duplicate parameters to my URL (window pushstate..) whenever the Class is there. @jAndy Not sure if it's my fault though I replaced $this with the actual var name and it reacted the same as the toggle
 
2:25 PM
someone had a link where they were like $5 a month or something crazy
wish I could remember who..
 
ramnode starts at $2
 
digitalocean.com has the $5 vps's
 
$2 and $5 bucks sounds like asking for trouble
 
@suanik 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.
 
microsoft posted that.
 
2:26 PM
@jAndy I agree, but if you arent running anything important/production meh
 
I hope you're not after 'uptime' and good availability for that price
 
Linux best for Microsoft? lolol
 
I set up a droplet on digitalocean with virtualmin/webmin as the control panel. working pretty well. configuring postfix is hell though.
 
are they trying to accept their tools are shitty even for their own internals ? :D
 
Earning money? @AbhishekHingnikar
 
2:26 PM
Ramnode has pretty good cheap VPSs
 
@Lorenz read what i said earlier
@KendallFrey most likely. thats white flag
towards linux
 
I haven't used ramnode, but I'd definitely consider it if I wanted a VPS
 
and iOS / Android
 
iOS for developers? lmao
 
I prefer nodejitsu for node
 
cheapest is $10/month though
 
@KendallFrey better then microsoft windows os :3
 
I've been using ramnode for like a year now with no problems. I think there was a period of downtime which was like for an hour
 
@AbhishekHingnikar meh, no
 
oh gosh.. I have to post it on that topic
 
2:28 PM
ehehe
 
@KendallFrey windows phone duuuuuude
 
DEVELOPERS
18
 
DEVELOPERS
18
 
DEVELOPERS
17
 
DEVELOPERS
15
 
2:30 PM
That's a good song... is it on Amazon?
 
hu ?
 
DEVELOPERS
18
 
We rock.
 
its such a fun.. I had so terrible ABS laughing attacks when I first saw it... AFTER I saw the original video
 
lol
 
2:30 PM
 
I love how he hurts his ankle
and gives out a little squeel
 
@Vrutin 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.
 
how does he not have a stroke?
 
i have no clue what illegal stuff in which dosis he took before jumping up there.. but it was epic
 
2:31 PM
seems like a prime candidate
 
^ Microsoft windows 8.1 sounds scary
especially cortana privacy infrigmentation
 
test - WHY.jpg don't I have any profile picture?
 
@Lorenz go here and 'test'

Sandbox

Where you can play with regular chat features (except flagging...
 
Also, "cortana" is just kind of awkward to say
 
@AbhishekHingnikar meh its like siri/google tiles
yet again MS late to the game
 
2:33 PM
@Lorenz because I hate you, that's why.
 
BY THE FRICKING WAY - Google Glasses is out in US isn't it ??!!
@Loktar !!!!
 
@HenryHey 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.
 
user1596138
@jAndy No it just was for 1 day
 
Y U NO OWN ONE AND POST INFO
 
That's... better than no answer at all
 
2:33 PM
yeah but they are $1500
 
user1596138
Or wait wut??
 
I almost got them @jAndy but asked around for advice
and people said they aren't worth the 1500 price tag at all
 
user3071008
@lorenz it is using your gravatar, not your SO image
 
lol
 
2:34 PM
That's what I guessed, but I don't see any option to change it.
 
@Lorenz just kidding, I love you.
 
of course they are not.. every crackhead could tell :P
 
@RalphWiggum Stop playing with my feelings :(
 
@Lorenz sorry, babe
 
BUT ITZ DA GOOGLE GLASSESSSSSS for gods sake
I finally will have a friend to talk with
 
2:35 PM
not as cheap as putting a server in your study and leaving it turned on
 
@jAndy I think the actual reason for my issue is that it doesn't do the remove per list item but for all list items, why would that be so if outside the counter a toggle works PER list item?
 
Is there a way to override navigator.userAgent before page load?
 
@Loktar it sounds a lil kickass
DYK - Windows does Machine learning since 8.1, almost every microsoft app does
 
Can it be that I need an amount of points to change my profile picture? I just can't see the option...
 
you guys don't even want to know about the interest margin that Apple puts on their products
especially iPhones
Google can only look like childs play in comparison to that
 
2:37 PM
@AbhishekHingnikar DYK?
 
@Lorenz your old picture might just be cached or take a bit to update
 
But @RalphWiggum, someone said that SO and the chat's picture are two different ones. And the SO one changed a long while ago.
 
@Lorenz oh, I have no idea then
 
@DavidH that actually sounds impossible if you pick up on my example, since we act on elements via this-keyword
 
2:39 PM
0
Q: Changing navigator.userAgent using Chrome Extension

Srikanth RayabhagiI am trying to overload the navigator.userAgent using a simple chrome extension. As the content scripts operate in isolated env, I tried to create a script element and write the logic into this one. This happens from background page of the extension chrome.tabs.query({ active:!0 }, function(ta...

 
I'll just wait and pray to all possible gods
 
I need to find some food
 
@jAndy For me it responds the exact same way as a toggleClass does though.
 
user3071008
I'm guessing you'll have to change your gravatar picture to the one you're using on SO
 
!!afk will code for food
 
2:39 PM
@jAndy Nope
 
@Lorenz remember to pray to our prophet, will smith
 
Is that even possible, @MehLON?
@RalphWiggum He's on my list
 
@jAndy All I did on my end was change the $this into thisLi (the name of the var that is defined as the li).
So instead of $this I did thisLi
thisLi = deze.parent('li');
 
why afk does not work!!
 
!!420
 
2:41 PM
hehe he hehehehe hehe he hehehe he...
 
@DavidH please post updated code
 
Alright
 
Is there a way to close a question as "How did you type all this code without knowing this basic thing ?" ?
-3
Q: What is the difference between myfunc() and return myfunc()

PsioniaXLet's say I have this code, can be jQuery (as it is here) or plain javascript. $(document).ready(function(){ $("#someid").keyup(function(){ func1(); func2(); }); }); $(document).ready(function(){ $("#someid").keyup(function(){ return func1(); return func2(); }); }); In ...

 
jsfiddle.net/4pcmS/17 Doesn't work apparently, not sure why either or how yours picked up the li
 
Ha! I'm like a virus, I spreaded over the star-list in no time
 
2:43 PM
@Loktar Do you know
 
and I will star all of you!
all your stars are belong to us !
 
your store, the inbuilt search, the weather app, the one note and music and a lot of apps now machine learn on windows
 
the only one of those I use is search
 
@DavidH try deeze instead
can't use this as variable name
 
Alright :P appreciate the help
I don't, it's just an example
 
2:46 PM
this doesn't like this
 
@jAndy The Game
 
@CapricaSix I'd love to play with you
 
!!tell jAndy You lose or You win
 
@Lorenz Command you does not exist. (note that /tell works on commands, it's not an echo.)
 
;_;
 
2:47 PM
!!echo echo
 
echo
 
!!echo @jAndy You lose or You win
 
@jAndy You lose or You win
 
!!echo !!echo
 
!!echo
 
2:48 PM
@rlemon Because the snake is inside the terrarium ;)
 
ARARRRRHHHWWLl
 
too localized ? — dystroy 18 secs ago
 
@jAndy you cant fool caprica! she's too clever for that
 
user1596138
!!echo HALT
 
2:48 PM
HALT
HAMMERZEIT!
 
!!echo STAHP
 
STAHP
 
@jAndy Hm well it seems to just toggle just like toggleClass, it keeps adding the same param if you click twice which i'm trying to prevent(check the add):
http://jsfiddle.net/4pcmS/19/
 
HAMMAHTIME!
 
!!echo butts
 
2:49 PM
butts
 
user1596138
I believe there would be a triple if she didn't get throttled
 
user3071008
!! To murder or not to murder
 
@MehLON To murder
 
!!a or b
 
2:49 PM
@RalphWiggum b
 
user3071008
sounds good
 
@DavidH it would work, but stateObj is not defined and throws
finally I want to throw up aswell, food food food afk
 
@jAndy Sorry again, keep forgetting it all is defined in my sheet but it seems to just do the same.
Alright have a nice lunch!
 
Hey guys... there was a laptop a while back that basically everybody recommended. I can't remember what it was.
 
2:54 PM
THE THINKPAD
 
I was looking at thinkpads
 
nah, I dunno :o
 
@MehLON Apparently it's the same picture for those pages, it's just that the SO profile updates way faster than the chat profile.
 
the Stinknad?
 
Just get one that doesn't catch on fire, and you'll be okay
 
user3071008
2:55 PM
oh
 
I'm looking through the transcript. Because seriously, everybody was like YES GET THIS ONE IT ROCKS.
 
you could be hip and get the MBP, like every other js developer
 
Thinkpad ? They don't rock, at least not for developers...
 
user1596138
System76 supposedly has a feature to keep you awake and scare the shit out of you.
 
user1596138
Says Zirak
 
2:57 PM
No, it wasn't a Thinkpad
It was something else
 
user1596138
@jAndy what are you is your grandma fiddling with hidden services for?
 
@TheBlackCode 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.
 
Javascript power :D
 
user1596138
Can I use scholarships to pay for the most badass laptop I can find? //totes srs bsns gys
 
@devtreat but why is there a PSU box in there with him?
it is anarchy!
 
3:05 PM
OH
Samsung Series 9
 
good morning
 
@KissKoppány Bonjour :-)
 
@RyanKinal are you french? :D
 
@KissKoppány Are you British?
 
BAM
 
3:07 PM
@Neil haha, no :)
 
@KissKoppány Non, je ne suis pas Francais
 
guten tag
 
@Neil you must be lithuanian
 
@rlemon Sorry, don't get it
 
Guten Tag!
 
3:08 PM
@Neil I thought we were just asking people if they are from random places
 
herzlichen glückwunsch aus ungarn
 
room topic changed to KaffeeSkript: Read this link or we'll eat you: rules.javascriptroom.com. Before asking a question inform yourself on the XY problem goo.gl/taIqf [ecmascript] [ecmascript-5] [javascript]
 
hope I wrote it well xd
 
Guten Abend :3
 
 
3:08 PM
vielen Dank aus Deutschland
 
room topic changed to JavaScript: Read this link or we'll eat you: rules.javascriptroom.com. Before asking a question inform yourself on the XY problem goo.gl/taIqf [ecmascript] [ecmascript-5] [javascript]
 
@rlemon Just making an observation on his observation
 
NO! Germans will not take over the room! we've seen what happens when you give Germany something small, like the JS room, or Austria.
3
 
rlemon wagt es die deutsche Macht aufzuhalten
 
3:09 PM
I'm not even going to google translate that
 
@rlemon ahahah
 
;D
 
I will however respond with THE GAME!
 
user1596138
I've been spammed non-stop over the weekend from pretty much every IP address 91.236.74.*
 
user1596138
I got like ~150 emails lol
 
user1596138
3:10 PM
Fuck you whoever it is
 
> Having a single unified language in the chat is a must, and this language is English. We cannot allow conversation to go on in multiple different languages and if you must do this please create a new room with the user or users you wish to speak with. This is not to discriminate against non-english speaking people, it is merley to control some order and consistency in the room.
With that said, all non-english messages (outside of themed arguments) will be binned and an appropriate link to these rules will be dropped.
 
A French border officer pulls over a German tourist. "We just need some information before you pass the border. Occupation?" Tourist: "No, no. We're just visiting."
*ducks and hides*
 
Oh c'mon, it was just a joke :3
 
rlemon.github.io/so-chat-javascript-rules enjoy your invites, rule breakers!
thats cool. I have no problem doing this
 
AEIOU :P
 
3:13 PM
BAM!
 
;_;
 
;'(
 
gth !
 
@dystroy Why do you say Thinkpads are not good for developers?
 
@RyanKinal every time anyone says developers now "DEVELOPERS! DEVELOPERS! DEVELOPERS! DEVELOPERS! " plays in my head
:)
 
3:14 PM
@rlemon source?
 
!!tell Lorenz youtube developers
 
hahaha it is a remixed version
awesome
 
Oh, THIS guy. I think I have never watched the whole thing because it's too painful.
 
@Lorenz s/painful/awesome/
 
3:18 PM
I've never seen anyone so passionate about making money in my life
 
@RyanKinal what's that?
!!s/painful/awesome
 
@Lorenz That didn't make much sense. Use the !!/help command to learn more.
 
Trailing slash pls
 
@rlemon : I tried to rewrite the toTitle function like this

String.prototype.toTitle = function(input) { ... }
 
Extending prototypes is bad, mmkay
 
3:22 PM
how could I make this work to use it as key.toTitle() ?
 
0
Q: I stack with http promise

user3560936I have a problem with promises in angularjs. I read some solutions but none of them didn't works for me. The issue is that I can't assign scope outside then(..) function. Here is my code: Factory: myApp.factory('getMovieData', function($http, $q) { var obj = {}; var apiKey = ''; var ap...

 
user3071008
what does toTitledo?
 
user1596138
@RyanKinal lol learned that with arrays the hard way
 
@Yury 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.
 
user1596138
!!format
 
3:24 PM
@Jhawins Format your code - hit Ctrl+K before sending and see the faq
 
user1596138
No that's just silly
 
String.prototype.toTitle = function(input) {
  var words = input.split('_');
  var first = words.shift();
  var output = first.substr(0,1).toUpperCase() + first.substr(1, first.length - 1);
  return output + ' ' + words.join(' ');
}
 
Think about the order of how things happen. Using a promise is correct, but think about why it's correct. Here's a hint: Code order isn't necessarily execution order. — Ryan Kinal 16 secs ago
 
user1596138
!!format
 
Format your code - hit Ctrl+K before sending and see the faq
 
user1596138
3:25 PM
Better. I don't need the advice if I'm the one calling it
 
> Gifted my mum an iPad Air
 
String.prototype.toTitle = function() {
  var words = this.split('_');
  var first = words.shift();
  var output = first.substr(0,1).toUpperCase() + first.substr(1, first.length - 1);
  return output + ' ' + words.join(' ');
}
changed to this, but has no effect this way
to be honest I've never used prototype before
 
@AbhishekHingnikar That time of the iMonth?
 
user1596138
lol someone asked me if I finished a feature I was working on before things got more crazy. My only answer was "try and see I don't remember"
 
@Neil No just did.
 
user1596138
3:30 PM
Looks like it works lol. Cool
 
microsoft gave me a gift voucher worth $200
so.. that was the best use of it ;-) ... #irony
 
user1596138
Nice!
 
Well done
 
user3071008
do you mean to split the words with a scape as seperator?
 
@Jhawins so far what i do is
... check for a word -> if its a noun ?
... ohkay its a noun -> try to classify what the fuck it is :: Place, Name, Something else ?
... ohkay its x -> now try to find photos which have this.
... oh and does wikipedia have this too ?
... and can wiki - data give more catagorization in this ? ( Wiki Data is the wikipedia for structured data )
 
3:32 PM
format field names (email_again) more readable (Email again)
 
user3071008
aha
 
for validation messages
but cant make it work the way like that xD with prototype
 
... oh and can we show it on map ? [ and perhaps get it on near place tags ]
@Jhawins now you see how easy it is ;-) ?
 
user1596138
Yeah makes sense. Sounds pretty straight forward lol
 
user1596138
1 step at a time
 
3:34 PM
ahan
 
@rlemon It is a small cave that I've done :)
 
well what i explained you was for simple queries.
it gets exponentially hard as we go.
 
user3071008
it works for me, "email_again".toTitle()
 
That thing will work for

Photos taken in Jabalpur
Photos of potato

but not

Photos of Anjolina Jolie Nude
or
Photos of Jolie wearing red
that is sequential building.
 
3:37 PM
@danilopopeye 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.
 
errormsg +=  key.toTitle() + '<br />';
why does it not work?
there are no errors but has no effect this way
 
I give up
ugh
 
any idea?
key is the key in a $.each function
 
omg you are right
works fine, it was my mistake
 
user3071008
3:44 PM
by the way, use .charAt() instead of substring for a single character
 
!!> "someString"[4] // or use bracket syntax
 
@nderscore "S"
 
user3071008
80
A: string.charAt(x) or string[x]?

George W Bush// Bracket Notation "Test String1"[6] // Real Implementation "Test String1".charAt(6) It is a bad idea to use brackets, for these reasons (Source): This notation does not work in IE7. The first code snippet will return undefined in IE7. If you happen to use the bracket notation for ...

 
Who supports IE7 these days? :P
 
user3071008
uhh, idk aliens?
 
3:52 PM
0
Q: Modifying the argument passed to jQuery done() callback following a successful AJAX call

Caspian CanuckHere's the scenario: I need to fetch some JSON data via AJAX from the server (ASP.NET MVC application + ServiceStack services). If the user's session expires then instead of getting back JSON I get a redirect to the login page, which gets automatically executed by jQuery, so the result of the AJ...

 

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