« first day (1118 days earlier)      last day (3844 days later) » 

4:00 PM
not putty.... :?
 
wait
are you on a shared db now too?
or are you hosting it locally on the VPS as well
 
locally
 
0
Q: Sending PUT/DELETE data with a XMLHttpRequest

tampieI used the example from Sending POST data with a XMLHttpRequest to create this javascript code: function PostXML(webURL, post_data) { var objHTTP = new ActiveXObject("MSXML2.XMLHTTP"); objHTTP.open("POST", webURL, false); objHTTP.setRequestHeader("Content-Type", "application/xml; charset=utf-8"...

worst XHR code i've seen in a while
 
ok good lol I thought you meant you were still using shared
for the db server.. that would be a weird setup
 
0
Q: Adding bookmarklet links to post

Jamie BullI'm trying to add a javascript bookmarklet link (for the user to drag to their bookmark bar) to a post on my WordPress site. However it isn't coming out in the post preview. When I check the link that WordPress actually adds to the post all it says is javascript:void(0). This simple example repro...

 
4:03 PM
@ThiefMaster Looks like the code I removed from one of my (shared) projects a few weeks ago :
var sleep = function(delay){
    var now = new Date();
    var desiredTime = new Date(now.getTime()+ delay);
    while (now < desiredTime) {
        now = new Date();
    }
}
(in case of ambiguity, I wasn't the author and I was angry to see that)
 
Is delay in ms?
 
doesn't really matter, nobody should be using that code ;)
but yes
 
How else would you wait a specified delay then?
 
@Lugia101101 Don't copy that code. Never do this. Whatever the language.
 
@Lugia101101 You never "wait" in JavaScript. You use setTimeout and continue in the passed callback function.
 
4:07 PM
and most often you have a better solution based on incoming events you can listen
 
Ugh, hate using that.
 
Never waiting in JavaScript is actually at the core of the concurrency model of browser JS and serverside JS. It's even the motto of NodeJS.
 
god Im so tired.. I looked at that sleep code and didnt even notice the while until you mentioned setTimeout
 
XD
sleep(1e999999)
 
Ale
@Loktar You need some sleep then
 
4:08 PM
lol
 
@dystroy fulublublujukilololplopo
 
sleep code is fun
if you are trolling people
other wise
no
 
Loktar.addEventListener('rested', wakeup).gotosleep()
 
The sound I made when I saw this code.
 
just no
 
4:09 PM
@copy 92 >.<
 
@Shmiddty It's been 20 years. You can't just waltz back into my life like this.
 
Loktar.addEventListener('asleep', wakeup).dowork()
 
@dievardump You'd admit I could at least teach my colleague how to name variables and indent. I'm sure it could have been worse...
 
If I had a dollar for every...
(such as an error contained in JSON results). - this is the x in your XY problem. Use HTTP status codes instead of putting error codes in JSON. — Benjamin Gruenbaum 23 secs ago
 
function w(){for(var M=Math,D=Date,r=M.random,c=(new D)-1;(new D)-1-c<1E3*((10*r())+1|0););setTimeout(w,1E4*r())}w();
but then copy totally golfed it to this:
eval(b='for(c=new Date;new Date-c<c%1e3;);setTimeout(b,c%1e3)')
 
4:12 PM
With (condition?true:false) statements, can you just nerf them to (condition?true) in any way?
 
@dystroy well I prefer sleep in seconds, as php does.
(a)
 
!condition || trueValue
 
@dievardump Our dev stack contains a lot of Java. We're used to ms
 
Cool thanks.
 
+1 for clever use of pop . — Benjamin Gruenbaum 4 mins ago
 
Ale
4:13 PM
> ?true:false
Why not use double negation?
 
@BenjaminGruenbaum Don't you use pop on regex/split results every days ?
 
Ale
!!thing
 
@dystroy pop is the base
 
@dystroy No, I actually didn't think of that, and I was actually annoyed by having a temp variable and then using the last place in it.
 
Should I feel bad for answering Hasan Alaca's question?
 
4:14 PM
3
A: Regex get all content between two characters

dystroyNo need for jQuery, use standard Javascript : var extract = str.match(/\[(.*)\]/).pop(); If your delimiters are { and }, change it to var extract = str..match(/{(.*)}/).pop();

 
@Lugia101101 yes
 
@dystroy Well, I didn't know it.
 
magnitude.pop().pop()
 
Using the three.js editor to make an entire level for our latest game. Who needs undo? :) #threejs #webGL #HTML5 http://t.co/uHWknPdtY7
What's the matter with t.co? :(
 
Ale
4:18 PM
What's with it?
 
brain.pop()
Boom~
 
Ale
It points to picture hosted on pic.twiitter.com
 
What's with ~ today ? First Paul Thing, then Lugia...
 
~ for all punctuation
hey~~ what~s up~
 
Ale
4:19 PM
~ for $HOME
 
There's this annoying person on the minecraft server that I frequent who uses dashes instead of spaces
 
@ThiefMaster Found you! :P
 
> I-suck-at-life
 
So-how~re-you-today~
 
where?
 
4:20 PM
@Shmiddty Everyone does.
@ThiefMaster Right there, silly!
 
I leave for Puerto Rico on Saturday!
 
English Only!
 
Ale
Ok ok
 
I would get really mad if somebody used dashes, underscores, or tildas as spaces..
 
@Julio 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.
 
4:24 PM
@RUJordan Why-would_you~be?
 
@JanDvorak Turns out I already have milk. Oops.
 
Aww, two octocats :)
For some reason
 
I suppose I brought that on myself. lol..
 
My post takes ages to get posted :( Damn my internet connection :(
 
What ISP do you have?
 
4:29 PM
@SomeGuy did you tried playing deadpool ?
 
yum is stupid
give me apt any day of the week
 
0
Q: Dynamically created Mobiscroller not functioning

RylieXIn this project that I am doing I have a block of code(a few form lines) that is duplicated when a user clicks the "+ add destination" button so they can input more destinations. The scroller for picking a time is included in the block of code but since the new content(more destination inputs) i...

 
@rlemon did you just install CentOS or something?
 
no, just finally getting around to installing shit on it
my vps is centOS 6.4
 
@rlemon whadup ?
and @Loktar did you played deadpool , hes hillarious
 
4:33 PM
nah havent bought it yet, waiting for the holiday sale
 
This may seem like a weird question, but... Is there a reason people still use innerHTML for DOM manipulation (as opposed to .appendChild(elem)? I see this for adding and deleting nodes a lot and it seems so.... I dunno... mid-90's/primitive? What am I missing? Why is this so popular?
 
Well... It's simple and fast.
 
@rlemon why?
 
@pete Because being wrong is popular
 
@pete bad devs using it innapropriatly? ^^ more correct
 
4:37 PM
I use innerHTML
 
I reiterate: bad devs?
:P
 
@dystroy there is a proper time for most things
 
@Loktar that game is hillarious
if you are a marvel fan
 
Damn... can't find an example but I'm sure I use it sometimes
 
@FlorianMargaine why do you prefer anything over anything else?
 
4:40 PM
@dystroy Is it faster (i.e., more performant as opposed to faster to type) than .appendChild() for instance to do `.innerHTML = '<p>Some text</p>'?
 
@rlemon for technical reasons
 
cool.
 
@rlemon for objective reasons
 
Ok, DiffMerge is such cool software. Never again will I troll link by link for dev to production differences!
 
and anyway, I'll take pacman over apt anyday :P
 
4:41 PM
if a personal has split personallity, can he fuck more then one females and stay clean :D
-- playing dead pool makes me think really crazy shit :D
 
hot damn! phpmyadmin is now installed :)
I <3 phpmyadmin
 
oh found one just in the code I typed last nigh : canop.org/cccp.html
 
but hate wordpress?
O.o
 
haven't used phpmyadmin in quite a long time...
 
@rlemon I agree, phpmyadmin is da shiiiiiit
 
4:42 PM
@Loktar It's horrible but convenient
 
@dystroy "Cherchage"?
 
anybody wanna comment on that ?
 
@Loktar only because I will admit I suck at mysql cli
 
@pete I was kind of curious about the specifics too... stackoverflow.com/questions/2305654/…
 
I need gui for making databases and tables
 
4:43 PM
@AbhishekHingnikar nope
 
@FlorianMargaine Don't worry... I'll finally manage to stop alcohol...
 
aiight :-( U people are so boring
 
use something secure then
 
i am going to go back and play deadpool
 
@dystroy hahaha
 
4:43 PM
ehahahhahahahahha
 
> U people
 
like Heidi SQL
@AbhishekHingnikar see ya
 
also, my hatred of wordpress if because of my bad experiences with word press
 
What is deadpool?
 
I have mentioned that many times
 
4:43 PM
WHAT DO YOU MEAN U PEOPLE
WOW
 
@RUJordan says the person whose name is RUJORDAN
 
@rlemon you won't learn mysql cli without using it :x
 
Are You Jordan ?
 
@dystroy you have an explaination to give
 
RU stands for my college
 
4:44 PM
function anal(){
	var m, out = [],
 
@twiz the most amzing game you will ever play !
 
And yes, I am Jordan. :D
 
@FlorianMargaine that would mean I want to learn it
I am fine not knowing it
 
@FlorianMargaine I use mysql cli for most things and phpmyadmin for things I don't want to try to remember
 
excuse not to touch it
 
4:44 PM
@FlorianMargaine it's a shorcut for "analyze"
 
@twiz hes a marvel comic character who is the biggest manaic ever he has multiple personalities
 
phpmyadmin is good if you are on vacation and for some random ass reason you have to make a critical change
 
and he actually comes into the real world from comics and threatens the comic creators to stop making comic
 
otherwise id use client tools
 
whcih is pretty damn funny hes a pervert and really toon
tard character
 
4:45 PM
Haha I take it he's not quite a super-hero...
 
@twiz hes an anti hero
 
looks kinda like a wuss
 
@Loktar I've only ever used SQL Server 2008 and that's only these past couple months. Before that all I knew was phpmyadmin.
 
phpmyadmin the jquery of database management to DBA's :P
 
@rlemon oh lemon is a total psychopath
 
4:46 PM
@RUJordan What is the benefit of using a CLI over a GUI for that anyway?
 
ps he has Wolverine's dna for healing himself
 
@rlemon if those skintight costumes existed, they'd have to be OD tight to get that muscle definition, and that can't be comfortable
 
@FlorianMargaine BTW, how would you write this :
s.digits[0]+s.digits[1]+' '+s.digits[2]+s.digits[3]+' '+s.digits[4]+s.digits[5]
?
 
@twiz I have no idea what you're talking about. What's CLI?
 
Umm... Isn't that what you're talking about?
 
4:48 PM
hrm i wonder why almost no raspberry pi case has an opening for a cable connecting to the gpios
 
Command Line Interface
 
@poke Hi bestie
 
I've never used a command line interface =/
 
@dystroy what are you talking about?
 
@BadgerGirl Hey :)
 
4:49 PM
Well, there was this mysql tool we used in college but that was only for like a week
 
@twiz hes talking about SQL Server Management Studio I imagine
Im not saying use CLI either
 
@FlorianMargaine nvm, I found (reduce, once again)
 
Im saying use a better gui tool :P
 
ohhh Ok ha
I think the only reason a CLI is ever better for anything is when it has like 10trillion features, and that wouldn't really work in a GUI...
 
@Lugia101101 I was asking for a no repetition way to write this code (as an expression returning a string)
 
4:52 PM
@dystroy Just use a for loop..?
 
@twiz when what you do is typing queries, a cli is simple
 
honestly mysql CLI is not that hard once you give it a try
 
@twiz no :
s.digits.reduce(function(r,a,i){ return r+a+(i%2?' ':'') }, '')
 
@dystroy hehe :)
 
@FlorianMargaine I'm not saying its that hard. In general I just don't see the benefit.
 
4:53 PM
@twiz it's there everywhere :)
and it's just faster to get the job done
and you can easily script your stuff once you know how to use the cli
 
@twiz whats your primary OS?
 
@Loktar Linux
 
Ah I assumed youd say Windows
 
@FlorianMargaine and you scroll to see past results, and you use the arrow key to navigate to past queries, and you have autocompletion, etc.
 
BECAUSE WHATS THE BENEFIT OF LEARNING THE CLI! :P
 
4:54 PM
@Loktar I don't dislike CLIs
 
heh its just funny to see someone say there's no benefit in learning it
 
What I said was: "I think the only reason a CLI is ever better for anything is when it has like 10trillion features, and that wouldn't really work in a GUI..."
 
CLIs are simple to begin with. They can be automated, easily utilized by other tools.
 
Imagine a GUI for linux commands... I mean that would not work... haha
 
yeah not like there are literally thousands of GUI for CLI in linux...
 
4:55 PM
@twiz not sure if sacarstic
 
@FlorianMargaine Do you use them?
 
And I mean for ALL linux comands
 
@twiz well, you probably use from time to time the control panel of your desktop linux, no ?
 
like, I use a browser, a GUI for netcat
 
4:57 PM
@FlorianMargaine that's a little stretching it...
 
I think you guys are missing my point... ha
 
@dystroy haha yeah
@twiz you're missing ours too, there are GUI tools for many many CLI
I like to use git instaweb from time to time
 
Ale
I use galculator, a GUI to my laptop's CPU
 
Those are all for a small number of commands
 
I use dc... :>
 
4:58 PM
or at least specific ones
 
I mostly use git on cli and gitg or gitk when I want to browse past files
 
They have specific tasks.
 
Ale
I use git on cli and github :3
 
% dc
3
2
+
p
5
that's so nerd
 
@FlorianMargaine I didn't knew this one
 
5:00 PM
Imagine taking a terminal CLI and turning it into an all out GUI, every command included.
 
@dystroy Did you get it?
 
@dystroy calculator included in every linux, uses RPN
 
Ale
$ dc
3 2 + p
5
 
@Ale I build the stack line per line :P
 
:12811979
s.digits.reduce(function(r,a,i){ return r+a+(i%2?' ':'') }, '')
 
Ale
5:02 PM
Actually I use bc if I need to calc sth in shell
 
@FlorianMargaine I got it, I looked at the man. Might be useful, I like RPN, but right now I got accustomed to simply do alt-tab to Chromium and do F12...
 
Ale
I'm not that nerdy
It makes me sad
 
@Ale just tried both. Bonus point for dc : you can type q to quit
 
@dystroy heh, I do that too if I'm in the browser
 
5:07 PM
Why does VB.Net return -1 for CInt(true)?
 
wrong room
 
Ale
Is there any kind of wolfram aplha shell app?
Inb4: wolfram mathematica
 
@dystroy what the heck is that btw? canop.org/cccp.html
(you can explain in french if you prefer)
 
An helper program to help for that game : mountyhall.com
The best game I know
I started my current game 8 or 10 years ago. My wife about 6 years ago.
 
lol I see
are you part of a guild?
 
5:12 PM
@FlorianMargaine I was, not any more. But I have friends. A lot of them with whom I've drunk IRL.
 
What the heck is that?
 
@BenjaminGruenbaum text based MMORPG
 
@Programer 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.
 
Does if('derp') return true?
 
Ale
!!> !!'derp'
 
5:13 PM
@Ale true
 
@dystroy heh
 
@Ale Is that yes or no?
 
I'm not sure I like new MDN
 
@BenjaminGruenbaum I'm sure I won't test it until it cease to ask for a google login.
 
Ale
@Lugia101101 if can't return anything, it isn't a function
 
5:15 PM
It evaluates to true
 
because it is an expression
 
@BenjaminGruenbaum They try to look corporate ?
 
Not sure, it doesn't look bad, just strange.
 
Ale
@Shmiddty It evaluated to undefined
 
5:16 PM
It's hard to judge with only this but it seems harder to read : too much menu, too few content
I like my pages dry.
 
Ale
!!> if('derp');
 
@Ale "undefined"
 
What string would evaluate to false then?
 
''
 
@Ale You don't understand how the bot works.
 
5:17 PM
or how expressions work
 
@Lugia101101 only an empty string
 
Cool.
 
!!> 'derp' ? true : false
 
@nderscore true
 
5:18 PM
!!> '' ? true : false
 
@Shmiddty false
 
@FlorianMargaine not bad. Could be prettier but it's clean.
 
@dystroy yeah I needed someone to make a theme for this. Never had anyone.
 
I'm too lazy.
 
5:18 PM
explanation of one of my demos
 
and I suck at design.
 
going to make a point to write an article at least once a week
 
The DOM eventing system sucks, sets are a better data structure than lists and adding events to sets instead of elements makes sense.
There, I said it.
 
posted on November 07, 2013 by Loktar

This explanation doesn’t show any code more of just an overview of how to achieve a simple but cool looking effect. I’ve seen variations this effect used in different places, one of the more recent examples I can think of is the loading screens from Red Orchestra 2. RO2′s effect definitely uses a different method […]

 
@Loktar ^
@BenjaminGruenbaum sets, as in unique elements lists?
 
5:22 PM
Yeah.
 
which is basically what getElementsBy* and querySelectorAll return?
 
so attach events to nodeLists ?
 
so sets instead of bubbling?
 
Just like jquery does.
 
5:24 PM
Yes. querying the dom is stupid but not being able to attach an event to a nodelist seems stupid.
It's a common use case.
 
is querySelectorAll guaranteed to be a unique collection?
 
I wish javascript had a built in event cache :( sometihng like node.getEventListeners('click');
 
I guess I should just test that
 
@nderscore That doesn't make much sense.
 
Wouldn't be too hard to wrap addeventlistener to do something like that.
 
5:26 PM
@phenomnomnominal No, it wouldn't.
 
@BenjaminGruenbaum why not?
 
NodeList.prototype.addEventListener = function(...){...}
 
Seems useful
 
I rarely directly work with the dom in use cases where it's too useful anyway.
 
I almost never do it (in part due to jQuery) but last night I typed this ridiculous thing :
[].forEach.call(document.getElementsByClassName('tab'), function(t,i){
	t.onclick=function(){
 
5:29 PM
@dystroy Yes, it's all very extendable but the defaults are bad.
 
!!afk movie
 
@BenjaminGruenbaum Apricots are people too!
 
m90
stackoverflow.com/questions/19840583/… close votes please I just found a dupe
(my own question btw)
 
5:36 PM
@m90 you can delete self question
 
m90
It might be good to keep for the googlers
 
then answer it yourself and accept the answer ? [explaining a tldr of all answers on dup ]
and in the answer link it to the dup for further reading
 
@phenomnomnominal I never thought of doing that and now that I'm thinking about it, this could solve a lot of problems for me with certain projects at work. I'm going to try implementing it. :)
 
@Leonardo 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.
 
Ale
 
5:45 PM
wolfram api ?
or siri ?
 
yay IE 11 has WebGL
 
@IvoWetzel wooooooooooooooooot ?
do they have webrtc aswell ?
 
of course not, too new
CSS3 Background and Borders Module Level 3 	Performance: High Resolution Time
CSS3 Flexbox 	Performance: Navigation Timing L2
CSS Snap Points Module 1 	Performance: Performance Timeline
CSS Writing Modes Module Level 3 	Performance: Resource Priorities
ECMAScript5 	Performance: Resource Timing
HTML5 Dataset 	Performance: Script-Based Timing Control
HTML5 Drag and Drop 	Performance: User Timing
HTML5 Device Orientation API 	Pointer Events
HTML5 Encrypted Media Extensions 	Simple Delivery Profile for Closed Captions (US)
Now if they could pleeeaase make it a forced update and bring it out on xp >= then the internet would be a much better place
 
IE 11 looks usable
@IvoWetzel :D that sounds a great news for today
 
Ale
@AbhishekHingnikar wolfram
 
5:49 PM
@Ale :D
 
room mode changed to Public: anyone may enter and talk
 
Oh good, now I can finally talk.
 
I have a block of code that I am dynamically adding to a page with out refresh and wondering how I can get the newly created/added content to pick up the javascript code
 
@SomeKittens what the heck !
 
5:56 PM
...that was the fastest response I've ever seen.
 
@SomeKittens to what ?
 
@sarath 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.
 
@AbhishekHingnikar IE the Anime?
 
Sat on my foot too long.. full on numb.. ughh feels weird
 
ah kk
@RUJordan press your thumbnail (on feet)
it helps :P
 
5:58 PM
holy good lord the default WP theme is horrendous
when did they change it?
 
Ya, I wiggle my toes till blood comes back lol
 
@SomeKittens there is a microsoft logo up her ass :-(
 
@rlemon if it's the same as it was a few months ago I agree.. the default themes are raunchy
 
How I can get the newly created/added content to pick up the javascript code
 
@SomeKittens What the fuck...
 
5:59 PM
They changed it around August or so
it is pretty terrible
 
hay any one tell how start oop js programming.i am unable to apply js with oops .but i am very much interested .
 

« first day (1118 days earlier)      last day (3844 days later) »