« first day (2201 days earlier)      last day (2748 days later) » 

7:00 PM
I can't concentrate at all
 
you can drop a link, but... don't be surprised if we provide feedback on the question.
 
@ssube Thank you! That makes a lot of sense
 
Absolutely. It's been a while since I've really used SO, so I'd love to know where I may have gone wrong: stackoverflow.com/questions/40246927/…
 
@LanceMay your question is almost entirely opinion-based
 
7:03 PM
@ssube So asking for technical or architectural considerations is opinion-based? Do you mean my opinion or asking for the opinions of others?
 
when you ask for "technical or practical reasons," the only good answer would be to list all of them, which suggests the question is too broad
making a case one way or the other would only be somebody's opinion, so that's opinion-based
 
eh, some people may see that as opinionated, but really there's clear cut performance reasons that you may use one or the other. In your particular case, the difference would be dependant on the resulting size, and the devices you wish to target due to limits on what some devices will cache.
and if caching is even important to your use case.
 
Ah. Okay, so how do you think I could better articulate that what I was interested in were more the benefits of either or; less so than the opinion of preference?
 
I think there is a strong case for closing the question as too broad.
 
yes, too broad would be more appropriate than opinionated
imo
;)
being more specific about your use case would make it less broad
but... at that point you can damn near answer your own question
 
7:06 PM
changing the title to be more pointed could help
"Are there any concrete benefits to combining my code and vendor code?" seems better to me
 
Then isn't the question to bundle or not?
 
right now it reads kind of like "Should I have a large pumpkin spice latte or a small one with extra whipped cream?"
 
@ssube the correct answer is fuckit have a beer
 
but pumpkin spice lattes are so good
 
Pumpkin beer is better
 
7:08 PM
speaking of, I picked up this Raspberry Provincial over the weekend
 
Ive never had one that I liked
 
Is there any way for me to fully properly store an object as json or something, in a file, to resume its state later, maybe tomorrow? Let's say I have an animal object, that has DNA but also a bunch of functions. Can I store that as text and load it later into a variable that still has those functions?
 
Okay. Thanks a bunch, guys. That's exactly what I needed! I certainly didn't see it as broad as you guys did, but that pretty much sums up what I missed. If it hasn't already been closed, I'll try to refine. Thanks again!
 
if you like sour beers, I'd highly recommend that one
@AlexMitan the functions are not part of the data and should not be persisted.
 
@AlexMitan storing functions is eh
 
7:09 PM
you're mixing state and behavior
the program provides behavior, the data provides state, you persist the data
 
I see, but what if I want to share or store such an object with both behavior and data?
just find a way to rebuild it from JSON?
 
you don't
that's a terrible, awful idea and will not work
 
Refreshing.
So second?
 
if you want to share behaviour, use a node module?
 
^
 
7:11 PM
functions are not data wrappers.
 
inheritance, plugins, all of those are for modular, shareable behavior
 
make a .toJSON() function on the object to output all the properties you want to serialize, then accept those values in the contructor or object.assign() them later.
 
user6597020
.
 
@Luggage ah okay, awesome!
 
7:14 PM
@ssube awh i'm looking for it but no shops stock it, or that brewery
 
i seem to have missed the great star purge
 
@bitten hm. I ran across it in a local store.
 
there's still 27k starred messages
 
@KendallFrey I love it. "we have a hot mic" .... pause ... "how long we had dat?"
 
@ssube ah.. maybe too local
:p
 
7:17 PM
I could mail you some
 
@rlemon never going to shave this off, am I?
 
@ssube you know, i was actually thinking about a beer swap
but i didn't know if you'd be up for it
 
@towc :D it'll take a while.
but the conspiracy is a good bet to last longer
 
hey, I still believe in it :P
I may regret it later
sure
 
@bitten depends on who we can get involved, where they live, all that, tbh.
I know some states have restrictive shipping laws and sending booze overseas is tricky.
 
7:20 PM
@ssube i was about to say that i'm reading that shipping alcohol into the us is forbidden
well i will look into it, i'd be so up for it
 
🔫
 
@Zirak I'm coming
 
@BenjaminGruenbaum tmi
 
@KendallFrey those are pandas, not badgers
 
7:23 PM
3 hours ago, by Kendall Frey
panda, but who can tell?
i know, stfu
 
I can.
 
well you're a nerd! o/*\o
 
@Luggage what are you, some kind of bear nerd?
 
I don't think I've seen someone name their canvas "paper" in a while
 
I name my canvases 'steve'.
 
7:25 PM
        var data = { src: image.src };
        var xhr = new XMLHttpRequest();
        xhr.open("POST", "deleteSlides.aspx");
        xhr.setRequestHeader("Content-Type", "application/json;");
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4) {
                debugger;
            }
        }
        xhr.send(JSON.stringify(data));
In C#, how would I get the data from the XMLHttpRequest?
It's not in Request["src"]
 
how would you get it from a normal form post?
why would it be any different?
 
specifically, the body.
 
@Luggage as everyone should
 
@Vap0r phew, you scared me for a second
I thought this was the c# room
 
7:27 PM
@KendallFrey holy shit, the great is reborn for 2016
 
@rlemon yeah I know it's not but the issue isn't my C#. I can tell I'm just not setting the right data type
MIME type??
 
@BenjaminGruenbaum Great
 
the issue is probably with your server code.
 
@rlemon lol nah
 
the issue is probably with your server code.
 
7:28 PM
@Luggage should I set the MIME type to application/x-www-form-urlencoded?
 
yea, you send your data as a string. parse it on the other end.
 
What if I want to read it using the Request object?
 
@Vap0r only if you want to stop json encoding the data and start form encoding it.
 
without InputStreams from body and all that
 
then don't send it as json...
 
7:28 PM
59 secs ago, by rlemon
the issue is probably with your server code.
 
reading a json string from the body of a request is not a rare action. There should be help online.
 
@Luggage the only way that I can find to do it is use the Javascript Serializer reading from the Body InputStream
 
sounds right.
 
^
 
How would I access it using Request["<varname>"]?
would I have to send it as a formdata object?
 
7:30 PM
you wouldn't..
 
reinvent the way C# and/or http works
or jsut access it where it is
 
Well that sucks :(
 
or put the parameters in the url
bit you WILL have ot access the body at some point, so.. just do it
WebAPI and various other libaries will likely do it for you, too.
 
Yeah I had been using WebAPI, but this is just a quick-and-dirty small application
I thought PHPs $_REQUEST could handle the data the way I'm trying to send it?
 
No fucking clue.
 
7:33 PM
And if that's accurate, then are PHPs $_REQUEST and C#'s Request not analogous?
 
PHPs $_REQUEST could generate NSFW ascii art as far as I know.
 
no, with PHP you have to access a json body differently compared to a param POST body or a url param list
 
$_REQUEST auto-parses JSON now?
json_decode is no longer a thing?
 
what
 
@rlemon no sorry, I forgot to mention the first iteration of this code was just sending it in <var>=<value> pairs, which I thought PHP automatically parsed when posted
    function deleteSlide(image) {
        var xhr = new XMLHttpRequest();
        xhr.open("POST", "deleteSlides.aspx");
        xhr.setRequestHeader("Content-Type", "application/json;");
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4) {
                debugger;
            }
        }
        xhr.send(image.src);
    }
 
7:35 PM
it does, and i'd suspect C# would too
but what you just posted isn't doing that at all
 
who cares what php does, your backend is c#. Stop crying that you have to type a few lines of code and go do it.
 
That's more like my first iteration. uh..... but with a send of "src=" + image.src
 
this would all probably be a lot easier for you if you just didn't use JSON. but don't forget to encode your param values, "src=" + image.src could potentially result in invalid results.
 
@KevinB do I have to encode my param values if I'm just reading from the request body?
 
what?
 
7:37 PM
@KevinB could I just send like the code above, and read the entire body into a src variable?
 
yeah, but... if you're doing that already then you could do that with json too :p
 
If all I'm expecting is a string indicating the src?
 
because it's the same process, only with json there's one more step to decode it.
 
0
Q: How do i make image fill 90% screen without losing aspect ratio

unkn0wnKindly view the snippet here https://jsfiddle.net/nc7edzck/ I want to display a image on click and it should fill screen irrespective of the screen size without distorting the aspect ratio. .imgclick{ position: fixed; top: 50%;left: 50%; transform: translate(-50%,-50%); z-index:...

is this even possible?
 
@ssube ..no?
 
7:38 PM
@KevinB I already had a solution, I just honestly thought it was a dumb one, if that's the way it's done so be it. I just thought I was trying to reinvent the wheel. Thanks for your help!
@ssube yes?
 
unless he means 90% max-width and 90% max-height whilst keeping the aspect ratio
 
it is possible, if you don't care that the image gets bigger than it's original size and parts of it getting cut off.
 
@bitten with clipping
it is possible
 
ah yeah, that's true. i just assumed he wouldn't want to loose any part of the image
 
pretty sure the css background property has all you need to make this happen
oh, plus the 90%x90% element
 
7:41 PM
@KevinB but that would clip in certain situations
 
yes
 
I think op doesn't want that
which is impossible
 
yeah that doesn't make sense
you can't make something keep aspect ratio without clipping while setting it to a very specific size that may not be the same ratio, as you know
 
I mean there really isn't enough information. I suppose you could display one dimension 90% of the screen size.
 
I think it's the classic "one maxes out at 90% and the other stops" scaling.
the trick is to decide if height or width will be the 90%
 
7:42 PM
@ssube that's what I took it to be. Just see what your limiting dimension is and scale the other one
 
because setting both breaks the aspect ratio
 
yeah, fairly certain that fiddle links to a nsfw image. fortunately it's incorrectly linked, and gets rejected
 
I get a 503 on that image so I'm not even sure what we're working with.
 
0
Q: execute javascript inside an image

Raul Roblesi want to execute a javascript inside an image or some other way to not display the javascript to an user that tries to search for it (nothing malicious), just redirecting a % of the traffic that visits my site to another. how can i hide the js and execute it without it being obvious? any other...

jesus
 
... but it has "bikini" in the URL; so, I'm intrigued...
 
7:45 PM
as nswf at any womens online store :p
 
depends on the people at your work who monitor where you go
 
@SterlingArcher was this ever possible? I know it was possible to inject PHP and other such slickness, but Javascript?
 
@Trasiva That's wrinkling my brain
 
@Zirak I know, right?!
 
7:48 PM
@Zirak the damn French!
 
@Vap0r php, meaning, an image that executes php on the server? you very well could execute javascript on the server too. or have a .js file named .jpg and load in in a script tag, as long as the server returns the right (well, wrong) mimetype.
but certianly not possible to do what the user was trying to do with an image
 
you could have the image render as an iframe
and use that trick publish a while bakc
 
why not just make the image svg
would be a lot easier to embed shit
and would still be an image
 
^ that's an even better idea
 
@KevinB yeah, bb forums and boards used to have a bunch of image flaws like this. You used to be able to do something along the lines of this:

open notepad-><? print_r($_SERVER); ?>->save as file.jpg->upload as profile pic and laugh
@rlemon SVG based embeds are the newest iteration of this
Used to be very common to write a cookie stealer for session hijacking.
 
7:55 PM
"just redirecting a % of the traffic that visits my site to another." why on earth would you do this on the client? — rlemon 26 secs ago
@SterlingArcher 1/10 on the backstory
 
1 message moved to Trash can
@captainrad Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
@rlemon same reason people do this: stackoverflow.com/questions/40248601/…
 
@ssube haha so much wat
 
@rlemon looking, thanks.
 
8:00 PM
tl;dr you can't do it the way you wanna do it
change how you define the structure
 
@BenjaminGruenbaum I'm afraid not, I'm still in the north, and will remain there tomorrow
So no :(
 
;)
 
those curls don't provide much insulation
 
0
Q: changing => back to function notation

sovaThe server I'm trying to clone my git repository to does not have an updated version of node (I think) so the following does not work: db.collection('sunti').save(sunti, (err, result) => { if (err) return console.log(err) console.log(sunti) console.log('saved above _...

wait, how does this fail?
there is no this bs
god people, don't just toss answers to the wind
the question shows code that doesn't fail. wait for OP
 
I don't get what he's asking
 
8:12 PM
no one does
 
op claims that his second block doesn't work
 
OP don't think it run like it is, but it do.
 
@rlemon lies
 
@canon no really, it's right there in the text
> but that does not seem to be right.
:D
 
> but it do
fav
 
8:14 PM
god, almost let those stars get away from us
 
yea, @BadgerCat better show up, soon.
2 minutes till quitting time.
 
anyone else play rimworld?
 
I do, but haven't in a couple months
 
@rlemon i did last week
for about 45 minutes
 
@Luggage they added drugs
so now you get the bufs from them, but deal with the addiction
 
8:20 PM
yea. i can't remember if i played that version, or not
if not, right before
 
also cartelling is now a thing
my recent world is drug / slave traders
idk, I got back into it on the weekend.
 
i often can't risk the negative thoughts from selling slaves.
 
seems the recent updates / new mods are working
@Luggage easy, smokeleaf joints make everything better
 
Yea, I am using one now.
ohh, the game.
 
of course my entire colony is addicted af
 
8:22 PM
can you upgrade them to smokeleaf blunts?
 
3 mins ago, by Luggage
2 minutes till quitting time.
 
if the supply ever gets cut off all hell will break loose
@Luggage working from home?
or really laxed office.
 
I work for me, but yea, i just got home.
well, i work for my client, but you knwo what i mean.
 
I'm playing in the desert as well. I've restarted twice due to flash storms burning my shit down
it's surprisingly challenging
 
argh.. you're gonne make we want to play
i hope some mods are updated.
I think they fixed the thing where your colonists would keep feeding alchohol to the cows.
I lost a lot of cows to that.
 
8:28 PM
this game sounds fun
 
It's a must-have game.
 
I play with prepare carefully, resource muffaloes, rt fuses (must have), rimfridge, pet follow, and infused
but I'm thinking I need fences mod
wooden wall pens without roofs is just ugh
 
for keeping animals out of the farm?
 
yup
also to keep genders apart till I want them to breed
chicken eggs are a constant food supply
 
yea.. i forgot to set the zones one game and the cows ate half my crop before i noticed.
my own cows, i mean. You don't need a fence for that, but I've had wild animals, too.
 
8:31 PM
ohh I heavily rely on zones for everythign
I fence in my farms now
 
yea, so do I, but early game I messed up
 
wild animals suck
 
i just reinstalled my os, and now i can't get atom's linter to work with eslint. i know i'm missing something dumb, but i can't find it. i'm on node v7.0.0
 
also, you need a 'safe barn' for during attacks.
Those bastards go right for the animals
 
yea, my pens work for that right now
toss some grass seed in there
and put a kibble drop in their sleep area
 
8:32 PM
babel-eslint eslint eslint-plugin-react are installed locally
 
grass seed? is that from a mod or new?
 
it's not called grass seed
haygrass I think it's called
 
ohh, right
 
it's grass.
but the larger animals eat it
 
alfalfa.
 
8:33 PM
chickens eat the kibble
 
@NathanJones have you run eslint --init? i did that and it just werked
 
it's a survival game with the same art as prison architect
but crazy levels of gameplay
and you sculpt the scenario you play in (to an extent)
 
@rlemon fallout meets rimworld.. ooo
 
That video doesn't get to gameplay until 12 minutes in
 
sounds like another step in the constant progress towards a playable, graphical dwarf fortress :P
 
8:35 PM
@ssube it's been compared to DF before
 
I enjoyed gnomoria quite a bit and prison architect for a while
 
it is inspired heavily by dwarf fortress, but it's 2d-only.
 
2d only, but with far more world depth, it sounds like?
 
Then you'll like this. prison architech-like graphics, but entirely different gameplay
 
it's hard to explain.
 
8:36 PM
more depth than DF? no, but more than gnomoria.
 
each character has personality traits, and skills, and emotions
and like, you can lose a foot or a toe, or a leg or your eye, or your jaw and they effect you accordingly.
 
the only thing I didn't like about prison architect was the graphics :P
 
@Luggage you called?
 
but you can also kill people and scavenge their parts
@ssube the graphics in rimworld don't bother me at all once I get into the scenario
 
@BadgerCat lookit the stars
 
8:37 PM
everything else is too distracting to care
 
I enjoyed the gnomoria pixel style better than the prison architect vector style, but neither was enough to ruin the game
 
@ssube omg
 
@ssube watch for a sale, 10/10 on rimworld from me
 
this is the best day ever
 
9.9/10 from me.
 
8:38 PM
if it's anything like prison architect and gnomoria, I'm ok paying $20-30 for it
 
okay then buy it now and play it tonight
 
I played both of those long enough to be worth it
 
:D
 
I think I will buy it, when I leave in ~15 minutes
 
check out the mods as well, they (like most games) change the gameplay tremendously.
 
8:39 PM
Like KSP, it gets better with mods. But you don't need/want any to start.
 
^ this
 
@bitten what if i already have a .eslintrc file? will eslint --init do anything useful?
 
@Luggage well, maybe prepare carefully
 
you don't know what to choose for that at first.
 
@NathanJones no, not really
 
8:39 PM
my first ever load I had a guy with a gunshot wound
and no beds...
 
hah
did it get infected?
 
I'd say prepare carefully just so you can start without health issues
@Luggage yea he snapped like day 3 and set fire to all my shit
 
heh
 
tried to take him out, died
 
@Luggage after playing enough colony survival games (or oregon trail), you can guess pretty well
 
8:40 PM
@ssube the loadouts are mostly random (stock)
but you can see and regen before playing
 
just looking at the mod info, I think I probably want it :P
 
but you can spend like 10 minutes just hitting regen
 
ok, fuck you. moving to my desktop to play rimworld
 
that sounds fun too
 
:D
success!
I'm done work in 15, then I need ejuice, then rimworld!
 
8:42 PM
I'm going to read up on the crafting and inventory and tech tree on the way home, I guess.
 
@ssube if you got headphones just watch a few lets play scenarios
just watching someone play for a half hour should do it
and it is an entertaining game to watch
 
I do not, also I'm not a huge fan of lets play. Rather just jump in and die a few tmies.
especially with this genre
 
ohh and you will die.
:D
 
oh, I know
my gnomes got wiped out so many times
 
@bitten well, i installed all of the eslint-related stuff globablly, told linter-eslint to use the global install, and it works now. shrug
 
8:44 PM
just remember, everything that has an info link (i) click
 
my prisons turned into a blood bath (shower, technically)
 
I so often don't read info links in games because often they are pointless
not this game
 
orly? noted
 
they give good info, and not just filler backstory
mostly everythign in the game effects the gameplay
@ssube you use mumble or team speak or ?
 
awww yea
I love web components
so that makes me happy
 
8:51 PM
@rlemon nah, never really used them.
 
booo
twitch.tv/moltenink is nice background while you game
he'll be streaming in an hour
 
I usually am in the living room and either my roommate is playing xbone or I have hardstyle on
 
is it possible to make a single subcomponent not update without making an entirely different component for it?
 
@ssube that sentence is easy to misread.
 
@ssube I usually watch fabrication videos
woodworking/turning and blacksmithing is very soothing
 
8:56 PM
Lightswitches hate him.
 

« first day (2201 days earlier)      last day (2748 days later) »