These are chat archives for FreeCodeCamp/Help

26th
Nov 2017
Ken Haduch
@khaduch
Nov 26 2017 00:41
@ldocherty1 - Hey Liam - the chat rooms have been very quiet of late, since the fCC setup was changed to not put a quick access to the gitter rooms. There are a few of us that still frequent the rooms to help, and a small number of people seem to come in here for help...
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 02:56
Hi, is anyone here good with React?
Kyle Holm
@thekholm80
Nov 26 2017 02:56
some folks are
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 02:57
cause im confused on how I'm supposed to update the state of other components
Kyle Holm
@thekholm80
Nov 26 2017 02:57
do you mean have a child update a parent's state?
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 02:59
Well, I have navigation buttons for example the "Home" button, and once its clicked I need to update the PageContent component
but im not sure how to update that component
Kyle Holm
@thekholm80
Nov 26 2017 03:00
without seeing the code it's hard to say
if one is not a child of the other, find the first common parent of both and write a function to update state, pass the function to the button as a prop and pass the state to the pagecontent component as a prop
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 03:01

`class PageContent extends React.Component {
constructor() {
super();
this.state = {currentPage: 0};
}

render() {
    return (
        <div id='homePage'>
            <div className='col-12'>
                <h1>{navButtons[this.state.currentPage]}</h1>
            </div>
            <div className='col-12'>
                <h2>{navButtons[this.state.currentPage]}</h2>
            </div>
        </div>)
}

}

class HomeButton extends React.Component {
constructor() {
super();
this.state = {isActive: true};
}

_handleClick() {
    PageContent.setState({currentPage: 0});
}

render() {
    return (
        <div className='col-xs-3 col-sm-6 col-md-3 col-lg-3'>
            <h4 className='navBtn'
                onClick={this._handleClick()}>HOME</h4>
        </div>)
}

}`

oops
one sec let me fix that

class PageContent extends React.Component {
constructor() {
super();
this.state = {currentPage: 0};
}

render() {
    return (
        <div id='homePage'>
            <div className='col-12'>
                <h1>{navButtons[this.state.currentPage]}</h1>
            </div>
            <div className='col-12'>
                <h2>{navButtons[this.state.currentPage]}</h2>
            </div>
        </div>)
}

}

class HomeButton extends React.Component {
constructor() {
super();
this.state = {isActive: true};
}

_handleClick() {
    PageContent.setState({currentPage: 0});
}

render() {
    return (
        <div className='col-xs-3 col-sm-6 col-md-3 col-lg-3'>
            <h4 className='navBtn'
                onClick={this._handleClick()}>HOME</h4>
        </div>)
}

}

