These are chat archives for FreeCodeCamp/HelpFrontEnd

15th
Nov 2017
Marius Nicolae
@bytao7mao
Nov 15 2017 00:00
yep... same
Hammad
@newnewb
Nov 15 2017 00:00
? what happened?
Marius Nicolae
@bytao7mao
Nov 15 2017 00:01
var ourRequest = new XMLHttpRequest();
ourRequest.open('GET', "https://www.erepublik.com/en/military/campaigns-new");
ourRequest.onload = function() {
  var x = Object.values(JSON.parse(ourRequest.responseText).battles);

  var c = Object.values(JSON.parse(ourRequest.responseText).countries);



  for (var i = 0; i < 2 ; i++) {
        if (x[i].inv.points > x[i].def.points && c[i]['id'] == x[i].inv['id']) {         
       console.log( "winnerID: " + x[i].inv.id  +"Country Winner is: " + c[i]['name'] + " Country KEY id is: " + c[i]['id'] + " Loser ID is:  " + x[i].def.id);

      } else if (x[i].inv.points === x[i].def.points) {
            console.log(" EQUAL" );
      } else {
           console.log("DEF WINS");
       }
  };
};
ourRequest.send();
nested the statement
but doesnt work neither with x[i].inv['id'] or x[i].inv.id
Moisés Man
@moigithub
Nov 15 2017 00:03
https://codepen.io/MMan/pen/xPLLKE?editors=1010 @bytao7mao
u need to console.log a lot to see if u accessing the correct object property
Marius Nicolae
@bytao7mao
Nov 15 2017 00:05
@moigithub man, you're a saviour ! Thank you so much !
CamperBot
@camperbot
Nov 15 2017 00:05
bytao7mao sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3711 | @moigithub |http://www.freecodecamp.org/moigithub
Hammad
@newnewb
Nov 15 2017 00:06
@moigithub the hero we need, but not the one we deserve!
Marius Nicolae
@bytao7mao
Nov 15 2017 00:06
@newnewb thank you too man for tips
CamperBot
@camperbot
Nov 15 2017 00:06
bytao7mao sends brownie points to @newnewb :sparkles: :thumbsup: :sparkles:
:cookie: 293 | @newnewb |http://www.freecodecamp.org/newnewb
Marius Nicolae
@bytao7mao
Nov 15 2017 00:07
i'll go to sleep now happy :)) bye seeya and happy coding if you're still staying up
harsh makadia
@harsh-makadia
Nov 15 2017 02:10
Is it ok to use objects without double quote?
For Eg- var myObj = { name:"Zed", age:21, car:null };
Dr-D-M
@Dr-D-M
Nov 15 2017 02:16
hello dear coders
abraham anak agung
@padunk
Nov 15 2017 02:16
@harsh-makadia quote is for string, if it was a number or boolean, you don't need quote
Dr-D-M
@Dr-D-M
Nov 15 2017 02:16
can somebody explain me how does the wikipedia APi:opensearch works?
Tom
@moT01
Nov 15 2017 02:16
@harsh-makadia you can use single or double quotes for strings - the keys dont need quotes though im pretty sure
Dr-D-M
@Dr-D-M
Nov 15 2017 02:17
I need to get the array for it in JSON and the call back, I read through the documentation but, I don't quite get it
Tom
@moT01
Nov 15 2017 02:17
so they must be treated as strings be default or something maybe
Dr-D-M
@Dr-D-M
Nov 15 2017 02:17
I wanna get the link to make the searcher works
and info from wikipedia, do you know anything about it? how can I get that?
abraham anak agung
@padunk
Nov 15 2017 02:22
Dr-D-M
@Dr-D-M
Nov 15 2017 02:22
yeah, I read that
but, my question is, I just need to add that link to the code and add the right arrays to make it work? or what should I do next? i don't quite get it
I've been struggling with this for about a day or so jaja
abraham anak agung
@padunk
Nov 15 2017 02:26
wikipedia has API sandbox where you could choose any option you want to return. Here is the api sandbox
Dr-D-M
@Dr-D-M
Nov 15 2017 02:29
then I make the request?
according to the option i want to return, is that correct?
abraham anak agung
@padunk
Nov 15 2017 02:33
yes, although the sandbox is quite confusing for the first time. Search it in youtube if you confuse how to play with it @Dr-D-M
@Dr-D-M here is a link for how to use it https://forum.freecodecamp.org/t/wikimedia-api-sandbox/145146
CamperBot
@camperbot
Nov 15 2017 02:51
:trollface: troll problems? notify admins here
Dr-D-M
@Dr-D-M
Nov 15 2017 03:28
@padunk thanks man
CamperBot
@camperbot
Nov 15 2017 03:28
dr-d-m sends brownie points to @padunk :sparkles: :thumbsup: :sparkles:
:cookie: 393 | @padunk |http://www.freecodecamp.org/padunk
abraham anak agung
@padunk
Nov 15 2017 03:38
@Dr-D-M your wellcome. do you get it?
Dr-D-M
@Dr-D-M
Nov 15 2017 03:41
I'm still clicking on it to get it right lol
I've been reading in forums and all and it seems like wikipedia API is a pain in the ass
abraham anak agung
@padunk
Nov 15 2017 03:50
yes it is :smile: happy coding
Dr-D-M
@Dr-D-M
Nov 15 2017 03:51
thank you lol
happy and frustrating coding
Dr-D-M
@Dr-D-M
Nov 15 2017 04:04
nop, Idon't get it
what do I have to write in the search parameter?...
I'm lost completely
abraham anak agung
@padunk
Nov 15 2017 04:52
@Dr-D-M your action should be query, and you could click action=query for more options
dinesh
@1532j0004kg
Nov 15 2017 04:54
where i can able to learn the api completely..?
Ken Haduch
@khaduch
Nov 15 2017 04:59

:point_up: November 14, 2017 3:01 AM @SL0TR - taking a look at your projects. I don't think that I saw the weather project, at least I don't remember seeing one that looked like this. Looks good - but the layout is very sensitive to the viewport height. Perhaps that is what you were referring to with your comment about mobile responsiveness. It looks good, though - one suggestion, on the conversion between F and C, it kind of makes sense to me if the wind speed is also converted from km/h to mi/h? A minor thing, though.

On the wikipedia viewer - I used one of my favorite search words - "potato" and it sort of looks like it didn't order the outputs according to relevance, but the more interesting thing is that each article had the same heading on it "Great Famine (Ireland)" which was also the top article in the list. That seems to hold true for any search - the same heading shows up on all of the articles that are shown. So it seems that the articles are not shown in order of relevance (I think you want to use the "index" value in the returned items) and the title is not being properly set for each article.

