These are chat archives for FreeCodeCamp/Help

13th
Jan 2018
MattUnderwood
@MattUnderwood
Jan 13 2018 02:36

Hello, I created this app a few weeks ago and everything worked well. Now my background image won't load unless unless weatherType === "clear sky" (my first statement in a long else if statement). I've been looking over the code a ton and can't find out why it isn't working.

https://codepen.io/MattUnderwood/pen/QMVpwj

Alexander Jarman
@HeinousTugboat
Jan 13 2018 03:18
image.png
@MattUnderwood
Looks like the images.. just don't exist any more.
Ken Haduch
@khaduch
Jan 13 2018 03:54
@MattUnderwood - it looks like the image that you have for "rain" is still there, I didn't check everything but some definitely seem to no longer be available. (I just checked all of the others, none of them load by just copying and pasting the image URL...)
Bennett Elder
@bennett-elder
Jan 13 2018 04:35
Hello... when someone gets a chance can I get 3rd party confirmation of a bug I found so I can open an issue on the fcc repo? :)
double checked that I don't see any Issues or PRs for it
Bennett Elder
@bennett-elder
Jan 13 2018 04:41
it looks like README.md is out of date on staging - the section centered around "four certifications" doesn't match up with the new curriculum
https://github.com/freeCodeCamp/freeCodeCamp/blob/staging/README.md
once we open an Issue I plan on rewriting the section based on Quincy's forum post about them that's linked from the beta FAQ https://forum.freecodecamp.org/t/freecodecamps-new-certificates-heres-how-were-rolling-them-out/141618
mstellaluna
@mstellaluna
Jan 13 2018 04:44
@bennett-elder Hello, please enquire in the contributors room concerning the contributing guide. the room is quiet at the moment, eventually they will respond to you https://gitter.im/FreeCodeCamp/Contributors
Bennett Elder
@bennett-elder
Jan 13 2018 04:49
thank you @mstellaluna
CamperBot
@camperbot
Jan 13 2018 04:49
bennett-elder sends brownie points to @mstellaluna :sparkles: :thumbsup: :sparkles:
:cookie: 334 | @mstellaluna |http://www.freecodecamp.org/mstellaluna
Victoria yang
@ses22142004
Jan 13 2018 11:52
How Change the Font Size of an Element
shivam gupta
@shivamg11000
Jan 13 2018 12:02
anyone experienced in phonegap
Bjorn van de Peut
@bjorno43
Jan 13 2018 12:16
@ses22142004 <label style="font-size: 14px;">Some Text</label>
Fabien SHAN
@X140hu4
Jan 13 2018 12:54
@bjorno43 inline style is not best practice though
Victoria yang
@ses22142004
Jan 13 2018 12:55
Thank you so much.
Bjorn van de Peut
@bjorno43
Jan 13 2018 12:56
@X140hu4 I know. He was asking how. I didn't feel like writing seperate CSS code, teaching him how to link the CSS file and implementing classes
If he wants to learn how to do it properly, he should do the FCC curriculum. After all, that's what this chat is all about ;)
Stephen James
@sjames1958gm
Jan 13 2018 12:59
@bjorno43 I believe that that is a FCC challenge "Change the Font Size of an Element"
Bjorn van de Peut
@bjorno43
Jan 13 2018 13:01
@sjames1958gm Perhaps. It's been a while for me since I've done the first challenges
Gersho
@Gersho
Jan 13 2018 13:03
Hello !
and yeah the first few challenges do inline stuff iirc
Stephen James
@sjames1958gm
Jan 13 2018 13:07
Yeah, this one has a style tag.
Gersho
@Gersho
Jan 13 2018 14:03
on github, if i fork a repo, commit some stuff and make a pull request, and someone forks my repo and does a pull request too, when i merge that pull to my fork, do i need to do a second pull request on the original repo ? (the original pull request wasn't merged in the meantime)
Pieter Stokkink
@forkerino
Jan 13 2018 14:22
@Gersho I think you just have to push the merge and the PR should update.
Gersho
@Gersho
Jan 13 2018 14:23
ok thanks @forkerino
CamperBot
@camperbot
Jan 13 2018 14:23
gersho sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2964 | @forkerino |http://www.freecodecamp.org/forkerino
VaseJS
@VaseJS
Jan 13 2018 15:33
yay, just transferred 285 tabs to the lastest firefox.
Albert Cardona II
@daddycardona
Jan 13 2018 17:03
what up everyone
how do you like the latest firefox?
@VaseJS
Gersho
@Gersho
Jan 13 2018 17:09
what latest version are we even talking about ? wasn't it release in november ?
only recent thing i see is the security patch for melt/spectre
oh and hi Albert ! where are my manners :3
Albert Cardona II
@daddycardona
Jan 13 2018 17:18
:)
utarit
@utarit
Jan 13 2018 17:19
Hi guys, I need help in React part
Albert Cardona II
@daddycardona
Jan 13 2018 17:19
I am trying to figure out this calculator part with addition.
@utarit you are father along than I am sorry
Gersho
@Gersho
Jan 13 2018 17:20

