These are chat archives for FreeCodeCamp/HelpFrontEnd

25th
Dec 2017
SakisBal
@SakisBal
Dec 25 2017 00:02
well i was doing quick in the start and the tempo has been dropping hard on the ntermediate scripting challenged
Jarrod
@Demonico
Dec 25 2017 00:03
it was the same for me
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:03
Is anyone here good with haml?
Nick Karnik
@theoutlander
Dec 25 2017 00:12
what o you need @CherryPlaysRoblox1
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:12
How do you do if and else statements in haml
SakisBal
@SakisBal
Dec 25 2017 00:12
@Demonico indeed, really a lot of troobleshooting
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:12
Because I did this
-if model_signed_in?
     %button= link_to "New Note", new_note_path
-else
     %button= link_to "Sign Up", new_model_registration_path

But it says: Inconsistent indentation: "\t " used for indentation, but the rest of the document was indented using 1 tab.

I want to make it so that if the user is signed in, the button is new note, but if they aren't, then it says sign up.

SakisBal
@SakisBal
Dec 25 2017 00:13
erros appear from everywhere :p
Nick Karnik
@theoutlander
Dec 25 2017 00:21
@CherryPlaysRoblox1 I think you might need a space - if
between - and if or - and else
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:21
Yeah.
I got another error
Nick Karnik
@theoutlander
Dec 25 2017 00:21
I believe HAML is indentation based
is the doc not helpful?
why did you choose HAML?
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:21
#banner
    .banner_content
        %h1 NoteIt
        %p Your online notebook. Never forget an idea again.

- if model_signed_in?
  = link_to 'New Notes', new_note_path
- else
  = link_to 'Sign Up', new_model_registration_path
I'm following a yt video and it chose haml
Haml is indentation based
Nick Karnik
@theoutlander
Dec 25 2017 00:22
is this using ror ?
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:22
Yep
Nick Karnik
@theoutlander
Dec 25 2017 00:22
or js ?
hmm …
Henry
@GitHub-Henry
Dec 25 2017 00:27
@CherryPlaysRoblox1 you may find this interesting, or not https://stackshare.io/stackups/haml-vs-pug
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:27
Okay
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:35
The thing isn't working though
Ghost
@ghost~56bd2077e610378809c105cd
Dec 25 2017 00:46
thanks @CherryPlaysRoblox1
CamperBot
@camperbot
Dec 25 2017 00:46
rogue00 sends brownie points to @cherryplaysroblox1 :sparkles: :thumbsup: :sparkles:
:cookie: 278 | @cherryplaysroblox1 |http://www.freecodecamp.org/cherryplaysroblox1
Ghost
@ghost~56bd2077e610378809c105cd
Dec 25 2017 00:46
:)
SakisBal
@SakisBal
Dec 25 2017 00:46

anyone knows how we can access the second argument of a function like this

function example1()(){
}
example1(4)(1)

i know i can access arguments by simply using arguments but this works only for an argument in the 1st closures

CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:46
Huh?
@Rogue00
Ghost
@ghost~56bd2077e610378809c105cd
Dec 25 2017 00:47
i showed my finished tic tac toe a while ago...i think you said it was nice..i was out and just getting back in.
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 00:49
Oh right
Sorin Ruse
@sorinr
Dec 25 2017 01:05
@Rogue00 :+1: nice job
Ghost
@ghost~56bd2077e610378809c105cd
Dec 25 2017 01:06
heys and thank you @sorinr :)
CamperBot
@camperbot
Dec 25 2017 01:06
rogue00 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1377 | @sorinr |http://www.freecodecamp.org/sorinr
Sorin Ruse
@sorinr
Dec 25 2017 01:11
@Rogue00 welcome. i would only try to cache all the document.getElementById into vars
Ghost
@ghost~56bd2077e610378809c105cd
Dec 25 2017 01:11
yes...it could be cleaned up a bit. I'm pleased to have it working..it took a lot to get there..
Sorin Ruse
@sorinr
Dec 25 2017 01:13
@Rogue00 and eventually put all msgs into an unique json var and retrieve them from it
Ghost
@ghost~56bd2077e610378809c105cd
Dec 25 2017 01:13
:+1:
that makes sense.
one of the things i plan to try to be learning soon is how to build api's
im trying to finish the front end curriculum before it changes
Sorin Ruse
@sorinr
Dec 25 2017 01:17
node or php as backend?
@Rogue00 if php as backend i would go for laravel
Ghost
@ghost~56bd2077e610378809c105cd
Dec 25 2017 01:23
node im planning
react and node seem to be the right track for me
all I have left to finish the front end are a few algorithms and the simon says game..
Sorin Ruse
@sorinr
Dec 25 2017 01:30
@Rogue00 if you planed for node take a look to adonis framework thats very similar to laravel
Ruben Abraham
@BuBBRBbr1
Dec 25 2017 01:48
Hi guys/gals. I need help to post a background cover for my personal portfolio. Any suggestions? When I post my url, nothing is popping up. I cannot seem to find the url to on Code pen.
Sorin Ruse
@sorinr
Dec 25 2017 02:05
@BuBBRBbr1 you may try upload it to http://tinypic.com/ and serve it from there
RCNPSHSKL
@RCNPSHSKL
Dec 25 2017 05:20
Hi! I just finished the Tribute Page project. Are we supposed to immediately move to the Personal Portfolio Webpage project without needing anything besides Html, css, bootstrap and jQuery? Sorry if this is a stupid question.
Tom
@moT01
Dec 25 2017 05:32
@RCNPSHSKL that's not a stupid question
i skipped it till much later
pretty much didnt do it till i was done with the front end
but if you want to do it - i would suggest to just make it kinda basic and get it done quick - you will learn a ton as you go through the projects and will want to change it later
RCNPSHSKL
@RCNPSHSKL
Dec 25 2017 05:34
Thank you. I looked at the example and felt a bit overwhelmed LOL. @moT01
CamperBot
@camperbot
Dec 25 2017 05:34
rcnpshskl sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 942 | @mot01 |http://www.freecodecamp.org/mot01
Tom
@moT01
Dec 25 2017 05:38
@RCNPSHSKL yea - that's a little misleading - most people probly wont be able to make it that nice at that point
hensn5250
@hensn5250
Dec 25 2017 05:46
anyone need help?
Shubham Sharma
@shubham1604
Dec 25 2017 07:38
Yes
It says on the official website of bootstrap that a jumbotron doesn't span the entire width of the screen by default. But I copied there code into my text editor and ran it. Guess what I found out? Its just that the div spans the full width by default. Hows that?
Kuda Bux
@kudabux
Dec 25 2017 07:49
Is your question how can you make a div span 100% of the page width?
Ken Haduch
@khaduch
Dec 25 2017 07:50
@shubham1604 - do you have a top-level <div class="container"> or <div class="container-fluid">` on your page? That might make a difference?
can you post a link to that page, is it bootstrap v3 or v4 documentation that you're looking at?
Kuda Bux
@kudabux
Dec 25 2017 07:51
https://www.w3schools.com/bootstrap/bootstrap_grid_system.asp
Take a look at this. Especially the section titled "Grid System Rules"
Ken Haduch
@khaduch
Dec 25 2017 07:57

@shubham1604 - looking at this page: https://getbootstrap.com/docs/4.0/components/jumbotron/ (if you're using V4) - it says that you can make a jumbotron full width by not including it in a container - To make the jumbotron full width, and without rounded corners, add the .jumbotron-fluid modifier class and add a .container or .container-fluid within.
But that is jumbotron-fluid and V4. There is different documentation for V3, but there were many changes from V3 to V4. On a V3 documentation page: https://getbootstrap.com/docs/3.3/components/#jumbotron - To make the jumbotron full width, and without rounded corners, place it outside all .containers and instead add a .container within.

So that's possible to have it be full width or not full width depending on the parent.

Spacetime
@justinemar
Dec 25 2017 08:17
Does firebase gets exposed globally when bundle? if so does that mean anyone can execute a command to delete my firebase database on the browser console?
Shubham Sharma
@shubham1604
Dec 25 2017 08:18
@khaduch I am using bootstrap 4. What I mean to ask is that the two snippets of code provided on the given link produce the same output i.e a full width jumbotron. So, whats the difference between the two?
@kudabux Thats not exactly my question.
primuscovenant
@primuscovenant
Dec 25 2017 12:27
@heroiczero thx
CamperBot
@camperbot
Dec 25 2017 12:27
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2116 | @heroiczero |http://www.freecodecamp.org/heroiczero
Rishi Speets
@RishiSpeets
Dec 25 2017 14:10

@justinemar If you're worried about global variables being exposed, you can always wrap your program in an IIFE. That way, your program variables will be enclosed in a child-environment of the global env.

I'm not sure about Firebase though :).

Ken Haduch
@khaduch
Dec 25 2017 14:43
@shubham1604 - it seems to be implied that one of them would be contained within a parent container div? There were a lot of changes in Bootstrap 4, that jumbotron-fluid is a new thing, for example? I would have to try their two examples and see for myself what was going on. Another thing to keep in mind is that Bootstrap 4 is still being developed, along with the documentation, so there might be changes that have not been fully tracked in the documents or the code?
Uros Tadic
@urketadic
Dec 25 2017 18:31
Ey guys who can help me with wordpress
Most of my articles are showing 100 words max for non logged users. I want 1 post to show more than that. How can i target it
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:32
Is it with HTML?
Uros Tadic
@urketadic
Dec 25 2017 18:33
I just set it with profile builder
plugin
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:33
Oh
Uros Tadic
@urketadic
Dec 25 2017 18:33
Max letters 100 for non logged users
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:33
Try and search it up
Stack overflow is a good one
Uros Tadic
@urketadic
Dec 25 2017 18:33
but there is no option to set max letters for single post
I always get downvoted on stackoverflow
They want you to post your code which is not possible in my situation
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:34
Oh
Uros Tadic
@urketadic
Dec 25 2017 18:34
But i was searching for it, this is my last resort
maybe i cant google
AbrisM
@AbrisM
Dec 25 2017 18:34
How so? Have you used pastebin before?
or Glitch?
StackOverflow is overan with that algorithmn voting system
Uros Tadic
@urketadic
Dec 25 2017 18:35
I dont have anything to paste
AbrisM
@AbrisM
Dec 25 2017 18:35
Not even by viewing the source on the page? :)
or screenshots?
Uros Tadic
@urketadic
Dec 25 2017 18:35
Yea this is somewhere in backend
php
I think i need to find this plugin that cuts letters for non logged users and make an exception for this post
find a pattern
CamperBot
@camperbot
Dec 25 2017 18:36
find a pattern
nothing found
Uros Tadic
@urketadic
Dec 25 2017 18:37
I havent slept in 24hr so i was hoping someone here could make it easier
Sorin Ruse
@sorinr
Dec 25 2017 18:37
@urketadic download wordpress localy on your computer and look through code to understand how it works. you will need also to install first some lamp, wamp, xampp server in order to run the php code of wordpress
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:37
What is wordpress?
The only wordpress I know is the blog one
AbrisM
@AbrisM
Dec 25 2017 18:37
Same
Sorin Ruse
@sorinr
Dec 25 2017 18:37
@CherryPlaysRoblox1 a php blog platform
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:38
Yeah lol I just googled searched it
ty
There might be some wordpress ones :)
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:39
I never liked php or java or jquery or any of those
Too complicated
Ror is easier
Can someone help me here
I got this website that let's you create notes, but if you make 2 or more (three shows best) the notes go out of order, but if you refresh the page it looks nice all of a sudden.
https://murmuring-sierra-53523.herokuapp.com/notes
Uros Tadic
@urketadic
Dec 25 2017 18:44
@CherryPlaysRoblox1 it doesnt let me create a note
error
check logs
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:44
Ok
Sorin Ruse
@sorinr
Dec 25 2017 18:44
@CherryPlaysRoblox1 its not the language itself its the learning curve. you will find variables, functions, conditional statements, etc in every language
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:45
Nah it just hurts my brain
I keep getting errors that my brother can't solve and it gets boring XD
@urketadic I checked logs how do I find an error
Sorin Ruse
@sorinr
Dec 25 2017 18:46
the programming principles are almost the same in every lang
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:46
I know
@urketadic You signed up right and then created a note?
Sorin Ruse
@sorinr
Dec 25 2017 18:51
@CherryPlaysRoblox1 your app is trying to reach the "/notes/new" route. are you sure your link reaches the server with that route and server knows what to serve back?
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 18:52
Yeah it works perfectly for me
Lemme recheck
It works fine for me
Sorin Ruse
@sorinr
Dec 25 2017 19:04
Capture.PNG
@CherryPlaysRoblox1 here what i get when not logged in and trying to reach that route
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 25 2017 19:05
Yeah you need to login.
I'll try and redirect so that it doesn't show that page.
Joseph A. Sangine
@HTML-joe
Dec 25 2017 19:14
For the weather project what it the temperature unit?
Is the data from the api kelvin?
Just trying to figure out what conversion I will need to make
Sorin Ruse
@sorinr
Dec 25 2017 19:18
@HTML-joe what api are u using?
Sorin Ruse
@sorinr
Dec 25 2017 19:29
@HTML-joe think is in C
Joseph A. Sangine
@HTML-joe
Dec 25 2017 19:31

lol whoops

function conversion (kelvin){

if (kelvin<=(0))
{return "Absolute Zero"}

else {return (( kelvin - 273.15) * 9/5) + 32}

}

conversion (1);

well theres the kelvin conversion if anyone finds it useful and thank you
@sorinr
CamperBot
@camperbot
Dec 25 2017 19:32
html-joe sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1378 | @sorinr |http://www.freecodecamp.org/sorinr
Sorin Ruse
@sorinr
Dec 25 2017 19:34
@HTML-joe welcome.its for sure C. checked with my own coordinates and the response temp is the one reported by other weather app :)
Joseph A. Sangine
@HTML-joe
Dec 25 2017 19:40

function conversion(cel){

if (cel>=9999999999)

{return "how is this even possible"}

else {return ((cel * (9/5)) + 32)}

}

conversion (2);

thats what I came up with to convert it
Sorin Ruse
@sorinr
Dec 25 2017 19:50
@HTML-joe no way. how did u get that 9999999999 value?
Amit Patel
@AmitP88
Dec 25 2017 19:59
hey guys, I'm currently learning react + redux atm and I was just wondering, for getting a first Front End Dev job, should I aim to eventually learn both React and Angular before applying for jobs? or should I choose to specialize in one or the other? (I would want to specialize in React + Redux since I'm already in the middle of learning it). Reason why I ask this is because I see a lot of job postings that mention both
Nick Karnik
@theoutlander
Dec 25 2017 20:03
@AmitP88 don’t bother with Angular ...
learn React and learn it very well
I would stay far away from Angular and subscribe to the React ecosystem
Amit Patel
@AmitP88
Dec 25 2017 20:04
@theoutlander thanks Nick :) I was thinking the same thing actually. I don't know why I still see Angular on a lot of job boards. probably for more experienced devs
CamperBot
@camperbot
Dec 25 2017 20:04
amitp88 sends brownie points to @theoutlander :sparkles: :thumbsup: :sparkles:
api offline
Amit Patel
@AmitP88
Dec 25 2017 20:06
my goal is to build 3 react + redux apps (with unit-tests n all) and 3 ES6 javascript apps (also with unit-tests). I'm already working on my first one. I'm hoping in 6 months I'll be job ready if I can reach this goal
Nick Karnik
@theoutlander
Dec 25 2017 20:08
You can combine ES6 and React
number of applications doesn’t translate to how well you will know it
Amit Patel
@AmitP88
Dec 25 2017 20:09
oh I know, but I also want to make sure that my JS skills are solid as well
Nick Karnik
@theoutlander
Dec 25 2017 20:10
React is JS
It’s a library built on top of JS
Amit Patel
@AmitP88
Dec 25 2017 20:10
I know. But I need to practice a lot with vanilla JS as well
I've practiced vanilla JS before, but I need to get good at it
Nick Karnik
@theoutlander
Dec 25 2017 20:18
ok
then do it
Amit Patel
@AmitP88
Dec 25 2017 20:20
will do. thanks for your input though. I really appreciate it
Jean Marco Romero
@volkranium
Dec 25 2017 20:35
what do you guys think about being language agnostic?
@AmitP88 Amit im at the same point where you are. But i dont know how to solidify my already aexisting JS Skills
Amit Patel
@AmitP88
Dec 25 2017 20:54
Jean, I don't know, but my plan is to also built 3 good apps using just es6 JS. After I have my 3 react and 3 js apps done, i'll focus on improving on algorithms and then hopefully i'll be ready for a junior position
Harry Fahringer III
@harryrf
Dec 25 2017 20:56
When using CSS grid and creating a horizontal nav bar, I see two ways of doing it; displaying as inline-block (as per the old way) or using div's nested in the nav tag. Any suggestions for creating a nested grid to display the nav bar using ul>li instead?
Or will I need to stick to the old way of doing horizontal navigation?
Nick Karnik
@theoutlander
Dec 25 2017 21:06
@volkranium what are you thinking?
The language agnostic aspect is mainly in computer science fundamentals around algorithms, data-structures, and design patterns.
That’s something you should definitely learn …
if you want to stand out from the rest and become a really good engineer