« first day (313 days earlier)      last day (4649 days later) » 

12:21 AM
What is IE9's policy on cross-domain requests from LOCAL files?
 
messy
local is a pain
 
I know IE7/8 will allow local files to access web resources using XMLHttpRequest...
 
dont do it
 
Why not?
 
Oh cmon
Why? Why do it?
Run a web server
Your in a world of pain if you want a local website
 
12:28 AM
I know what I'm doing :P
I just want to know if it works in IE9
 
World of pain. I warned you
and i dont know what IE9 does
 
I've got my reasons ;)
 
jQCon ProTip: The hotel rate listed on our site *includes* taxes—so it's likely the best deal you can get for lodging. http://t.co/LUBrluM
 
Oh...No...I just thought "all these objects have some common methods, why not make a super-objects with empty methods and they'll implement them?"
DAMN YOU PAST 2 MONTHS OF JAVA AND C++!!!
 
Tom
@Raynos I've got a little application running now. Would you like to give it a glance?
 
12:42 AM
sure
github?
@Zirak thats what you get for doing Java
 
Tom
@Raynos I will make you a zip if that's alright
 
@Raynos It's...it's not my fault! I told them that Java is the suckeh, but they wouldn't listen! THEY WOULDN'T LISTEN!
 
@Tom meh ok
just open source it. psh
 
Tom
@Raynos I was refactoring a private project so no
 
@Tom psh.
 
12:44 AM
...but I do like C++'s -> operator. It looks bitchin.
 
Scared of theft?
 
Tom
@Raynos I realize there are some issues, be gentle on me :(
 
Looks ok
A bit confusing
 
Tom
@Raynos I can see it being confusing if you didn't write it
@Raynos what is most confusing?
And do you think I should separate server logic like that? I currently have a server.js, configurator.js and runner.js
 
The debug folder
Like what?
 
Tom
12:56 AM
@Raynos the debug folder simply outputs debugging information about several items
If you remove that folder then there will be no more debugging information in the console
 
Dont see any point in runner & server
Well actually I do
I have it myself
 
Tom
@Raynos well I was trying to decouple as much logic as possible. Not good?
 
No its good
keep it that way
You ened to set up hooks for unit testing
Oh yeah, unit tests
 
Tom
@Raynos I never used unit tests with a webserver
not sure where to begin
 
you dont have any
 
Tom
12:59 AM
@Raynos I know. How do you want to create unit tests here?
 
Those were easy to write and simply check all the HTTP requests work as expected in the trivial case
This means you can double check any refactoring / editing doesnt make any "stupid" mistakes
consider it your compiler
 
Tom
@Raynos I know what their purpose is ;) Just find it difficult with a webserver because it is hard to emulate client behavior in code.
@Raynos but I agree with you.
 
Testing the HTTP interface is quite basic
 
Tom
@Raynos could you look at the names I gave the events? I don't think you will like them.
 
I consider that an acceptance test
Other then that you want to unit tests modules
and by modules I mean files
"boot.arguments.port.request" -.-
non descriptive bag of words
I know your trying to get the port
but just get the port from process.env.PORT
 
Tom
1:03 AM
@Raynos process.env.PORT is not set
 
Of course not
set it
$ export PORT=4000
 
I'm writing a slideshow that explains how to not write total crap JS, any pointers?
or things you'd like to see in there?
 
@Incognito dont abuse jQuery
write readable code
high level structure
 
Right now my main rant is DRY and inline.
 
Oh progressive enhancements
 
1:05 AM
Yes...trying to OOP with plain javascript
 
seperations of concerns
 
Tom
@Raynos say I want to get a different value from the arguments. What name would you give the event?
 
Implied globals
 
Ehm, im lost
 
eval
 
1:06 AM
with
for .. in on arrays
 
for in on arrays is fine if you don't care about the order
 
@Zirak for in on arrays is slow.
 
But you usually do, so yeah
 
@Zirak ...
 
What blew me away is how much faster a while loop is than a for loop.
 
