These are chat archives for FreeCodeCamp/HelpFrontEnd

16th
Feb 2017
Bigyan Karki
@bigyankarki
Feb 16 2017 00:00
@SkyCoder01 how can we conduct JS meetup in NJ too?
Gulsvi
@gulsvi
Feb 16 2017 00:01
Hmm, I just searched on http://meetup.com, NJ is pretty big, there must be something there?
Maybe a local free code camp meetup too? I forget the link to those, will try to find it
Tony
@FreakishLancer
Feb 16 2017 00:05
The FreeCodeCamp meetup in my city is disbanding.....just before I even try to contact the organizer too. :(
Bigyan Karki
@bigyankarki
Feb 16 2017 00:08
@SkyCoder01 i have joined the group but its kinda inactive
Mac
@itchick85
Feb 16 2017 00:09
random question for portfolio does the navigation have to be across the top?
Finagl3
@Finagl3
Feb 16 2017 00:36
@itchick85 no, it can be on the bottom or the side. there just has to be a navigation bar
achudoz
@achudoz
Feb 16 2017 00:45
hi, I am doing the quote generator challenge and am having trouble with the API part. I managed to get a quote when I click my button, but I always get the same quote (though I get a different one when I try it on my phone...weird). do you know what is wrong with it?
http://codepen.io/achudoz/pen/YNgdMo?editors=1010
Ralph Nahra
@Rallph
Feb 16 2017 00:55
@achudoz it seems your API only returns one specific quote
achudoz
@achudoz
Feb 16 2017 00:57
@Rallph yeah, but I don't know why. I thought that it is because it is copied from the examle on the API website, and the [0] targets one specific quote. But why would then my phone display a different one. I am rather confused lol
David Radivojevic
@DavidRadivojevic
Feb 16 2017 01:03
@itchick85 it doesnt but think about you coming on a site you expect a navigation bar to be at the top right
its quite logical
Ralph Nahra
@Rallph
Feb 16 2017 01:04
@achudoz I'm not sure why it displays something different on your phone, but when I change the number in your API call (/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=) it returns more quotes, but does not include the original one. Also they do not seem to be random
@achudoz May I suggest a different API instead? The one that was recommended to me was this one http://forismatic.com/en/api/
achudoz
@achudoz
Feb 16 2017 01:09
@Rallph thanks, that is useful. I guess each number is assigned a different quote and could be randomized by a simple random number generator.
@Rallph oh yes please do!
@Rallph thanks
CamperBot
@camperbot
Feb 16 2017 01:12
achudoz sends brownie points to @rallph :sparkles: :thumbsup: :sparkles:
:cookie: 280 | @rallph |http://www.freecodecamp.com/rallph
Gulsvi
@gulsvi
Feb 16 2017 01:21
@achudoz If you look at the second code example in the documentation: https://quotesondesign.com/api-v4-0/
They use cache: false in their .ajax call. I don't know why they don't do the same for the $.getJSON code example, but if you add $.ajaxSetup({cache:false});, you should get a new quote every time.
achudoz
@achudoz
Feb 16 2017 01:27
@SkyCoder01 Oh god thank you! that one line fixed it perfectly. I however don't understand what it does lol
CamperBot
@camperbot
Feb 16 2017 01:27
achudoz sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 208 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 16 2017 01:28
Seems like it disables cache :)
Chiu
@yuchiu
Feb 16 2017 01:31
trying to change the innerHTML of tag p when the button is clicked, however it isnt working
can someone plz check the code and find the error http://codepen.io/yuchiu/pen/Lxaovp
achudoz
@achudoz
Feb 16 2017 01:34
@SkyCoder01 ha, I will just accept it as magic for now and move on. I am still pretty confused about the whole ajax/json stuff. That unit here just consists of saying "copy+paste this". It is unusual after the almost unnecessary HTML/CSS/jQuery fiddling in earlier units. Well, whatevs, I will figure it out with fiddling and reading now.
Thanks again for helping out!
CamperBot
@camperbot
Feb 16 2017 01:34
achudoz sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: achudoz already gave skycoder01 points
Gulsvi
@gulsvi
Feb 16 2017 01:38
@achudoz I just learned it all too. If you visit that link you use in your getJSON in your browser, you can see all the JSON. All that $.getJSON and $.ajax do is grab that data and let you use it. For example, in your code, it assigns all the JSON to the a variable function(a), then you can parse a to get what you want from it. Lots of magic I don't understand going on behind the scenes though, that's for sure :)
Kind of like a web scraper I guess, it visits the page, scrapes the data, and lets you consume it
Muhammad Muhktar Musa
@mcube25
Feb 16 2017 01:39
please can some one look up this code for me and tell me were its not working correctly my operator variable refuses to function well
var firstValue=-100,
secondValue=-100,
result,
operator=-100;
function onSelect(value){
if (firstValue===-100){
firstValue=value;
return;
}
if (operator===-100){
operator=value;
return;
}
secondValue=value;
result=firstValue+secondValue;
document.getElementById('answerInput').value= result;
document.getElementById('outPut').value=firstValue+'operator'+secondValue+'=';
switch (operator){
case "+":
result=firstValue + secondValue;
break;
case "-":
result=firstValue - secondValue;
break;
case "":
result=firstValue
secondValue;
break;
case "/":
result=firstValue / secondValue;
break;
}
}
Gulsvi
@gulsvi
Feb 16 2017 01:41
@yuchiu Minor error in your code, use document.getElementById for both and remove the #:
const btn = document.getElementById('btn');
const quote= document.getElementById('quote');
c0d0er2
@c0d0er2
Feb 16 2017 01:41

Can somebody please help me with Comparisons with the Logical And Operator in JavaScript? Here is my code:


  function testLogicalAnd(val) {

  // Only change code below this line

  if (val && 25) {
    if (val && 50) {
      return "Yes";
    }
  }

  // Only change code above this line

  return "No";
}

// Change this value to test

testLogicalAnd(10);

Also, here is the link: https://www.freecodecamp.com/challenges/comparisons-with-the-logical-and-operator

Chiu
@yuchiu
Feb 16 2017 01:42
@SkyCoder01 wow, it works now, awesome. thank you so much for your help
CamperBot
@camperbot
Feb 16 2017 01:42
yuchiu sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 209 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Chiu
@yuchiu
Feb 16 2017 01:47
@c0d0er2 you are suppose to combine the two seperate "if" statements into one
c0d0er2
@c0d0er2
Feb 16 2017 01:48
@yuchiu Ok
Chiu
@yuchiu
Feb 16 2017 01:48
if (val <=50) and if(val>=25) are two seperate "if " statements
try to use "&&" operator to combine both of them , theres an example in the instruction of the exercise
Muhammad Muhktar Musa
@mcube25
Feb 16 2017 01:53
y do my questions never get answered on this forum
frustrating
Chiu
@yuchiu
Feb 16 2017 01:59
@mcube25 paste the link of your excercise, it's very hard to read ur code like this without knowing what you are trying to do.
can anyone suggest me a neat way to animate the input field into the top after a user submits the input?
my var operator is saying undefined,i want to know what im not doing correctly
berndbausch
@berndbausch
Feb 16 2017 02:06
Trying to do the Wikipedia Viewer challenge. I submit the Wikipedia search string via getJSON, which fails. Why does it fail?
My test string is http://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=berlin. When I enter it in the browser, a nice JSON array is returned, as expected. I do notice that it becomes https; is that the problem?
I am successful with getJSON('http://api.openweathermap.org/data/2.5/weather.......") in the earlier Weather challenge.
berndbausch
@berndbausch
Feb 16 2017 02:19
@mcube25 An earlier question of mine got answered. Perhaps I can help you with your current problem? Although I am not really more advanced than you.
However I don't understand what the problem with your calculator is. When do you get an "undefined" error?
Muhammad Muhktar Musa
@mcube25
Feb 16 2017 02:21
i get an undefined error when i console.log(operator),when i do a sum i am supposed to get the symbol in my form output but it shows operator instead
MacGuffin
@MacGuffin1990
Feb 16 2017 02:22
hello everyone i'am doing the simon's game ,i met a problem ,when i click the div then two targets happened ,can someone tell me where i make a mistake
Muhammad Muhktar Musa
@mcube25
Feb 16 2017 02:23
e.g im supposed to have 1 +1= not 1 operator 1=
Gulsvi
@gulsvi
Feb 16 2017 02:27
@berndbausch Do you know how to view the browser console for errors?
berndbausch
@berndbausch
Feb 16 2017 02:27

@mcube25 Your code line

document.getElementById('outPut').value=firstValue+'operator'+secondValue+'=';

outputs the string "operator"

@SkyCoder01 Hey good morning (or evening). I can open the console but don't see any errors. I do see all my console.log() messages.
@mcube25 Also, you have switch(operator). But "operator" is an array, not a string.
Gulsvi
@gulsvi
Feb 16 2017 02:29
@berndbausch The browser console is different from the one in codepen (just to make sure)
berndbausch
@berndbausch
Feb 16 2017 02:31
@SkyCoder01 I mean the codepen console.
Well, I used $.ajax() instead of getJSON and did see that there was an error. The error message was empty, though. This is expected, it seems, in the case of cross-origin access.
Gulsvi
@gulsvi
Feb 16 2017 02:31
I would say how to open it but I think it depends on the browser. For me, I press F12 and then press the "console" button in the window that comes up. You are probably getting an error about cross-origin requests with your Wikipedia URL, but it might also be an issue HTTP/HTTPS mixed content
berndbausch
@berndbausch
Feb 16 2017 02:32
@SkyCoder01 yes I know how to open the debugger (I use Firefox most of the time) and the console.
@SkyCoder01 When I access the openweathermap, it's cross-origin as well, but there is no error.
Gulsvi
@gulsvi
Feb 16 2017 02:32
Okay, if you aren't seeing any errors then, maybe you can share your codepen? I can try to take a closer look - I also used opensearch for my wikipedia project
berndbausch
@berndbausch
Feb 16 2017 02:33
So, is it the https that hurts me here?
Gulsvi
@gulsvi
Feb 16 2017 02:33
It wouldn't hurt to try changing it
If you can use HTTPS, always use it.
berndbausch
@berndbausch
Feb 16 2017 02:33
Both protocols cause the error.
Anyway, let's see if the browser console says something.
berndbausch
@berndbausch
Feb 16 2017 02:39
@SkyCoder01 no error message about http, https or cross-origin in the browser console.
Gulsvi
@gulsvi
Feb 16 2017 02:40
@berndbausch Hmm, I'm happier to take a closer look and see if I can help debug it. Do you have a codepen URL?
berndbausch
@berndbausch
Feb 16 2017 02:41
@SkyCoder01 Thanks in advance :) My Wikipedia codepen is https://codepen.io/berndbausch/pen/BpMPXB, but let me make a stripped-down version
Gulsvi
@gulsvi
Feb 16 2017 02:45

@berndbausch I see what's happening, with a form, you have to use event.preventDefault() to submit the information.

  $("#searchform").submit(function(event){
    event.preventDefault();

After adding that, I get a cross-origin error.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=test. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

I had the same problem and found this stack overflow talking about it: http://stackoverflow.com/questions/23952045/wikipedia-api-cross-origin-requests
The simple fix is to add &origin=* to your URL
berndbausch
@berndbausch
Feb 16 2017 02:48
@SkyCoder01 I have to say that this is way over my head :) OK many many thanks again.
CamperBot
@camperbot
Feb 16 2017 02:48
berndbausch sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 210 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 16 2017 02:48
I don't fully understand it either - just know the fix lol
berndbausch
@berndbausch
Feb 16 2017 02:49
@SkyCoder01 Well, you seem to be better at finding solutions by googling. I will stay close to you from now on :)
Muhammad Muhktar Musa
@mcube25
Feb 16 2017 02:53
so any suggestions
berndbausch
@berndbausch
Feb 16 2017 02:55
@mcube25 I am not yet at this challenge, so I don't quite understand how the button presses are converted to numbers and operators. Something is wrong with your logic to obtain the operator value.
Gulsvi
@gulsvi
Feb 16 2017 02:55
@mcube25 I haven't done the calculator yet, but the color of your first two variables are different
Put a space between your = signs and they go to the normal color for me
That may be part of the problem...
berndbausch
@berndbausch
Feb 16 2017 02:56

@mcube25 You do