lucky2sachin
@lucky2sachin
Nov 15 2017 05:21
Hello :)
Isaiah Trembley
@IsaiahCT
Nov 15 2017 05:21
hey
Onome Sotu
@onomesotu
Nov 15 2017 05:49
Hey guys, can anyone help with media queries using sass?
I am using gulp as the build process, but whenever i try to compile the media query, it throws and error
Ever Lord
@ev3rlord
Nov 15 2017 06:02
@onomesotu Let me see your code
It's basically @media screen and (min-width: 500px)
something like that ^
Nazar
@IsaakNazar
Nov 15 2017 06:40
@moT01 thanx
CamperBot
@camperbot
Nov 15 2017 06:40
isaaknazar sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 902 | @mot01 |http://www.freecodecamp.org/mot01
Marius Nicolae
@bytao7mao
Nov 15 2017 07:16
Hello guys, any ideea about how to implement a searchBox based on user's returned text type ?
Markus Kiili
@Masd925
Nov 15 2017 07:19
@bytao7mao Try to explain it a little more.
Marius Nicolae
@bytao7mao
Nov 15 2017 07:38
@Masd925 i now have a statement that returns the winners and losers from a JSOn
each of them have an ID which is the same with the Country
well, i have to implement a searchBox, to return only that country with either the result winner or loser
Nazar
@IsaakNazar
Nov 15 2017 07:44
guys what do u think about design?
https://codepen.io/NazarIsaak/pen/rYwEjg
Sorin Ruse
@sorinr
Nov 15 2017 07:54
@bytao7mao i think you should have an array with the countries list and use it as an auto completion source for a search input field. you can get the countries list from your json response
@bytao7mao then based on your search input, filter your initial json data retreived from the api call and show only the results corresponding to the country id you have choosen
@bytao7mao suppose this is what you want to achieve
Jack Lyons
@JackEdwardLyons
Nov 15 2017 08:06
Hey guys does anyone have a set solution for solving Cross Origin errors?
Marius Nicolae
@bytao7mao
Nov 15 2017 08:06
yeah
Jack Lyons
@JackEdwardLyons
Nov 15 2017 08:06
Its so damn hard to access an API locally or from codepen
ive tried crossorigin.me but that doesn't work
Marius Nicolae
@bytao7mao
Nov 15 2017 08:07
@sorinr that is what i want to do, but still, how do i do that
Yashasvi
@TechMky
Nov 15 2017 08:09
Hi, every one. I just completed Weather app project and would really appreciate your feed backs.
Ever Lord
@ev3rlord
Nov 15 2017 08:19
@TechMky It looks really good the layout, icons, and font. However, I think you should get rid of the scrollbar by changing the height of the container but that's just me
Sorin Ruse
@sorinr
Nov 15 2017 08:22
@bytao7mao 1st. store your api json response into a variable(lets say you name it "myjson") for future use 2nd. use this var as the source for an auto completion input(see here some info) search field(from myjson you need the countries.id and countries.name) 3rd. filter mysjon.battles for countries.id corresponding to the country name in the input search field 4th. display the filtered result
Henry
@GitHub-Henry
Nov 15 2017 08:22
@TechMky i like it, even has responsive design
good job, :+1:
Yashasvi
@TechMky
Nov 15 2017 08:25
@GitHub-Henry thanks
CamperBot
@camperbot
Nov 15 2017 08:25
techmky sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 484 | @github-henry |http://www.freecodecamp.org/github-henry
Sorin Ruse
@sorinr
Nov 15 2017 08:25
@IsaakNazar see that you have to prevent default of form submission also when you click the search button not only when you hit enter in your input field
Yashasvi
@TechMky
Nov 15 2017 08:27
@sorinr I am a little unsure about how to do that. Even if I do it, would it mess up the layout and all? what if a user access this on a small screen?
Nazar
@IsaakNazar
Nov 15 2017 08:27
@sorinr ok thx
CamperBot
@camperbot
Nov 15 2017 08:27
isaaknazar sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1356 | @sorinr |http://www.freecodecamp.org/sorinr
Sorin Ruse
@sorinr
Nov 15 2017 08:43
@TechMky can you plz refresh my memory about your project
Deepak Manjunath
@Deepak2322
Nov 15 2017 08:44
_getAmount(amount, code) { if(amount) { code = code ? code : "USD"; return amount.toLocaleString('en-US', { style: 'currency', currency: code }); } return 0; }
i am using the to LocalString method for converting the currency. this return’s me some value like “$6,702.88”. How do i add space between the $ symbol and currency and make it look like this “$ 6,702.88"
Marius Nicolae
@bytao7mao
Nov 15 2017 08:46
@sorinr it is ok if i store the response in "winner" variable ?
because i have already a variable "winner" which store the conditions
into text
Seah Eng Chye
@Seahchye
Nov 15 2017 08:51
but how come there is a question in the url?
Tam Nguyen
@bankplank
Nov 15 2017 08:52
If memory serves me correctly
Sorin Ruse
@sorinr
Nov 15 2017 08:53
@bytao7mao the name of the variable is less important. important is to not override data already stored into that variable that you may still need in the future. it depends also if winner var is declared as an json object
Tam Nguyen
@bankplank
Nov 15 2017 08:53
The question mark is a callback
I remember reading something about that on the wikipedia api
Seah Eng Chye
@Seahchye
Nov 15 2017 08:56
hmm...I searched and it was mentioned that JQuery callback function look like this $(selector).hide(speed,callback);
Marius Nicolae
@bytao7mao
Nov 15 2017 08:57
@sorinr my json object is declared with "countries"
 let winner = '';
    if(inv.points > def.points){
      winner = countries[inv.id].name;
    } else if(inv.points === def.points){
      winner = 'TIE';
    } else {
      winner = countries[def.id].name;
    }
      data.append
Tam Nguyen
@bankplank
Nov 15 2017 08:59
@Seahchye yeah its just a callback for cross origin support
but that has nothing to do with jquery
Aslong as you can retrieve the data from the api, you are good to go
Yashasvi
@TechMky
Nov 15 2017 09:00
@sorinr I didn't get you
Aizaz Shahid
@aizazshahid
Nov 15 2017 09:01
@Seahchye Any method which passed as an argument of another function is called callback function / method.
Sorin Ruse
@sorinr
Nov 15 2017 09:03
@bytao7mao you cannot use countries and winner to store an json object as you declare them as string
@TechMky i don't recall what was about your question to remember my answer
Marius Nicolae
@bytao7mao
Nov 15 2017 09:11
@sorinr i create a different forEach then and store there?
depending on a similar if else condition?
Sorin Ruse
@sorinr
Nov 15 2017 09:15
@bytao7mao yes you can create a special function that will deal with the filtering and inside you can create new forEach to loop through the data
Seah Eng Chye
@Seahchye
Nov 15 2017 09:18
@bankplank @aizazshahid I see thanks!
CamperBot
@camperbot
Nov 15 2017 09:18
seahchye sends brownie points to @bankplank and @aizazshahid :sparkles: :thumbsup: :sparkles:
:cookie: 300 | @bankplank |http://www.freecodecamp.org/bankplank
:cookie: 732 | @aizazshahid |http://www.freecodecamp.org/aizazshahid
Marius Nicolae
@bytao7mao
Nov 15 2017 09:20
@sorinr allright thanks
Sorin Ruse
@sorinr
Nov 15 2017 09:24
@bytao7mao welcome. you can ask anytime if you need further help
Marius Nicolae
@bytao7mao
Nov 15 2017 09:32
:D
Sorin Ruse
@sorinr
Nov 15 2017 09:33
@IsaakNazar you just need this:
function wikiLoad(e){
  e.preventDefault();
Nazar
@IsaakNazar
Nov 15 2017 09:35
@sorinr its prevent from errors right?
Sorin Ruse
@sorinr
Nov 15 2017 09:36
@IsaakNazar its preventing the form submission that has no action declared
@IsaakNazar every button within your html <form></form> tags will try to submit the form and refresh its inputs
Nazar
@IsaakNazar
Nov 15 2017 09:38
@sorinr that is super useful, thanx for sharing :)
CamperBot
@camperbot
Nov 15 2017 09:38
isaaknazar sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1357 | @sorinr |http://www.freecodecamp.org/sorinr
Sorin Ruse
@sorinr
Nov 15 2017 09:39
@IsaakNazar welcome
Sorin Ruse
@sorinr
Nov 15 2017 09:46

@IsaakNazar be aware that you have to comment out your e.preventDefault() in here:

  if (e.keyCode == 13) {
    // e.preventDefault();
    wikiLoad();
  }

otherwise when you hit enter will not work anymore

@IsaakNazar with this little changes your project is :+1:
Nazar
@IsaakNazar
Nov 15 2017 09:51
@sorinr that's super nice, appreciate :+1:
I've never known preventdefault is so important
Sorin Ruse
@sorinr
Nov 15 2017 09:53
@IsaakNazar in case of forms it lets you deal your own way with data in that form. maybe you want some inputs validation, etc
Nazar
@IsaakNazar
Nov 15 2017 10:18
@sorinr on codepen random button doesnt work, but on local laptop it does
Yashasvi
@TechMky
Nov 15 2017 10:19
@sorinr nothing. Was just asking for the feed back.
Sorin Ruse
@sorinr
Nov 15 2017 10:19
@IsaakNazar for me its working and is opening new browser tab with a random article
Nazar
@IsaakNazar
Nov 15 2017 10:20
@sorinr ok
@sorinr the problem was popupBlocker extension for Chrome browser :)
Sorin Ruse
@sorinr
Nov 15 2017 10:23
@IsaakNazar good you found out :)
Marius Nicolae
@bytao7mao
Nov 15 2017 10:28
@sorinr how do i search by user input ?
if (Input.id === "France") {
return countries[def.id].name;
}
i dunno how to get what the user input in the search bar
Tiago Correia
@tiagocorreiaalmeida
Nov 15 2017 10:29
ele.val()
if you are using jquery will work
Marius Nicolae
@bytao7mao
Nov 15 2017 10:30
ele.val ?
wut
Long Nguyen
@longnt80
Nov 15 2017 10:32
@bytao7mao ele is the element
val() is the method
Sorin Ruse
@sorinr
Nov 15 2017 10:33
@bytao7mao
document.getElementById("myinputid").value
Marius Nicolae
@bytao7mao
Nov 15 2017 10:35
nice ! thanks @sorinr
CamperBot
@camperbot
Nov 15 2017 10:35
bytao7mao sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1358 | @sorinr |http://www.freecodecamp.org/sorinr
Marius Nicolae
@bytao7mao
Nov 15 2017 10:35
thanks @longnt80
CamperBot
@camperbot
Nov 15 2017 10:35
bytao7mao sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 670 | @longnt80 |http://www.freecodecamp.org/longnt80
Sorin Ruse
@sorinr
Nov 15 2017 10:37
@bytao7mao welcome
@bytao7mao val() function is when you are using jquery
Marius Nicolae
@bytao7mao
Nov 15 2017 10:43
i don't know where i am wrong
var inp = document.getElementById("ss").value;
  if (inp === countries[inv.id].name) {
      data.append(`
            <li>
               ${countries[inv.id].name}(${inv.points})
               vs. 
               ${countries[def.id].name}(${def.points}) 
               - 
               <strong>
                  WINNER: 
                  ${winner}
               </strong>
             </li> `);
      };
if i search for any Country it does'nt return anything
Sorin Ruse
@sorinr
Nov 15 2017 10:48
@bytao7mao you need to bind an event to the input changes like "keyup" to trigger when the input value is changing. then you check if the user hitted the enter key and then apply the filter
Marius Nicolae
@bytao7mao
Nov 15 2017 10:49
oh O_o
Sorin Ruse
@sorinr
Nov 15 2017 10:53
@bytao7mao you need something like: <input type="text" onkeyup="myFunction(e)"> and inside myFunction you place the code you mentioned above but be aware that the first line into the function to be e.preventDefault() to prevent your form submission
Marius Nicolae
@bytao7mao
Nov 15 2017 10:54
oh ok
where do i put this ? <input type="text" onkeyup="myFunction(e)">
html?
BuntyBru
@BuntyBru
Nov 15 2017 10:59

can we assign class to span
suppose

<p> My name is Charles <span class="wheelchair"> Xavier</span> and ..... </p>

Roge
@RogeMateos
Nov 15 2017 11:04
Hey guys i need some help with a newsletter
Markus Kiili
@Masd925
Nov 15 2017 11:06
@bytao7mao For detecting input element changes, one should not use keyboard events (because the user might be using for example speech recognition). You should use events like input, change, blur... depending on what functionality you need.
Marius Nicolae
@bytao7mao
Nov 15 2017 11:07
for now i need to finish by input
it's working but it seems i can't get the value and return it
Sorin Ruse
@sorinr
Nov 15 2017 11:31
@bytao7mao yes @Masd925 is right about the keyboard events. better to use onchange instead of onkeyup
@bytao7mao you can google for oninput vs onchange to find out witch one suits best your need
Ivona
@amaranthaST
Nov 15 2017 11:43

Hii everyone!

