« first day (909 days earlier)      last day (4264 days later) » 

00:20
@copy hi
hi
I just said "No, he's just copying you ... pun intended"
I just said "I just wrote 'I just said "No, he's just copying you ... pun intended"' in the chatroom"
!!/choose "not nutella" "not nutella" "nutella"
@BadgerGirl not nutella
I hate you.
00:27
@phenomnomnominal You count, the bot doesn't count.
I'm a way better bot.
!!/choose "humans decide" "bots decide"
@copy bots decide
!!> Math.random() * 123 | 0
@copy 118
00:35
@phenomnomnominal

http://stackoverflow.com/questions/15961079/how-do-i-parse-raw-data-on-request
Perl is written in base64
you're posting to an html file? o-o
@XCritics do a console.log on the request body and see what you get
@TurtlePowered 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.
@phenomnomnominal like req(function() { console.log(data) })?
oh i get yah, req.body
nvm derp thanks ill check
@phenomnomnominal { '516639ed4b34d60200000002': '' } which is good but that should be the value, ill try using req.body as the variable
error :'(
01:01
just wondering if you lot use classes a lot in php?
@Connor If you would like your code to not become a complete shit mess, then yea.
@twiz so you doo, cool :D
@phenomnomnominal What does this mean? You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND isPlaying = '1' ORDER BY rating DESC' at line 1
Well, I mean you certainly don't have to....
But for anything at all complex you should
@BrandonGelfand Whats the rest of the query?
01:06
that popped up?
or the coding?
@BrandonGelfand what comes before and after this
AND isPlaying = '1' ORDER BY rating DESC
thats all
nothing else came up
@BrandonGelfand not the error, the code :D
none....
go to search for party
@BrandonGelfand in your file . . .
01:07
type in Party
oh
I dont know what is causing the rror
error*
@BrandonGelfand so where is the SELECT * FROM bit?
I didnt right this code, my teacher said to make a database for it
thats all....
I have been scanning through it trying to figure out what the tables and columns are
@BrandonGelfand do you have access to line 1?
Of what?
I have the code
IDK what file to look in..
ok, where can i see this error?
01:10
@BrandonGelfand Haven't seen you around in a while
Well going through a bit of hell atm.....
yes
where it says search for parties
type in Party
click either doesnt matter...
i get Sorry, we couldn't find a party with that name.
really?
Party
u type tht in?
01:13
@BrandonGelfand yes and clicked on party && party1
so u clicked party
then what happened?
@BrandonGelfand anyway if you can find line 1 let me know ...
@BrandonGelfand i clicked on both and i see .. . .
Whoops!

Sorry, we couldn't find a party with that name.

