« first day (109 days earlier)      last day (4831 days later) » 

10:18 AM
I hope not :p
if (rep > JON_SKEET.rep) { give admin rights }
 
10:50 AM
Kind of nice I put off reading how $.ajax works until after they rebuilt the ajax code
 
@Raynos 1.5?
 
@Greg Yes $.ajax was rewritten internally in 1.5
Which btw is officially the latest version and is out of beta
 
11:12 AM
g'day
 
@Raynos nice to hear, I'll have a look into it
 
11:28 AM
@jAndy greetings
 
Hi, good morning.
I asked yesterday, but got no answers. The question is this, I have ajax call to get contents from a website. All the images on that website have absolute path /img/someImage.jpg, and the address of the page is somewebsite.com/subpage while my page has different URL and I do not host the images.
Is there a way to make jQuery get all addresses in a context to that website?
So that all abs paths would be full paths to the image in context to the website
 
@raRaRa if the paths have a slash at the start, they should work?
 
Greg: No, because the address would point to my website
 
@raRaRa oh sorry... you're trying to do cross-domain ajax?
 
Yeah, excatly :)
My question looks very unclear, but that's exactly what I need!
iframes are ugly because they do not have auto height option unless using some nasty hacks
 
11:38 AM
$.xdajax({
url:requrl,
type:"GET",
success: function(o) {
var root=$.loadXML(o.responseText);
},
});
 
Nice... until I read "which requires a transport flash file to be placed at the root level of your domain."
:-(
I assume there's no clean way to do an iframe alternative
 
@raRaRa if you could do it with javascript, it would cause major security concerns
 
Hmm.. actually.. true
But what if the address is the same?
 
if it's your domain ... no problem
 
However, the page is a subpage
 
11:42 AM
subpage, or subdomain?
 
And some images have path that are not absolute, but relative.
Subpage
 
@raRaRa if they are relative, they will be relative to the ajax request.
 
Assume <img src="Images/Test.jpg" alt=""/>, the path to the html is page.com/subpage, so the image is within page.com/subpage/images/test.jpg
When I do the ajax request from page.com, it'll use page.com/images/test.jpg
 
HI guys
do you guys know a way to access properties of a pop up using java script or
 
@Harshana var popup = window.open("newpage.html"); popup.location.href="anothernewpage.html";
@raRaRa <img src="/images/test.jpg"> on yoursite.com/page will point to yoursite.com/images/test.jpg ... <img src="image/test.jpg"> on yoursite.com/page will point to yoursite.com/page/images/test.jpg
 
11:51 AM
Yes
But the problem is that, the subpage /subpage has the images there, which I have no control over.
among other links pointing relative
and the page is within the subpage, so it has all the image paths as following: src="images/img.jpg", which points to page.com/subpage/images/img.jpg which is correct in that case
 
@raRaRa an iframe will be in context with the domain, not your domain
 
Yes
It will be in context with the address
 
12:07 PM
thanks greg..actually its something like file download pop up..you have there open,save,cancel buttons and what i want is something like to track when you click either open or save or cancel button in that pop up
 
12:17 PM
word
 
@Harshana javascript can't get access to that sort of operating system functionality... it would be terrible if it could.
 
yes greg..do u have any idea of how to if any method
 
downloadWindow.cancelButton.onclick = function() { return false; }
 
it can, but through browser vulnerabilities only
 
@Harshana you could make your own popup window in the page, and track the button clicks of that
 
12:23 PM
yes definitely we may find browser issues knw..like chrome doesn't gives a popup window also know when downloading a file..
 
@Harshana make a question box appear on your page "Do you want to download the file? [Yes][No]" and track the usages of that.
then to make 100% sure the user has downloaded the file, you could set up an access log on the server, and see if the same IP address completes the download
 
thanks greg..let me c :)
 
Hi there! :)
 
12:38 PM
HI nyuszik
 
@Nyuszika7H good afternoon
 
any one from US
whts abt the winter storm
 
nice and crisp spring weather in the UK today :)
 
:)
 
dam you
it's coming down ice over here...
 
12:56 PM
Oh no. don't tell me you're back in the US.
 
1:10 PM
2
Q: Delay before answers are published

