« first day (611 days earlier)      last day (4335 days later) » 

4:01 PM
@Esailija omg...
 
 // string to int please
            GlobalVars.SelectedIndex = parseInt(GlobalVars.SelectedIndex);
annoying comment, annoying UpperCamelCase convention
 
@Esailija also should prob put 10 radix otherwise could get weird octal behavior
 
Partially problematic code
 
user1385191
Want to contribute to Utils? Comment on the Beta release via the following link: http://news.ycombinator.com/item?id=4127036
 
btw, @Esailija, whadya think about allowing people to post inline-codified messages? Like !!>`blahblah`
 
4:04 PM
it's already gray
!!> hello ?
 
yep, so code snippets will look nicer, easier on the eyes
 
sure it should work since it only accepts singleline code anyway
 
I'm using this JQ selector if ($("#select-box option[value='I']")
but what If I want to make it work when the option is <>I
 
the option is...what?
also if( $() ) is same as if( true )
 
Not exactly the same, but indeed, objects are truthy
 
4:09 PM
well the literal content is not exactly the same but the effective result is :D
 
ugh, this is just too...wrong: pastie.org/4104667
 
what's wrong
 
The overloading, man! It haunts me
 
oh yeah the hacky boolean flag somewhat smells
 
@Zirak Split up then, parse( msg, map ) and parseLast( map ), no ?
 
4:15 PM
Can't find out why a splitting name which fits. I'll commit in a few mins so you'll see what parse is in, just need to test it a bit
Which reminds me...why don't I have a test suite for this?
 
cos it's not a heart monitor for your grandma
 
Really? Did they switch it?
 
!!> Array(6).join("Bum ")+"i'm lovin it";
 
one sec, checking to see if I'm going insane or not
 
@rlemon "Bum Bum Bum Bum Bum i'm loving it"
 
4:19 PM
okay...now what did I change?
 
which branch are you commiting to
because I checked master and code execution
 
!!/jquery "+ selector" ajax
!!/mdn form.elements document.createAttribute "I like big butts and I cannot lie"
@Zirak http://api.jquery.com/?s=%2B, http://api.jquery.com/?s=selector, http://api.jquery.com/jQuery.ajax
@Zirak [form.elements](https://developer.mozilla.org/en/DOM/form.elements), [document.createAttribute](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/document/createAttribute), [I](https://developer.mozilla.org/en-US/search?q=I), [like](https://developer.mozilla.org/en-US/search?q=like), [big](https://developer.mozilla.org/en-US/search?q=big), [butts](https://developer.mozilla.org/en-US/search?q=butts), [and](https://developer.mozilla.org/en-US/search?q=and), [I](h
Didn't push yet. And Y U NO WORK?
 
ok so since I forked your repo, and I try to pull master, it tries to pull from the forked master which is of course very old
how do I pull from your master
do I have to do something with the web gui
 
Merge changes from my master, I guess
 
yes but you see
they are my repos
can I just change it to yours, just like that
brb
 
4:26 PM
0
Q: When writing tests for a Wordpress plugin, should i run them inside wordpress or in a normal browser?

Nicola PeluchettiI have started using BDD for a wordpress plugin i'm working on and i'm rewriting the js codebase to do tests. I've encountered a few problems but i'm going steady now, i was wondering if i had the right approach, because i'm writing test that should pass in a normal browser environment and not in...

 
I think something like git fetch git://github.com/Titani/SO-ChatBot.git would work
 
ah yea
 
@Esailija "testy test"
!!/mdn "I like big butts and I cannot lie"
!!/mdn form.enctype "blooga booga"
 
user1385191
!!/mdn "I like big bits and I cannot lie"
 
@Zirak https://developer.mozilla.org/en/DOM/form.enctype https://developer.mozilla.org/en-US/search?q=blooga https://developer.mozilla.org/en-US/search?q=booga
@MattMcDonald https://developer.mozilla.org/en-US/search?q=%22I%20like%20big%20bits%20and%20I%20cannot%20lie%22
That's odd
aahhh, of course
 
4:34 PM
!!> "there is no " + "'"
 
@rlemon "there is no ['](spoon)"
@rlemon "SyntaxError: Unexpected identifier"
form.enctype "blooga booga"
=>
["form.ectype", "blooga booga"]
=>
    form.enctype
    blooga booga
    =>
        ["blooga", "booga"]
okay, so I have to distinguish between mdn the command and mdn the logic
 
user1385191
guys, I need 2 or so more upvotes to sniff the front page
 
anybody ever debugged something on windows phone?
 
mtk
@JeanPaul Thanks you very much
 
I have upvoted
 
mtk
4:38 PM
That worked
 
wow making account was so easy
no need for email
 
@Esailija Me too. I think your vote didn't get counted
 
I wonder if they even count votes from users just registered..
 
user1385191
probably not
 
There
 
4:40 PM
@mtk, no problem
 
!!/mdn form.enctype "blooga booga"
@Zirak Could not process input. Error: args is not defined
 
!!/mdn form.enctype args
 
@rlemon Invalid command / mdn form.enctype 'bloogya day'
@rlemon Invalid command / mdn form.enctype args
@rlemon Could not process input. Error: args is not defined
 
Anyone can give me an advice regarding nested sets
and jstree?
 
^ JS Room advice of the day
 
4:43 PM
aha, found it
ah, Emacs. You're such a joy. C-[space] C-M-b C-s args
!!/mdn form.enctype "blooga booga"
woop!
 
Someday, someone will be pounding on the keyboard in frustration, and will just happen to hit the Emacs command for "create Skynet". Thus will begin the end of humanity.
 
There's M-x butterfly already. I'm sure there's C-c M-h skynet in some plugin.
M-x butterfly prompts: "Do you really want to unleash the powers of the butterfly? (yes or no)"
hahaha, typing "no" prompts "Well, then go to xkcd.com!" and opens xkcd.com/378
Is !!/jquery really necessary? I'll have to move this entire code block and make a closure. That's about 10 keystrokes.
 
I need help with the server side part of jstree which uses a nested set approach? Anyone that can give me an advice about that?
 
Found out about M-x doctor (Eliza thing.) This was amusing: pastie.org/4109528
 
5:04 PM
25
Q: I just stumbled upon Eliza (then tripped and fell)

amanaP lanaC A nalP A naM AI just happened to be looking through the chatrooms on meta and I noticed this one: The Couch It seems someone on the SE team has created a chat bot called Eliza Is this some sort of ploy for SE to take over the world? Is this bot going to be the new mod? All kidding aside, it was pretty...

 
I knew about Eliza, but fun to find it in Emacs.
Apparently, Emacs also has Gomoku, Pong, Tetris, blackbox, snake, and tons more. I'm impressed more and more.
> If you are a little bit bored, you can try M-x hanoi. If you are considerably bored, give it a numeric argument. If you are very, very bored, try an argument of 9. Sit back and watch.
 
5:20 PM
why is the else clause not executing
man I really lost the fastest gun in the west now
 
> e.type = "mouseover"
e.type ==(=?) "mouseover"
 
LOL
 
MG1
@rlemon are you back from lunch?
 
nope
this is my automated noob answering script
listens for @Esailija's questions then answers them
then gives an explanation about all of this
:P hehe
 
@Esailija how bad are you feeling about this nooby mistake? :D
 
5:22 PM
my gf was distracting me
I was tired
 
LOL
 
wait, are you coding while having...?
 
man I had that code 10 mins and couldn't understand why the else clause was not executing
 
no wait
I don't want to know.
 
it would have been instant answer here stackoverflow.com/a/11087864/995876
 
5:23 PM
I'm building my mdn scraper
 
before the "use plugin" messages
 
@FlorianMargaine it take practise, but she can learn to balance a laptop on the small of her back.
 
@rlemon lol ;D
 
20 lines of code for a jQuery answer??? Pfft.. Write less my ass. — rlemon 7 secs ago
 
lol
the hoverintent plugin is at least 100 lines I guess
 
5:27 PM
@Esailija your goal is 20k rep? :D
 
yeah that's the next goal
 
It should be noted: hoverIntent is ~1.5kb of code (minified) this solution is like 0.01kb as is. — rlemon 12 secs ago
Trying to move the upvotes for you
remembers he didn't upvote you
 
:D
check my comment
 
did
 
it's funny cos I forgot the console.log in there
and doesn't actually debug anything
 
MG1
5:30 PM
@rlemon anyway you can help me out?
 
ugh i can try
lay it on me
^ my listening face
 
MG1
HEre's my code jsfiddle.net/geXHb/2 I am trying to update an object attribute based on user's input for that particular object
I'm collecting all the need info .. but its still not working
 
@rlemon why do I remember him facing left?
is that mirrored image or something
maybe I'm high
 
MG1
This is the part that I'm trying to do : element[Payment_Format_name]['PmtRec']['PmtFormat'] = PaymentFormat;
 
no you are not high
looks like it's 50/50
errr
10/90
2 hours ago, by rlemon
element[Payment_Format_name]['PmtRec']['PmtFormat'] = PaymentFormat
element is undefined?
Payment_Format_name is undefined?
element has no index by the key in the variable Payment_Format_name?
the sub element has no PmtRec object?
the sub elements PmtRec object has no PmtFormat property ?
 
MG1
5:36 PM
Yes, this is the error Cannot read property 'PmtRec' of undefined
 
Log the element
console.log( element, element[Payment_Format_name]);
element[Payment_Format_name]['PmtRec']['PmtFormat'] = PaymentFormat;
Payment_Format_name = ($(this).attr('name'));
can be written as
Payment_Format_name = $(this).attr('name'); // or this.name iirc
Most attributes map to object properties.... so <div id="foo" name="bar" can be accessed with elm.id and elm.name
 
MG1
oh ok
when I do console.log( element, element[Payment_Format_name]); it prints object undefined and then prints out the object
 
nvm .name wont work.
ok
try console.log(element, Payment_Format_name, element[Payment_Format_name]);
then it should show [Object, "string value", undefined]
if you open up the object, see if the string value is a property or method of that object.
basically the error message couldn't be any more helpful here.
 
MG1
this is what I Get Object
PmtRec: Object
CurAmt: 1055.4
OrgnrDepAcctID: Object
OrgnrParty: Object
PDPHandlingCode: "T"
PmtCrDr: "C"
PmtDetail: Object
PmtFormat: "CTX"
PmtMethod: "DAC"
RcvrParty: Object
ValueDate: "2012-03-29"
__proto__: Object
__proto__: Object
"BENV1072" undefined
 
user1385191
it's definitely more helpful than: "undefined is undefined" (IE 4)
 
5:41 PM
ok so the format name you are passing in is BENV1072
and BENV1072 is not a property or method within the object you are showing me
SOOOOO there is your issue
 
MG1
I Dont' get it :(
 
wow
what are you doing programming this all then ? no offence but how can I explain that problem any better?
you are asking for the property of "BENV1072" from element and you just showed me element only has the properties listed above.
 
MG1
I am burnt out from this..
BENV1072 is an index of one of 16 objects that I have here
These are 2 of them:
BENV1072: Object
PmtRec: Object
CurAmt: 1055.4
OrgnrDepAcctID: Object
OrgnrParty: Object
PDPHandlingCode: "T"
PmtCrDr: "C"
PmtDetail: Object
PmtFormat: "CTX"
PmtMethod: "DAC"
RcvrParty: Object
ValueDate: "2012-03-29"
__proto__: Object
__proto__: Object
BENV1073: Object
PmtRec: Object
CurAmt: 550
OrgnrDepAcctID: Object
OrgnrParty: Object
PDPHandlingCode: "T"
PmtCrDr: "C"
PmtDetail: Object
PmtFormat: "CTX"
PmtMethod: "DAC"
RcvrParty: Object
ValueDate: "2012-03-29"
 
hm, is it just me or MDN has duplicated ID in the html? developer.mozilla.org/en/JavaScript/Reference
take a look at "standard host objects (alphabetically)"
 
@MG1 yea... and it is failing because you are trying to access it from an object that does not contain it!
 
MG1
5:48 PM
@rlemon but it does contain that property
 
not all of them
otherwise you wouldn't be getting that error
 
MG1
But I'm only tying to assign it to one object with def. has that property
that's why I'm collecting the Payment_Format_name
*which
 
Payment_Format_name = ($(this).attr('name')); // I am always valid, and am always contained within element?
PaymentFormat = ($(this).val());
element[Payment_Format_name]['PmtRec']['PmtFormat'] = PaymentFormat;
element[Payment_Format_name] === undefined can only mean one thing... whatever is contained within Payment_Format_name is not a valid property or method from the object element (assuming element is the correct object in reference here)
there is no other possible issue.
 
MG1
right - I think I'm not calling this correctly
 
user1385191
does reddit time out comments within a certain interval?
 
MG1
5:56 PM
payment_format_name will contain this: BENV1072, or BENV1073 .. that's the object index
 
user1385191
I just signed up, and I'm only able to comment once or twice within a ten minute interval
 
and ALL objects contain this? You can verify this? try changing the line to this and see if it still works (for that specific option)
 
haven't really tried, only commented once and got downvoted, no thanx :D
 
element['BENV1072']['PmtRec']['PmtFormat'] = PaymentFormat;
 
MG1
and I'm trying to assign a value to an attribute for an object with that inde
index
 
5:57 PM
element = {
     "BENV1072" : { .. some other stuff ..},
     ... I also see that 'other stuff' repeated here
}
 
alright, jsdom is awesome
although its support is quite weird
supports forEach but not nextElementSibling
 
BENV1073: Object
PmtRec: Object
CurAmt: 550
OrgnrDepAcctID: Object
OrgnrParty: Object
PDPHandlingCode: "T"
PmtCrDr: "C"
PmtDetail: Object
PmtFormat: "CTX"
PmtMethod: "DAC"
RcvrParty: Object
ValueDate: "2012-03-29"

/* Why does (presumably) the BENV1072 object contain the exact same properties as the parent object it is in? */
is that intended?
 
MG1
what do you mean?
I am trying to update the existing object .. not create a new one
 
how knowledgeable in JS and programming in general are you?
 
MG1
My intention with this: element[Payment_Format_name]['PmtRec']['PmtFormat'] = PaymentFormat; if for it assign a value to PaymentFormat where Payment_Format_name = 'BENV1072'
this is the first time that I'm working with objects and JSON
 
6:03 PM
ok.... if ( /* the object element contains the property by the name of */ Payment_Format_name in element ) { element.PmtRec.PmtFormat = Payment_Format; }
 
good day all, is there any one who knows why my appended divs aren't draggable/sortable etc? jsfiddle.net/Zb9hp
 
MG1
well i think that's the problem Payment_Format_name is a variable who's value I'm assigning by doing this Payment_Format_name = ($(this).attr('name'));
 
@MG1 read my last code please
@Opoe first off you are creating multiple dynamic elements with the same ID value.
 
MG1
@rlemon ok
 
@Opoe also the draggable is part of the UI framework not core jQuery jsfiddle.net/rlemon/Zb9hp/1
include the UI and you're all good to go
also see how i've refactored your code.
 
6:07 PM
@rlemon youre right the counter was missing! jsfiddle.net/sMAFD
 
@Opoe dude use classes
one class to define how every element will look and IF YOU NEED use id's for specific organization.
 
@rlemon i'm sorry i'm still learning
 
jsfiddle.net/rlemon/Zb9hp/1 please review my code here and see what I have changed.
ID's cannot be reused... and avoid using ID's for CSS Rules...
Classes are for styling the page.. IDs are for DOM Manip .
 
MG1
@rlemon I'm not sure that you understand what I'm trying to achieve..
 
@MG1 if the element object contains the "BENV1073" object then add the payment format to something
 
6:10 PM
@rlemon Ok thank you very much, so that means I don't need the counter btw?
 
point is you check for the "BENV1073" object in element before you start meddling with it.
@Opoe correct. One class to rule them all.
 
@rlemon okay appreciate it ! :) thank you for your time
 
@Opoe id is for nitpicking a specific element. Think about your own ID number. class is for picking a group of elements, classified under a logical name. Think about your, say, gender or age or nationality or religion or ethnic-origin or ...
 
damn... how can i make xmlSerializer work on windows phone?
 
Something can have a plethora of classes describing it, but only one id, which identifies it from all else.
 
6:13 PM
Yess I understand, but I don't understand why the whole thing wasn't draggable but I see what I did wrong now :)
 
MG1
@rlemon when I do this .. nothing is printed if ('BENV1072' in element ) { alert('exists');}
 
then BENV1072 does not exist in the element
like... i mean... the PC and I are not lying to you
the issue is in the overall structure or the data
@Opoe Basically it was not draggable because you forgot to click a checkbox.
 
MG1
I know.. but then how do I reference the object with that index?
 
ie on windows-phone is absolutely freaking stupid
it tells me, that XMLSerializer exists, but the functions don't work
 
true!
 
6:19 PM
problem #1 ^
 
i just love that hacking around on a device that doesn't provide any possibility for debugging
instead of alert that is.... -.-
 
user1385191
all three form controls there are problems
 
            $.each(InvoiceInfo, function(index, element) {
            newDiv2 = $('<div/>').addClass('sub_row').appendTo(newDiv);
                    $('<div class="field">' + element['EffDt'] + '</div>').appendTo(newDiv2);
                    $('<div class="field">' + element['InvoiceNum'] + '</div>').appendTo(newDiv2);
                    $('<div class="field">' + element['NetCurAmt'] + '</div>').appendTo(newDiv2);
                    $('<div class="field">' + element['Note']['NoteText'] + '</div>').appendTo(newDiv2);
are you sure the 'element' is not just holding onto the last / first in the list? this code block here makes no sense to me
closure nightmares
 
Is there a way to do clean prototype chain with user code
function GameObject() {}
function Spaceship() {}
Spaceship.prototype = Object.create(GameObject.prototype);

console.dir( new Spaceship );
GameObject is listed twice :P
and as always, __proto__ is cheating
 
MG1
@rlemon This prints out the values of CSV - JSON -- its a bunch of invoice with data. Then next to each invoice I'm allowing the user to change the Payment Format with I then need updated in the original object with was build based on the csv->JSON
 
6:28 PM
Look at that fiddle... you will see where the error is.. ALL of your code needs refactoring.
you are looping over EVERY element trying to access a property that exists on SOME elements... for the frigging 80th time.
 
RT @jasonsantamaria: From the outside, it looks like Netflix is doing everything they can to kill their product: http://j.mp/MBkCrA
RT @divya: If you are a web developer, drop everything and watch @tgarsiel talk about how browsers work internally. TAKE NOTES. https:// ...
 
element is a single element... if you want to access a single element from the InvoiceInfo array with the index of Payment_Format_name then you can do that.
as it stands your code does exactly what you tell it to do... problem is you don't understand what you just told it to do.
common jQuery ailment.
 
Anybody ever wrote sheet music in latex and survived to tell what they used?
 
posted on June 18, 2012

Mozilla Labs has been working on some pretty interesting projects recently, including PDF.js their PDF renderer in JavaScript, and now Shumway, their “experiment that explores building a faithful and efficient renderer for the SWF file format without native code assistance.” We have seen other experiments of this type including Tobias Schneider’s Gordon project a couple years

 
MG1
@rlemon should this work ? jsfiddle.net/peQe2/1
 
6:36 PM
no
when you $.each(function(i,element)) { you just broke out the initial array into it's parts..
@MG1 you're circling and digressing and not listening to the information i'm trying to tell/show you
i'm about || close to ignoring you and leaving you to fend for yourself.
 
MG1
@rlemon I really am trying to understand.. sorry that this is so frustrating to you
 
open the console.
change the dropdown.
tell me this makes sense to you!
Also, the object that i'm logging is one of the objects in the data array
the structure of your code is wrong
all of it
Time to start from the beginning and take that crap out of the loop.
var data = [
    {
    biz: {
        a: {
            b: 1
        }
    }},
{
    baz: {
        a: {
            b: 2
        }
    }},
{
    biz: {
        a: {
            b: 3
        }
    }},
{
    baz: {
        a: {
            b: 4
        }
    }}
];
given that example: Do you want to change the value of 'b' JUST for the object you have selected from some previous menu? or how are you figuring out which object to change the child property of?
What would Payment_Format_name be in my little example above? 'Biz' or???
 
MG1
yes, Payment_Format_name would be biz or baz
I am storing that info int the name attribute of the select
that's why when one of the selects is changed it should update the object that has that index
 
If I got a penny everytime I had to take this screenshot .. i.imgur.com/qaPFb.png
 
MG1
@rlemon yes you are correct when its within the loop it tries to update each object... but if I take it out of the loop then element is not defined
 
6:44 PM
so you have a loop of data... that loop of data you use to populate a table of data with a dropdown option to the right of each row... that dropdown option should change the original data values for the corresponding object??
 
MG1
yes!
 
rlemon holding mg1's hand.. so cute
 
@MG1 now we are getting somewhere
I will write you a quick example and then i'm done with it..
 
MG1
@rlemon I appreciate the time that you spent on this
@rlemon big time
 
hey guys, couldn't find a better suited room so i thought i would ask this here. is anyone familiar with the teamcity rest api here that could help me out?
 
6:52 PM
never heard of it
 
user1385191
the answer to specialized questions is almost always: "no"
 
yeah i figured. i couldn't find another room that seemed better suited at the moment that was even remotely active
 
every day 100 startups are created with their rest apis
 
well teamcity has been around for a while. it's jetbrains continuous integration software
it's a pretty popular and widely used api, thought someone might be familiar with it
 
user1385191
I've seen questions here regarding the Google Maps API
 
user1385191
6:54 PM
that have struck out
 
haha well okay, no problem then
 
today I asked if twitter has facebook style connect just works button and nobody knew
I dread creating yet another fucking login screen
 
MG1
@rlemon you didn't forget about me did you?
 
nope just trying to make my example as semantic as possible to avoid more questions.
you may need to work out how the data is presented (JSON and HTML)
 
yeaaaah i have something to do
 
MG1
7:08 PM
@rlemon thank you
 
Do you see the #1 difference in our code? You're code you had an event handler trying to guess what object to overwrite... mine has a concise determining value for which object to attack.
 
7:37 PM
-1
Q: gzip Returning Content Encoding Error

Mayank swamiI am trying to compress the content with gzip. I am using the following code: <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?> <!DOCTYPE HTML > <html> <head> <link rel="stylesheet" ty...

 
why are you posting that in the JS room?
 
The Levenshtein distance between php and javascript is quite formidable
 
are you saying my code is wrong
:D
 
7:54 PM
It is so utterly draining when you're forced into coding things that you would normally avoid like the plague. For instance, I (an owner of the CSS room) am now coding layout in tables. I might cry.
 
Gotta pay the bills somehow.
 
I do some slight table layouting every once in a while
it's just so much easier to do some layout things
 
Everything in this particular application is tables.
 
I haven't still nested tables though, it's more like what stackoverflow has
like the tags on the right are a table
 
The ASPx input-replacements that this contractor used generate tables
 
7:56 PM
no wait it's the ignored tags and favorite tags inputs
 
So, something that could be a <select> is instead a few different tables nested together.
 
and badges
 
0
Q: Extremely simple online multiplayer game

PostscripterI am considering creating a simple multiplayer game, which focuses on physics and can accommodate up to 30 players per session. Very simple graphics, but smart physics (pushing, weight and gravity, balance) is required. After some research I found a good java script (framework ??) called box2d.js...

 
@Feeds "it's extremely simple, I just need to do extremely smart things."
 
7:58 PM
@Esailija That makes me want to cry a little
But not quite as much as this single-row, single-cell table I'm about to write :-(
 
:(
 

« first day (611 days earlier)      last day (4335 days later) »