These are chat archives for FreeCodeCamp/HelpFrontEnd

30th
Sep 2016
Himad Mouhtar
@hmouhtar
Sep 30 2016 00:15
@JoacoSz yes
Evan W
@Dirtier
Sep 30 2016 00:54
Can someone help me figure out why this http://codepen.io/Dirtier/pen/ORjLoW
Looks like that in tiny browsers and phones?
Go to the actual codepen and you'll see what its supposed to look like
It looks like this in normal browsers, its even responsive. It will get bigger/smaller if you shrink the window
blob
@JoacoSz No all I see is this
blob
Evan W
@Dirtier
Sep 30 2016 01:02
I think it has something to do with me using VW for sizes. Or maybe its bootstrap. Any help would be greatly appreciated. Thanks
Evan W
@Dirtier
Sep 30 2016 01:14
Actually now I'm thinking its bc the js isn't rendering it on iPhones?
Bc it works right on every other phone.. And I don't think i'm using any really browser specific features
AliFox15
@AliFox15
Sep 30 2016 01:15
I didn't see any button. here,I'm using Firefox now
Evan W
@Dirtier
Sep 30 2016 01:16
@AliFox15 Talking to me?
AliFox15
@AliFox15
Sep 30 2016 01:17
yes
Evan W
@Dirtier
Sep 30 2016 01:17
What button?
Monesul Haque
@mones-cse
Sep 30 2016 01:17
@Dirtier i can see that button in firefox
AliFox15
@AliFox15
Sep 30 2016 01:18
The one on the temperture
Evan W
@Dirtier
Sep 30 2016 01:18
You guys see something that looks like this?
blob
AliFox15
@AliFox15
Sep 30 2016 01:18
Yes,but a slightly diffrent from yours
Evan W
@Dirtier
Sep 30 2016 01:19
@AliFox15 Oh well I removed it a few mins ago to see if thats what was affecting the positioning, but it wasnt so I put it back
@mones-cse You see that on your iPhone?
Monesul Haque
@mones-cse
Sep 30 2016 01:19
@Dirtier no on firefox from pc
Evan W
@Dirtier
Sep 30 2016 01:19
It doesnt seem to work on Safari or Chrome for iPhones for some reason. And I can't figure out why
@mones-cse Oh ok yea it works on like all browsers on computers. Just not phones
And for some reason not in the window when I paste it into here
Monesul Haque
@mones-cse
Sep 30 2016 01:20
@Dirtier oh you means i phone sorry i didnt get it
Evan W
@Dirtier
Sep 30 2016 01:20
All good :P
Idk either of you very good with troubleshooting that kind of stuff?
It would be a monumental help
Monesul Haque
@mones-cse
Sep 30 2016 01:22
@Dirtier for iphone it is better not to use px cause iphone has high resolution so some times it dont look same in the mobile as it should be
Evan W
@Dirtier
Sep 30 2016 01:22
Yea I'm using vw
AliFox15
@AliFox15
Sep 30 2016 01:22
Nah...I'm still learning,I have a question,I just came to lesson "Build a Tribute Page",Does it mean I need to build a website?
Evan W
@Dirtier
Sep 30 2016 01:23
@mones-cse I'm using vw instead of px on most of everything. and the elements that arent using vw are just being positioned by bootstrap
Margaret
@Margaret2
Sep 30 2016 01:23
@AliFox15 you need to build a page in codepen.io
Evan W
@Dirtier
Sep 30 2016 01:23
@AliFox15 Yes, click the codepen example in step 1 and you'll see what it wants you to make
@AliFox15 it wants you to build something that functions that same way, but it doesn't have to look the same
Evan W
@Dirtier
Sep 30 2016 01:25
Yea I'm using the cross browser testing that is free for codepens
The one that is linked from codepen or w/e. It shows me that it isn't working, but doesn't tell me why haha
@mones-cse thanks though
CamperBot
@camperbot
Sep 30 2016 01:26
dirtier sends brownie points to @mones-cse :sparkles: :thumbsup: :sparkles:
:cookie: 415 | @mones-cse |http://www.freecodecamp.com/mones-cse
Monesul Haque
@mones-cse
Sep 30 2016 01:27
i wish i could be more helpful
Evan W
@Dirtier
Sep 30 2016 01:30
Its all good man, so far you're at the top of the list as far as effort goes haha
PPPig
@PPPig
Sep 30 2016 01:35
Hello Bug
MaveyMa
@MaveyMa
Sep 30 2016 02:32
Heya! I just finished my first FCC project (Tribute Page). I invite anyone's constructive criticism. What did you like? What can I improve on? http://codepen.io/mavey/full/vXNRYy/
Rachel Reinheimer
@glgirl28
Sep 30 2016 02:50
@MaveyMa Great page! I like the fact that you have the date the page was last updated at the bottom of your page. Also, the description of your project is very detailed.
AliFox15
@AliFox15
Sep 30 2016 02:51
OK,THX @Dirtier @Margaret2
Joseph Padgett
@Jspadgett82
Sep 30 2016 02:51
@MaveyMa That is pretty awesome. I like your color scheme and that blinking cursor at the top, heh.
Hassen Rmili
@hassenrmili
Sep 30 2016 02:52
@MaveyMa nice :smile:
Joseph Padgett
@Jspadgett82
Sep 30 2016 02:53
@jdtdesigns I just now saw this. I am not sure what it was in reference to anymore.
Esterling Accime Youtube
@accimeesterlin
Sep 30 2016 03:11
Maveyma your tribute looks great, but not on mobile. It's not responsive. Other than that. Good work
Seth
@sethmchris
Sep 30 2016 03:17
@MaveyMa Good work. The blinking cursor is cool, and I like that you right-aligned your footer. One thing I want when I look at the page is the text and top image to line up. I would maybe give the body a max-width of 1200px, or make the image responsive.
MaveyMa
@MaveyMa
Sep 30 2016 03:22
@glgirl28 @Jspadgett82 @hassenrmili @sethmchris @accimeesterlin Thanks for feedback!
CamperBot
@camperbot
Sep 30 2016 03:22
maveyma sends brownie points to @glgirl28 and @jspadgett82 and @hassenrmili and @sethmchris and @accimeesterlin :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @hassenrmili |http://www.freecodecamp.com/hassenrmili
:cookie: 344 | @glgirl28 |http://www.freecodecamp.com/glgirl28
:cookie: 119 | @sethmchris |http://www.freecodecamp.com/sethmchris
:cookie: 317 | @accimeesterlin |http://www.freecodecamp.com/accimeesterlin
:cookie: 302 | @jspadgett82 |http://www.freecodecamp.com/jspadgett82
MaveyMa
@MaveyMa
Sep 30 2016 03:23
@accimeesterlin , can you please elaborate on making it responsive on mobile? Since this is the first project, I have not yet learned how to do that, or maybe forgot since I haven’t done FCC in a while.
Do you guys know if we’re supposed to make it responsive to all platforms?
Hassen Rmili
@hassenrmili
Sep 30 2016 03:24
@MaveyMa Nah leave it sis
d wilder
@alhazen1
Sep 30 2016 03:24
@MaveyMa I guess to have the same functionality as the example it would have to be responsive. This is a good project to cut your teeth on Bootstrap so I would. Nice looking tribute btw
@MaveyMa First one's free :smile: I put some quick bootstrap on a fork (and maybe broke some of you font format along the way). Comment out the border lines in the css http://s.codepen.io/alhazen1/debug/EgvLvW
MaveyMa
@MaveyMa
Sep 30 2016 03:31
First one’s free?
@alhazen1 This is my first codepen project, thanks for being so patient with me! (: So let me check my understanding: I think what happened here is you forked my code, modified it yourself, and now I’m free to take the changes you’ve made?
CamperBot
@camperbot
Sep 30 2016 03:34
maveyma sends brownie points to @alhazen1 :sparkles: :thumbsup: :sparkles:
:cookie: 388 | @alhazen1 |http://www.freecodecamp.com/alhazen1
Chris Cullen
@123xylem
Sep 30 2016 03:35
$(".panel").on("click",function(){

  var panelId=$(this).attr("id");

  audioF[panelId.toLowerCase()].play(); //<-----use id as key
  $("#"+panelId).toggleClass('animate');
  //HOW DO i get this to activate and go back to default onclick?

   pSeq.push(panelId);
  if(pSeq.length==cSeq.length){ <<<<<<<<<<//THIS IS NEWLY ADDED BUT I DONT KNOW WHERE TO CLOSE THE BRACKET AS IT SAYS Unexpected )
  var correct = pSeq.every(function(element, index) {
    if(element === cSeq[index]){
      cpuTurn=1;
     setInterval(cpuSeq(), 2000);

    } }};
    else { audioF['wrong'].play();
          pSeq=[];
          console.log("wrong");
          cpuTurn=0;
 });
  }       //here????
});
Can someone figure out how to close the bracket after my first if?
d wilder
@alhazen1
Sep 30 2016 03:36
@MaveyMa that is it exactly!
Esterling Accime Youtube
@accimeesterlin
Sep 30 2016 03:41
@MaveyMa it's best practice making your websites responsive, it's not part of the requirements. To make a website responsive, you have 2 ways to do it. Either you use bootstrap or you use media query CSS
I would recommend media query
Chris Santoso
@csantoso
Sep 30 2016 03:42
Hello, can anyone explain how to use the GET method for obtaining information from other websites?
MaveyMa
@MaveyMa
Sep 30 2016 03:43
@accimeesterlin I see! I’m learning a lot about best practices now (: Writing down everyone's feedback in notes and will work on improving. Super appreciate it !
Jhony Alberto Grillet Medina
@ChinuxParibus
Sep 30 2016 03:45
hello @csantoso you need to make an AJAX Request with JS to some page
Esterling Accime Youtube
@accimeesterlin
Sep 30 2016 03:46
@chris santoso you need to first find the API
Jhony Alberto Grillet Medina
@ChinuxParibus
Sep 30 2016 03:46
sometimes, the websites responses with HTML, sometimes don't, so maybe you need a library (like jQuery) to guarantee yourself to make an appropiated request
Esterling Accime Youtube
@accimeesterlin
Sep 30 2016 03:46
Then make a call to the server with get method
To grab their data from their server
@MaveyMa you're welcome. Feel free to ask me any questions
Chris Santoso
@csantoso
Sep 30 2016 03:48
I see, so how would you know which variables to pass through the query string to get the data you're looking for?
Esterling Accime Youtube
@accimeesterlin
Sep 30 2016 04:04
You need to learn these from the API documentation
Every API has a documentation
That helps you learn about how to use their API
Chris Cullen
@123xylem
Sep 30 2016 04:33

$(".panel").on("click", function() {

  var panelId = $(this).attr("id");

  audioF[panelId.toLowerCase()].play(); //<-----use id as key
  $("#" + panelId).toggleClass('animate');
  turnSeq.push(panelId);
  if (turnSeq.length > pSeq.length) {
    pSeq.push(panelId);
  } //Pushes only new moves into pSeq

  if (turnSeq.length == cSeq.length) {
    //starts cpu only when user finished move or wrong
    cpuTurn = 1;
    console.log(turnSeq.length, pSeq.length, cSeq.length);

var same=cSeq.concat(pSeq);
        return same.filter(function(val,ind,arr)//        HERE IS MY FUNCTION THAT CHECKS cSeq+pSeq starting at end of pSeq.length for exact match.. its stopping my code from running tho
                      {if(arr.slice(ind+cSeq.length.indexOf(val)===1))} //Any idea why or better a better algo for comparing 2 arrays exactly?
    cpuSeq(), 2000);

      }
    } else {
      audioF['wrong'].play(); // Why isnt this sound playing anymore?!
      pSeq = [];
      console.log("wrong");
      cpuTurn = 0;

    }
  });
}
});
Any idea why or better a better algo for comparing 2 arrays exactly?
Evan W
@Dirtier
Sep 30 2016 05:10
WOW I figured out why my Weather app wasn't working for iPhones without Babel......
It's bc iOS 10 just came out so the browser was ahead of the phone. Once updated to iOS 10 it works flawlessly
spent hours thinking it was something to do with my code lol fckn updates
aqibshah72
@aqibshah72
Sep 30 2016 05:12
Hello everyone! can somebody help?
Evan W
@Dirtier
Sep 30 2016 05:12
So thanks to all those who were trying to help troubleshoot it earlier
aqibshah72
@aqibshah72
Sep 30 2016 05:13
<div class="row"><div class="col-xs-4">
<button class="btn btn-block btn-primary">Like</button>
<button class="btn btn-block btn-info">Info</button>
<button class="btn btn-block btn-danger">Delete</button>
</div> </div>
how can i put these two classes for buttons?
@Dirtier <div class="row"><div class="col-xs-4">
<button class="btn btn-block btn-primary">Like</button>
<button class="btn btn-block btn-info">Info</button>
<button class="btn btn-block btn-danger">Delete</button>
</div> </div>
how can i put these two classes for buttons?
Evan W
@Dirtier
Sep 30 2016 05:17
?
wdu mean how can you put these two classes
c0d0er
@c0d0er
Sep 30 2016 05:31
i have a simple question, in my css code, why i cannot use body { background-color: green; } to change my background color?
<!DOCTYPE html>
<html lang="en">
<head>
  <style>
    body
{
  background-color: black;
}
</style>
    <meta charset="UTF-8">
    <title>Wikipedia Viewer</title>
    <link rel="stylesheet" href="wikiStyle.css">
    <link rel="stylesheet" 
    href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" 
    integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" 
    crossorigin="anonymous">
</head>
<body>
  <div class="container-fluid " >
        <div class="row text-center general">
   <div class="wiki-area"> 

      <form id="form-container">   
         <input type="text" id="wikiSearch" value="" oninput="loadData()">
         <a href="https://en.wikipedia.org/wiki/Special:Random" class="btn btn-default" target="_black">Random Wikipedia</a>
      </form>
      <div id="wikiContent">
        <ul id="wikiUl">
        </ul>

      </div>

         </div>
        </div>
     </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> 
    <script src="jquery.min.js"></script>
    <script src="lwikiScript.js"></script>
</body>
</html>
Sorin Ruse
@sorinr
Sep 30 2016 05:38
@c0d0er put the style tags after loading bootstrap
c0d0er
@c0d0er
Sep 30 2016 05:40
@sorinr thanks, if i use local css file, what should i do?
CamperBot
@camperbot
Sep 30 2016 05:40
c0d0er sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 744 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Sep 30 2016 05:41
@c0d0er link it after bootstrap to override the bootstrap's default
c0d0er
@c0d0er
Sep 30 2016 05:45
@sorinr problem resolved, why i need to put after bootstrap link?
Sorin Ruse
@sorinr
Sep 30 2016 05:45
@123xylem you can use array.join() into a string for both arrays and then compare the strings
@c0d0er because you have to override the bootstrap defaults
c0d0er
@c0d0er
Sep 30 2016 05:48
@sorinr got it! really appreciate your help!
johnny mayer
@johnnymayer
Sep 30 2016 05:48
yo what up everyone
can anyone help me out over here? i'm having a ton of trouble trying to get my logo on top of my background, i've got it on jsfiddle here: https://jsfiddle.net/z1cmd23s/7/
johnny mayer
@johnnymayer
Sep 30 2016 05:53
anyone? am i just chopped liver?!
kirbyedy
@kirbyedy
Sep 30 2016 05:57
@johnnymayer you might want to put the background to another div
and then put your logo over it
Sorin Ruse
@sorinr
Sep 30 2016 06:02
@c0d0er welcome
kirbyedy
@kirbyedy
Sep 30 2016 06:03
@johnnymayer like this
Screen Shot 2016-09-30 at 09.02.42.png
johnny mayer
@johnnymayer
Sep 30 2016 06:05
that's exactly what i want
but i want it centerd
i've been trying to figure this out for 3+ hours
kirbyedy
@kirbyedy
Sep 30 2016 06:06
well play a bit with it
at least you are close now
johnny mayer
@johnnymayer
Sep 30 2016 06:06
right
is that on jfiddle?
kirbyedy
@kirbyedy
Sep 30 2016 06:08
yes your fiddle
johnny mayer
@johnnymayer
Sep 30 2016 06:09
i don't see it popping up on my jsfiddle
kirbyedy
@kirbyedy
Sep 30 2016 06:16
dont know, never worked with jsfiddle
you have the code on the picture, so retype it
MaveyMa
@MaveyMa
Sep 30 2016 06:19
o.o I usually ask for help after 20 minutes or so, because there is a certain point where it’s faster to ask around for another pair of eyes on it and save time
can you post an updated link? @kirbyedy
I guess I cant, because its not my fiddle
johnny mayer
@johnnymayer
Sep 30 2016 06:22
hmmm, i think there's a way to update/collab it
but i'm not sure
MaveyMa
@MaveyMa
Sep 30 2016 06:23
i think you need to fork it
kirbyedy
@kirbyedy
Sep 30 2016 06:23
as I said never worked with fiddle
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" type="text/css" href="http://www.asphaltocean.com/wp-content/themes/aotheme/style.css">
  <meta charset="utf-8">
  <title>asphalt ocean</title>
