« first day (622 days earlier)      last day (4331 days later) » 

12:25 AM
@Loktar does not work with because of no Audio and LocalStorage in Chromium 17, Linux
I think Chromium has both of these and the Game should work without them anyway
Congrats for Google hit #1 for zombie games by the way
@RyanKinal It's actually on top of HN. Gotta fetch some popcorn for the upcoming drama
 
@copy According to my source, it was announced at jquerycon (why the hell would you go to that!?!?)
 
Maybe free beer, I don't know
 
@copy But when you show up they tell you that the beer was free as in speech, and everyone gets confused
 
12:42 AM
lol
 
> What really worries me is that the first thing we broadcast to the cosmos to demonstrate our "intelligence", is 3.14. ... I am a bit concerned about what the lifeforms who recieve it will do after they stop laughing at creatures who must rarely question orthodoxy. Since it it is transmitted in binary, we can hope that they overlook what becomes merely a bit shift!
>
> http://www.math.utah.edu/~palais/pi.pdf
Interesting read
 
1:09 AM
Nice article.
 
ole loke
sorry @Loktar
sheesh getting out of a moving truck by pressing E was a bad idea.
 
2:04 AM
" jQuery 2.0 will drop IE 6/7/8 support "
Some won't be happy, but the size of the library surely will decrease a lot
Hope MooTools will do the same :o
 
0
Q: Manually updating HTML5 local storage?

hustlerincI'm just starting out HTML5 game developement (and game dev in general) and watching all the videos and tutorials available something has crossed my mind. Everyone keep saying I should set the cookie's (or cached files) to be expired after a certain amount of time. So that when it reaches that t...

 
MooTools will probably have a checkbox for IE6/7/8 support, in their checkbox-for-everything fashion
(erm, modular fashion)
 
lol
You can't deny being able to "build your framework" with only the modules you want is a good thing
 
well its sort of a good thing
but fast! I need to use jQuery!
 
2:20 AM
fast ?
 
oh look the user already has it in his cache because we all use a CDN and the last 5453534534 pages he was on linked to jQuery
in other words, most of the time they've already got the file
but with mootools, if you make a custom one by checking boxes, then they don't have that, and they have to actually download it
 
That's right
But you can optimise on the code you write with that
Did both, and I really think writing modules with MooTools is faster, easier and smaller than with jQuery
 
that may be
I still haven't used jQuery in production before ~_~
 
if all you do is canvas stuff, you rarely encounter it
 
2:23 AM
And all you do is canvas stuff ?
 
yes almost exclusively
 
That's cool. Where do you work ?
 
a little software company in new hampshire that makes diagramming libraries
I have a (very) large diagramming library written in canvas that will be in public beta soon, but not yet
 
SimonSarris... i saw you name somewhere
 
simonsarris.com ?
I'm on SO a lot for the canvas tag, I'm the top user by a wide margin, and I write about canvas stuff from time to time
so if not there I don't really know where
 
2:25 AM
I follow you on twitter
 
unless you use reddit
haha oh :D
 
And you twitted something about scholars today i think
diagramming library
cool
 
3:17 AM
Hey guys
I need help with AJAX. Anyone up for it?
 
sorry, not enough exp to be of use
 
just expose your problem. If we'Re not lazy and want to help, we will ^^
 
Ok thanks.
Here's the thing. A user clicks a row and the value of that row's ID gets populated into a hidden field. I need to store whatever value is in that hidden field in a php variable so that I can store it in the database.
Make sense?
Ideally what I want to do is this:
$exchange = document.getElementById('exchange').value;
But that's not really possible lol i've never worked with AJAX but something tells me that my solution lies somewhere within.
 
Not if you submit a form
You want to do it instantly ? without to reload the page ?
 
I'm trying to do it without submitting a form because I don't wanna refresh the page.
Exactly.
 
3:25 AM
So it lies in Ajax (if you want to do it clean, you also can submit in an effing hidden iframe puke)
 
No thank you lol
@DieVarDump Are you feeling generous, willing to help an AJAX newbie?
 
Well did you do some research ?
About Ajax ?
 
Yes. I know that I can make an ajax request and send it to a different php file and populate the variable there. So once javascript grabs the value it calls ajax which makes the request and then i can post it to a php file
right?
 
Well the ajax call is the post to your php file
But the idea is here
 
Yes. I get it.
Let me show you the page mktdata.rtdsllc.com:8086/…
 
3:31 AM
@ircmaxell if iam not wrong then it's about 1:00 PM in your country
 
When someone clicks on a row in the Exchange List table the value of that row is being sent to a hidden input under my submit button in the form below. I need to know what value you is in that hidden input so that I can store that in the database.
 
I don't advise you to get a big library which, in the of a bunch of tools, provide a cross-browser Ajax "clienT". You can find great Ajax "client" by looking on google for " Ajax Standalone"
 
@Somebodyisintrouble It's 11:30PM here.
 
Or better, do your own if you have time.
 
Understand?
Actually you know what???? I figured it out!!! Thanks! You made my brain spark lol
 
3:39 AM
wow ok
 
 
2 hours later…
5:10 AM
**Le me workin on pure css tabs**

GF comes me talks to her ..

2 hour later

Le me wonderin how the heck this accordion was made
 
6:39 AM
var date1=new Date('-002012-01-01'); when I have used this line of code to create a BC date, it works fine in all browsers except Opera where it returns an invalid date. Anybody know the what we can do to solve it?
 
@Esailija > jQuery 2.0 (early 2013, not long after 1.9): This version will support the same APIs as jQuery 1.9 does, but removes support for IE 6/7/8 oddities such as borked event model, IE7 “attroperties”, HTML5 shims, etc.
wow
jquery will just be an API then :|
 
but the API is best ever :P
 
you can stay with 1.9 anyway
or just wait until they decide to continue working on both branches because lots of people want new features for 1.x
 
7:11 AM
hello i m new in javascript.i have a program which displays latitude and longitude in alertbox.but when i write document.write();it displays nothing.Can anyone help me?
 
@ThiefMaster till the day that new features come in new versions of jquery that don't exist in 1.9
 
Yeah, but then enough people might ask for it to be added in 1.9.x
or they'll screw the plan completely
 
that's what i'm afraid of
 
7:32 AM
@AnkitaMendhe what are you printing in document.write() and in which way
 
i am printing value of latitude and longitude
 
write that line of code
 
document.write(latitude);
 
check your browser's developer tool for any error if your program have
 
A call to document.write() from an asynchronously-loaded external script was ignored.
its giving this error
 
7:45 AM
Maybe it is warning
 
1
Q: Warning: A call to document.write() from an asynchronously-loaded external script was ignored. How is this fixed?

RailslearnerIn my Ruby on Rails application I am using the Facebox plugin for an Ajax pop up window. I have 2 pages called add_retail_stores/new.html.erb and add_retail_stores/new.js. The new.js page inherits all elements from the new.html.erb page so it looks exactly alike. I have a Google map script on th...

Don't use document.write()
 
@Somebodyisintrouble finally, this is said
 
so wat to use.wen i use alert(latitude);it works fine.shows the value in an alert box
but i want it in the browsers page
 
use innerHTML property
 
7:53 AM
no, don't.
 
you can use the textContent property
if you can append a textNode child
 
how to use it?
i m very new to javascript
 
document.body.appendChild( document.createTextNode( latitude ) );
document.body.textContent = latitude;
 
ok i will try
 
7:55 AM
@FlorianMargaine may you tell me the problem in innerHTML
 
hey its working thanx
it displays only one value at a time ???
 
@Somebodyisintrouble it's not standard, it forces the DOM to redraw everything
@AnkitaMendhe yes, because you're telling it to do so
 
can i tell my problem in detail??
 
you'd better ask a question on stackoverflow
or follow a tutorial on the basics of javascript like javascript.info
 