jAndySuggestion A questioner should have the option to setup a timeframe, which defers the publication of answers given to the question. Reason I'm very active on Stackoverflow when it comes to Javascript / jQuery. Many times if a question comes up, it feels like a race on who is answering a questi...

any thoughts ?
 
@jAndy where did your avatar go?
 
@Nyuszika7H: hmm I see my avatar on SO, but not on meta
 
@jAndy try copying your SO account to MSO
 
just changed the mail/openid address, should do it :)
 
@jAndy :)
 
1:23 PM
I need +9 in OOP. Anyone have any OOP qestions they want to ask ;-)?
 
wow, two downvotes on the suggestion on meta since I posted it here :p
downvoting folks in javascript :p
 
I didn't downvote, but I don't agree with it
lol
 
@ircmaxell: why? it still would/should be optional
 
true, but the other side of the coin is that most of us will delete an answer or not answer if we see a better or equivelent answer
but the delay would effectively mean that more of us would be submitting answers rather than concentrating and upvoting on the good ones
 
still, my belief is that this would bring up way more good/complete answers
 
1:36 PM
+1 @jAndy
 
It's one potential solution to the problem...
 
Although I don't know if that will fix the problem
 
I don't know of any others...
 
Just downvote code only answers...
:P
 
Aparantly this was worth a -1:
0
A: MySQLi Equivalent Of MySQL Code

