These are chat archives for FreeCodeCamp/HelpFrontEnd

12th
Jan 2018
Eric Hasegawa
@EricHasegawa
Jan 12 2018 00:52
How can I design this so that the aqua colour on the header spreads across the whole top of the screen?
Alexander Jarman
@HeinousTugboat
Jan 12 2018 01:07
@EricHasegawa
body { margin: 0; }
Eric Hasegawa
@EricHasegawa
Jan 12 2018 01:09
Oh wow thank you so much @HeinousTugboat
CamperBot
@camperbot
Jan 12 2018 01:09
erichasegawa sends brownie points to @heinoustugboat :sparkles: :thumbsup: :sparkles:
:cookie: 309 | @heinoustugboat |http://www.freecodecamp.org/heinoustugboat
Eric Hasegawa
@EricHasegawa
Jan 12 2018 01:09
What about height?
David Belmares
@DavidBelmares
Jan 12 2018 01:11
I think it's
top: 0;
Alexander Jarman
@HeinousTugboat
Jan 12 2018 01:11
The h2 has a top-margin on it pushing it down.

So either

#title { margin-top: 0; }

or

h2 { margin-top: 0; }
Depending on what specificity you want.
Eric Hasegawa
@EricHasegawa
Jan 12 2018 01:12
Yeah I figured it out, thank you! @HeinousTugboat @DavidBelmares
CamperBot
@camperbot
Jan 12 2018 01:12
erichasegawa sends brownie points to @heinoustugboat and @davidbelmares :sparkles: :thumbsup: :sparkles:
:cookie: 258 | @davidbelmares |http://www.freecodecamp.org/davidbelmares
api offline
David Belmares
@DavidBelmares
Jan 12 2018 01:14
You're welcome :smile:
Adam Faraj
@adamfaraj
Jan 12 2018 02:19
Can anyone tell me why I have to click on my button twice before displaying my text?
Sorin Ruse
@sorinr
Jan 12 2018 02:35
@adamfaraj why do you cache the dom like dom.aboutButton = dom.container.find('#about__button'); and not directly like dom.aboutButton = dom.getElementById('#about__button'); ?
Alexander Jarman
@HeinousTugboat
Jan 12 2018 02:35
Because you're checking el.style and it's undefined since the elements don't actually have any style.
Adam Faraj
@adamfaraj
Jan 12 2018 02:35
i've been told it's better/quicker that way
@HeinousTugboat what?
how is it undefined
Alexander Jarman
@HeinousTugboat
Jan 12 2018 02:36
So, your HTML elements don't actually have any style attributes set initially.
<p id="about__text">
Adam Faraj
@adamfaraj
Jan 12 2018 02:37
i've set it in CSS
Alexander Jarman
@HeinousTugboat
Jan 12 2018 02:37
That element's style attribute is undefined.
Yeah, but you aren't checking its computed style, just its style attribute.
If you just change that to
<p id="about__text" style="display: none;">
it works fine.
Essentially the first click is setting that, then the second sees it set to that and switches it.
If you want to check what CSS it actually has set, you need to use getComputedStyle.
Adam Faraj
@adamfaraj
Jan 12 2018 02:42
@HeinousTugboat thanks. that worked
CamperBot
@camperbot
Jan 12 2018 02:42
:cookie: 311 | @heinoustugboat |http://www.freecodecamp.org/heinoustugboat
adamfaraj sends brownie points to @heinoustugboat :sparkles: :thumbsup: :sparkles:
Alexander Jarman
@HeinousTugboat
Jan 12 2018 02:43
Yup yup. I was fussing with Element.style all day today. :laughing:
Nitin
@thenm
Jan 12 2018 06:22
function log1 (callback) {
  setTimeout(function () {
    console.log('log1')
  }, 2000);
};

function log2 () {
  console.log('log2');
};

log1(log2);
I am trying to create a callback function such that the log1 is logged first and log2 is logged last. what i am getting is log2 and then log1 which is not how callback should work. Anything I am doing or getting it wrong?
Henry
@GitHub-Henry
Jan 12 2018 06:32
@thenm well, if you know they log in the opposite order, why not switch the order of the code, then they will log in the order you want.
Vidžius
@sursider
Jan 12 2018 06:48
Hello there, anyone have some dropdown language picker, with flags only?
Tarun Khandelwal
@Delwalt
Jan 12 2018 06:52
Hey Guys need your help with ajax.
I am using history.pushstate to change url without reloading.
The issue is
when I go from page A to page B ajax works fine.
Sweet Coding :)
@SweetCodingInc
Jan 12 2018 06:53
@thenm
function log1 (callback) {
  console.log('log1');
  setTimeout(function () {
    callback(); // <<<<< NOTICE THIS PART
  }, 2000);
};

function log2 () {
  console.log('log2');
};
log1(log2);
@Delwalt more details please
Tarun Khandelwal
@Delwalt
Jan 12 2018 06:55
@Delwalt
Hey Guys need your help with ajax.
I am using history.pushstate to change url without reloading.
The issue is
when I go from page A to page B ajax works fine.
To let you know i am bringing some data on page A with ajax.
So when I hit back button the ajax data does not load on page A
I know you can re initializing the ajax function but I do not want to do that.
I want to cache the page A with all the ajax data.
Sorry if I could not explain it better.
Sweet Coding :)
@SweetCodingInc
Jan 12 2018 06:57
Yes. It's unclear
specifically this part
I want to cache the page A with all the ajax data.
is the Ajax data converted to html markup?
Tarun Khandelwal
@Delwalt
Jan 12 2018 06:58
yes.
Sweet Coding :)
@SweetCodingInc
Jan 12 2018 06:58
or is it just stored in some variable?
is there any framework/library in use?
Tarun Khandelwal
@Delwalt
Jan 12 2018 06:59
In ajax I am calling some data from json and then converting it into html
no just jquery
Sweet Coding :)
@SweetCodingInc
Jan 12 2018 06:59
and how do you go from page A to page B ?
Tarun Khandelwal
@Delwalt
Jan 12 2018 06:59
I am using pushstate
Sweet Coding :)
@SweetCodingInc
Jan 12 2018 07:00
can you show code example?
holy fuck!
Tarun Khandelwal
@Delwalt
Jan 12 2018 07:00
haha
Sweet Coding :)
@SweetCodingInc
Jan 12 2018 07:00
create a codepen already, you
@SweetCodingInc will this work?
I haven't added html
Sweet Coding :)
@SweetCodingInc
Jan 12 2018 07:30
let me check
The API calls are not working on codepen
Vidžius
@sursider
Jan 12 2018 08:48
http://btlogistics.lt/new/ maybe anyone have some remarks, what to fix, what to change? :)
abraham anak agung
@padunk
Jan 12 2018 09:00
@sursider Nice one. it runs smoothly. Some remarks: few icons don't show up (i'm using chrome) don't know what the prob is and maybe add some validation in form for user to complete fill the form before sending it.
Untitled.png
Vidžius
@sursider
Jan 12 2018 09:07
@padunk hmm, dunno, it's font-awesome, maybe something went wrong from their side.
pure html, jquery, no php used except for sending mail, but did it in other file .php and reaching it with ajax
B-)
:shipit:
image.png
image.png
that's how the icons looks like.
abraham anak agung
@padunk
Jan 12 2018 09:11
@sursider yeah, maybe have some issue with my network. Overall nice work.
Vidžius
@sursider
Jan 12 2018 09:13
@padunk thanks.
CamperBot
@camperbot
Jan 12 2018 09:13
sursider sends brownie points to @padunk :sparkles: :thumbsup: :sparkles:
:cookie: 414 | @padunk |http://www.freecodecamp.org/padunk
Tychro van den Broeke
@tychro
Jan 12 2018 09:22
can anyone help me?
i need to sharpen an picture but how
Razvan Jackson
@RazvanJackson
Jan 12 2018 09:30
@tychro What do you mean?
Tychro van den Broeke
@tychro
Jan 12 2018 09:32
i added an image in an site, when i got the image from internet it was good sharp but when i added it, it became blurry
chronic
@chronic35
Jan 12 2018 10:41
I'm using angular and I've to display a jsp page. my code hits the API and displays a blank page, on the network tab it shows a error code 404
can anyone help me with this?
Joshua Frias
@Juke-Magic
Jan 12 2018 11:10
guys why does this have undefined in the beginning??