Kyle Holm
@thekholm80
Nov 26 2017 03:03
are you doing this locally? or do you have a codepen?
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 03:03
locally
i can move it to a codepen tho
one sec
Kyle Holm
@thekholm80
Nov 26 2017 03:12
@LukieID okay so it looks like InfoTab is the parent of both components
so you can put the click handler there and pass it to the button as a prop
have that event update InfoTab state and pass that state to the PageContent component as a prop
as a side note, this all gets a lot easier when you learn Redux lol
I've almost forgotten how to do this
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 03:16
ok
Kyle Holm
@thekholm80
Nov 26 2017 03:16
I'll knock up a quick demo to show what I mean
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 03:16
Ok thanks that would help a lot!
Kyle Holm
@thekholm80
Nov 26 2017 03:31
@LukieID here you go
it's ugly but you should be able to get the idea
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 03:32
Ok! Thank you so much for your time! I'll take a look at it now
Manish Giri
@Manish-Giri
Nov 26 2017 03:34
@thekholm80 is the React grandmaster
Kyle Holm
@thekholm80
Nov 26 2017 03:35
man i wish
I learned everything I know from @Manish-Giri
Manish Giri
@Manish-Giri
Nov 26 2017 03:35
says the person done with both front end & data viz
:smirk:
Kyle Holm
@thekholm80
Nov 26 2017 03:36
i couldn't have done it without your help
Manish Giri
@Manish-Giri
Nov 26 2017 03:36
lol lol lol
Kyle Holm
@thekholm80
Nov 26 2017 03:36
i think you spent more time debugging my Game of Life than I did
Kyle Holm
@thekholm80
Nov 26 2017 03:46
@LukieID if that doesn't make any sense let me know and I'll try to think of another way to explain
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:23
@thekholm80 r u still here?
@thekholm80 I have a question
Kyle Holm
@thekholm80
Nov 26 2017 05:23
yessir
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:24
ok, here is a code pen with my updated stuff
i am confused on how i am supposed to access the state from InfoTab
I need to be able to access the state called "currentPage" in InfoTab and use it in the DisplayComponent function. instead of the "0" in the DisplayComponent function I would like to use the "currentPage" state from InfoTab
Kyle Holm
@thekholm80
Nov 26 2017 05:26
@LukieID <DisplayComponent isClicked={ this.currentPage } /> this should be this.state.currentPage
<HomeButton clickHandler={ this.buttonHandler() } />
<ProjectsButton clickHandler={ this.buttonHandler() } />
these shouldn't have () after the method name
because you're not passing the result of the function as a prop
you're passing the function itself
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:28
ok let me fix that really quick
one sec
Kyle Holm
@thekholm80
Nov 26 2017 05:30
    buttonHandler() {
        this.setState(
            {currentPage: 0}
        );
    }

you initialize your state as

       this.state = {
            currentPage: 0
        };

and your button updates the value to 0 as well

not sure what you're hoping to accomplish there

you might mean something like

    buttonHandler(pageID) {
        this.setState(
            {currentPage: pageID}
        );
    }

then the button can send an id?

Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:32
yes
now where would i use buttonHandler(pageID_
?
in HomeButtons function?
Kyle Holm
@thekholm80
Nov 26 2017 05:33
const HomeButton = props => {
    return (
        <div className='col-xs-3 col-sm-6 col-md-3 col-lg-3'>
            <h4 className='navBtn navActive' onClick={() => props.clickHandler(putYourPageIDHere)}>HOME</h4>
        </div>
    )
};
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:34
ok, thanks. Now last question.
How can I access currentPage from the DisplayComponent function? Cause don't I need to replace the 0 with the currentPage number?
Kyle Holm
@thekholm80
Nov 26 2017 05:35
pass the state as a prop
<DisplayComponent
  isClicked={ this.currentPage }
  currentPage={ this.state.currentPage }
/>
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:38
OOOHHhhh
I forgot that it was set to isClicked
Kyle Holm
@thekholm80
Nov 26 2017 05:39
oh lol i didn't even catch that
sorry i'm only 1/2 here
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:39
Now it works perfectly! Thanks so much, you really helped a lot! :D
Kyle Holm
@thekholm80
Nov 26 2017 05:39
:+1:
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 05:40
:) Ok! Good night. Thanks again!!
Kyle Holm
@thekholm80
Nov 26 2017 05:40
g'night
kaloraat
@kaloraat
Nov 26 2017 05:51
whats the solution?
koder3
@koder3
Nov 26 2017 08:59
why does this code give an infinite loop
 function sumFibs(num) {
  var g = []
  for (var i = 0; i < num; i++){
    g.push(i)
  }
  return g
}

sumFibs(4);
_
alpox
@alpox
Nov 26 2017 09:00
@koder3 Are you sure that you get an infinite loop?
Because this doesn't give you one ;-)
koder3
@koder3
Nov 26 2017 09:00
yeah the page freezes cant click on anything it is exactly what happens when i run into one
alpox
@alpox
Nov 26 2017 09:00
That must have another reason then
@koder3 Maybe ctrl-f5 to reload
koder3
@koder3
Nov 26 2017 09:01
it happens after i click run tests
i cant open it no
now*
ill have to clear cookies and open again
nope doesnt work
ADIL KARMOUZI
@mradil16
Nov 26 2017 09:06
Did web developers create their own scripts or they use others scripts , and add some modifications ,so it fits their needs ?
alpox
@alpox
Nov 26 2017 09:07
@mradil16 Hmm what scripts are you talking about
ADIL KARMOUZI
@mradil16
Nov 26 2017 09:08
javascript based scripts
alpox
@alpox
Nov 26 2017 09:08
I'd say they create their own unless they use libraries/tools from other webdevs (npm) :D
Naveen B
@naveen62
Nov 26 2017 09:29
hi everyone does anyone have idea how make multiple auth in single webapp for example student authentication and collage authentication in single webapp
alpox
@alpox
Nov 26 2017 09:31
@naveen62 That are not really multiple authentications but rather different roles of users, no?
Naveen B
@naveen62
Nov 26 2017 09:32
@alpox correct
alpox
@alpox
Nov 26 2017 09:33
@naveen62 I'd say use one passport endpoint but with different parameters for the user
Naveen B
@naveen62
Nov 26 2017 09:35
here is my code
app.use(passport.initialize());
app.use(passport.session());
passport.use('local.student', new LocalStrategy(Student.authenticate()));
passport.serializeUser(Student.serializeUser());
passport.deserializeUser(Student.deserializeUser())

passport.use('local.company',new LocalStrategy(Company.authenticate()));
passport.serializeUser(Company.serializeUser());
passport.deserializeUser(Company.deserializeUser())
and i am using passport-local-mongoose
gishy1
@gishy1
Nov 26 2017 12:21
@sjames1958gm oh why would not change i? im sorry if i as k seemingly obvious questions also willians goal was a fluke
Stephen James
@sjames1958gm
Nov 26 2017 12:22
@gishy1 You'll have to give some reference.
gishy1
@gishy1
Nov 26 2017 12:22
@sjames1958gm reference?
Stephen James
@sjames1958gm
Nov 26 2017 12:22
Show the code that you are talking about, I have slept since then :)
gishy1
@gishy1
Nov 26 2017 12:23
@sjames1958gm lool ok mate my fcc is freezing atm
talk about bad timing
Stephen James
@sjames1958gm
Nov 26 2017 12:23
@gishy1 Ok, now I recall
gishy1
@gishy1
Nov 26 2017 12:25
@sjames1958gm how would you approach the chunky monkey using a for loop
Stephen James
@sjames1958gm
Nov 26 2017 12:25
Your code should stop when the fibonacci number > num
But you are trying to push num values onto the array.
sumFibs(4000000)
this will try to create a 4 million entry array for your code.
gishy1
@gishy1
Nov 26 2017 12:25
?
Stephen James
@sjames1958gm
Nov 26 2017 12:25
Wrong challenge, now I remember.
i + size doesn't change i you need
i = i + size
or
i += size
You need assignment to change it i + size by itself doesn't
gishy1
@gishy1
Nov 26 2017 12:26
@sjames1958gm ah so that means instead of i++
you i+=size
Stephen James
@sjames1958gm
Nov 26 2017 12:26
@gishy1 Yes. i++ includes assignment
I would use i += size
gishy1
@gishy1
Nov 26 2017 12:27
@sjames1958gm learning code on your own is hell!!!
:worried:
is any ones fcc freezing ?
Oliver Webb
@Ollie15
Nov 26 2017 13:41
Hi, anyone good with python here?
alpox
@alpox
Nov 26 2017 13:49
@Ollie15 relative
Ken Haduch
@khaduch
Nov 26 2017 13:51
@Ollie15 - you can ask and someone might have the knowledge to help you. We’ll try!
Oliver Webb
@Ollie15
Nov 26 2017 13:55
Great! Ok, so I am writing a program that needs to print a variable onto this website into the text box. http://bulksell.ebay.co.uk/ws/eBayISAPI.dll?SingleList&sellingMode=AddItem Thanks @alpox @khaduch
CamperBot
@camperbot
Nov 26 2017 13:55
ollie15 sends brownie points to @alpox and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1465 | @alpox |http://www.freecodecamp.org/alpox
:star2: 3531 | @khaduch |http://www.freecodecamp.org/khaduch
Oliver Webb
@Ollie15
Nov 26 2017 13:55
oops lol
You must me help me now :-) haha
alpox
@alpox
Nov 26 2017 14:02
@Ollie15 That sounds like creation of a bot
I'm not going to help with that
Oliver Webb
@Ollie15
Nov 26 2017 14:04
No, I'm just to make it so I can upload items without filling in all the information, saving time @alpox
alpox
@alpox
Nov 26 2017 14:15
@Ollie15 That is botting
Marc
@MWBauer
Nov 26 2017 15:38
Hello everyone!
Hope all are well
Stephen James
@sjames1958gm
Nov 26 2017 15:38
@MWBauer :wave:
Marc
@MWBauer
Nov 26 2017 15:54
AY! @sjames1958gm Morning! :wave::coffee:
How are you?