1:07 AM
Oh, this is a generic advice: Proper indentation and sticking to a single coding style
 
I haven't written a while loop in years.
@Zirak This is something I would have totally overlooked. Thank you.
 
It's just that the last two months have been traumatic. I was introduced to gigantic Java codebase.
It was horrible...
 
@Zirak why y do tis to youself
Y u torture yourself
 
They gave me moniez
 
So you sold your soul
 
1:12 AM
@Zirak I sit on a pile of beeferoni every day. I ignore it, but it sits there, stalking me in the dark, taunting me, teasing me, "hey, just make a change here, it'll be fine...". Then I get the crazy idea to refactor some code, and on my drive home I sound like that psycopathic vietnom vet that's on the street corner screaming about "Agent Orange and the stupid fucking government"
 
And at least I made a few directories a bit happier. Managed to reduce a ton of clutter
 
@Zirak Man, I buy some nice stuff for someone who like to keep a low volume of belongings.
 
@Raynos I was a Java coder (not even developer) before I found my savior, javascript.
 
I see
 
Tom
@Raynos you think I should not use the document structure as namespace? Just use something like arguments.port instead?
 
1:14 AM
You do js?
@Tom dear god
 
But basically yes, sold my soul. And then some more when they told me "Oh yeah, and there's a bunch of C and C++ code lying around that doesn't work like we expect..."
 
document structure as a namespace?
Dont make me puke
 
Tom
@Raynos yeah, that's what most languages do
 
Except that C is awesome.
 
Tom
@Raynos how else can you guarantee that your events will not conflict with another project?
 
1:16 AM
@Tom by most languages you mean Java, C# and other enterprise languages
...
Oh yes other projects
thats what you get for using a global event emitter :P
Rather then a project wide one
Thanks though.
I now know global event emitters are going to be a pain
 
Tom
@Raynos damn you
you guys convinced me to use one
 
@Tom sorry it looked like a good idea :(
 
Tom
@Raynos To be honest I actually quite like it
@Raynos what is your problem with it exactly? only the event names
 
I really didnt think what would happen if you used mediator in multiple projects at the same time
Well you have to garantuee unique ness of events across multiple projects
Oh wait, Of course not
Sorry I'm stupid >_<
It creates ones instance per node process
Theres nothing wrong with it
 
Tom
Why would that justify it?
 
1:21 AM
because it stopped being global across all processes
 
Tom
@Raynos anyway, what do you think about this kind of event name? mediator.emit('arguments.getPort', function(err, port) { }); ==> basically a semi function name as an event
I quite like that.
 
@Incognito Closures! Closures are super important.
 
feels like your just using methods and objects in event namespacing
Its ok
It just feels like your not thinking outside the box completely
 
Tom
@Raynos yes I am. Do you have a better suggestion?
Well you may be right
 
@Zirak I'd like to cover the most important stuff. The really really painful stuff that we see all the time.
 
Tom
1:23 AM
but it looks better than arguments.port.request, right?
 
Yes
I was thinking request.port is better
 
Tom
@Raynos you need to have a namespace
now request is your namespace
 
namespace?
 
Tom
which does not make sense
yes
 
Well no
You could have requestPort instead
Meh arguments.getPort is good enough
arguments.port is good
 
Tom
1:24 AM
you mean arguments.requestPort ?
@Raynos arguments.port is supposed to provide the port. it's like boot.ready
 
No arguments.port or vargs.port
 
@Incognito Maybe "jQuery is not cruise-control for cool"?
 
I can put further reading in there, but I'd just like to see people not have the attitude they don't need to document things or use normal variable names, not inlining, not thinking cut+paste is a suitable replacement of a loop or understanding a simple datastructure.
@Zirak Yeah, I intend to go over some jQuery and vanilla JS stuff.
 
Tom
@Raynos arguments.port is supposed to provide the port. it's like boot.ready
 
Oh
thanks for saying this again
 
1:28 AM
Side note-- if nobody hears from me again, there's a tornado going through my province. Which is weird, as we never get tornados (once in fifty years is even a lot).
 
@Incognito it was good to know you
 
@Raynos My code will haunt you all long after I'm dead.
 
Tom
@Raynos I'm afraid I did not receive your reply, probably something with my internet ;)
Just really interested in what you think before I go to sleep
It's 3.30AM
 
@Tom its ok
@Tom sleep
 
Tom
@Raynos no no, tell me
@Incognito go hide somewhere safe :D
I don't want to feel responsible
 
1:32 AM
@Tom I'm on the second floor of my house with three windows behind me, and an in-the-window air-conditioner still in place. I've got a 15 minute battery backup on this computer, and my bed is directly under the windows. I aint event scared bro.
 
Tom
@Incognito alright, I won't feel responsible
 
If anything will kill me, it'd have happened by now.
 
giant meteor hits Incognito's house
irony makes smoothie
 
Tom
He is silent. :( Wonder what happend to him.
 
Guns to my head, girlfriends who ended up being drug dealers, three car crashes, electrocution, weird chest pains my doctor doesn't think I should worry about, stress, poor nutrition....
Bring it.
Oh, I escaped kidnappers once when I was a child too, that was neat.
 
Tom
1:37 AM
how can you have stress if you survived three car crashes? Means you are like that invincible guy, forgot the name of the movie.
 
I either have someone looking out for me, or someone that's grossly incompetent at screwing me over. I think it's odin.
 
@Incognito wait what
 
@Tom Basically.
 
guns, drugs electrocution
Look
This is the internet
That happens to me every week
 
Tom
@Raynos if you don't reply it will happen sooner than you'd imagine
^^
I need sleep.
 
1:39 AM
@Raynos The best you can do is take it in stride.
y u no believe I have poor nutrition? I eat junk food all the time.
 
@Incognito I can take you on that. Bring it on.
 
and i'm gone
 
My nutrition is based on beer, pizza, ice cream and McDonalds.
 
Tom
I give up. @Raynos wins. Good night.
 
yeah , all the basic food groups
 
1:45 AM
wait what?
 
@Zirak , as seen here : zazzle.com/…
 
Amen
 
 
6 hours later…
7:26 AM
anyone here?
 
 
2 hours later…
9:45 AM
0
Q: Running Javascript with CScript?

MehrdadI'm trying to learn how to run Javascript (instead of VBScript) using CScript.exe, but when I try, I get an error: cscript temp.js Input Error: There is no script engine for file extension ".js". I thought this is possible -- any idea what's wrong?

 
 
2 hours later…
11:58 AM
posted on August 25, 2011

I’ve been thinking a lot about the future of webOS, and have decided it does have one, maybe even a glorious one, provided the new owner or licensee reaches out to web developers, as Palm should have done back in 2009. So here are twelve steps the new owner should take in order to get webOS to thrive. Background webOS is a high-end operating system, which means it must compete with

 
Tom
12:49 PM
Greetings
 
@Tom Hello
 
Tom
1:06 PM
rebooting to linux
 
1:18 PM
text = javascript:RemoveLocal(attachRow0,"fileupload0" , I want to get the number after attachRow, in this case it is "0".
I am using the following regex
var re = new RegExp("/javascript\\:RemoveLocal\\(attachRow(\\d+).*/");
var match=re.exec(text);
console.log(match);
match always returns null
what am i doing wrong?
 
guys any help here please:
0
Q: Getting the src attribute of a child element (child to <a>) in an iFrame and return it to the parent using javascript

Luis ArmandoSince it's an iframe generated dynamically out of php and it just contains a list of pictures I want to get the src attribute of the clicked item (an image wrapped in an anchor tag) and return that to the parent or save it to a variable that can later be accessed by the parent. The thing is jQu...

 
@zer0c00l Actually, could you tell me where you learned "javascript:blah" ?
@LuisArmando You. Who told you to use onclick="anything()" ?
 
@Incognito : It wasn't mine it comes from "Microsoft sharepoint" , I don't use inline, I got that from a href and trying to process it using my own javascript
 
a lot of google search and basically trying everything else I've come up with without success
 
@Incognito This is a text "javascript:RemoveLocal(attachRow0,"fileupload0" "
 
1:28 PM
@LuisArmando Right, but I'd like to know specifically which websites so I can start a wall of shame.
in-line anything is bad.
 
I know haha, but I can't get it to work
@Incognito I think I closed the site let me check
 
So doing the wrong thing won't make it easier.
 
yeah, I closed it. Well I know, but, would you mind helping me then please?
 
@zer0c00l Are all the rows sequential? Can you just use the dom index?
 
@in
@Incognito yes you can
Well let me try it myself
 
1:36 PM
@LuisArmando Go and replicate whatever you were trying to do in jsfiddle.net.
 
hi all
html5 db are so cool!
 
@Neal Isn't it just running sqlite?
 
no its html5 storage
on the clients browser
not on the server
 
@zer0c00l Also stop trying to work with in-lining stuff and it works fine. jsfiddle.net/gm7zG/1
@Neal Yeah I've seen it, but I always assumed it was just a local copy of sqllite.
I've had no reason to play with it yet.
 
@Incognito dont believe so
 
1:45 PM
What've you used it for?
It's persistent like cookies without expiration?
 
@Incognito Thanks :)
 
0
Q: Is a partially familiar scripting language desirable?

rwallaceGiven that a program (under development) needs a scripting language, and that for various reasons it's not possible to use an off-the-shelf one as is, I'm considering basing it on the syntax and some of the semantics of JavaScript, being something pretty much everyone is familiar with, including ...

 
1:57 PM
Stuff like this bothers me...
` <script type="text/coffeescript"> `
Part of a new "Batman.JS" framework, batmanjs.org
CoffeeScript isn't even compiled to JS anymore, it's JIT rendered. =/
 
0
Q: Retag needed [opendatabase]

NealFor all these questions: http://stackoverflow.com/search?q=opendatabase+%5Bjavascript%5D I think we need to add the opendatabase tag (and/or html5) This will make it easier for people to find questions dealing with the openDatabase() feature in HTML5. I would do it myself, but that might cause...

ahhh retag!
 
Well that's neat, hxxp://k-litefm.com/EI/T/Flash/Rotator/dynamic.swf contains something that crashed shockwave and made chrome unresponsive.
 
Can anyone tell me why Im getting an error response from this ajax request? templates.precedenthost.co.uk/getSocial/getSocial.html
check the console
 
2:14 PM
@Owzzz you cant do cross domain things...
@Owzzz you cannot do this:
    $.ajax({
        url: "http://api.qwerly.com/v1/twitter/" + queryValue + "/services?api_key=" + getSocial.apiKey,
        error: function(jqXHR, textStatus, errorThrown) {
            console.log(jqXHR);
        },
        success: function(data, textStatus, jqXHR){
            console.log(data);
        }
    });
 
qUnit needs it's own page... docs.jquery.com/QUnit
Not a page like that, it's own dedicated thing.
 
@Incognito go for it...
 
@Neal My current project on the table is to write a presentation that new people can get to and stop doing in-line stuff and cut+paste code =/.
How can I chain something in jQuery so I can appendChild on a jQuery object?
the $("#thing")[0] always bothered me, isn't there a cleaner way?
 
2:30 PM
@Incognito what are you tring to do?
$('#thing').append()?
 
@Neal I have a DOM fragment I just want to drop into a dialog.
I made a bunch of the HTML render from DOM stuff because it's faster, but I want to merge it into jquery like it's a plugin, because I'm not worried about performance bottlenecks here.
 
Thanks neal, how should I go about retrieving the information?
 
@Incognito ook?
@Owzzz jsonp... look into the twitter api
its all on jsfiddle
 
Cheers
 
@Neal Basically, variable A contains a DOM fragment, I just want to append it into something that's a jQuery object. Jquery Append (as far as I've seen) is text =/.
 
2:39 PM
@Incognito nope its not text lol
i use it all the time
 
i know this is going to sound ridiculous but is it possible to make a drop down menu inside a textarea?
 
@JeffHodge ummm
why?
how would that look?
and why?
 
i am working with this form that has a servlet, pulls out specific parameters and makes a ticket out of it when I post the form to the url
there are limited/fixed parameters so I can't make my own form fields for Manager name or Application name. The users are lazy to fill things out so to bypass the form field issue i was thinking of putting in a drop down inside the textarea if possible which solves all the problems
 
@JeffHodge ok? so why not put the dropdown where a dropdown should go?
well u cant. i mean u can append one to the form with some js
 
because I don't have a parameter for the dropdown....attribute..
there are limited attributes, i cant create my own i must use the created ones...
 
2:44 PM
@JeffHodge huh?
make a fiddle...
 
operation='AddRequest' operation command for Adding Request
reqTemplate Template Name
title Subject for the request
description Description
resolution Resolution
requester Requester
requesterEmail Email Id of Requester(For distinguishing user)
priority Priority
level Level
status Status
mode Mode
urgency Urgency
impact Impact
impactDetails Impact Details
requesttype RequestType
site Site
category Category
subcategory SubCatergory
item Item
group Group
technician Technician Name
 
@JeffHodge what the frak is that?
 
those are the only ones I can use
those are the list of attributes or "names" I can give to my form fields
 
ok i have no idea what u are talking abt.
make a fiddle dang it...
 
the servlet recognizes those names
 
2:45 PM
@JeffHodge i have no idea wt frak you are saying
yay bsg...
 
@JeffHodge Hey man, I got this thing and it's all broken it connects to the superdooper and here's a big list of things. It's broken. Problem?
 
@Incognito lol :-P
@JeffHodge explain better...
 
Neal...Think of it like this...in an html form we have name for elements...The ticket creating script searches through the form you submit to look for those names of form fields and pulls the values out, fills this ticket out
 
@JeffHodge MAKE A FIDDLE OR IM DONE.
OR MAKE A PASTE
something...
 
2:49 PM
@JeffHodge ok... what do you want to do?
 
ok FOR EXAMPLE, you see the Priority form field? its html is like: select NAME="priority" class="dropdowns"
 
@JeffHodge ok...
so?
 
the NAME is "priority, it is one of the attributes in the list of attributes I can use
other than the attributes listed in the list I cant use them
 
@Incognito can u help. this making my head hurt.... alot
 
the ticket process searches for the attributes it has in the list and grabs the value the form field has and fills a ticket
i cant make it any simpler to explain than that...
 
2:51 PM
@Neal I would but I'm telling people off in message boards, I'm trying to find that logical fallacy that describes "yeah but I've got personal experience in derp"
 
If I can put a drop down in the description it would help a lot
 
@JeffHodge Stop. Count to 60.
 
@JeffHodge YOU CANT.
done
 
You need to realize something. Nobody here knows what your looking at, we don't know the history of your project, we have no anchor to any facts what-so-ever about whatever you're doing beyond "you have a problem related to code you're writing"
that's actually it.
 
finished
@JeffHodge if you want more help post an SO question and make sure to add the fiddle
 
2:53 PM
If you want people to help, they NEED to be fully explained what the hell you're trying to do. You can't come in and say "yo my forms all screwed up and it talks weird".
2
 
lol
do you know what a servlet API is?
 
In some cases you can abstract the root of your problem, then you could ask it in a smaller context, such as "Why can't I increment a float with an int?"
Is a serverlet API your problem?
 
@JeffHodge that has nothing to do with js
 
Servlet API is basically a ticketing process/script which searches through a form to find form fields that it recognizes, it has a list of names and those names are the only form fields it recognizes, anything else it wont pick up when creating a ticket
i thought perhaps someone in js would know of a way to add drop downs to description somehow, i didnt think it was possible but was worth a shot
 

« first day (313 days earlier)      last day (4649 days later) »