if (operator===-100){
  operator=value;

I think you need to correct that, but I wouldn't know what's wrong and how to make it right.

@mcube25 Other than that snippet, you never set the operator.
@mcube25 So you initialize operator as an array, then you test it for -100 (it is never -100, since it's an array), and only if it's -100 you set it to a value. You need to rework this logic.
fuscobite
@fuscobite
Feb 16 2017 03:21
Heya -- Good Evening from Brooklyn -- I just submitted my "Tribute Page". What's the deal? Does it go off to die? Will there be any follow-up on whether my html skills were crap or decent or any corrections? Sorry if this was mentioned in the directions.
berndbausch
@berndbausch
Feb 16 2017 03:22
@fuscobite Your internet identities will be wiped out if it's not good.
@fuscobite But seriously, you just complete it for yourself and don't cheat when clicking "I completed the challenge".
@fuscobite You can also show it off here and ask for comments. I didn't, because mine is too ugly.
@fuscobite And good afternoon from Tokyo :)
fuscobite
@fuscobite
Feb 16 2017 03:24
@berndbausch Thanks you! I am more concerned about ugly, sloppy coding -- but OK! Will show. TY.
CamperBot
@camperbot
Feb 16 2017 03:24
fuscobite sends brownie points to @berndbausch :sparkles: :thumbsup: :sparkles:
:cookie: 4 | @berndbausch |http://www.freecodecamp.com/berndbausch
fuscobite
@fuscobite
Feb 16 2017 03:31
Here is my "tribute" -- not so concerned about the content or terrible spelling as I banged this out -- but any thoughts on the commands would be very much appreciated.https://codepen.io/Fuscobite/pen/rjRPzQ
berndbausch
@berndbausch
Feb 16 2017 03:55
@fuscobite I know why I didn't publish mine. Your's just too pretty.
why is navbar-fixed-top not working?
Ken Haduch
@khaduch
Feb 16 2017 05:01
@bigyankarki - just dropping in, since your post is the last one there, have you removed the navbar-fixed-top?
@bigyankarki - hmmm - I see that if you add it, it seems to make the search box disappear? Or not be displayed properly, was that the problem?
Bigyan Karki
@bigyankarki
Feb 16 2017 05:05
yup
exactly @khaduch
Ken Haduch
@khaduch
Feb 16 2017 05:06
@bigyankarki - it makes the search bar hidden behind the navbar. I think that if you add padding-top: 100px or something about that size to the body, it would work?
Bigyan Karki
@bigyankarki
Feb 16 2017 05:07
if i add padding to search?
Ken Haduch
@khaduch
Feb 16 2017 05:07
@bigyankarki - it's a problem that pops up with the fixed navbar being positioned at the top and things "scroll" under it? I added it to the body CSS selector.
you might have to play with the value, but it brings the search bar down into the viewing area.
Bigyan Karki
@bigyankarki
Feb 16 2017 05:09
so do i have to add padding to inputField @khaduch ?
Ken Haduch
@khaduch
Feb 16 2017 05:10

@bigyankarki - one thing that I think you have happening, besides that fixed navbar, is that you are displaying the search results in reverse order. The closest hit on the search is at the bottom.

I did this in the CSS panel:

body {
font-family: 'Julius Sans One', sans-serif;
  padding-top: 100px;
}

You can probably add it in different places and get the same effect.

Bigyan Karki
@bigyankarki
Feb 16 2017 05:10
oh wow
@khaduch the easier waya was just to increase margin
i increased it to 100
and it worked :D
thank you for suggestion
Ken Haduch
@khaduch
Feb 16 2017 05:11
@bigyankarki - sure, probably several ways to do it - margin works, too.. The search results scroll under the navbar
@bigyankarki - you're welcome...
Bigyan Karki
@bigyankarki
Feb 16 2017 05:11
yup that is what I wanted to happen :)
@khaduch what do you mean by search result is displayed in reverse order?
Ken Haduch
@khaduch
Feb 16 2017 05:13
@bigyankarki - great - it looks nice.
I search for "potato", and the first result for the vegetable is at the bottom of the list. I kind of expect that to be at the top?
Bigyan Karki
@bigyankarki
Feb 16 2017 05:13
umm
Ken Haduch
@khaduch
Feb 16 2017 05:14
@bigyankarki - probably because you are .prepend-ing
Bigyan Karki
@bigyankarki
Feb 16 2017 05:14
hmm
so should i use append?
Ken Haduch
@khaduch
Feb 16 2017 05:14
@bigyankarki - .append puts them in the right order.
at least the order I'm expecting... :)
Bigyan Karki
@bigyankarki
Feb 16 2017 05:16
@khaduch haha thank you :)
CamperBot
@camperbot
Feb 16 2017 05:16
:star2: 2485 | @khaduch |http://www.freecodecamp.com/khaduch
bigyankarki sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
Bigyan Karki
@bigyankarki
Feb 16 2017 05:16
that went unnoticed
Ken Haduch
@khaduch
Feb 16 2017 05:16
awesome! Like I said, it looks nice :star2: - good luck with the projects!
Bigyan Karki
@bigyankarki
Feb 16 2017 05:16
@khaduch i was trying to add a search button and clear button inside the input field
do you have any idea how can i make it happen? :)
thanks :)
Ken Haduch
@khaduch
Feb 16 2017 05:17
that's my favorite search word, for some reason. "potato"
Bigyan Karki
@bigyankarki
Feb 16 2017 05:18
:)
Ken Haduch
@khaduch
Feb 16 2017 05:19
@bigyankarki - I don't know if you can make it inside the search field, but you can probably set up a div and add a couple buttons at the end of the box? Although I know that I always see a small "X" what looks like it is inside of a search box to clear it? I never tried to see how that was done - it might be a trick to just construct the elements to make it look like it is inside the text input?
Bigyan Karki
@bigyankarki
Feb 16 2017 05:20
ya actually i looked it up at other sites too and i found it there is no neat waya to get working button inside the input field
its just a ton of codes and CSS to make it happen :D
Ken Haduch
@khaduch
Feb 16 2017 05:21
@bigyankarki - you might be able to create the div and put the type of border around it like you have for your text input, and then squeeze the buttons inside?
Bigyan Karki
@bigyankarki
Feb 16 2017 05:23
how can we merge the buttons?
Ken Haduch
@khaduch
Feb 16 2017 05:31
@bigyankarki - I guess that you could actually do it without buttons - just use some spans or maybe inline list items and attach click handlers with javascript or jquery to do the functions that you want?
Bigyan Karki
@bigyankarki
Feb 16 2017 05:36
@khaduch that sounds good :)
$("#thisForm").submit(function(event){
   event.preventDefault();
  $("#inputField").animate({
    top: '100px'
  });
   var input = $('#inputField').val();
  getData(input);
  console.log(input);
   });
is there anything in the animate code?
Ayush Bahuguna
@relentless-coder
Feb 16 2017 06:16
Hi, how do I calculate margin in percentage for a given margin in px? The problem is that my container is set in percentage, so I don't know how do I convert the margin px to margin percentage
Mac
@itchick85
Feb 16 2017 06:22
How do I get my navbar elements to separate? http://codepen.io/itchick85/pen/RKENBR
Johnny
@jtan3
Feb 16 2017 06:30
@itchick85 try padding to your li
Darth Skywalker
@adityaparab
Feb 16 2017 06:52
@itchick85 put this in your css section
ul.nav-pills li{
  margin: 0 15px;
}
Abhijith Somaraj
@abhijithsomaraj
Feb 16 2017 07:00
my "about" text is not aligning to the right side..
http://codepen.io/abhijithsomaraj/pen/GrLJgJ
Johnny
@jtan3
Feb 16 2017 07:08
kirbyedy
@kirbyedy
Feb 16 2017 07:19
@abhijithsomaraj can you explain e what does this mean ?
<h2 aling="text-right">About</h2>
h2 aling ?
Mac
@itchick85
Feb 16 2017 07:38
@adityaparab thanks
CamperBot
@camperbot
Feb 16 2017 07:38
itchick85 sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 942 | @adityaparab |http://www.freecodecamp.com/adityaparab
Mac
@itchick85
Feb 16 2017 07:39
@jtan3 thanks
CamperBot
@camperbot
Feb 16 2017 07:39
itchick85 sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 309 | @jtan3 |http://www.freecodecamp.com/jtan3
BebeSel
@bebesel
Feb 16 2017 07:54
hi there.. I have a problem
Ashish Patel
@ashishpatelcs
Feb 16 2017 07:55
@bebesel hi, describe ur problem
BebeSel
@bebesel
Feb 16 2017 07:55
whenever I resize my window two images of chris brown goes down
how not to move it down?
how to stop moving it down
Ashish Patel
@ashishpatelcs
Feb 16 2017 07:59
Link to codpen?
the second and third images should be in the same row with the first one
but it keeps going down whenever i resize the window
combining three images makes a perfect square
omg my English sucks
Ashish Patel
@ashishpatelcs
Feb 16 2017 08:01
Inside your row. Use col-xs-6 class to keep both in th e same row
Both the columns
<div class='col-xs-6'>
And make sure to use bootstrap library
BebeSel
@bebesel
Feb 16 2017 08:03
it didn't work..
yes I'm using bootstrap library
it just made it permanently down
kirbyedy
@kirbyedy
Feb 16 2017 08:09
@bebesel you are not using properly bootstraps 12 column grid system
i forgot to save lol
how to use it properly?
kirbyedy
@kirbyedy
Feb 16 2017 08:10
also please change your bootstrap library
use the 3.3.6 not the 4.0 alpha
BebeSel
@bebesel
Feb 16 2017 08:11
okay
kirbyedy
@kirbyedy
Feb 16 2017 08:11
@bebesel here is the example how to use it
depending on what you want to achieve
BebeSel
@bebesel
Feb 16 2017 08:12
wow its working now!
thanks!
thank you for grid examples
that's what I'm looking for
Millen812
@Millen812
Feb 16 2017 08:17
Morning all. I've got a question: When I have to images with different dimensions and I put them into div containers with the same dimensions, they still aren't the same "size" on my website. How do I get them to be the same size?
https://codepen.io/Millen812/pen/egjQoo like you can see on this page for example
kirbyedy
@kirbyedy
Feb 16 2017 08:20
@Millen812 heigth ? :D
everywhere ?
Millen812
@Millen812
Feb 16 2017 08:21
I tried fixed heigth already, didn't work
kirbyedy
@kirbyedy
Feb 16 2017 08:21
the spelling is wrong :)
height :)
Millen812
@Millen812
Feb 16 2017 08:22
what the hell :-D
you are right
but in another case, the image stretches and it doesn't look good... How can I "scale" the image?
without it looking derpy
Johnny
@jtan3
Feb 16 2017 08:26
@Millen812 https://getbootstrap.com/examples/grid/ your columns should add up to 12
Millen812
@Millen812
Feb 16 2017 08:26
nah I'm not talking about bootstrap or this specific case, it's another case at work right now
Johnny
@jtan3
Feb 16 2017 08:27
@Millen812 oh opps
Millen812
@Millen812
Feb 16 2017 08:27
we work with wordpress and there are 2 images, but the aspect ratio is different. When we use height to make the one picture well higher, it stretches and looks derpy
but thanks for your input ;) @jtan3
CamperBot
@camperbot
Feb 16 2017 08:28
millen812 sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 310 | @jtan3 |http://www.freecodecamp.com/jtan3
Johnny
@jtan3
Feb 16 2017 08:33
@Millen812 what image are you talking about?
Millen812
@Millen812
Feb 16 2017 08:34
One of them is 566x319 px and the other one is 566x455px. So when we want to have them in a div container of the same size, the first picture looks stretched. Any workaround?
Johnny
@jtan3
Feb 16 2017 08:39
@Millen812 not sure. sorry.
Millen812
@Millen812
Feb 16 2017 08:39
np
Lascu Gratian
@gratianl
Feb 16 2017 08:45
Hello! I try to add <span class="glyphicon glyphicon-home"></span> to my NavBar but it doesn't work. I made something wrong? :|
Ievgen
@myteststudy
Feb 16 2017 09:03
Hello everyone!
I'm working on an exercise: "Build a Random Quote Machine" (https://www.freecodecamp.com/challenges/build-a-random-quote-machine)
And I have a question: Where can I get JSON file, or how to create it to be available? How to make a link on him?
Uladzimir
@mrpuer
Feb 16 2017 09:04
just search: quote API
i use forismatic.com
Ievgen
@myteststudy
Feb 16 2017 09:07
@mrpuer thanks a lot
CamperBot
@camperbot
Feb 16 2017 09:07
myteststudy sends brownie points to @mrpuer :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @mrpuer |http://www.freecodecamp.com/mrpuer
Uladzimir
@mrpuer
Feb 16 2017 09:08
welcome
deepakSpatil
@deepakSpatil
Feb 16 2017 09:28
I have 10 ajax calls on one page...and i want to trigger an event when all 10 are over...any method available for this ?
Micah Lewis
@EastML
Feb 16 2017 09:42
Maybe when they Ajax calls run have them add to a counter and once more when the final call is done. Then set an if statement to run when the counter reaches a certain number?
alpox
@alpox
Feb 16 2017 09:44
@deepakSpatil Stack them into promises and use Promise.all
vínαч puppαl
@vinaypuppal
Feb 16 2017 09:44
@deepakSpatil you can use $.when See examples(scroll to bottom) here https://api.jquery.com/jquery.when/
alpox
@alpox
Feb 16 2017 09:45
@deepakSpatil Or what @vinaypuppal says in case you use jquery
playingwithinfinity
@playingwithinfinity
Feb 16 2017 09:58
Any C++ guys here? I'm trying to build a Tic-Tac-Toe game where the computer selects a place randomly.
alpox
@alpox
Feb 16 2017 10:10
@playingwithinfinity Relatively :D
@playingwithinfinity But for that i guess i could help ^^
alpox
@alpox
Feb 16 2017 10:14
@playingwithinfinity I'm not yet through but case 7:if(board[2][10] != 'X' sounds big wrong - i don't think there is a place on the board with index 10
@playingwithinfinity For that it shows the move of the enemy you may want to place a display(); after computersTurn(); in the main function
playingwithinfinity
@playingwithinfinity
Feb 16 2017 10:17
@alpox haha the 10 thing is a bit silly mistake
Tom Frenken
@Blackioo
Feb 16 2017 10:17
Hey guys, any idea why my code isn't responsive at all? thought by using bootstrap classes that's default >.<
alpox
@alpox
Feb 16 2017 10:17
@playingwithinfinity int index = rand() % (8 + 1); gives you a number between 0 and 8 - not 1-9 which you handle in computersOutput
playingwithinfinity
@playingwithinfinity
Feb 16 2017 10:18
@alpox ugh...
Now it is showing the computer output, but on a new board like this :
1 2 3 
4 5 6 
7 8 9 
Player X's turn: Select the number to place X
5
1 2 3 
4 X 6 
7 8 9 
1 2 O 
4 X 6 
7 8 9 
Player X's turn: Select the number to place X
alpox
@alpox
Feb 16 2017 10:19
Yes, that was kinda the intent :D
You may want to add some space in between :D
cout << endl << endl; or something like that :-)
Fabio
@Gentarozzo
Feb 16 2017 10:21