Could anyone help me with bootstrapping images in my pen, I tried several options but still images are not in a row (placeholders). Maybe I have some parent/child problem I can't see, help please? :smile:

https://codepen.io/amaranthaST/pen/OOgqNx

Sorin Ruse
@sorinr
Nov 15 2017 11:53
@amaranthaST you should add in pen settings->css bootstrap3 framework and to your column divs add col-md-6 class like: <div class="col-xs-12 col-md-6">
Daniel Romero
@Ranacode
Nov 15 2017 11:54
Hey guys I have one question
How can I markup the element matches on a regex expression on javascript?
Sorin Ruse
@sorinr
Nov 15 2017 11:54
@amaranthaST like here
Daniel Romero
@Ranacode
Nov 15 2017 11:55
I tried .exec that returns me an array of the matches but now I don't know how to manipulate the dom to markup that elements in my textarea
sorry markup is not the correct word
accentuate*
or highlight
Stephen James
@sjames1958gm
Nov 15 2017 12:06
I don't believe there is a way to give any special styling to values inside of a textarea
António Carvalho
@antoniomapc_twitter
Nov 15 2017 12:08
hello. any webpack expert?
Angelo
@TheCodingMeatball
Nov 15 2017 13:11
any idea of how I would embed html/css & javascript page links in my html ?
Onome Sotu
@onomesotu
Nov 15 2017 14:27
Good evening everyone
I have a sass problem
my sass media queries won't compile when i run it through gulp
it throws an error
even though I think i did everything according to the documentation
Any help will be appreciated on how to write the media query or find out the error
Tom
@moT01
Nov 15 2017 14:37
@onomesotu good morning
any luck?
A-J Roos
@Asjas
Nov 15 2017 14:38
@onomesotu can you post some of your @media queries? WIthout anything to look at. And perhaps your error message that gulp is giving you
@onomesotu Remember to format it with ``` so that it formats and is easier to read
Onome Sotu
@onomesotu
Nov 15 2017 14:40
Yes I am about to post it
A-J Roos
@Asjas
Nov 15 2017 14:40
Cool :)
Onome Sotu
@onomesotu
Nov 15 2017 14:40
$width-name: max-width;
$target-width: 320px;

@media screen and ($width-name : $target-width) {
  .form-inline .form-control
      display: inline-block;
}
A-J Roos
@Asjas
Nov 15 2017 14:41
Okay. You need { and } around display: inline-block as a quick note.
You start a .form-inline .form-control selector but there are no curly braces for the content
Onome Sotu
@onomesotu
Nov 15 2017 14:43
Selection_005.png
@Asjas noted.
It didn't work though
Gulp still throws the above error :(
Michiel
@MichielHuijse
Nov 15 2017 14:44
Hello can someone check why this function always returns false?
function truthCheck(collection, pre) {
  // Is everyone being true?

  // loop through collection in each argument:
  for (var i=0; i < (collection.length +1); ) {
  // check if the predicate is occuring:
    if (i == collection.length) {
      return true;
    }
    else if (i.hasOwnProperty(pre) ) {
      i++;
    } else
      return false;
    }
}

truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
A-J Roos
@Asjas
Nov 15 2017 14:45
@onomesotu The error is screen and ($width-name : $target-widht) { {. Is there two opening brackets? That will give you that err message
Tom
@moT01
Nov 15 2017 14:47
@MichielHuijse i see one issue right away
A-J Roos
@Asjas
Nov 15 2017 14:47
This is how the query should look
@media screen and ($width-name : $target-width) {
  .form-inline .form-control {
      display: inline-block;
  }
}
Onome Sotu
@onomesotu
Nov 15 2017 14:47
@Asjas I am as perplexed as you are... here is the entire sass code... only just one media query added :(
$font: 'Inconsolata', monospace;
$white: #fff;
$black: #000;
$yellow: #BB6614;
$uiColor: #a29896;
$footerHoover: #3176B1;
$placeholder: #66AFE9;
$rain: ('../pictures/Rain.jpg');
$snow: ('../pictures/Snow.jpg');
$thunderstorm: ('../pictures/Thunderstorm.jpg');
$snowfall: ('../pictures/Snow.jpg');
$clearsky: ('../pictures/Clear.jpg');
$cloudy: ('../pictures/Clouds.jpg');
$drizzle: ('../pictures/Drizzle.jpg');
$extreme: ('../pictures/Extreme.jpg');


html, body,
    margin : 0;
    padding: 0;

body 
    font: 100% $font;
    transition: background 1s linear;

.container 
    max-width: 1200px;

//HEADER
#header
    margin-bottom: 10px;

    h2
        text-align: center;
        font-size: 45px;
        color: $black;
        text-transform: uppercase;
        font-weight: bold;

    .search_form 
        margin: 0 auto; 
        text-align: center;

    #search
        height: 45px;
        &:focus 
            color: $placeholder;
            font-weight: bold;

    .btn 
        width: 120px;
        &:hover 
            background-color: $black;
            color: $white;
            box-shadow: 0 0 4px 2px rgba(0,0,0,0.3);
            transition: all .5s linear;

    .get_location
        width: 300px;

.ui-autocomplete
    background: rgba(0,0,0,0.3);
    opacity: 1; 
    color: $white;
    list-style-type: none;
    font-size: 16px;
    width: 100px;
    padding: 2px 5px 0;
    font-weight: bold;

//MAIN
#main 
    color: $white;

    .weather_main
        width: 40%;
        margin-top: 5em;
        opacity: 1;
        background: rgba(0,0,0,0.3);
        padding: 2em;
        border-radius: 5px;
        font-weight: bold;

    .weather_info
        width: 33%;
        margin-top: 2em;
        opacity: 1;
        background: rgba(0,0,0,0.3);
        font-size: 2em;
        padding: 2em;
        border-radius: 5px;
        font-weight: bold;
        float: right;

    h1
        font-size: 5em;
        font-weight: bold;

    h3
        font-weight: bold;
//FOOTER
#footer
    margin-top: 4em;
    text-align: center;
    font-size: 2.5em;
    color: $white;
    font-weight: bold;

    .footer__hover
        color: $white;
        &:hover
            color: $footerHoover;
            transition: all .5s linear;
            text-decoration: underline;
        &:visited
            text-decoration: none;


//MEDIA QUERIES

$width-name: max-width;
$target-width: 320px;

@media screen and ($width-name : $target-width) {
  .form-inline .form-control {
      display: inline-block;
  }
}
Tom
@moT01
Nov 15 2017 14:47
you're searching if (i.hasOwnProperty... @MichielHuijse
search collection[i]
A-J Roos
@Asjas
Nov 15 2017 14:48
@onomesotu Take out the curly brackets. The rest of your code doesn't have it meaning you are using the old SASS syntax style
That does not support curly brackets at all. SASS syntax works on whitespace indentation
Onome Sotu
@onomesotu
Nov 15 2017 14:49
@MichielHuijse it's collection[i] first of all
Michiel
@MichielHuijse
Nov 15 2017 14:49
@moT01 and @onomesotu thanks
CamperBot
@camperbot
Nov 15 2017 14:49
michielhuijse sends brownie points to @mot01 and @onomesotu :sparkles: :thumbsup: :sparkles:
:cookie: 903 | @mot01 |http://www.freecodecamp.org/mot01
:cookie: 292 | @onomesotu |http://www.freecodecamp.org/onomesotu
Onome Sotu
@onomesotu
Nov 15 2017 14:49
@Asjas trust me @Asjas i have tried that too :)
Tom
@moT01
Nov 15 2017 14:50
@MichielHuijse there's some other issues
Onome Sotu
@onomesotu
Nov 15 2017 14:51
@Asjas yesssssssss
it worked
thank you thank you :)
A-J Roos
@Asjas
Nov 15 2017 14:51
Pleasure :)
Tom
@moT01
Nov 15 2017 14:52
i dunno, that's not the format i would use or recommend - but it may work - a for loop typically looks like this...
for(var i=0; i<collection.length; i++) {   
    stuff here
}
Onome Sotu
@onomesotu
Nov 15 2017 14:52
@Asjas thanks so much
CamperBot
@camperbot
Nov 15 2017 14:52
onomesotu sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 285 | @asjas |http://www.freecodecamp.org/asjas
Onome Sotu
@onomesotu
Nov 15 2017 14:53
Yesterday my goal was to write media queries for weather app then move on to wikipedia viewer
but this problem occured..man was i depressed...
Tom
@moT01
Nov 15 2017 14:53
wont be the last time
Onome Sotu
@onomesotu
Nov 15 2017 14:54
There was no reference at to this problem on stackoverflow...made everything worse..
@moT01 loooool
I know what you mean man :)
by the way, sorry for the spam with my sass code
Michiel
@MichielHuijse
Nov 15 2017 15:02
@moT01 the third statement is optional in JS see:
https://www.w3schools.com/js/js_loop_for.asp
Tom
@moT01
Nov 15 2017 15:04
yes, you are right that you can put the i++ further down like you have it
did you change the test like we mentioned
function truthCheck(collection, pre) {
  // Is everyone being true?

  // loop through collection in each argument:
  for (var i=0; i < (collection.length +1); ) {
  // check if the predicate is occuring:
    if (i == collection.length) {
      return true;
    }
    else if (i.hasOwnProperty(pre) ) {
      i++;
    } else
      return false;
    }
}

truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
you probly dont need the +1 in the loop
Onome Sotu
@onomesotu
Nov 15 2017 15:07
@MichielHuijse what does the first if conditional do?
Tom
@moT01
Nov 15 2017 15:07
also - i dont recall the specifics of the challenge
but wouldn't you want to test if the collection doesn't have that property
Michiel
@MichielHuijse
Nov 15 2017 15:09
@onomesotu breaks the loop and returns true when all elements contain the predicatment.
Tom
@moT01
Nov 15 2017 15:10
oh, i guess you're way should work there
Michiel
@MichielHuijse
Nov 15 2017 15:10
@moT01, it should but does not :)
Tom
@moT01
Nov 15 2017 15:10
you might get an error or something before you can ever get to true
Onome Sotu
@onomesotu
Nov 15 2017 15:11
@MichielHuijse can you post your new code?
Tom
@moT01
Nov 15 2017 15:11
collection[i] wont exist for the last two tests
Michiel
@MichielHuijse
Nov 15 2017 15:11
function truthCheck(collection, pre) {
  // Is everyone being true?
// loop through collection in each argument:
  for (var i=0; i < (collection.length +1);) {
  // check if the predicate is occuring:
    if (i == collection.length) {
      return true;
    }
    else if (collection[i].hasOwnProperty(pre) ) {
      i++;
    } else
      return false;
    }
}

truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
Tom
@moT01
Nov 15 2017 15:12
index starts at 0
collection[0] ==tinky
collection[1] =dipsy
[2]=laalaa
[3] ===po
[4] === undefined
your i gets to 4
Onome Sotu
@onomesotu
Nov 15 2017 15:14
search until collection.length you don't need +1
Michiel
@MichielHuijse
Nov 15 2017 15:15
@moT01 yes, so than collection.length == i returns true
Tom
@moT01
Nov 15 2017 15:15
so you test collection[4].hasOwnProp and since it's undefined it goes to the false
Michiel
@MichielHuijse
Nov 15 2017 15:16
@moT01 but first it goes to: if (i == collection.length) {
return true;
}
Tom
@moT01
Nov 15 2017 15:16
hmm, you might be right there too
put some console logs in there
find out where it gets to
CamperBot
@camperbot
Nov 15 2017 15:16
find out where it gets to
nothing found
Michiel
@MichielHuijse
Nov 15 2017 15:18
@onomesotu why?
Onome Sotu
@onomesotu
Nov 15 2017 15:19
because, your array has 3 items
arrays are indexed from 0
if you go over the array length you'll return undefined
Tom
@moT01
Nov 15 2017 15:22
i made this quick to see where its going wrong
https://s.codepen.io/anon/pen/RjZXJB?editors=0012
Alexx Martínez
@AlexxMart
Nov 15 2017 15:22
I've been struggling a few days with this issue in the Pomodoro Clock challenge, when I click "reset" it returns everything to it's default values but then it doesn't let me change the time of the session or the break.
Onome Sotu
@onomesotu
Nov 15 2017 15:22
by the way, the challenge wants you to see if the second argument returns true
Michiel
@MichielHuijse
Nov 15 2017 15:26
@moT01 and @onomesotu it can be much simpler
Tom
@moT01
Nov 15 2017 15:27
did you check my example
your loop isnt working at all
not getting past the first iteration
Michiel
@MichielHuijse
Nov 15 2017 15:28
@moT01 checking now
Tom
@moT01
Nov 15 2017 15:29
yes, it can be simpler, so i dont know why your loop doesn't just look like 90% of the for loops ive ever seen
Michiel
@MichielHuijse
Nov 15 2017 15:30
@moT01 yes you are right.

function truthCheck(collection, pre) {
  // Is everyone being true?


  // loop through collection in each argument:
  for (var i=0; i < collection.length; i++) {
  // check if the predicate is occuring:
    if (collection[i].hasOwnProperty(pre)===false) {
      return false;
    }     
  }
  return true;
}

truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
something like this. will let you know if I solved it. Thanks for the help
Tom
@moT01
Nov 15 2017 15:32
although you are supposed to be able to increment in the loop like that - i am curious why it didnt continue
it was some missing curly brackets
all that, for a missing bracket
Tom
@moT01
Nov 15 2017 15:37
it does work when you fix that
Onome Sotu
@onomesotu
Nov 15 2017 15:37
@moT01
in the if statement
what will this return?
if(!collection[i].pre)
Ken Haduch
@khaduch
Nov 15 2017 15:39
@AlexxMart - it looks like it allows changing the time of the break, if I stop it just after a short run. But it is not updating the display when changing the time, but it seems to start at the new value (if I click "+" a few times, it seems to add minutes to the new starting value.)
Tom
@moT01
Nov 15 2017 15:39
@onomesotu i think that will check the value of the pre
if(collection[i].pre === false) is what that says
so in the first spot in the collection array
if('male' == false
which will evaluate to true
Ken Haduch
@khaduch
Nov 15 2017 15:40
@AlexxMart - actually, I just reloaded your pomodoro clock and it doesn't seem to be working at all. Are you editing it at this time?
Tom
@moT01
Nov 15 2017 15:40
i mean false
whoops
Alexx Martínez
@AlexxMart
Nov 15 2017 15:41
@khaduch Yes, just made a quick change right now
Michiel
@MichielHuijse
Nov 15 2017 15:42
@moT01 can you please paste the code?
Alexx Martínez
@AlexxMart
Nov 15 2017 15:43
@khaduch never mind, it didn't work
Michiel
@MichielHuijse
Nov 15 2017 15:43
@moT01 thank U
CamperBot
@camperbot
Nov 15 2017 15:43
michielhuijse sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
api offline
Tom
@moT01
Nov 15 2017 15:43
@MichielHuijse so it would have worked all along if we just caught that typo
Michiel
@MichielHuijse
Nov 15 2017 15:44
I solved it too in antother way :)

function truthCheck(collection, pre) {
  // Is everyone being true?


  // loop through collection in each argument:
  for (var i=0; i < collection.length; i++) {
  // check if the predicate is occuring:
    if (collection[i].hasOwnProperty(pre)===false | collection[i][pre]=== null | collection[i][pre] === undefined | collection[i][pre]=== 0 | collection[i][pre]!==collection[i][pre]  | collection[i][pre]=== "") {
      return false;
    }     
  }
  return true;
}

truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
Marius Nicolae
@bytao7mao
Nov 15 2017 15:44
hello guys, can someone help me in a JSON-API project to finish a filter statement ?
Tom
@moT01
Nov 15 2017 15:45
@bytao7mao
Michiel
@MichielHuijse
Nov 15 2017 15:46
@moT01 aaah damn... :worried: this is what I hate about coding hehehe..
Marius Nicolae
@bytao7mao
Nov 15 2017 15:46
@moT01 can you help ?
Tom
@moT01
Nov 15 2017 15:46
just ask
theres other people here too
someone can probly help
i can try
Michiel
@MichielHuijse
Nov 15 2017 15:47
Or it is something I need to improve myself :)
Markus Kiili
@Masd925
Nov 15 2017 15:47
@MichielHuijse Simple way to test if a property exists and property value is truthy is if(collection[i][pre]).
Ken Haduch
@khaduch
Nov 15 2017 15:48
@AlexxMart - I just reloaded. The first thing I see is that when I start it, it starts. When I stop it, the "Start" button is still disabled, so I cannot start it again. (Maybe you wanted it to work that way?) When I reset it, I can add minutes to the timer, but it doesn't display the change until I start the timer again.
Marius Nicolae
@bytao7mao
Nov 15 2017 15:48
i want to make a filter, when the user is searching for a country to return the ID from that country and if it is winner or loser from an API
the commented part of code returns a list with all countries and states if it is loser or winner
Michiel
@MichielHuijse
Nov 15 2017 15:49
@Masd925 thanks
CamperBot
@camperbot
Nov 15 2017 15:49
michielhuijse sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4572 | @masd925 |http://www.freecodecamp.org/masd925
Tom
@moT01
Nov 15 2017 15:50
@bytao7mao yea, i was helping yesterday
so when the user is searching - or after they search?
Marius Nicolae
@bytao7mao
Nov 15 2017 15:51
after they type: for example: France
to return only France
and say if it is a loser or winner
Tom
@moT01
Nov 15 2017 15:52
so if i recall it might look something like this...
Alexx Martínez
@AlexxMart
Nov 15 2017 15:53
@khaduch I made it so the start button gets enabled again, but it starts the counter from the original 25, and I can't still figure out why the timer doesn't change when I click "+" or "-" but the code is recognizing the change
Tom
@moT01
Nov 15 2017 15:53
var search = 'france' //or however you get this
results.countries.filter(country => country != search)
not exactly like that
but that will go through each country and filter anything not == search
you may need to play with it - since you're filtering a json response, not sure if you want to set a new var == to the filter
Marius Nicolae
@bytao7mao
Nov 15 2017 15:54
doesn't matter if it will do the job
Tom
@moT01
Nov 15 2017 15:55
and you need to check in the coutry for the name again
so country => country.name != search
i think something like that
Marius Nicolae
@bytao7mao
Nov 15 2017 15:55
i need to check to country ID to be equal to "def" id or "inv" id
and return it
but first , when i type something in the searchBox it doesnt return anything
for example this isn't working
var inp = document.querySelector("#ss").addEventListener("keyup", myFunction);
if (inp === "France") {
  document.write("<h1>Hello World!</h1><p>Have a nice day!</p>");
}
Tom
@moT01
Nov 15 2017 16:02
here's what i would type into google for that
javascript get input value
Kaz Baig
@kbaig
Nov 15 2017 16:06
How would I go about animating the sun path using css animations? http://speedrunchallenge.com/challenge/3
Isaiah Trembley
@IsaiahCT
Nov 15 2017 16:07
@keyframes
Kaz Baig
@kbaig
Nov 15 2017 16:08
Ya but what approach would I take to plot the movement
Tom
@moT01
Nov 15 2017 16:13
canvas?
Kaz Baig
@kbaig
Nov 15 2017 16:13
Gotta do it using just css
Tom
@moT01
Nov 15 2017 16:13
well, you need some html
canvas is html
Right but I'm trying to replicate the way they did it
Tom
@moT01
Nov 15 2017 16:18
im not quite sure
i can think of how to get it to go in an upside down v - looking at the code
but i need to add some arc somehow
Kaz Baig
@kbaig
Nov 15 2017 16:20
Yeah I read online how to animate orbits but struggling a bit to apply that to this particular case
Kaz Baig
@kbaig
Nov 15 2017 16:48
@moT01 got it working if you're curious :)
Roge
@RogeMateos
Nov 15 2017 16:54
hey hello i need some help with flexbox ,in the cards i am applying space between but not working http://www.rogemateos.com/flexbox/
Jaimus
@JVeeKay
Nov 15 2017 16:55
Hey guys!!!
Hows it going?
Hey Tom! Kaz! :)
Ken Haduch
@khaduch
Nov 15 2017 16:55
@AlexxMart - I think that you might have a problem when you run this line: work.text(timer.text() + ":" + sec.text());because your span with the id "work" is the parent of your span.timer and span.sec. At least I think that's one problem.
It is a good idea to keep your data storage in variables and not use DOM elements for storage of data - so you should have a variable in your JS for the time, and always manipulate that, and output it to the DOM as needed. Never try to read it back from the DOM or directly manipulate it there. It would simplify your code. That's the main thing I would say to focus on. Make sure that you don't clobber your HTML when writing values is the second thing - watch out for parent/child relationships and times when you might modify the parent without realizing that it affects the child elements.
Kaz Baig
@kbaig
Nov 15 2017 16:56
@RogeMateos What are you trying to achieve
Roge
@RogeMateos
Nov 15 2017 16:57
some space between the images
Kaz Baig
@kbaig
Nov 15 2017 16:57
Well there's no space available to put between the cards
Roge
@RogeMateos
Nov 15 2017 16:57
i tried to put less width but it doesnt work
Kaz Baig
@kbaig
Nov 15 2017 16:57
Because you set flex-grow to 1 for all the children
Roge
@RogeMateos
Nov 15 2017 16:58
so how can i make it with margins
using flex grow and space between
Kaz Baig
@kbaig
Nov 15 2017 17:01
tbh you probably just want to use grid for this
Tom
@moT01
Nov 15 2017 17:01
@JVeeKay hey
@kbaig that's a sneaky little trick there
Roge
@RogeMateos
Nov 15 2017 17:02
i bet there is a way to do it like this
no using a grid
Kaz Baig
@kbaig
Nov 15 2017 17:03
There's plenty of ways to do it but grid was created for situations where you need to specify layouts in two directions
which is what you're trying to do
Tom
@moT01
Nov 15 2017 17:03
could you maybe just set a maxwidth of like 25% on the images?
Roge
@RogeMateos
Nov 15 2017 17:04
let me check
please
Kaz Baig
@kbaig
Nov 15 2017 17:05
@moT01 ;)
Roge
@RogeMateos
Nov 15 2017 17:06
Screen Shot 2017-11-15 at 18.05.41.png
the only problem now is the right alnd left pictures are not align touching the conainer
Tom
@moT01
Nov 15 2017 17:06
did you find that somewhere? its clever, and not where i would have went
@kbaig
Roge
@RogeMateos
Nov 15 2017 17:07
space between not working that is the problem
Tom
@moT01
Nov 15 2017 17:10
yea, that's pretty coo
l
Roge
@RogeMateos
Nov 15 2017 17:10
Lera Verou is a genious
krj1
@krj1
Nov 15 2017 18:26
does anyone know good place to learn python ?
J. Hart
@JHart9
Nov 15 2017 18:43
Anyone working on the portfolio and find it generally hard to write an About section? Any advice on how to write something genuine while selling yourself well? Been stuck on what should be nothing much for days. 😖
Tiago Correia
@tiagocorreiaalmeida
Nov 15 2017 19:04
I made around 3 portfolios and I can tell you thtat's the hardest part of it :D
Harsh Chandra
@HarshHC
Nov 15 2017 19:18
hello
Can anyone help me a bit with CSS in my random quote machine? https://codepen.io/HarshHC/pen/vWyzOY
I wanna center it vertically and horizontally
Tam Nguyen
@bankplank
Nov 15 2017 19:24
@HarshHC are you using bootstrap?
To center the element vertically set
```
.parent {
  position: relative;
}
.child {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
Mantas Antanaitis
@mantaselk
Nov 15 2017 20:13
hello guys, I tried to figure (Basic Algorithm Scripting->Chunky Monkey) I might have created a infinite loop and now when I turn that page on it freezes after like 2 seconds, I tried to press clear the code but I cant do it. Do you know what to do?
Kaz Baig
@kbaig
Nov 15 2017 20:14
be sad and wait lmao
Alan
@aws0002
Nov 15 2017 20:23

Hey everyone, wondering if someone could clarify something for me. I'm on the arguments optional challenge of the intermediate algorithm scripting unit . I've got it to work but not in the way I wanted to. I have created a function that checks to see whether the argument is a number but my original solution didn't work.

original attempt was using isNaN which didn't work the third test case with the args (2, "3") returned '23'

var isNumber = function(num){
    return isNaN(num) ? undefined : num;       
 };

the solution i ended up using was

var isNumber = function(num){
    return typeof(num) === 'number' ? num : undefined;       
  };

why does isNaN() not provide the same result?

Harut
@harut-g
Nov 15 2017 20:25
Hello guys, who can help with with one challenge?
I have the users listing (user objects in array)
I have the facility address
And I receive data from back-end, it's a count of users with whom I have to generate the appointments list within one month
For example : Alex (name of user), alex@somewhere.com(email of user), Somewhere somewhere street 28(facility address), 10.07.2017 10 am (appointment start time) , 10.07.2017 11am (appointment end time)
I just can't imagine at this moment how I can implement it, I will be glad to any advice
Kaz Baig
@kbaig
Nov 15 2017 20:25
Marius Nicolae
@bytao7mao
Nov 15 2017 20:29
guys, can someone correct my code ? ... i'm really struggling for 2 days long, if i input a country which i already know that is a winner, it returns me the result of that country only once (with if statement), or infinite (with while loop), i just want to return by input-search only the country that i searched for but with all results(winner,loser,TIE)...
Alan
@aws0002
Nov 15 2017 20:35
@kbaig thanks! took my a while to understand what you were saying but now I get it.
CamperBot
@camperbot
Nov 15 2017 20:35
aws0002 sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 419 | @kbaig |http://www.freecodecamp.org/kbaig
Harut
@harut-g
Nov 15 2017 20:42
@bytao7mao can you please provide more details?
Marius Nicolae
@bytao7mao
Nov 15 2017 20:45
I have a big JSON - api with Battles (battles contain winners or losers with ID from country) and COuntries
when user is searching for a country
i want to return all results (winner loser etc) with only that country
when i search in this moment, with the code unchanged it give me only 1 result from that country
and only if it is a winner
Tom
@moT01
Nov 15 2017 20:58
someone gives a country name
use the name to get the id from the countries object
and display the wins and losses just like you did already
Marius Nicolae
@bytao7mao
Nov 15 2017 21:01
who ?
where i did already
Tom
@moT01
Nov 15 2017 21:04
you listed all the battles
cant you just put a clause in there after you find out the id
if id != to winner or id != loser
or something like that
probly == to winner/loser
try and break down the steps
Marius Nicolae
@bytao7mao
Nov 15 2017 21:06
please edit my code, and share it if you can
Tom
@moT01
Nov 15 2017 21:07
so what are you gonna do on the next project
Marius Nicolae
@bytao7mao
Nov 15 2017 21:08
no, because the user have to search by name, not by id
it's a challenge, not a real project
:|
Tom
@moT01
Nov 15 2017 21:09
right im trying to give you steps to get you to what you want
Marius Nicolae
@bytao7mao
Nov 15 2017 21:09
ok man, i really appreciate
Tom
@moT01
Nov 15 2017 21:09
but im not sure having me do the code is helping you much
get the search input
assign the input to a variable
use the variable to get the id from the countries object
assign the id to a variable
build the winner/loser list like you did before but only make an element if the winner or loser has the id
Marius Nicolae
@bytao7mao
Nov 15 2017 21:28
search input is targe.value
it makes no sense for me to assign into a variable
this is giving me only [objects] instead of id's
ocument.writeln(countries[inv.id]);
Ashish Belwal
@ashishbelwal
Nov 15 2017 21:30
return count + (count > 0 ? " Bet" : " Hold"); can some one explain this to me
Mantas Antanaitis
@mantaselk
Nov 15 2017 21:32
@ashishbelwal
if count < 0 = true then answer is count + "Bet"
if count < 0 = flase then answer is count + "Hold"
count > 0 *
Kaz Baig
@kbaig
Nov 15 2017 21:33
it's basically a quick if/else block
Ashish Belwal
@ashishbelwal
Nov 15 2017 21:33
@mantaselk i am confused because of "?"
Kaz Baig
@kbaig
Nov 15 2017 21:33
It's called a ternary operator
Ashish Belwal
@ashishbelwal
Nov 15 2017 21:33
@mantaselk thanx
CamperBot
@camperbot
Nov 15 2017 21:33
ashishbelwal sends brownie points to @mantaselk :sparkles: :thumbsup: :sparkles:
:cookie: 241 | @mantaselk |http://www.freecodecamp.org/mantaselk
Mantas Antanaitis
@mantaselk
Nov 15 2017 21:33
@ashishbelwal no probs
Kaz Baig
@kbaig
Nov 15 2017 21:34
statement ? if statement true : if statement false
Ashish Belwal
@ashishbelwal
Nov 15 2017 21:35
thanx @kbaig
Marius Nicolae
@bytao7mao
Nov 15 2017 21:47
why is this not working
not working.jpg
when i click it should change css property to visible right ?
Ken Haduch
@khaduch
Nov 15 2017 21:55
@bytao7mao - I don't think that there is a display: visible; - maybe display:blockor display: inline depending on what you want to do? You should be able to examine the element in the browser devtools and see if you're getting the CSS property changed?
Marius Nicolae
@bytao7mao
Nov 15 2017 21:58
yeah, with block it's working, what should i add to reverse the display on the next click ?
Ruben Abraham
@BuBBRBbr1
Nov 15 2017 22:13
blob
I need help with bootstrap. It is saying for the challenge that a thumbs up button needs to be nested in the like. I did that and nothing occurred.
Jason Luboff
@JLuboff
Nov 15 2017 22:15
@BuBBRBbr1 I'd have to double check... but most likely its due to your missing a - I'm guessing it should be fa fa-thumbs-up Also, you should immediately close your i element prior to the word Like
Ruben Abraham
@BuBBRBbr1
Nov 15 2017 22:16
OK. Thanks <JLuboff>.
Kris Baillargeon
@krisb1220
Nov 15 2017 22:48
Do I have to submit projects through codepen?
A-J Roos
@Asjas
Nov 15 2017 23:11
@krisb1220 Submit what projects?
Kris Baillargeon
@krisb1220
Nov 15 2017 23:19
@Asjas such as the Front-End dev projects. "Portfolio", "Tribute Page" or "Random Quote Generator"
Challenges that require you to submit a link to pass - do they have to be codepen links?
A-J Roos
@Asjas
Nov 15 2017 23:20
Yes. You submit codepen links
Kris Baillargeon
@krisb1220
Nov 15 2017 23:20
Okay. Thank you @Asjas
CamperBot
@camperbot
Nov 15 2017 23:20
krisb1220 sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 286 | @asjas |http://www.freecodecamp.org/asjas
juni
@junipberry
Nov 15 2017 23:24
Hey everyone, I have a general question. So I am using a full screen video background for a website made with codepen. But for that I need to upload my mp4 video to a host site. The video is very short, 13secs. Does anyone know where I can go to upload such a video? I would like to avoid youtube if possible. Thank you.
Kris Baillargeon
@krisb1220
Nov 15 2017 23:34
A-J Roos
@Asjas
Nov 15 2017 23:35
@junipberry Why not use github?
juni
@junipberry
Nov 15 2017 23:35
oh, I can upload videos on github?
A-J Roos
@Asjas
Nov 15 2017 23:35
Yup. Just tested it. Works.
juni
@junipberry
Nov 15 2017 23:36
I can upload a video there separate of a website?
A-J Roos
@Asjas
Nov 15 2017 23:36
Correct
Just make a blank repository and upload the file to it
juni
@junipberry
Nov 15 2017 23:37
cool, Ill try that
ty very much @Asjas
A-J Roos
@Asjas
Nov 15 2017 23:38
Just make sure you use the raw link. So once you uploaded it, click on the View Raw link to open it. You'll then see the normal github url change to raw.githubusercontent.com. Use that link. It works :)
juni
@junipberry
Nov 15 2017 23:38
perfect, ty so much
A-J Roos
@Asjas
Nov 15 2017 23:38
@junipberry NP :)
juni
@junipberry
Nov 15 2017 23:38
thank you @Asjas
CamperBot
@camperbot
Nov 15 2017 23:38
junipberry sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 287 | @asjas |http://www.freecodecamp.org/asjas
Xapuu
@Xapuu
Nov 15 2017 23:54
any React hero around ? this routes dont work right , https://pastebin.com/mTDqzk1f, after i login, a.k.a. the props.store.auth!===0 the paths '/me' and '/' Routes dosent work,
here is the repo https://github.com/Xapuu/Chirper, thanks in advance :)