« first day (2448 days earlier)      last day (2501 days later) » 

6:00 PM
there is a tonne of tuts on it
albeit most of them use jQuery, I'm sure you can figure that out
 
I know, i have it almost down

    $(document).ready(function() {

      $(window).scroll(function () {
          console.log("window", $(window).scrollTop())

          console.log("nav", $('.navbar').scrollHeight);
        if ($(window).scrollTop() > 280) {
          $('#nav_bar').addClass('navbar-fixed');
        }
        if ($(window).scrollTop() < 281) {
          $('#nav_bar').removeClass('navbar-fixed');
        }
      });
    });
 
what's the problem you have then?
 
The only thing im missing is getting the right height of the nav, i dont want it to be hardcoded
 
$(nav).offset().height
or something
look at the jQuery docs for .offset()
... maybe that only does top/left actually.
$(nav).height() should work
 
actually, that works
offset().top
 
6:02 PM
that isn't the height of the nav tho
 
Hey have you guys made any HTML5 games?
 
basic ones
 
Links?
If they're open-source even better
 
@EnnMichael github.com/RUJodan/Source-React in progress..
nowhere near beta
 
best game ever
 
@SterlingArcher By in progress you mean hasn't been touched since like...last year?
 
This ended up working

$(document).ready(function() {
    var navScrollHeight = $('.navbar').offset().top;

    $(window).scroll(function () {
        if ($(window).scrollTop() > navScrollHeight) {
            $('.navbar').addClass('navbar-fixed-top');
        }
        if ($(window).scrollTop() < navScrollHeight) {
            $('.navbar').removeClass('navbar-fixed-top');
        }
    });
});
 
Thanks for the help @rlemon!
 
@Trasiva you're pretty bad at reading m8
 
6:06 PM
@rlemon They seem to all be...
 
@rlemon Shhhhhh
 
Safe for work
 
until they aren't
 
oh, they're not
 
@EnnMichael it's random images from imgur
the point is to see how long you can pull random images before they're porn
 
6:06 PM
@rlemon 91 sfw then BAM. facial.
 
most people can't get above 30-40
 
the average sits somewhere near 8
 
^
there is a lot of porn on imgur
 
@towc Woww!
Your design is so nice
 
I'd like the see stats by country.
 
6:07 PM
Beautiful
 
thanks :)
 
The majority 99% of MLP porn I've seen is both accidental and from riskyclicker
 
Average clicks until NSFW:
Saudi Arabia: 1
USA: 8
Germany: NaN
 
I'm actually thinking of doing a re-write to also practise some more mobx
 
when you rewrite it, you should find a way to share chains of images (like a minecraft seed)
 
6:09 PM
@towc You wrote it in JS?
Also, are the mazes randomly generated?
 
I know that came up before, not sure it if you wrote it
 
@ssube yea, that's the idea.
 
@EnnMichael yeah. It's pretty bad generation, but it works
and all js. Except some basic html/css
you can check the github repo
 
Yeah, sure
 
I want the leaderboard to contain your username and the hash to the list that got you there so people can vet your score
 
6:09 PM
Great
 
make sure you're not just voting SFW on everything
 
@towc reduce the spacing between the letters a bit
 
it was for a competition
can't change it
and if I did that, it would be even more crowded after the 4th level
 
@towc Thanks
 
6:11 PM
@towc fair, yeah I got to the fourth level and started seizing so I stopped
 
Did you win
 
Whoa that was major nsfw
 
!!giphy professor falken
 
riskyclicker done
 
6:12 PM
 
!!undo
 
@towc I'm afraid I can't let you do that, towc
 
@rlemon You used JSX right?
 
I have
not in that project, no
 
was supposed to do the Strange game. Only winning move is not to play terminal thing
 
6:12 PM
that was written a while ago
@towc next version, make it play in the console.
 
omg wait for it
good point
it'll come
once I actually get free-ish time
 
@Shrek the people have spoken
 
I can do crazy stuff like stacking transparent consoles controlled by a common program
 
@Vap0r el presidente!
 
so I can do that weird effect
 
6:14 PM
Actually
Who is the current room owner
 
@rlemon I am the definition of responsibility
 
@towc you can style with css in the console
 
I am the room owner here
 
so you can render background images
 
@SterlingArcher Do you take hobo blowjobs in exchange for RO and if so how many
 
6:16 PM
Taking is for poor people. Real leaders give.
3
 
I'm the most active RO
mostly because I have no other life.
 
oh wait, browser console
was thinking of terminals for some reason
 
@towc I did say console 😉
 
terminals are the best
 
yeah, you did
 
6:16 PM
Finally an out of context star that is good advice.
 
I can make it run in the favicon if that helps 😛
 
make pong in the fav icon
I've seen it done
it's funny
 
et tu @Trasiva?
 
et tu buddeh.
 
then add it as a chrome extension, so you can play while it looks like you're researching stuff
 
✈️
 
@rlemon He got a sandwich.
 
good thing it was open face.
 
 
6:22 PM
👊
 
Lol nah I really haven't presented myself in a way that warrants awarding me RO
 
not worth RO, but worth one ice cream cone full of colored plastic
 
@SterlingArcher dude, I'm so pissed. picked up the construction paper on the weekend, got around to building my shelf today.. that stuff doesn't hold jack all man.. how do people make houses from it?
also, this jsonbin.io
 
you cut tabs along the edges, fold it, and glue them together
 
Is that the worst pun I've ever heard
 
6:24 PM
it's like doing sex
 
@SterlingArcher that's because I'm knot even tying
 
@ssube well there's that, I gues
Hey guys join me and Steve in the trash can chatroom: chat.stackoverflow.com/rooms/23262/trash-can
We've gamed the system! Where are they gonna send our chats if they don't like them now!
/r/iamverysmart but fo real do
 
Trash in the trash? So meta.
 
It's trash-cans all the way down
 
make the trashcan the most active room
 
6:28 PM
Hahahaha @rlemon just showed me friendly bin, it is trash-cans all the way down
 
He's already home
<3
 
2 messages moved to Trash can
there we go
 
thx
 
@ssube ✋
 
Well this was fun: jsfiddle.net/Kramb/fk72d8s3
 
6:30 PM
there are no hands on my keyboard
not. even. mine.
 
@ssube 2spooky4me
 
Can anyone show an example of a javascript function that will round a given value up to the next "step" so if it's 19,740 rounds it up to 20,000. if it's 11,200 rounds it up to 15,000 etc? must also handle lower values like if it's 125 -> round up to 500
 
@rlemon Thats the only kind of housing I've seen being made from construction paper: s-media-cache-ak0.pinimg.com/736x/03/33/2a/…
 
@Phil (value, step) => Math.ceil(value / step) * step`
 
@KamilSolecki swanky
 
6:35 PM
Yeah but you have to live on thin margins if you want to live in one of those
 
that depends on how wide you make the margins
 
Yeah its posh af
 
doesn't seem like it should cost too much paper to build
 
does anyone know why fetch does not work with angular scope?
 
@Arrow for example?
 
6:37 PM
.controller('View1Ctrl', ['data','$scope',function(data,$scope) {




 data.then(x=> x.json()).then(data=>{

   $scope.data =data;

 }).catch(y=> y);
 
!!metal or edm or 21 pilots
 
@rlemon edm
 
I get the data if i were to console.log() but not on the scope.
 
@rlemon 21 pilots
 
if you get data on console.log and not 'pending promise' then you're probably doing things wrong before that point
 
6:40 PM
I am getting a pending promise
and it resolves
however scope is not updated
it is just undefined
 
12
Q: Scope not updating in the view after promise is resolved

AleksEven though there is a similar question for this Data is not getting updated in the view after promise is resolved but I am already using this approach and the view is not being updated. I have a factory: 'use strict'; myApp .factory('Factory1', [ '$http','$q','$location', '$rootScope', 'Servi...

 
digest mmmm
 
apply is bad
I don't want to be doing that.
 
apply is bad?
oh, it's not Function.prototype.apply
 
within the context of angular
 
6:46 PM
user image
4
 
this is why angular is stupid
2
 
@rlemon Nooo
 
okay
 
I play too much Hitman
 
do it professionally and you may stop enjoying the game
 
6:55 PM
Hahaha
 
75000
 
oh crap
 
!!stat
 
@KevinB You (https://stackoverflow.com/users/400654/kevin-b) have 75000 reputation, earned 6 rep today, asked 8 questions, gave 2291 answers, for a q:a ratio of 8:2291.
avg. rep/post: 32.62. Badges: 9g 112s 139b
 
what a neat number
how beautiful.
 
7:00 PM
Quick, someone downvote something of his.
 
oh, i'll just go downvote something myself
haven't ran out yet today
 
user1596138
@KevinB I have serial upvoted you apparently
 
user1596138
I wanted to mess up your count but I went and I have already upvoted every answer of yours in the first page
 
lol
 
user1596138
I confuse
 
7:03 PM
now i have to cast 9 more downvotes
 
don't you use lose points when you down vote
 
yes
when the post is an answer
 
^
downvoting questions is free, answers cost you -1
 
I think you answered one of my questions, time to accept it
 
if you downvote a question you don't lose points
 
7:06 PM
i've lost probably 10k rep from downvotes
nah, probably closer to 8k
 
8,475 actually
 
that's answer votes, not just down
if i'm reading it right
 
good point
 
> i have this select that you can use to choose your language. How do i make it translate the website?
 
magic
 
7:15 PM
document.body.replace(/en/, $0 => fr[$0]);
replace works on root nodes now btw
 
replace works on nodes? What the eff?
 
I'd think you'd be an expert at identifying sarcasm :P
 
I'm never sarcastic
 
Sarcasm-ception
 
optimised line of sight entrance way for your colony
the doors and the rubble apparently allow your people to always have 'cover'
the graves keep the pawns from stopping and taking cover, they can't stop on graves
 
7:25 PM
eeenteresting
 
pretty well designed if you ask me, just needs some turrets
 
or a rambo
 
what is that
 
name a character after me
 
I've never thought about using graves like that
@ndugger will do
> Nick Dugger: incapable of caring
 
7:26 PM
then make that character an RO
 
@rlemon Rimworld?
 
yes
 
@ndugger Then they'll just take his RO away when he stops caring.
 
That's his secret; he never cares
It's how he's kept from offing himself
that, and medication
 
> 'dugger' is on a SmokeLeaf binge
 
7:27 PM
@ndugger you won't like him when he cares
 
I'll make you the doctor, so you can try to give someone a wooden foot and end up accidentally cutting off their two arms.
god, failed surgeries in rimworld are both funny and stupid
 
I've never done surgery intentionally
 
user1596138
@rlemon wut
 
that game is pretty well done as far as different mechanics.
failed surgeries can be catastrophic
like you can schedule someone for a replacement hand and they get their stomach cut out by mistake
 
I've been modeling a lot of game mechanics in my stuff after rimworld and prison architect. Their sort of rule-based randomness works great with an async event flow.
 
7:31 PM
@rlemon Reminds me of that surgeon that ended up killing himself, the patient and someone else.
 
imagine if FO4 had that. when you get your face redone there's a chance it'l go horribly wrong and give you some really screwed up face that you can't change for 48 hours
 
@rlemon wait what
 
@KevinB that's the kind of depth that made FO1 and 2 great
 
Is that with the base entrance down below or up top?
could be catastrophic if done in reverse X-D
 
lol
 
user1596138
7:33 PM
> Catastrophic: Deals great damage, and usually destroys body parts outright.
> Ridiculous: Deals great damage scattered across the entire body.
 
i find it odd that you can build a thing in your... uh, whatever it's called that lets you change your face, but you can't build the medical clinic until you have medic 1
 
user1596138
Sounds fun lol
 
@Jhoverit ohh man, the game is well worth the money imo
 
tonight and next few days i get to build up my settlements and get caravan routes goin
 
it's a survival base builder with a great story that changes all the time
I've just started recently reading the interactions and art descriptions and stuff.
very very funny stuff.
 
7:37 PM
@rlemon it's dwarf fortress inspired
 
for example ^^
 
@rlemon and it's still in development
which is a plus
I mean, the dev is still releasing new features
 
@TylerH it's inspired by a few games.
 
plus it has mod support
 
it's still in alpha :P
 
7:37 PM
@rlemon I meant the descriptions but yes
 
@Jhoverit oh you are jhawins D:
 
very observant
 
user1596138
@Shrek #SwagJesus
 
i'll try that game tonight
 
user1596138
7:42 PM
I need a Tesla so I can try that while it drives
 
it's a raid night though, so won't get that far into it likely
 
user1596138
/me starts 620mile drive in a few
 
@Jhoverit you do care!
 
user1596138
..?
 
> I need a Tesla
- Jhoverit, 2017
 
user1596138
7:44 PM
Duh Im a gearhead I want a Tesla
 
i want a pickup version
 
Teslas don't have gears, they have dreams and levers
 
@KevinB yesterday you mentioned to go for a ride around space center if I need any additional science points. What did you mean by that? I was unable to find such feature as a facility tour
 
user1596138
@KevinB I do too but not the way they'll make it. I want a tall crawler that has 100% torque at all times
 
@rlemon What the shit man
 
user1596138
7:45 PM
Would be amazing offroad
 
it wasn't me, but, basically you take science experiments to all the different buildings around ksc
 
rednecks shouldn't be allowed to buy trucks
 
each one is a different biome, so you can collect science from each.
but if you're not playing career, there isn't much point to it
 
@KamilSolecki can you do eva's yet?
 
Sure! I did some already
 
7:46 PM
unless my mods doing this, you should be able to collect a new EVA report (70,000m+ alt) from each biome you pass over on Kerbin
 
Eva's over biomes, I guess?
 
^ yup
it's only like 13 science or w/e per
but it's science.
and because you can send EVA reports back without penalty you can do it all in one mission
just make sure you have solar
EVA - > EVA report - > reboard -> right click on capsule -> review data -> transmit
 
Yeah. I'm just doing some at high space (500km) and hopefully I will not crash or burn this time, since I redesigned my vehicle a little
 
wash rinse repeat
 
When landed it gives more science
 
7:48 PM
yup
because it changes biome
 
I'm gonna be the first person to step foot on jupiter
 
Also, what is the purpose of the space station? Or is it just for fun of making one
 
you can make tons of science with a station
 
With a science lab on it, I assume?
 
@ndugger Good way to put on a shit ton of weight too.
 
7:51 PM
@ssube yea but you need mid-late game tech
 
I went to the science museum one time and they had an exhibit about the gravity on different planets. I wasn't especially sober and it really messed me up.
 
it's a great way to get the last of the tech tree when you're paying 500+ per upgrade tho
 
yeah, you need an orbiting lab to get the 300+ tiers
 
For me final tech is 8000 science each :( (I'm running interstellar)
 
once work is over, I'm attaching the last batch of science stuff and fuel tonight, then pushing my station to the mun or something
 
7:52 PM
@ssube Are you letting the game just run while you're at work?
 
lol nah
I would just end up playing all day
 
I have a filterObject, something like `{"PageName": "blah", "Category": "foo", "SubCategory": "bar"}`. PageName will always be populated, Category *might* be populated, and SubCategory *will only* be populated if "Category" is present.

Then I have data like so:
[
  {
    "SomeData": "whatever",
    "PageName": "Page1",
    "Category": null,
    "SubCategory": null
  },
  {
    "SomeData": "something",
    "PageName": "CategoryPage",
    "Category": "foo",
    "SubCategory": "bar"
  },
  {
    "SomeData": "something else",
    "PageName": "CategoryPage",
    "Category": "foo",
    "SubCategory": null
  }
}
 
Do yoiu end up with a decaying orbit after a while? Or does it stay healthy forever?
 
foreva
 
I know nothing
 
7:54 PM
I want to match the data like this:
If Category is found in the data, but no subcat, return the element with matching cat and subcat null
 
depends on whether you're outside of the atmosphere
 
^ well, ofc
 
If Category is not found see if PageName exists, if so, return that
 
user1596138
@Vap0r ||
 
Also, one more thing: youtube.com/watch?v=mqA678R7D_8 - is the thing he is using for changing fly paths / orbits a mod / mechjeb/ vanilla?
 
7:56 PM
@Jhoverit alright I'm gonna give it an attempt and then we'll see what I've got
 
user1596138
Oh wait
 
user1596138
(Cat || SubCat) || PageName
 
@ndugger if > 70km it's forever from what I know
 
user1596138
Idk I can;t understand you haha
 
So something like foo =data.filter(datum => datum.PageName === filterObj.PageName);
 
user1596138
7:58 PM
Do it in steps
 
user1596138
What is the first acceptable match?
 
then foo.filter(results => results.Cat === filterObj.Cat)
@Jhoverit I guess pageName would be most important, because if I'm on a certain page, it doesn't matter if the cats or subcats show up because they shouldn't be displayed
 
user1596138
I don't think you need nested filtering
 
@Jhoverit I agree. More for illustrative purposes :)
 
user1596138
In the example you gave which object gets selected
 

« first day (2448 days earlier)      last day (2501 days later) »