ok thanx
 
8:01 AM
SIGH
2
A: echo trims multiple white spaces in the middle of sting

cairnzMultiple spaces are trimmed in the html output of most browsers, not in the html code itself. If you want multiple spaces to render you can use str_replace($var," ", " ") which will tell the browsers to render each whitespace character. The same goes for multiple linebreaks, using nl2br()

/cry
 
why are people doing this   shit
 
because it works :)
 
yeah insert random character to make a space because you don't understand css
:X
 
seriously? Months after to change this?
 
8:08 AM
:P
I changed the utf-8 all the way through post after 8 months
 
uh?
what do you mean?
 
see my edit here v
I edited it and then the OP made it better again
after 8 months
 
May be Many of you have written script for image uploading to server and storing their name in database in a table.
I am also doing this and i am making 3 copies of a image Now Do i need to make 3 column in my table for only storing src's
 
you can
 
8:18 AM
I dunno I kinda regret it, should have stored image blobs
 
image blobs are not preferred over storing in server
 
why not
Everything is much simpler with them
or would be... grass looks pretty damn green on that side D
 
415
Q: Storing Images in DB - Yea or Nay?

James HallSo I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB. What do you think are the pros/cons?

 
all the points against it are bullshit when you use cdn
 
@Esailija if i am right then images will not be cached with image blob
 
8:25 AM
if you use cdn you will hit the database once a day for the image or even less often
other times it will be normal static image
 
excellent answer about this:
16
A: Files - in the database or not?

Tangurena Store in the database with a blob A disadvantage is that it makes your database files quite large and possibly too large to back up with your existing set up. An advantage is integrity and atomicity. Store on the filesystem with a link in the database I've come across such horrible...

 
backup size is a legit point but performance isn't
 
he says that filepaths often lead to fucked up stuff
 
@FlorianMargaine you will choose which one now
 
depends on what you're going to do
19
A: What are the arguments against or for putting application logic in the database layer?

gbnAssorted thoughts... Your database code will outlive your application client technology. Think of ADO.NET -> Linq -> EF as well as assorted ORMs. Whereas you can still run SQL Server 2000 code from last millenium against all of the above client technologies. You also have the multiple client ...

thing that a lot of people forget:
> Your database code will outlive your application client technology.
 
8:36 AM
@FlorianMargaine filepaths are fucking problematic for everything except backup size :D
 
which blob type store file_size of 4mb
 
why are these kind of questions popular stackoverflow.com/questions/11258583/javascript-use-new
downvoting for no research effort (run the code in console :D)
 
}} "The Times They Are a-Changin'" is a song written by Bob Dylan and released as the title track of his 1964 album, The Times They Are a-Changin. The song was ranked #59 on Rolling Stone's 2004 list of The 500 Greatest Songs of All Time. Inspiration and composition Dylan appears to have written the song in September and October 1963. He recorded it as a Witmark publishing demo that month, a version that was finally released on The Bootleg Series Volumes 1–3 (Rare & Unreleased) 1961–1991. The song was then recorded at the Columbia studios in New York on October 23 and 24, and the latter ...
 
9:01 AM
"Maybellene" is a song recorded by Chuck Berry, adapted from the traditional fiddle tune "Ida Red" that tells the story of a hot rod race and a broken romance. It was released in July 1955 as a single on Chess Records of Chicago, Illinois. It was Berry's first single release and his first hit. "Maybellene" is considered one of the pioneering rock and roll singles: Rolling Stone magazine wrote, "Rock & roll guitar starts here." The record is an early instance of the complete rock and roll package: youthful subject matter, small guitar-driven combo, clear diction, and an atmosphere of unre...
 
9:14 AM
Can I get some help with this or atleast UV it so I can add a bounty. stackoverflow.com/questions/11222612/… I've been looking everywhere for a solution but can't figure out how to solve it.
 
Hi i am trying something like:

d1.push(null) to push null value into an array but doesn't work
any help?
 
d1.push('')
 
seems to work!!
Thx
 
or d1.push(undefined)
empty string !== undefined
 
i am trying to use jflot library

Basic usage:

var d1 = [];
for (var i = 0; i < 14; i += 0.5)
d1.push([i, Math.sin(i)]);

var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];

// a null signifies separate line segments
var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];

$.plot($("#placeholder"), [ d1, d2, d3 ]);
I am trying something like:

d1=[];
for(i=1;i<=counter;i++)
{
start=[result[i]['from_point']['long'],result[i]['from_point']['lat']];
end=[result[i]['to_point']['long'],result[i]['to_point']['lat']];
d1.push(start);
d1.push(end);
d1.push('');
};
$.plot($("#map"), [ d1 ]);

but i have problem with the array
 
9:25 AM
d1.push( null ) works
and empty string !== null
 
yes @FlorianMargaine is right
 
Anything i am missing?
 
doesn't look like so (except for the null thingy)
 
how can i upload an image in the chat room?
 
there is an "upload..." button
 
9:36 AM
this is the json response from ajax request:

{"1":{"from_point":{"long":"37.976","lat":"23.7783"},"to_point":{"lat":"23.7785","long":"37.9761"}},"counter":1,"case":1}
Then i have this:

var result = jQuery.parseJSON(response);
 
then it's normal
 
But alert(result[1]['from_point']['long']); doesn't work
 
completely normal
alert( result[ '1' ]['from_point']['long'] ) should work
 
wtf?
Really?
 
string !== number
 
9:38 AM
wut
1..toString() === "1" bro
 
you are right
 
oh yeah, I thought it'd treat it as "index"
 
there is no way that [1] doesn't work but ['1'] works because the first thing to do internally is call ToString on the argument
 
yep, both work, just tested
 
well that's the reason that jflot librrary doesnt work '37.983' is a string but the library excpects an integer
 
9:41 AM
[1,2,3][{}] is same as [1,2,3]['[object Object]']
 
Everything clear now!!
 
o/
 
@ChrisP new Number( '37.983' ).toFixed( 0 ) then
@GNi33 \o
how you doing?
 
fine, thanks. and you?
 
TGIF
fine too
 
9:44 AM
hehe
 
Now iam uploading image to db just want to know one thing that now my image has a particular address on server or not.
Personally i want my image to be address less
 
Just had a good laugh over Zirak's answer on programmers SE regarding jQuery
 
haha same too this morning
 
> Laziness is awarded for those who worked hard.
nice ending :)
and here we go, on to bugfixing again sigh
 
@FlorianMargaine: I have one isuue related jquery.
 
9:50 AM
@FlorianMargaine everything ok
I must deliver this project in a few hours so time for work!!
 
@user968441 That's cool.
lol
-6
Q: No Browser is running javascript in my computer

user1480423I am trying to learn javascript. But my browser (latest version of firefox, IE, chrome) is not running the script. I will tell you the problem in detail. I am trying to run some small script, but the browser displays only html content but everything inside the script tag is not run by the browse...

 
probably a firewall
 
@Zirak "How does $(something) return a gigantic thingy containing things, and what is this thingy exactly?"
 
blocking js
 
or just non working js code
 
10:03 AM
$ is doing ALL the things!
 
interesting thing I read from specs just now
var o = {};
[].pop.call(o)
o
Object
length: 0
__proto__: Object
side effect omg
 
If len is zero,
Call the [[Put]] internal method of O with arguments "length", 0, and true.
 
it adds the length property, and anything else?
 
WHY
 
10:05 AM
how is that going to affect any code btw -_-
 
var penis = {}
penis.length?
 
@ThinkingStiff Yesh?
 
it was given length !
 
@Esailija var penis = {}; [].pop.call( penis ); penis.length; is even better now!
 
:D
I countered the flag!
 
10:14 AM
not dupe, but I'm sure there are
 
how is it not dupe
you defnition of dupe seems to be character-for-character exactly the same question?
 
my definition is that the questions and answers cover exactly the same ground
 
mine is more "it needs the same kind of stuff", in this example it needs to know that it can do obj[ 'string' + var ]
 
ahahahah
0
Q: Javascript image sizing & positioning

Phil Faceplant YoungI have the following Javascript code which resizes product images and centres them in a box. This code works perfectly fine when called onload, but I have an ajax call which returns 20 more products. When I call this function after the ajax call and after the onload, it resizes any image to be a ...

count the amount of document.getElementsByTagName('img')[i]
 
10:18 AM
OMG
 
It is not expensive
it's very cheap but it's still ugly and a function call
 
it's more expensive to call it everytime
but ok, i'll remove the "very" :p
 
read www.nczonline.net/blog/2010/09/28/why-is-getelementsbytagname-faster-that-queryselectorall/ for why the work the function does is very trivial
the main issue is the ugliness of it :D
if that was querySelectorAll you'd have a good point, then it would be ridiculously expensive
for a hundred images you'd actually notice the speed visibly
in that case
 
I thought a static nodelist would be faster than a live one though
 
30 * 100 calls with 30000calls/sec takes 300ms
 
10:22 AM
I'm getting why it's not now :)
 
yeah but with static nodelist it has to do all the work everytime you call it
 
> Live NodeList objects can be created and returned faster by the browser because they don’t have to have all of the information up front while static NodeLists need to have all of their data from the start.
 
indeed
"faster" means 1395013905x faster
:D
ok gotta go \o
 
11:23 AM
holy crap, the answer I linked to got 7 more upvotes :P
 
2
Q: Why is HTML/Javascript minification beneficial

Channel72Why is HTML/Javascript minification beneficial when the HTTP protocol already supports gzip data compression? I realize that Javascript/HTML minification has the potential to significantly reduce the size of Javascript/HTML files by removing unnecessary whitespace, and perhaps renaming variabl...

 
It's amazing that these things actually work.
 
LoL what was that ? this reminds me of yahoo answers
 
11:55 AM
throw new Error( 'Fake DataCloneError' ); ...good enough
hm. I like realizing a mistake before spending more than 10 minutes on something.
 
@Somebodyisintrouble it was 11:30 PM, and wrong room
 
yeah someone(forget name) told me that
Did you sleep with your computer switched on
 
12:47 PM
Hi there.
so I'm trying to build a tablist with jQueryUI. I copied the demosource and included all necessary files. Still not working. Anyone got an idea?
http://pastebin.com/ZS9rDgWR
thanks in advance
 
you don't close $(document).ready(function() {
 
funniest piece of brilliance inside a meme that i have ever seen!
 
@Sprottenwels check out this neat tool called jsfiddle: jsfiddle.net/ZcKT8
 
meh...sorry, my failure, i cut off a part of the script which has nothing to do with this issue. is actually closed
 
@Abhishek He probably left his Office Open
 
12:52 PM
@SomeKittens I see what you did there
 
@SomeKittens dude if you're going to Fiddle, don't just Fiddle a little, make your Fiddle have a middle. jsfiddle.net/rlemon/wAtMV see like mine!
 
thanks @SomeKittens :)
 
jsfiddle is being an ass
 
yea it is
 
12:56 PM
:(
I need to get all my stuff off of fiddle
all my good stuff anyway
ill start doing that today
 
So I'm writing JS for a SVG file, and I need to make AJAX requests to a database (through PHP if that's what I need to do). Can I do this with XMLHTTP requests?
 
yeah.
 
jsfiddle's working fine for me
sweet, thanks
 
its being slow for me
reminds me of a few months ago
 
@SomeKittens XHR -> PHP -> DB -> PHP -> XHR <<-- handshake pattern
 
12:59 PM
@rlemon thanks. You working another 14 hr day today?
 

« first day (622 days earlier)      last day (4331 days later) »