« first day (1307 days earlier)      last day (3647 days later) » 

2:00 PM
Sometimes I gain faith in SO, and then I get reminded of stackoverflow.com/a/18392440/1348195 - Cargo cult is the best kind of cult.
 
@NatZimmermann important thing is that it's not meaningful until you specify how that's supposed to be read. You wrote data that's not information.
 
user1596138
@square You're using FB.api('/me',
 
user1596138
And FB.login(function(response)
 
user1596138
Is that helpful
 
@BartekBanachewicz you should read it with your mind. does that help?
 
2:01 PM
@NatZimmermann do you understand the difference between data and information?
 
@BartekBanachewicz probably not
 
programmers in 2014 everyone.
 
"programmers"
 
why am I not working in Starbucks yet.
 
who said I was a programmer?
 
2:03 PM
you're in a JS chat on stack overflow
go figure.
 
oh shit I thought this was the kool kidz klub
 
that'd be "Functional Programming" chat
 
JSON.parse("")
SyntaxError: Unexpected end of input
what
 
!!afk :kfa
 
2:05 PM
why
god
why
 
why are you using json when you could just use binary?
 
please read up on the difference between data and information.
honest advice.
 
Mornin gents
@BartekBanachewicz <3
 
@BartekBanachewicz I hope you realise I'm joking... You really need to get your sarcasm detector sorted out
 
@BartekBanachewicz In the official spec a valid JSON text must be the encoding of an object or of an array. Which is sad.
 
2:09 PM
@dystroy I thought empty data would be interpreted as an empty array
but apparently you need [] for that
 
An empty array is "[]"
 
^
 
In fact it's totally invalid as there's nothing that's encoded as an empty string
!!> JSON.parse('""')
 
@dystroy ""
 
that's great
 
2:10 PM
@dystroy a JSON object is also a string, etc.
!!> JSON.parse("true")
 
@BenjaminGruenbaum true
 
anyway I needed a more complicated objects after all
 
the reason I gave regarding a valid json text was wrong : JSON.parse doesn't bother to follow the spec
 
soo, jsPlumb stops sending me events after I load my objects
for whatever reason
maybe because I'm calling .reset() -.-
 
@dystroy wait what?
 
2:11 PM
and that cleans up event bindings too, eh.
 
@BenjaminGruenbaum many JSON parsers (in other languages) fail when given the encoding of an empty string
 
because they want an object or an array, not a string, a number, or a boolean
and in the spec it appears they're right
 
great
my data model is now fully separated from the jsPlumb
I just need "detach" event now
 
Any expert in IE8 replace function here ?
0
Q: JS cross-browser solution for replacing '$' character with double '$$' character

gztomasI have tried the following: var stringToBeReplaced = "$"; var result = stringToBeReplaced.replace("$", "$$$$"); It works in modern browsers and I get "$$" in result. But for my surprise, when I run it over IE8 or older, I get "$$$$" in result. Is it a browser bug? Is there a cross browser solu...

 
2:14 PM
3
Q: jQuery: Select the first element of several sets

Tyler DurdenI have an awkward problem, due to inheriting a shedload of really, really badly formatted HTML. Basically I have some table rows like this: <tr class="odd">...</tr> <tr class="odd">...</tr> <tr class="odd">...</tr> <tr class="even">...</tr> <tr class="even">...</tr> <tr class="even">...</tr> <t...

how would y'all do this? I figure a querySelector loop of some sorts, but I'm not entirely sure
@dystroy somebody literally insta-downvoted you =x
 
@Jhawins yes
fb api
 
user1596138
@square I don't really care to spend much time on such a trivial task... But stop using ALL the fields. Use the required fields only. Never try to debug more than you need to.
 
user1596138
Get the most minimal post to work and follow the Graph API examples and docs and you won't have any problems.
 
i used that but not getting
@Jhawins
 
user1596138
I mean what is this shit?
 
user1596138
2:22 PM
} else {
             alert("User cancelled login or did not fully authorize.");
             console.log('User cancelled login or did not fully authorize.');
             }
 