Mates I've to store the value from an input box and use that value into an ajax request... I'm not able to store the value...

var value = document.getElementById("utente").value;

using this

If I do an alert(value) is totally empty...
playingwithinfinity
@playingwithinfinity
Feb 16 2017 10:21
@alpox How do I make sure the random number doesn't repeat?
1 2 3 
4 5 6 
7 8 9 
Player X's turn: Select the number to place X
4
1 2 3 
X 5 6 
7 8 9 
Computer Played
1 2 O 
X 5 6 
7 8 9 
Player X's turn: Select the number to place X
5
1 2 O 
X X 6 
7 8 9 
Computer Played
1 2 O 
X X O 
7 8 9 
Player X's turn: Select the number to place X
9
1 2 O 
X X O 
7 8 X 
Computer Played
1 2 O 
X X O 
O 8 X 
Player X's turn: Select the number to place X
8
1 2 O 
X X O 
O X X 
Computer Played
1 2 O 
X O O 
O X X 
Player X's turn: Select the number to place X
2
1 X O 
X O O 
O X X 
Computer Played
1 X O
alpox
@alpox
Feb 16 2017 10:22
@Gentarozzo Sure there exists an element with id utente?
Fabio
@Gentarozzo
Feb 16 2017 10:23
<input id = "utente" type = "text" placeholder = "Search Here">
alpox
@alpox
Feb 16 2017 10:23
@playingwithinfinity Well, the easiest way would be to let the computer replay as long as it didn't hit a free spot and as long as there still are free spots
Fabio
@Gentarozzo
Feb 16 2017 10:23
@alpox
Ghulam Shabir
@ghulamshabir
Feb 16 2017 10:23
@playingwithinfinity you can store previous random number in a variable and compare it to the current one before using it
alpox
@alpox
Feb 16 2017 10:23
@Gentarozzo Looks okay ^^
Fabio
@Gentarozzo
Feb 16 2017 10:24
@alpox looks for sure... but it's not working...
$("#submit").submit(function() I call ajax with this
alpox
@alpox
Feb 16 2017 10:24
@ghulamshabir This sadly doesn't cover the players positions :-)
playingwithinfinity
@playingwithinfinity
Feb 16 2017 10:25
@alpox I just don't get it.
Damn frustrating.
Ghulam Shabir
@ghulamshabir
Feb 16 2017 10:25
@alpox haha I haven't done that project yet so yeah it might not work in the game's context
alpox
@alpox
Feb 16 2017 10:27
@playingwithinfinity Well you can do a
void computersTurn(){
  cTurn = true;
  bool computerPlayed = false;
  do
      int index = rand() % (8 + 1);
      computerPlayed = computersOutput(index);
  } while(!computerPlayed);
  cTurn = false;
}
@playingwithinfinity Then rewrite the computersOutput function to return a boolean which indicated whether it could or could not set the value to the board
Which needs bit rewriting for board checks etc.
The function declaration would look as following then
bool computersOutput(int index){
With this computersOutput returns a boolean indicating whether or not it was able to set at the given random location.
As long as it could not set it, you the do/while loop just goes on trying.
Sooner or later the random has to hit one free place on the board

Other possibility:

Maybe cleaner?
You make a function which returns an array of field indices with the indices of the board which are free.
You make a random for the size of that array and set a stone to the index at the position given by the index in the array
playingwithinfinity
@playingwithinfinity
Feb 16 2017 10:33
@alpox Ma head hurtz
lol
alpox
@alpox
Feb 16 2017 10:34
@playingwithinfinity Also, your computersOutput function can be simplified since you have a one-dimensional array which you use as two-dimensional.
since you have then a one dimensional array with a length of 9, you can get rid of the switch and just use the index directly on the board.
@playingwithinfinity Oh sry if that was too much :D
Joel Santos
@St3ps
Feb 16 2017 10:35

Guys i have a h2 title that is more or less something like this

<hr><h2>SPACE</h2><hr>

What happens with my font settings is that SPACE creates an extra space after each letter (through letter-spacing).
So, the problems with this is that the rightmost <hr> is pushed to the right a bit and it sort of makes things ...off. (like this -- S P A C E -- , but no as exagerated)
So, i'd just like the rightmost HR to overlap the last letter's space. Is that possible?

David Radivojevic
@DavidRadivojevic
Feb 16 2017 10:36
why would u put 2 hr's
Joel Santos
@St3ps
Feb 16 2017 10:36
looks nice :)
David Radivojevic
@DavidRadivojevic
Feb 16 2017 10:36
uhhh
Joel Santos
@St3ps
Feb 16 2017 10:36
you have a dash on each side of the word
that's it.
short width
alpox
@alpox
Feb 16 2017 10:38
@St3ps Maybe easier would be to use one hr and and then a h2 and move the h2 on top of the hr through css (position: relative; top: -30px as example), then set the background of the h2 to white (or whatever your background is)
Joel Santos
@St3ps
Feb 16 2017 10:39
@alpox Ooooh! I like that, i'll try it out thanks :)
CamperBot
@camperbot
Feb 16 2017 10:39
st3ps sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 770 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Feb 16 2017 10:39
That would result in the hr going the whole width and the h2 element would overlap the hr while going sure that the hr does not go right through.
Tom Frenken
@Blackioo
Feb 16 2017 10:40
Is it possible that some bootstrap classes don't work in codepen?
alpox
@alpox
Feb 16 2017 10:40
@St3ps I did that right yesterday - with a container and a border-top instead of a hrthough:
blob
@Blackioo They should all work. But bootstrap classes need to be composed in the right way. And also, go sure that you have the css imported :-)
Tom Frenken
@Blackioo
Feb 16 2017 10:42
I included bootstrap with the quick add fiture, but for some reason classes like class="img-rounded" don't work :<
*feature
alpox
@alpox
Feb 16 2017 10:43
@Blackioo Can you show your codepen?
Tom Frenken
@Blackioo
Feb 16 2017 10:44
sure, be prepared for spaghetti, currently trying to center everything beautiful without using regular css :D
alpox
@alpox
Feb 16 2017 10:46
@Blackioo Oooh these bastards of CodePen
I believe they messed up half of the FCC people now hahaha
Tom Frenken
@Blackioo
Feb 16 2017 10:46
What did they do? :D
Or rather how
alpox
@alpox
Feb 16 2017 10:47
I see that they changed their quick add feature for bootstrap to use the 4.0.0 alpha version of bootstrap - not version 3 anymore :-/
@Blackioo So the bootstrap doc you found doesn't apply for the bootstrap you added by quickadd
Tom Frenken
@Blackioo
Feb 16 2017 10:47
rip
alpox
@alpox
Feb 16 2017 10:47
@Blackioo You have to go over to https://v4-alpha.getbootstrap.com/getting-started/introduction/ then :D
Tom Frenken
@Blackioo
Feb 16 2017 10:47
so i have to include bootstrap 3 in there?
alpox
@alpox
Feb 16 2017 10:47
Yea either that
Tom Frenken
@Blackioo
Feb 16 2017 10:47
oh
alpox
@alpox
Feb 16 2017 10:47
Or stick to the new docs :D
You can choose ^^
But be aware that people from FCC don't know about 4.0 alpha :D
Tom Frenken
@Blackioo
Feb 16 2017 10:48
yeah probably better to learn the new ones, since im learning it right now anyway :D
thx @alpox
CamperBot
@camperbot
Feb 16 2017 10:48
blackioo sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 771 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Feb 16 2017 10:48
So everyone will get confused when you ask questions about bootstrap here and their rules don't apply ;-)
Yea i guess that might be better
But help will be confused here :P
Just be aware of that :D you gotta tell them when you need help
Matthew
@Krimsonmedic
Feb 16 2017 10:49
Can't get my JS variable to show up in my HTML element. it's the last thing in my JS if anyone can figure out whats wrong.
fixed the class to id, still not working
alpox
@alpox
Feb 16 2017 10:51
@Blackioo So to make your image become responsive use img-fluid.
To make it round... well they took that out of bootstrap with alpha 4.0 so you gotta use css -->
img {
    border-radius: 100%;
}
Tom Frenken
@Blackioo
Feb 16 2017 10:52
@alpox is the rest of the FCC tutorial only bootstrap 3? because if i'd try to learn bootstrap 4 now but only use bootstrap 3 on fcc, well ... maybe i should learn 3 :<
also thx again @alpox :D
CamperBot
@camperbot
Feb 16 2017 10:52
blackioo sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:warning: blackioo already gave alpox points
alpox
@alpox
Feb 16 2017 10:54

@Krimsonmedic Chrome blocks your call to navigator.geolocation.getCurrentPosition since they newly allow that only in a secure environment https://
But you cannot use https:// when working with openweatherapp since that is not in their free plan.

You gotta use either some other weather api or another location api. Most people go with another location api like http://ip-api.com/

@Blackioo Yes, FCC teaches bootstrap 3 - because 4 is still in alpha. Anyways, you can still learn 4 i would say. It wouldn't hurt.
The main thing you have to learn is to read documentation and get your own info anyways so that would be a good start i guess.
Joel Santos
@St3ps
Feb 16 2017 10:55
@alpox hey alpox, it's odd but my h2 doesn' actually overlap, they still act as if they're in the same ... "layer" -- if it means any difference, it's actually an h1 :p, is tehre anything i should be doing to the hr as well?
alpox
@alpox
Feb 16 2017 10:55
@Blackioo And in the end you can also go without any bootstrap :-) I usually don't use it in my projects
@St3ps What do you mean by same layer? ^^ what does it look like?
Joel Santos
@St3ps
Feb 16 2017 10:56
@alpox like this -------- SPACE
Tom Frenken
@Blackioo
Feb 16 2017 10:56
@alpox Oh ok, i tried using no css at all there, because the example page managed to make it look good with bootstap only
Joel Santos
@St3ps
Feb 16 2017 10:57
@alpox same layer in the sense that they still act as if they're colluding with each others spaces! unleeesss i move around with the position: relative 'thingies (left, top) if i do that, it will overlap
alpox
@alpox
Feb 16 2017 10:57
@St3ps hmm try to make hr, h1 { display: block; } and try again.
h1 doesn't do much as normal inline element.
ofc. maybe you need better suitable selectors for them to not affect every h1/hr on the page
@Blackioo Yea they do :D you can try that also
Tom Frenken
@Blackioo
Feb 16 2017 10:59
@alpox is there a reason why you don't use bootstrap at all? Isn't it more time efficient to use the framework as much as possible?
Always thought the more frameworks the better :D
alpox
@alpox
Feb 16 2017 11:00
@Blackioo The problem you get with bootstrap is when you want real custom styles. Bootstrap makes all websites look quite similar.
If you want to make it quite custom, bootstrap is mostly in your way and you have to override its styles quite much and get rid of their pre-settings
Hmm thats not so true :-) sometimes the more frameworks the complicated
They can stand in your way or not interact good with each other
It depends on how good the interfaces of the frameworks are made and what they allow you to do. Often it helps in a lot of cases but stand in your way like a rock for some other stuff where you need ugly hacks to get done what would be rather easy to do without it.
So choosing and using a framework always needs some research and caution
So i think i'm out for now :-) its lunchtime
Tom Frenken
@Blackioo
Feb 16 2017 11:02
Cya :D
David Radivojevic
@DavidRadivojevic
Feb 16 2017 11:03
http://codepen.io/DavidRadivojevic/pen/zNbJaW hi does anyone know why there is a gap between page 2 and 3
Joel Santos
@St3ps
Feb 16 2017 11:04
@alpox Ofcourse, they're all properly isolated :p
David Radivojevic
@DavidRadivojevic
Feb 16 2017 11:12
what do i do when making a portfolio and i havent made anything
what do i put
?
Tom Frenken
@Blackioo
Feb 16 2017 11:13
Just link your github or some side where you will put something in the future :D
your codepen for example
Joel Santos
@St3ps
Feb 16 2017 11:14
@alpox Ok i really can't figure it out man, look, i did it on codepen, tried it with block display now with inline block, still no go
feels like he only way i can come across this problem is with a position: absolute
Joel Santos
@St3ps
Feb 16 2017 11:22
but then it totally kills responsiveness, as screens change sizes
Ana Toma
@anawebdev
Feb 16 2017 11:32
Hey :) does anyone know why the second background image is waay under the first? http://codepen.io/feuerbird29/pen/apxONQ?editors=1100
Joel Santos
@St3ps
Feb 16 2017 11:35
@feuerbird29 It looks to be just under.
Like one image under the other
nvm, tested it on chrome
Joel Santos
@St3ps
Feb 16 2017 11:43
@feuerbird29 Thinking it's related to img-fluid
when you remove the max-width parameter out of .img-fluid the images stack on top of each other nicely, although their width might be .. undesirable
Joel Santos
@St3ps
Feb 16 2017 11:48
you could just make 2 divs with a predefined height (say 100vh) and have the images sourced in the background, then apply the contain(or cover, i forget) property, that'll make it scale according to size
David Radivojevic
@DavidRadivojevic
Feb 16 2017 11:54
<h5>Since ive made no projects yet, im just gonna be linking my CodePen where some projects will hopefully be made soon.You can check out my CodePen by clicking on <a href="http://codepen.io/DavidRadivojevic/"><a target="_blank">this</a></a>.</h5>
whats wrong inhere
its not opening another tab
Ana Toma
@anawebdev
Feb 16 2017 11:55
@St3ps thank you, i ll give it a try
CamperBot
@camperbot
Feb 16 2017 11:55
feuerbird29 sends brownie points to @st3ps :sparkles: :thumbsup: :sparkles:
:cookie: 363 | @st3ps |http://www.freecodecamp.com/st3ps
shaytamir
@shaytamir
Feb 16 2017 11:56
f
f
Tom Frenken
@Blackioo
Feb 16 2017 12:07
any idea why the list isn't centered?
shaytamir
@shaytamir
Feb 16 2017 12:08