I'm curious:

<div class="row">
   <div class="col-md-4">

Does this only apply to buttons or can you use it for boxes too?

Stephen James
@sjames1958gm
Nov 26 2017 15:57
definitely applies to divs (boxes)
Marc
@MWBauer
Nov 26 2017 15:57
Ok. Then I need to figure out how. I'm having a hard time with it.
BBL
.transbox p {
    position: center;
    padding: 20px;
    margin: 2%;
   background-color: rgb(0, 0, 0, 0.3);
    z-index: 1;
}
This makes a box that overlays the background and is opaque so you can see the background.
Do I need the padding
?
Is the position correct?
Stephen James
@sjames1958gm
Nov 26 2017 16:00
I don't think center is a valid value for position
The padding would be space around the contents, depends on what you are doing whether you need it
Marc
@MWBauer
Nov 26 2017 16:02
That's what I thought, so I wanted to pull that out.
Position has become static for now.
Stephen James
@sjames1958gm
Nov 26 2017 16:02
I would think that position and boostrap classes would conflict
Marc
@MWBauer
Nov 26 2017 16:03
Ok.
Now I'm trying to center the weather report and the C/F button
vertically
Stephen James
@sjames1958gm
Nov 26 2017 16:05
Not sure how you do that
Marc
@MWBauer
Nov 26 2017 16:08
Looking w3
Marc
@MWBauer
Nov 26 2017 16:20
this may sound silly.....the box doesn't look right. Can I just use a button and not make the button do anything?
My C/F button looks much better than the box for the local weather
SBALPA
@SBALPA
Nov 26 2017 16:40
Hi guys bit stuck on this

// Declarations
var studyCapvar;
var properCamelCase;
var titleCaseOver;

// Assignments
studlyCapVar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;

studlyCapVar should use camelCase in both declaration and assignment sections.
?
Darren
@DarrenfJ
Nov 26 2017 17:08
morning fCC
just popping in to say hi before am morning of :coffee: and podcasts :D
Sandeep Chary
@dsandeepchary
Nov 26 2017 17:10
Hi @DarrenfJ
Sandeep Chary
@dsandeepchary
Nov 26 2017 17:15
Good night
:wave:
Stephen James
@sjames1958gm
Nov 26 2017 17:18
@SBALPA You missed uppercase Var in the first line
@DarrenfJ :wave:
@MWBauer You can
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:05
I need some help with React
I have some nav buttons and I set them up with react, they all work perfectly except I need to add a class called "navActive" to the button that is currently active. Not sure how to do it though
I am making this locally but I pasted all of the JavaScript into a codepen here:
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:10
@thekholm80 r u still here?
Kyle Holm
@thekholm80
Nov 26 2017 18:13
@LukieID what's up?
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:15
My nav buttons are working perfectly, but I'm not sure how to add the class 'navActive' to the active nav button. For example if I click the "PROJECTS" button then it should add 'navActive' to that nav button.
akosuadenell
@akosuadenell
Nov 26 2017 18:15

include <stdio.h>

int main()
{
int minutes, bottles;
bottles = (12 * minutes);

printf("Minutes: \n");
scanf("%d", &minutes);

printf("Bottles: %d\n", bottles);
return 0;

}

Kyle Holm
@thekholm80
Nov 26 2017 18:16
@LukieID so this component?
const NavButtons = props => {
    return (
        navButtons.map((button, index) =>        
            <div className='col-xs-3 col-sm-6 col-md-3 col-lg-3'>
                <h4 className='navBtn' onClick={() => props.clickHandler(index)}>{button.button}</h4>
            </div>
        )
    )
};
akosuadenell
@akosuadenell
Nov 26 2017 18:16
I am trying to convert minutes to bottles of water
this is C
can anyone help me
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:17
@thekholm80 yes, that component basically creates all 4 of my nav buttons, and I need it to add the class 'navActive' to the currently active button
@thekholm80 Would it be possible to just use the currentPage prop to decide on whether to add 'navActive' or not?
Kyle Holm
@thekholm80
Nov 26 2017 18:19
@LukieID i'd suggest adding a key property to your div, convert this component to a class component and track the active button in state. then you can add/remove the class in response to user actions
Ken Haduch
@khaduch
Nov 26 2017 18:19
@akosuadenell - one thing that you need to do is initialize the value for minutes because you are multiplying it X 12 and there is no value. It looks like you are trying to read a value into it later with the scanf so move the multiplication bottles = (12 * minutes); to the line after you get the value.
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:21
@thekholm80 Ok, I will try that
@thekholm80 Thanks
CamperBot
@camperbot
Nov 26 2017 18:21
lukieid sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1601 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Nov 26 2017 18:22
the key thing isn't related to your problem, but it's a good idea when you generate DOM elements from an object/array like you are
you probably have a warning / error in your console
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:23
should I just set the key to the index?
Kyle Holm
@thekholm80
Nov 26 2017 18:23
that's generally easiest
sometimes you wouldn't want to use the index, but in this case it should be fine
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:24
ok

@thekholm80 class NavButtons extends Component {

constructor(props) {
    super(props);

    this.state = {
        currentPage: 0
    };

    this.buttonHandler = this.buttonHandler.bind(this);
}

buttonHandler(pageID) {
    this.setState(
        {currentPage: pageID}
    );
}

render() {
    return (
        navButtons.map((button, index) =>
            <div key={index} className='col-xs-3 col-sm-6 col-md-3 col-lg-3'>
                <h4 className='navBtn' onClick={() => props.clickHandler(index)}>{button.button}</h4>
            </div>
        )
    )
}

};

like this?
Kyle Holm
@thekholm80
Nov 26 2017 18:28
do your button ids correspond with the currentPage numbers?
if that's the case you could just pass the currentPage as a prop and use it for conditional rendering on your buttons
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:29
yes they do
so I could just keep as it was, and pass currentPage as a prop?
Kyle Holm
@thekholm80
Nov 26 2017 18:29
yeah
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:30
ok so how would I use it for a conditional when rendering my buttons?
const NavButtons = props => {
return (
navButtons.map((button, index) =>
<div key={index} className='col-xs-3 col-sm-6 col-md-3 col-lg-3'>
<h4 className='navBtn' onClick={() => props.clickHandler(index)}>{button.button}</h4>
</div>
)
)
};
Ken Haduch
@khaduch
Nov 26 2017 18:32
@DarrenfJ -hey there Darren - good day to you!
Kyle Holm
@thekholm80
Nov 26 2017 18:32
then in the render you can add something like
<h4 onClick={() => props.clickHandler(index)}
  className={ props.currentPage == index ? "navBtn navActive" : "navBtn" }>
  { button.button}
</h4>
Ken Haduch
@khaduch
Nov 26 2017 18:33
@MWBauer - how are you doing with your project? Have you posted a URL for your code pen? I'd take a look if you still need help... Are you using bootstrap4 or 3?
Kyle Holm
@thekholm80
Nov 26 2017 18:34
@LukieID props.currentPage == index ? "navBtn navActive" : "navBtn" this is called a ternary operator, it basically says
if (props.currentPage == index) {
  return "navBtn navActive";
} else {
  return "navBtn";
}
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:35
wow! clean af
Kyle Holm
@thekholm80
Nov 26 2017 18:36
for some reason i've never been able to make if() statements work in the return() in react
so i always use the ternary operators
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:37
It should be adding a underline to the currentPage but for some reason its not?
Is it not updating it everytime a button is clicked?
should I change something in the buttonHandler function so that it updates the NavButtons?
Kyle Holm
@thekholm80
Nov 26 2017 18:39
that shouldn't be necessary
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:41
Ok, one sec im gonna look over everything
I used console.log(props.currentPage) inside the NavButtons function, and it returns undefined
although when i use console.log(props.currentPage) in the DisplayComponent function is returns the correct number
so that is why its not working, not sure why its returning undefined in NavButtons though
Kyle Holm
@thekholm80
Nov 26 2017 18:45
did you actually pass it to the component?
<NavButton currentPage={ this.state.currentPage } /> or something like that
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:48
lol nope forgot to do that... Yeah that fixed it!
Kyle Holm
@thekholm80
Nov 26 2017 18:48
:+1:
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 18:48
@thekholm80 Thanks again! It's working perfectly now :)
CamperBot
@camperbot
Nov 26 2017 18:48
lukieid sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
api offline
Kyle Holm
@thekholm80
Nov 26 2017 18:48
I'm happy to help
Darren
@DarrenfJ
Nov 26 2017 19:04
hey buddy :D @thekholm80 :wave:
@khaduch hey Ken.. i'm in a loop binge watching Star Trek Discovery right now...
so all is well
Kyle Holm
@thekholm80
Nov 26 2017 19:05
@DarrenfJ g'morning
Darren
@DarrenfJ
Nov 26 2017 19:05
how goes the code?
Kyle Holm
@thekholm80
Nov 26 2017 19:05
playing Spore lol
Darren
@DarrenfJ
Nov 26 2017 19:06
oh man i forgot about spore
only played the mobile version.... but i remember it being the next big thing..
Kyle Holm
@thekholm80
Nov 26 2017 19:07
i just started yesterday, it's pretty entertaining
Darren
@DarrenfJ
Nov 26 2017 19:10
i was big into gaming when it was announced.. there was a big thing about sharing worlds when you got up to that level..
now yer gonna make me go off and explore spore again
that sounds more sarcastic than it's meant to be lol
Kyle Holm
@thekholm80
Nov 26 2017 19:11
lol
it's on sale on steam right now for like $5
Darren
@DarrenfJ
Nov 26 2017 19:11
i mean.. really will now go and figure out how to involve it into my world view
thanks @thekholm80
CamperBot
@camperbot
Nov 26 2017 19:11
darrenfj sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1602 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Darren
@DarrenfJ
Nov 26 2017 19:12
also for @Manish-Giri: this is cool.. nine times table
something I would have thought I would have known already
opps, lemme chop that link
spore reminds me of that new game to learn coding.. where you build bots and collect resources...
Luke Al-Saba
@LukeAlSaba
Nov 26 2017 19:14
screeps
oh yah
the spore for coders ;)
anyhoo, back to binge watching
thanks @LukieID for the name.. wouldn't have remembered it myself
CamperBot
@camperbot
Nov 26 2017 19:15
darrenfj sends brownie points to @lukieid :sparkles: :thumbsup: :sparkles:
:cookie: 52 | @lukieid |http://www.freecodecamp.org/lukieid
Darren
@DarrenfJ
Nov 26 2017 19:15
later roomies...
Kyle Holm
@thekholm80
Nov 26 2017 19:15
@DarrenfJ :wave:
Ken Haduch
@khaduch
Nov 26 2017 19:37
@DarrenfJ - TTYL
Micah M.
@mcmxl22
Nov 26 2017 19:54
W3 says <a> shouldn't be a descendant of <button>. What do I use instead?
Moisés Man
@moigithub
Nov 26 2017 20:16
just a button...
or an <a> tag with some button style
Micah M.
@mcmxl22
Nov 26 2017 20:20
@moigithub Can I use href in a button without <a>?
Moisés Man
@moigithub
Nov 26 2017 20:23
nope.. button dont have href attribute
https://www.w3schools.com/tags/tag_button.asp
Micah M.
@mcmxl22
Nov 26 2017 20:25
So how do I make a link in a button?
alpox
@alpox
Nov 26 2017 20:25
@mcmxl22 <a href="..."><button>...</button></a> but i don't know why using a button when you can just let it away
@mcmxl22 You can just style the a element with css to make it look like a button
Moisés Man
@moigithub
Nov 26 2017 20:27