ircmaxellWell, in an OO sense, it would go from: if(mysql_num_rows(mysql_query("SELECT userid FROM users WHERE userid = '$userid'"))){ //code to be exectued if user exists } To (assuming numeric userid): $result = $mysqli->query("SELECT userid FROM users WHERE userid = ".(int) $userid . "); if ...

 
1:37 PM
I should edit the question.. I already mentioned that this MUST be optional in the question-mask. It only really makes sense for a pretty "easy" / "short" questions
this at least would outclass answers like, "do it that way blah"
people could write at least some lines with explanation etc.
 
What about... making code blocks not count against the minimum number of characters required?
 
@Ivo; that's not bad at all actually...
 
Oh, and increase the number of required characters to 150...
 
def
-2
Q: Smarty - menu levels

easyrider{if is_array($categories_menuleft) && count($categories_menuleft)} {foreach item=category from=$categories_menuleft} <div class="menuitem"> <a {if $category->category_id eq $currentPath[1].id}class="active"{/if} {if $category->alias && $FR_SEO_ALIAS}...

I hate templating engines...
 
@IvoWetzel: after 2hours people would just paste 100 characters of 0x0160 whitespaces along their one-line answer
:p
 
1:43 PM
Oh, so I'm not the only one hating smarty.
 
I can't stand it
 
posted my suggestion as an answer to jAndy's question
oh, and you can strip whitespace effectively :P
 
@IvoWetzel: tomorrow I use dots to get my character count!!! :p
anyway, +1 for the suggestion
but I don't really think that an approach like this ever makes it onto the site
someone just posted a similar suggestion a while ago with pretty a pretty bad response
-pretty
 
2:13 PM
What's InjectedScriptHost?
 
2:35 PM
ummm, a host that was injected into the script?
 
@ircmaxell :P
I've found a solution to use console functions like copy() and inspect() in Safari, but sadly, not in Chrome. :/
If you're using Safari, try copying this to your address bar: javascript:(function() { console._inspectorCommandLineAPI.copy('Hello, world!'); })();
 
@Nyuszika7H it does nothing (visible)
 
@Greg Press CTRL+V there. It should paste Hello, world!
 
still got my javascript:(function() { console._inspectorCommandLineAPI.copy('Hello, world!'); })(); coppied
 
hehehe
 
2:45 PM
Did you guys see @david's awesome jsfiddle? jsfiddle.net/ctrlfrk/hNaYu/30
 
3:11 PM
Is try ... catch bad?
 
what do you mean @Raynos?
 
Yeaaah! console._commandLineAPI.copy('Hello, World!'); works in Chrome!!!
 
are they bad for performance if I use them as error handling?
 
Yay! Strunk&White badge!
@Raynos: try .. . carch is efficient, throw is not
 
@ircmaxell javascript specifically?
 
3:13 PM
generally, since it requires stack bubbling (and stack traces being generated)
try ... catch should be very efficient by itself since it requires no stack change, just an annotation at the current level in the stack. whereas throw requires a iteration up the stack until it finds a try block (or bubbles off the stack)
 
@ircmaxell I knew one of them was bad
 
it's not that it's bad
it's just don't abuse it
 
so try catch doesnt start a new interpreter or something like eval does
 
no
 
var consoleAPI;
if (typeof console._commandLineAPI !== 'undefined') {
    console.API = console._commandLineAPI;
} else if (typeof console._inspectorCommandLineAPI !== 'undefined') {
    console.API = console._inspectorCommandLineAPI;
}
 
3:15 PM
not in any sane language at least
 
3:40 PM
"The with statement isn’t the only part of JavaScript that artificially augments the execution context’s scope chain; the catch clause of the try-catch statement has the same effect. When an error occurs in the try block, execution automatically flows to the catch and the exception object is pushed into a variable object that is then placed at the front of the scope chain. Inside of the catch block, all variables local to the function are now in the second scope chain object."
just read that the other day, in high perf js
The try-catch statement is very useful when applied appropriately, and so it doesn’t make sense to suggest complete avoidance. If you do plan on using a try-catch, make sure that you understand the likelihood of error. A try-catch should never be used as the solution to a JavaScript error. If you know an error will occur frequently, then that indicates a problem with the code itself that should be fixed.

You can minimize the performance impact of the catch clause by executing as little code as necessary within it. A good pattern is to have a method for handling errors that the catch clause
 
nearly done with the CV...
 
wish i could link the page...
 
@IvoWetzel CW?
@Loktar you can post links there
 
i know, its a safari book online chapter
so i cant directly link to them
 
@IvoWetzel Let me see, let me seeeeee
 
3:47 PM
pretty sure youll need an act to view it
 
@Shikiryu Hold on a second, gonna strip out the addresses and stuff :P
 
@IvoWetzel You got an hour before I leave.
 
@IvoWetzel where's the kitten?
@Loktar And how can I register?
 
@IvoWetzel then how can I call you with google voice randomly :(
its like $50 a month I think @Nyuszika7H
my job pays for it
 
@Loktar no trial?
 
actually i think there is
nice @IvoWetzel its for zynga
good luck
you should also put that you can steal game ideas like no other :P
if someone makes fish town, you will have fishville done in a week
but seriously though I hope you get a position there would be cool.
 
they're not a bout... "getting inspiration" in frankfurt
they develop tools/underlying libraries for games
 
Extraordinary knowledge <-- I love it ! :p
 
@Loktar only subscriber sign-in :(
 
yeah im just poking fun at zynga in general, how they became insanely wealthy off of farmville
 
3:57 PM
SO profile on a CV? Why not...
 
don't have much else...
no former jobs
and school... uh...
 
ivo what you need is a portfolio website
 
@Loktar Got one that's work in progress
 
missing... the texts
 
3:58 PM
mines dated
but it has helped
 
nice
yeah thats exactly what i was thinking, just somewhere to share projects
got a sweet email address too, me@jasonrb.com :P
 
I just haven't manage to come up with good "design" for the texts yet
 
same age @Shikiryu
 
4:00 PM
Yeah, old.
 
you learn on a commodore or older pc by chance?
i was lucky enough to have a c128, so im proud of my age
 
AppleII and amstrad with my dad
 
gosh I hate coding
 
nice
 
you know the feeling if you dive into a problem and more and more problems come on the stage, diving deeper and deeper into a chain of problems and at some point, I can't see the whole picture anymore
:p
 
4:03 PM
I won't be able to finish the portfolio website in time, want to send the thing today... and I don't want to link a halfdown page
 
@jAndy I'm in the middle of this @ work... 1 day I'm on an oracle query... Can't understand it =_=
 
@jAndy Then it's time to.... refactor...
 
I wish I could, it's 80% not my code and it's pretty damn much of it
 
@IvoWetzel Don't. But, some colors would be nice :">
 
@Shikiryu Hm...
 
4:05 PM
Depending on the job.
 
@IvoWetzel id send the so profile at least, maybe a link to your github act
they already looked at your resume right?
or is that going along with it? I have stuff like that on my resume, then I just highlight some of the strong points in the cover letter.. but US might be different in terms of resume/cv/etc
 
the first page of the thing is the cover, the other to are the "cv/resume"
 
I usually put my website + 2/3 best suited projects for the job.
 
My main problem is that I don't have anything besides the projects that I could list to proof my knowledge etc.
And I can't list school stuff, that would end in 7th grade... and would look really bad
 
thats all you need
i have no degree or diploma
 
4:11 PM
Your projects seem like a very good proof to me.
 
well then I gonna clean up my twitter account a bit and send the thing...
 
@IvoWetzel : dude, I have a diploma in design. So I don't have proof for my programming skills.
 
@IvoWetzel what's your primary language?
 
And your personnal projects are certainly more impressive than mine ;)
 
@IvoWetzel imo your already in the top 10-5%
by being an active member on so, having a portfolio , and recreational projects
i work with 2 developers who hate coding
and its always been like that in my career
 
4:14 PM
@Nyuszika7H Programming or natural?
 
@IvoWetzel natural
 
German
 
Active member on SO can be (and have been) discused ;)
 
@IvoWetzel I KNEW!! No, not only because I've translated your tweets by Google Translate :)
 
I hate windows
4
 
4:16 PM
@ircmaxell That could be starred.
 
s/could/should/g
 
I can run 2 linux VMs on this computer, each using 100% of cpu, and still use the computer
but with the Windows VM, it uses 100% of supplied CPU, and harddrive since it likes to swap out parts of the kernel...
so it drags the whole computer down
sigh
Oh, it swapps out part of the kernel when it has 2gb of ram free (the VM has 4gb of ram assigned to it)
 
Is this correct for merging two objects?
jQuery.extend(obj1, obj2);
 
@jAndy that's every piece of code i write thats longer then 10 lines!
 
4:56 PM
Is it a bad idea to use for(var o in objectArray) { doSomethingWith(objectArray[o]); } ??
 
yes
 
@IvoWetzel is it just that its really inefficient?
 
1
Q: Code-Bowling: Print out Hello World without using apostrophes or quotes

Nyuszika7H Code-Bowling is a challenge for writing the most obscure, unoptimized, horrific and bastardized code possible. Basically, the exact opposite of Code-Golf. The Challenge: Create a program using the langauge of your choice that prints out Hello World. Examples: <?php echo Hello; echo PHP...

 
that, and you're missing a hasOwnProperty there
 
why did this got 2 close votes?
 
5:01 PM
Because you deserve them.
 
It's not my fault that it isn't CW already… I've flagged it for mod attention.
 
What's wrong with @prisoner on that question, saying there's apostrophe when there's not.
 
@Shikiryu Huh?
 
Oh, he deleted them.
 
@Shikiryu He confused commas (,) with apostrophes (').
 
5:26 PM
function crashPage() {
    while(1) {}
}
 
@Greg semantically if your treating objectArray as an unorderedSet then it's fine
 
function crashPage() {
    try {
        while(1) {}
    } catch (e) {
        crashPage();
    }
}
 
@ircmaxell ew.
 
hehehe
 
function StackOverflowException() {
    StackOverflowException();
}
> StackOverflowException()
RangeError: Maximum call stack size exceeded
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHE
 
5:34 PM
RangeError? Why RangeError?
 
IDK.
 
Unless the stack is a pre-sized queue or other hard data type
but still, weird
 
while (1) {
    window.open('javascript:alert("Muhahaha!");');
}
 
per our discussion yesterday, about building contained exe's with webkit rendering and JS khrona.com/products/awesomium
sounds cool, too bad its not free
 
5:56 PM
Hmm, why was my code-bowling question closed? Maybe it's a duplicate, but it's closed with the reason off-topic …
3
Q: Code-Bowling: Print out Hello World without using apostrophes or quotes

Nyuszika7H Code-Bowling is a challenge for writing the most obscure, unoptimized, horrific and bastardized code possible. Basically, the exact opposite of Code-Golf. The Challenge: Create a program using the langauge of your choice that prints out Hello World. Examples: <?php echo Hello; echo PHP...

 
sigh
 
any idea what that things wants from me?
 
lol
thats a horrible form..
 
I uploaded my cover/resume and now it wants... ???
And very US centric too
 
It's simple
If you can figure out the form, Either you are smart enough to deduce what they wanted or you don't understand how bad of an idea that is and are likely to redo it...
 
6:00 PM
Anyone??
 
@Nyuszika7H: you got a reopen vote from me
 
@ircmaxell thanks. dranchestern said it belongs on CodeGolf.SE. but for the god's sake, THAT SITE IS IN PRIVATE BETA!!!
 
I hit submit now, whatever it is... it has nothing to do with the country I live in
 
lol
 
6:03 PM
The world needs more... forms....
 
Oh you trying to work at Zynga?
 
I guess so
 
<form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form><form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form></form>
 
It's a opportunity, at least
 
Yeah incredible talent there
I chat with the lead flash developer a lot
Well one of them
 
6:07 PM
:) good luck ivo.
 
He'll get it
 
That reminds me, is anyone based in australia?
 
@Raynos Thx
 
nope
 
Wonder what the software development market is like over there
 
6:14 PM
I have a few friends over there
it's slower than US and europe, but still fairly active
 
@Raynos I have a friend who's sort of in NZ
 
Thinking of abandoning england and setting shop in AUS.
 
no
pollitically they are fubar
Oh, and I'm going to go smack the people in Meta. I'm not going to loose my taxonomist badge potential because they decided to create a new site for code-golf...
 
hm
just move all the old subjective things of skeety and co over to programmers :)
 
Whats taxonomist?
 
6:28 PM
created a tag used by a bunch of questions
(50):
 
good afternoon!
 
What's going on?
 
Tek
Nothing much, other than suffering power outages. So cold. D:
 
uhhh
 
Tek
lol sorry about that, I typed faster than me realizing I had caps lock on :p
 
6:39 PM
caps?
Ahhhh
you mean that key that I've disabled :P
 
Tek
hehe
 
apart from the tutorials on developer.mozilla.org, are there any good references for canvas?
 
not that I have found
 
@IvoWetzel did you want to write a null vs undefined answer or shall just accept the best (current) one.
@Greg console.dir(window.canvas)
 
6:54 PM
I found this:
 
@Raynos Just accept the best one
 
@Greg once youve played with it for a few hours you wont need anything else
 
Yeah, that's decent
 
I am trying to create sticky footer at bottom of web-app in iphone, but when I scroll the complete page there is always some space at the bottom
anyone want to check in simulator/iphone?
 
Where do i read about bounties?
 
6:58 PM
document.getElementById('footer').style.top = (winHeight-160) + 'px'; where 160 is the height of footer
 
@Raynos: The FAQ?
 
Ah I guess so.
 
how to find if the browser is from mobile? iphone/ipad,android etc
 
Tek
@coure06 You might want to look at this quirksmode.org/js/detect.html
 
how do I draw a segment of a circle using .arc() in canvas?
 
7:11 PM
uh
Am I the only one who sees little use in the new suggested edits?
Also
An error occurred when trying to reject

You must have edit rights to reject a pending edit
(click on this box to dismiss)
0
Q: Javascript - How to capitalize first letter of each word, like a 2-word city?

imclMy JS woks well when the city has one word: cHIcaGO ==> Chicago But when it's san diego ==> San diego How do I make it become San Diego? function convert_case() { document.profile_form.city.value = document.profile_form.city.value.substr(0,1).toUpperCase() + document.profile_form.city.v...

first answer >_>
 
@IvoWetzel got love the 0 upvotes
 
oh apparently that upload form did extract the stuff from the pdfs...
and convert it into a text wall -.-
at least the allow for adding messages to the job application, and THERE they allow for attachments...
I left them a friendly message with the PDFs attached...
hm...
something on linkedin's makes me distrust their security model....
> [password field] (6 to 16 characters)
 
7:55 PM
Oh i got into the cloud9ide beta :)
its shiny
@IvoWetzel link to CV
 
@IvoWetzel LinkedIn is targeted at CEOs and your mom, not those paranoid antisocial security types.
 
Still...
 
lol
 
why would you limit the password length?
I mean you hash it after all...
you... do... hash it... right?
 
I... my two banks have totally different arbitrary password requirements. I wish everyone would allow me to use an SSH key.
 
7:59 PM
to easy
 

« first day (109 days earlier)      last day (4831 days later) »