hey guys, im on "Show the Local Weather" exercise and im a bit stuck..
it askes me to use an api call and get the current weather for the users location..
iv'e got the exercise work on netBeans and a local brauzer,and used "navigator.geolocation.getCurrentPosition" to get the users current position..

the exercise ask me to upload it to "CodePen",
but codePen blocks it with this error:

"getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
getWeather @ pen.js:2358"

is there a wey to upload it to CodePen?
or is there another function you would recommend to get users current position?

Bgene
@Bgene
Feb 16 2017 12:14
do I need to Go Pro to add Photos to my pen?
Joel Santos
@St3ps
Feb 16 2017 12:15
@Blackioo Harambe feels very centered, perhaps you mean one of the captions, or am i missing somehing there? What isn't centered on the list?
@Bgene not sure, but why not use a free image repository like imgur?
Bgene
@Bgene
Feb 16 2017 12:18
@St3ps yep just found out I can do that
Joel Santos
@St3ps
Feb 16 2017 12:21
@Bgene ;)
Tom Frenken
@Blackioo
Feb 16 2017 12:28
@St3ps the hole list is a little bit off, on mobile it's centered but on PC it looks a little bit too much left, if i define class="text-center" the bullet points stay left and only the text moves :<
WiseKodama
@WiseKodama
Feb 16 2017 12:30
$('.container-fluid').css('background', 'linear-gradient('colors[cTemp] + ',' + colors[cTemp]+')');
Why is this throwing an error?
Any ideas?
@shaytamir lookinto geoip
It is a lot better since it doesn't prompt the user to share the location
Greg Duncan
@GregatGit
Feb 16 2017 13:00
@WiseKodama css("propertyname","value"); you should have one property name and one value
Joel Santos
@St3ps
Feb 16 2017 13:05
@alpox that is better, still a problem though, as the h2 is supossed to be on top :p
Edson
@edson-rodrigues
Feb 16 2017 13:08
Omg, I just started the second lession on CodePen editor, "Build a Personal Portfolio Webpage", and I got completely confused and have no idea about how to start it. I've checked the code pen editor of the example, and I saw such a lot of things that I haven't seen on the previously lessions. I wanna cry. Good morning!
I just put it more down so you can see it better
@edson-rodrigues Hi there :-) don't let yourself down by this. Its usual that its a bit overwhelming.
The lesson for the Portfolio Webpage is that you learn to find the stuff you need yourself on the internet through Stackoverflow, Bootstrap documentation and MDN etc :-)
It takes time and effort to find the stuff, but just go slow but steadily. Try to build one thing at a time and not everything at once.
Joel Santos
@St3ps
Feb 16 2017 13:20
@alpox that's perfect! thank you
CamperBot
@camperbot
Feb 16 2017 13:20
st3ps sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 772 | @alpox |http://www.freecodecamp.com/alpox
Edson
@edson-rodrigues
Feb 16 2017 13:22
@alpox Thanks for these words. I'll take a break on the lession to study a little more about bootstrap and jQuery for a while, then I'll get back to the lession.
CamperBot
@camperbot
Feb 16 2017 13:22
edson-rodrigues sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 773 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Feb 16 2017 13:23
@edson-rodrigues :thumbsup:
BebeSel
@bebesel
Feb 16 2017 13:35
hi there I'm having a problem of how to put my first header below my fixed purple bar..
Clyde Lobo
@oppiniated
Feb 16 2017 13:40
@bebesel You can add top:0; to .navigation rule
BebeSel
@bebesel
Feb 16 2017 13:43
thanks
how to give brownies?
Clyde Lobo
@oppiniated
Feb 16 2017 13:53
thanks with @username
CamperBot
@camperbot
Feb 16 2017 13:53
oppiniated sends brownie points to @usernmae :sparkles: :thumbsup: :sparkles:
:warning: @usernmae's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
David Radivojevic
@DavidRadivojevic
Feb 16 2017 14:01
finally finished myportfolio
Zack Richardson
@ZackRich12
Feb 16 2017 14:05
how would i put a background image behind 2 elements?
i would like the image in my css tab to be the background for both of the elements, how would i do this?
Chris Rutherford
@cjrutherford
Feb 16 2017 14:15
@ZackRich12 in your CSS you reference a class "background-image" but it's never used in your Html, and I would put the background on a Div surrounding the elements you wish to have a background
Zack Richardson
@ZackRich12
Feb 16 2017 14:19

