« first day (2321 days earlier)      last day (2626 days later) » 

4:00 PM
and it needs to be for it to be attached in that way (which is not suggested)
 
is there an equivalent of jquery for android. I'm trying to learn the xml view layouts and jQuery would make it nicer in my opinion. jasonette.com is a similar idea
 
oo okay
do you know how i can overcome this?
 
Try console.dir instead of console.log. Not sure where you're debugging it, or what console you're using.
 
@sutt0n Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
json.stringify() if you want an object as a string.
 
4:01 PM
or do you want xml?
 
or find out which property you really want from it and grab that.
 
i want to extract basically data that is bertween <item> tags
and store them on li tags
 
@RhysCopperthwaite Do you have control over the definition of whatever class "this" belongs to? If so, I think you only need to write a toString function for it.
 
@Luggage thanks. damn fiddle options will get you every time
 
Skullomania onchange="fill();" is a method of attaching events that is discouraged
for one reason, it requires you pollute your global scope with functions.
.addEventListener() is the preferred way to attach events.
 
4:07 PM
@kevin
the xml file is a webpage
which i download
i tried the toString function it still says [object Object]
 
@Rhys On second thought, I agree with Luggage. Figure out which property you want displayed, and display that explicitly. $("#AllNews").append('<li>' + $(this).attributeYouWantToDisplayGoesHere + '</li>');
 
you don't want a string, you want either specific properties from that object, or to append the nodes (not a string)
 
@Luggage thanks I will reconfigure when it gets ready to hit production. I am trying to figure out why the tax and upcharge are not being added properly
 
@Skullomania toFixed() returns a string, which you then try to do math with.
now JS will probably convert it back to a number, but it's best to use the right types to begin with instead of leaning on some hard-to-remember automatic conversion
 
4:10 PM
there is data in <title> tags in this object
how do you think i would be able to get that out from that object
 
@RhysCopperthwaite you have an object representing an xml mode, but are trying to append it like a string.
the jquery docs will tell you how to read the xml object's it returns from .find()
but probably like an html node.
 
okay thank you alot for you help i will try it ou
out
 
@William you've been around here long enough to know we (most, but not all) would find the idea of "jQuery for x" to be revolting. :)
 
@Luggage the idea for async node.js nesting mostly comes from jQuery. setTimeout and async are some of the few libraries that use async like that
 
callbacks is not an idea unique to jQuery
 
4:23 PM
setTimeout and the idea of callbacks pre-dates jQuery.
 
yes but animations were introduced in jQuery
 
I will grant you that jQuery used a promise-like object (deferred) before promises were a standard, but that's it.
 
what the hell does animation have to do with node?
 
@ndugger the library I linked is for animations
mostly
 
oh. I'm still sobering up. excuse me.
 
4:24 PM
jQuery did nothing original, it just 'wraps' common tasks and was useful back when browsers were very different.
Anyway.. I wasn't trying to jump on you for using jquery, but just to say that looking for "jquery for x" was, in my view, the wrong way to go about it
 
@Luggage jQuery did plenty of original things vOv
 
like?
 
Hi all, I am not the strongest Javascript programmer so I have a question. I want to pull data using some javascript.

foreach ($Product->GetProductVariants() as $ProductVariant) {
echo 'variantDetails[' . $ProductVariant->GetProductVariantID() . '] = {Stock: [' . $ProductVariant->GetStock() . '], ProductVariantHTML: [' . $ProductVariant->GetProductVariantHTML() . '], SKU: ["' . $ProductVariant->GetSKU() . '"], Price: [' . $ProductVariant->GetPrice() . '], LeadTime: ["' . $ProductVariant->GetLeadTimeFrom() . ' to ' . $ProductVariant->GetLeadTimeTo() . ' working days"]};';
 
@nathancording Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
is there some syntactic sugar for gathering every argument before the last argument, if that makes sense?
 
4:26 PM
function UpdateSelectedVariant(key)
{
if (key == null) {
$('#selected-variant').val('');
$('#price-label').html('');
$('#stock-label').html('');
$('#code-label').html('');
$('#lead-time-label').html('');
$('#product-variant-html').html('');
}
else {
$('#selected-variant').val(key);
$('#price-label').html('£' + Number(variantDetails[key].Price).toFixed(2));
if (variantDetails[key].Stock == true) {
$('#stock-label').html('<font color="green">In Stock</font>');
}
else {
$('#stock-label').html('<font color="red">Out of Stock</font>');
 
you are right although I like jQuery althuogh don't regularly use it
 
probably some sort of rest/spread
 
was using css selectors against the dom programatically jquery's idea?
 
bringing CSS selectors to JavaScript, bringing chaining APIs to maintstream, etc.
 
^
 
4:26 PM
@corvid no, because you don't know where the arguments stop
 
However nothing productvariantHTML doesnt display but the others do
 
HAMMERTIME!
 
I'll grant css selectors, if it was first. That's a good one. chaining api's are not new at all.
 
if it's at last, then it knows that all additional args has to be put in that spread arg var
 
@KarelG ah okay... I am trying to find a good way to execute a function with given arguments, but the last argument would be an options object with some default values, if that makes sense
 
4:27 PM
@corvid there is the ...args rest parameters, but it's opposite of what you want. You'll have to manually do it
 
@Luggage no, pretty sure QSA was speced before jQuery. but jQuery made selectors popular.
 
Yea. I would be surprised if jQuery was truly first on that, but wasn't willing to research and argue that point. :)
 
jQuery was never original, they just used time travel to go into the future and then they came back to write the future knowledges as super shitty APIs
 
^lol definitely
 
Lmfao.
 
4:31 PM
> As an executive, benefits are effective the first day of the pay period following your hire date
why does my offer letter say I'm an executive?
 
@ndugger Why are you complaining?
 
they tricked you into becoming management
 
sucker
 
my guess is that because you are an exempt employee.
 
I'm not, I'm just sobering up from like a 3 day bender, and everything is a bit hazy right now
 
4:32 PM
exempt = salary, not hourly, in this context.
 
they're probably using the legal "as" which means "if"
 
Ah
 
Because you execute programs; the executive executes. Did I do good, mom?
 
maybe the offer letter is just super generic
 
I would believe ssube's interpretation only if there were other clauses for non-executives.
an 'else'.
 
4:34 PM
Who knows
 
hr
 
This job offer fulfills all of the career goals I ever made; I wanted to be making 6 figures and hold a senior level position by the age of 25.
What do I do with my life now? Make new goals? Pft.
 
new goals? no
increasingly shorter cars and taller women
 
Apparently it's something called "effective executive compensation"; has to do with how the company was set up for long-term incentive planning in association with stockholder(s) and their option(s).
 
4:37 PM
not too tall.
in fact, length is not a condition at all
 
I like something I can climb
 
I like my women like I like my trees; climbable.
 
i.imgur.com/Cyb86XQ.jpg Death by Snu snu.
 
Wait, if you're climbing women, does that mean that you're short or that they're tall relative to average height by gender?
 
It means that they're a tree
I only date nature
 
4:40 PM
sometimes literally.
 
Hmm. Well, now when you "eat your greens", both parties benefit.
 
whew, 18 rings. She's legal.
 
Wait... no. You can't eat any greens, because that'd be some sort of cannibalism if you were to have tree-children. Children of the trees. You'd have to go full Ron Swanson.

I think I like this idea of dating only nature.
 
You look high in your picture
 
I wasn't high. It was aliens.
 
4:45 PM
that guy is definitely high
 
aliens stole the weed?
I hate it when that happens
 
not all of it, obviously.
broccoli
 
probably
 
it's far more nutritious
 
Meth - my state (AR) had a high supply, and decided to create a heavily-taxed export system.
 
4:46 PM
than the pots
 
cannabis is edible. you can put the leaves in a salad. hemp seeds are in some granola bars
among other things.
 
you can cook steak in the butter
 
also in bird seed.
yea, well, i was talking about things you could eat for nutrition, not getting high
 
oh
 
though, in practice, I've only ever made butter/brownies.. so.
 
4:48 PM
@Luggage It does math...it just does it incorrectly. However I took your suggestion and took out the unnecessary .toFixed(). I ended up multiplying the final total by the quantity of shirts ordered to fix it.
it works fine now
 
next time you happen across some butter, consider making soft caramels
 
@BenjaminGruenbaum I came across this answer and its comments. Are all comments resolved with your edit or is the last comment a new concern?
 
well...as expected anyway
 
oh, I forgot we were supposed to be talking about javascript
 
you don't happen across butter, you make it
at least in this state, since we don't have stores for such things.
a double boiler and some cheese cloth is all you need.
 
4:49 PM
you can't buy butter in stores?
 
not pot butter
 
what state do you live in?
lol!
 
how does it taste?
 
4:50 PM
bad.
but a lot better once you turn it into another food.
 
as expected then...but since you are not eating it for the taste I guess it does not matter
 
hahah, where's the js, butter.js?
 
I can't wait until pot is legal in MN; I'm so gonna hop on board the dispensary train and make millions.
 
lol
 
@ndugger s/make/spend/
 
4:51 PM
that too
 
why not both?
 
MD had a contract out for pot tracking software for the state medical cannabis program.
 
AR legalized medicinal use of it; however, to be a marijuana dispensary in AR, you have to first apply which costs $15,000. If you're rejected, you get 50% of that back. Then, the annual renewal fee is $100,000.
 
i wish it were legal in KY. we make it all but for some strange reason it is still taboo in this state
 
@Luggage oh, that's easy. You just give them a map and let them drop a pin when they see a stoner. Since stoners don't move around much, that ought to do it.
 
4:53 PM
It's medicinally available in MN for just a select few things
 
seed-to-sale software. you were tracking it before it gets smoked.
 
but there's 2 bills going through our state senate right now about legalizing it
 
it should to the very least be legal for medical reasons everywhere
 
but then alcohol sales will do down.
 
How many times does society have to try prohibition before they realize it's a net failure?
 
4:54 PM
we'll keep trying forever.
 
Legalize all drugs.
 
alcohol and pharmaceuticals
 
I mean, I'm all for continuing to prohibit actual hard drugs; that shit will fuck you up
but pot is more harmless than alcohol
 
sorta. some of the synthetic drugs that are designed to get around laws are nothing but bad.
legalize most drugs.
 
@Luggage Do you know why those drugs exist?
 
4:55 PM
@Allenph flipping cop cars is fun
 
> "to get around laws"
 
because life is hard
 
Because people can't get heroin, or cocaine, or whatever.
@ssube I'm an AnCap, not an AnCom.
 
"can't" is a strong word
 
heh @ that spreading comic
 
4:56 PM
right. I'm more on the legalization side of the argument, but hesitate at "all".
 
Aye. Meth and Adderall are pretty much the same. My generic pills basically say, "m. amphetamine salts" on them.
 
got issues at work D: Can't go to home ;_;
 
@Skullomania Actually, just get rid of that whole concept.
 
@Allenph well that's good, I was worried which faction you joined in fallout
 
4:56 PM
legalization or prohibition?
 
@ssube Meh. People lump anarchists together a lot. There's two axis on the political spectrum. Not just one.
 
@sutt0n "amphetamine salts" covers a some thousands of different chemicals
 
I'm not the car flipping kind.
 
@Allenph lolwat
 
lawful evil, chaotic good?
 
4:58 PM
I politically identify as a brussel sprout
 
@Allenph there is a valid argument to be made for any stance.
 
I sexually identify as a politician
 
@ssube Idk about it covering thousands of different chemicals, but it's one or two.
 
sometimes cars just look better upside down.
> 2
 
@ndugger that airport fetish tho
 
4:59 PM
@ndugger what exactly is that...lol
 
@sutt0n there are more amphetamine variants than that
 

« first day (2321 days earlier)      last day (2626 days later) »