Hi guys, I need help in React part

explain what your problem is, if someone can help they will

Alexander Jarman
@HeinousTugboat
Jan 13 2018 17:20
@daddycardona Watch for type coercion. 1 + '1' = '11', and things from the DOM tend to be strings.
utarit
@utarit
Jan 13 2018 17:20
class MyComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      message: ''
    };
    this.handleEnter = this.handleEnter.bind(this);
    this.handleKeyPress = this.handleKeyPress.bind(this);
  }
  // change code below this line
  componentDidMount() {
    document.addEventListener("keydown", this.handleKeyPress())

  }
  componentWillUnmount() {
  document.removeEventListener("keydown");
  }
  // change code above this line
  handleEnter() {
    this.setState({
      message: this.state.message + 'You pressed the enter key! '
    });
  }

  handleKeyPress(event) {
    if (event.keyCode == 13) {
      this.handleEnter();
    }
  }
  render() {
    return (
      <div>
        <h1>{this.state.message}</h1>
      </div>
    );
  }
};
VaseJS
@VaseJS
Jan 13 2018 17:20
@daddycardona don’t know yet. i transferred everything (took about 30 mins to do it manually) then worked out. now i’m done working out so we’ll see throughout the day
i still have all my security plugin so i’m happy so far
Albert Cardona II
@daddycardona
Jan 13 2018 17:21
@HeinousTugboat I actually parse when I am in that section ;)
utarit
@utarit
Jan 13 2018 17:21
cannot read property 'keycode' of undefined I got this
Gersho
@Gersho
Jan 13 2018 17:21
you keep 250+ tabs on a regular basis ? o_o
Albert Cardona II
@daddycardona
Jan 13 2018 17:21
:)
Alexander Jarman
@HeinousTugboat
Jan 13 2018 17:22
@daddycardona Just makin' sure! n + '1' - 1 == 10 * n is doing the rounds on /r/programmerhumor today.
Gersho
@Gersho
Jan 13 2018 17:23
@utarit i see lines "change code below/above this line", is this a challenge ? if so can you send the link ?
Albert Cardona II
@daddycardona
Jan 13 2018 17:23
so my issue really is the equals button. When I want to press equals and do the last thing I was diong
Alexander Jarman
@HeinousTugboat
Jan 13 2018 17:24
@utarit The way you're setting up your handler is incorrect, I believe.
You're executing it when you actually attach it, so it isn't getting passed anything.
VaseJS
@VaseJS
Jan 13 2018 17:25
@daddycardona what are you working on now?
@Gersho i’m down from 800+
Screen Shot 2018-01-12 at 8.19.05 AM.png
Albert Cardona II
@daddycardona
Jan 13 2018 17:25
javascript calculator :)
Gersho
@Gersho
Jan 13 2018 17:25

@Gersho i’m down from 800+

what's the point ? and is your computer not exploding ?

VaseJS
@VaseJS
Jan 13 2018 17:26
lol
its a studying technique
its how i can rapidly take in knowledge.
and find things quickly online
Gersho
@Gersho
Jan 13 2018 17:26
but guess i can't really talk since i have way too many favorites so it's the same issue i guess xD
VaseJS
@VaseJS
Jan 13 2018 17:27
yea, i don’t like bookmarks because i don’t know if i’ll need the resource until after i read it
Albert Cardona II
@daddycardona
Jan 13 2018 17:27
there is so much to read these days :crying_cat_face:
VaseJS
@VaseJS
Jan 13 2018 17:27
so they just stay open until i finish taking in whatever i’m looking for. the problem is i keep jumping down rabbit holes from the previous subject
rscales02
@rscales02
Jan 13 2018 17:28
@utarit got that figured out?
VaseJS
@VaseJS
Jan 13 2018 17:28
its how i figure out what to read.
the fastest way to read something is not to read it at all
utarit
@utarit
Jan 13 2018 17:28
@rscales02 not yet
VaseJS
@VaseJS
Jan 13 2018 17:28
after i learned that, i have to filter very quickly
so my tabs go up and down a lot
but they hover around 3/400
Alexander Jarman
@HeinousTugboat
Jan 13 2018 17:29

@utarit This line's what's causing your issue, I think:

document.addEventListener("keydown", this.handleKeyPress())