```

<div class = "classhere?">

<div class = "classhere?">
@cjrutherford
Tom Frenken
@Blackioo
Feb 16 2017 14:26
how do yall decide which librarys you include in your page? Just search randomly through the web and hope to find fancy things or is there any method yall apply? :D
thanks in advance
ermarie
@ermarie
Feb 16 2017 14:33
Can I get some help with my twitter button on the random quote machine please? It's looking like a link rather than a button and when I click it, it just opens another window of my code pen page rather than the twitter link:
http://codepen.io/ermarie/pen/KaPdKj
Chris Rutherford
@cjrutherford
Feb 16 2017 14:35
@ZackRich12 that's right
Dean Hollstrom
@DeanHollstrom
Feb 16 2017 14:40
Hey guys, working on my portfolio and Im using Foundation rather than Bootstrap. Ive run into a problem where my h1 isnt being centered vertically, Im guessing its to do with no height being defined for the div but Im not sure? http://codepen.io/DeanHollstrom/pen/pRGLWv
Drbathound
@Drbathound
Feb 16 2017 14:45
how would one create a navigation bar at the top of the web page
Dean Hollstrom
@DeanHollstrom
Feb 16 2017 14:49
@Drbathound If you mean like the one I have on my codepen above, then take a look at the foundation framework, or bootstrap. Both have those elements built in
Drbathound
@Drbathound
Feb 16 2017 14:51
@DeanHollstrom I see, it kind of makes sense
Drbathound
@Drbathound
Feb 16 2017 14:56
@DeanHollstrom is your title element part of the foundation framework?
Dean Hollstrom
@DeanHollstrom
Feb 16 2017 14:58
@Drbathound Nope, its just a regular h1 element, centered using a flexbox command which is baked into foundation (it also allows vertical centering but I cant get that working just yet)
Drbathound
@Drbathound
Feb 16 2017 14:58
@DeanHollstrom ok
badalsaibo
@heyDante
Feb 16 2017 15:03
@Fredd93 no need to define .container-fluid its a predefined bootstrap's class.
Drbathound
@Drbathound
Feb 16 2017 15:03
@DeanHollstrom
you can do
<center><title>dasdfsdf</title></center>
Mahmoud Farid
@Fredd93
Feb 16 2017 15:05
@heyDante thanks dude you won't blieve it was '-' that was missing -_-
CamperBot
@camperbot
Feb 16 2017 15:05
fredd93 sends brownie points to @heydante :sparkles: :thumbsup: :sparkles:
:cookie: 428 | @heydante |http://www.freecodecamp.com/heydante
Dean Hollstrom
@DeanHollstrom
Feb 16 2017 15:07
@Drbathound Thats for horizontal centering, I want both horizontal and vertical
Drbathound
@Drbathound
Feb 16 2017 15:07
@DeanHollstrom oh, sorry
Dean Hollstrom
@DeanHollstrom
Feb 16 2017 15:08
@Drbathound No problem :)
@Drbathound plus you dont actually need the <center> tag as you can use align:center in your css rules
Drbathound
@Drbathound
Feb 16 2017 15:10
@DeanHollstrom thx
CamperBot
@camperbot
Feb 16 2017 15:10
drbathound sends brownie points to @deanhollstrom :sparkles: :thumbsup: :sparkles:
:cookie: 122 | @deanhollstrom |http://www.freecodecamp.com/deanhollstrom
badalsaibo
@heyDante
Feb 16 2017 15:10
@DeanHollstrom center is outdated
Dean Hollstrom
@DeanHollstrom
Feb 16 2017 15:10
@heyDante True, thats why I said to use the css align rule. Unless you mean the css is outdated?
Tom Frenken
@Blackioo
Feb 16 2017 15:30
I'm currently at the Portfolio exercise, how did you decide what librarys to include? the example portfolio has quite a few
alpox
@alpox
Feb 16 2017 15:31
@Blackioo Include them when the need comes :-)
Arturs Vasiljevs
@vasiljevs
Feb 16 2017 15:31
:D
Tom Frenken
@Blackioo
Feb 16 2017 15:31
So I just code along and when I'm confused I google "library for xyz" ?
alpox
@alpox
Feb 16 2017 15:31
Usually you try to do what you want to and if you find you cannot work it out without a lot of effort, you try to find a library which does the work for you @Blackioo
Tom Frenken
@Blackioo
Feb 16 2017 15:32
ah ok
thx again @alpox - my alltime teacher :clap:
CamperBot
@camperbot
Feb 16 2017 15:32
blackioo sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 774 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Feb 16 2017 15:32
Np @Blackioo :D
BebeSel
@bebesel
Feb 16 2017 15:33
http://codepen.io/bebesel/pen/VPNPMb hi... I positioned my three buttons on the right side of my navigation bar.. is there a better way to do it? or did I just do good?
oh wow.. I did bad..
alpox
@alpox
Feb 16 2017 15:35
@bebesel You should maybe put all of the buttons in a wrapper div and then put right: ... on that div instead of single buttons
@vasiljevs Did you put all of the examples together yourself? :D
BebeSel
@bebesel
Feb 16 2017 15:37
thanks @alpox
CamperBot
@camperbot
Feb 16 2017 15:37
bebesel sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 775 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Feb 16 2017 15:37
@vasiljevs Nice work anyways :D thats a lot of stuff
Aha :D i usually read stuff and its gone :P
jampcat9
@jampcat9
Feb 16 2017 15:40

I'm working on the portfolio page: https://www.freecodecamp.com/challenges/build-a-personal-portfolio-webpage

#5 says to put thumbnail images of different projects, or put placeholders. How do I do placeholders?

alpox
@alpox
Feb 16 2017 15:40
I never keep bookmarks around ^^
@jampcat9 Just put there any content which expresses that there should be or will be some content
@jampcat9 If you need a real image placeholder: http://placehold.it/
jampcat9
@jampcat9
Feb 16 2017 15:41
ok thanks @alpox
CamperBot
@camperbot
Feb 16 2017 15:41
jampcat9 sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 776 | @alpox |http://www.freecodecamp.com/alpox
Ghost
@ghost~580ed9c0d73408ce4f309ef0
Feb 16 2017 16:05
traviscarterlife
@traviscarterlife
Feb 16 2017 16:22
How do u add a background img
Tom Frenken
@Blackioo
Feb 16 2017 16:29
depends, either in css or directly?
if you want it to add to your body for example just write
<body background:"insert link here">
First time I include a library outside of the tutorial, how do I include this? https://startbootstrap.com/template-overviews/scrolling-nav/
paulmatheson
@paulmatheson
Feb 16 2017 16:35
How does the example page get everything to be in the center without any padding?
Tom Frenken
@Blackioo
Feb 16 2017 16:40
for the text it's using the class "text-center"
the rest seems to be col---offset
shaytamir
@shaytamir
Feb 16 2017 16:50

hey guys, im on "Show the Local Weather" exercise and im a bit stuck..
it askes me to use an api call and get the current weather for the users location..
iv'e got the exercise work on netBeans and a local brauzer,and used "navigator.geolocation.getCurrentPosition" to get the users current position..

the exercise ask me to upload it to "CodePen",
but codePen blocks it with this error:

"getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
getWeather @ pen.js:2358"

is there a wey to upload it to CodePen?
or is there another function you would recommend to get users current position?

Evan
@EvanDCP
Feb 16 2017 16:52
guys can you please check if my clock is working? all functions alright? does it look nice too? would you guys say it's a finished project? http://codepen.io/EvanDCP18/full/bgZZqm/
alpox
@alpox
Feb 16 2017 16:54
@shaytamir Pls use ip-api instead
shaytamir
@shaytamir
Feb 16 2017 16:57
@alpox thanks i will try =]
CamperBot
@camperbot
Feb 16 2017 16:57
shaytamir sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 777 | @alpox |http://www.freecodecamp.com/alpox
Koderkid1936
@Koderkid1936
Feb 16 2017 17:00
after reading several "margin collapse" articles I still not quiet sure how it works and what to do to avoid it, anyone care to explain please :(
rsxhoxhi
@rsxhoxhi
Feb 16 2017 17:03
How do I add a custom font to my tribute page? I've figured out how to add the Google font library, but I found another cool font that isn't part of that library. How do I use it? I have the ttf file, but I don't know how to - well, how to do whatever I have to do to make it useful in CodePen. So new at this!
Jonathan Lifschitz
@jonylif
Feb 16 2017 17:04
@rsxhoxhi you have to use de font-face in css, do you now how?
alpox
@alpox
Feb 16 2017 17:04
@Koderkid1936 Margin collapse happens when an element cannot determine its size through its boundaries or inner content.
This usually happens when you have an element without content which is an inline or inline-block element or a block element whose parents have no exact size.
I don't think i can just cover all cases in which this happens. Whenever it happens to you, you should just go sure that the element can adjust itself to SOME sizes.
This might be that it can adjust itself to its content, this might be that it can adjust itself to its parents (as a block element) where the parents need an explicit set size (percentage, width/height or whatever), or that the element itself has an explicit width/height set.
rsxhoxhi
@rsxhoxhi
Feb 16 2017 17:05
@jonylif I did add the @font_face code in CSS, but (and forgive my un-technical terms) it seems like that bit of code still can't access the tff file with the proper font.
Gulsvi
@gulsvi
Feb 16 2017 17:05
@rsxhoxhi You'll have to put all the font files somewhere so you can access them and then reference them as explained here: https://www.fontspring.com/support/installing_webfonts/how-do-i-use-the-webfonts
Jonathan Lifschitz
@jonylif
Feb 16 2017 17:06
use that page
automatly transform your desire font in all de formats that the css need
rsxhoxhi
@rsxhoxhi
Feb 16 2017 17:07
@jonylif Brilliant! Thank you!
CamperBot
@camperbot
Feb 16 2017 17:07
rsxhoxhi sends brownie points to @jonylif :sparkles: :thumbsup: :sparkles:
:cookie: 73 | @jonylif |http://www.freecodecamp.com/jonylif
Jonathan Lifschitz
@jonylif
Feb 16 2017 17:07
in the download also you have a stylesheet with the exact code that you need to put in the css
Evan
@EvanDCP
Feb 16 2017 17:08
guys can you please check if my clock is working? all functions alright? does it look nice too? would you guys say it's a finished project? http://codepen.io/EvanDCP18/full/bgZZqm/
can't anyone please take a look? :(
Gulsvi
@gulsvi
Feb 16 2017 17:12
@EvanDCP I haven't done that project yet, but as far as looks, why not compare it with other popular pomodoro clock designs? http://codepen.io/search/pens?q=pomodoro&limit=all&type=type-pens
Evan
@EvanDCP
Feb 16 2017 17:13
@SkyCoder01 thanks but the problem is my codepen isn't working as in some features like bootstrap, fonts, colors, aren't working, so I can't actually check how my project looks or how similar it is to others. That's why I'm asking here if it's working as I can't check myself :/
CamperBot
@camperbot
Feb 16 2017 17:13
evandcp sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 212 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 16 2017 17:15
@EvanDCP Seems you are using an alpha pre-release version of bootstrap 4. Is that intentional? Also, your CSS has a reference to the "Fantasy" font, but you don't have that font included in your project.
Evan
@EvanDCP
Feb 16 2017 17:17
@SkyCoder01 what? no it's not intentional, isn't bootstrap included automatically when you set it up in codepen settings?
doesn't CSS include it by itself? isn't my font being shown in fantasy font?
Gulsvi
@gulsvi
Feb 16 2017 17:17
@EvanDCP Bootstrap has a couple of versions out there - they use different class names, so you have to use the version you want. You probably want version 3.3
At least v3.3 is what we learn in Free Code Camp
Evan
@EvanDCP
Feb 16 2017 17:22
this bootstrap thing was the issue then! it's working now for the first time since forever, thanks a lot man @SkyCoder01
CamperBot
@camperbot
Feb 16 2017 17:22
evandcp sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: evandcp already gave skycoder01 points
rsxhoxhi
@rsxhoxhi
Feb 16 2017 17:22
@jonylif Hmmm. Something's still not working. I've copied the CSS directly from the font's stylesheet via transfonter and then used that font family in my HTML stylesheet, but nothing's changed. This is the CSS: @font-face {
font-family: 'Return To Sender';
src: url('ReturnToSender.eot');
src: url('ReturnToSender.eot?#iefix') format('embedded-opentype'),
url('ReturnToSender.woff') format('woff'),
url('ReturnToSender.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
Evan
@EvanDCP
Feb 16 2017 17:22
what about CSS though? why is it not included by itself?
Gulsvi
@gulsvi
Feb 16 2017 17:22
What do you mean why the CSS is not included?
rsxhoxhi
@rsxhoxhi
Feb 16 2017 17:23
@jonylif And then in my stylesheet: h1 {font-family: 'Return To Sender':}
Gulsvi
@gulsvi
Feb 16 2017 17:23
The "fantasy" font isn't web safe, so it might not show up in all browsers. In my browser, firefox, I see the serif font.
Evan
@EvanDCP
Feb 16 2017 17:23
@SkyCoder01 yeah I mean in CSS I've put font fantasy but it's not showing on my computer, and neither is the background gray color. I see it white. It's like nothing in CSS is working. Is this an issue from my computer, or does it happen to you too?
Jonathan Lifschitz
@jonylif
Feb 16 2017 17:24
@rsxhoxhi do you create a folder and put the fonts archive there or just throw where the index.html are?
Gulsvi
@gulsvi
Feb 16 2017 17:24
@rsxhoxhi It's looking for a file: ReturnToSender.eot, like I said earlier, you need to upload those files somewhere and access them via URL or local file path if you're running everything locally. https://www.fontspring.com/support/installing_webfonts/how-do-i-use-the-webfonts
@EvanDCP I'll send a screenshot
image.png
That's what I see
You added bootstrap 3.3.7 to the top of your codepen HTML and left bootstrap 4.0 alpha in your CSS settings. Plus you have a codepen linked in your CSS settings too. If you fix that, you get a gray background
Evan
@EvanDCP
Feb 16 2017 17:28
@SkyCoder01 yeah I see the same thing exactly
Gulsvi
@gulsvi
Feb 16 2017 17:28
image.png
Evan
@EvanDCP
Feb 16 2017 17:29
I'll remove what you said then and will try out then!
Gulsvi
@gulsvi
Feb 16 2017 17:30
By the way, I think "Impact" is a similar font to what you want - and it's web safe, so it will work in all browsers.
Evan
@EvanDCP
Feb 16 2017 17:31
@SkyCoder01 seems like it's still not working
man how can this be so difficult T_T
Steven
@Ironwrangler
Feb 16 2017 17:32
Does anyone use Sublime text3
Gulsvi
@gulsvi
Feb 16 2017 17:32
@EvanDCP It isn't that difficult :) put bootstrap in your CSS settings, not in your HTML. That's all you need to do to fix everything
h1tag
@h1tag
Feb 16 2017 17:33
@SkyCoder01 Hi :wave:
Gulsvi
@gulsvi
Feb 16 2017 17:33
Codepen's HTML panel is only for code that goes inside the <body> tags. CSS files go in the codepen CSS settings
Hello @fortMaximus :wave: :)
rsxhoxhi
@rsxhoxhi
Feb 16 2017 17:35
@SkyCoder01 I get hung up on the bit about uploading the files. Please forgive me - I'm very, very new at this and not at all familiar with a lot of the terms. (Most all of the terms.) Upload them...where? (I don't know a server from a TGIFriday's waiter, so please have patience.) It's the part about directing the code to the right file that throws me.
Gulsvi
@gulsvi
Feb 16 2017 17:36
@rsxhoxhi You'll probably have to upload your font files to your github account and host them there, but if you're still really new at this, it isn't going to be easy (yet!)
It's probably easiest (for now) to use the fonts at: https://fonts.google.com/
rsxhoxhi
@rsxhoxhi
Feb 16 2017 17:37
Ahhhh, I see. I'll try that, but if it doesn't work, I think I'll just submit my tribute page and call it a day. Getting a little bit ambitious. I was hoping to make my London pubs page look like a chalkboard pub menu, but that might be pushing it.
Evan
@EvanDCP
Feb 16 2017 17:37
@SkyCoder01 seems like it's working now, thank you!
CamperBot
@camperbot
Feb 16 2017 17:37
evandcp sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: evandcp already gave skycoder01 points
Evan
@EvanDCP
Feb 16 2017 17:38
none of the buttons are working for me though. Can someone check if the clock itself is working as expected functionality-wise?
Gulsvi
@gulsvi
Feb 16 2017 17:38
No problem @EvanDCP, congrats :)
Nagireddy Srichakradhar Reddy
@srichakradhar
Feb 16 2017 17:38
has anyone used jquery one page scroll plugin?
Gulsvi
@gulsvi
Feb 16 2017 17:38
@rsxhoxhi I guess you can always go back and make it look nicer later :)
Nagireddy Srichakradhar Reddy
@srichakradhar
Feb 16 2017 17:39
I've got a problem with it...
it says r.bind is not a function
Gulsvi
@gulsvi
Feb 16 2017 17:42
@srichakradhar I haven't used it before, but if you look at their github page, they have 188 open issues and the project hasn't been updated in over 3 years :)
fvdave2017
@fvdave2017
Feb 16 2017 17:42
Good morning, I am having issues with scollspy in bootstrap. Does anyone understand how to make it work?
Nagireddy Srichakradhar Reddy
@srichakradhar
Feb 16 2017 17:43
:D
Gulsvi
@gulsvi
Feb 16 2017 17:43
Maybe use a different plugin @srichakradhar :laughing:
Sam Griffen
@ssgriffen
Feb 16 2017 17:47
Shouldn't my rows be centered, in desktop view? Because of my col-offset? http://codepen.io/ssgriffen/pen/QdPLPx
Nagireddy Srichakradhar Reddy
@srichakradhar
Feb 16 2017 17:48
I'm trying to make this https://srichakradhar.github.io/Tribute2Teacher/ to one page scrollable
fvdave2017
@fvdave2017
Feb 16 2017 17:55
I seem to be in the incorrect place to get help with bootstrap issues. can anyone direct me to where I should be for help?
Gulsvi
@gulsvi
Feb 16 2017 17:58
@fvdave2017 Can you share your code? I saw you post this question yesterday but I hadn't used bootstrap scroll spy before. I just read the docs and created a navbar with scroll spy. It seems to be working, so maybe I can help now?
If it's a bug or something more advanced than just making a navbar with scroll spy, maybe you want to post here: https://github.com/twbs/bootstrap/issues
fvdave2017
@fvdave2017
Feb 16 2017 18:02
@SkyCoder01 Here is my code. The links work but the scroll part does not highlight my navbar.
@SkyCoder01 <body data-spy="scroll" data-target=".navbar" data-offset="50">
<header>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span> </button>
<a class="navbar-brand" href="www.northernlightsconsultant.ca" target="_blank">Northern Lights Consulting</a>
</div>
<div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#section1">About</a></li>
<li><a href="#section2">Portfolio</a></li>
<li><a href="#section3">Contact Me</a></li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<!-- End of nav header -->
<main>
<header>
<div class="row" id="section1">
<!-- my personal description -->
<div id="first">
<p class="h3"> Front-End Developer and computer maintenance service. I have done Web Design and Website development. I have also had experience in virus removal, computer upgrades and computer maintenance.
</p>
<h1><sup>__</sup><&#47;></h1>
<p class="h3">Front-End Designer -- Computer Service -- Virus Removal</p><br /><br />
</div>
<div id="second">
<img src="https://northernlightsconsulting.files.wordpress.com/2016/08/everett-picb.jpg" class="img-circle" alt="Everett Davidson" width="200" height="auto" />
</div>
</div>
</header>
<section>
<div class="row" id="section2">
<!-- my portfolio area -->
<div class="text-center third">
<h2>PORTFOLIO</h2>
<h1><sup>___</sup><&#47;><sup>_</sup></h1><br />
</div>
<div class="fourth">
<img src="https://northernlightsconsultant.ca/wp-content/uploads/2017/02/TitlePage.jpg" class "img-rounded" alt="Northern Lights Consulting" width="400" height="auto" />
</div>
<div class="fourth2">
</div>
</div>
</section>
<section>
<div class="row" id="section3">
<!-- contact area -->
<div class="text-center">
<h2>Contact Me</h2>
<h1><sup>___</sup><&#47;><sup>_</sup></h1>
</div>
<div class="row" id="contactForm">
<div class="fifth">
<!--This is my form to use -->
<form class="form-horizontal text-center" id="form">
<div class="form-group">
<label>Your Name:   </label>
<input type="text" Name="name" placeholder="your name" /></div>
<div class="form-group">
<label>Your Email:   </label>
<input type="email" Name="email" placeholder="your email" /></div>
<div class="form-group">
<label>Your Phone: </label>
<input type="tel" Name="phone" placeholder="your phone" /></div>
<div class="form-group">
<p class="text-center p2">Leave your Message below:<br/>
<textarea name="comment" form="form" rows="5" cols="25" placeholder="Enter text here..."></textarea></p>
</div>
</form>
</div>
<div class="sixth">
<!-- my message -->
<p>If you would like to get in touch with me you can do so by using the contact area to your left. You can ask a question, leave a comment and or request your choice of communication. I will response A.S.A.P. Thank you for your questions and
comments in advance.</p>
<p>I look forward to receiving your questions and comments.</p>
</div>
</div>
</section>
</div>
CamperBot
@camperbot
Feb 16 2017 18:03
fvdave2017 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 213 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Evan
@EvanDCP
Feb 16 2017 18:03
can anyone please check that my clock is working correctly? http://codepen.io/EvanDCP18/full/bgZZqm/
Gulsvi
@gulsvi
Feb 16 2017 18:04
@fvdave2017 Scroll spy also needs bootstrap css, jquery, and bootstrap js files included.
Add those to your project if you haven't - I don't see anything wrong with your HTML, you have "data-spy="scroll" in your <body> and that's the only HTML required as far as I know
TAMI WINN
@angelcowgirl
Feb 16 2017 18:07
how do we get the codepen link for the tribute page
Gulsvi
@gulsvi
Feb 16 2017 18:08

If that still doesn't work, you may also need to initialize it with JavaScript @fvdave2017

$('body').scrollspy({target: '.navbar'});

Hard to tell without seeing your entire project.

fvdave2017
@fvdave2017
Feb 16 2017 18:08
I am sorry @SkyCoder01 . Does this mean I have to add bootstrap to my javascript section or do I have to create a link for script in the <head> of the project?
Gulsvi
@gulsvi
Feb 16 2017 18:09
@fvdave2017 Bootstrap has a javascript file and a css file. You need both of those. CSS files go in your <head> and JS files go at the end of your <body> right before </body>
Bootstrap's JavaScript file also needs jQuery it seems, I was getting errors in my browser console until I added it.
If this is in codepen @fvdave2017 just use the codepen settings. CSS files go in the CSS section, JS files go in the Javascript section
@angelcowgirl The example tribute page link is listed in the tribute page challenge https://www.freecodecamp.com/challenges/build-a-tribute-page
fvdave2017
@fvdave2017
Feb 16 2017 18:14
Thank you @SkyCoder01 I will follow your directions you have laid out and see what happens. Coding is very new to me in this understanding.
CamperBot
@camperbot
Feb 16 2017 18:14
fvdave2017 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: fvdave2017 already gave skycoder01 points
Gulsvi
@gulsvi
Feb 16 2017 18:15
@fvdave2017 All of this is explained here: http://getbootstrap.com/getting-started/
And all the bootstrap plugins, like scroll spy are included in bootstrap.min.js: http://getbootstrap.com/javascript/#js-individual-compiled
It just takes some reading to get familiar with it and then some failures and searching :) - good luck :+1:
Here is the one I created for comparison: http://codepen.io/skycoder/pen/KaYQoQ
Nagireddy Srichakradhar Reddy
@srichakradhar
Feb 16 2017 18:33
how should I center a div in a <section>?
style="vertical-align: middle" is not working
kirbyedy
@kirbyedy
Feb 16 2017 18:34
@srichakradhar you can try with flexbox
Jake
@Jaketh
Feb 16 2017 18:40
google flexbox froggy for a fun tutorial.
LinearG
@LinearG
Feb 16 2017 18:46
Hello--I just started the Tribute Page waypoint and I'm a little apprehensive that I missed something. The map says that the two projects will take 50 hours total but they seem like simple one page documents. Maybe I'm over estimating myself but marking up two pages should take less than a day it seems like. I guess I could spend 40 hours picking the perfect color scheme etc...
Nagireddy Srichakradhar Reddy
@srichakradhar
Feb 16 2017 18:47
thanks @kirbyedy !
CamperBot
@camperbot
Feb 16 2017 18:47
srichakradhar sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1795 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Nagireddy Srichakradhar Reddy
@srichakradhar
Feb 16 2017 18:47
that worked!
LinearG
@LinearG
Feb 16 2017 18:47
The first example is just a list (well aren't all projects): Photo, blurb, bullet point timeline, pullquote, link.
then style that.
so how is that more than a few hours?
Jake
@Jaketh
Feb 16 2017 18:49
@LinearG They throw some soft pitches to make you feel competent to start. Is my guess.
Brigette Eckert
@Brigette-Eckert
Feb 16 2017 18:50
Has anyone done the Twitch Streaming project lately? I'm trying to update it, adding the client_id but its not working ofr me.
LinearG
@LinearG
Feb 16 2017 18:51
Thanks @Jacketh -that is what I'm hoping. I'm paranoid that I'm missing some critical step.
CamperBot
@camperbot
Feb 16 2017 18:51
linearg sends brownie points to @jacketh :sparkles: :thumbsup: :sparkles:
:warning: @jacketh's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Jake
@Jaketh
Feb 16 2017 18:52
@LinearG nah, you're fine. It can be done in an hour or less. The thing to remember on later projects tho, is to take your time. It isn't your certification that'll get you a job if you finish this, its your portfolio. if its ugly af, its useless.
Gulsvi
@gulsvi
Feb 16 2017 18:53
@LinearG For the portfolio, Navbars, smooth scrolling, learning the bootstrap grid system, etc. I've easily spent 20hrs learning about that and haven't started the portfolio project yet. Just spent another hour figuring out scroll spy, so I guess it just depends on how much you want to do and how much you already know how to do.
LinearG
@LinearG
Feb 16 2017 18:53
Thank you for confirming. That is good & bad for me actually. I like problem solving, more backend stuff I guess. I don't feel that I have any design sense.
Gulsvi
@gulsvi
Feb 16 2017 18:54
@Brigette-Eckert You don't need a client id for the Twitch API. In the instructions, they tell you to use the mirror at https://wind-bow.gomix.me/
Brigette Eckert
@Brigette-Eckert
Feb 16 2017 18:55
@SkyCoder01 thanks I'll look into that. Its been a while since I first did it and it broe so I'm trying to fix it :P
CamperBot
@camperbot
Feb 16 2017 18:55
brigette-eckert sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 216 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Jake
@Jaketh
Feb 16 2017 18:55
can always pay a designer to make you some pdfs, and then you develop them. thats what I do 9 times out of 10
Scott Spence
@spences10
Feb 16 2017 19:31
hello campers
can someone help with twitch.tv
i'm trying to do it with es6
using fetch
which works for the channels
but i'm nor trying to match that to the streaming
and failing
I'm not sure what to do with isStreaming
I want to return is the user is streaming by matching if the url is in what is returned in the addChannel part
singleincome
@singleincome
Feb 16 2017 19:47
Hello, I want to create a grid that sits on top of a div object to preview some projects I've done.
Allow users to click on one of the quadrants which takes them to another webpage with just the project they've selected...
Any tips on where I can start?
Why isnt my picture showing? :(
AJ Robisch
@AJFelidae
Feb 16 2017 19:54
I'm trying to get data from the Open Weather API - how do i keep the variables from inside my success function so i can add them onto a string (which i'll use as a variable inside $.getJSON() to get the data)?

  function success(position) {
     latitude = position.coords.latitude;
     longitude = position.coords.longitude;
  }
  function error() {
    $('#output').text("Error: geolocation is not supported.");
  }
  navigator.geolocation.getCurrentPosition(success, error);

});
Richard Aird
@boxxylol
Feb 16 2017 19:55
oops
sorry
fixed it
AJ Robisch
@AJFelidae
Feb 16 2017 19:56
Is there a way to get variables from inside a function?
Gulsvi
@gulsvi
Feb 16 2017 19:57
@Aviendhaast You pass the variables to another function
AJ Robisch
@AJFelidae
Feb 16 2017 19:58
@SkyCoder01 I'm a bit confused on how to do that - been a while since i've been on here.
Gulsvi
@gulsvi
Feb 16 2017 19:58
@Aviendhaast
$.getJSON(url, function(data) {
  var foo = data.bar;
  var bar = data.foo;
  someOtherFunction(foo, bar);
});

function someOtherFunction(foo, bar) {
  console.log(foo);
  console.log(bar);
}
or, to simplify:
$.getJSON(url, someOtherFunction);

function someOtherFunction(data) {
  console.log(data.foo);
  console.log(data.bar);
}
AJ Robisch
@AJFelidae
Feb 16 2017 20:00
@SkyCoder01 Alright, thanks - let me figure that out.
CamperBot
@camperbot
Feb 16 2017 20:00
aviendhaast sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 217 | @skycoder01 |http://www.freecodecamp.com/skycoder01
AJ Robisch
@AJFelidae
Feb 16 2017 20:00
@SkyCoder01 And data in someOtherFunction would be an object?
Richard Aird
@boxxylol
Feb 16 2017 20:02

<header>
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
</header>

<div class="container-fluid">
<ul class="nav nav-pills">
<li>
<a href="#">Richard Aird</a>
</li>
<li class ="pull-right">
<a href="#">About Me</a>
</li>
<li class ="pull-right">
<a href="#">Portfolio</a>
</li>
<li class ="pull-right">
<a href="#">Youtube</a>
</li>
<li class ="pull-right">
<a href="#">Contact Me</a>
</li>
</ul>
<div class="pageOne">
<h1>Richard Aird</h1></div>
</div>

How come these aren't pulling right? :(
Gulsvi
@gulsvi
Feb 16 2017 20:02
@Aviendhaast Yes, it is whatever the getJSON got from the API
AJ Robisch
@AJFelidae
Feb 16 2017 20:04
@SkyCoder01 But i can't call variables declared in other functions like this?

  function success(position) {
     latitude = position.coords.latitude;
     longitude = position.coords.longitude;
  }
  function error() {
    $('#output').text("Error: geolocation is not supported.");
  }
  navigator.geolocation.getCurrentPosition(success, error);
  ($'#output').text(success.latitude);
});
Gulsvi
@gulsvi
Feb 16 2017 20:05
@Aviendhaast The ($'#output').text(success.latitude) would have to be inside your success() function.
That's where you define those variables
Javascript scopes the variables to inside the function - and with a function where you have to go out and get some information from an API, you can't have global variables to my knowledge
AJ Robisch
@AJFelidae
Feb 16 2017 20:06
@SkyCoder01 Alright, thanks.
CamperBot
@camperbot
Feb 16 2017 20:06
aviendhaast sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: aviendhaast already gave skycoder01 points
Richard Aird
@boxxylol
Feb 16 2017 20:06
Can anyone help with the pulling right problem? :(
Gulsvi
@gulsvi
Feb 16 2017 20:07
@boxxylol That's a bootstrap class, where is your bootstrap.css file?
By the way <header> is not <head> they have different meanings
Richard Aird
@boxxylol
Feb 16 2017 20:08

.nav-pills{

font-size:1.7em;
background-color:black;

}
body{
background-color:white;
font-family:Lobster;
color:white;
}
h1{
padding:0;
margin-top:0px;
}

.pageOne{
background:url(https://images.unsplash.com/photo-1444703686981-a3abbc4d4fe3?dpr=1&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb&crop=);
background-size:cover;
height:800px;

}

Does that help?
:)
Gulsvi
@gulsvi
Feb 16 2017 20:10
@boxxylol ummm that's just your CSS, not bootstrap.css
Richard Aird
@boxxylol
Feb 16 2017 20:12
Thank you! @SkyCoder01
CamperBot
@camperbot
Feb 16 2017 20:12
boxxylol sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 218 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Feb 16 2017 20:12
Hope it helps!
Richard Aird
@boxxylol
Feb 16 2017 20:12
I will definitely check those out! :D I am following a youtube tutorial atm
Gulsvi
@gulsvi
Feb 16 2017 20:16
@boxxylol Go back to part 1 and they show you how to add bootstrap: https://youtu.be/2klCZXwfvLs?t=1m35s
That video is a little old, so use the links from here instead of using the "Quick Add" menu: https://www.bootstrapcdn.com/
singleincome
@singleincome
Feb 16 2017 20:21
@SkyCoder01 Any resources for creating a grid?
I want to have four quadrants with links to different projects I've made
Gulsvi
@gulsvi
Feb 16 2017 20:22
@singleincome I learned how to do that here: http://getbootstrap.com/css/#grid-example-basic
singleincome
@singleincome
Feb 16 2017 20:22
so like
x x
x x
Uau/
yay*
@SkyCoder01 Think I could great a grid on top of my PORTFOLIO div seen here?:
Gulsvi
@gulsvi
Feb 16 2017 20:25
Inside for sure, on top might require some CSS wizardry :)
Tony
@FreakishLancer
Feb 16 2017 20:30
Man...how long should it even take to implement an AI that's unbeatable in Tic-Tac-Toe? I've been working on it a whole day for the past 3 days! I must be doing something wrong here, but what?
Tom
@moT01
Feb 16 2017 20:32
@FreakishLancer makin any progress?
Tony
@FreakishLancer
Feb 16 2017 20:34
Easy mode is done - the logic for that was just making an AI that picked random, untaken spots. For hard mode, moves 1-2 and the last move (which is just to take the last spot) are done, but I am having trouble implementing the right behavior for moves 3-8 (for both sides). http://codepen.io/Freaklancer/pen/xgMbPm
The function I am working on is makeOptimalMove() You can see the unfinished conditionals I have in that function.
Pete Considine
@pjconsidine
Feb 16 2017 20:42
I'm stuck on the very same thing, @FreakishLancer
Tom
@moT01
Feb 16 2017 20:45
oh i dont know
Pete Considine
@pjconsidine
Feb 16 2017 20:45
I used magic squares to organize things and to identify where the best moves are, but I can't figure out an elegant routine for figuring out winning vs blocking
Mac
@itchick85
Feb 16 2017 20:47
I'm doing my portfolio page can't get image to show http://codepen.io/itchick85/pen/RKENBR
Tony
@FreakishLancer
Feb 16 2017 20:47
@pjconsidine @moT01 I think the easiest thing would be to treat the board as a matrix, so that you can shift the board around and make it easier on yourself and reduce the possibilities you need to take account of.
Tom
@moT01
Feb 16 2017 20:47
i made my board so each row/column or diagonal will add up to 15
Tony
@FreakishLancer
Feb 16 2017 20:47
I have no idea how to do that though because I haven't taken any sort of discrete math course.
Pete Considine
@pjconsidine
Feb 16 2017 20:47
That's what I did too, @moT01
I'm now trying to figure out a way to have the same function work to both win for the computer and block for the human
Tony
@FreakishLancer
Feb 16 2017 20:48
@moT01 @pjconsidine Why 15 though? You're adding 5 for each spot correct?
Pete Considine
@pjconsidine
Feb 16 2017 20:49
@tony that's the magic square thing. the numbers 1-9 fit into a tic tac toe board in such a way that each row, column and diagonal add up to 15
Pete Considine
@pjconsidine
Feb 16 2017 20:49
so a row would be 1, 9, 5
for example
Tom
@moT01
Feb 16 2017 20:49
help yourself if you want
@itchick85 your not putting an image in there anywhere, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img theres some examples towards the bottom
Pete Considine
@pjconsidine
Feb 16 2017 20:51
I think I'm outsmarting myself. trying to be too clever
Tony
@FreakishLancer
Feb 16 2017 20:51
@pjconsidine Do you think the magic square method will help me at this point? Or will it just be more overhead?
Pete Considine
@pjconsidine
Feb 16 2017 20:52
@FreakishLancer I thought it was an easier way to code the part for identifying where to move next
I just wrote it to find two in a row and move in the square that adds up to 15
the same thing works for rows, columns, and diagonals.
I just can't get it to do a win and a block with the same code
Tom
@moT01
Feb 16 2017 20:54
why dont you just do them separate
Pete Considine
@pjconsidine
Feb 16 2017 20:55
it's not DRY
salwame
@salwame
Feb 16 2017 20:55

hi! can someone please help me what's wrong with this code? <form action="/submit-cat-photo</form>"

<input type="text" placeholder="cat photo URL">
</form>

Pete Considine
@pjconsidine
Feb 16 2017 20:55
but I suppose the better thing would be to make it work and then make it pretty
Tony
@FreakishLancer
Feb 16 2017 20:55
@pjconsidine I'd been trying to do that same thing too. What I did was create a function that listed all the array combos possible for a win for each player based on each player's first move, and then find the intersection of the two arrays.
salwame
@salwame
Feb 16 2017 20:56
I am able to pass the test and can't figure out what am I doing wrong
Tom
@moT01
Feb 16 2017 20:56
you want them separate anyway, right? ...you want them to do a winning move before a blocking move
Tony
@FreakishLancer
Feb 16 2017 20:56
And I was quite happy that it led back to the symmetric difference challenge we had earlier, but now I am stuck.
salwame
@salwame
Feb 16 2017 20:56
I am not able*
Pete Considine
@pjconsidine
Feb 16 2017 20:57
@moT01 I was hoping to be able to do it recursively -- look for win, then look for block -- with the same block of code
probably trying to be way too fancy
Tom
@moT01
Feb 16 2017 20:57
yea, i cant help ya there
Pete Considine
@pjconsidine
Feb 16 2017 20:57
I was having problems with it not knowing when to stop before, so I started looking at reworking it
it would win and then block
lol
I think what I'm going to do is just make both parts in one function and then call the function once. That way it will know when to stop
not as fancy as I like, but then I'm still working on it months after I started, so....
Tony
@FreakishLancer
Feb 16 2017 20:59
@pjconsidine MONTHS? Well, that's not looking good for me, hehe.
I look forward to spending a month or several on this Tic-Tac-Toe project.
@pjconsidine Hmm, well I am playing your TTT game atm @moT01 and I realized that, for the purposes of my project, I don't need to create a perfect AI, just an AI that will prevent you from winning. Actually, strike that. I do think I am pretty close though....I just need to get this logic down right...
Pete Considine
@pjconsidine
Feb 16 2017 21:03
I started a new job in the mean time, so I got sidetracked
Tony
@FreakishLancer
Feb 16 2017 21:05
Oh.
Pete Considine
@pjconsidine
Feb 16 2017 21:06
yeah, I'm a lousy example to follow. :)
Tom
@moT01
Feb 16 2017 21:06
mine ai isnt perfect
there's one way to beat it
could probly close that up pretty quick, ...but i like it beatable
Tony
@FreakishLancer
Feb 16 2017 21:07
@moT01 You did it within 200 lines of code though. That's a plus...
Pete Considine
@pjconsidine
Feb 16 2017 21:08
I like the person who made an easy mode and a hard mode
Tyler Moeller
@TylerMoeller
Feb 16 2017 21:08
I never went with the minmax algorithm either, but it's still fairly challenging to beat if you do something like:
  1. If there's a win, take it, else
  2. If there's a block, take it, else
  3. Take a random corner, else
  4. Take a random square
Tom
@moT01
Feb 16 2017 21:08
easy mode should maybe be really easy mode
Pete Considine
@pjconsidine
Feb 16 2017 21:08
it was random moves, I think he said
Evan
@EvanDCP
Feb 16 2017 21:08
guys could you please check if my clock is working? http://codepen.io/EvanDCP18/full/bgZZqm/
Tom
@moT01
Feb 16 2017 21:08
it is
Tony
@FreakishLancer
Feb 16 2017 21:09
Yeah, a 5 year old could beat it every time! The logic is that simple! :)
Which is why I've been trying to make this hard mode!
@EvanDCP The clock doesn't seem to be working for me.
Tyler Moeller
@TylerMoeller
Feb 16 2017 21:09
Mine is also around 200 lines of code, I should get around to making it better one of these days
@EvanDCP Nope, not working for me either
Pete Considine
@pjconsidine
Feb 16 2017 21:10
I'm at 198 lines and a good number of them are comments and other things like an email obfuscator function
Tom
@moT01
Feb 16 2017 21:10
yea, mines at 197
Evan
@EvanDCP
Feb 16 2017 21:10
@FreakishLancer @TylerMoeller I see :( Thanks
CamperBot
@camperbot
Feb 16 2017 21:10
evandcp sends brownie points to @freakishlancer and @tylermoeller :sparkles: :thumbsup: :sparkles:
Tony
@FreakishLancer
Feb 16 2017 21:10
Well, the FCC example that's up right now is about 500 lines of code, so at least I know I'm not going on too much of a tangent.
CamperBot
@camperbot
Feb 16 2017 21:10
:cookie: 375 | @freakishlancer |http://www.freecodecamp.com/freakishlancer
:star2: 1492 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Pete Considine
@pjconsidine
Feb 16 2017 21:11
it's funny. I've been in agile project management for a very long time and I still can't get the hang of coding that way
Annetta Ives
@IvesNoIdea
Feb 16 2017 21:12

Hi everyone, can you help me with my Local Weather App? I've finally got the API call working, and I'm trying to output certain values to fields in my HTML document. Two of the outputs are working, but the final one isn't.
Here's the link to my CodePen and here is the relevant bit of code:

function(json) {
        $("#user-location").html(json.name);
        $("#user-temperature").html(json.main.temp);
        $("#user-weather").html(json.weather.description);
      });

The location and temperature are working, the weather description isn't.

I have a theory that it's because the weather sub-array is formatted differently in the returned JSON. But I don't know how to get round it.
Tom
@moT01
Feb 16 2017 21:14
@IvesNoIdea yea i think you're on the right track, i think the weather part of the object is an array
Chase
@Athabasco
Feb 16 2017 21:14
Why can't I get my page give new results at the top? I know append puts it at the bottom, but .htm() doesn't work.
http://codepen.io/Athabasco/pen/wgRGJX
Tony
@FreakishLancer
Feb 16 2017 21:15
@IvesNoIdea @moT01 Hmm, I don't think it is in an array. The syntax seems to be correct, based on the sample API the documentation gives.
Annetta Ives
@IvesNoIdea
Feb 16 2017 21:15
@moT01 Yeah, that's what I thought because it's in square brackets. But I've tried everything I can think of to access it and I'm getting nowhere fast :-(
Tony
@FreakishLancer
Feb 16 2017 21:16
Never mind, it is in brackets.
Chase
@Athabasco
Feb 16 2017 21:16
@IvesNoIdea Why aren't you using a $.getJSON
Tom
@moT01
Feb 16 2017 21:16
weather[0].description ?
Annetta Ives
@IvesNoIdea
Feb 16 2017 21:17
@Athabasco That's further up in my code, I just chopped out the bit where I'm doing my outputs.
Chase
@Athabasco
Feb 16 2017 21:17
@IvesNoIdea I'll just look at your code.
Pete Considine
@pjconsidine
Feb 16 2017 21:17
there's an extra level in the JSON
like @moT01 said
Chase
@Athabasco
Feb 16 2017 21:18
@IvesNoIdea Why don't you assign each temperature and what not to variables?
Annetta Ives
@IvesNoIdea
Feb 16 2017 21:18
@moT01 has nailed it. Putting the [0] in has made it work. Thanks.
CamperBot
@camperbot
Feb 16 2017 21:18
ivesnoidea sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 521 | @mot01 |http://www.freecodecamp.com/mot01
Evan
@EvanDCP
Feb 16 2017 21:18
guys I can't find what's wrong! why isn't my clock working? http://codepen.io/EvanDCP18/pen/bgZZqm
Annetta Ives
@IvesNoIdea
Feb 16 2017 21:19
@Athabasco That's the next step in my plan - I just wanted to check I could extract them from the JSON correctly first.
Pete Considine
@pjconsidine
Feb 16 2017 21:19
okay, I'm going to get back to it and see if I can't at least finish this thing
Alberto Feng
@AlbertoFeng
Feb 16 2017 21:19
Hi community, im building my personal portofolio webpage as a challenge from the Front End. While building the page ive noticed that my page doesnt reshape once i modify the windows size and by adding the container-fluid class it actually mess the navigation bar that ive built. Is there another way to make the page auto fit the window?
Pete Considine
@pjconsidine
Feb 16 2017 21:19
later all
Chase
@Athabasco
Feb 16 2017 21:19
@IvesNoIdea I'll show you my weather app. It's quite simple.
Tony
@FreakishLancer
Feb 16 2017 21:20
@pjconsidine Good luck....
Gulsvi
@gulsvi
Feb 16 2017 21:21
@Athabasco You could use .prepend() instead of .append() ?
hey all
Chase
@Athabasco
Feb 16 2017 21:21
@SkyCoder01 Oh... I will try.
Aaron
@apalm1341
Feb 16 2017 21:21
how can I center the white text in my orange box ?
the languages I have experience in text
on first part of my page
?
and also want it so that I have equal spacing around all the different languages images
Chase
@Athabasco
Feb 16 2017 21:22
@SkyCoder01 It worked, but now all the results are compiled at the bottom. Thanks
CamperBot
@camperbot
Feb 16 2017 21:22
athabasco sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 219 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Chase
@Athabasco
Feb 16 2017 21:22
@apalm1341 color: orange
Annetta Ives
@IvesNoIdea
Feb 16 2017 21:22
@Athabasco That looks great! I tried initialising all of my variables up front to give them global scope, but for some reason I couldn't get the function to over-write the values. I'm going to have another go at it. Thanks for your help.
CamperBot
@camperbot
Feb 16 2017 21:22
ivesnoidea sends brownie points to @athabasco :sparkles: :thumbsup: :sparkles:
:cookie: 243 | @athabasco |http://www.freecodecamp.com/athabasco
Chase
@Athabasco
Feb 16 2017 21:23
@IvesNoIdea No problem, any other issues just let me know.
Gulsvi
@gulsvi
Feb 16 2017 21:23
@Athabasco You'll also have to reverse your loop it seems or good results are at the bottom: for (var i = data[1].length - 1; i >= 0; i--) {
Aaron
@apalm1341
Feb 16 2017 21:23
@Athabasco ?
that gets rid of the white text
I don't want that
Annetta Ives
@IvesNoIdea
Feb 16 2017 21:23
@Athabasco :+1:
Chase
@Athabasco
Feb 16 2017 21:24
@apalm1341 oh... add bootstrap and use text-center only on your white box div
alpox
@alpox
Feb 16 2017 21:24
@EvanDCP Math.floor(count / 60 + ":" + count % 60) You give a string to a maths method. That cannot go well :D This gives you NaN and nothing will be set in the html
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:25
@SkyCoder01 I got it to work after all! I had been overriding the @font-face with an inline style. As soon as I deleted that, all was well.
Aaron
@apalm1341
Feb 16 2017 21:25
@Athabasco ok
how would that look like in code?
Gulsvi
@gulsvi
Feb 16 2017 21:25
@rsxhoxhi Awesome news :) good work :+1:
Chase
@Athabasco
Feb 16 2017 21:25
@apalm1341 class="text-center"
@SkyCoder01 It still compiles everything to the bottom. I have no clue how to fix it
Gulsvi
@gulsvi
Feb 16 2017 21:26
What do you mean it compiles everything to the bottom?
Tony
@FreakishLancer
Feb 16 2017 21:26
I wish CodePen wasn't so slow.........:(
Gulsvi
@gulsvi
Feb 16 2017 21:26
Like the list keeps getting longer with every search? I thought you wanted that :p
Aaron
@apalm1341
Feb 16 2017 21:27
<p class="text-center"> Languages I have experience in...</p>
?
something like that?
Chase
@Athabasco
Feb 16 2017 21:27
@SkyCoder01 No, I wanted to only show ten results, and I don't know how to do that
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:27
@SkyCoder01 Aaand now I can't center a row of three images to save my life. It's always something, isn't it?
Aaron
@apalm1341
Feb 16 2017 21:28
@Athabasco
Gulsvi
@gulsvi
Feb 16 2017 21:28
@Athabasco use your clear code at the start of the function: $("#article").empty();
Evan
@EvanDCP
Feb 16 2017 21:28
@alpox thank you! fixed it, but it's still not working it seems :(
CamperBot
@camperbot
Feb 16 2017 21:28
evandcp sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 778 | @alpox |http://www.freecodecamp.com/alpox
Evan
@EvanDCP
Feb 16 2017 21:28
the weird thing is that even from the start, the Reset button is still showing, even though i've set it as hide();
Gulsvi
@gulsvi
Feb 16 2017 21:28
haha @rsxhoxhi I think you have to put them all in a div and then use margin: auto on the div
Chase
@Athabasco
Feb 16 2017 21:28
@SkyCoder01 I'm going to quit bothering you, but that only shows one result.
Gulsvi
@gulsvi
Feb 16 2017 21:29
@Athabasco Before the for() loop :)
Otherwise you empty the results on every loop
function erything (title, desc, link){
  $("#article").empty();
  for (var i = data[1].length - 1; i >= 0; i--){
Chase
@Athabasco
Feb 16 2017 21:30
@SkyCoder01 OK you're a genius. Thank you.
CamperBot
@camperbot
Feb 16 2017 21:30
athabasco sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: athabasco already gave skycoder01 points
Adam Jacks
@AdamHJ123
Feb 16 2017 21:30
Hey guys, any idea how I can horizontally center my ul to the middle of the page?
http://codepen.io/AdamHJacks/pen/XpoMoG
Gulsvi
@gulsvi
Feb 16 2017 21:30
You're welcome :) back to work for me. Lunch is over :/
Chase
@Athabasco
Feb 16 2017 21:30
Hey guys, just finished my wikipedia viewer! http://codepen.io/Athabasco/full/wgRGJX/
Thanks @SkyCoder01
CamperBot
@camperbot
Feb 16 2017 21:30
athabasco sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: athabasco already gave skycoder01 points
alpox
@alpox
Feb 16 2017 21:31
@EvanDCP You miss a brace } else <-- right here must be a {
Line 23
Adam Jacks
@AdamHJ123
Feb 16 2017 21:31
@Athabasco I like it :D
alpox
@alpox
Feb 16 2017 21:33
@AdamHJ123 You may want to put the css for background and heights etc. on the nav and not on the ul. Then you can adjust the position of the ul inside of the nav
Evan
@EvanDCP
Feb 16 2017 21:33
@alpox thanks. But it's still not working, like nothing at all so it's gotta be some big bad mistake somewhere? maybe my codepen doesn't recognize jquery? :S
CamperBot
@camperbot
Feb 16 2017 21:33
evandcp sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:warning: evandcp already gave alpox points
alpox
@alpox
Feb 16 2017 21:35
@EvanDCP Well i get a time now :D
Adam Jacks
@AdamHJ123
Feb 16 2017 21:35
@alpox Ahhhh good idea
Evan
@EvanDCP
Feb 16 2017 21:37
@alpox well I guess that's something lol
Arash D
@ArashDai
Feb 16 2017 21:39
hey guys
im working on the quote generator machine
and im a bit stuck, my post request isnt working and everything lookd right to me
im building it with react
the function fires off on click
but there is an issue with my post request I think
alpox
@alpox
Feb 16 2017 21:42
@ArashDai 1. Uncaught ReferenceError: POST is not defined --> POST --> "POST" (Has to be a string)
Arash D
@ArashDai
Feb 16 2017 21:42
where did you find that error ? there is nothing in my console
alpox
@alpox
Feb 16 2017 21:42
If you fix that you get Cannot read property 'setState' of null
Means this is not defined where you use it
@ArashDai Its in the dev console of the browser. The codepen console shows only your console.log things but not the actual browser errors
Arash D
@ArashDai
Feb 16 2017 21:43
cool thank you
im not used to using codepen
alpox
@alpox
Feb 16 2017 21:46
@ArashDai To come around the 2. issue use:
this.newQuote.bind(this) instead of this.newQuote in the render method
React sadly doesn't autobind the methods to the right context
Arash D
@ArashDai
Feb 16 2017 21:50
thanks i was working on figureing out where to bind(his)
this*
ahh god damn it
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:51
Any ideas for getting a row of three equally-sized images to center? I'd like all three of them lined up, nice and neat, with that row centered on the page. I have done harder things than this today, and I cannot figure out why this isn't working for me. I tried putting them all in a <div class="center"> with .center {margin:auto;}, but no dice.
Arash D
@ArashDai
Feb 16 2017 21:51
I should know this
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:51
At the moment, the images are all side-by-side, but left-aligned, for some reason, despite my best efforts.
Arash D
@ArashDai
Feb 16 2017 21:52
are you using bootstrap or just plain css
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:52
Just plain css
alpox
@alpox
Feb 16 2017 21:52
@rsxhoxhi Hmm should they be edge to edge or space in between?
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:53
@alpox Right now there is a teeny bit of space in between, which is nice. I want to keep it just as it is, just center it. Scootch it over a little. It's driving me insane.
alpox
@alpox
Feb 16 2017 21:54
@rsxhoxhi Can you show a pen or so?
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:54
@alpox Sure. Please forgive my messy code. New at this, and not very neat about it, I'm afraid.
alpox
@alpox
Feb 16 2017 21:55
@rsxhoxhi I think easiest would be to put on the surrounding row:
display: flex;
justify-content: center;
alpox
@alpox
Feb 16 2017 21:56
@rsxhoxhi
.center {
  text-align: center;
}
Should do it
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:56
@alpox Not sure I'm even sharing my CodePen right. Did I mention I'm new at this?
alpox
@alpox
Feb 16 2017 21:57
@rsxhoxhi You did :-) and its no problem - most people here are totally new to this :-)
Evan
@EvanDCP
Feb 16 2017 21:57
guys can't anyone help me out here? what's wrong with my code? http://codepen.io/EvanDCP18/full/bgZZqm/
alpox
@alpox
Feb 16 2017 21:57
You really don't have to excuse
@rsxhoxhi
rsxhoxhi
@rsxhoxhi
Feb 16 2017 21:57
@alpox Thank you! That worked!
CamperBot
@camperbot
Feb 16 2017 21:57
rsxhoxhi sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 779 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Feb 16 2017 21:57
@EvanDCP Well first: what exactly is wrong about the behaviour? So i wouldn't have to read all usecases through
@rsxhoxhi Btw: nice pub! :-)
rsxhoxhi
@rsxhoxhi
Feb 16 2017 22:00
@alpox I majored in pub crawling.
alpox
@alpox
Feb 16 2017 22:00
I'm not native english so - pub crawling? :D
excuse me but that sounds to me like being so drunk that one has to crawl from pub to pub :D
Evan
@EvanDCP
Feb 16 2017 22:01
@alpox sorry, what do you mean?
nothing works so it's all wrong :(
achudoz
@achudoz
Feb 16 2017 22:01
@EvanDCP there is nothing obviously wrong with it
alpox
@alpox
Feb 16 2017 22:01
@EvanDCP I mean what behaviour does not work but you want it to work :D
Evan
@EvanDCP
Feb 16 2017 22:02
@alpox wait you mean it's working for you right now?
alpox
@alpox
Feb 16 2017 22:02
@EvanDCP I wouldn't say that. You put 5 min - there is a countdown with 5 min... whats wrong? :D
Ehh. yes :D
Evan
@EvanDCP
Feb 16 2017 22:02
@alpox oh lol I thought it wasn't working thanks man xD
CamperBot
@camperbot
Feb 16 2017 22:02
evandcp sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:warning: evandcp already gave alpox points
achudoz
@achudoz
Feb 16 2017 22:02
@EvanDCP the thing that is not working is that I can't modify the break time
Evan
@EvanDCP
Feb 16 2017 22:03
@achudoz oh I see. That's weird :/
alpox
@alpox
Feb 16 2017 22:03
Ah right
@EvanDCP Thats because you have another id than you accessed.
Use $("#breakNum") instead of $("#breakTime")
Since you put id="breakNum" in the html for the element referring to the right number
Evan
@EvanDCP
Feb 16 2017 22:06
@alpox thank you!
CamperBot
@camperbot
Feb 16 2017 22:06
evandcp sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:warning: evandcp already gave alpox points
Evan
@EvanDCP
Feb 16 2017 22:06
achudoz
@achudoz
Feb 16 2017 22:07
@EvanDCP yes
anyone know why the second click makes the div's disappear?
Evan
@EvanDCP
Feb 16 2017 22:09
@achudoz awesome thanks!
CamperBot
@camperbot
Feb 16 2017 22:09
evandcp sends brownie points to @achudoz :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @achudoz |http://www.freecodecamp.com/achudoz
achudoz
@achudoz
Feb 16 2017 22:10
can anyone help me with a minor problem in the quote generator challenge. I made one that works, but there is an issue with the tweet button that some characters can't be used as part of a URL, so when the generated quote is to be tweeted, it is sliced at the position of that character. I could just cut those characters out, but that seems dishonest of me, since you know it is a quote. Is there some way around it?
bitcoinabdi
@bitcoinabdi
Feb 16 2017 22:11
can anyone please look over my portfolio page and give feedback. Thanks codepen.io/abdihakim/pen/dNqVod?editors=1000
Paul Freeman
@pfreema1
Feb 16 2017 22:11
the page isn't very responsive to resizing
the logo on the front isnt centered for me
achudoz
@achudoz
Feb 16 2017 22:14
here is the codepen btw. Sorry for the simple CSS, i was focusing on functionality first
http://codepen.io/achudoz/pen/egoKYy
bitcoinabdi
@bitcoinabdi
Feb 16 2017 22:14
@pfreema1 thanks . Any ideas on how to improve that ?
CamperBot
@camperbot
Feb 16 2017 22:14
bitcoinabdi sends brownie points to @pfreema1 :sparkles: :thumbsup: :sparkles:
:cookie: 2 | @pfreema1 |http://www.freecodecamp.com/pfreema1
achudoz
@achudoz
Feb 16 2017 22:17

@bitcoinabdi definitely add

overflow-x: hidden;

to your body {}

Tony
@FreakishLancer
Feb 16 2017 22:20
I just can't seem to wrap my head around my Tic-Tac-Toe project. I guess I have to leave it for now.............................
alpox
@alpox
Feb 16 2017 22:21
@bitcoinabdi To center the profile change the margin-left: 600px; to margin-left: auto; in the .block selector.
achudoz
@achudoz
Feb 16 2017 22:21
@bitcoinabdi then adjust margins-/padding to move the logo. Or use text-align, bootstrap, flexbox whatever. also use less of px units and use more %, vw/vh etc
alpox
@alpox
Feb 16 2017 22:21
@FreakishLancer Any concrete problem with it which gave you a hard time?
Tony
@FreakishLancer
Feb 16 2017 22:23
@alpox I am having trouble getting the logic the AI to work in hard mode without resorting to mapping out all of the 81+ scenarios manually.
The function I am working on is makeOptimalMove().
I doubt anyone can help me though...my code is now over 350 lines long.
alpox
@alpox
Feb 16 2017 22:24
@achudoz Your tweet button seems to work fine for me
Tony
@FreakishLancer
Feb 16 2017 22:24
I want to start over, but I know that will take me 2 days. So...I'm just going to read some programming books hoping something sparks in my mind because it's ridiculous that I've been sitting in front of the computer staring and going nowhere.
Oh the joys of being a college dropout and having no peers to help you.
alpox
@alpox
Feb 16 2017 22:25
@FreakishLancer Ah sry, i didn't make an advanced AI yet :D but i heard there are special algorithms for that
bitcoinabdi
@bitcoinabdi
Feb 16 2017 22:25
@alpox @achudoz thank you very much guyz i really appreciate your help
CamperBot
@camperbot
Feb 16 2017 22:25
bitcoinabdi sends brownie points to @alpox and @achudoz :sparkles: :thumbsup: :sparkles:
:cookie: 268 | @achudoz |http://www.freecodecamp.com/achudoz
:cookie: 780 | @alpox |http://www.freecodecamp.com/alpox
Tony
@FreakishLancer
Feb 16 2017 22:25
@alpox I'm already too far deep into my current logic.
bitcoinabdi
@bitcoinabdi
Feb 16 2017 22:25
ill make the changes and report back
The community here are amazing
achudoz
@achudoz
Feb 16 2017 22:28
@alpox yeah it does most of the time, but it works by opening the twitter URL + the quote string. However URLs don't accept certain characters, such as semicolon ; or apostrophe ', so some of the quotes get sliced before they end.
Tony
@FreakishLancer
Feb 16 2017 22:33
Well, I'm going to go hop on the FCC forums. Seems like there is already a wealth of threads of people having similar problems, so hopefully I can find a way to understand my problem there!
Adel
@AdelMahjoub
Feb 16 2017 23:12
@FreakishLancer There are some algorithms for what you need
@FreakishLancer If you did the advanced fcc algorithms, no repeat please, it should not be hard to grasp
jampcat9
@jampcat9
Feb 16 2017 23:37
constructive criticism?? http://codepen.io/jampcat9/full/vgVYQN/
Cj
@ColtonJD
Feb 16 2017 23:37
Alright guys, I have what I believe should be a pretty simple problem
Trying to push/pull a combination of cols, but it's not behaving properly
<div class="row">
<div class="col-sm-6 col-sm-push-6">
<img src="" class="skill-pic" alt="Graphical Representation of skillset">
</div>
<div class="col-sm-6 col-sm-pull-6">
<h3>Front-End Design</h3>
<p>"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</p>
</div>
</div>
I would imagine this would force col a with the image to the right, but it isn't behaving that way in CodePen
Cory
@cfirst
Feb 16 2017 23:45
Any suggestions on where I should host my website?
Or what service I should use?
Heroku?
Cory
@cfirst
Feb 16 2017 23:55
@SkyCoder01 Any advice on where I should look to host my website?
Gulsvi
@gulsvi
Feb 16 2017 23:57
@cfirst I haven't gotten that far yet, but github pages is free
Cory
@cfirst
Feb 16 2017 23:58
@SkyCoder01 :thumbsup: