« first day (1418 days earlier)      last day (3521 days later) » 

12:22 AM
-1
Q: How can I make this for loop check for user input with two spaces?

Jordan CaldwellI'm just starting to learn JavaScript and I tried some things out that I just learned, but even though my code seems fine to me I don't get the right results. I'm trying to make a for loop that checks user input for two spaces. If a double space is found, I want a message to appear saying so,...

I edited this question a little bit. I think it needed to be closed to get cleaned up a bit, but I do think it's worth a reopen review. The asker has a clear problem, but that person's biggest mistake, IMHO, was simply mixing up some terminology that has now been corrected.
 
12:41 AM
@Luggage no, I just want something local that gave me basic dependency resolution, their spec gave a simple concept - It's all in a single JS file so it doesn't need the xhr stuff and I didn't see any others that did that so I wrote a simple widget
I can define() modules and their dependencies, and my first require('app') resolves the graph of dependencies composing the system, but none of it makes xhr calls for separate files or any of that voodoo, nor do I have the scoping concept which seems entirely based on file directory convention. The 'module' and 'exports' parts though are easy to maintain compatibility with, but I don't think I care to bother since it's just for my own use
 
 
1 hour later…
1:45 AM
@copy Skype?
 
2:17 AM
@JimmyHoffa Do you want to use modules as dependencies before they've been defined?
 
 
2 hours later…
3:49 AM
0
Q: JQuery async promises in nested loops

CruzDiabloI'm new at Node.js and promises (here, I'm using Q.js). I'm trying to make a scrapper out of a site which has the following structure: main_page: has a list of categories, each category has a link that points to a list of stores page. list of stores page: has a list of stores, each store has a ...

 
 
2 hours later…
5:28 AM
!!urban aspie
 
@SomeKittensUx2666 aspie An [aspie] is one who has Asperger's Syndrome, which is believed to be part of the autism spectrum. Aspies, while being quite gifted verbally, have social, emotional, and sensory integration difficulties, among others. [Aspie] is an affectionate term, and is not meant as a put down.
 
 
m59
the heck?
-2
Q: Remove Remove Remove

Ryan KemptRemove Remove Remove Remove Remove Remove

 
5:52 AM
Hey guys, I am working on a web project with Bootstrap x-Editable controls. I have never used this before, and I can'
cant seem to figure out how to work with the getValue return.
$('#ipro-Comm-Cell-Carrier').editable('getValue') returns:
Object {ipro-Comm-Cell-Carrier: 2}
it is my understanding that in that object, it is treating 'ipro-Comm-Cell-Carrier' as a property name, yes?
When i try to reference it like so:$('#ipro-Comm-Cell-Carrier').editable('getValue').ipro-Comm-Cell-Carrier
i get the following : ReferenceError: Comm is not defined
How do I say that the whole thing is a property name?
18
Q: How do I reference a javascript object property with a hyphen in it?

DamonUsing this script to make a style object of all the inherited etc styles. var style = css($(this)); alert (style.width); alert (style.text-align); with the following, the first alert will work fine, but the second one doesn't.. it's interpreting the - as a minus I assume.. the debugger says 'u...

NM, found an answer
 
@m59 flagged
 
@m59 flag it
 
m59
@BenjaminGruenbaum as what?
 
As custom - OP is defacing the question
 
Array.join is strange.
""+null => "null"
 
m59
6:07 AM
ah, I didn't know he keeps doing it.
 
["a",null].join() => "a,"
(yes, I checked, it's as specified, and the MDN is slightly wrong)
 
I'd say that conversion of null to "null" is the strange thing here.
 
not in my opinion (misread your comment)
> If element is undefined or null, Let next be the empty String; otherwise, let next be ToString(element).
(from the spec)
That doesn't look like a consistent handling of null... I guess it seemed more convenient in the first implementation...
 
hi peeps
what would you suggest for an ad campaign, pay per impression or pay per click?
 
@dystroy lol
It's those damn number/string hints
["a",null].map(String).join()
 
6:18 AM
I'm going to spend $3000 in ads so it should definitely be a good choice
 
@BenjaminGruenbaum This makes another difference with map(String) : undefined
(this one I expected)
The null in JS makes sense in my opinion, but if the spec sees it just as undefined in most cases, then it doesn't...
 
@dystroy yeah
 
Is there any SE business related site? I'll ask it there if possible
 
@AdamBarak maybe have a look at the webmaster se site ? disclaimer: I don't know that site well enough to be sure
 
What are you advertising for?
 
6:25 AM
People coming here, don't forget to downvote this question if you see it in its vandalized state :
-7
Q: Remove Remove Remove Remove Remove Remove

Ryan KemptRemove Remove Remove Remove Remove Remove

 
@dystroy So far I've found better sites such as workplace.stackexchange.com and startups.stackexchange.com I'll investigate further which one is more suited
@Kippie For now I can't disclose very much, but I'm advertising for a website which treats sensible themes
It's a sort of Stack Overflow but I can't say more.
 
lol, this is my first edit war :D
// Meh, I got
$.post('/posts/9592461/rollback/b3db24b8-8261-48ca-b0c5-ef52d3d5fe97', { 'fkey': StackExchange.options.user.fkey }).then(function(res){
    console.log(res);
}) //in a setInterval :D
 
One part of me says that if CPM cost less than CPC I should go for the former one because it can always be converted in a CPC (eg. user views the ad and bookmarks or takes note of it, it later is converted to a CPC, a good CPC)
 
Good Morning Guys
 
Heh. He's from Ontario. Ontarians are tough people :D
@AwalGarg Good morning peep
I have an idea to annoy him and make him leave the site for a bit Benjamin, wait..
 
6:31 AM
Anybody good with D3 here? I need some help with this.
 
Anyone have experience with Bootstrap x-Editable?
 
Morning
 
Wait, who is spamming up/downvotes on that question now?
 
I am trying to change data source on an editable after it has been initialized and the changes are taking.
 
function cycle(){
$.get("http://stackoverflow.com/posts/9592461/revisions").then(function(res){
    if($(res).find(".post-text:first").text().trim().indexOf("MySQL Query") >= 0)){
        console.log("No abuse detected");
        cycle()
    } else {
        console.log("Abuse detected, reverting")
        $.post('/posts/9592461/rollback/b3db24b8-8261-48ca-b0c5-ef52d3d5fe97', { 'fkey': StackExchange.options.user.fkey }).then(function(res){
            console.log(res);
            cycle();
        })
 
6:33 AM
lol
 
what is this?
 
morning
 
did someone hack into the rate limiting thing?
 
It looks to me that this guy's script is better than yours, @BenjaminGruenbaum
The moment somebody reverts, he immediately reverts back
 
function cycle(){
$.get("http://stackoverflow.com/posts/9592461/revisions").then(function(res){
    if($(res).find(".diff-add:first").text().trim().indexOf("MySQL Query") >= 0){
        console.log("No abuse detected");
        setTimeout(cycle,2000);
    } else {
        console.log("Abuse detected, reverting");
        $.post('/posts/9592461/rollback/b3db24b8-8261-48ca-b0c5-ef52d3d5fe97', { 'fkey': StackExchange.options.user.fkey }).then(function(res){
            console.log(res);
            setTimeout(cycle,2000);
Now it works
 
6:36 AM
lololol, this is the best thing I have seen on SE.
 
For all I know he may have an open page with the rollback ready
 
His is definitely automated
 
Can't a moderator temporarily revoke his editing rights?
 
He has twice the interval too, I revert him on every two queries
 
Can't a moderator temporarily lock the post?
 
6:37 AM
locking doesn't prevent editing
 
Oh that's a good idea
@Kippie yeah it does
@ThiefMaster can you lock that post?
 
@Kippie Locking does prevent editing
 
Oh, thought he meant 'putting on hold'
don't think I've ever seen a locked question before
 
lol, he wasn't automated.
 
this should be exciting!
 
6:37 AM
He probably got sick of it, hasn't edited it in 7 cycles
 
Does anybody know why he wants to delete it, though? Doesn't look like an awfully embarassing question to me
 
And this kids is why you need JavaScript, to win at idiotic edit wars :D
4
@Kippie he could explain it just fine in a comment, or flag it for mod attention
 
@BenjaminGruenbaum I think my technique deterred him
If you know what I mean
 
> Rollback to Revision 80
That was absolutely not necessary
 
I basically flooded his inbox potentially hanging his browsing experience and edit war flow and annoying him
 
6:40 AM
@copy lol, this just strengthened my opinion that he's not automating it.
 
@AwalGarg Knows what I mean for sure
 
You seriously didn't have to do this, just wait for a mod to wake up
 
@AdamBarak What you did won't work since he must be logged in and on the same page seeing all the revisions and things, so inbox notifications won't work.
 
@copy which is more fun?
There is something that's a lot of fun about scripting in order to automate tasks. I don't have to tell you that :P
 
@copy But it wasn't done "seriously".
 
6:42 AM
@AwalGarg Yup
 
@SecondRikudo oh wait, if you're here - can't you ping someone in the teacher's lounge
 
@AwalGarg Wanna try? :P kidding. Anyway he should be logged in to edit and refresh the page because of the rollback stuff
 
Lol he did it again..
 
@BenjaminGruenbaum Already have
No response yet.
 
@AwalGarg Well... look at the revision number...
 
6:43 AM
isn't it? I tried on zigi before looking if it worked really
 
@AdamBarak I have already tried all this, it doesn't work.
@dystroy 109 as of now :D
 
@AwalGarg I bet you $1000 that it does. But I don't feel like testing again
 
113
Damn
 
Is there a badge for the greatest number of rollbacks in a day ever ?
 
You get that red stuff with a number in your inbox appearing and disappearing continuously for one thing
Let's stop it here, I need to work :D
 
6:44 AM
lol
 
@AdamBarak you don't have to keep looking at an idiot fighting a script, you know ?
 
What have you drunk man? — Awal Garg 6 secs ago
 
@dystroy I don't. I have a script that looks for me :P
I may be drunk but you didn't prove me wrong and brought no proof whatsoever.
 
lol that guy is almost at 3k... he must know enough already.
 
0
Q: How to return a promise from a WinJS function?

Harsha BhatI have a function which will generate the WinJS.xhr promise and return the same to the calling function. But after getting the promise, when doing a .then on it, all I'm getting is an empty array!!! APPROACH 1: Here is the function which is returning a promise: getFeaturedData: function () { ...

 
6:48 AM
Do we still need a feed on promises ? It's not new and exciting any more
 
@dystroy no please... lets please remove it.
 
I'm very tempted to rite a meta post. Being able to revert posts that quickly without user interaction really shouldn't be possible...
 
Second Rikudo has stopped a feed from being posted into this room
 
Keep up the edit war and this question will stay on the front page forever! — Awal Garg 29 secs ago
 
6:51 AM
@Feeds @SecondRikudo why?
I like those posts
 
@Cerbrus I'm not sure this often happens
 
@BenjaminGruenbaum 3 were in favor of removing it :P
Seriously though, subscribe to the RSS feed yourself
 
@SecondRikudo I'm adding it :P
It's just one feed.
There are maybe 11 and I see people from this room answer these questions all the time - not just me :P
 
@BenjaminGruenbaum may your computer shutdown before you do so.
 
6:52 AM
:D
 
There's no real problem in my opinion. If one strongly wants that feed, I'm OK...
 
Sure, go ahead
But at least let them be tagged JavaScript as well
 
Lol, he's actually manually reverting it each time, think of all the time he's wasting.
I just noticed it's up to 120
 
@BenjaminGruenbaum You can add it in the ECMAScript room... I think.
 
@BenjaminGruenbaum: 139
 
6:54 AM
lol
 
I just left that script running from like 80 revisions ago
I thought there was a system to lock questions in these cases.
 
You mean it was at 60-ish when you started?
 
@BenjaminGruenbaum There's an automatic flag being raised
 
How the heck did it even get there in the first place?
 
6:54 AM
No automatic action though
 
Oh
Well there are manual flags alreadyt
 
And it seems he was actually manually removing all the content, at first.
 
There were manual flags almost from the start. I don't get why they're not answered
 
Why is this even being done? ._.
 
Now he's manually reverting to his latest revision xD
 
6:56 AM
@dystroy sleepy sleepy
 
@Magikaas: A user and a script are being stubborn
 
Man vs machine!
Who will win?!
 
Unless the user goes to sleep, this will last forever
Oh, 155.
 
Hahaha
 
@Cerbrus Or the user has enough
 
6:57 AM
What if he also set up a script? Or can he not?
 
@Magikaas Sure he can, but I don't think he has.
 
Too irregular?
 
@Magikaas he can set up a script but his revert pattern doesn't indicate he set one up.
Yeah
 
I c :P
 
If he does - I'll stop mine, maybe I'll just stop mine anyway.
 
6:58 AM
If the user hadn't had enough after 75 reverts from his side, he sure can do another 75
And another... and so on
 
Just wait for the flag to be fulfilled and all.
 
Well, Math.random() * 10000 + 2000 ms?
Or more
 
@Magikaas: he's always reverting to his latest revision
It's not just the timing
 
Soon integer overflow on stackoverflow
 
6:59 AM
Rollback to Revision 156
Rollback to Revision 154
Rollback to Revision 152
 
Can't he pick up that revision's token by the same way you find out if there is a new revision?
 
@copy yeah, maybe the revision number is one byte
 
Hahaha
Revision -255
 
@Magikaas Of course he can, but I doubt he's that sophisticated.
 
@copy that'd be hilarious
 
7:00 AM
@SecondRikudo I guess :P
 
Maybe his scripts directly targets the db, he says to be a great SQL expert...
 
Hahaha
 
@BenjaminGruenbaum It would also not happen very soon :P
 
Then he'd just change the post's content, and keep @BenjaminGruenbaum as the latest editor
 
lol 2 votes to reopen
To prevent it from being deleted I guess
 
7:02 AM
You can't vote to re-open if it ain't closed yet.
Not sure if "Prevent it from being closed" is the case xD
 
@Cerbrus It's closed
fixed
 
Ah :P
Post Locked by Gordon♦
And he locked it with the removed content xD
 
@RyanKempt Hi mate
 
@Cerbrus fixed
 
o/
 
7:06 AM
 
@RyanKempt o/
you put on a nice show man!
 
Don't encourage vandalism.
frowns
 
@SecondRikudo I scroll but it doesn't do anything ;(
 
@AwalGarg Enter the link...
 
@SecondRikudo why should I? The image here says scroll to zoom, and it is not working. And since you shared it, you will have to fix it.
 
!!tell SecondRikudo troll
 
@AwalGarg Command trollface does not exist. (note that /tell works on commands, it's not an echo.)
@AwalGarg Command troll does not exist. Did you mean: roll, tell (note that /tell works on commands, it's not an echo.)
 
@SecondRikudo 'rov'?
 
ReOpen Vote
 
I can flag to close, but I can't flag to reopen... why?
 
7:14 AM
@SecondRikudo Is it really clear enough ? What can you do with a PHP CLI recompiled with multithread support ?
 
@dystroy I don't know. But Joe said it's clear enough.
(He's the author of pThreads)
 
I don't understand why people use PHP for CLI based apps...
 
@SecondRikudo Well... then he should comment the question
 
Joe += Watkins
@AdamBarak continue doing it, it is very enjoyable, IMO.
 
Oh, by the way: the final score is 161. Just 2147483486 short of an int overflow.
So. Damn. Close.
 
7:18 AM
@AwalGarg I left my script open on your answer and went out a bit. Glad to see it's working :D
 
@AdamBarak But it doesn't put any inbox notification.
 
var eventer = document.createEvent("MouseEvent")

eventer.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null)

var thel = document.getElementsByClassName("vote-up-off")

window.setInterval(function () {
            thel[1].dispatchEvent(eventer)
    }, 100);
@AwalGarg Strange, it did for me the other day
Well I gotta work damn it, I'm wasting time
 
@AdamBarak it shows a green icon in the rep count box, then removes it... that's all. not at all annoying.
 
@AwalGarg Doesn't it reappear another time and disappears thereafter?
That's what you're saying?
 
@AdamBarak it keeps doing that yes,
 
7:21 AM
@AwalGarg Ok :-) Either devs fixed that by setting the notify timeout higher or I don't know
Not that I care very much, just curious
 
hehe
 
btw @SecondRikudo do you know the story/meaning behind the sentence - "it's turtles all the way down"?
 
@AdamBarak lol I got IP blocked almost instantly
 
Any idea why that'd be downvoted? stackoverflow.com/a/25637431/1348195
 
7:24 AM
@BenjaminGruenbaum Revenge?
 
Think it's the edit war guy :D?
 
No idea
 
@SecondRikudo hehe. Actually the IP block stays for a few seconds to let it calm down :P
@BenjaminGruenbaum Don't worry, I fixed that for you.
 
Gonna get another downvote there pretty soon from the guy who posted the other answer :P
He posted:
No idea, I just passed along the linked Gist. — Interrobang 12 mins ago
There is no way I'm not replying to that with "dafaq are you telling me you posted code you don't understand as an answer?" :P
The notion of "I just posted code and I have no idea how it works" is terrifying to me. Sorry but if you post code here own up to it and if there are wrong things about it fix them. — Benjamin Gruenbaum 11 secs ago
 
It's not me this time, guys ;-) Just wanted to let you know
 
7:28 AM
Who's up/unup voting the accepted answer all the time :/?
 
@BenjaminGruenbaum Not me this time. Someone must have seen my script above and be using it on that answer
 
i hate the dom even more now :(
@AdamBarak lololol people are crazy!
 
@AwalGarg I know haha :-)
 
anyone here au fait with amazon web services?
 
it is oscillating with even more amplitude. seems like two people are running the scripts together.
 
7:32 AM
what the hell
shouldn't they already IP blocked?
 
@AwalGarg *higher frequency
Oh wait
 
@copy nope. amplitude is the correct word... and you can bet me on that.
 
Yeah, both ways make sense
 
looks like one of them stopped their script.
@copy no frequency doesn't make sense.
 
That depends on the phase
 
7:35 AM
frequency is how many times per second. Amplitude is how much... and because the script is firing every 100ms, the number of times per second will remain constant. only the amplitude will change.
 
idiots -_-
 
no matter you run it parallel to 100 other same scripts or million.
 
How the hell are you not getting service blocked?
 
@AwalGarg Think again
 
@whoEverIsRunningThatScript man you must be Chuck Norris.
@copy meh... I don't think you know what you are talking about, but frequency is constant in that context.
 
7:40 AM
Morning :)
 
JavaScript chat. Breaking SO one script at a time.
Goddamn... Why are (some of) you guys even using that vote fuck-up script?
 
Yeah that's just annoying :/ It's abuse and people using it probably will be banned.
 
^ This
 
Writing a script like that and using it on yourself for a minute is fine. Running a script to cheat the system into something you wouldn't do yourself is abusing the system.
 
Abusive, harassment of the poster...
 
7:43 AM
If you abuse the system you'll have a bad time, and you'd have no one to blame but yourself.
 
I hope it is not one of you regulars here since I still need to learn a lot of JS.
 
if(message.author == "Awal Arg"){hide()}
 
I think it just stopped.
 
Nope
There's probably 2 of'm at it right now
What idiot posted a script like that in the first place?
 
@Cerbrus Error: hide requires exactly one parameter. 0 given at line 1
 
7:46 AM
No it doesn't. hide is a functions that hides you wife, and hides yo kidz.
 
lol
 
And last, but definitely not least, it hidez yo codez
 
j/k
 
I'm not my wife, nor my kids
I don't even have any xD
 
@Cerbrus neither do I \o/
 
7:47 AM
Freedom!!!
 
DOM is free?
 
@Cerbrus I suppose it is a good thing you aren't them then.
2
 
Yea, that'd be awkward, @Neil.
 
Lol that script is still running... man!
@SecondRikudo Are you sure didn't leave that script on?
 
There's 2 running.
 
7:51 AM
I wonder what would happen if someone did that with Jon Skeet's post :P
 
SO would explode.
 
did anyone read the good parts JS book ?
 
Seriously, why would that be any different than this post?
 
// Augment myObject with a double method.
myObject.double = function ( ) {
var that = this; // Workaround.
var helper = function ( ) {
that.value = add(that.value, that.value);
};
helper( ); // Invoke helper as a function.
};
// Invoke double as a method.
myObject.double( );
document.writeln(myObject.getValue( )); // 6
Can anyone tell me how this returns 6
JavaScript good parts, page 29
 
What is myObject?
 
7:56 AM
by the name of it, I would say it's a object :-)
 
everything in js is an object or a primitive, and we can treat almost everything as an object. the output value six depends myObject itself and seeing the snippet, there must be a 3 somewhere :P
 
@CustomizedName Your object, nonetheless ;)
 
haha true, it's myObject xD
 

« first day (1418 days earlier)      last day (3521 days later) »