</head>
<style>

body {
  background: url('http://www.asphaltocean.com/wp-content/themes/aotheme/images/vanfirefull.jpg') no-repeat center center fixed; 
  background-size: cover;
}

.logo {
background:url('http://www.asphaltocean.com/wp-content/themes/aotheme/images/asoclogo320.png') no-repeat top left;
width:350px;
height:350px;
}
</style>
<body>
  <div class="logo">
    </div>
</body>
</html>
NIKHIL
@nikhil-m
Sep 30 2016 06:31
hello all
please review my first project
http://codepen.io/nikhilm/full/Egvpmq/
Sorin Ruse
@sorinr
Sep 30 2016 06:36
@nikhil-m its ok. i would only add a @media query for mobile screens and change the body's margin from 40px to 10px because on mobiles it will eat 80px from your display width. hope it makes sense
johnny mayer
@johnnymayer
Sep 30 2016 06:37
hmmm
NIKHIL
@nikhil-m
Sep 30 2016 06:37
This message was deleted
johnny mayer
@johnnymayer
Sep 30 2016 06:38
wait, that seems all screwy, is that the css and the html @kirbyedy
kirbyedy
@kirbyedy
Sep 30 2016 06:39
yes
johnny mayer
@johnnymayer
Sep 30 2016 06:39
okay, lemme test real quick
kirbyedy
@kirbyedy
Sep 30 2016 06:39
if you copy/paste into a new fiddle it should work
johnny mayer
@johnnymayer
Sep 30 2016 06:40
right
so wait, i can put the style inside the html?!
and not just in the css?!
should the body and .logo be in the css or just the html?!
kirbyedy
@kirbyedy
Sep 30 2016 06:40
basically yes, but it is better to do it in separate css file
move everything inside <style> to the css part
johnny mayer
@johnnymayer
Sep 30 2016 06:42
and then how do i implement those in the html?!
kirbyedy
@kirbyedy
Sep 30 2016 06:44
link like you normally do
Sorin Ruse
@sorinr
Sep 30 2016 06:57
@johnnymayer this is what you want to achive ? test
johnny mayer
@johnnymayer
Sep 30 2016 06:58
yeah, oh man, codepen.io is GREAT
i'm totally lost again here
Sorin Ruse
@sorinr
Sep 30 2016 07:02
@johnnymayer the principle is the same as for fiddle
@johnnymayer in the html part you write anything you have between <body></body> no need to add this tags coz they are automatically added. the css and js parts are self explanatory. in the upper right corner you have a button settings for the general pen settings where you can load libraries you want by type css, javascript
johnny mayer
@johnnymayer
Sep 30 2016 07:06
okay, i get codepen.io sure
but i mean with my code i'm totally lost
i have zero idea of what to put where and how to format what class and then the image goes in the background and then you do the style query and then set a wrapper and then use a div for your wrapper inside your div and then put the head in then put the tag on the class and insert the wrapper via the div and then use your stylesheet
that's about where i'm at right now
kirbyedy
@kirbyedy
Sep 30 2016 07:09
@johnnymayer maybe this course will help: https://www.codecademy.com/learn/learn-html-css
Sorin Ruse
@sorinr
Sep 30 2016 07:10
@kirbyedy :+1:
John Alcher
@alchermd
Sep 30 2016 07:10

Can anyone help me fix this issue? When I'm requesting a JSON from an API, I'm getting this in the console

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

How should I approach this?

Sorin Ruse
@sorinr
Sep 30 2016 07:31
@alchermd what api are you trying to access?
John Alcher
@alchermd
Sep 30 2016 07:32
@sorinr hey! here's my code for more context:
$(document).ready(function () {
  $("#new-quote").on("click", function () {
    $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en", function (data) {
      $("body").append(data.quoteText)
    })
  })
})
Sorin Ruse
@sorinr
Sep 30 2016 07:33
@alchermd try adding after '&lang=en' &callback= like '&lang=en&callback='
John Alcher
@alchermd
Sep 30 2016 07:34
@sorinr I already tried that, it gave back an Uncaught Syntax Error
johnny mayer
@johnnymayer
Sep 30 2016 07:38
@kirbyedy got it done finally
managed to make my own class for the mailto link, pretty happy about that
kirbyedy
@kirbyedy
Sep 30 2016 07:39
:thumbsup:
Sorin Ruse
@sorinr
Sep 30 2016 07:41
@alchermd it is: http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=jsonp&lang=en&jsonp=? and it will work
@alchermd here an example: quotes
johnny mayer
@johnnymayer
Sep 30 2016 07:44
@kirbyedy http://codepen.io/johnnymayer/pen/vXJzJA there's the finalized version for now
John Alcher
@alchermd
Sep 30 2016 07:45
@sorinr ohhh I guess I have to add &jsonp=? as well. Anyway, I already solved the problem with another API :D Thanks!
CamperBot
@camperbot
Sep 30 2016 07:45
alchermd sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 745 | @sorinr |http://www.freecodecamp.com/sorinr
johnny mayer
@johnnymayer
Sep 30 2016 07:45
might need some tweaking and a little this/that, but i'm very satisfied and feel really accomplished
Joel Abees
@JoelAbees
Sep 30 2016 08:04
Need help in show weather app/
cahllenge
I'm using the openweathermap for the appi.
I need to change the background image based on the data I extract from the site. But I don't know all possible set of values.
kirbyedy
@kirbyedy
Sep 30 2016 08:07
@JoelAbees choose couple of them, no need for all
Joel Abees
@JoelAbees
Sep 30 2016 08:09
@kirbyedy Alright then. Thank you.
CamperBot
@camperbot
Sep 30 2016 08:09
joelabees sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1423 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Muhammad Hasham
@MohammadHasham
Sep 30 2016 08:48
is there any grid like col-1,col-2 in html5?
Adam Lichter
@spot1000
Sep 30 2016 08:49
@MohammadHasham there is a thing called flexbox in CSS3, check it out here https://css-tricks.com/snippets/css/a-guide-to-flexbox/
but if you're looking for columns and stuff, bootstrap isyour best bet
they have a bunch of their own CSS classes that make setting up separations pretty easy
Muhammad Hasham
@MohammadHasham
Sep 30 2016 08:51
what about col-1,col-2 int html actually i am not allowed to use bootstrap in a local project
@spot1000
Adam Lichter
@spot1000
Sep 30 2016 08:51
I'd use flexbox, it's part of CSS already
Sorin Ruse
@sorinr
Sep 30 2016 08:52
@MohammadHasham define in your css these classes col-1, col-2 etc and give them width in %
Adam Lichter
@spot1000
Sep 30 2016 08:52
quickstart: add "display: flex;" to your parent div, and then you can move around your child divs pretty easily
Muhammad Hasham
@MohammadHasham
Sep 30 2016 08:53
@spot1000 Thanks
CamperBot
@camperbot
Sep 30 2016 08:53
mohammadhasham sends brownie points to @spot1000 :sparkles: :thumbsup: :sparkles:
:cookie: 379 | @spot1000 |http://www.freecodecamp.com/spot1000
Adam Lichter
@spot1000
Sep 30 2016 08:53
also, making your own like @sorinr say works pretty good
Muhammad Hasham
@MohammadHasham
Sep 30 2016 08:53
@sorinr can u see my code that why is it not working?
Sorin Ruse
@sorinr
Sep 30 2016 08:54
@MohammadHasham what code?
Muhammad Hasham
@MohammadHasham
Sep 30 2016 08:55
@sorinr why is itn ot working
the last three black circles are not in the same row
Sorin Ruse
@sorinr
Sep 30 2016 08:59
@MohammadHasham they should be in the same line as the first one?
kirbyedy
@kirbyedy
Sep 30 2016 08:59
@MohammadHasham you are using bootstrap col grid, but I dont see you loaded the library ?
Adam Lichter
@spot1000
Sep 30 2016 08:59
add display: inline; to your css
Muhammad Hasham
@MohammadHasham
Sep 30 2016 08:59
@kirbyedy i am trying without that
@sorinr yes
kirbyedy
@kirbyedy
Sep 30 2016 08:59
ah ok
Muhammad Hasham
@MohammadHasham
Sep 30 2016 08:59
@spot1000 where shall i add that?
Adam Lichter
@spot1000
Sep 30 2016 09:00
add it into your col classes
Muhammad Hasham
@MohammadHasham
Sep 30 2016 09:02
@spot1000 It works !!! Thanks
CamperBot
@camperbot
Sep 30 2016 09:02
mohammadhasham sends brownie points to @spot1000 :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave spot1000 points
Sorin Ruse
@sorinr
Sep 30 2016 09:03
@MohammadHasham add this to css: .col-4{ margin: 0 auto; }
Muhammad Hasham
@MohammadHasham
Sep 30 2016 09:03
@sorinr Thanls
Thanks
@sorinr Thanks
CamperBot
@camperbot
Sep 30 2016 09:03
mohammadhasham sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 746 | @sorinr |http://www.freecodecamp.com/sorinr
Muhammad Hasham
@MohammadHasham
Sep 30 2016 09:10
blob
How can i add borders just along my image like in the picture in html not bootstrap
@spot1000 @kirbyedy @sorinr
Sorin Ruse
@sorinr
Sep 30 2016 09:14
@MohammadHasham in css: img{ border: type of border, size, color, etc}
@MohammadHasham here some info: http://www.w3schools.com/css/css_border.asp
Rimi.
@Codevotee
Sep 30 2016 09:17
@MohammadHasham
CSS styling: img { border: solid 2px black; }
HTML inline styling: <img style="border: solid 2px black;"/>
Muhammad Hasham
@MohammadHasham
Sep 30 2016 09:25
@APRim05 @sorinr @spot1000 @kirbyedy sorry for disturbing again and again but just a last problem that why is the fourth picture not in the same row as i have used col-3 so 3+3+3+3 = 12 so why is the last image not on the same row?
Any Idea?
Rimi.
@Codevotee
Sep 30 2016 09:31
@MohammadHasham not sure, could be your css styling that's doing that
Sorin Ruse
@sorinr
Sep 30 2016 09:31
@MohammadHasham because the last one exceeds the width of the display. my laptop display width has 1351px / 4 = 338px and your images have 348px in width that will make 348x4=1392px
Muhammad Hasham
@MohammadHasham
Sep 30 2016 09:32
So what is the solution for that?
@sorinr
i have also made the height and width of image s to 20%
but still the same issue @sorinr
Sorin Ruse
@sorinr
Sep 30 2016 09:49
@MohammadHasham add this to css: .row{ display: inline-flex; }
@MohammadHasham and comment out the padding-left:15%; in class picOne
Muhammad Hasham
@MohammadHasham
Sep 30 2016 09:54
@sorinr Thanks
CamperBot
@camperbot
Sep 30 2016 09:54
mohammadhasham sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave sorinr points
Muhammad Hasham
@MohammadHasham
Sep 30 2016 09:54
but why is my padding not working
Sorin Ruse
@sorinr
Sep 30 2016 09:58
@MohammadHasham use this css: .row{ display: inline-flex; max-width:99%; justify-content: center; } with flex no need for padding. it is auto adjusted
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:02
@sorinr Thank you very much
CamperBot
@camperbot
Sep 30 2016 10:02
mohammadhasham sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave sorinr points
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 10:13
Hi everyone! Can anyone help with the wiki search challenge?
not sure whats wrong
Himanshu Maurya
@lordzuko
Sep 30 2016 10:22
Need help with the projects section on codepen, in the container whose id is projects there is a sidebar which is not visible here on codepen but its visible on my pc. Please have a look https://codepen.io/lordzuko/pen/ozZrgg
Sorin Ruse
@sorinr
Sep 30 2016 10:30
@lidiawisniewska try adding to the ajax url like: + key+'&callback=?'
jessniem
@jessniem
Sep 30 2016 10:35
Hello! Anyone here who can give me a hand to see why my $_POST is empty after submitting a form?
jessniem
@jessniem
Sep 30 2016 10:40
<form method="get" action="tack.php">
      <table>
        <thead>
          <tr>
            <th>Smak</th>
            <th>Pris (sek)</th>
            <th>Antal</th>
          </tr>
        </thead>
        <tbody>
          <?php for ($i=0; $i < count($products); $i++) { ?>
            <tr>
            <td><?php echo $products[$i]["title"] ?></td>
            <td><?php echo $products[$i]["price"] ?></td>
            <td><input type="number" value="0" name="artno-<?php echo $i +1; ?>"></td>
          </tr>
          <?php } ?>
        </tbody>
      </table>

      <fieldset>
        <legend>Orderformulär</legend>
        <label>Namn: </label>
        <input type="text" name="name" placeholder="Förnamn Efternamn" value=""><br>
        <label>E-mail: </label>
        <input type="email" name="email" placeholder="e-post"value=""><br>
        <label>Telefon: </label>
        <input type="telephone" name="phone" placeholder="Telefonnummer" value=""><br>
        <label>Adress: </label> <?php // TODO: gör adress dubbelt så lång, sätt postnr och stad på samma rad under ?>
        <input type="text" name="street" placeholder="Adress" value=""><br>
        <input type="text" name="postalcode" placeholder="Postnummer" value="">
        <input type="text" name="city" placeholder="Stad" value=""><br>
        <input type="button" name="submit" value="Beställ">
      </fieldset>
    </form>
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:43
blob
How can i adjust the left border of the image
@sorinr @jessniem
jessniem
@jessniem
Sep 30 2016 10:44
@MohammadHasham Do you have padding on it?
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:44
yes :worried: but that is necessary
in my project
jessniem
@jessniem
Sep 30 2016 10:45
What do you want to do with the padding? And the margin?
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:45
i want to display the image at some distance from the left margin (project requirement)
@jessniem
jessniem
@jessniem
Sep 30 2016 10:47
@MohammadHasham If you remove the padding the margin will do that for you, and the border will stay around the edge of the image
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 10:47
@sorinr i think i got it
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:48
but that how will i place my image at some distance?
@jessniem
Sorin Ruse
@sorinr
Sep 30 2016 10:48
@MohammadHasham and in the white space at the left of img do you put some text?
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:48
No i havent put any text
@sorinr
Sorin Ruse
@sorinr
Sep 30 2016 10:48
@lidiawisniewska :+1:
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 10:48
i still have one issue - when i hit enter it refreshes the page
jessniem
@jessniem
Sep 30 2016 10:48
@MohammadHasham With the margin
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 10:48
@sorinr thanks :)
CamperBot
@camperbot
Sep 30 2016 10:48
lidiawisniewska sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 747 | @sorinr |http://www.freecodecamp.com/sorinr
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:49
i see.
@jessniem still the same issue :worried:
Sorin Ruse
@sorinr
Sep 30 2016 10:52
@lidiawisniewska instead of $("#searchbutton").click(); just call wikiSearch();
Joel Santos
@St3ps
Sep 30 2016 10:56
Anyone out there who knows Git? I need to revert things from a last commit. How can I do that?
I've gone over Stack Overflow but there's like ...10 suggestions and i sort of don't want to screw up
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 10:56
@sorinr not worked
Sorin Ruse
@sorinr
Sep 30 2016 10:57
@lidiawisniewska leave in place event.preventDefault() otherwise when you press enter will try to submit the form :)
Stephen James
@sjames1958gm
Sep 30 2016 10:58
@St3ps I used this page the last time I needed that.
https://github.com/blog/2019-how-to-undo-almost-anything-with-git
Muhammad Hasham
@MohammadHasham
Sep 30 2016 10:58
@jessniem @sorinr Thanks
CamperBot
@camperbot
Sep 30 2016 10:58
mohammadhasham sends brownie points to @jessniem and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 748 | @sorinr |http://www.freecodecamp.com/sorinr
:cookie: 275 | @jessniem |http://www.freecodecamp.com/jessniem
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 10:59
@sorinr like that?
$("#search-field").keyup(function (event) {
if (event.keyCode === 13) {
event.preventDefault();
wikisearch();
}
});
Sorin Ruse
@sorinr
Sep 30 2016 11:01
This message was deleted
@lidiawisniewska wikiSearch(); not wikisearch();
@lidiawisniewska @lidiawisniewska wikiSearch(); not wikisearch();

@lidiawisniewska it should be: ```
$(document).ready(function(){
$("#search-field").bind("keypress",function (event) {
if (event.keyCode === 13) {
event.preventDefault();
wikiSearch();
}
});
});

```

Joel Santos
@St3ps
Sep 30 2016 11:05

@sjames1958gm hey James, I think the solution would be the first one -git revert <SHA> but i'm confused over the comit order. Alright, i want to undo the last commit to my project. But this last commit was brought by a contributor. so now on github, i have his commit and i have his commit and a merge pull request commit

So i'm a bit confused.
Here's the link, maybe it'll help explaining
https://github.com/St3ps/St3ps.github.io/commits/master

My question is, if i revert the last one, it'll be ok?
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 11:06
@sorinr I cant believe i missed that!
@sorinr thanks so much!!!
CamperBot
@camperbot
Sep 30 2016 11:06
lidiawisniewska sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: lidiawisniewska already gave sorinr points
Lidia Wisniewska
@lidiawisniewska
Sep 30 2016 11:07
need a break now
Sorin Ruse
@sorinr
Sep 30 2016 11:07
@lidiawisniewska welcome
Stephen James
@sjames1958gm
Sep 30 2016 11:47
@St3ps Did you resolve it
Muhammad Hasham
@MohammadHasham
Sep 30 2016 11:52
This message was deleted
This message was deleted
Stephen James
@sjames1958gm
Sep 30 2016 11:53
@MohammadHasham You can use css width property, if you are using bootstrap give it a wider column, or whatever container it is in
Joel Santos
@St3ps
Sep 30 2016 11:56
@sjames1958gm Yes, I worked it out, thanks! Since it was a commit merged through a pull request i figured you could just revert it from github itself...
CamperBot
@camperbot
Sep 30 2016 11:56
st3ps sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3577 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
jessniem
@jessniem
Sep 30 2016 12:29
Anyone here knows php?
Robert Uivarosi
@URobert
Sep 30 2016 12:31
@jessniem some php :) what do you need ?
jessniem
@jessniem
Sep 30 2016 12:32
@URobert I have a form that I would like to present in a table, but only the first "item" is in the table
Robert Uivarosi
@URobert
Sep 30 2016 12:33
@jessniem code or preview and code ?
:)
jessniem
@jessniem
Sep 30 2016 12:33
```$totalPrice = 0;
?>
<table>
<thead>
<tr>
<th>Artikel</th>
<th>Antal</th>
<th>Pris/st</th>
<th>Summa</th>
</tr>
</thead>
<?php
for ($i=0; $i < count($products); $i++) {
$item = $products[$i]["title"];
$price = $products[$i]["price"];
$quantity = $_POST[$i];
$totalItemPrice = $price * $quantity;
if ($quantity == 0) {
continue;
}
$totalPrice += $totalItemPrice;
?>
<tbody>
<tr>
<td> <?php echo $item ?></td>
<td> <?php echo $quantity ?>st</td>
<td> <?php echo $price ?>kr</td>
<td> <?php echo $totalItemPrice ?>kr</td>
</tr>
</tbody>
</table>
<?php
}```
Darryl Lloyd Marino
@cerberusjin
Sep 30 2016 12:59
hello guys, how can I remove the padding when im using bootstrap?
jessniem
@jessniem
Sep 30 2016 12:59
@cerberusjin have you tried just setting it to 0?
Darryl Lloyd Marino
@cerberusjin
Sep 30 2016 13:00
I tried it using padding: 0 !important; but it didnt do anything
jessniem
@jessniem
Sep 30 2016 13:01
Strange, then I don't know
Darryl Lloyd Marino
@cerberusjin
Sep 30 2016 13:01
i also tried this .nopadding {
//margin: 0 !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
kirbyedy
@kirbyedy
Sep 30 2016 13:06
margin:0;
padding: 0;
on body
Darryl Lloyd Marino
@cerberusjin
Sep 30 2016 13:08
i only need it for one of my columns
Joel Santos
@St3ps
Sep 30 2016 13:16
Hey guys, I've got a question about....well, it's about getting a job. A friend of mine refered me the phone number and email of a potential employer with opportunities that concern my profile, and my question is...should i call, or should I email?
Darryl Lloyd Marino
@cerberusjin
Sep 30 2016 13:29
I think you should send him first your cv unless it's for the interview
Sorin Ruse
@sorinr
Sep 30 2016 13:34
@St3ps if your friend already told your potential employer about you, i would just call, otherwise send an email and introduce yourself mentioning from where you have got his contact details
kirbyedy
@kirbyedy
Sep 30 2016 13:35
mail with reference
Joel Santos
@St3ps
Sep 30 2016 13:44
@sorinr @kirbyedy @cerberusjin I think i'm going to go with email, i've thought it through and, i dont know, my friend could've refered me yesterday or a month ago for all i know, so i'm thinking calling a guy without knowing when this happened.......so let's say i'll go with email, what would you put in subject?
just the usual stuff you'd put in a job application or ....
Darryl Lloyd Marino
@cerberusjin
Sep 30 2016 13:47
@St3ps just email him with the subject "Applying for <position>"
swarnesh mattapalli
@mattapalliswarnesh
Sep 30 2016 13:54
how to build a tribute page
Joel Santos
@St3ps
Sep 30 2016 14:07
@cerberusjin @sorinr @kirbyedy sent it, thanks guys.
CamperBot
@camperbot
Sep 30 2016 14:07
st3ps sends brownie points to @cerberusjin and @sorinr and @kirbyedy :sparkles: :thumbsup: :sparkles:
:cookie: 147 | @cerberusjin |http://www.freecodecamp.com/cerberusjin
:cookie: 749 | @sorinr |http://www.freecodecamp.com/sorinr
:star2: 1425 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Creative Shin
@CreativeShin
Sep 30 2016 15:01
anyone knows Angular JS here?
Alin Pisica
@alinp25
Sep 30 2016 15:29
Hello! :) How coul I keep track of the Simon game order of buttons? Like what have been pressed and what I need to check?
Vector?
Himad Mouhtar
@hmouhtar
Sep 30 2016 15:34
@AlinP25 you could use two arrays, one with the original order and the other with the new order, in each instance you check those two arrays to find if the user is using the correct order
RKZoltan
@RKZoltan
Sep 30 2016 15:42

Could someone please explain to me what this is:

<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">

thank you. BTW Repent for the kingdom of heaven is at hand. Believe the gospel of Jesus Christ

Sorin Ruse
@sorinr
Sep 30 2016 15:48
@RKZoltan it means on extra small devices the div will have full width(col-xs-12), for small will occupy 10 colums with one empty column at the beginning(col-sm-....) and on medium and up will take 8 columns with 2 empty ones at the beginning (col-md-....). for more info read the http://getbootstrap.com/css/#grid
RKZoltan
@RKZoltan
Sep 30 2016 15:49
@sorinr thanks
CamperBot
@camperbot
Sep 30 2016 15:49
rkzoltan sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 750 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Sep 30 2016 15:50
@RKZoltan welcome
RKZoltan
@RKZoltan
Sep 30 2016 15:56
what if col-xs-12 is alone as a class?
tommy
@tommygebru
Sep 30 2016 16:00
Looking for feeback and critiques
http://codepen.io/gebrutommy/pen/yaXxmX
Lenuta
@ionutlenuta
Sep 30 2016 16:04
Can someone explain me why doesn't work css code?
tommy
@tommygebru
Sep 30 2016 16:11
@ionutlenuta you are going to have to be specific
Tyler Moeller
@TylerMoeller
Sep 30 2016 16:14
@ionutlenuta Remove the first line of your HTML:
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
^^ Adding that to your HTML is overriding your CSS - it's already added in your codepen settings.
Lenuta
@ionutlenuta
Sep 30 2016 16:16
where I was not specific? @tommygebru
tommy
@tommygebru
Sep 30 2016 16:16
sorry but it looked like it was designed
Lenuta
@ionutlenuta
Sep 30 2016 16:18
it worked! Thank you @TylerMoeller
CamperBot
@camperbot
Sep 30 2016 16:18
ionutlenuta sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 865 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Sep 30 2016 16:21
@tommygebru Good job on your Wikipedia Viewer - it's a clean design. A couple of suggestions:
  • Add target="_blank" to your URLs, so links open in a new tab instead of codepen's iframe. (Lines 19 and 22 of your HTML and line 42 of your JS)
  • On line 25 of your JS, it should be async not asynch, but you can delete this line, you want the ajax call to be async and it is that way by default.
  • Hyperlink your buttons like this, so users can click anywhere on the button to open the link: <a href="https://en.wikipedia.org/wiki/Wikipedia:Top_25_Report"><button>Popular</button></a>. The way it is now, the user has to click exactly on the button text to open the link.
@ionutlenuta Your welcome, glad it helped
tommy
@tommygebru
Sep 30 2016 16:21
Geez you are right!!
@TylerMoeller thanks
CamperBot
@camperbot
Sep 30 2016 16:22
tommygebru sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 866 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
tommy
@tommygebru
Sep 30 2016 16:22
the project is no good if its used once :wink:
Tyler Moeller
@TylerMoeller
Sep 30 2016 16:23
:)
tommy
@tommygebru
Sep 30 2016 16:23
I saw your other suggestions.... looks like I have my Wikipediaviewer 2.0
:fire: :fire: :fire:
also I will use enter keypress
thanks again @TylerMoeller
CamperBot
@camperbot
Sep 30 2016 16:24
tommygebru sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: tommygebru already gave tylermoeller points
Tyler Moeller
@TylerMoeller
Sep 30 2016 16:24
I didn't think about that, yeah good idea
I thought you were using material design for a second, those cards are nice in the search results
Lenuta
@ionutlenuta
Sep 30 2016 16:41
I have one more question: why is that white frame around the picture? @TylerMoeller
Tyler Moeller
@TylerMoeller
Sep 30 2016 16:44
@ionutlenuta This is the thumbnail class you added to the div around the image.
If you want it to be smaller, remove the <div class="thumbnail"> and apply it to the image instead:
<img class="thumbnail center-block img-responsive" src="http://cdnd.ghiduri-turistice.info/tags/662/gt-transfagarasan-662.jpg" alt="transfagarasan">
Lenuta
@ionutlenuta
Sep 30 2016 16:46
wow thank you very much @TylerMoeller
CamperBot
@camperbot
Sep 30 2016 16:46
ionutlenuta sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: ionutlenuta already gave tylermoeller points
johnny mayer
@johnnymayer
Sep 30 2016 17:56
what up y'all
cameron nicklaus
@camnicklaus
Sep 30 2016 18:02
hey guys, I'm working on my wiki search zipline and I'm a little confused by the api output...anybody past that one and able to help me out?
johnny mayer
@johnnymayer
Sep 30 2016 18:22
http://codepen.io/johnnymayer/pen/ALQAQV can someone hip me to why my text on my 404 isn't styling correctly?
Tyler Moeller
@TylerMoeller
Sep 30 2016 18:43
@johnnymayer Codepen's HTML panel is only for HTML between the <body> tags. Move your <head> HTML to Settings -> Stuff for <head>. After doing that, your .impacttext2 class will style correctly.
Tyler Moeller
@TylerMoeller
Sep 30 2016 18:52

@camnicklaus Your JSON returns an array consisting of the search term as data[0] and three additional arrays with Titles as data1, Content as data[2], and the URL as data[3]. You can loop through your JSON like:

  for (var i=0; i < data[1].length; i++) {
    $('body').append(data[1][i] + '<br>' + data[2][i] + '<br>' + data[3][i] + '<br><br>')
  }

That just gives an idea - replace the HTML as you would like to have it formatted.

johnny mayer
@johnnymayer
Sep 30 2016 18:53
but i included the css along w the codepen @TylerMoeller
Tyler Moeller
@TylerMoeller
Sep 30 2016 18:53
@johnnymayer I see that. You need to move everything in your <head> to the codepen settings. Then the changes you make in Codepen's CSS panel will work. Try it out.
None of this should be in your codepen's HTML panel:
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" type="text/css" href="http://www.asphaltocean.com/wp-content/themes/aotheme/style.css">
  <meta charset="utf-8">
  <title>asphalt ocean</title>
</head>
<body>
Or, better yet, only this should be in the HTML panel
  <div class="logo"></div>
  <a href="http://www.asphaltocean.com" class="impacttext2">404.  YOU HAVE REACHED THIS PAGE IN ERROR.  CLICK HERE TO RETURN TO ASPHALTOCEAN.COM</a>
cameron nicklaus
@camnicklaus
Sep 30 2016 18:57
@TylerMoeller thanks man, I was expecting an object (I thought that's what JSON format was?).
CamperBot
@camperbot
Sep 30 2016 18:57
camnicklaus sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 867 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
cameron nicklaus
@camnicklaus
Sep 30 2016 18:58
@TylerMoeller and hello from seattle also ;)
Tyler Moeller
@TylerMoeller
Sep 30 2016 18:58
@camnicklaus Yes, it is an object, but so are arrays
Hey! Nice to have another Seattleite here :)
cameron nicklaus
@camnicklaus
Sep 30 2016 18:58
:+1:
@TylerMoeller so, is there some part of the api request that let's you know what type you'll be getting? with my weather app I got objects notated with curly braces
Tyler Moeller
@TylerMoeller
Sep 30 2016 19:00
@camnicklaus The APIs we're using will return a JSON Object, notated with curly braces. You can loop through those just like you would an array, if that makes sense. Not sure if I'm answering your question.
Stephen James
@sjames1958gm
Sep 30 2016 19:01
@camnicklaus The JSON should be parsed into an js object assuming the API was successfully queried
cameron nicklaus
@camnicklaus
Sep 30 2016 19:01
@TylerMoeller basically I should just ignore whether I'm getting an array [] or object {} and treat the data the same way?
@sjames1958gm
Stephen James
@sjames1958gm
Sep 30 2016 19:03
@camnicklaus No, you need to be aware if it is one or the other - it will be an object, but may contain objects or arrays.
cameron nicklaus
@camnicklaus
Sep 30 2016 19:04
@sjames1958gm I guess that's why I was confused...here's my pen. it's returning arrays. bare in mind I've only just started, I haven't sorted how to deal with the data yet
Tyler Moeller
@TylerMoeller
Sep 30 2016 19:09
@camnicklaus Not sure if this helps explain better, think of your data object looking like this:
{"data": [
        "test",
        [
      all of your titles from searching for "test",
      separated, by, commas, inside, this, array.
        ],
        [
            The content for each of the titles,
      separated, by, commas, inside, this, array.
        ],
        [
            The URLs for each of the titles,
      separated, by, commas, inside, this, array.
        ]
    ]
}
The JSON Object consists of four arrays.
cameron nicklaus
@camnicklaus
Sep 30 2016 19:10
@TylerMoeller yeah! totally that makes perfect sense, thanks!
CamperBot
@camperbot
Sep 30 2016 19:10
camnicklaus sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: camnicklaus already gave tylermoeller points
Tyler Moeller
@TylerMoeller
Sep 30 2016 19:11
Glad that helped!
cameron nicklaus
@camnicklaus
Sep 30 2016 19:12
@TylerMoeller so, just out of curiosity, when I log the data, why is the object name not logged?
wait...I might get it...cause I'm logging the object...not the request?
Tyler Moeller
@TylerMoeller
Sep 30 2016 19:13
@camnicklaus Someone else smarter than me may have to explain the technical details behind that :)
cameron nicklaus
@camnicklaus
Sep 30 2016 19:13
haha
@TylerMoeller well, thanks again :+1:
CamperBot
@camperbot
Sep 30 2016 19:13
camnicklaus sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: camnicklaus already gave tylermoeller points
Tyler Moeller
@TylerMoeller
Sep 30 2016 19:14
From what I understand, you've assigned the object a name "data" and it's just giving you what's inside
cameron nicklaus
@camnicklaus
Sep 30 2016 19:14
@TylerMoeller right...that makes sense
@sjames1958gm thanks for your help as well ;)
CamperBot
@camperbot
Sep 30 2016 19:15
camnicklaus sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3586 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Sep 30 2016 19:16
@camperbot The outermost element in this JSON is an array. so data[0] is your query value, data[1] is the titles, etc
@camnicklaus :+1: Good luck!
cameron nicklaus
@camnicklaus
Sep 30 2016 19:17
@sjames1958gm :+1:
Muhammad Hasham
@MohammadHasham
Sep 30 2016 19:34
http://codepen.io/Mohammad_Hasham/pen/kkogvd
How an i make my ul elements in the same line where p element is present horizontally?
Julian Montague
@roastchicken
Sep 30 2016 19:34
shorthand vs longhand CSS notation? e.g:
Muhammad Hasham
@MohammadHasham
Sep 30 2016 19:34
@sjames1958gm
Julian Montague
@roastchicken
Sep 30 2016 19:35
margin-top: 1em;
margin-bottom: 2em;
margin-right: 3em;
margin-left: 4em;

vs

margin: 1em 3em 2em 4em;
Anyone think one is better/worse?
Lucien
@jmlucien
Sep 30 2016 19:47
OK wanted to know what you guys think about my first FCC project. Any feedback welcome. THanks. http://codepen.io/jmlucien/pen/RGpawG
Exclusiveyash
@Exclusiveyash
Sep 30 2016 19:48
@jmlucien Its a good start.
You can center align Notable Moments, it looks much better IMO
Lucien
@jmlucien
Sep 30 2016 19:49
Thanks @Exclusiveyash
CamperBot
@camperbot
Sep 30 2016 19:49
jmlucien sends brownie points to @exclusiveyash :sparkles: :thumbsup: :sparkles:
:cookie: 244 | @exclusiveyash |http://www.freecodecamp.com/exclusiveyash
Stephen
@stephepush
Sep 30 2016 19:50
so, I'm restarting my portfolio project, put in the background images I wanted to use, and then put in the bootstrap navbar and everything disappeared, can anybody help?
http://codepen.io/stephepush/pen/EgwYqA
Exclusiveyash
@Exclusiveyash
Sep 30 2016 19:54
@stephepush Check if you have closed the div tags correctly
Kevin Norris
@kevinnorris
Sep 30 2016 19:57
@roastchicken I think the one line margin is nicer, its a lot less to write and they are equally readable. Also if you only need to specify the same sized margins for top/bottom and right/left you can do margin: 1em 2em the first value is top and bottom margins, the second right and left.
Stephen
@stephepush
Sep 30 2016 19:59
@Exclusiveyash, yeah I did. Do I need the container class to be a parent of the navbar?
Exclusiveyash
@Exclusiveyash
Sep 30 2016 20:07
@stephepush There is no content inside #home section. You have just made the layout. and you need to add content for the background-image to show.
If you are adding image into the sections, that's the other case but as you are adding a bg image, you need to have content
Stephen
@stephepush
Sep 30 2016 20:08
okay
Exclusiveyash
@Exclusiveyash
Sep 30 2016 20:09
@stephepush and also you can remove the container class from CSS as they are pre-defined in bootstrap. You are just over-riding them
Stephen
@stephepush
Sep 30 2016 20:10
yeah for some reason the nav bar wasn't at 100% width when i nested it inside of a container
Exclusiveyash
@Exclusiveyash
Sep 30 2016 20:11
you can use .continer-fluid to make it full-width. :) , You can refer Bootstrap docs for more info over the classes
Sorin Ruse
@sorinr
Sep 30 2016 20:15
@stephepush you are repeating a lot of times in css the same styles for your sections. i would make only one entry like: #home, #about, #projects, #contact {and move here the full height and parallax part }
Stephen
@stephepush
Sep 30 2016 20:17
@sorinr , the thing making one entry though is that they have separate background image links, unless I make individual entries for each background image link...
Sorin Ruse
@sorinr
Sep 30 2016 20:18
@stephepush you leave the part with the imgs and width as they are. just make one single entry for the code that is repeating
Stephen
@stephepush
Sep 30 2016 20:19
true
Sorin Ruse
@sorinr
Sep 30 2016 20:26
@stephepush if u saw u have a white gap between your navbar and the background pict of the first section. you can get rid of it writing in css part: ..navbar {margin-bottom: 0px;}
Stephen
@stephepush
Sep 30 2016 20:29
@sorinr , I thought I'd figure that out later, thanks for resolving it now, though
CamperBot
@camperbot
Sep 30 2016 20:29
:cookie: 752 | @sorinr |http://www.freecodecamp.com/sorinr
stephepush sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
Sorin Ruse
@sorinr
Sep 30 2016 20:30
@stephepush welcome
David Pickup
@davidpickup
Sep 30 2016 20:43
Completing the portfolio challenge. When my navbar collapses, the button doesn’t expand it. Tried googling, but just can’t find the solution. Could someone take a quick look? http://codepen.io/davidpickup/pen/ZpJrjB
Sorin Ruse
@sorinr
Sep 30 2016 20:47
@davidpickup add in pen settings jquery and after bootstrap
Lucien
@jmlucien
Sep 30 2016 20:47
@Exclusiveyash did you mean center align like this? http://codepen.io/jmlucien/pen/RGpawG
Josiah Rooney
@JosiahRooney
Sep 30 2016 20:57
Hey for https://www.freecodecamp.com/challenges/use-the-twitchtv-json-api it seems that the Twitch API doesn't work anymore. Anyone know if it changed?
Oh nevermind. It now requires a client id.
Thomas Mullen
@t-mullen
Sep 30 2016 21:08
@davidpickup works for me?
David Pickup
@davidpickup
Sep 30 2016 21:29
Works now after including jquery
Igor Amidzic
@igoramidzic
Sep 30 2016 21:38
if anyone wants to see the coolest website in the world:
http://utilitan.com/project2/index.php
Julian Montague
@roastchicken
Sep 30 2016 21:40
Interesting @kevin-norris . I have to take a second or so to work out which is which each time I use the shorthand notation. Maybe I just need to use it more til it sticks.
Kevin Norris
@kevinnorris
Sep 30 2016 21:49
@roastchicken yea once you get used to it, its a lot faster. Just a bit of a learning curve.
Evan W
@Dirtier
Sep 30 2016 21:55
Anyone able to help figure out why my transition isnt working on my searchbox?
It's supposed to slowly transition to 100% width but it just does it. Does this -webkit-transition not work in Chrome?
d wilder
@alhazen1
Sep 30 2016 22:02
@Dirtier You have a dot . before input like it is a class in css
Evan W
@Dirtier
Sep 30 2016 22:03
Oh wow. I feel like an idiot. Thanks haha @alhazen1
CamperBot
@camperbot
Sep 30 2016 22:03
dirtier sends brownie points to @alhazen1 :sparkles: :thumbsup: :sparkles:
:cookie: 389 | @alhazen1 |http://www.freecodecamp.com/alhazen1
d wilder
@alhazen1
Sep 30 2016 22:03
@Dirtier also need "" around text [type="text"]
Evan W
@Dirtier
Sep 30 2016 22:04
It worked without the quotes for some reason, idk I copy/pasted it from W3 just trying it out
figured it would work straight away, guess I should have taken a closer look. Thanks man
d wilder
@alhazen1
Sep 30 2016 22:04
@Dirtier Hmmm.. dunno. Oh well, glad it worked out for you - your're welcome
Hassen Rmili
@hassenrmili
Sep 30 2016 22:40
@Dirtier http://www.awwwards.com/sites/anna-morosini i found this in your Portfolio
@Dirtier you designed this by yourself ??
Matthew Brown
@vledoc
Sep 30 2016 22:53
Wow that looks great
Alex
@delk0
Sep 30 2016 23:24
guys im trying to write a different random number (between 5, for simplicity) to the html every time i refresh the page, how can i prevent it for generating a number thats already been generated?
im trying to use localStorage here
Leonard Melnik
@lennymelnik
Sep 30 2016 23:36
Hi guys, I took a bit of a break from coding and forgot how to make the backround of the page a color, like I know to use body, but do I do anything special with it?
d wilder
@alhazen1
Sep 30 2016 23:39

@techilluminated in your css something like

body{
background-color: blue;
}

would do it

c0d0er
@c0d0er
Sep 30 2016 23:57
this is my wikipedia viewer , qustion: how to add a search icon inside input box and in the left side of input box? gave a lot of try, not yet works, http://codepen.io/c0d0er/pen/kkwzrb?editors=1010
Toni Shortsleeve
@KoniKodes
Sep 30 2016 23:59
@c0d0er Looking good. It passed my tests, and included autocomplete. Try adding <i class="glyphicon glyphicon-search"></i> in between the button open and end tags.