function gotData(data) {
for (var i = 0; i < data[1].length; i++) {
myArray.push(data[1][i]);

var result = result + myArray[i] + ", ";

$("#result").text(result);

here is the pen
Fabien SHAN
@X140hu4
Jan 12 2018 11:12
You can use backticks to show your code in a more readable format here:
  • one in each side:
    Here is some code
  • ``` three before and after for multiple lines:
    Here is a longer piece of code
Markus Kiili
@Masd925
Jan 12 2018 11:14
@Juke-Magic You don't initialize result to ""
The first time var result = result + myArray[i] + ", "; is run, the result on the right side has value undefined.
Joshua Frias
@Juke-Magic
Jan 12 2018 11:16
I dont get it
wait ill think it over haha
thanks @Masd925
CamperBot
@camperbot
Jan 12 2018 11:18
juke-magic sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4651 | @masd925 |http://www.freecodecamp.org/masd925
Markus Kiili
@Masd925
Jan 12 2018 11:18
@Juke-Magic You can fix it by initializing result with an empty string.
John Sofinski
@jbstorms
Jan 12 2018 11:27
I must be really bad at "Escape Sequences in Strings" I believe I am typing in a solution, it keeps rejecting it. Can anyone see the problem? var myStr = "FirstLine\n\SecondLine\rThirdLine";
Joshua Frias
@Juke-Magic
Jan 12 2018 11:27
@Masd925 thank you man i get it
CamperBot
@camperbot
Jan 12 2018 11:27
juke-magic sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
api offline
John Sofinski
@jbstorms
Jan 12 2018 11:31
err I'm trying var myStr = "FirstLine\n\SecondLine\rThirdLine";
Javier Pons
@JavierPons
Jan 12 2018 11:45
hi there, someone can help me in a Bootstrap4 issue?
Vidžius
@sursider
Jan 12 2018 11:48
@JavierPons Hey, tell me, maybe I'll be able to help you :)
Javier Pons
@JavierPons
Jan 12 2018 11:50
@sursider I have section>.class col-sm-12 col-sm-offset-1>container> inside this p with text and ul il with text as well. It look nice in normal screen. But when I make the screen smaller. the text become smaller or more narrow and go out of the "section". ( Section have as a background a photo. ) I would like that when screen became smaller the text keep with good width and that it keeps inside the picture
@sursider thank you to try to help me in this issue :smile:
CamperBot
@camperbot
Jan 12 2018 11:51
javierpons sends brownie points to @sursider :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @sursider |http://www.freecodecamp.org/sursider
Vidžius
@sursider
Jan 12 2018 11:53
umm, have you used <div class="container"> before using col-sm-* ?
and <div class="row">
Javier Pons
@JavierPons
Jan 12 2018 11:55
mmm. lets see
Vidžius
@sursider
Jan 12 2018 11:55
if you use bootstrap's grid, you need to use it inside container or container-fluid
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-xs-12"> </div>
</div>
</div>
It should be something like this.
Javier Pons
@JavierPons
Jan 12 2018 12:00
I typed: <section id="bridge">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-xs-12 ">
and nothing....
Vidžius
@sursider
Jan 12 2018 12:02
can you please copy your code inside ``` markdown?
VaseJS
@VaseJS
Jan 12 2018 12:03
 <section id="bridge">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-xs-12 “>
Javier Pons
@JavierPons
Jan 12 2018 12:04
``` <section id="bridge">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-xs-12 ">
                   <p>text.</p> 

                    <p> text</p> 

                    <p> text

                        <li> text</li>
                        <li>  textl</li>
                        <li> text</li>
                        <li> text</li>
                        <li> text</li>
                    </ul> 
                    <p>text</p>

                    <p>text long
                    </p> 
        </div>
        </div>
    </div>
</section>```
Terence Mangram
@terensu-desu
Jan 12 2018 12:08
@JavierPons You don't have the opening <ul> tag
And it looks like you're missing a </p> tag just above where the <ul> should be
Javier Pons
@JavierPons
Jan 12 2018 12:09
@terensu-desu that Is a mistake of copy in original all its ok, :)
Terence Mangram
@terensu-desu
Jan 12 2018 12:11
@JavierPons Okay, good to hear. Are you doing this on Codepen? If so send a link to it, I'm kind of confused
Vidžius
@sursider
Jan 12 2018 12:11
hmm... maybe something with css? @JavierPons , can I see #bridge ?
Javier Pons
@JavierPons
Jan 12 2018 12:11
sure
#bridge { background-image: url(../img/bridge.jpg) ; background-repeat: no-repeat; background-size: cover; background-position: center; height: 100%; padding: 7rem; align-items: center;
@terensu-desu I don't have it in Codeopen :worried:
Terence Mangram
@terensu-desu
Jan 12 2018 12:14
No worries. One sec
Javier Pons
@JavierPons
Jan 12 2018 12:17
@terensu-desu @sursider after that section I have a footer with some text. When screen become smaller go on that footer text and over...
Terence Mangram
@terensu-desu
Jan 12 2018 12:19
Does #bridge have a parent element?
dnates2014
@dnates2014
Jan 12 2018 12:20
Hello is there a way I can finish the HTML course without going through it? :)
oh nvm, i don't think there is :) I'll just have go through it I guess.
Javier Pons
@JavierPons
Jan 12 2018 12:21
@terensu-desu only body
primuscovenant
@primuscovenant
Jan 12 2018 12:22
@heroiczero thx
CamperBot
@camperbot
Jan 12 2018 12:22
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2134 | @heroiczero |http://www.freecodecamp.org/heroiczero
Terence Mangram
@terensu-desu
Jan 12 2018 12:23
@JavierPons I think the issue is with the section #bridge at height: 100%. It's going to cover the page, so the footer is going to overlap. Do you want an image covering the page? If so there are ways around it. Also I'm not seeing the text under #bridge as centered.
Vidžius
@sursider
Jan 12 2018 12:24
@terensu-desu height have nothing with it I guess. @JavierPons try adding max-width: 100%; to Your #bridge
Javier Pons
@JavierPons
Jan 12 2018 12:27
@sursider @terensu-desu I add max-width and max-height now its better but still text covers footer text and footer zone... :worried:
@terensu-desu the pictures doesn't overlap the footer at all, only text
Vidžius
@sursider
Jan 12 2018 12:28
@JavierPons delete height: 100%;
or use min-height
Javier Pons
@JavierPons
Jan 12 2018 12:30
@sursider yes, now it works!
@sursider thank you!
CamperBot
@camperbot
Jan 12 2018 12:30
javierpons sends brownie points to @sursider :sparkles: :thumbsup: :sparkles:
api offline
Terence Mangram
@terensu-desu
Jan 12 2018 12:31
Glad it works :)
Javier Pons
@JavierPons
Jan 12 2018 12:32
@terensu-desu :+1:
Vidžius
@sursider
Jan 12 2018 12:32
@JavierPons You're welcome ;)
Javier Pons
@JavierPons
Jan 12 2018 12:33
see you guys @sursider @terensu-desu
pocahontas123
@pocahontas123
Jan 12 2018 13:20
hello some body here?
Tom
@moT01
Jan 12 2018 13:24
@pocahontas123
Ken Haduch
@khaduch
Jan 12 2018 13:35
@pocahontas123 - yes, what is your question?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:36
hey can any one tell me what to use for responsive design for extra large screen
VaseJS
@VaseJS
Jan 12 2018 13:37
@SSheorain css
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:38
yep
VaseJS
@VaseJS
Jan 12 2018 13:38
@media as in a media query
thats generally how its done
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:38
@VaseJS i know css but we have screen size for mobile tablet computer and large screen
what is there for extra large screen
<div class="ui five wide mobile six wide tablet six wide computer five wide large screen column">
VaseJS
@VaseJS
Jan 12 2018 13:39
you are looking for device specific info. you define that
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:39
while using semantic ui
VaseJS
@VaseJS
Jan 12 2018 13:39
how do you define 'large'
then make a media query for that
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:40
large screen is predefined
VaseJS
@VaseJS
Jan 12 2018 13:40
there is no set size for large, just generally size past X px.
by who? bootstrap?
Vidžius
@sursider
Jan 12 2018 13:40
@SSheorain in bootstrap extra large is more than 1200px
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:40
nope
VaseJS
@VaseJS
Jan 12 2018 13:40
who has defined it?
that will help
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:40
i am not using bootstrap @sursider
Vidžius
@sursider
Jan 12 2018 13:40
I guess there's no official definition of this.
Tom
@moT01
Jan 12 2018 13:41
those classes don't make sense - you have wide on there 4 times
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:42
@moT01 does that affect anything??
Tom
@moT01
Jan 12 2018 13:42
its just unnecessary
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:42
ok checking out after removing it
Tom
@moT01
Jan 12 2018 13:45
you should design the responsiveness on how your project/site is laid out and not a specific device - for instance - using a media query to change the font to a larger size when > 1200px or whatever to make it look good
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:46
but for that i have to write the same line of code again and again

@moT01

<div class="ui seven mobile eight tablet eight computer seven wide large screen column">

Tom
@moT01
Jan 12 2018 13:46
what
pocahontas123
@pocahontas123
Jan 12 2018 13:46
@khaduch Are you still there? i was doing some thing :(
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:46
is this what you said
Tom
@moT01
Jan 12 2018 13:47
yes - you should only need wide there once
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:47
but it is not giving me result i was getting earlier
Tom
@moT01
Jan 12 2018 13:47
it is it's own class - putting it there multiple times shouldnt do anything different
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:48
what about screen size >1400
Kim Duclos
@KimberlyDuclos
Jan 12 2018 13:49
I am absolutely stuck on the Tweet and Tumblr buttons for the quote generator. I have everything else working and I like how that part came out but no matter what I try, I'm just not getting how to make a button in JS, link it to the intent to tweet page and include the quote. Anybody mind looking at my code? https://codepen.io/KimberlyDuclos/pen/XVVEKQ
VaseJS
@VaseJS
Jan 12 2018 13:49
@SSheorain i see the issues now that i’ve viewe the link
you can set your min width or use custom CSS to achieve what you are looking for
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:50
hmm @VaseJS
VaseJS
@VaseJS
Jan 12 2018 13:50
thats the only way. when you start to go outside the scope of the UI kit/framework, you must do it yourself.
you must augment the css of the framework
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:51
i used custom css at first but for that i have to write the same piece of code again and again
VaseJS
@VaseJS
Jan 12 2018 13:51
no, why would you need to do that?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:52
so how would i specify which element to show and which to hide
VaseJS
@VaseJS
Jan 12 2018 13:52
do you understand the use of components in css?
do you use ids or classes?
do you understand the difference between an object and component?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:53
@VaseJS can u write a psedo code for a login page along with its css
VaseJS
@VaseJS
Jan 12 2018 13:53
i’m trying to see where you are with your css
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:53
yes i had used ids and classes
VaseJS
@VaseJS
Jan 12 2018 13:53
of course i can
Vidžius
@sursider
Jan 12 2018 13:53
@VaseJS I don't know the difference but I can make fully responsive and good looking website :D
Tom
@moT01
Jan 12 2018 13:53
@KimberlyDuclos be sure to put the <a> attributes in the a tag
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:54
@sursider without using bootstrap ??
Marianissimus
@Marianissimus
Jan 12 2018 13:54
@KimberlyDuclos hi. actually, it's not that hard. you need to find the documentation, it's called the twitter intent. you need to send an url beginning with "https://twitter.com/intent/tweet?text= " + your quote
VaseJS
@VaseJS
Jan 12 2018 13:54
I don’t use bootstrap if you’re asking me
Vidžius
@sursider
Jan 12 2018 13:54
@SSheorain I'm using bootstrap because it's a lot better, but I could make it without bootstrap.
Tom
@moT01
Jan 12 2018 13:55
the target and id should be in there @KimberlyDuclos
VaseJS
@VaseJS
Jan 12 2018 13:55
@sursider better compared to what? what @SSheorain is using?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:55
@VaseJS yes without using bootstrap
Marianissimus
@Marianissimus
Jan 12 2018 13:55
here is the official documentation: https://dev.twitter.com/web/tweet-button/web-intent @KimberlyDuclos
Kim Duclos
@KimberlyDuclos
Jan 12 2018 13:55
@Marianissimus Yeah, I've been on there. I know how to link to the page with the intent to Tweet but I can only figure out how to get a hashtag in there. I can't figure out how to get my quote and author in there. I'll check out yours.
Vidžius
@sursider
Jan 12 2018 13:56
@VaseJS forgot to write that it's better for ME* . It's everybody's choice
Marianissimus
@Marianissimus
Jan 12 2018 13:56
it's simple concatenation
VaseJS
@VaseJS
Jan 12 2018 13:56
@SSheorain bootstrap or any thing like it is a crutch depending on what you’re trying to make. i’m more flexible without it
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:56
cool @VaseJS
Marianissimus
@Marianissimus
Jan 12 2018 13:56
quote = "https/twitter..."+quote
Kim Duclos
@KimberlyDuclos
Jan 12 2018 13:56
@Marianissimus Yeah, been on that page too. My quote just doesn't show up.
Marianissimus
@Marianissimus
Jan 12 2018 13:56
if you store the quote in a variable
VaseJS
@VaseJS
Jan 12 2018 13:57
i have less bugs and i’m not locked down to older techniques even though i can augment it with custom css, but that could cause conflicts if i’m not careful. its too much of an headache
Vidžius
@sursider
Jan 12 2018 13:58
dunno, had no problems with it so far. ofcourse, it's everybody's choice
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 13:58
@VaseJS can i see that responsive login page code
Kim Duclos
@KimberlyDuclos
Jan 12 2018 13:58
@Marianissimus Yes, I had the quote and author set to two different variables on the JS side and tried to build the button over there. There's no link if I try to build the button on the JS side and I can't access the quote and author variables if I make the link on the HTML side
Tom
@moT01
Jan 12 2018 13:59
i think the way you have it set up - @KimberlyDuclos - you should change the href whenever you get a new quote
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:00
?? @VaseJS u there
VaseJS
@VaseJS
Jan 12 2018 14:00
computer slowing down. trying to fix the issue. processors going crazy
not sure why
Tom
@moT01
Jan 12 2018 14:00
changing it after you hit the button is too late - you already opened the link - then the href gets changed
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:01
ok @VaseJS take your time
i am waiting
Kim Duclos
@KimberlyDuclos
Jan 12 2018 14:02
@moT01 So just rearrange it so the Twitter intent to tweet is before all of the buttons? How do I do that since the link is already before all the buttons?
I can't even get the quote and author to show, nevermind generating a new href each time
Marianissimus
@Marianissimus
Jan 12 2018 14:03
it's an interesting problem, I wonder if it's due to closures? anyway, why do you have this link on the tumblr button?!?! // "https://www.tumblr.com/widgets/share/tool?posttype=quote&tags=quotes,freecodecamp&caption=
@KimberlyDuclos
Tom
@moT01
Jan 12 2018 14:03
the quote and author show on the codepen page
Kim Duclos
@KimberlyDuclos
Jan 12 2018 14:04
@Marianissimus I just left it there. Nothing in either button is right yet. I couldn't find any link that was working on Tumblr and was just focusing on getting my quote and author in the Tweet for now. Nothing else yet.
Marianissimus
@Marianissimus
Jan 12 2018 14:04
nooo, remove them
Tom
@moT01
Jan 12 2018 14:04
so when you get your new quote - newQuote() - also change the href to the twitter link in that function
then when you click the button - the link will be correct
Marianissimus
@Marianissimus
Jan 12 2018 14:05
you need to dinamically generate the links through javascript / a href = "thetwitterintent" + myrandomquote
Kim Duclos
@KimberlyDuclos
Jan 12 2018 14:05
@moT01 https://twitter.com/intent/tweet + newQuote()? instead of + randomQuote + randomAuthor?
@Marianissimus. Yeah, I used to have https://twitter.com/intent/tweet + randomQuote + " " + randomAuthor
Marianissimus
@Marianissimus
Jan 12 2018 14:06
also, this (setting the href) should probably be done inside your newQuote function, not outside it.
Aditya
@ezioda004
Jan 12 2018 14:06
@KimberlyDuclos The quote and content needs to be encoded before you concatenate
Kim Duclos
@KimberlyDuclos
Jan 12 2018 14:07
@Marianissimus I put that back in and it still doesn't do anything. I had that before
VaseJS
@VaseJS
Jan 12 2018 14:07
@SSheorain looks like my computer calmed down slightly. now back to you
you want me to create a modal window that’s a login page for you?
to help you or prove to you i can do it?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:09
nope @VaseJS .. i am not here to test to
Tom
@moT01
Jan 12 2018 14:09
in your case you want to use this "https://twitter.com/intent/tweet/?text=" + randomQuote
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:09
rather i want to learn
i just want to see the front end part
Marianissimus
@Marianissimus
Jan 12 2018 14:09
@KimberlyDuclos you have jQuery, so the key is here: $('#tweet').attr('href', 'https://twitter.com/intent/tweet?text='+quote
VaseJS
@VaseJS
Jan 12 2018 14:09
i got to ask. new devs seem to have something to prove and like challenging people
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:09
it need not be functional
VaseJS
@VaseJS
Jan 12 2018 14:10
so you want to see a login page or a login modal?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:10
@VaseJS not at all.. i respect you
VaseJS
@VaseJS
Jan 12 2018 14:10
and what are your trying to learn specificly
Marianissimus
@Marianissimus
Jan 12 2018 14:10
and close the () when you are done
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:10
responsive design for large screens
i don't know the difference between the two @VaseJS
VaseJS
@VaseJS
Jan 12 2018 14:11
lol
ok. that answers a lot of questions
it would hard to teach that here in a chatroom and i don’t have the time as i’m going to leave shortly, but i can explain the diff and try to point you in the right direction
Kim Duclos
@KimberlyDuclos
Jan 12 2018 14:13
@Marianissimus @moT01 I've tried both $('#tweet').attr('href', 'https://twitter.com/intent/tweet?text='+ randomQuote + " " + quoteAuthor and https://stackoverflow.com/questions/4365246/how-to-change-href-of-a-tag-on-button-click-through-javascript now and before but that's the issue. Anything I do on the JS side doesn't link to the button on the HTML side. If I link on the HTML side, I can't access the quote and author variables
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:13
cool @VaseJS
thanks for help
VaseJS
@VaseJS
Jan 12 2018 14:14
do you understand min and max width?
Marianissimus
@Marianissimus
Jan 12 2018 14:14
@KimberlyDuclos its tweetButton in your case, and, actually, i dont like your html that much:)
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:14
yes
VaseJS
@VaseJS
Jan 12 2018 14:14
cool
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:14
@media (max-width: 992px){
    #login_tablet,#register_tablet{
        display: none!important;
    }
}
i am already using these
Kim Duclos
@KimberlyDuclos
Jan 12 2018 14:14
@Marianissimus gee thanks. I'm new at this. First time asking for help too. I was nervous showing my stuff.
CamperBot
@camperbot
Jan 12 2018 14:14
kimberlyduclos sends brownie points to @marianissimus :sparkles: :thumbsup: :sparkles:
:cookie: 454 | @marianissimus |http://www.freecodecamp.org/marianissimus
Tom
@moT01
Jan 12 2018 14:15

here's what your newQuote() function should look like ...

newQuote() {
  //get quote
  //get author
  //change href
}

and you shouldn't need the other function - since an <a> opens the link

Aditya
@ezioda004
Jan 12 2018 14:15
@KimberlyDuclos Quick fiddle on this, might help.
VaseJS
@VaseJS
Jan 12 2018 14:15
that’s all the semantic ui is doing. but the thing they’re doing incorrectly in my book is forcing you into device specific direction.
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:16
??
VaseJS
@VaseJS
Jan 12 2018 14:16
first, have you read all the documentation of semantic-ui?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:16
i am confused @VaseJS
hmm
@VaseJS
ok
VaseJS
@VaseJS
Jan 12 2018 14:16
i’m stepping back for a sec
Marianissimus
@Marianissimus
Jan 12 2018 14:16
@KimberlyDuclos don't be, we're all learning here
VaseJS
@VaseJS
Jan 12 2018 14:16
have you read the docs?
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:16
yes i did
VaseJS
@VaseJS
Jan 12 2018 14:17
(my computer is so slow right now. wtf?)
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:17
may be you are running a heavy program on it
VaseJS
@VaseJS
Jan 12 2018 14:17
the issues i must teach you in context of semantic-ui and i don’t know it.
Marianissimus
@Marianissimus
Jan 12 2018 14:18

here's what your newQuote() function should look like ...

newQuote() {
  //get quote
  //get author
  //change href
}

and you shouldn't need the other function - since an <a> opens the link he's right, you know

VaseJS
@VaseJS
Jan 12 2018 14:18
yea, almost 300 tabs open in FF :P
but that’s down from almost 900 so i’m doing better :D
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 14:18
haha
:P
VaseJS
@VaseJS
Jan 12 2018 14:20
Screen Shot 2018-01-12 at 8.19.05 AM.png
either way, you understand what a breakpoint is correct?
Marianissimus
@Marianissimus
Jan 12 2018 14:26
@KimberlyDuclos did you solve it? I solved it
VaseJS
@VaseJS
Jan 12 2018 14:27
damn, i got to fix this issue. my chat is even slowing down. can’t scroll on my browser. if you’re around later i’ll try to explain, but for now, you need to set your min/max width to what you want and put that in a class like semantic-ui is doing. you shouldn’t have to code that over and over. i would have to see your code to really help and i was trying to see what the code on the site you gave was but everything is moving way too slow. forgive my lack of help right now. my processors are slowing down again, but i have to leave for a couple hours. hopefully the little i’m able to give helps but there are smart people in all these rooms. i’ll look you up when i come back to see where you are
Marianissimus
@Marianissimus
Jan 12 2018 14:38
@KimberlyDuclos Ok, I'll sum it up for you, anyways:
  1. Change the html a bit. Use <a> instead of <button> and it will work without a function (as your javascript sets the href of <a>, not button )
  2. Use this logic: A. Generate quote. B. In the same function, assign the quote to the a link (attr, href = "twitintent'+quote)
  3. MAYBE generate a quote from the very beginning, or else your twitter link will not work, as no link is set yet
studentzero
@studentzero
Jan 12 2018 15:09
It's been some time I've been busy with javascript / freecodecamp. So I don't know if this is the right place to ask. I'm trying to write a js script for crypto trade bot gekko. Can someone have a look if this code is correct? Whatever I do it just keeps outputting 101

```strat.init = function() {
//prevHaOpen = (candle.open + candle.close) / 2
//

prevHaOpen = 0,
prevHaClose = 0,

a = 2,
console.log(a, "dit")
}

// What happens on every new candle?
strat.update = function(candle) {
// your code!

if(a = 1) {
a = a + 100;
console.log(a, "hier");
} else {
console.log(a, "daar");
}

// a = a + 1,
// console.log(a, candle.open, prevHaOpen)
}```

strat.init = function() {
  //prevHaOpen = (candle.open + candle.close) / 2
  //

  prevHaOpen = 0,
  prevHaClose = 0,

  a = 2,
  console.log(a, "dit")
}



// What happens on every new candle?
strat.update = function(candle) {
  // your code!


  if(a = 1) {
    a = a + 100;
    console.log(a, "hier");
  } else {
    console.log(a, "daar");
  }

  // a = a + 1,
  // console.log(a, candle.open, prevHaOpen)
}
Kaz Baig
@kbaig
Jan 12 2018 15:12
@studentzero problem is in if(a = 1)
you're not comparing here, you're assigning a a value of 1
studentzero
@studentzero
Jan 12 2018 15:12
== ?
Kaz Baig
@kbaig
Jan 12 2018 15:13
use == or === for equivalence comparison
studentzero
@studentzero
Jan 12 2018 15:13
Right I see now! Many thanks. @kbaig
CamperBot
@camperbot
Jan 12 2018 15:13
studentzero sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 517 | @kbaig |http://www.freecodecamp.org/kbaig
studentzero
@studentzero
Jan 12 2018 15:59
Anyone want to review my code? I'm trying to write a strategy for Gekko trading bot. But suggestions on my general code writing would be very helpful. I feel like I'm doing some things in a weird way.
// Let's create our Heiken Ashi strategy
var strat = {};
var a = {};
var prevHaOpen = {};
var prevHaClose = {};
var haClose = {};
var haOpen = {};
var haHigh = {};
var haLow = {};

// Prepare everything our strat needs
strat.init = function() {
  prevHaOpen = 0,
  prevHaClose = 0
}

// What happens on every new candle?
strat.update = function(candle) {
  // calculate initial Heiken Ashi candles
  if(prevHaOpen == 0) {
    prevHaOpen = (candle.open + candle.close) / 2;
    prevHaClose = (candle.open + candle.high + candle.low + candle.close) / 4;
    console.log("set prev");
  }
  // Calculate current Heiken Ashi candles
  haClose = (candle.open + candle.high + candle.low + candle.close) / 4;
  haOpen = (prevHaOpen + prevHaClose) / 2;
  haHigh = Math.max(candle.high, haOpen, haClose);
  haLow = Math.max(candle.low, haOpen, haClose);

  console.log("log", haClose, haOpen, haHigh, haLow);
}

// For debugging purposes.
strat.log = function() {
  // your code!
}

// Based on the newly calculated
// information, check if we should
// update or not.
strat.check = function(candle) {
    // buy when it candle goes green
   if(haClose >  haOpen) {
        this.advice("long");
        console.log("green");
        return;
    }

    // sell when candle goes red
    if(haClose < haOpen) {
        this.advice("short");
        console.log("red");
        return;
    }
}

module.exports = strat;
Kaz Baig
@kbaig
Jan 12 2018 16:01
@studentzero what do you mean by doing things weirdly
studentzero
@studentzero
Jan 12 2018 16:03
@kbaig Mainly looking for suggestions on how to improve order / syntax and such.
Kaz Baig
@kbaig
Jan 12 2018 16:05
@studentzero well we don't know what exactly you're trying to accomplish but it seems straightforward enough
studentzero
@studentzero
Jan 12 2018 16:06
@kbaig I'm trying to calculate Hieken Ashi candles and buy if they go up/ green, sell if they go down/red.
Also I'm not to sure where to use ; and where ,
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Jan 12 2018 16:22
@studentzero I would consider to make the variables (a, prevHaOpen, ...) not global but as properties of the start object (strat.a = 'afds' or if you initialize it inside of strat this.a)
And I haven't really used the , in javascript. I've only seen it for variable declarations (var a = 0, b = 2, c = 4). I'd suggest using ; in other cases
You don't seem to define this.advice in this piece of code...?
fvdave2017
@fvdave2017
Jan 12 2018 16:31
@sjames1958gm Thank you for your input. I did not know that += would create an initialized value.
CamperBot
@camperbot
Jan 12 2018 16:31
fvdave2017 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8849 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Jan 12 2018 16:31
@fvdave2017 You started with an unitialized value (undefined) then += just adds to that
If your string was var html = ""; (can't remember the variable name) then that undefined will go away
fvdave2017
@fvdave2017
Jan 12 2018 16:33
@sjames1958gm Also I am linking the button through the id to link to the JavaScript
Stephen James
@sjames1958gm
Jan 12 2018 16:33
@fvdave2017 Are you doing that after you add the buttons to the DOM?
fvdave2017
@fvdave2017
Jan 12 2018 16:35
@sjames1958gm Yes I am. At least that is what I believe I am doing. The buttons are called from an input and submit action.
Stephen James
@sjames1958gm
Jan 12 2018 16:37
@fvdave2017 I'd need to see it again to comment
fvdave2017
@fvdave2017
Jan 12 2018 16:41
@sjames1958gm Here is the code again. I added the ""; to the var horseBreed and var typeHorse: $("#submit").on('click', function typeSubmit(){
var H = document.querySelector('#horseText').value;
var bHorse = ['A','C','F','G','M','P','Q','S','T'];
// var fHorses =['aHorse()', 'cHorse()', 'fHorse()', 'gHorse()', 'mHorse()', 'pHorse()', 'qHorse()', 'sHorse()', 'tHorse()'];
var tHorse = ['A','C','M','P','R'];
var breedHorse = "";
var typeHorse = "";;
if(H =="breed" || H == "Breed" || H == "breeds" || H == "Breeds"){
           breedHorse += "<button id='aHorse' class='btn-default btn-sm'>A</button>&nbsp;";
           breedHorse += "<button class='btn-default btn-sm' id='cHorse'>C</button>&nbsp;";
           breedHorse += "<button class='btn-default btn-sm' id='fHorse'>F</button>&nbsp;";
            breedHorse += "<button class='btn-default btn-sm' id='gHorse'>G</button>&nbsp;";
            breedHorse += "<button class='btn-default btn-sm' id='mHorse'>M</button>&nbsp;";
            breedHorse += "<button class='btn-default btn-sm' id='pHorse'>P</button>&nbsp;";
            breedHorse += "<button class='btn-default btn-sm' id='qHorse'>Q</button>&nbsp;";
            breedHorse += "<button class='btn-default btn-sm' id='sHorse'>S</button>&nbsp;";
            breedHorse += "<button class='btn-default btn-sm' id='tHorse'>T</button>&nbsp;";

          /*
          for(var i=0; i < fHorses.length; i++){
               for(var j=0; j < bHorse.length; j++){
              breedHorse += "<ul class = 'btn-toolbar oneToolbar list-unstyled'>";
              breedHorse += "<li><button class = 'btn-default btn-sm' id = ''><a href='" + fHorses[j] +"'>" + bHorse[i] + "</a></button>";
          }
          }

          breedHorse += "</ul>";
          */
          document.getElementById("Horses").innerHTML = breedHorse;
          console.log(breedHorse);

      }
       else if(H =="type" || H == "Type" || H == "types" || H == "Types"){
          for(var k=0; k < tHorse.length; k++){
              typeHorse += "<ul class = 'btn-toolbar oneToolbar list-unstyled'>";
              typeHorse += "<li><button class = 'btn-default btn-sm' id = ''>" + tHorse[k] + "</button>";
          }
          typeHorse += "</ul>";
          document.getElementById("Horses").innerHTML = typeHorse;
       }
  });
@sjames1958gm Thank you the 'undefined' disappeared when I added ""; to the var.
CamperBot
@camperbot
Jan 12 2018 16:43
fvdave2017 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
api offline
Stephen James
@sjames1958gm
Jan 12 2018 16:45
@fvdave2017 So you create all those buttons, but they don't have any way to do anything. you aren't adding any click handlers to them.
dinesh
@1532j0004kg
Jan 12 2018 16:46
can anyone tell the online webapp that communicate with ours ,
like siri
fvdave2017
@fvdave2017
Jan 12 2018 16:48
@sjames1958gm Okay, that makes me confused. I thought that through the id I was linking the button to the function when I called it through the $(id).on('click', function(){}); ?
Stephen James
@sjames1958gm
Jan 12 2018 16:50
@fvdave2017 That is only a button that already exists when that code runs. Butt all those buttons added inside that function won't
You might be better served to do something like (maybe in a function that you can call)
var e = document.createElement("button");
e.id = "cHorse";
e.click = somefunc;
fvdave2017
@fvdave2017
Jan 12 2018 16:54
@sjames1958gm okay. I am going to show you the function that the first button is calling. Here it is:

$("#aHorse").on('click', function aHorses(){
var horse = ["<a href='Shetland.html' target='_blank'>American Shetland</a>", "<a href='Appaloosa.html' target='_blank'>Appaloosa</a>", "<a href='Azteca.html' target='_blank'>Azteca</a>"];
var horseLink = ["#American", "https://www.ctv.ca/Home", "https://www.economist.com"];

var horseList = "<ul class='nav nav-pills nav-stacked list-unstyled'>";
for(var i=0; i<horse.length; i++){

horseList += "<li><button>" + horse[i] + "</button></li>";
}
horseList += "</ul>";

document.getElementById("breedspage2").innerHTML = horseList;  

});

@sjames1958gm Is this confusing to you?
Stephen James
@sjames1958gm
Jan 12 2018 16:56
@fvdave2017 $("#aHorse").on('click', function aHorses(){ this call here, has to be made after you add the button to the DOM.
@fvdave2017 It won't know what $("#aHorse") is until then.
fvdave2017
@fvdave2017
Jan 12 2018 16:58
@sjames1958gm if this function is after the button function in the JavaScript file will it not be put into the DOM after the button(s) is/are created?
Stephen James
@sjames1958gm
Jan 12 2018 16:59
@fvdave2017 From what I can tell the buttons are not put into the DOM until you click the #submit button.
I assume that this code you just posted runs at page load?
fvdave2017
@fvdave2017
Jan 12 2018 17:01
@sjames1958gm Yes you are correct. The buttons are loaded into the page after the submit is run. Both codes are in the same JS file.
Matt Brentin
@mbrentin
Jan 12 2018 17:02
do you have them wrapped in a $( document ).ready(function() {}); ?
Stephen James
@sjames1958gm
Jan 12 2018 17:03
If you put this code into a function and called that function after you added the buttons to the DOM
then it should work.
$("#aHorse").on('click', function aHorses(){});
fvdave2017
@fvdave2017
Jan 12 2018 17:06
@sjames1958gm That is what I thought I was doing. If I am not calling the function after I add the buttons then what am I not understanding? Do I have to have two separate JS files?
studentzero
@studentzero
Jan 12 2018 17:07
@Otto-AA Thanks this is useful advice. I reworked it a bit using this.somethings looks usefull. Will read in to it a bit more
CamperBot
@camperbot
Jan 12 2018 17:07
studentzero sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 406 | @otto-aa |http://www.freecodecamp.org/otto-aa
Liam Docherty
@ldocherty1
Jan 12 2018 17:31
Hi does anyone know how to output a pdf document within a java program? Does anyone have a link to some code which will do this?
Stephen James
@sjames1958gm
Jan 12 2018 17:48
@fvdave2017 You don't need two files, but you have to ensure that the order of execution is correct. If you have the code that
registers for clicks run before you add the buttons, then the clicks won't get registered.
You could define the function in the file after this code
function aHorses() {}
But you have to register the click subsequent to the putting the buttons into the DOM (execution timewise not just file position)
so in that submit click function after the innerHTML = breedHorse
you could
$("#aHorse").on('click', aHorses); this would pass the aHorses function to be the click handler function for the just added button with id #aHorse
Kaz Baig
@kbaig
Jan 12 2018 17:57
@ldocherty1 you might have better luck asking in the back end room
fvdave2017
@fvdave2017
Jan 12 2018 18:01
@sjames1958gm Okay, Thank you I will work with your sugestion.
CamperBot
@camperbot
Jan 12 2018 18:01
fvdave2017 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8850 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Mohsin Hayat
@mohsinht
Jan 12 2018 18:09
hi everyone
I need feedback
Eric Weiss
@eweiss17
Jan 12 2018 18:10
i'll trade ya feedback for feedback
Mohsin Hayat
@mohsinht
Jan 12 2018 18:10
deal
send me your link, I'll send you mine
I've just started on fcc so here are the first projects
Portfolio Page: https://codepen.io/mohsinhayat/full/XVqQyW/
Tribute Page: https://codepen.io/mohsinhayat/full/XVqMRv/
Eric Weiss
@eweiss17
Jan 12 2018 18:12
i sent u a message
Mohsin Hayat
@mohsinht
Jan 12 2018 18:12
yeah, received it
Eric Weiss
@eweiss17
Jan 12 2018 18:12
ok
Kaz Baig
@kbaig
Jan 12 2018 18:15
@mohsinht boom boom afridi WOOOO
Tom
@moT01
Jan 12 2018 18:15
@mohsinht tribute page looks real good - pictures dont show for me - little gray bar by the quote, i think it's sort of a default style for that element, could probly ignore it
Kaz Baig
@kbaig
Jan 12 2018 18:15
I had no idea Afridi was still playing lol
Mohsin Hayat
@mohsinht
Jan 12 2018 18:16
@kbaig yeah. I wanted to do something different
@kbaig if you read it whole, it is mentioned that he is retired now
Kaz Baig
@kbaig
Jan 12 2018 18:16
Oh derp he's not
Goes to show how in touch I am with my home country at this point lol
Mohsin Hayat
@mohsinht
Jan 12 2018 18:16
@moT01, I'm using imgur for the images
Tom
@moT01
Jan 12 2018 18:18
@mohsinht yea, i dont think codepen likes that for some reason
portfolio looks real good too
Stephen James
@sjames1958gm
Jan 12 2018 18:19
@fvdave2017 :+1:
Tom
@moT01
Jan 12 2018 18:19
some text by all the avatar's on a hover that isnt readable
Mohsin Hayat
@mohsinht
Jan 12 2018 18:19
do you see images on the page?
Stephen James
@sjames1958gm
Jan 12 2018 18:19
@fvdave2017 Suggestion: work on just one of the horse breeds first to get it working.
Kaz Baig
@kbaig
Jan 12 2018 18:19
Oh you go to FAST
Lahoris man
Mohsin Hayat
@mohsinht
Jan 12 2018 18:20
I've added images but they aren't shown
I'm using imgur.
Eric Weiss
@eweiss17
Jan 12 2018 18:20
403 error
Bjorn van de Peut
@bjorno43
Jan 12 2018 18:21
@mohsinht 403 = Forbidden. Which most likely means that IMGUR doesn't allow hotlinking
Mohsin Hayat
@mohsinht
Jan 12 2018 18:22
so, is there anyway I can host images for codepen?
@kbaig yeah I am. Where are you from?
Kaz Baig
@kbaig
Jan 12 2018 18:23
@mohsinht originally from Karachi but I left the country at age 12 :D
Bjorn van de Peut
@bjorno43
Jan 12 2018 18:23
Try uploading one on my server here: http://home.icecub.nl/ImageSecure and use the link in your img element. See if that works
Bjorn van de Peut
@bjorno43
Jan 12 2018 18:24
@kbaig Woops, my bad: http://home.icecub.nl/ImageUpload/
Mohsin Hayat
@mohsinht
Jan 12 2018 18:24
@bjorno43 thanks, but I'm getting error
CamperBot
@camperbot
Jan 12 2018 18:24
mohsinht sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 185 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Bjorn van de Peut
@bjorno43
Jan 12 2018 18:24
Ye wrong url xD
It's just to test if works though! I can't garantuee uptime on that server yet
Lean Junio
@leanjunio
Jan 12 2018 18:26
@leanjunio
Hey guys, do you guys know how to do an http request to a local json file containg an array of objects from the same directory?
Angular 1.6.4 is the version.
Tom
@moT01
Jan 12 2018 18:34
i think you can just request it like you would any other file - not sure if angular has something built in for that
Scott Lieber
@lieberscott
Jan 12 2018 18:38
Hey guys, going through the React challenges on the beta site. Stuck at React: Write a Simple Counter (https://beta.freecodecamp.org/en/challenges/react/write-a-simple-counter). Can't figure out how to do this. Here's a link to a JSFiddle with the equivalent of my code (https://jsfiddle.net/reactjs/69z2wepo/). Can someone explain how to pass this challenge?
Kaz Baig
@kbaig
Jan 12 2018 18:41
@lieberscott the fiddle is throwing an error
Rocky-Balboa
@Rocky-Balboa
Jan 12 2018 18:41
hello guys, i made my first website, can u give me any feedback?
Scott Lieber
@lieberscott
Jan 12 2018 18:42
Here's a Codepen equivalent, maybe this will work: https://codepen.io/lieberscott/pen/JMZbQM
all i changed was the ReactDOM.render call at the bottom to render the component, so your code is right
Tom
@moT01
Jan 12 2018 18:45
@Rocky-Balboa looks great - the nav bar gets too tall on a mid-sized window
Kaz Baig
@kbaig
Jan 12 2018 18:46
@lieberscott Could just be bugs in the tests. You can try the original location of the react section, where the tests work correctly http://hysterical-amusement.surge.sh/
Rocky-Balboa
@Rocky-Balboa
Jan 12 2018 18:46
@moT01 thanks, the nav bar was downloaded from somewhere i just customized it, i wanted hamburger menu but i dont speak java script yet, was learning flexbox doing that site :D
CamperBot
@camperbot
Jan 12 2018 18:46
rocky-balboa sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 956 | @mot01 |http://www.freecodecamp.org/mot01
Tom
@moT01
Jan 12 2018 18:48
@Rocky-Balboa it turns hamburger when it gets smaller
Rocky-Balboa
@Rocky-Balboa
Jan 12 2018 18:49
@moT01 yeah i mean i downloaded it jus to have hamburger :D but i dont understand how to change it yet. thanks for feedback, i will do another project soon :)
CamperBot
@camperbot
Jan 12 2018 18:49
api offline
rocky-balboa sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
Rocky-Balboa
@Rocky-Balboa
Jan 12 2018 18:50
@moT01 is it worth to go like html css flexbox > bootstrap > and then java script etc?
Tom
@moT01
Jan 12 2018 18:50
what do you mean worth
Mohsin Hayat
@mohsinht
Jan 12 2018 18:51
I need feedback for these pages:
Portfolio Page: https://codepen.io/mohsinhayat/full/XVqQyW/
Tribute Page: https://codepen.io/mohsinhayat/full/XVqMRv/
Eric Weiss
@eweiss17
Jan 12 2018 18:51
flexbox is just apart of css, you can learn them together
Mohsin Hayat
@mohsinht
Jan 12 2018 18:52
I've fixed the image error I was having
Eric Weiss
@eweiss17
Jan 12 2018 18:52
ya looks good now
Mohsin Hayat
@mohsinht
Jan 12 2018 18:53
thanks @eweiss17 :)
CamperBot
@camperbot
Jan 12 2018 18:53
mohsinht sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 602 | @eweiss17 |http://www.freecodecamp.org/eweiss17
Scott Lieber
@lieberscott
Jan 12 2018 18:55
@kbaig Thank you!
CamperBot
@camperbot
Jan 12 2018 18:55
lieberscott sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 520 | @kbaig |http://www.freecodecamp.org/kbaig
Eric Weiss
@eweiss17
Jan 12 2018 19:08
I want me landing content to take up 100% of the screen (height 100vh), but it is absolutely killing my mobile responsiveness, advise on this?
Bjorn van de Peut
@bjorno43
Jan 12 2018 19:18
@eweiss17 Ye. Use media queries. Like: @media only screen and (max-width: 500px) { <-- any screen below 500px width and set the height differently
Eric Weiss
@eweiss17
Jan 12 2018 19:26
@bjorno43 thanks, i think i got the sweet spot at 800 px
CamperBot
@camperbot
Jan 12 2018 19:26
eweiss17 sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 186 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Bjorn van de Peut
@bjorno43
Jan 12 2018 19:27
You're welcome :)
Riadh
@KWFE
Jan 12 2018 20:19
hey
Juan Marin
@JuanMP429
Jan 12 2018 20:19
sup
guys what programs do you guys recommend me to start my web page
what programs can i use
I am a beginner programmer
Ronald Ceballos
@Ronald03
Jan 12 2018 20:21
program?? do you mean which code editor?
Juan Marin
@JuanMP429
Jan 12 2018 20:21
yeahhh i guess lol
idk how to call them
Roman Struna
@RomchyFCC
Jan 12 2018 20:21
@JuanMP429 avoid general question like these for one, or you will suffer information overflow quite quickly, you will need a text editor of sorts: everyone recommends sublime text or atom because of the custimizability and because they aren't command line based
that will be enough to get you through anything related to HTML5, CSS3 and or JavaScript
you might also want to dive into version control: Git, github
and you onjly need an accoutn for that
no software theoreticly needed, thought it would be better
my personal choice is git bash....and with both of these programs you are ready to tackle any offline problem you face and share to github for questions on how to proceed
Ronald Ceballos
@Ronald03
Jan 12 2018 20:23
Oh ok, by what I've seen Atom and Sublime are the top to choose from, I Personally use Sublime. Notepad++ is good too, so use the one you like more
Kaz Baig
@kbaig
Jan 12 2018 20:26
Don't forget VSCode
Ronald Ceballos
@Ronald03
Jan 12 2018 20:29
@JuanMP429 My advise... Do not waste too much time deciding which editor, pick one of the most common and start working on what you want!
Aditya
@ezioda004
Jan 12 2018 20:36
I second VS code
Juan Marin
@JuanMP429
Jan 12 2018 20:39
WHich one is the most common?
Kaz Baig
@kbaig
Jan 12 2018 20:40
Prob relatively even between Atom, VSCode, Sublime
Juan Marin
@JuanMP429
Jan 12 2018 20:41
ok thank you @kbaig
CamperBot
@camperbot
Jan 12 2018 20:41
juanmp429 sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 522 | @kbaig |http://www.freecodecamp.org/kbaig
Tom
@moT01
Jan 12 2018 20:41
brackets is good too
Juan Marin
@JuanMP429
Jan 12 2018 20:41
thank you @Ronald03
CamperBot
@camperbot
Jan 12 2018 20:41
juanmp429 sends brownie points to @ronald03 :sparkles: :thumbsup: :sparkles:
:cookie: 319 | @ronald03 |http://www.freecodecamp.org/ronald03
Juan Marin
@JuanMP429
Jan 12 2018 20:41
thank you @RomchyFCC
CamperBot
@camperbot
Jan 12 2018 20:41
juanmp429 sends brownie points to @romchyfcc :sparkles: :thumbsup: :sparkles:
:cookie: 262 | @romchyfcc |http://www.freecodecamp.org/romchyfcc
Juan Marin
@JuanMP429
Jan 12 2018 20:41
thank you @ezioda004
CamperBot
@camperbot
Jan 12 2018 20:41
juanmp429 sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 378 | @ezioda004 |http://www.freecodecamp.org/ezioda004
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 21:46
can any one help me with semantic ui responsive grid
any one out there
Ian
@Naiguy1
Jan 12 2018 21:49
I am having a little trouble with being able to factorialize a number, does anyone know what I did wrong?
function factorialize(num) {
return num;
}
var factorialize = 1 2 3 4 5 == num;
var factorialize(5);
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 21:50
@Naiguy1 can u help me out
Ian
@Naiguy1
Jan 12 2018 21:54
I don't even know what Semantic ui responsive grid is. Sorry, I wish I could help.
SAURABH SHEORAIN
@SSheorain
Jan 12 2018 21:54
ok
Kris Baillargeon
@krisb1220
Jan 12 2018 22:36
@Naiguy1 I would redo the lessons on beginner JS
Garrus Napp
@GarrusNapp
Jan 12 2018 22:43
@Naiguy1 u got it?