« first day (2174 days earlier)      last day (2769 days later) » 

6:00 PM
If you are running your myFunctionReference function before the DOM is loaded, it will think extra is null.
You need to run your javascript after your HTML is loaded into the DOM, or run your function on windlow load or on DOMContentLoaded
 
tell us what you want to do
 
after running my mind and some others at 190mph finally done something
 
@jagdish
exactly
i'll make it for you
 
@NicholasKyriakides If you do that, I'll kick you
We don't help people in that manner
 
same reason you don't feed bears on your back porch
they'll fucking kill you, eventually
 
6:02 PM
In this case, they'll make you want to kill yourself
similar
 
jesus
wait
 
ndugger hey no need to be aggressive
 
He only has off and on.
 
@NicholasKyriakides If you think I'm being aggressive, feel free to file a complaint in the trash room.
 
lol
being a smartass in a chat room ain't gonna get you any points
 
6:05 PM
Talking back to a room owner that has mental stability issues won't get you an points either
 
It will get me off, though, so keep going
 
actual place for complaints: github.com/JavaScriptRoom/culture/issues
 
whole shits boring
 
6:07 PM
I keep forgetting we have that repo
 
jsfiddle.net/mv9c0v2z/1 now tell me what's wrong here ???
i wants to change size of font
 
@jagdish You're doing inline events in your HTML again...
 
nope
 
do you know what's a console?
 
6:09 PM
@jagdish no? Look at the link you just pasted
 
im not being condescending
 
yes
 
do you have it open?
 
6:10 PM
!!define console
 
@Luggage console A stand-alone cabinet designed to stand on the floor; especially, one that houses home entertainment equipment, such as a TV or stereo system.
 
@jagdish in JSFiddle you need to select the option "no wrap in head" otherwise it wont find your function. Also, you do not have an element with the ID "demo"
 
i pressed f12 some other extra window came in browser
 
@jagdish If you ask what's wrong one more time because you still have an inline event listener in your code, I will kick you for being a help vampire.
 
ok
so you don't know
 
6:11 PM
That is your final warning
 
Also yeah, don't use inline events. This wouldn't be an issue if you used addEventListener
 
@ndugger it's not the inline event that the issue
it's that he doesn't know why it causes issues
 
@NicholasKyriakides Actually, it's a big part of the issue
 
@jagdish that extra window is the console. It is your friend. You can see error messages, inspect the page contents, see network activity etc.
 
no it ain't - it's not invalid code
 
6:12 PM
@NicholasKyriakides It has scoping issues, it's entirely invalid for his current use case
 
the whole point is for him to understand why it doesn't work with inline-events
 
I'm glad you're not a cop or a lot people people would be getting shot, @ndugger. :)
 
sorry for double ping, had to correct my wrong 'your'
 
people people
 
6:14 PM
the <script> is evaluated after the HTML loads
 
yea, whatever
 
lol
 
so by the time your HTML tries to register the event handler on f4(), f4() doesn't exist yet
 
@KevinB let it ride
 
if you put <script></script> in your HTML and above that inline-handler it would work
 
6:15 PM
<script> is evaluated immediately. it only evaluates after the html loads if it's at the end
 
but to get to @ndugger 's point
 
hey guys
 
just use a addEventListener() instead of inlining the event handler
 
Trying to update nodejs via npm, and it states it installed 6.6 but my version is still returning 0.10.25
 
6:15 PM
no reason to put script at the beginning if you can put it at the end
 
i'm using it as an example of why it doesn't work
i don't recommend it in any way
 
ohh, it seemed like you were saying TO put it at the beginning
 
i have used addeventlistener at last line
 
you can install node with npm?
 
6:16 PM
check last updated link
 
ok why are you using a function inside a function?
why? ask yourself first
 
@jagdish
and fiz your 'v2' to v2.
 
oops seems I was running legacy
 
also, while you are no longer using inline events for the dropdown, you are using it for 'onload'. so.. don't
 
6:18 PM
the 2nd example is super convoluted
the first one was easy to get working..
 
@NicholasKyriakides you were warned not to spoon feed this guy. Nick now has a right to kick you. I was going to, but I'm going to vape.
 
feel free
 
"the right".
 
We can't cater to this kind of help vamp. Look how long he's driven the room
!!afk
 
it's in the constitution
 
6:20 PM
If he gets kicked that's retarded.
His fiddle had 2 small errors
 
i agree with you
 
IF he does, he'll be welcome back in 1 minute.
 
still, feel free to do so
 
please don't be silly
 
trying to send an image from canvas object to s3 without using Blob...
 
6:22 PM
@jagdish now go read MDN, and some books, and tutorials.
 
12
Q: How to upload base64 encoded image data to S3 using JavaScript only?

Zain ZafarI have a rails app on Heroku (cedar env). It has a page where I render the canvas data into an image using toDataURL() method. I'm trying to upload the returned base64 image data string directly to s3 using JavaScript (bypassing the server-side). The problem is that since this isn't a file, how d...

 
asking for favor is not bad thing i guess
 
@jagdish not learning is a bad thing though
 
next to last answer looks good, except I don't see where the file name is added, am I missing something?
 
