« first day (757 days earlier)      last day (4418 days later) » 
00:00 - 17:0017:00 - 00:00

00:13
If I have a <a href="/c"> on "http://localhost/a/b.html", would the browser access "http://localhost/c" or "http://localhost/a/c" instead? Is that a standard
The former one.
And yes, it's a standard
please some admin can please delete my topic
-12
Q: what I really need to learn in Javascript?

Daniel EzraI have a javascript book - "JavaScript - The Definitive Guide" I'm already know html + css - master level. and c# and Juqery - intermediate level and how do I Become a Better JavaScript Programmer ? which things to learn (which topics is very common and important for web programming? events?...

Hey there.
00:39
@DanielEzra: This is not the proper place to ask for it.
Besides that, questions like this are likely to be deleted by the community (it was at 2/3 delete votes a few moments ago). No need to flag it.
it's old but i still love it!
01:30
@ThiefMaster mod needed in C++ room.
02:06
@AmaanCheval: eval 1+1 using jQuery plz - wtf ? You just use $.fn.eval for that obvisously
 
2 hours later…
03:44
@rlemon :-(
Really noob question here. Whats wrong with $.ready('#send').val('msg') ?
@henrymb67 You're using jQuery
can you use ready without an selector?
@SomeKittens Yes I am.
If I assume what you want to do, you need to do $('#send').ready()
and even then, ready takes a function
what exactly do you want to do?
03:49
I want to replace textarea with id of send with var msg on page load
$('#send').ready(function() {
$(function() {
  $('#send').val(msg);
});
$(function) is a shorthand for $(document).ready(function), which is what you want
@phenomnomnominal Thanks!! another quick question. If I set a var in another function will it carry to the next?
It depends where you declare the var
03:53
say its in my very first function

Javascript Resources.

Sep 4 at 13:36, 2 minutes total – 8 messages, 1 user, 1 star

Bookmarked Sep 4 at 13:40 by rlemon

if you have:

var global;
function one() {
    var local = "HI!";
    global = "HELLO";
}

function two() {
    console.log(local); //undefined;
    console.log(global); // "HELLO"
}
JavaScript scoping gets a lot more gnarly than that, but that's how the very basics of it works.
0
Q: IHaveBadges - A script to link your badges in the toolbar to your list of badges in your profile

jmort253 this Meta Stack Overflow feature request, transforms the list of badges in the toolbar to a link to the user's badges in his or her profile. --> This is a very simple script that, in response to this Meta Stack Overflow feature request, transforms the list of badges in the toolbar to a link ...

@phenomnomnominal thank you so much! :)
@phenomnomnominal Thanks to you my web app is finally working :D
glad to help. pay it forward
04:04
It kinda works. it's a bit glitchy. willing to take a look?
Thank you sir, firing up local tunnel
@rlemon bot is broken or off
on
!!/learn resources chat.stackoverflow.com/rooms/…
@rlemon Command resources learned
04:08
!!/resources
Is it working?
@SomeKittens chat.stackoverflow.com/rooms/…
Awesome.
@phenomnomnominal Doesn't seem to be working.. hm. it worked when I had two windows open...
Okay, well for starters you're going about it the completely wrong way haha
04:10
:-/
This is the perfect place to use a Web-Socket
How concerned are you with backwards compatibility
not concerned really
Okay, then definitely use websockets
All modern browsers have them
and you can avoid all the ajax calls
@phenomnomnominal Can I do web sockets with php?
04:12
@rlemon henry's using Ruby
^ What he said
!!/google websockets tutorials ruby
.. i'm using php i though haha
url : 'read.php?timestamp=' + timestamp
he's using php for this
I dont know any ruby.. but i would like to learn
04:14
that looks useful
I was on that site earlier but the issue is that I cant install it on my shared hosting
Anyone here running Canary?
0
Q: Why array in Java script showing wrong length

101VI am learning Javascript. As a part of learning, I came across following scenario, where I expect the a1.length (the last line of the code) to show 201, but it shows 101, any Idea? var a1 = new Array(); for (var i = -100; i<=100; i++) a1[i] = i; for (var i in a1) { document.write(i + ...

nope on chrome stable
Nope, I work server-side
04:19
Poos, I just found out that Google are using one of my projects on their examples for getUserMedia, but it only runs in Canary so hardly anyone will see it haha
oh well, should be stable soon
@phenomnomnominal props
hi. in jquery how can I reuse the same jqXHR object and make calls to different urls? (jquery ajax)
Why do you want to do that?
I think I'm going to start a pure JS video capture + upload to Youtube app.
04:31
Fun
Try 5598.localtunnel.com/projectNotecard/versions/V0.3 again, i fixed the break in the jquery. now you should see the glitchyness
Super glitch
You should host your JS in a separate file.
That way I can fiddle with it in the browser and try to sort it for you
0
Q: How can I reduce the amount of files loaded/included per plugin?

JoeyI have a Wordpress site that uses several plugins, namely 8. Most of these plugins include a lot of their own JS and CSS files, some even include so much as 3 separate CSS files. One can imagine that this does a number on the amount of HTTP requests and thus the load time. Many of these plugins ...

@phenomnomnominal okay linking it in a separate file now
04:37
Okay
done.
thanks again for all your help @phenomnomnominal
No problem, I'm procrastinating
i appreciate it
Okay there are a few issues
First, it's probably overkill to send the update every single keypress.
That will just get screwy very quickly
Also, have you never heard "eval is evil"
use JSON.parse
Also, what do you think the setTimeout is doing?
hmm "eval is evil" googles "eval is evil"
I think I'm doing a ajax long pole
04:43
okay, well basically, it means don't use eval
eval is just a bad idea
eval('(' + data + ')') im evil!
That should be JSON.parse(data)
now I see how to be good
and not evil hah
so, var json = [(]data[)]; ?
oops
i'm stupid.
04:50
No JSON.parse is a function
var json = JSON.parse('data'); lol
no quotes
data is a variable
Opps
Thank you sir
I have 2 windows open and the slashes are only displaying on one...
Also, if you know that the received data will have a 'msg' and 'timestamp' property, then
json.msg & json.timestamp are better than json['msg']
Without looking at the server code I probably can't help with that
04:58
pastebin doesn't want to work... I have to go anyways. Hopefully I've been helpful
good luck
Thank you so much sir!
take care
05:11
what is the return type of jquery html() ... is it string ?
!!/tell nullpointer google jquery html
anyone happen to know C# or vb here?
05:33
hi
just wanted to ask a wordpress question
> If your first question is "can I ask a question?", ask the second one.
do you require access to cpanel
to install a wordpress site
or just ftp
05:46
@user1079641 it is Javascript chat room
asking a vb or c# question here is like asking for a tea in a bear bar
@AnujKaithwas huhh??
nothing, can you explain the meaning of char * in char ch = *(char *)&d, where d is a double with some random value
?
Isn't this a JavaScript room?
Pointers make me feel sick.
 
2 hours later…
08:44
helllo anyone there?
08:56
Maybe?
maybe not
Is anyone really anywhere?
09:14
may be not
or yes
09:31
Does anyone want a beta code for Playcraft?
Thems got big problems with their site: Uncaught ReferenceError: $ is not defined
No errors for me
@phenomnomnominal they shouldn't, it's not that hard
there are pointers everywhere in JS
It's not that they're hard or that I don't understand them. They just look ugly as hell in code.
char * in char ch = *(char *)&d
I mean look at that
The GET to code.jquery.com/jquery-1.7.2.min.js is failing on mine, weird
09:59
Oh, that...
10:29
0
Q: Fire a function on Select Content in TinyMCE Visual Editor in WordPress

user1547766My actual requirement is, When I select some text in WordPress visual editor, and then my custom text is replace in place of that text. I can do this in HTML Editor of Wordpress, but not in Visual Editor, as it is an iframe. I tried number of methods to fire a Javascript/jQuery function at onSel...

 
1 hour later…
11:55
0
Q: Select or detect eyes with jQuery

dariusI'm working on task where poeple can upload their photo to a website and choose what glasses they want to fit from the given list on their face. Somehow I need to select or detect eyes from the uploaded photo to properly add and scale glasses image to fit their face. Maybe you people have a sugge...

:DD "jquery-selectors"
Just do $('#picuture[eyes]').offset();
12:27
@Esailija internet makes me sad
12:53
is it possible to select the parent of a focused input in CSS3?
nvm, I don't think so
13:07
@andrewjackson you are right, stackoverflow.com/questions/45004/…
13:24
3
Q: voice recognition in mono

kalanIs there any way to add voice recognition feature to mono application. There are a System.Speech (in .net) and Microsoft.Speech (in MS Speech Platform) namespaces, but I can't find any in Mono. So how is it possible to add speech recognition functionality in Mono?

13:45
@Zignd nor you should post here
why this tag ?
Look at it upside down
(And reversed.)
14:43
best thing i've watched in a long time
NSFW language
but it's sunday so I hope you are not at work
14:53
Any Ubuntu experts around?
I'm trying to follow the tutorial to [install mongodb](http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/) on my Mint netbook but I keep getting this: (it worked fine on my PC)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
[sudo] password for somekittens:
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.sWshKyDFfS --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 7F0CEB10

 Ask Ubuntu General Room

Normally: General discussion around Ask Ubuntu, Ubuntu & offic...
hey guys, just a quick question. I have an object called pieces, like so:
var pieces = {};
properties: {
shoeType: constants.one_colour,
pieces: {},
front: {},
back: {},
size: constants.defaultShoeSize,
sole: {},
signature: {}
}. now i set up another variable called objects to equal properties (i.e objects = properties). I tried to access the pieces element in objects but I've had no luck so far. Just wondering if you are supposed to use objects.pieces to access this sort of element or not?
obviously by the time i access the peices they would have some elements inside already
If you did objects = pieces, then you have two variables pointing to the same value.
@koramaiku jsfiddle.net/rlemon/xkXvj this should shed some light
read the comments and watch the console.
in a nutshell you don't want to make reference to the object like you are now, you want to clone it to a new object
15:34
@robw: yeah ill probably settle for that. Thanks. @rlemon: yeah I read the code you just made many thanks. The moment I read that i just remembered. :) appreciate it. guess it's time to sleep
I made some updates just now, meh, if you get it then cool. :P
that clone function probably isn't the best - just what I use for simple objects.
@rlemon: sweet thanks again
Making UIs... takes too much time >_>
Anyways, the stickman thing is making progress: dl.dropbox.com/u/2332843/figure/main.html
(currently missing the actually editing, but you can move the bones around via the tree view and select stuff etc.)
Designing or implementing?
I cannot move the bones?
oic
like move move them
i have a right hand for a face
15:41
you can only move the "root" currently, select it, press "m" then click and drag the mouse (shift snap's to grid)
currently only the edit mode is half way done
the animation mode where you rotate the stuff and manage keyframes will be the most fun
also, the preview needs to be able to combine different animations and assign priorities...
so you can combine a walking animation with a weapon holding one
I've made Spidey!
ping @FlorianMargaine

Pinging @FlorianMargaine [123.456.789.10] with 32 bytes of data:
Reply from 123.456.789.10: bytes=32 time=42ms TTL=55
Reply from 123.456.789.10: bytes=32 time=42ms TTL=55
Reply from 123.456.789.10: bytes=32 time=42ms TTL=55
Reply from 123.456.789.10: bytes=32 time=42ms TTL=55

Ping statistics for 123.456.789.10:
- Packets: Send = 4, Received = 4, Lost = 0 (0% loss),
Approximation round trip times in milli-seconds:
- Minimum = 42ms, Maximum = 42ms, Average = 42ms
o/
@AmaanCheval Check my GitHub for the node blog I was talking about before.
15:45
@AmaanCheval AWESOME!
Hey guys
it's still very much in a state of flux
Yeah, I saw it
Anyways, the UI for setting the bone's offset from the parent is still missing as well as adding / removing bones >_>
@AmaanCheval I thought it was 2 people fucking
@rlemon ???
15:47
@FlorianMargaine I do not know how you saw that.
meh, that looks like piggyback
or is it "doggyback"?
Can anybody take a look at 54ip.localtunnel.com/projectNotecard/versions/V0.3 having some issues with glitchy ness
@FlorianMargaine Just doggy style, I think
thanks, my english's sometimes lacking.
@AmaanCheval @FlorianMargaine As they say. "One sees, what one wants to see."
15:50
lol
@henrymb67 I think that your implementation is logically flawed.
@henrymb67 "Glitchyness"?
Not causing any problems right now, but use setTimeout(comet, 1000); instead of setTimeout('comet()', 1000);.
How do you expect people to type in the same textarea at literally the same time?
@AmaanCheval ever heard of google docs?
15:52
Yeah, but can't you lock it there?
@AmaanCheval A better example is Piratepad
Also, a separate chat where you tell them to stop and let you type
@RobW Thanks, changing it now
@AmaanCheval That's not even necessary
Piratepad is etherpad.org
(open source and pirate pad wrote none of the code.. i think)
15:54
I suppose those baby pigs are terrifying
I think that a natural disaster happened
jQuery.ftfy()
@AmaanCheval Obviously it is a work in progress, and doesn't have any features at all.
Why does Playcraft keep sending me beta codes?
I have 6 now
HY92IMTJTS
@RobW Notice when you type it displays a older val, what is causing this?
15:56
In case anyone wants it
@henrymb67 Because of what I described yesterday
You have at least two concurrent requests
If the last request is processed first, then the server's final response will be outdated
@RobW I thought that was i'm doing is longpolling and that would fix this...
@henrymb67 You're not doing anything with the timestamp
I have no reasonable way of doing web sockets on my shared hosting
No problem
An extremely basic implementation would be: Keep track of the timestamps, and only overwrite the text field if the timestamp is higher than the latest synchronized timestamp
Same applies to the server
15:59
the server?
Yes. If the backend receives an extremely outdated version of the text, you should ignore it, I guess.
@AmaanCheval i have 3
These ideas came from the top of my head, don't quote me for correctness :p
It seems just the logical approach to me.
what timestamp would be considered now though?
i dont understand how to implement the timestamps if there is on real way of now?
i was thinking if this timestamp <now then {
Indeed, a significant problem is the synchronization of timestamps
now at the server might not be equal to now at your local computer
You can get a close approximation by replying a timestamp with the server's response
There are various posts on Stack Overflow targetting this problem, I guess.
16:03
var now = new Date().getTime();

// some stuff

console.log(new Date().getTime() - now);
var now = new Date().getTime();
$(function() {
	comet();
	$('#send').bind('keyup', function(e) {
		var msg = $(this).val();
		if(e.keyCode == 13 && e.shiftKey) {
			return ;
		}else if(timestamp == now) {
			$.ajax({
				type : 'GET',
				url  : 'write.php?msg='+ msg.replace(/\n/,' '),
				async : true,
				cache : false
			});
			//$(this).val('')
			console.log(new Date().getTime() - now);
		}
	})
});
Did I write that properly?
No, you're never updating now. And you have to compare the dates, not check for equality.
it would be very rare for the timestamps to be 100% equal
timestamp > now ?
timestamp >= now
nope.
D:
The timestamps are off by factor 1k
Apparently
1352650397 = timestamp
1352650255217 = now
Obviously, timestamp > now is false
16:15
damn
Your application does not deal with the following case:
1. You start typing... "Hell"
2. <save to backend>, meanwhile you finish the sentence "Hello world!"
3. <reply from server>, overwrites textarea with "Hell"
You need to solve that yourself, I'm going to do some real stuff, have been slacking off quite a lot :p
haha okay have fun doing some real stuff
thank you for the help
Have one for him?
16:24
WOW.
Just wow.
My school ict coursework.. wow
look at this for a distinction grade
I'm guessing you're giving your GCSE's?
mhm
I'm ill
so I do my gese's with home tutor
GCSE's*
I chose ICT as one
Yeah, GCSE ICT sucks
The closest you get to enjoying is in the end, near the programming you'll do for Excel
lookLook at this.. "Tables will be used throughout to aid with the layout of different components"!!!!!
what on earth!
tables are not for that data!
HTML is not for styling!
that's css's job
Jordan Richards sure doesn't look like your name
16:27
Just let it all slide
@FlorianMargaine You're certain he's Indian, aren't you? :p
but no.. this is one of the requirements to get the heighest grade..
^_^
@rlemon PM it to him :p
isn't that crazy?
@AmaanCheval yeah
@rlemon I sent him the first one
@FlorianMargaine Why?
16:28
@AmaanCheval watching tv right now, there was a show about bombay
@AmaanCheval ahh I just sent him them as well
What's it called?
I did use tables for placing my form, but that's the only exception I'll make
it's a french documentary about bharati, the show with the "bavnah" girl
being as the form suits as tabular data
but still
16:30
@FlorianMargaine Bavnah? What's that?
I wish i could just walk up to the education board
and babble on about how much fo a fail ICT is
and how web development knowledge is outstandingly low of the teachers.
Agreed
Just knowledge in general was low for the ICT teachers I had
@AmaanCheval Bhavna Pani
my bad.
ah well.
it's gonna be funny doing my evaluation
lol
There'll be some rants
@FlorianMargaine Ooh, I hadn't even heard of her :p
16:31
the course for 1 was too easy
@AmaanCheval damn, she's not your sister?
"design a multimedia website"
"PRINT pages off as evidence"
Hahahaha
Oh and they allow you to copy javascript from websites
evidence is printed page?!
16:32
yeah
Yeah! Also, black and white
I refused and asked to send it via flash usb drive
just do the whole thing in photoshop then...
We designed websites in guess what?
FRONTPAGE!
16:33
LOL
Lol
I'm sending mine via usb now
Oh mongoose, why must you be so silly...
Anyway
it's a pretty neat design.
@AmaanCheval this bhavna is hot, are you sure she's not your cousin or something? :p
16:33
We had to do a houstyle and 5 page plan as well
>_<
@FlorianMargaine Hahahaha, yes, I'm sure
I made quite a neat little nav system
@AmaanCheval well btw the documentary showed that she lived in a big apartment with a balcony & stuff
it's what i call a 'nav-circle;
like... the circle is fitted into the design, when you hover over part of the circle it lights up
because she made it in the bharati show
and we saw a "casting" with "dancers"
16:35
Must have gotten pretty lucky
Lol, I bet the teacher is gonna be like 'huh?!!?'
9/10 girls didn't know how to dance
I can dance :)
@AmaanCheval nah, she was a dancer since 6 or something
Want to see me dancing?
16:35
@FlorianMargaine Lots of Indians are
Near the south, that is
@AmaanCheval Oh. Well.
Gotta go
See you guys later!
Bye
00:00 - 17:0017:00 - 00:00

« first day (757 days earlier)      last day (4418 days later) »