if fail the
then
 
user1596138
You're botching copy/pastes. How do I know? Either that or you can't make your mind up on methods of getting info or single quotes vs. double quotes.
 
i want to check
 
alerts make me cry D:
 
^
 
2:23 PM
I wish ES6 had strong enumerations
 
I have them all removed by gulp
it "broke" our app lol
so they implemented dialogs at least made me happy
 
@Jhawins what i need to change
 
@BartekBanachewicz what's an enumeration?
 
user1596138
@square Looks like you added the alerts. And that makes me think you just didn't know how to see the console
 
!!define enumeration
 
2:24 PM
@RUJordan enumeration The act of enumerating, making separate mention, or recounting.
 
user1596138
@square Your attitude mr.
 
@RUJordan it's a data type that has a finite, statically defined and checked set of values.
 
This looks crazy. My answer seems to be better and it gets dowvotes while the other one is upvoted...
12
Q: Select the first element of several sets

Tyler DurdenI have an awkward problem, due to inheriting a shedload of really, really badly formatted HTML. Basically I have some table rows like this: <tr class="odd">...</tr> <tr class="odd">...</tr> <tr class="odd">...</tr> <tr class="even">...</tr> <tr class="even">...</tr> <tr class="even">...</tr> <t...

 
user1596138
Your question isn't even a question... It's a "fix my code please"
 
user1596138
0
Q: Facebook wall post error : The user hasn't authorized the application to

squaregot error when i want to post text in facebook wall . this is my code function logout() { FB.logout(function(response) { alert('logged out'); }); } // i am able to login successful . using this method . function login() { FB.login(function(response) {...

 
2:25 PM
@BartekBanachewicz hrm, sorry, do you have an example/know of one?
 
user1596138
got error when i want to post text in facebook wall .
this is my code
<code>
// i am able to login successful . using this method .

<code>

// here i call this method to post the text in FB wall . and i am getting status logged in a but i got error .
 
@flakyfilibuster 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
That's your question's actual body text. Not "this was being wonky" or any effort. And you're using the Graph API. You're not actually using the docs or there's no way in hell that's what you'd have done haha
 
@dystroy I bet half of BoltClock's upvotes are people trying to suckup to a mod :P
 
data State = Ready | Running | Finished

function f (s : State) {
    switch(s) ...
}
 
2:27 PM
Ah
I'm assuming that's not JS though, since you said it has weak enumeration?
Further assuming because JS is so dynamic most of everything is mutable?
 
I don't think JS has any enumerations as a language feature
people just use strings
 
user1596138
22
Q: iPhone Simulator Can't Be Lauched?

Arildo JuniorWhen I press Run on Xcode with other tasks already running, the following message appears: Simulator in Use. The Simulator can't be launched because it is already in use. I checked with some friends and when they press run, Xcode automatically stop the tasks running and run the app you w...

 
Ohhhhh
 
user1596138
How is this +22?!?!?!
 
user1596138
!!!!!!!!!!!
 
user1596138
2:28 PM
What the absolute fuck
 
@Jhawins +13 for an answer that says "Quit Xcode and relaunch"
wow
 
@RUJordan they make your life easier, because inside of f the fact that s can have only 3 possible values is an invariant.
and you can capture a bad value outside of f
 
user1596138
Yeah I'm amazed right now. That's one of the dumbest trash questions to ever not actually make it into the trash, and get >20 upvotes!
 
But you can do that without an enumeration, no?
 
@RUJordan you can check or you can pass arbitrary value? The latter is obviously true, but the former requires additional effort/wrapping/ugly hacks
unless you have a tool that does more complex static analysis, of course
or dunno, use TypeScript :P
 
user1596138
2:31 PM
@RUJordan I guess I had actually flagged that question over a year ago already.
 
user1596138
The first comment is from BoltClock♦ lol. That's just sad
 
you can verify if s is a proper value from inside of f, and that's what I'd rather avoid, because it makes code messier
unfortunately, it seems to be an idiom that's common enough :F
 
God I feel like I'm talking to a dictionary @BartekBanachewicz xD I have to lookup so many words
 
@BartekBanachewicz you have an interesting profile
have never seen someone with a paypal button on it
 
@Loktar I've actually stolen the idea from Lightness :)
 
2:35 PM
hah nice
 
he verified it's ok on Meta so I kinda did mine as a joke
 
@Jhawins This guy should not have been elected moderator, obviously
 
@BartekBanachewicz lol has anybody donated?
 
@RUJordan last time I've checked, nope
 
user1596138
@Loktar lol I contemplated "Did I help you today? Instead of serial upvoting me (because I'm that great, you totally would) you can buy me a pizza! <paypal button>" or similar. There are some fun people on here. But I lost interest in Main before I got to 1K :P
 
2:44 PM
ha
 
haha that would be awesome @Jhawins
 
user1596138
@Loktar Steal it ;). You actually use main haha
 
lol nah id rather have upvotes than pizza, they're healthier
 
0
A: Simple method of client javascript communicating with server node.js

RUJordanI use the same NodeJS + MySQL setup. If you already have your app going, I suggest installing socket.io. Otherwise, look into Express.IO which is a framework for NodeJS development with Socket.IO integrated into it. Websockets make AJAX look silly! In NodeJS, you listen for io.emit("someEvent"...

did I put too much effort into this? Are websockets > ajax?
 
I wouldn't use websockets for that apart if websockets are already part of the application because it makes everything harder in the network/proxy/firewall realm (and it means more users unable to use the feature)
 
2:56 PM
Bope, never used them
 
autocompletion with standard ajax works fine IMO
 
hrm
sweet moses...
-4
Q: my custom cursor code is not working in IE

user3569089This code is working great in firefox n chrome but not in Internet Explorer. Please me some solution. $(function(){ div.cursor_green { cursor: url(pncl_green.png), auto; } });

 
@RUJordan Did you see the chaos you created?
2
Nice one, BoltClock! — RUJordan 42 mins ago
 
@SomeGuy all in a few minutes work :cracks knuckles:
 
@ramesh 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.
 
3:02 PM
in bootstrap, does a progress bar reaching 100% cause problems for anyone else?
 
Hi
 
@ramesh hello
 
hrm, sweet moses again, I can't believe some of the questions today, and the answers are even worse
0
Q: How to get title tag using jQuery?

Sushil KumarI have some html in string form. var html = "<html><head><title>Some Text</title></head><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>" It has title tag inside it. How can I get the text inside title tag using jquery or javascript?

 
user1596138
 
user1596138
Well fuck you too North Korea lmfao
 
3:06 PM
Oh God, I'm leaving !!
0
Q: Can you run jQuery in a JS Function?

MatthewI have this code function toggleMenu() { if(menuStat == 1) { // Horizontal Linear Menu alert("Working"); $("#mainMenu").animate({ left: "+=50" }, 1000); } else { // Vertical Linear Menu // } } The a...

 
lol...
> html.substring(html.indexOf('<title>')+7, html.indexOf('</title>'))
 
@adeneo jQuery should make you take a JS test before downloading it...
3
Jesus
 
@adeneo I'm sure it's a duplicate, also...
 
0
A: How to get title tag using jQuery?

rameshYou can get that text by using this jQuery selector. $(function(){ var titleHTML = $("title").html(); alert(titleHTML); });

 
@Jhawins LOLWUTISTHAT
 
3:09 PM
@ramesh - the right answer is still
document.title

Maybe not from a string, but it doesn't appear like the OP is really asking for a string, but the title from the current document
 
user1596138
@RUJordan That is Kim Jong Un's newest game. Still in production
 
@ramesh Pfff... you make me lose my precious rep in downvoting you
 
user1596138
Basically he destroys murica and sets our flag on fire lol
 
user1596138
And rides a unicorn
 
user1596138
3:13 PM
Is it just my area... Or does everyone "do graphic design" by simply choosing fonts
 
@Jhawins - What a great idea for a game, looks awesome !
 
user1596138
The last 3 people I asked to do this thing for me have literally just chosen some dumbass font (one chose bleeding cowboys), given it an outline and pretended it was some amazing piece of work I couldn't have mirrored in MS paint and I hate design.
 
@adeneo lol I thought the same thing but I can't bring myself to play it
 
lol...
You will go to hell. Read the question once again, He asking that's only. — ramesh 58 secs ago
 
killing the American airborne makes me cringe :?
 
user1596138
3:15 PM
-1
A: How to get title tag using jQuery?

achObviously not preferred if you can use jQuery, but for pure Javascript: /<title>(.*)<\/title>/.exec(html)[1]

 
posted on May 15, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Exclusive comic at The Nib this week!

 
user1596138
lol he said pure JS is not preferred and to use jQuery if you can
 
user1596138
Why is everyone siggesting regexp and such? This guy is obviously going to use that html. Just get the info after it's been parsed for realz or before it gets put into the title
 
And they just keep coming! This looks okay, and it's just a matter of parsing some url's, but why .......
0
Q: How to find the most specific file with client side JavaScript?

WabbitseasonUsing only client side JavaScript I need to find the most specific data file for a given web page, depending on its pathname. Let's say I'm on example.com/foo/bar, and for the /foor/bar pathname the following data files can possibly exist: /data.js /foo/data.js /foo/bar/data.js It is entirel...

 
dys@dys-tour:~/dev/miaou> git commit -am "!!audio"
git commit -am "git statusaudio"
[master fe2e3a7] git statusaudio
can you spot it ?
 
3:24 PM
haha I'm goign to submit an answer to that @Jhawins
 
user1596138
@Loktar Make it good lol
 
@dystroy that comment tho xD omg that's too funny
 
its not but it makes me lol
 
user1596138
The jQuery solution with +9 is pretty damn good honestly. That's what I would've done but in pure js lol
 
user1596138
An actually useful and justifiable line of jQuery
 
user1596138
3:26 PM
Now go find 500 more uses for it to make it worth it :D
 
0
A: How to get title tag using jQuery?

LoktarThis is my crack at it. Create a documentFragment add an element to it and use querySelector to get the element and then textContent to get the text. var html = "<html><head><title>Some Text</title></head><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>", docFrag = doc...

 
Hahaha
Brilliant
You should probably mention that you're kidding for future visitors
 
well I'm only half kidding :p
I would rather do that than use regex or jquery
 
Ooh, I didn't notice that it was a string
I thought he just wanted the title of the page
 
yeah thats what makes it annoying
because you have to get the element from a string
 
3:28 PM
Why is the document.title comment upvoted so much?
 
id rather use dom methods to do that
 
Yeah, seems fair
 
I showed the devs here how to do that.. similiar situation
they needed to select elements and remove them, they were using regex on the serverside but it was messing up because users can modify the html
They wanted to create a hidden iframe and add all the content to it
hahah the funny thing was they talked shit about not being able to use remove
because jQuery doesn't select on a documentFragment
I was like oh shit you are going to have to use real dom methods and actual JS!
 
Hahaha
Must have been a nightmare for them
 
Hmm, it looks like I have a bit of a heat rash on my forearm. It hurts :(
 
3:31 PM
lol it was I taught them about classlists querySelector, querySelectorAll
the problem is they think they are just "documentFragment" methods now
Im like no no.. this is the real shit..
 
user1596138
lol...
 
but they don't get it
 
Hahahaha
 
lol @Jhawins
I'm putting this on all my production sites ASAP. Thank you @Loktar! Everyone use this solution — Jhawins 1 min ago
 
what's ASAP?
 
3:34 PM
@adeneo wtf nice
+1
I've never used DOMParser
 
Yup, I wasn't going to post it, but once you added one with fragments, I thought why the F not !
 
not supported in Safari? Thats weird
 
@Tod1d 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.
 
@t1wc A modular jQuery plugin to do things as soon as possible
@Jhawins hahah whatever — Loktar 3 mins ago
Hahahaha
 
damn @adeneo that is really damn cool actually, I wish it had a tad bit wider support (safari mostly) and we would use that here instead of the documentFragment... I cant even remember why we had to use that instead of jQuery filter...
 
3:37 PM
@adeneo Nice. I didn't think I would learn something in that thread... I thought I would only go to hell...
 
Not sure why it doesn't support HTML in safari, seems to support XML, so that's really weird ?
 
yeah seems really dumb on there part
 
Maybe because it's not so terribly useful ?
 
we only support ie9+ here, but we have one user on safari.. one important user
its really frustrating.
 
@Lo
 
3:38 PM
damn, mdn is dead
> Service Unavailable

The service is temporarily unavailable. Please try again later.
 
^ we should shut down this chat then
 
lol
 
it's back
 
Oh good, I was about to panic O:
 
Yes
 
3:40 PM
No
 
Maybe
 
What's the question again ?
 
Hi all,
How is working this chat with out ajax ?
 
why do you think there's no ajax ?
 
@ramesh we've harnessed magic
 
3:41 PM
and by the way, ajax is a fuzzy word
 
I get chat text from with out ajax url hit in console!!!
 
We don't need ajax, we have ten of these
 
you mean http requests ? Then it's because it uses websockets
 
@RUJordan U funny dude!!! I know about js and jQuery.
YEes.
 
@RUJordan YOU BURN IN HELL
 
3:43 PM
@adeneo hamster.js
@Loktar nuuuuuuu D:
 
lol
 
I hope my answer to what looks like a valid question isn't lost in that trolling ^^
 
@dystroy I saw it <.<
 
@RUJordan Yes but you already did know that
 
3:45 PM
@dystroy where at?
oooh you mean the websockets
 
I can't figure out why the facebook API is returning an empty array for photos in the Timeline Photos album... There are two publicly shared photos.
 
yes
!!afk
 
!!mdn WebSockets
 
!!google socks
!!undo
Sexy Socks? People these days...
 
user1596138
3:53 PM
@Loktar Hahaha
 
Wow how does somebody gain 50,000 reputation in one year.. that's crazy
 
will it work on Internet Explorer?
 
!!> document;
 
@jAndy "ReferenceError: document is not defined"
 
3:54 PM
I am now the Jon Skeet of Puzzling.SE. It probably won't last long, but it still feels good.
 
why would I ever use document.implementation.createHTMLDocument() over document.createDocumentFragment() ?
 
@KendallFrey grats
@jAndy woah have never heard of document.implementation.createHTMLDocument
 
Time to get back to work, lol
 
> This example creates a new HTML document and inserts it into an <iframe> in the current document.
 
afaik the only difference is that using createHTMLDocument is, that it creats a completely independent NEW document
 
3:55 PM
yeah sounds resource intensive idk
 
but I don't see any usecase
 
user1596138
@RUJordan jon Skeet has 38K this year lol
 
well documentFragment is pretty limited in what you can use on it
it doesn't have the complete dom specification, however I have never ran into issues with it
 
user1596138
Because everyone goes "Oh Jon Skeet! Upvote"
 
must be great super to be a superstar
 
3:56 PM
also documentFragment is supported all the way back to IE5 I think?
 
@Jhawins - yeah, that's it, has got nothing to do with posting answers like this
5026
A: Why is subtracting these two times (in 1927) giving a strange result?

Jon SkeetIt's a time zone change on December 31st in Shanghai. See this page for details of 1927 in Shanghai. Basically at midnight at the end of 1927, the clocks went back 5 minutes and 52 seconds. So "1927-12-31 23:54:08" actually happened twice, and it looks like Java is parsing it as the later possib...

 
Said the guy with 116k rep, sarcastically.
:P
 
user1596138
@adeneo You're not refuting the fact that people simply upvote the name :P
 

« first day (1307 days earlier)      last day (3647 days later) »