6:22 PM
what @loktar said
 
i was asking to know what my bug is......stop blaming
 
stop pushing it
 
@Luggage four score and six upvotes ago...
 
okay
 
they're right - go on codecademy and spend a day or 2
it's gonna be much better for you
not us
 
6:24 PM
anybody know how to simulate a file in the browser using canvas data?
 
@Luggage I don't see how telling help vampires to knock off their shit is equatable to shooting people
 
use blob()?
 
does blob work in safari?
 
Fuck safari
 
6:25 PM
heh, not an option
 
not my requirement
I got into trouble doing that on some csv stuff
 
haha
 
@ndugger I just meant your hardline stance. And it was a joke.
carry on
 
"that's amazing" turned into "what the fuck did you do to us" in about 2 hours after going live
 
6:26 PM
went live without testing?
that's safared up
 
ridiculously small team
and even worse deadline
poor decision making by management
 
the 3rd point sounds just about right
the other 2 not so much :D
 
yup
well... when that's one of seven tickets due in 6 hours...
 
The nazis tried that excuse.
"poor decision by management"
 
HAHAHA
hahaha
 
6:28 PM
@Luggage but not the SS, those damn brown nosers.
 
yeah... lot of apple juice on my hands that day
 
tell the guy who puts the deadlines down that he's asking for trouble
and get a server
 
has that ever worked for you?
 
yes
 
6:29 PM
lots of times
 
oh, well then
 
or you may be fired. how can we know?
 
I mean, I say it
 
You're still a person with your own thoughts and views
and if they have crazy deadlines sounds like they can't afford to lose you
 
you need to walk the talk
 
6:29 PM
it's more just that the position is that it doesn't matter because the commitment has already been made
 
One of the benefits of getting older is you are much more likely to say when you think something is wrong.
 
I'm 40
 
oh
 
I say it all the time
 
the guy who makes the commitments is the one that needs to be fired
not you
 
6:30 PM
the CEO
so nope
 
so what's the alternative?
 
find a new job
 
They shouldn't be making committments without talking to the workers; that's just piss poor management
 
that's what I did.
 
sigh...
 
6:30 PM
Had a job for 8 weeks, same situation
 
burn the place down.
 
they wanted us to work Saturdays
I noped the fuck out.
 
so if we're gonna go down this path, I have 3 kids, live out from the city, have to work remote because of lots of reasons
 
same here
 
I have 4 kids.
 
6:31 PM
I need a lot of flexibility
yeah, mine's in a wheelchair
 
I am 4 kids in a trench coat
 
Working remote is nice though.
 
one of them anyway
 
It took me a few months to quit my last shitty job. I tried to make it work.
 
just sayin... I've got some complications
 
6:31 PM
@Shane don't undersell yourself people NEED FE devs
I would at least have feelers out and look
 
sure sure, it's a matter of finding one that doesn't require travel time
 
not saying just up and quit, that's stupid
 
my actual question is more about how do I use this:
var u = dataURI.split(',')[1],
    binary = atob(u),
    array = [];

for (var i = 0; i < binary.length; i++) {
    array.push(binary.charCodeAt(i));
}

var typedArray = Uint8Array(array);

// now typedArray.buffer can be passed to xhr.send
but give it a file name
 
@Loktar it's not a contest lol
 
@SterlingArcher wish I knew that sooner
 
6:33 PM
LOL
 
I have no clue, haven't done any work with buffers before
 
Buffers and Streams make the world go 'round
 
yeah, that's why I'm sittin here
 
in the case of the browser, you have ArrayBuffer
 
@shane get a small server up and running\
just to get the images
 
6:34 PM
huh?
 
i.imgur.com/Rn5CcN1.gifv im surprised he's staying up in the water with those massive balls
 
I got to learn all about buffers and streams when I was making a video streaming site for fun
@SterlingArcher that's mean to the shark
 
I've worked with video streams, plenty but not where I take a bunch of b64 data and turn it into binary
 
@shane
return new Blob([new Uint8Array(array)], {type: 'image/jpeg'});
 
Shark shouldn't have come swimming up on our beaches like that
 
6:36 PM
will that work in Safari though?
 
@SterlingArcher I'm pretty sure it's more of his beach than our monkey-asses
 
time for a new loading animation.. any suggestions?
 
hmm, ok... well that's much easier
I just thought blobs didn't work in safari because of my last brush with them
 
is toBlob() of Canvas that doesn't work
 
6:37 PM
oh, cool then
thanks!
gonna try that
 
aye captain
 
oh wait... same problem I think
I might be wrong about this, but don't I need the file to have a name when I push to s3?
 
can't you just do this?
 
or is that something that gets passed in via the signedRequestData?
 
var file = new File([blob], 'filename.jpeg');
 
6:42 PM
oooh... looks promising?
 
Nice, it's been a good market day. I've made $1.20
 
seems like something I should have probably thought of... damn
 
@SterlingArcher acorns?
 
I'm not sure
 
I'm up 2.01
 
6:43 PM
I'm quite positive you should be using a server in the middle
 
@ndugger how's your acorns doing? I'm up to $96 ish, most from the freaking roundups
 
How are you uploading stuff? with simple POST/PUT
?
 
argh.. why doesn't jsfiddle hilight jsx?
 
I didn't realize I made so many daily transactions
 
@SterlingArcher 374.27
I put in a good bit
 
6:44 PM
yeah, I've got a server in there... it's just not the workflow we used in some other cases
hoping I can keep things simple... gonna give this approach another hour or so
 
I've used S3's node module to upload stuff
let me check
what server have you got?
 
right, yeah...
it's all node
 
I wonder what my % holdings are
 
k gimme a minute
 
6:44 PM
using hapi for http
 
@SterlingArcher Glancing at that image it was so blueish I was sure I had it selected
 
So I'm using knox as the S3 module
I upload the image via a form to my server
 
Most of my money appears to be in real estate, but my most % of a share is emerging markets
 
and from there via knox i upload to S3
 
@Zirak lol
 
k, cool one sec
 
Also congrats on making moneyz
 
lmao I can buy a candy bar
 
backend's not really my turf... but I can ask the aussies when they wake up
I can do whatever I want in the client, but I need to check before I start adding webservices
 
6:48 PM
I'd love to answer your back end questions if you weren't using hapi
 
@ndugger what you on, express?
 
that's not to say I can't they're pretty easy going, it's just I need to coordinate, etc
I'm loving hapi so far
 
@NicholasKyriakides none, because you don't need any; the HTTP api in node is already dead simple
the only part about it that's annoying is posting data, but that's simple enough
 
@ndugger - you work on much enterprise stuff?
I think that'd get hard to manage without a framework
 
Yes
 
6:49 PM
huh.. ok cool
 
Express routing is so good
 
I don't think I'd be up to that
 
@SterlingArcher Agree to disagree
 
Iunno dude router is pretty sweet bruh
 
I've written a router so many times, I could do it with two legs behind my head
 
6:50 PM
why write your own?
:D
 
cuz it's hipster
 
Python Flask routing is better though
 
My point is that it's simple enough that you probably don't even need to write your own, just use the api that's already there
 
@SterlingArcher It's missing some of the work that I've done on it since last I've pushed, but here's an example of how simple it is to create a router that beats express' router: github.com/ndugger/redshirt
 
6:53 PM
*ed because that's actually cool
Nice use of async
 
jesus this is a rabbit hole
apparently Safari is kind of the new IE
 
@SterlingArcher my play money is doing amazing :P
 
Safari dev tools suck
 
Any jsfiddle alternatives that don't suck for es6? jsfiddle won't syntax hilight jsx. codepen messes up tabbing.
 
@BenjaminGruenbaum play money? D: This is real monay
 
6:55 PM
I have a 17% return since the start of the year and 25 out of 29 good purchases.
 
@NicholasKyriakides - starting to think the server might be the only way to go
cheers on that one
but damn...
 
Holy crap, 17% return is ridiculous
 
@SterlingArcher also, I'm cheating with an investment strategy we're selling companies for tens of thousands of dollars :P
 
I work at a company that does this - remember? :P
 
6:56 PM
want me to send you a sample of how I do it?
 
86.5% of analyst recommendations are “BUY”, they are wrong 50.2% of the time.
Those are oddly specific statistics
 
@shane or will the aussies take care of it
?
 
@SterlingArcher So you'd be just as well off taking advice from a coin flip
 
I'll need to do it, but I have to run it by them first
 
so, just do the opposite 50.2% of the time.
 
6:57 PM
@SterlingArcher that's clickbait, of course it's oddly specific :P
 
their staff is focused on another company right now, but they are going to take the reigns back in a week or so
 
@Luggage the opposite of a buy rating is not a sell rating :P
 
for the backend at least
 
@BenjaminGruenbaum my most aggressive investment is a portfolio of internet companies. Google, apple, amazon, facebook, paypal, salesforce, netflix, yahoo, ebay and linkedin
 
so what do you want to do? save canvas data as an image on s3?
 
6:58 PM
yeah... I've got everything but the name
 
@SterlingArcher it might fail because Yodlee works like 30% of the time, but if you go to tipranks.com/smart-portfolio and login you can actually see if you can save money.
 
this looks like an answer on how here, except I don't see a name
https://stackoverflow.com/questions/12883871/how-to-upload-base64-encoded-image-data-to-s3-using-javascript-only]
 
Just let me know what email you signed up with and I'll bump you up in our system to a paying user level @SterlingArcher
 
@shane
9
Q: upload canvas data to s3

Gaurav ShahNow since the amazon has enabled CORS I was wondering if this is possible. Can the html canvas data (on client browser) be converted to a something and uploaded to s3 directly ? I am sure I can make a PUT request to amazon but that requires a File . I can get base64 encoded image data or even ...

have you tried this?
 
6:59 PM
Mostly it'll tell you what investment fees are killing you, and what stocks you're holding are somewhat risky. Actual investment strategies are way more complex and don't buy anything just because it's a "buy" at TipRanks it's meant to be a research tool not an advice platform.
 

« first day (2174 days earlier)      last day (2769 days later) »