Albert Cardona II
@daddycardona
Jan 13 2018 17:29
I don't I have OCD issues if I have to many tabs open I feel like it is not working lol
Alexander Jarman
@HeinousTugboat
Jan 13 2018 17:29
this.handleKeyPress() isn't a function, it's undefined, I think.
utarit
@utarit
Jan 13 2018 17:30
Attach an event listener in the componentDidMount() method for keydown events and have these events trigger the callback handleKeyPress(). You can use document.addEventListener() which takes the event (in quotes) as the first argument and the callback as the second argument.
VaseJS
@VaseJS
Jan 13 2018 17:30
if i teach you the technique, you’ll never browse the internet the same way again.
utarit
@utarit
Jan 13 2018 17:30
Am I misunderstanding this?
Gersho
@Gersho
Jan 13 2018 17:31
@utarit i tried a bit but my React is a bit weak sorry
rscales02
@rscales02
Jan 13 2018 17:32
@utarit you are calling an empty this.handleKeyPress()
Gersho
@Gersho
Jan 13 2018 17:32
considering the interface bugs i'm having i don't think beta is ready to ship yet xD
rscales02
@rscales02
Jan 13 2018 17:32
it is expecting the event to be passed
try this.handleKeyPress
Albert Cardona II
@daddycardona
Jan 13 2018 17:32
@rscales02 are you saying he should be doing this.handleKeyPress(e)?
maybe not
utarit
@utarit
Jan 13 2018 17:32
I tried both
not correct
Albert Cardona II
@daddycardona
Jan 13 2018 17:33
I will be back later ;) in about 30 mins
utarit
@utarit
Jan 13 2018 17:33
anyway I figured it out I suppose
 componentDidMount() {
    document.addEventListener("keydown", function(){
      this.handleKeyPress();
    })
Gersho
@Gersho
Jan 13 2018 17:33
if you suppose you didn't ;)
utarit
@utarit
Jan 13 2018 17:33
whis works
this*
utarit
@utarit
Jan 13 2018 17:41
thanks a lot
Alexander Jarman
@HeinousTugboat
Jan 13 2018 17:41
Pretty sure document.addEventListener("keydown", this.handleKeyPress) should work too.
rscales02
@rscales02
Jan 13 2018 19:26
@daddycardona saying it should be this.handleKeyPress
JeanBaptiste98
@JeanBaptiste98
Jan 13 2018 20:16
<div class="questionnaire">
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSfxbkn8FQyEiNTxIBsJ0ym0e-ylwjIz6Glx1yWI1AnhD-1mjg/viewform?embedded=true"></iframe>
</div>
image.png
how i can modifie
Eunice Park
@eunicode
Jan 13 2018 20:25
@HeinousTugboat This is a really late reply, bc I spent days trying to understand closures and I finally (mostly) understand your explanations. I'm the person who asked this https://gitter.im/FreeCodeCamp/Help?at=5a5805fb290a1f45617ac160
So thank you so much for your explanation of the console logs, and your great definition of closures.
You are a blessing to this chat and I envy your level of JS understanding. How did you get to this level? Reading YDKJS a million times?
CamperBot
@camperbot
Jan 13 2018 20:25
:cookie: 314 | @heinoustugboat |http://www.freecodecamp.org/heinoustugboat
eunipa sends brownie points to @heinoustugboat :sparkles: :thumbsup: :sparkles:
Eunice Park
@eunicode
Jan 13 2018 20:29

@ezioda004 This is also a really late reply, from the person who asked this https://gitter.im/FreeCodeCamp/Help?at=5a5805fb290a1f45617ac160
Thank you, I really appreciate your analytical-ness. You must have applied to a prestigious bootcamp.

My question was actually from the closure section of Codesmith's bootcamp prep
http://csbin.io/closures / http://x.csbin.io/closures3 / https://www.codesmith.io/learn-start
I highly recommend it. The exercises are supposed to solidify the concept of closure.

Here's my understanding of what's going on in this code

function addByX(x) { 
return function(input) { 
return input + x } 
} 

var addByTwo = addByX(2); 
addByTwo(1); // Returns 3

Step 1. var addByTwo = addByX(2);
addByX(2) is a function call bc it has parentheses, so we run addByX(2)
addByX(2) returns an anonymous function. That anonymous function is function(input) {return input + x}
Then we store/assign that anonymous function (or more accurately, the function definition) inside the variable addByTwo.
Step 2. addByTwo(1);
Then we call addByTwo(1).
addByTwo(1) is the same thing as
function(input) { return input + x }
so addByTwo(1) is the same thing as
function(1) {return 1 + x}
So input is 1. What is x? x is 2.
How do we know x is 2? Because function(input) {return input + x} was defined/created inside addByX(x).
And when we called addByX(2), x was equal to 2.
Since we already called addByX(2), the execution of context of addByX(2) should be deleted, so x = 2 should be deleted. But x = 2 is not deleted bc of closure.
Think of closure as a backpack on a function. The anonymous function function(input) {return input + x} has a backpack that says x = 2.
How did the anonymous function get the backpack (aka closure)?
Because when we define/create a function, the function gets a bond to the variables in the scope the function was created in.
And when we return a function from a function, the returned function STILL has that bond to the variables in the scope it was created in (x = 2).

CamperBot
@camperbot
Jan 13 2018 20:29
eunipa sends brownie points to @ezioda004this :sparkles: :thumbsup: :sparkles:
api offline
JeanBaptiste98
@JeanBaptiste98
Jan 13 2018 20:29
who can help me ?
Eunice Park
@eunicode
Jan 13 2018 20:30
@Gersho Also, I forgot to thank you for your suggestion
CamperBot
@camperbot
Jan 13 2018 20:30
eunipa sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 575 | @gersho |http://www.freecodecamp.org/gersho
rscales02
@rscales02
Jan 13 2018 20:40
@utarit did you get it figured out?
What is your question @JeanBaptiste98 ?
@utarit have you tried using ES6 syntax with your React projects?
it changes the binding of this so you no longer have to type this.yourFunction = this.yourFunction.bind(this)
Garrus Napp
@GarrusNapp
Jan 13 2018 20:46
@rscales02 what do you mean by es6 syntax? class based components?
rscales02
@rscales02
Jan 13 2018 20:50
function foo(){ //ES5
//do something
}

const foo = () => { //ES6
//do something
}
both are identical functions, but ES6 changes `this binding from the current dynamical calling to a contextual based call.
Garrus Napp
@GarrusNapp
Jan 13 2018 20:50
oic
I've seen this in react-router quickstart
I got accustomed to classes tho
rscales02
@rscales02
Jan 13 2018 20:52
You dont have to get rid of classes
If you have a class of Component, your component still does something
Garrus Napp
@GarrusNapp
Jan 13 2018 20:54
yea but I won't get autobind in classes w/o decorator, right?
rscales02
@rscales02
Jan 13 2018 20:54
which leaves in to doing a lot of binding of this in your constructor. ES6 allows you to remove that extra typing
what do you mean by decorator?
Aditya
@ezioda004
Jan 13 2018 20:55
@eunipa Yeah I have more clear understanding of closures now, it was tricky but eventually understood and yours is correct too as I can see in the explanation. Cheers :clap:
Garrus Napp
@GarrusNapp
Jan 13 2018 20:56
rscales02
@rscales02
Jan 13 2018 20:59
//for example

class foo extends React.Component {

handlesomething = () => {
//do something
}

}
this autobinds this to the surrounding foo Component and removes the necessity of typing this.handlesomething .bind(this)
Removes most of the need for a constructor unless you need to set a state
Garrus Napp
@GarrusNapp
Jan 13 2018 21:00
I see now, methods should be written like this
rscales02
@rscales02
Jan 13 2018 21:01
:thumbsup:
most components can be written as a big ES6 function too. If it doesn't need state, it doesn
doesn't really need all the perks of a Component
Gersho
@Gersho
Jan 13 2018 21:02

@Gersho Also, I forgot to thank you for your suggestion

@eunipa i don't remember but hey free cookies

CamperBot
@camperbot
Jan 13 2018 21:02
gersho sends brownie points to @eunipa :sparkles: :thumbsup: :sparkles:
:cookie: 280 | @eunipa |http://www.freecodecamp.org/eunipa
Gersho
@Gersho
Jan 13 2018 21:02
lol
Aditya
@ezioda004
Jan 13 2018 21:03
No cookies for me :sob:
Kyle Holm
@thekholm80
Jan 13 2018 21:03
never
Gersho
@Gersho
Jan 13 2018 21:04
what timezone is github ? i already have green square today, want to wait to upload the rest ^^
When counting commits, we use the timezone information present in the timestamps for those commits.
So local
Gersho
@Gersho
Jan 13 2018 21:11
thanks @ezioda004 here's your cookie :P
CamperBot
@camperbot
Jan 13 2018 21:11
gersho sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 379 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Aditya
@ezioda004
Jan 13 2018 21:14
Got the green square for todays FCC :smile:
Alexander Jarman
@HeinousTugboat
Jan 13 2018 21:19
@eunipa I'm glad I could help! Your understanding seems pretty solid to me! I like the backpack metaphor. :-D
Gersho
@Gersho
Jan 13 2018 21:19

Got the green square for todays FCC :smile:

there's a 2months hole in mine :'(

Alexander Jarman
@HeinousTugboat
Jan 13 2018 21:21
@Gersho I've got like.. 3 separate month+ holes in mine.
Aditya
@ezioda004
Jan 13 2018 21:21
I feel ya, I missed one after 23 days of streak. I cried to sleep that night.
Alexander Jarman
@HeinousTugboat
Jan 13 2018 21:25
I spent 4 days hammering through back-end projects, got stuck designing the layout for the voting app, and just sorta wandered off because I suck at design. :joy:
Gersho
@Gersho
Jan 13 2018 21:27
i still haven't done my portfolio because i suck at this
Kyle Holm
@thekholm80
Jan 13 2018 21:27
@HeinousTugboat my voting app was really ugly, i hate UI design
Gersho
@Gersho
Jan 13 2018 21:28
my weather app is like...text that says the weather
Alexander Jarman
@HeinousTugboat
Jan 13 2018 21:28
Ikr. -_- I can sling code pretty good. You make me do UI design and it looks like a kindergartener with a crayon. And that's being charitable.
Gersho
@Gersho
Jan 13 2018 21:28
the only design i'm half proud is my pomodoro
Kyle Holm
@thekholm80
Jan 13 2018 21:28
everything i've built is ugly lol
except my chicken in my roguelike game
Gersho
@Gersho
Jan 13 2018 21:29
oh your new avatar reminds me i wanted to change mine too !
rscales02
@rscales02
Jan 13 2018 21:29
@Gersho Simon was the only one I got to come out almost ok at this point lol
Gersho
@Gersho
Jan 13 2018 21:30
well i didn't count simon because i only copied what a simon looks like in real life
Kyle Holm
@thekholm80
Jan 13 2018 21:30
^ me too lol
Aditya
@ezioda004
Jan 13 2018 21:30
I'm still waiting to do portfolio after I do all the other advanced projects, designing is hard
Kyle Holm
@thekholm80
Jan 13 2018 21:30
image.png
Gersho
@Gersho
Jan 13 2018 21:30

I'm still waiting to do portfolio after I do all the other advanced projects, designing is hard

i did that too, i only need portfolio for front end cert...that was like 3 moinths ago

Kyle Holm
@thekholm80
Jan 13 2018 21:30
simon was just copying something lol
Gersho
@Gersho
Jan 13 2018 21:32
https://codepen.io/Gersho/pen/YxWLBJ?editors=1010
i designed my pomodoro as if it was a real life object
rscales02
@rscales02
Jan 13 2018 21:32
and that's why mine came out looking good lol
Kyle Holm
@thekholm80
Jan 13 2018 21:32
i used to have a beeper that looked just like that
only it was black
Gersho
@Gersho
Jan 13 2018 21:32
that's the idea ^^
it changes color depending if it's work of break
o
or
and my portfolio, well i won't link it, be grateful i saved your eyes
Kyle Holm
@thekholm80
Jan 13 2018 21:33
i miss pagers. cell phones are cool and all, but pagers were awesome
Garrus Napp
@GarrusNapp
Jan 13 2018 21:33
I can't design for shit too
hopefully that's something that can be learned
Gersho
@Gersho
Jan 13 2018 21:33
pagers were those where you receive text message right ?
Kyle Holm
@thekholm80
Jan 13 2018 21:33
yeah
Gersho
@Gersho
Jan 13 2018 21:34
i remember you had to call and tell your message to the operator, was hilarous
Henry
@GitHub-Henry
Jan 13 2018 21:34
@Gersho i like your design, but once i start a timer, can i stop it and enter another time and then start the new timer's time?
Gersho
@Gersho
Jan 13 2018 21:34
i'm sure they had a day sharing their stories

@Gersho i like your design, but once i start a timer, can i stop it and enter another time and then start the new timer's time?

pause, change the time to what you need, use reset btn

Henry
@GitHub-Henry
Jan 13 2018 21:35
took a while to figure it out
reminds me of physical timers i have, good design work :+1:
Gersho
@Gersho
Jan 13 2018 21:37
i assumed you're not supposed to change the setting during it's use
Henry
@GitHub-Henry
Jan 13 2018 21:38
sometimes folks make mistakes or change their minds, it's nice that your timer can account for that
Gersho
@Gersho
Jan 13 2018 21:39
i've been told to always assume the end user is an idiot
Henry
@GitHub-Henry
Jan 13 2018 21:39
that assumption helps make robust apps
Gersho
@Gersho
Jan 13 2018 21:40
damn choosing an avatar is hard :(
Aditya
@ezioda004
Jan 13 2018 21:44
i did that too, i only need portfolio for front end cert...that was like 3 moinths ago
What are you waiting for? The certificate is so close to you..
Gersho
@Gersho
Jan 13 2018 21:45

What are you waiting for?

inspiration :/

also i was busy on another project for some time too

Bjorn van de Peut
@bjorno43
Jan 13 2018 21:47

i've been told to always assume the end user is an idiot

This is actually quite true. When developing, you'll soon notice that 60 to 70% of your code consists of exceptions to catch end user stupidity

Gersho
@Gersho
Jan 13 2018 21:48
we need a plugin for that, idiotcatch.js
Bjorn van de Peut
@bjorno43
Jan 13 2018 21:49
That wont help at all. I garantuee one of those stupidities includes disabling js
Gersho
@Gersho
Jan 13 2018 21:49
oh by the way, is it possible to prevent the user from using "previous page" ? (or detect that he did ?)
well if he uses a js disable addon, that's his problem not mine :P
Bjorn van de Peut
@bjorno43
Jan 13 2018 21:50
What do you mean? Detect if a user used the back button on the browser?
Gersho
@Gersho
Jan 13 2018 21:52
yes
Alexander Jarman
@HeinousTugboat
Jan 13 2018 21:52
I like the random default pic GitHub assigned me. Looks like a little guy.
Aditya
@ezioda004
Jan 13 2018 21:52
Looks like the first house you make when you start minecraft
Alexander Jarman
@HeinousTugboat
Jan 13 2018 21:53
That too. :laughing:
Gersho
@Gersho
Jan 13 2018 21:53
it's a cyclop with a hat
Alexander Jarman
@HeinousTugboat
Jan 13 2018 21:53
A fancy hat.
Gersho
@Gersho
Jan 13 2018 21:54
i went for sad guts as new avatar
Bjorn van de Peut
@bjorno43
Jan 13 2018 21:55
@Gersho I would recommend to read the answer here: https://stackoverflow.com/questions/25806608/how-to-detect-browser-back-button-event-cross-browser It's a bit too much to explain in chat
Gersho
@Gersho
Jan 13 2018 21:55
thanks @bjorno43 i'll check that
CamperBot
@camperbot
Jan 13 2018 21:55
gersho sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 191 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Gersho
@Gersho
Jan 13 2018 21:57
i received an invitation on linkedin from a cook in the UK i have never heard of him... o_o
Bjorn van de Peut
@bjorno43
Jan 13 2018 21:57
I would never try to prevent a user from browsing back though. This is considdered browser hijacking and extremely bad practise. In the early days of Javascript, there was a notorious function called onbeforeunload. At the time, that function allowed you to re-open the browser if the user attempted to close it or force the user to browse back towards your website if they tried to leave
Gersho
@Gersho
Jan 13 2018 21:58
oh yeah i remember those times, dark dark times
there was the "you are an idiot" page that opened 50 times when you closed it
Bjorn van de Peut
@bjorno43
Jan 13 2018 21:58
Yup
Gersho
@Gersho
Jan 13 2018 21:59
now it doesn't multiply, more secure but we lost that joke
oh the site still exists lol nostalgia
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:00
Actually, most browsers won't allow you to do it all. If the user closes the browser, you can't re-open it through onbeforeunload
Gersho
@Gersho
Jan 13 2018 22:01
well it's not 2001 anymore
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:01
Luckily, lol
Gersho
@Gersho
Jan 13 2018 22:02
remember Gator ? i was so bad at computers back then i had it within 2 days or reinstalling
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:02
It's still possible to troll users through C$ though xD
CamperBot
@camperbot
Jan 13 2018 22:02
:trollface: troll problems? notify admins here
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:02
C#*
lol ye those were the times
I once developed and maintained a trainer for some pokemon game
Gersho
@Gersho
Jan 13 2018 22:03
really ? i remember they had pretty good trainer protection
for pkmn authenticity
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:04
Eventually I noticed my users were all automaticly updating every "nightly" release I made. Despite that I told them it wasn't stable
So eventually I trolled them and implemented a system reboot xD
Gersho
@Gersho
Jan 13 2018 22:04
that's mean
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:05
Ye but I did get my point across. The amount of complaints that stuff wasn't working dropped very fast :P
Gersho
@Gersho
Jan 13 2018 22:05
oh i had the sasser worm back then obviously, i still remember we were on teamspeak with friends and they helped me solve it (we had like half the guiild infected)
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:06
It wasn't an official pokemon game. It was for some online pokemon game called PokeMMO
Gersho
@Gersho
Jan 13 2018 22:06
oh ok
cheating on mmo is bad, cheat in solo :P
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:07
Nah. It was more like a bot that automated tedious hours of walking around trying to find or catch certain pokemon. Nothing else :P
Gersho
@Gersho
Jan 13 2018 22:07
bots are fun
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:08
Yup. Especially since that game was based on Java. So I couldn't rely on anything inside the RAM. I had to rely on a pixel screenreader. Something like OCR
Gersho
@Gersho
Jan 13 2018 22:09
that sounds hard
oh wow...wikia decided to go the evil evil video autoplay route
:(
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:10
Not really. You basicly create screenshots of the game and compare parts of it with the game
Gersho
@Gersho
Jan 13 2018 22:11
wouldn't you need a lot of screens ? or it was more of a random movement within a certain zone thing ?
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:12
No. If you remember the pokemon gameboy games, it was exactly like that. So you simply compared one screenshort and implemented the amount of steps to take from that point on
Gersho
@Gersho
Jan 13 2018 22:13
ok
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:13
Like:
  • Screenshot match: Go left, go left, go up, go left etc etc
Gersho
@Gersho
Jan 13 2018 22:13
most complex bots i ever saw was on ragnarok online
they were very complete
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:14
If screen changes to battle event, detect the pokemon. If interesting, fight, else run. Rly quite basic
Gersho
@Gersho
Jan 13 2018 22:15
my uncle accidently overwrote my save the very same day i got my 150th
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:15
Aiii
Gersho
@Gersho
Jan 13 2018 22:15
but honestly was better than having the same thing happen at 149
Bjorn van de Peut
@bjorno43
Jan 13 2018 22:16
Well it's better to say "I made it" than "I was almost there"
Aditya
@ezioda004
Jan 13 2018 22:25
https://i.imgur.com/i9MH9fA.png
type coercion in a nutshell
Gersho
@Gersho
Jan 13 2018 22:25
would you prefer a syntax error on line 1 ?
Alexander Jarman
@HeinousTugboat
Jan 13 2018 22:29
Nah, they'd prefer a TypeError on things like 'You have ' + x + ' things.' ;-)
Kyle Holm
@thekholm80
Jan 13 2018 22:36
please don't make javascript another c language
no es bueno
Gersho
@Gersho
Jan 13 2018 22:37
Cavascript
mstellaluna
@mstellaluna
Jan 13 2018 22:53
@thekholm80 hey kyle
i have a question for you im going to IM you
Kyle Holm
@thekholm80
Jan 13 2018 23:03
@mstellaluna sure!
Gersho
@Gersho
Jan 13 2018 23:10
has someone tried connecting 2 microsoft emails together ? i'm trying but it doesn't work
Alexander Jarman
@HeinousTugboat
Jan 13 2018 23:14
I.. don't understand what you're asking.
Gersho
@Gersho
Jan 13 2018 23:15
i want to set my microsoft account so i receive my mails from 2 different emails in the same inbox
Alexander Jarman
@HeinousTugboat
Jan 13 2018 23:21
Ooh. I know you can do that with Google, but not sure how to do it with Microsoft.
Gersho
@Gersho
Jan 13 2018 23:23
well i found the option but it keeps saying it can't find it, but i changed an option so i'll wait tomorrow maybe it needs some time
Kyle Holm
@thekholm80
Jan 13 2018 23:23
Outlook will let you map in other emails
Manish Giri
@Manish-Giri
Jan 13 2018 23:24
best thing: use yahoo mail, and put all your sensitive data in there
Gersho
@Gersho
Jan 13 2018 23:24
lol
you funny :P
mstellaluna
@mstellaluna
Jan 13 2018 23:27
@thekholm80 thanks
CamperBot
@camperbot
Jan 13 2018 23:27
mstellaluna sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1665 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Jan 13 2018 23:29
@Gersho i have a new favorite game
Gersho
@Gersho
Jan 13 2018 23:30
let's hear it
Kyle Holm
@thekholm80
Jan 13 2018 23:30
Ori and the Blind Forest
so pretty
I'm not usually big on platformers but this one is good
Gersho
@Gersho
Jan 13 2018 23:30
colorfull
Kyle Holm
@thekholm80
Jan 13 2018 23:31
i still need to get Cup Head, I love the art style
Gersho
@Gersho
Jan 13 2018 23:32
last platformer i played was Hue, i liked the style but the game was way too easy for a puzzle game
CupHead ? i already have a rage game (Touhou 9.5 and 12.5)
mostly playing grim dawn these days
Kyle Holm
@thekholm80
Jan 13 2018 23:33
I'm always looking for new games, my attention span is tiny
Gersho
@Gersho
Jan 13 2018 23:34
i always end up replaying/rewatching stuff i've seen a billion times already
i still have diablo2 installed
Kyle Holm
@thekholm80
Jan 13 2018 23:34
i play through my old favorites every few years
like Mass Effect, Bioshock, Borderlands
Dragon's Age
Gersho
@Gersho
Jan 13 2018 23:34
and with old games you don't have to worry about fps
oh dragon age, i had tried replaying it, but apart from mage i was bored
Kyle Holm
@thekholm80
Jan 13 2018 23:36
i've been playing a lot of gamecube roms lately, too. like Chibi Robo and the Simpsons driving games
Aditya
@ezioda004
Jan 13 2018 23:36
Never played dragon age, but I've heard its similar to The Witcher and Skyrim, its in my to play list
Gersho
@Gersho
Jan 13 2018 23:37
DA 1 is western rpg, DA2 is more action'ish, the third one even more
Kyle Holm
@thekholm80
Jan 13 2018 23:37
Witcher 3 and Skyrim are better games than Dragon's Age, imo, but I still love the Dragon's Age games
the Witcher 3 game engine is my #1 favorite
Gersho
@Gersho
Jan 13 2018 23:38
i'm not too much into western rpg, and the new jrpg are lame, so i haven't add a good game in a while (tales of zestiria i'd say)
but maybe i'll try Witcher 3 someday, but i think i'll wait until i've found work (because i don't know how to videogame like a reasonable adult)
Kyle Holm
@thekholm80
Jan 13 2018 23:39
lol
Aditya
@ezioda004
Jan 13 2018 23:39
Witcher 3 is damn good, I havent got much time to play it yet (5hrs playtime) but the game itself is a piece of art
Gersho
@Gersho
Jan 13 2018 23:39
i heard you get to throw a baby into a fire
Aditya
@ezioda004
Jan 13 2018 23:39
because i don't know how to videogame like a reasonable adult
Thats me alright
I wasted last 2years~ playing wow
Gersho
@Gersho
Jan 13 2018 23:40
casual, i wasted...
...
too much
Kyle Holm
@thekholm80
Jan 13 2018 23:41
i started WoW in BC, played through Cata ... soo much time wasted
Gersho
@Gersho
Jan 13 2018 23:42
played wow only a week tho, never liked the cartoon style, and too many kevins
Aditya
@ezioda004
Jan 13 2018 23:42
Hah, I started in WoD which was a bad expansion, but Legion really good
cartoon style
It was best at the time it was released
The engine is 14 years old
Kyle Holm
@thekholm80
Jan 13 2018 23:43
coming from Everquest, WoW seemed like cinematic quality
i was blown away
Gersho
@Gersho
Jan 13 2018 23:43
that's your opinion, i admit blizzard have very well optimised games, but i didn't like the style
and korean games had nice graphics too (but crappy optimisation)
Aditya
@ezioda004
Jan 13 2018 23:44
Blizzard knows how to hook you up, every one of their game are addicting
Gersho
@Gersho
Jan 13 2018 23:44
oh you played EQ, you're a MMO senpai (i started with The 4th coming in 2000)
Kyle Holm
@thekholm80
Jan 13 2018 23:45
i didn't play sony's EQ, I played on an emu server called Shards of Dalaya
Gersho
@Gersho
Jan 13 2018 23:45
i'd be hooked to starcraft 2 if they didn't change the balance every 2 months
oh pservs, so many memories xD (ragnarok online actually got it's server version stolen at some point)
Kyle Holm
@thekholm80
Jan 13 2018 23:46
i tried a WoW WOTLK private server a few years ago, it was pretty fun. But I had forgotten all the annoying things about WoW that killed the fun for me
like the other players
Gersho
@Gersho
Jan 13 2018 23:47
i've been MMO clean for ~ 6years now
Aditya
@ezioda004
Jan 13 2018 23:47
Lol PvP servers?
Kyle Holm
@thekholm80
Jan 13 2018 23:47
@ezioda004 yeah, i preferred open-world pvp
Aditya
@ezioda004
Jan 13 2018 23:48
They are making a vanilla server
Kyle Holm
@thekholm80
Jan 13 2018 23:48
@Gersho i may have played Guild Wars 2 within the last year
I'm not proud of it
Aditya
@ezioda004
Jan 13 2018 23:49
They shut down a famous vanilla server, a lot of backlash so they're "working" on it
Gersho
@Gersho
Jan 13 2018 23:49
i don't think it'll work, nostalgia is a cruel mistress
unless they do it like EQ, where they unlock extention as people clear the content
Aditya
@ezioda004
Jan 13 2018 23:50
Idk, people seem to be happy about it
No idea about how EQ works
Gersho
@Gersho
Jan 13 2018 23:51
EQ had made a vanilla server too, and they added extention when enougth people have cleared the current max content
because if you stay vanilla, once people have cleared it, they'll leave
but well some people still play T4C, runescape, UO, so maybe i'm wrong
Aditya
@ezioda004
Jan 13 2018 23:53
Oh wow, dont think they are gonna add the extension
Gersho
@Gersho
Jan 13 2018 23:56

lol, wanted to register to edx with microsoft login but

This doesn't look like a work or school email. You can't sign in here with a personal account. Use your work or school account instead.

Kyle Holm
@thekholm80
Jan 13 2018 23:57
that's crazy
Aditya
@ezioda004
Jan 13 2018 23:59
Ah edx.. yet to complete CS50
Gersho
@Gersho
Jan 13 2018 23:59
that's why i'm registering