« first day (1439 days earlier)      last day (3502 days later) » 

12:42 AM
In chrome console: this doesn't work ('\''.replace(/\'/g, '\\'')), but this does ('\''.replace(/\'/g, "\\'"))
 
Hi, can someone look at this question?
http://stackoverflow.com/questions/26006379/on-ajax-success-change-another-link-value
 
@Adrian.S For the record, you're not really in the process of learning javascript, you seem to be in the process of simply learning how to use the jQuery library... anyways, the answer you're looking for is: $(".post-reaction.pull-right.fav").attr("href", "your-new-link-here");
Oh wait, you don't want to change the href attr, you want to change the html inside of it
You're question's code isn't clear enough. Which is the element that needs to change?
Add an ID to the element that you want to change, then do $("#myElement").html(parseInt($(#myElement).html()) + 1);
 
I commented out the ajax stuff since its not needed for that
basically what I did was
var $notes = $(this).siblings('.notes');
var votes = parseInt($notes.text(), 10);
$notes.text(++votes);
wow guy didn't even look in the chat anyway @NickDugger
I was working on a solution before you commented btw
 
1:00 AM
Yours is better anyways :p
 
yeah I just didnt want you to think I saw you comment and was like "HUR HUR GONNA TAKE THE CREDITS!" :P
 
Meh, reading data from the DOM
 
@Loktar Did you delete your answer? sharf's answer did the job, but I was going to upvote yours for trying :) nice jsfiddle example though.
 
oh np yeah I deleted it since his worked anyway
seemed silly to keep it there
plus he is lower rep so I dont mind him getting upvotes if others see it
 
1:16 AM
That's very kind of you, @Loktar :)
 
1:48 AM
Now the ever-important question: What should I get for lunch?
 
@monners spaghetti
 
Spaghetti and fishballs
 
2:04 AM
Hey guys, do you know how to delay a $.get function in jquery? What's the syntax? delay(1000).get(... $.get.delay... none seem to work
 
function getMethod() {
$.get....
}
setTimeout(getMethod, 1000);

?
 
yeah forgot about set time out thaks
 
2:39 AM
Hello everyone.
 
@GGB667 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.
 
I'm using node.js for the first time. I wanted to run a tiny example to check syntax but I guess I'm using it wrong. I tried: node -e function isUndefined(x) { var u; return x === u; }; isUndefined(y);
But I get unexpected end of input.
I need double quotes around that?
Seems to work.
node -e "console.log(typeof x === 'undefined');" gives true.
node -e "var x; function isUndefined(x) { typeof x === 'undefined' }; console.log(isUndefined(x));" //gives undefined
node -e "function isUndefined(x) { typeof x === 'undefined' }; console.log(isUndefined(x));" //reference error ?!?
I'm confused.
node -e "var x = 3; function isUndefined(x) { x === 'undefined' }; console.log(isUndefined(3)); console.log('%d', x)" //Gives undefined, 3. wth?
 
You're not returning anything from isUndefined() so its return value is implicitly undefined. Use return to return a value. I don't know about the reference error, though. You're going to have to post the full error message.
 
Oh ok. I need to return.
DUH.
 
user1596138
2:56 AM
Guys... I can't really explain this in one message and I'll forget tomorrow. Its late.
 
user1596138
I think I've found the ultimate java troll. And look how long this went on for. Everyone bought it. See his profile and description. And the post devpressed.com/t/i-am-not-a-good-programmer-and-i-cant-help-it/…
 
user1596138
// side note I guess my buddy the java programmer is having a similar time lol or maybe this was linked from somewhere else to him Idk
 
How is that guy a troll? He just seems devpressed. :)
 
node -e "var x; function isUndefined(y) { return (y === 'undefined') }; console.log(isUndefined(x));"
???
Ok.
false?
 
profit
 
3:05 AM
FALSE?
 
WHY ARE YOU YELLING?
 
Am I doing this simple thing wrong somehow?
Javascript ate my kitten. :<
Oh
typeof x === 'undefined'
woah, clearly I need to step away from the keyboard.
 
I don't think undefined would be in quotes.
 
user1596138
Then notice his activity
 
user1596138
And his complaints.
 
user1596138
3:09 AM
Look at his name and his complaints
 
node -e "var x; function isUndefined(y) { return typeof y === 'undefined' }; console.log(isUndefined(x)); x = 1; console.log(isUndefined(x));" //YEA!!!
Yea, undefined does need to be in quotes.
 
user1596138
> JavaNoober
I wish there was more to me than what currently is. Living is no longer about enjoying the trip, but a survival race. I simply feel outdated.
 
Oh yes, it should. Sorry.
 
user1596138
Was a user for 4 days. Hahaha "I simply feel outdated"
 
user1596138
He's just making fun of Java through the entire thing.
 
3:12 AM
Oh, you wrote that post, Jhawins??
 
user1596138
@sterlingArcher check that out tomorrow what do you think? I think it's a master troll haha
 
Nevermind. You didn't lol
 
user1596138
Of course I didn't write that lol
 
I still don't understand why the double quotes are required around it.
 
user1596138
JavaScript is an antidepressant #theMoreYouKnow
 
3:14 AM
Well I'm personally happy that it's improved dramatically in the last 4 years.
 
Befause typeof returns a string, always.
 
Karma, node.js
No not around 'undefined'
around the entire statement to invoke node.js
 
user1596138
!!> typeof (typeof Object)
 
@Jhawins "string"
 
C:\>node -help
Usage:
shell [options] -e string
execute string in V8
So if it's not a string, what the heck does node.js consider the rest of the line to be?
What's whacked is it's the spaces that throw it off.
This works:
node -e x=5;y=3;console.log(x);console.log(y);
 
user1596138
3:17 AM
!!afk goodnight late night js room people
 
Nite.
 
@GGB667 Sorry but I don't use node. I actually haven't touched on JS in two years and I actually used to be quite knowledgeable.
Goodnight.
@JHawkins
 
It's not my first language of choice.
 
user1596138
Don't forget to microwave your iPhone opposingviews.com/i/technology/…
 
I need to learn karma also.
 
user1596138
3:19 AM
@GGB line breaks in commands aren't acceptable. They end the argument. You can't even use the filename "file with spaces" without escaping or using quotes in cmd or bash or any other terminal afaik
 
user1596138
It's not Node. It's your command arguments. The delimiter is whitespace
 
Ok, well that's true. I was thinking that based on the docs it would assume everything after -e was a string.
Does anyone here use Angular.js?
 
user1596138
It's not based on anything related to Node at all
 
Yea, I know that. But our karma which tests angular.js code is.
 
user1596138
That's just how the arguments are passed to node-help and it doesn't see anything after whitespace as part of -e at all because cmd is a jerk
 
3:25 AM
Humm. Ok.
Yea, windows command line leaves much to be desired.
The lack of history is upsetting.
Even with doskey and aliases it's still horrible.
 
user1596138
I don't use karma. But you should be able to pass it properly.
 
I was trying to make a web page for myself so I could launch programs and keep my urls and program notes handy on the desktop.
 
user1596138
The right way wouldn't involve whitespace being used in the command. Hahaha
 
I even had some maps in some divs in jscript.
Understood. I just wanted to try some simple syntax things and do a quick reality check.
 
3:41 AM
OMG. Why does opening a txt file in chrome open it in a tab instead of in the file association I have set up in windows?
 
Are you asking why it's opening in Chrome, or why it's opening in Chrome in the default way?
 
@monners Say hi to RocketU
 
@SomeKittens I don't understand what that means... o.o
 
RocketU is the course I teach
@GarrettKadillak ohai
 
@SomeKittens Ok.... Are you teaching it right now, in this room?
 
3:53 AM
Yup...I'm one of the students, actually
 
@GarrettKadillak 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.
 
@monners nah, just a couple guys
 
Oh @SomeKittens, you're far too trusting to bring a student into this room!
 
!!epic
 
is there a link to this course somewhere? I wish to belittle you from a more informed position
1 message moved to Orphan GIFs
 
Do you accept remote access students? :P
 
4:07 AM
0
Q: Cannot float second div to right side of first div?

ResolutionMy code is very basic HTML: <div class="blog cf"> <div class="left_article_content"> <img width="100" height="100" src="http://placehold.it/100x100" alt="test"> </div> <div class="right_article_content"> <h1>Test Header</h1> <p> This is a test Thi...

> I want it to be responsive but can't change the HTML
Good luck, buddy
 
:nth-of-type
 
monners, I'm asking why chrome ignores the system file preferences to open the text file inside itself. I'd understand if it was a PDF cause there's a plugin for that.
 
4:21 AM
That doesn't make sense. What exactly are you doing? Double-clicking the .txt file? Dragging the file into Chrome?
Chrome isn't the file system. It'll treat files any way it wants, it's not aware of your system file preferences.
 
That's not true. If you pick a .docx file it opens it in word.
I just want to open a .txt file in notepad++.
Hum renaming it to .note and changing the file extension had no effect. I'm a bit surprised.
 
Dude! What EXACTLY are you doing?
 
I have a web page.
It's got a link in it.
<p><a href="file:///C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Notepad++/Notes.note">Notes.note</a></p>
<p><a href="C:\Users\gbishop\Documents\foo.docx">foo.docx</a></p>
The second one opens foo.docx in microsoft word. The first one views the darn file in chrome.
 
Next time start with that
And I have no idea. Browsers can interpret .txt files so that's why it's opening and displaying its contents.
 
4:59 AM
anyone here?
 
me
but I'm leaving.
 
hmm
 
I'm not here
 
:D
can i use like bellow ?
ng-model="currentIndex.oneIs"
currentIndex is changeable
 
vot?
Bananas.
 
5:01 AM
in angular?
No idea.
Just learning angular.
 
yep
 
Ask me next week.
 
lol
 
I'm doing these:
 
great
 
5:16 AM
@GGB667 Egghead is nice
@samitha we'll need waaaay more context.
 
$scope.goExam = function(){

$location.url('/exam');

       $http({
            method: 'GET',
            url: 'php/index.php',
And i'll execute a function inside success
displayQuestion(index, storage);
i want to display index question when exam view loaded
@SomeKittens
You know that ajax request not finished
Do you have a solution ?
 
Morning Folks
 
 
GIS=GPS?
 
5:30 AM
GIS => Google Image Search
 
oh
ok, off to school!
 
I am doing a string comparison between a string "0" and a number 0
var msg = "0";
if(msg == 0 )
    {
}
But it doesn't enter the if loop
what's wrong with this construct
with this logic*
 
Everything
 
aha @copy
can you correct me
 
Except that it should enter the conditional block and you're withholding information
!!> 0 == "0"
 
5:34 AM
@copy true
 
what's exclamatory marks and greater than symbols there, didn't get that @copy
 
It's a JavaScript interpreter
 
it's working @copy
 
wtf is this
is the chat messed up for everyone?
 
but i have msg variable which gives int(0) when i logged via console
console.log(msg);
gives int(0)
now, I have to compare this msg variable
how to do?
 
5:38 AM
@Mosho Nope
 
wat
 
It's not messed up
 
how do I fix mine :(
 
I don't know, how do we usually fix things?
Turn them off and on again
 
did that
open the chat in a new window
 
5:40 AM
Anyone to help on my issue...
 
tell me if it works
 
if(0 == msg )
{
}
control doesn't enter the if loop
 
Because "int(0)" isn't "0"
 
ok, but when I do parseInt(msg) it gives NaN
how to proceed @copy
 
Where are you getting msg from?
 
5:42 AM
from an ajax request from php file
where I am casting to int
before sending to javascript
 
You're doing the casting wrong
 
ok, If I don't do the cast, I get "0" from msg
 
Good, then use parseInt on that
 
string(1) "0"

NaN
msg
parseInt(msg)
I get NaN when I parseint
 
Okay, your method of printing is incorrect
 
5:45 AM
I am doing console.log
 
On the server
 
sorry
didn't get what you mean't by server
@copy I am printing in the javascript file taking the response from ajax
did you get me
 
You have to fix the PHP
 
aha
any inputs on that
 
!!s/the / /
 
5:56 AM
@monners That didn't make much sense. Use the !!/help command to learn more.
@monners You have to fix PHP (source)
 
That's a fairly unreasonable task
3
 
I do that, but what should I give to javascript
I gave int, didn't work
Gave string, didn't work
 
6:12 AM
@somekittens games worth checking out: surburbia (sim city-like), ninja burger (lite rpg card game), boss monster (unique card game)
 
I fixed it guys!
I was doing var_dump() in PHP
I put echo
That solved the prob!
Thanks All
 
@monners people are working on it though :)
 
They are way behind Python though
And at least slightly behind JS
And all other languages, not to forget
Literally all other languages
And I don't use literally figuratively
To conclude, PHP sucks
 
INTERCAL is slightly behind, I'd say
 
6:27 AM
blerg
Why you no format?
 
hello
 
6:42 AM
-1
Q: Javascript declaration

lizzie288Hi this is a simple question. I was wondering is there any different when you declare something like this. Thanks selectedData[key](val) and selectedData[key] = val

*Facedesk*
A cookie to whoever comes up with a valid close vote reason for that one.
 
@Cerbrus too broad - that guy needs a tutorial, not an answer
 
/me gives Jan a cookie
 
thanks
 
We should really have some kind of /me functionality.
But then again, maybe not... That'd make it too easy to turn a room into a bunch of RP
 
have Caprica post it, then delete the command?
 
6:46 AM
The problem is that caprica is then saying it.
*Cerbrus gives Jan a cookie*
Hm, might work
 
vs7
7:00 AM
Hi,
I am developing a social call back but now i struck in PINTREST
There is no call back method for pintrest
so I track the window.close event
but its also callback if i close the window without sharing on pintrest
So i wonder if I can add a function in Pintrest iframe and track th pinit button click event
and call back to main site any JS function
 
don't try to force people to use their social media pages as your advertising
 
vs7
@JanDvorak I dont want to advertise ... Its for the charity purpose
 
unlikely
 
@vs7 That's terrible, I hope your website gets hacked by Russian hackers
 
vs7
When a person pinIT any of the site image He will get discount on product
and then 30% of the amount will be gave as charity
 
7:09 AM
drop it
it's horrible
 
vs7
Its already going too well
with Facebook, Twitter and Google +
 
Good lord
 
vs7
but I need to add pinit and MySpace
 
unfair marketing practices often bring a lot of cash
GTFO
 
vs7
Every share can help us to rise charity amount
and 70% of the share will be gave to seller
so we are the no profit community
 
7:12 AM
"the ends justify the means"?
 
vs7
didnt get you
 
If you rob a man and then give his money to charity, you'll still have robbed a man.
 
Yeah why give to charity, keep that dosh yo.
 
am sooooo tired, my eyes filled with blood
 
vs7
@JanDvorak its your wish to purchase or not .. While purchasing we notify the user that 30% of your purchasing amount will go for charity
 
7:15 AM
Scrolling from Home > Be Heard > Home doesn't correctly highlight Home again FYI
 
Try asking for medical help on a JavaScript chatroom
 
@CustomizedName sounds like medical emergency
 
vs7
@Lavabeams its not an actual website
It was the old one ...
I'm developing a new one
 
@vs7 you should be supporting the old one until the new one is done
 
this is how my chat looks only in chrome
anyone seen this shit before?
 
7:19 AM
y u went mobile?
 
Nice p0rn bookmark
 
idk
 
@Mosho Pirate!!
 
ah
found it
 
vs7
@JanDvorak imgur.com/v0vZfht
Its the latest one
sharing module
 
7:21 AM
@vs7 eugh
 
vs7
I have got this article : lunametrics.com/blog/2012/03/12/…
but its not working too
 
I am never, ever going on Youtube again.
I spent just like half an hour clicking random vids... hell lotta dick in there.
The crappiest collection of crap in there.
 
Well, you got what you were looking for
 
@JanDvorak nope. I am completely mind boggled now.
 
vs7
@JanDvorak but its not working for me
 
7:27 AM
I wanna punch Abhishek Hingnikar right now
 
@vs7 I'm glad it doesn't
 
vs7
:(
 
@AwalGarg Welcome to the regular's club
 
@copy what is that?
Luckily, I wasn't logged in while watching those or that shit would show up in recently watched and things...
 
@AwalGarg Ok, I take it back
 
7:30 AM
whatever
 
Question from three.js beginner. What should I look for when I want to make the 3D model of person to be more chubby? I tried mesh.scale but it resizes whole object I would like to resize just on few parts on y axes. and please.. mc donalds isnt way to go..
 
@JanDvorak Nope, sounds like a bad night lol
 
@Marek It's complicated
You're talking about animation key frames and such
Except you're not animating limbs, you're animating structure
 
7:45 AM
@Marek McDonalds is a way to not go
 
@Neil ok. I kinda like complicated things. I dont do animating. I just need to resize it somehow in different locations. Any reference please?
 
@Marek Well it is animating
If you're not simply scaling the thing, then we're talking about model manipulation
 
@Neil Ok I will look for anmating the object. But its composed only of one model not like several, head, body, legs, ect..
 
If you notice, in the code, they don't provide the information regarding how to animate the model.
It's contained within the model
You decide when and with what frequency, but not the how
@Marek You'll need to change that then
 
@Neil oh, gosh. I am currently working with .obj models. Guess that is not possible.
@Neil This model is javascript?
 
7:56 AM
@Marek Don't let that fool you. Nobody models in javascript
You usually model in something like blender and then save it as data that can be used in js
@Marek Nothing is impossible, though it is far more difficult, that's for sure
 
@Neil Thats gonna be great weekend then! Thank you for all this help.
 
8:21 AM
@Marek np
 
When I was learning three.js I remember I found model with monkey head I could resize. Does anyone know the author and link?
Wish I could see the source.
 
@Marek That's the classic blender monkey
Download blender and the model is one of the primitives you can use
 
@Neil When talking about "blender" you mean this? blender.org/download
 
@Marek Yep
Great tool to know
It does everything, though it does have a steep learning curve
Took me a while to get practical with it, so don't be too discouraged
You can make animated videos using blender, which would ultimately be a lot easier (and better looking) than if you tried to do the same using three.js
 
8:37 AM
@SecondRikudo: Got an link to that emmet plugin for the editor?
 
> To add Emmet support for CodeMirror editor, simply add dist/emmet.js as a <script> tag into your HTML page right after CodeMirror script.
That's really trivial :D
 
8:50 AM
@Cerbrus I know!
How the hell did that get 16 downvotes?!
 
Probably related to that idiot that suggested the "raw" input be kept in the post
Or maybe users that don't use html on SO: "only benefits HTML editing"
 
@Cerbrus If a feature doesn't impact you... you downvote it?
 

« first day (1439 days earlier)      last day (3502 days later) »