Okay
I am able to click it...
Can u go on the site please...
i am
I am going to see if it logs ur presence
01:15
i get the error when i click find party's and click party2
ur IP end in 53 ?
or 218?
yes, you need to fine party.php
(53)
k one sec
what is the exact error?
@BrandonGelfand well you wont find the error in that file you need to find
AND isPlaying =
AND isPlaying
as in the DB ?
isPlaying is a column in my DB
01:19
you just need to find a line in there that has AND isPlaying
you should see something like this
"SELECT * FROM something WHERE somethingElse = 'foo' AND isPlaying = '1' ORDER BY rating DESC"
I think i know whats wrong
be back in 2 mins
Because there is no songs in the DB yet, and it is seeing if a song is playing
and since no song is playing
you get that error
hmmm.... i need to look at this..
I found where the problem is coming from
it is the is_playing
it is also the same as the above code...
so do you need help?
yes
I dont know wht i should do to get an api hooked into this....
@Connor you have some free time?
to teach me a lil?
tomorrow afternoon maybe?
01:26
@BrandonGelfand i cant help you without seeing some code. ...
I know
I am gonna give ftp access if u can work with me on saturday
It is basically a music player where ppl can go to parties and pick whts gonna play next
@BrandonGelfand ha, what are you doing?
k
Would u like to work with me on it?
i wont do it for you but i can advise you, what are you doing, js, php..ect who coded the php?
A wolf like the one in ur picture ate my chihuahua a few years ago...
lol
01:29
@BrandonGelfand my mums got 2 chihuahua's :D
stupid dog didnt listen, ran up barking like an idiot, 1 bite and tht sucker swallowed him hole
whole*
lol, they are good when they are calm
@BrandonGelfand got skype?
Practically live on it, on it 24/7
brandon.gelfand
I cant talk today though, I am doing an english assignment, I just needed a break from reading romeo and juliet
and writing about all those quotes...
@Connor can u send a request so i can remove it?
@BrandonGelfand ok, who wrote the php & Javascript
Last time my skype name was on the internet some hookers tried calling me, it was really weird
@Connor not sure, i think he got it from github
01:33
remove it then
@BrandonGelfand who?
crap, can't...
Have no idea who she was, she was really ugly though...
who got it from github?
oh
my teacher
I had to setup the DB
Does anybody here know Haskell?
I like the concept though, so i am gonna take it further
01:34
Ug, functional programming
@BadgerGirl nope
@BrandonGelfand so do you know any languages?
I now how to tweak and edit and how it works
I cant write from scratch ver well...
@BrandonGelfand what do you like best?
html, css?
01:35
I am pretty good with PHP
u consider html and css languages?
I thought those were only considered visuals.......
While HTML/CSS are technically Turing-complete, most don't consider them "Programming languages," as their use is determining what something looks like, instead of instructions.
@BrandonGelfand ^^ right but HyperText Markup Language (HTML)
yes, i can do html fine, css i am ok with, enough to get me by, php is fair, js is ok it tends to be hits and misses
writing from scratch though...
Not so good...
@BrandonGelfand You probably should write something from scratch, even if it is a small app. You'll learn a ton
I am working on it though, hard to do this and got to 9th grade with bitchy teachers and tons of work
@SomeKittens i write a lot of calculator in JS
01:38
@BrandonGelfand ok, well you need to start from scratch then you know what does what
"9th grade" "tons of work" HA
with all AP classes
as a senior in college, I find that hilarious.
yeah :D
@SomeKittens u were taking all AP classes?
except english, i am ok with english....
@BrandonGelfand no
01:39
If you have to ask if I was taking AP classes in college, you shouldn't be taking them yourself.
-_-
in hs not college
@BrandonGelfand did you get a request?
yes, sorry, forgot to accept, its fun talking to mr.mittens :P huh @SomeKittens
My HS was so small it didn't offer AP courses. I ended up with five technical certifications instead. (IC3, A+, Net+, Security+, MCP 70-270)
@BrandonGelfand :D is this app just for mobile?
01:41
Mostly Jquery for mobile
so yes
@SomeKittens well you know what, my high school taught us how to use word & powerpoint LMAO
it works for computers, but has the look of an app for phones, because at most parties kids dont bring a laptop
@BrandonGelfand so just mobile then, cool
@Connor Learned those too. Moot point, since I now use LibreOffice.
01:42
I am gonna try to work sound cloud or something like that into it
maybe work some sort of social aspect later into it
@SomeKittens yeah, i mean that was advanced, didn't do anything to do with web!
@Connor things change every year when comparing current schools to past, my dad still doesn't understand DNA or RNA or genetics or anything else we are learning.
@BrandonGelfand do you want to sort this Syntax Error or not?
@BrandonGelfand Im glad anyway, i learn better working on projects than listening to someone talk about it.
01:44
@Connor you have filezilla?
@BrandonGelfand ofcourse
k, i will give u ftp access through that, u seem good, but just in case
dont post connection info here !! ill be back in 2 mins,
lol i am gonna send it through skype m8
@BrandonGelfand that's better than anything anyway, you dont have to give me access just send me line 1, down to you :D
be 2 mins
01:51
“ Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ” - Martin Fowler
@SOChatBot morning bot
Hey people whats up
Hello ^
02:48
@phenomnomnominal can't figure it out to save my life, even though I feel l like I should know this :/
@MarsZhu 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.
anyone good in US history?
@NinjaEcho $help
@KendallFrey Y UR BOT NOT WORK
@NinjaEcho help
OOP is to writing a program, what going through airport security is to flying. — Richard Mansfield
03:19
@Darshan 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.
Hello Is it possible when i upload 2 files simultenously using jquery or javascript..then I can pause upload of one ...and play upload of second file..is this possible to do?
m59
m59
03:40
lol
04:14
Sierra Club is not laughing.
04:46
Is there a way to determine when an external script has finished executing without actually having access to the script?
For example, sharethis.com requires that you add a script tag to your page that pulls in an external script and executes it. Is there a way to determine when that particular script has finished executing?
m59
m59
An obvious and easy way to know a script has loaded is to check for a property of it.
If I want to know whether or not jQuery has loaded, for example

if (!window.jQuery) {

}
Sure, but then you'd have to run an interval timer to retest until you found the property, right? That's not particularly elegant...
m59
m59
You could use setInterval() to poll for it every tenth of a second or something until it is loaded.
yeah.
That's the only way I know, unless you can attach a callback to the call for the script, or they send one (that makes sense).
They really ought to give you a callback function.
Yeah, I was hoping there might be a way to ad-hoc attach a callback to the execution of a script externally. And nah, I don't think they do, but I'll look into it.
m59
m59
The very last thing on their script could be `myCallbackName();
Then you define what that is so it will get called. Such a simple thing. They really ought to.
04:57
Fingers crossed. Thanks
m59
m59
I've never tried anything like that. looks legit.
Sweet! Thanks mate.
Exactly what I was looking for
m59
m59
Glad I could help!
If practice makes perfect, and no one is perfect, why bother practice?
05:13
@SOChatBot To become perfect
Duh
@CoryCox 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.
05:34
does anyone know why i get a SyntaxError: Unexpected token { with this
function foo({ name:name, project:project}) {

}
m59
m59
lol
what is that supposed to be?
i was browsing for tips and i come across this - https://code.google.com/p/jslibs/wiki/JavascriptTips
it's like the 9th block down
@m59 this is what i was looking at from Google
Optional named function arguments
function foo({ name:name, project:project}) {

    Print( project );
    Print( name );
}

foo({ name:'soubok', project:'jslibs' })
foo({ project:'jslibs', name:'soubok'})
m59
m59
Looks valid to me.
hmmm, im getting
Uncaught SyntaxError: Unexpected token {
m59
m59
yeah, I see that. It's very odd to do. I can't say why it wouldn't work though.
05:39
Some of these tricks are using a latest version of JavaScript language (v1.8) and cannot run with the Microsoft Implementation of JavaScript (v1.5).
ok, thanks anyhow
@djna is it possible on the other version?
I'm just quoting from the top of the page.
my guess, that's a new feature - I've certainly never used it before
ok shame
05:47
I needed to dive into the javascript file for bootstrap (bootstrap.js) and in the button toggle function I noticed this, I was hoping someone could point me in the correct direction as to what exactly this is:
$parent && $parent
.find('.active')
.removeClass('active')
Ah the indentation threw me off (apologies for not pasting to chat properly) but basically it's just short circuit checking $parent before calling those chained functions on it
does anyone know a better technique for doing this
	if(data['id']){
		var id = 'something';
	}
	if(data['classes']{
		var newClass = 'something';
	}
say i have to do this 15 times
m59
m59
saying you have to do that 15 times doesn't really give me enough information.
Just on those terms, I'd have to wonder why you needed to ask the same question 15 times in a row lol.
You got your answer the first time.
I'm unable to understand why the following lines are not executed in sequence pastie.org/7461155
@m59 for different objects sorry
@Connor can you please tell me why the following lines are not executed in sequence?
pastie.org/7461155
06:01
umm,
@DineshVenkata don't know why don't you make a function with a callback on success
@Connor can you give me an example I'm a noob at javascript
hold on
m59
m59
@Connor then you need to make that a function and pass your values to check. You can do that many ways.
You can make it two different functions and return the result
If you're doing OOP like you ought to be, then you could make the result a property of an object and use that
@DineshVenkata Because those requests are asynchronous.
@Connor @DineshVenkata There's no reason you need an example for that. There are a ton of tutorials on google or you can look right at the jquery docs. Very easy.
@m59 you know JSP?
m59
m59
jsp?
06:06
Java Server Pages
m59
m59
I've never heard of it, why?
actually I'm including my html page in a jsp page
what server side language do you use?
m59
m59
php
@DineshVenkata not tested but you can try this, this might not be the best way, but i would do something along the lines to this
06:09
hi can anyone help me with this i m trying to make a survey where when someone clicks on a radio button automatically it goes to the next question and also the button prev and next should show unless the person has click on the radio button this is what i have done so far jsfiddle.net/HLvYx/1 but i m very new to jquery
function myGet(url, callback){
	$.ajax({
		url: url,
		type: 'GET',
		success: function(result){
			callback(result);
		},
	});
}

myGet('/ajax.html', function(result){
	$('#myElement').append(result);
	myGet('/ajax2.html', function(result){
		$('#myElement2').append(result);
	});
});
Duck-Typing is best typing
@user1706511 use jquery hide()
k let me do my research on that
@OctavianDamiean Haha, yeah
06:23
@Ravi 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.
hello every one good morning
@Ravi Morning
06:38
Hi
Is there a short (read golf) way to take the absolute value of a number in js ? I mean short, that is 3 signs max...
@dystroy as far as i know, no. however if you want the decimals to be removed you can append |0
yes, I know this one
I was trying to take symbols - = or + based on the sign of a number but I failed to get shorter than '=+-'[u<0?2:u/u|0] or the obvious u>0?'+':u?'-':'='...
Math.abs(u) is also possible. it even looks smaller than u>0?'+':u?'-':'=' and more clean
yes, but it's not doing the whole job
06:48
@FlorianMargaine would that not remove the decimals aswell?
so what is this about?
@FlorianMargaine What do you mean with >>0 ?
!!> var u = 0; u>0?'+':u?'-':'='
!!> var u = 123.456; u>0?'+':u?'-':'='
!!> var u = -123.456; u>0?'+':u?'-':'='
`"-"`
:8813142 `"+"`
:8813142 `"="`
06:51
It doesn't make a negative number positive
its funny that the bots answer is reversed
but still.. i dont get it what you want
> inability to use OOP practices as I would simply do in Java,
=DDd
!!> Math.abs(0)
!!> Math.abs(123.456)
!!> Math.abs(-123.456)
`123.456`
:8813172 `0`
:8813172 `123.456`
@Esailija huhu
@dystroy didn't try it, but doesn't that work?
@FlorianMargaine that's the war cry of the incompetent
"best practices" and "oop practices" lol
yeah... I wanted to write a harsher comment
but well...
@dystroy I wonder if it's possible with ~ and > or >>
Is it me or did OP forget to link to the source of this bench (we all saw the article on HN) ?
@FlorianMargaine I wonder too...
06:55
is it me or isn't that very old.. I recall those graphs from a year ago
@dystroy amg. you cannot beat the APL answer
the micro benchmarks are also very misleading, in any real application the req/s drops dramatically from them
@GottZ I think this would be hard, indeed...
no i mean.. its impossible to beat that answer
hm
there is a way to beat it
and it has not been tried yet..
APL is usually hard to beat
but it's easy to beat in number of bytes
06:58
8086 asm
-> bytecode
take any js answer, change to coffeescript -> win?
good one. maybe coffee can reduce it
@FlorianMargaine I contributed to the constructive flame war :)

« first day (909 days earlier)      last day (4264 days later) »