<a href="..." class="btn">soemthing</a>

css

.btn {
    padding: 10px 20px;
}

... probably some border, shadow, colors too

Micah M.
@mcmxl22
Nov 26 2017 20:28
@alpox @moigithub Thanks. I'll look into those.
CamperBot
@camperbot
Nov 26 2017 20:28
mcmxl22 sends brownie points to @alpox and @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1466 | @alpox |http://www.freecodecamp.org/alpox
:star2: 3721 | @moigithub |http://www.freecodecamp.org/moigithub
alpox
@alpox
Nov 26 2017 20:30
People seem to ask questions in context of creating a bot... I suggest not to help those
(General suggestion)
With bot i mean automatic third-party websites login/usage/hackage which is against the law
Ken Haduch
@khaduch
Nov 26 2017 20:44
@mcmxl22 - bootstrap definitely has the styling to make an anchor be styled as a button. some docs from the bootstrap site for bootstrap V4, but the btn classes are also in V3. Look for the section on "Active links" - they show the application of the button styles on a link.
@alpox - :point_up: November 26, 2017 3:30 PM - good point about the bot creation! Thanks!
CamperBot
@camperbot
Nov 26 2017 20:45
khaduch sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1468 | @alpox |http://www.freecodecamp.org/alpox
alpox
@alpox
Nov 26 2017 20:46
@khaduch np
Micah M.
@mcmxl22
Nov 26 2017 20:50
Something like this? <div class="btn btn-default" id="Github"><a href="https://github.com/mcmxl22">Github</a></div>
sorry. im not familiar with the markdown.
Ken Haduch
@khaduch
Nov 26 2017 20:54
@mcmxl22 - an example from w3schools - <a href="#" class="btn btn-info" role="button">Link Button</a>
Darren
@DarrenfJ
Nov 26 2017 21:43
sorry guys just going through the past posts and missed yer stuff @rana-ej @gishy1
@gishy1 did you get the loop handled?
@rana-ej did you get the id's and past solutions worked out?
@khaduch always happy to see you tirelessly helping out
thanks for that.. thanks @khaduch
CamperBot
@camperbot
Nov 26 2017 21:45
darrenfj sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3533 | @khaduch |http://www.freecodecamp.org/khaduch
DarrenfJ @DarrenfJ is off to watch some more net ninja youtubes
Ken Haduch
@khaduch
Nov 26 2017 22:13
@DarrenfJ - net ninja - very good videos! THanks for mentioning that to me a few days back... I've watched the series on animations with CSS.
CamperBot
@camperbot
Nov 26 2017 22:13
khaduch sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2290 | @darrenfj |http://www.freecodecamp.org/darrenfj
pramos6
@pramos6
Nov 26 2017 23:11
guys I'm having trouble with one of my buttons. Basically the button is created correctly and I don't have a problem with it but, when I try to position it the content inside the button disappears. Here is the code https://codepen.io/ramosp/pen/JOGLGg?editors=1100
I want to get that button under the contact me text but, when using relative and bottom the content (which is "EMAIL ME" text) disappears. Any suggestions?
wait, sorry. The problem actually is that there are two buttons now..
Manish Giri
@Manish-Giri
Nov 26 2017 23:35
@pramos6 try using z-index
assign a higher priority to the content div
@DarrenfJ very neat :sunglasses: