These are chat archives for FreeCodeCamp/HelpFrontEnd

5th
Jul 2016
Kevin Kuehler
@kevinkuehler
Jul 05 2016 00:01 UTC
@Octopinky works. thx
CamperBot
@camperbot
Jul 05 2016 00:01 UTC
kevinkuehler sends brownie points to @octopinky :sparkles: :thumbsup: :sparkles:
:cookie: 130 | @octopinky |http://www.freecodecamp.com/octopinky
Andrew Schmidthuber
@calicode
Jul 05 2016 00:03 UTC
you can add it into the for loop
or separate it into a function and pass the streamer name as an argument
oiver55
@oiver55
Jul 05 2016 00:09 UTC
Anyone ever make a website for someone?
Olga C
@Octopinky
Jul 05 2016 00:13 UTC
@tbc13315 did you try loading jquery before the jquery UI?
uniforlyff
@uniforlyff
Jul 05 2016 00:14 UTC
@oiver55 i ahve
:smile:
tbc13315
@tbc13315
Jul 05 2016 00:15 UTC
@Octopinky Hi yeah, I just tried that but it's still not working.
Olga C
@Octopinky
Jul 05 2016 00:17 UTC
@tbc13315 I am going to take a look here
Zachary Hyder
@zacharyhyder
Jul 05 2016 00:17 UTC

So, I can't figure out why my hamburger will not work. It collapses fine but will not open.

`<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<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="#"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/500602/Logo.png" alt="logo" id="logo" /></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#about">About</a></li>

    <li><a href="#portfolio">Portfolio</a></li>

    <li><a href="#contact">Contact</a></li>
  </ul>
</div>

</div>
</nav>`

tbc13315
@tbc13315
Jul 05 2016 00:18 UTC
@Octopinky Thank you!
CamperBot
@camperbot
Jul 05 2016 00:18 UTC
tbc13315 sends brownie points to @octopinky :sparkles: :thumbsup: :sparkles:
:cookie: 131 | @octopinky |http://www.freecodecamp.com/octopinky
Olga C
@Octopinky
Jul 05 2016 00:21 UTC

@tbc13315 your jquery is working (to check, add this line of code inside you document ready function)

$(".wiki").css("color", "red");

which means, that the mistake is in the code.

@zacharyhyder did you load up jquery in javascript settings?
Zachary Hyder
@zacharyhyder
Jul 05 2016 00:23 UTC
@Octopinky haha silly me
tbc13315
@tbc13315
Jul 05 2016 00:25 UTC
@Octopinky Yeah I see the jquery seems to be working, but I haven't been able to identify the error in the code.
Olga C
@Octopinky
Jul 05 2016 00:40 UTC
@tbc13315 your searchWiki function - is it being called somewhere in your html code. Like, with onsubmit or onclick?
tbc13315
@tbc13315
Jul 05 2016 00:43 UTC
@Octopinky Yeah it's being called when you press enter: $("#searching").keypress(function(event) {
if (event.which == 13) {
searchWiki();
return false;
}
});
Olga C
@Octopinky
Jul 05 2016 00:44 UTC
did you try to check if it is actually being called? By adding the same line that changes color inside of the searchWiki function? It did not work for me.
tbc13315
@tbc13315
Jul 05 2016 00:48 UTC
@Octopinky ok I see what you're talking about.
Gabe Pressman
@gpressman
Jul 05 2016 00:48 UTC
anyone here familiar with flexbox?
Olga C
@Octopinky
Jul 05 2016 00:49 UTC
@tbc13315 ok, so there seems to be the problem with this part of a code
@tbc13315
$("#searching").keypress(function(event) { if (event.which == 13) { searchWiki(); return false; } });
```$("#searching").keypress(function(event) {
if (event.which == 13) {
searchWiki();
return false;
}
});
Greg Duncan
@GregatGit
Jul 05 2016 00:50 UTC
@zacharyhyder make sure you have jQuery.js above bootstrap.js - it is important
tbc13315
@tbc13315
Jul 05 2016 00:51 UTC
Why does that not work though?
Greg Duncan
@GregatGit
Jul 05 2016 00:51 UTC
@Octopinky @tbc13315 this helped me get the keypress going http://www.mkyong.com/jquery/how-to-check-if-an-enter-key-is-pressed-with-jquery/
var keycode = (event.keyCode ? event.keyCode : event.which);
    if (keycode == '13') {
      startSearch();
    }
tbc13315
@tbc13315
Jul 05 2016 00:53 UTC
@Octopinky @GregatGit I used that snippet to check and I got the alert they mentioned.
Olga C
@Octopinky
Jul 05 2016 01:00 UTC
@tbc13315 okay, so it seems that it maybe does search the wiki, however the results are not being shown: the page refreshes itself
Yamen Daher
@yamenda
Jul 05 2016 01:03 UTC
hello guys
any one can help me how can i get APIs and how can i use it ??
Olga C
@Octopinky
Jul 05 2016 01:07 UTC
@tbc13315 @GregatGit the problem seems to be in a different place of code, where the results are supposed to be given out
Greg Duncan
@GregatGit
Jul 05 2016 01:16 UTC
@yamenda
$.getJSON(api, function(data){
   // do something with data here
});
Olga C
@Octopinky
Jul 05 2016 01:17 UTC
@tbc13315 I wish I could be of more help. Good luck and let me know how it goes for you. I will still think a bit about it also.
Greg Duncan
@GregatGit
Jul 05 2016 01:17 UTC
@yamenda which api do you need
Denis
@snexus
Jul 05 2016 01:26 UTC
@tbc13315 @Octopinky Ifpage refreshes, probably you didn't stop keycode 13 from being processed by the form. You need to do something like event.preventDefault();
Zachary Gerard
@Trayuk
Jul 05 2016 01:57 UTC

i am on "Target Elements by Class Using jQuery" i cant get my "well" elements to shake like the lesson is trying to have me do. this is what i have above the provided lesson code

<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$("well").addClass("animated shake");
});
</script>

any help would be greatly appreciated
Denis
@snexus
Jul 05 2016 02:00 UTC
@Trayuk Perhaps you need to include animate.css in settings
Zachary Gerard
@Trayuk
Jul 05 2016 02:01 UTC
correct me if i am wrong but if i needed that the $("button").addClass("animated bounce"); would not be functional either? the buttons bounce, i think the lesson provided that in the background as we have not covered anything related to animate.css in the settings
Denis
@snexus
Jul 05 2016 02:02 UTC
@Trayuk Can you paste a link to you codepen please?
Zachary Gerard
@Trayuk
Jul 05 2016 02:03 UTC
no idea how or what that would require
1st day
Denis
@snexus
Jul 05 2016 02:07 UTC
@Trayuk Try to use $(".well").addClass("animated shake") instead of $("well").addClass("animated shake");
Zachary Gerard
@Trayuk
Jul 05 2016 02:09 UTC
nothing

<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$("well").addClass("animated shake")
});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

i wanted to avoid this because it is so large
Denis
@snexus
Jul 05 2016 02:11 UTC
@Trayuk you have to use $(".well") in your jquery selector to select classes, I still see $("well")...
Zachary Gerard
@Trayuk
Jul 05 2016 02:12 UTC
ok, thanks, just wondering, why is the button fine without a . but the well requires it
Denis
@snexus
Jul 05 2016 02:16 UTC
@Trayuk You only need to select classes with dot. Button is not a class, but name of a standard element
Zachary Gerard
@Trayuk
Jul 05 2016 02:17 UTC
rgr, Thanks @snexus
CamperBot
@camperbot
Jul 05 2016 02:17 UTC
trayuk sends brownie points to @snexus :sparkles: :thumbsup: :sparkles:
:cookie: 336 | @snexus |http://www.freecodecamp.com/snexus
96street
@96street
Jul 05 2016 02:38 UTC
struggling on the twitch challenge can someone help
Norvin Burrus
@ndburrus
Jul 05 2016 02:39 UTC
help format @Trayuk
for code posting - typing shift + enter provides additional line feeds (space for posting/pasting code).
you may also find the chat & compose buttons to the right of the chat text entry area useful. the backticks key is located to the left of the #1 (number one) key.
CamperBot
@camperbot
Jul 05 2016 02:39 UTC

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick() at _start_ and _end_ around thecode`.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

96street
@96street
Jul 05 2016 02:39 UTC
trying to write code that decides what type (channel, streams etc) and name (channel name etc) http://codepen.io/kingdezz/pen/zBzBaZ?editors=1010
tbc13315
@tbc13315
Jul 05 2016 02:52 UTC
Thanks all for the help.
Greg Duncan
@GregatGit
Jul 05 2016 03:10 UTC
@96street you only need one url https://api.twitch.tv/kraken/streams/ + the channel name. If the stream is online everything you need is there - if it is off line there is a link to channel to get all you need.
96street
@96street
Jul 05 2016 03:25 UTC
Sweet
Kevin Kuehler
@kevinkuehler
Jul 05 2016 04:30 UTC
How do I keep my button in the same position but outside of the colored div ?
http://codepen.io/kevinkuehler/pen/bZREpr
Olga C
@Octopinky
Jul 05 2016 04:38 UTC
@snexus thank you
CamperBot
@camperbot
Jul 05 2016 04:38 UTC
octopinky sends brownie points to @snexus :sparkles: :thumbsup: :sparkles:
:cookie: 337 | @snexus |http://www.freecodecamp.com/snexus
Olga C
@Octopinky
Jul 05 2016 04:39 UTC
@kevinkuehler you could try using a negative margin
margin-bottom:-60px;
Kevin Kuehler
@kevinkuehler
Jul 05 2016 04:39 UTC
@Octopinky omg beautiful! :D:D
Olga C
@Octopinky
Jul 05 2016 04:42 UTC
@kevinkuehler wheee!
Dolan
@dguh
Jul 05 2016 04:58 UTC
could someone help me with an error in codepen?
i can't paste from a sololearn file that i was using in the car earlier without a lot of the text not working in html
nvm
96street
@96street
Jul 05 2016 05:08 UTC
This message was deleted
greg
@wearenotgroot
Jul 05 2016 05:12 UTC
@dguh you are missing some curly brackets and use semicolon on the for loop not commas
$("#submitButton").on("click", function(){
    $.getJSON(apiLink, function(data){
        var articleLink = data;
        var articlePreview = data;
        for (i =0; i < array.length; i++){
            //dunno what you are trying to do here ------>$("<a href = apiLink>apiPreview.slice(0,20)</a></br><p>articlePreview.slash(0,100)</p></br>").appendTo(".wikiArticles");
//i guess you did the reverse
//remember to use the selector to get access to the element then append the html you build
                       $(".wikiArticles").append("<a href = apiLink>"+apiPreview.slice(0,20)+"</a></br><p>"+articlePreview.slash(0,100)+"</p></br>");
        };
    });
});
Michael Bomholt
@bomholtm
Jul 05 2016 05:48 UTC
on the last steps to finishing my local weather project but im having trouble centering a div inside a 100% height bootstrap row... http://codepen.io/bomholt/full/zqgoOe/
does anyone have a idea how to accomplish centering the whole thing vertically?
kirbyedy
@kirbyedy
Jul 05 2016 05:50 UTC
@bomholt looks fine to me, what is the exact problem ?
Michael Bomholt
@bomholtm
Jul 05 2016 05:54 UTC
@kirbyedy some last improvments... one of the first things i need to accomplish is centering the weather card vertically on large screens
but i just wont work
kirbyedy
@kirbyedy
Jul 05 2016 05:55 UTC
hmmm I am on 4096 x 2304 and it looks fine
Sorin Ruse
@sorinr
Jul 05 2016 05:58 UTC
@bomholt try vertical-align: middle;
Michael Bomholt
@bomholtm
Jul 05 2016 05:59 UTC
@sorinr only works if i use display table but that throws of other stuff then
Kevin Kuehler
@kevinkuehler
Jul 05 2016 05:59 UTC
Do you guys recommend an array of quotes or an API for the random quote generator ?
Sorin Ruse
@sorinr
Jul 05 2016 06:00 UTC
@bomholt yep ur right. now i've looked at your css code
kirbyedy
@kirbyedy
Jul 05 2016 06:00 UTC
@kevinkuehler whichever suits you
Michael Bomholt
@bomholtm
Jul 05 2016 06:00 UTC
@kevinkuehler you can do both... the cool thing of using custom qtotes is that you can give it a custom theme
Hong
@designBuildShipSoftware
Jul 05 2016 06:01 UTC
Hi, @kevinkuehler google some quotes and make an array
kirbyedy
@kirbyedy
Jul 05 2016 06:01 UTC
I think its slightly easier to do it with an array
Michael Bomholt
@bomholtm
Jul 05 2016 06:01 UTC
api is easier though i think @kevinkuehler
@kirbyedy haha
kirbyedy
@kirbyedy
Jul 05 2016 06:01 UTC
but its a nice challenge to do it with an api
Michael Bomholt
@bomholtm
Jul 05 2016 06:01 UTC
@kirbyedy alone the work to look for quotes was so much more work for me
kirbyedy
@kirbyedy
Jul 05 2016 06:02 UTC
I just googled some homer simpson quotes :D
that was a 2min. job :D
later I did the api as well, just for fun
Michael Bomholt
@bomholtm
Jul 05 2016 06:02 UTC
@sorinr i should have gone without bootstrap because it gets only used little but im too tired to change that now
Kevin Kuehler
@kevinkuehler
Jul 05 2016 06:02 UTC
Okay, thanks everyone. I'll probably just put my own custom quotes in then. API could give too long of a quote at wreck my layout
Sorin Ruse
@sorinr
Jul 05 2016 06:02 UTC
@bomholt you can add a margin-top:xxxx% instead
kirbyedy
@kirbyedy
Jul 05 2016 06:02 UTC
@bomholt flexbox ?
Michael Bomholt
@bomholtm
Jul 05 2016 06:02 UTC
@kirbyedy haha take a look at mine https://codepen.io/bomholt/full/beeRYb/
i did futurama ;D
kirbyedy
@kirbyedy
Jul 05 2016 06:03 UTC
lol
Michael Bomholt
@bomholtm
Jul 05 2016 06:03 UTC
but my tribute is simpsons though
kirbyedy
@kirbyedy
Jul 05 2016 06:03 UTC
:D
Michael Bomholt
@bomholtm
Jul 05 2016 06:03 UTC
hahahaha
Hong
@designBuildShipSoftware
Jul 05 2016 06:03 UTC
Hi, I tried to use .toggle() to toggle click between F and C, but it didn't work out as clickable. Here is my code:
Kevin Kuehler
@kevinkuehler
Jul 05 2016 06:03 UTC
@bomholt It's beautiful
Hong
@designBuildShipSoftware
Jul 05 2016 06:03 UTC
```
$(document).ready(function() {
  $.getJSON("http://ipinfo.io", function(response) {
    $(".location").html(response.city + ", " + response.region + ", " + response.country);
    var zip = response.postal;
    var country = response.country;
    $.getJSON("http://api.openweathermap.org/data/2.5/weather?zip=" + zip + "," + country + "&APPID=4ca247b54b4eb71e942ca40585468d7d", function(json) {
      var K = json.main.temp;
      var F = Math.round((K - 273.15) * 9 / 5 + 32);
      var C = Math.round(K - 273.15);
      $(".weather").html(JSON.stringify(F) + " °" + '<span id="unit">' + "F".fontcolor("yellow") + "</span>");
      //???when then or done
      $("#unit").toggle(function() {

        $(".weather").html(JSON.stringify(F) + " °" + '<span id="unit">' + "F".fontcolor("yellow") + "</span>");

      }, function() {

        $(".weather").html(JSON.stringify(C) + " °" + '<span id="unit">' + "C".fontcolor("yellow") + "</span>");

      });

    });
  });
});
Michael Bomholt
@bomholtm
Jul 05 2016 06:04 UTC
@sorinr yea i had used margin... flexbox gave me some weird bugs on the whole page
Sorin Ruse
@sorinr
Jul 05 2016 06:04 UTC
@bomholt and make a @media query and modify the xxx% for mobiles
Hong
@designBuildShipSoftware
Jul 05 2016 06:04 UTC
What was wrong with my code?
Michael Bomholt
@bomholtm
Jul 05 2016 06:05 UTC
cant remember which ones @sorinr but yea i will go with margin i think and get rid of margin for mobile completly so you only see the "card"
@sorinr @kevinkuehler @kirbyedy thanks guys
CamperBot
@camperbot
Jul 05 2016 06:05 UTC
bomholt sends brownie points to @sorinr and @kevinkuehler and @kirbyedy :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @kevinkuehler |http://www.freecodecamp.com/kevinkuehler
:star2: 1190 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
:cookie: 429 | @sorinr |http://www.freecodecamp.com/sorinr
Michael Bomholt
@bomholtm
Jul 05 2016 06:05 UTC
did i get all?
and thanks for the compliment kevin
take a look at my tribute ... its actually pretty identical themed =)
i love simpsons and futurama haha
Kevin Kuehler
@kevinkuehler
Jul 05 2016 06:07 UTC
@bomholt Futurama is my favorite TV show.
I'll look at your tribute rn
Michael Bomholt
@bomholtm
Jul 05 2016 06:07 UTC
@kevinkuehler haha cool. i redid my tribute and quote page completly after i had the idea to use tv shows
instead of old guys who probably said something not that stupid :P
totally gave me a motivation boost
Hong
@designBuildShipSoftware
Jul 05 2016 06:26 UTC
Any help for my question?
kirbyedy
@kirbyedy
Jul 05 2016 06:28 UTC
@designBuildShipSoftware do you have a link to your code, hard to debug this way
Hong
@designBuildShipSoftware
Jul 05 2016 06:28 UTC
This message was deleted
kirbyedy
@kirbyedy
Jul 05 2016 06:32 UTC
to something like this:
$("#your button").click(function() {
  $(".fahrenheit").toggle();
  $(".celsius").toggle();
});
Hong
@designBuildShipSoftware
Jul 05 2016 06:36 UTC
@kirbyedy why was my original code not working? Because it changed the button itself?
or something?
Hong
@designBuildShipSoftware
Jul 05 2016 06:42 UTC
@kirbyedy I see your point. Thanks!
CamperBot
@camperbot
Jul 05 2016 06:42 UTC
designbuildshipsoftware sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1192 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Manuel Micu
@manu-4216
Jul 05 2016 06:46 UTC
Sorin Ruse
@sorinr
Jul 05 2016 06:59 UTC
@manu-4216 your choosing x or o part is overlapping the last row of the game table
Manuel Micu
@manu-4216
Jul 05 2016 07:01 UTC
@sorinr oh, ok. I'll have to center it better then
Sorin Ruse
@sorinr
Jul 05 2016 07:02 UTC
@manu-4216 its because ur using a position: absolute with a certaind top:x,ecc. this will remain same position no matter screen width and height u have
Manuel Micu
@manu-4216
Jul 05 2016 07:03 UTC
@sorinr I swiched to em for top. Should be better
mersi ;)
Sorin Ruse
@sorinr
Jul 05 2016 07:07 UTC
@manu-4216 you can try with top: 80%; in your .messageBox {} class. but this solution works for my laptop display height . on other screens will behave differently
@manu-4216 so, this is only a quick fix but not a solution :)
Meet Mangukiya
@meetmangukiya
Jul 05 2016 07:32 UTC

http://codepen.io/meetmangukiya/full/WxOEWW/

Jumping over an element with a given ID when clicking on a link doesn't work in full page view, why ? Try pressing the Contact button and it should take you to the lorem text. But it doesnt :confused:

Meet Mangukiya
@meetmangukiya
Jul 05 2016 07:37 UTC
Ok. it seems that it only works if full screen is filled
Sorin Ruse
@sorinr
Jul 05 2016 07:44 UTC
@meetmangukiya you have this href="#">About . how to know the browser where to go to?
Gaurav Tolani
@Gauravtolani
Jul 05 2016 07:47 UTC
how to align a line to the right....<hr align="right"> is not working
solved.. :-)
Meet Mangukiya
@meetmangukiya
Jul 05 2016 07:54 UTC

@sorinr

Try pressing the Contact button and it should take you to the lorem text. But it doesnt

Sorin Ruse
@sorinr
Jul 05 2016 08:02 UTC
@meetmangukiya it takes you to the first <p id="lorem"> that you have defined in your <a href"#lorem">Contact :)
@meetmangukiya are u on IE?
Meet Mangukiya
@meetmangukiya
Jul 05 2016 08:03 UTC
@sorinr I've done the same thing, that you told
and works fine now
The problem was that my page wasn't completely filled, so the jump didn't work
I think for the jump to work, the page should be completely filled with something, either it be text, pictures or whatever else
:D
Sorin Ruse
@sorinr
Jul 05 2016 08:10 UTC
@meetmangukiya yep. to test the scrolling to a certain <p> you can just add for testing the id you wish to that p tag
Casey Heath
@ExhibitArts
Jul 05 2016 08:17 UTC
Could you guys tell me what you think of this logo? - https://www.youtube.com/watch?v=bGkpNKaczqo
Sorin Ruse
@sorinr
Jul 05 2016 08:29 UTC
@ExhibitArts nice if you try to do it only by css
Casey Heath
@ExhibitArts
Jul 05 2016 08:29 UTC
@sorinr ?
@sorinr css to shape a logo?
I wish (lol)
Sorin Ruse
@sorinr
Jul 05 2016 08:31 UTC
@ExhibitArts i was meaning that it would be nice to accomplish same project made in photoshop but only using css
Casey Heath
@ExhibitArts
Jul 05 2016 08:31 UTC
@sorinr Yeah it would be. Although I'm not sure how it would work.
I'm trading graphics for help with portfolio website if anyone is interested?
herowalking
@herowalking
Jul 05 2016 09:02 UTC
$scope.removeVm = function(index) {
$scope.amount -= $scope.vms[index].amount;
$scope.vm_amount -= $scope.vms[index].amount;
$scope.orderInfo.totalCost -= $scope.vms[index].cost;
$scope.vms.splice(index, 1);
};
kirbyedy
@kirbyedy
Jul 05 2016 09:28 UTC
@ExhibitArts the logo does not seem very symmetrical, its not balanced
mixing straight lines with curves... tricky
draw a circle around it and you will see
Ahmad Ali
@microcyberz
Jul 05 2016 09:30 UTC
@sorinr there is a bug in your twitch app, I am unable to see image of offline users
Sorin Ruse
@sorinr
Jul 05 2016 09:31 UTC
@microcyberz there is no bug. i haven't implemented it yet :) was too lazy to that too
Gaurav Tolani
@Gauravtolani
Jul 05 2016 09:33 UTC
betweek two my two divs..there is a gap..can anybody tell how to remove that..
Ahmad Ali
@microcyberz
Jul 05 2016 09:33 UTC
@sorinr lol.:D Your design and interface is awesome.. good work
kirbyedy
@kirbyedy
Jul 05 2016 09:34 UTC
@Gauravtolani your jumbotron has a margin bottom of 30px
Gaurav Tolani
@Gauravtolani
Jul 05 2016 09:37 UTC
@kirbyedy i have set it to 0px, where is 30 px
?
Sorin Ruse
@sorinr
Jul 05 2016 09:38 UTC
@microcyberz thank you for your feedback. for the moment i have just added update the streams status every 5 min to check if they are still online or not. i will decide whow to present that info for running streams during a "morning brainstorm" when taking my coffee. :)
CamperBot
@camperbot
Jul 05 2016 09:38 UTC
sorinr sends brownie points to @microcyberz :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @microcyberz |http://www.freecodecamp.com/microcyberz
Ahmad Ali
@microcyberz
Jul 05 2016 09:41 UTC
@sorinr yesh. extra features.. coool :D @sorinr .. My pen was working fine yesterday, it was tested, I saved and submitted to FCC. Today it is not working fine.. It's weird
Sorin Ruse
@sorinr
Jul 05 2016 09:42 UTC
@microcyberz even you have submitted it , you can still update it whenever you want
Ahmad Ali
@microcyberz
Jul 05 2016 09:44 UTC
yes I am trying to update now, but It was tested by people and i got positive responses. How could it become buggy now :D
Susan
@susangapper
Jul 05 2016 09:44 UTC
hi! is anyone doing, or has done, the wikipedia viewer yet? OMG, I hate the API documentation. Silent fails with status of zero all the time :( finally got it to work by modifying someone's Angular call. Have I missed a whole chunk of help on a FCC forum somewhere? I looked and looked, but couldn't see anything.
Ahmad Ali
@microcyberz
Jul 05 2016 09:45 UTC
@susangapper It was a terrible project :D same was my situation...
I dont't know angular, can't help in angular things @susangapper
Susan
@susangapper
Jul 05 2016 09:46 UTC
so glad I'm not the only one! I've done loads f API stuff, but just couldn't make head nor tail of it. TBH it was a few years back and it was internal, so none of the CORS stuff applied.
Ahmad Ali
@microcyberz
Jul 05 2016 09:47 UTC
let me see your code
I used AJAX call to resolve CORS issue
Susan
@susangapper
Jul 05 2016 09:47 UTC
@microcyberz it was https://en.wikipedia.org/w/api.php?action=query&list=search&format=json&srsearch=' + searchTerm + '&callback=?JSON_CALLBACK as angular, just took off the JSON_CALLBACK bit on the end, as that's the Angular bit
Fourbits
@Fourbits
Jul 05 2016 09:48 UTC
@susangapper If you're getting silent fails, make sure to check your browser's debug console. Chrome likes to silently reject things it considers insecure, but it will make a note in the console.
Ahmad Ali
@microcyberz
Jul 05 2016 09:49 UTC
@susangapper don't use callback, use AJAX call with dataType 'jsonp'
Sorin Ruse
@sorinr
Jul 05 2016 09:49 UTC
@susangapper nope for me. here is my pen: http://codepen.io/sorinr/pen/LZVqmJ
Susan
@susangapper
Jul 05 2016 09:50 UTC
thanks @Fourbits , I'm still rusty on my workflow :)
CamperBot
@camperbot
Jul 05 2016 09:50 UTC
susangapper sends brownie points to @fourbits :sparkles: :thumbsup: :sparkles:
:cookie: 337 | @fourbits |http://www.freecodecamp.com/fourbits
Anthony Ho
@chiho13
Jul 05 2016 09:50 UTC
what's the difference between immutable and mutable in javascript? does it have to do with memory management? immutable stores variables by value, mutable point to variable by reference?
Ahmad Ali
@microcyberz
Jul 05 2016 09:51 UTC
@susangapper it works on myside
Susan
@susangapper
Jul 05 2016 09:53 UTC
Yeah, it finally works, just wondered if I was the only one struggling :) There is a project to open up the API into a more user-friendly way. Think the documentation leaves a lot to be desired for easy searches at least.
Ahmad Ali
@microcyberz
Jul 05 2016 09:55 UTC
@susangapper next twitch tv API documentation is easy, hope it won't cause same frustration
Susan
@susangapper
Jul 05 2016 09:57 UTC
@microcyberz yeah I hope so. Thing is, I wanted to learn the WikiMedia API for work, so I think I'll have to delve a bit deeper. I may write it up as a CodePen with examples. It's silly for people to get stuck and demoralised. Anyone know where those sort of resources are referenced? Maybe someone has already done it?
Sorin Ruse
@sorinr
Jul 05 2016 09:57 UTC
@susangapper yes. it is. but wiki covers a very vast criteria data to search for. thats why it seams to stuffy
Fourbits
@Fourbits
Jul 05 2016 09:58 UTC
@Fourbits
Would anyone mind checking out my Rogue-like game? Also, does anyone know why, if I view it outside "debug mode" or add a border to the map viewer, horizontal and/or vertical grid lines will appear? https://s.codepen.io/fourbits/debug/oLwqoA
https://codepen.io/fourbits/pen/oLwqoA
1rjun
@1rjun
Jul 05 2016 09:59 UTC
how to bui a tribute page
build
Susan
@susangapper
Jul 05 2016 10:00 UTC
@Fourbits that's awesome! No where near you yet, so can't help, but really cool :)
1rjun
@1rjun
Jul 05 2016 10:03 UTC
how to build a tribute page
plz tell me
Susan
@susangapper
Jul 05 2016 10:04 UTC
@1rjun I used w3schools bootstrap tutorial and modified that.
Fourbits
@Fourbits
Jul 05 2016 10:05 UTC
@1rjun You just need to use basic HTML and CSS like you learned in previous lessons. Use the example page as a template and fill in information about someone interesting.
d1sr3
@d1sr3
Jul 05 2016 10:14 UTC
Hello I'm getting "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.host]" when trying to get json in codepen has anyone ran into this error? My code : $.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=?", function(json){
console.log(json);
});
Fourbits
@Fourbits
Jul 05 2016 10:17 UTC
@d1sr3 Try removing the question mark after "callback=" -- does that help?
d1sr3
@d1sr3
Jul 05 2016 10:18 UTC
@Fourbits Didn't help, I got the same error
Fourbits
@Fourbits
Jul 05 2016 10:21 UTC
Well, the URL looks identical to the one I used in my pen, and all I can find is that that error is specific to Firefox.
Have you tried loading it with another browser?
Susan
@susangapper
Jul 05 2016 10:27 UTC
This message was deleted

@d1sr3
$.ajax({

url: 'http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=',
success: function(response) {
  console.log(response);

}

});
worked for me

urgh, how do you type code in this editor!
Fourbits
@Fourbits
Jul 05 2016 10:30 UTC
@susangapper Use Markdown: For a code block, put three tildes around the code:
```
if (true){
return false;
}
```
will give you
if (true){
return false;
}
Susan
@susangapper
Jul 05 2016 10:31 UTC
@Fourbits thanks
CamperBot
@camperbot
Jul 05 2016 10:31 UTC
susangapper sends brownie points to @fourbits :sparkles: :thumbsup: :sparkles:
:warning: susangapper already gave fourbits points
Susan
@susangapper
Jul 05 2016 10:31 UTC
lol, Im sending you lots of brownie points today
Fourbits
@Fourbits
Jul 05 2016 10:31 UTC
^_^
d1sr3
@d1sr3
Jul 05 2016 10:34 UTC
@susangapper I got the same error
Fourbits
@Fourbits
Jul 05 2016 10:34 UTC
@d1sr3 Maybe give us a link to your pen?
d1sr3
@d1sr3
Jul 05 2016 10:38 UTC
This message was deleted
Fourbits
@Fourbits
Jul 05 2016 10:44 UTC
@d1sr3 It works for me on Chrome and Firefox, but I have to change the URL to http instead of https because the browsers think it's unsafe to access one from the other.
Susan
@susangapper
Jul 05 2016 10:45 UTC
@d1sr3 yup, same for me, change to http
d1sr3
@d1sr3
Jul 05 2016 10:57 UTC
@Fourbits Thanks I had enabled https everywhere when I disabled it it started working I was stuck with it like for a week
CamperBot
@camperbot
Jul 05 2016 10:57 UTC
d1sr3 sends brownie points to @fourbits :sparkles: :thumbsup: :sparkles:
:cookie: 339 | @fourbits |http://www.freecodecamp.com/fourbits
kirbyedy
@kirbyedy
Jul 05 2016 10:59 UTC
@Gauravtolani check the image
Screen Shot 2016-07-05 at 12.34.52.png
Gaurav Tolani
@Gauravtolani
Jul 05 2016 11:01 UTC
thanks @kirbyedy
CamperBot
@camperbot
Jul 05 2016 11:01 UTC
gauravtolani sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1193 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Gaurav Tolani
@Gauravtolani
Jul 05 2016 11:01 UTC
i was really stuck..
:-)
Anna
@AnnaRedPanda
Jul 05 2016 11:05 UTC
Hi, who can help me with Bootstrap? my page looks OK untill I resize the window http://codepen.io/AnnaRedPanda/pen/zBzGRP
Fourbits
@Fourbits
Jul 05 2016 11:06 UTC
@d1sr3 In many cases, you can avoid this problem by detecting if the client is on http or https with location.protocol and using the same protocol to get your JSON; however, some sites only accept one protocol, so it doesn't always work.
Jayrex Acilo
@ajayrexluega
Jul 05 2016 11:19 UTC
Hi, can someone spot what's wrong with my codes? my on click didn't work
http://codepen.io/ajayrexluega/pen/RRgyVg
my button New Quote didn't work. Why?
Casey Heath
@ExhibitArts
Jul 05 2016 11:19 UTC
@kirbyedy I know it's not symetrical. It's the style I chose.
https://sellfy.com/ExhibitArts - Selling logos and signatures.
flindip
@flindip
Jul 05 2016 11:32 UTC

I'm working on the "Twitch.TV JSON" api project. I'm just testing the api right now and various data pieces of display in a test div. So, I can then play with the API. Its not displaying anything however.

Here is the code: http://codepen.io/flindip/pen/bZRANL

Abhishek Saini
@sainiabhi
Jul 05 2016 12:29 UTC
@sainiabhi
hi all
I need output like [1 2 3] [4 5 6] [7 8 9]
how to achieve this?
I tried but everytime I'm getting [1 2 3] [1 2 3] [1 2 3]
Please help anyone
Susan
@susangapper
Jul 05 2016 12:32 UTC
@sainiabhi what's the name of the task?
Abhishek Saini
@sainiabhi
Jul 05 2016 12:33 UTC
Hi @susangapper it's no task just doing it as this is a challenge given by someone
Susan
@susangapper
Jul 05 2016 12:33 UTC
@sainiabhi what's your code?
Abhishek Saini
@sainiabhi
Jul 05 2016 12:34 UTC
@susangapper sharing it give me two minutes
@susangapper
for(var i = 0; i < 3 ; i++){
console.log("[");
for(var j = 1; j < 10 ; j++){
console.log(j);
if(j % 3 == 0){
j++;
break;
}
}
console.log("]");
}
Abhishek Saini
@sainiabhi
Jul 05 2016 12:39 UTC

see my output should be coming like
[1 2 3]
[4 5 6]
[7 8 9]

But it's coming like
[
1
2
3
]

[
1
2
3
]

[
1
2
3
]

@susangapper

Susan
@susangapper
Jul 05 2016 12:40 UTC
@sainiabhi yeah, it's your mod loop
Abhishek Saini
@sainiabhi
Jul 05 2016 12:40 UTC
@susangapper what i'm not getting here is like after mod condition satisfying how to get value 4
so that it should come like
[
4
5
6
]
@susangapper you gettin' me?
willfree108
@willfree108
Jul 05 2016 12:43 UTC
help format
CamperBot
@camperbot
Jul 05 2016 12:43 UTC

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick() at _start_ and _end_ around thecode`.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

willfree108
@willfree108
Jul 05 2016 12:44 UTC
@sainiabhi why u dont use a tab and display it ?
Abhishek Saini
@sainiabhi
Jul 05 2016 12:45 UTC
Hey @willfree108 i will
Susan
@susangapper
Jul 05 2016 12:56 UTC
console.log(j+i*3);
@sainiabhi sorry, rubbish at algorithmic stuff :)
Abhishek Saini
@sainiabhi
Jul 05 2016 12:58 UTC
@susangapper :P same here, ok thanks for your time
CamperBot
@camperbot
Jul 05 2016 12:58 UTC
sainiabhi sends brownie points to @susangapper :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @susangapper |http://www.freecodecamp.com/susangapper
Susan
@susangapper
Jul 05 2016 13:02 UTC
This message was deleted
CamperBot
@camperbot
Jul 05 2016 13:02 UTC
:bulb: to format code use backticks! ``` more info
i-liszt
@i-liszt
Jul 05 2016 13:28 UTC
Hi everyone, I'm working with the project "Build a Wikipedia Viewer". I use ajax to query the data, but the wikipedia api return nothing. I don't know what mistake I made. Anyone can help me?
http://codepen.io/Liszt/pen/PzjYBY
Moisés Man
@moigithub
Jul 05 2016 13:36 UTC
@i-liszt check devtools/console (F12 or constrol shift J ) if u have any errors
add some console.log to check if ur api returns data
Marc Vesper
@marcvesper
Jul 05 2016 13:36 UTC
@i-liszt do you have a callback function called Query defined somewhere for when the request is successful?
Moisés Man
@moigithub
Jul 05 2016 13:38 UTC
@i-liszt make sure ur code dont have any syntax error
Susan
@susangapper
Jul 05 2016 13:49 UTC
@i-liszt hi, I had the same mistake this morning. The ajax call doesn't work but the getJSON call does. I think its to do with the way jQuery implements the getJSON shorthand with a <script> hack???? Try your url with the getJSON function
var url = 'https://en.wikipedia.org/w/api.php?action=query&list=search&format=json&srsearch=' + searchTerm + '&callback=?';

  //Also works
  var jqxhr = $.getJSON(url, function(r) {
      //console.log("success: " + JSON.stringify(r));
      displaySearchResults(r)
    })
    .fail(function() {
      console.log("error");
    });
i-liszt
@i-liszt
Jul 05 2016 13:50 UTC
@moigithub I see the search results in the console. Thank you! Moreover, I want to ask why there seems nothing in codepen's console? I see object, but it looks like empty object
CamperBot
@camperbot
Jul 05 2016 13:50 UTC
i-liszt sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1637 | @moigithub |http://www.freecodecamp.com/moigithub
i-liszt
@i-liszt
Jul 05 2016 13:50 UTC
@marcvesper Yes, on the top of JS block
Moisés Man
@moigithub
Jul 05 2016 13:51 UTC
@i-liszt probably ur api query parameters
try with those
action=query&list=search&format=json&srsearch=cat
u can put on ur data like u doing.. or directly in the url like @susangapper code above
will do the same
@i-liszt
Marc Vesper
@marcvesper
Jul 05 2016 13:58 UTC

@i-liszt like @moigithub says, seems it's the parameters. this works with your structure: ``` function Search() {
var url = 'https://en.wikipedia.org/w/api.php';
var keyword = $("#keyword").val();

$.ajax({
url: url,
data: {
action: 'query',
list: 'search',
srsearch: keyword,
format: 'json'
},
dataType: 'jsonp',
success: Query
});
} ```

Gaurav Tolani
@Gauravtolani
Jul 05 2016 14:23 UTC
how to do this.. -------------------</> in html as shown in the portfolio demo page by fcc..
?
Brooks Van Buren
@woofiewilly
Jul 05 2016 14:28 UTC
Hello, does anyone know if I can just link my personal website for the Portfolio challenge instead of making a codepen?
gemaderus
@gemaderus
Jul 05 2016 14:30 UTC
@woofiewilly I did it,
@woofiewilly link to my personal domain
Brooks Van Buren
@woofiewilly
Jul 05 2016 14:38 UTC
Thanks
i-liszt
@i-liszt
Jul 05 2016 14:43 UTC
@moigithub Got it. I'll try it. Thank you and @susangapper and @marcvesper
CamperBot
@camperbot
Jul 05 2016 14:43 UTC
i-liszt sends brownie points to @moigithub and @susangapper and @marcvesper :sparkles: :thumbsup: :sparkles:
:warning: i-liszt already gave moigithub points
:cookie: 285 | @marcvesper |http://www.freecodecamp.com/marcvesper
:cookie: 266 | @susangapper |http://www.freecodecamp.com/susangapper
gemaderus
@gemaderus
Jul 05 2016 15:04 UTC
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (var i = 0; i < arr.length; i++) {
    for (var j = 0; j < arr[i].length; j++) {
      console.log(arr[i][j]);
    }
  }
  // Only change code above this line
  return product * multiplyAll(arr);
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
What is wrong?
Moisés Man
@moigithub
Jul 05 2016 15:18 UTC
@gemaderus console.log is used for debuggin purposes
using arr[i][j] u have access to each of those numbers below (subarrays )
u need to calculate the multiplication of all those numbers.. and assign to product variable (on ur loop)
and finally return the product result
Marc Vesper
@marcvesper
Jul 05 2016 15:19 UTC
@gemaderus your two for loops are not changing the value of product. it's always at 1.
Patrick
@cyas87
Jul 05 2016 15:20 UTC
Hello everyone, I'm working on my first project (tribute page) and am still having problems aligning the list the way I want it to be. I know I can use containers to do it, but I haven't been able to figure out exactly how to get it the way I would like it to look. Can someone direct me someplace where there is a good explanation on how containers work? Thank you. http://codepen.io/cyas87/pen/mEOEWX
Toni Shortsleeve
@KoniKodes
Jul 05 2016 15:24 UTC
@cyas87 You have closed your row and column classes without your li inside. Try to set your col div to text-left and and pull-center, and wrap your li's inside that.
gemaderus
@gemaderus
Jul 05 2016 15:25 UTC
@marcvesper Why?
@marcvesper Why not change?
Patrick
@cyas87
Jul 05 2016 15:27 UTC
@KoniKodes thanks! I'll try that out!
CamperBot
@camperbot
Jul 05 2016 15:27 UTC
cyas87 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 322 | @konikodes |http://www.freecodecamp.com/konikodes
Marc Vesper
@marcvesper
Jul 05 2016 15:27 UTC
@gemaderus You don't tell it to change. :) Your console.log prints out each number in the array. But you also want to do something with each number of the array, right?
gemaderus
@gemaderus
Jul 05 2016 15:28 UTC
@marcvesper yes
Toni Shortsleeve
@KoniKodes
Jul 05 2016 15:28 UTC
@cyas87 Thank you for the brownie. I hope it helps.
CamperBot
@camperbot
Jul 05 2016 15:28 UTC
konikodes sends brownie points to @cyas87 :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @cyas87 |http://www.freecodecamp.com/cyas87
Alex
@Sevohan
Jul 05 2016 15:30 UTC
Hi Everyone. I'm working on the Random Quote Quote Machine and I'm trying to get a kind of proof of concept that I am pulling the information I need correctly. I'm trying to figure out where my disconnect is. Thanks! http://codepen.io/Sevohan/pen/akwRWw
Toni Shortsleeve
@KoniKodes
Jul 05 2016 15:33 UTC
@Sevohan Set up your html so that you can see the results. Then once you can see that, you can style it with css to look pretty. Until then, you can try console.log(results);
Moisés Man
@moigithub
Jul 05 2016 15:36 UTC
@Sevohan using chrome ??
Alex
@Sevohan
Jul 05 2016 15:37 UTC
I am will that cause me problems?
Moisés Man
@moigithub
Jul 05 2016 15:37 UTC
nope.. i see u using console.log.. did u open devtools to see ur console output ?
control + shift + J
or F12 -> console tab
Patrick
@cyas87
Jul 05 2016 15:39 UTC
@KoniKodes No problem. Your advice worked great, thanks again!
CamperBot
@camperbot
Jul 05 2016 15:39 UTC
cyas87 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:warning: cyas87 already gave konikodes points
Toni Shortsleeve
@KoniKodes
Jul 05 2016 15:40 UTC
:-)
Alex
@Sevohan
Jul 05 2016 15:40 UTC
@moigithub Yeah I'm looking at my console output but it seems to be having problems with the $
Moisés Man
@moigithub
Jul 05 2016 15:41 UTC
did u add the jquery library ? @Sevohan
jake-thewoz
@jake-thewoz
Jul 05 2016 15:42 UTC
@Sevohan Yeah, you'll have to add the jQuery library in settings.
Alex
@Sevohan
Jul 05 2016 15:44 UTC
That explains why none of my jQuery was working on my actual project. Thanks @jake-thewoz @moigithub and @KoniKodes !
CamperBot
@camperbot
Jul 05 2016 15:44 UTC
sevohan sends brownie points to @jake-thewoz and @moigithub and @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 300 | @jake-thewoz |http://www.freecodecamp.com/jake-thewoz
:cookie: 323 | @konikodes |http://www.freecodecamp.com/konikodes
:star2: 1641 | @moigithub |http://www.freecodecamp.com/moigithub
Michael de Lima Alves
@elderalves
Jul 05 2016 16:04 UTC
Which are you using?? PostCSS or SASS??
brascene
@brascene
Jul 05 2016 16:23 UTC
Hi there, I'm stuck on geolocation, anybody online for some advices?
I did some check, and concluded that this function: navigator.geolocation.getCurrentPosition(success) is not executing
success is another function which takes the location and prints it in textarea
am I missing some external resource, or is there maybe browser problem
and ideas?
Marc Vesper
@marcvesper
Jul 05 2016 16:28 UTC
@brascene are you using chrome?
brascene
@brascene
Jul 05 2016 16:32 UTC
@marcvesper yes
Marc Vesper
@marcvesper
Jul 05 2016 16:34 UTC
@brascene it's a security feature in chrome. to workaround it, you need to first get your geocoords externally, eg. by calling them from a site like: http://ip-api.com/docs/api:json
@brascene (there's probably other workarounds, but that worked easiest for me. more on the security feature here: https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only?hl=en)
brascene
@brascene
Jul 05 2016 16:40 UTC
@marcvesper thank you very much, I'll try now to use ip-api.com :)
CamperBot
@camperbot
Jul 05 2016 16:40 UTC
:cookie: 286 | @marcvesper |http://www.freecodecamp.com/marcvesper
brascene sends brownie points to @marcvesper :sparkles: :thumbsup: :sparkles:
MarkHR
@MarkH16
Jul 05 2016 16:45 UTC
http://codepen.io/MarkHCP/pen/OXWoeJ
Could someone tell me how to make the images resize nicely when on smaller screen?Right now they just kinda clump up and it's really ugly.
melisa pettaway
@mpettaw2
Jul 05 2016 16:48 UTC
hello everyone
I am having a hard time with the build random qoute machine.
it seems that the api is not working...I can't even get an error msg to display on the document
Arun Kumar Mohan
@arku
Jul 05 2016 16:49 UTC
@mpettaw2 Share your codepen so that people can help you
melisa pettaway
@mpettaw2
Jul 05 2016 16:49 UTC
i think it is not going to success but it is not erroring out either
Arun Kumar Mohan
@arku
Jul 05 2016 16:50 UTC
You should look at the console for errors
@arun1595 i have and nothing is displaying....:(
oh the humanity
Arun Kumar Mohan
@arku
Jul 05 2016 16:51 UTC
It looks like you're not getting valid json from the ajax call. See the console after clicking the button
melisa pettaway
@mpettaw2
Jul 05 2016 16:52 UTC
oh you mean the "button working" note?
d1sr3
@d1sr3
Jul 05 2016 16:53 UTC
Hello whenever I press button in my random quote site I always get the same quote my codepen : http://s.codepen.io/d1sr3/debug/LZZKMr could anyone help me?
Arun Kumar Mohan
@arku
Jul 05 2016 16:55 UTC
@mpettaw2 You're not actually getting JSON back. Check the console. You should get a VM660:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1 click on the link at the right to see what you get back
melisa pettaway
@mpettaw2
Jul 05 2016 16:55 UTC
awww...so i need another api?
Arun Kumar Mohan
@arku
Jul 05 2016 16:56 UTC
I would suggest you to try Forismatic API
melisa pettaway
@mpettaw2
Jul 05 2016 16:56 UTC
thank you!!
Arun Kumar Mohan
@arku
Jul 05 2016 16:57 UTC
It'll be much easier if you learn what JSONP is
melisa pettaway
@mpettaw2
Jul 05 2016 16:59 UTC
ok...
Ken Haduch
@khaduch
Jul 05 2016 17:03 UTC

@mpettaw2 - you have a few problems in your code, but it is basically working - I made this change at the start of your success function:

   success: function(json) {
      console.log(json);
      //var jsonish = JSON.parse(json);
      var author = json.author;
      var qoute = json.quote;
      var html = "<h1>" + author + "</h1><br><p>" + qoute + "</p>";
      $(html).appendTo("#msg");
      console.log("api working");
    },

And got some output from the quote that was returned.

You also have "QUOTE" misspelled in several places - one of which was causing a failure to read from the returned object.

I hope that helps?

@mpettaw2 - you were getting an object, so your code that access it: var author = json.author; var qoute = json.quote; is sufficient to fetch the author and quote from the object.
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:12 UTC

Help me with this palindrome challenge here, please.


function palindrome(str) {
  // Good luck!



var normal = str.replace('/[^a-zA-Z]/gi', '').toLowerCase();




var rev = str.replace('/^[A-Z]+$/gi', '').split('').reverse().join('').toLowerCase();



if(rev.split('').reverse().join('') === normal){
return true;

}
else if(rev.split('').reverse().join('') !== normal){
return false;
}

}

Here's my code.

CamperBot
@camperbot
Jul 05 2016 17:12 UTC
no wiki entry for: me with this palindrome challenge here pleasefunction palindromestr good luckvar normal strreplacea-za-zgi tolowercasevar rev strreplacea-zgi splitreversejointolowercaseifrevsplitreversejoin normalreturn trueelse ifrevsplitreversejoin normalreturn falseheres my code
greg
@wearenotgroot
Jul 05 2016 17:14 UTC
@a-y-u-s-h you should reverse normal then compare it to the non-reversed version otherwise if your regex is different they wont be the same
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:14 UTC
I reversed the reversed, isn't that the same thing?
Oh, holy shit, let me change that regex
Ken Haduch
@khaduch
Jul 05 2016 17:15 UTC
@a-y-u-s-h - you should only filter out the characters once, then reverse that filtered result, then compare. No need to filter out the character in two different places.
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:16 UTC
@khaduch But, what if we have a string like "@alibaba@" ?
greg
@wearenotgroot
Jul 05 2016 17:18 UTC
@a-y-u-s-h you can either retrieved all alphanumeric characters or remove the non-alphanumeric chars(regex for non-word characters is ----> \W ). however underscore(_) is considered to be alphanumeric(word character) so you need to take it into account
Ken Haduch
@khaduch
Jul 05 2016 17:22 UTC
@a-y-u-s-h - that shouldn't matter. You only need to filter out the undesired characters one time. Even if you filter twice as you are trying to reverse the string, the same thing should result - the same characters should be filtered out both times, or else you'll never get a match when you're supposed to. So only filter once, then reverse the filtered string into a new variable, then compare the two.
greg
@wearenotgroot
Jul 05 2016 17:26 UTC
@a-y-u-s-h
//need to improve regex
var normal = str.replace('/[^a-zA-Z]/gi', '').toLowerCase(); //only need to perform .replace once

var rev = normal.split('').reverse().join('');//<----normal is already lower case

//on the if test rev and normal are strings so no need to use .join and .reverse
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:28 UTC

@wearenotgroot Yup, I've been trying. I used filter before doing this, it returned true for every palindrome, didn't return false for non-palindromes.
I've been getting that same result again and again. These are the methods that I've tried till now.

Method 1 :

  1. Converted the string into an array.
  2. Removed non-letter characters from it using for loop and then decapitalized everything.
  3. Stored the reverse in reverse, and normal in normal and compared them.

Method 2 :
Used .replaceto do similar thing

Method 3 :
Used .filterto do similar thing. Used this : /^[A-Z]+$ /gi to get all the wanted characters.

Doesn't work even after removing the + from regex.

greg
@wearenotgroot
Jul 05 2016 17:29 UTC
@a-y-u-s-h the the regex i hinted \W also filter out _ underscore
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:30 UTC
@wearenotgroot Yup, tried that one as well yesterday. Same errors for all methods.
strings which are not palindrome like "nope" don't return false.
greg
@wearenotgroot
Jul 05 2016 17:31 UTC
@a-y-u-s-h /[\W_]/g <-----------this guy didnt work?
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:32 UTC

The conditions where spaces or numeric or special characters are involved and if they should return true, return true.

@wearenotgroot Yup, that one too. Just checked it again.

greg
@wearenotgroot
Jul 05 2016 17:32 UTC
@a-y-u-s-h try post updated code?
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:34 UTC


function palindrome(str) {
  // Good luck!



var normal = str.replace('/[\W_]/g', '').toLowerCase();




var rev = str.replace('/[\W_]/g', '').split('').reverse().join('').toLowerCase();



if(rev.split('').reverse().join('') === normal){
return true;

}
else if(rev.split('').reverse().join('') !== normal){
return false;
}

}

palindrome("");
1.PNG
Lorian
@glowlo
Jul 05 2016 17:35 UTC
hey all!
I am working on my tribute page using codepen
Ken Haduch
@khaduch
Jul 05 2016 17:36 UTC
@glowlo - hello
Lorian
@glowlo
Jul 05 2016 17:36 UTC
I am curious though...what is the link rel for including boostrap on a webpage
greg
@wearenotgroot
Jul 05 2016 17:36 UTC
@a-y-u-s-h umm the regex doesnt need '' otherwise it will treated as an actual string
Lorian
@glowlo
Jul 05 2016 17:36 UTC
in the lessons it gave us the link for using bootstrap with an app...and then applied it behind the scenes
what would be use as a developer to apply boostrap to a webpage?
greg
@wearenotgroot
Jul 05 2016 17:37 UTC
@a-y-u-s-h
var normal = str.replace(/[\W_]/g, '').toLowerCase(); //should be like
Ken Haduch
@khaduch
Jul 05 2016 17:37 UTC
@a-y-u-s-h - you should just be able to compare normal to rev and return the result? Your other code at the bottom looks like you're reversing the reversed string again? that's not necessary, besides being incorrect...
@glowlo - if you go into the CSS panel on CodePen, and click the gear icon (at the top) it should present a popup with a place to set external libs. There are some quick links at the bottom - just select bootstrap and you'll see the URL they use. Does that answer your question?
greg
@wearenotgroot
Jul 05 2016 17:38 UTC

@a-y-u-s-h aslo as mentioned earlier there is no point on repeating the same operation

var normal = str.replace(/[\W_]/g, '').toLowerCase(); //only need to perform .replace once

var rev = normal.split('').reverse().join('');

so just take the normal variable and reverse it

Lorian
@glowlo
Jul 05 2016 17:38 UTC
sure! thanks so much!
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:39 UTC

@wearenotgroot Updated . WORKS NOW. THANKS. -.-" silly mistakes. Consumed my whole day.

@khaduch Yup, correct. WORKS NOW. Thanks.

CamperBot
@camperbot
Jul 05 2016 17:39 UTC
a-y-u-s-h sends brownie points to @wearenotgroot and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1402 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1204 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Jul 05 2016 17:40 UTC
@a-y-u-s-h :+1: just review how regex is treated
Ayush Sharma
@a-y-u-s-h
Jul 05 2016 17:45 UTC
@wearenotgroot yup, I will :+1:
Adam Lichter
@spot1000
Jul 05 2016 17:51 UTC
I'm having trouble getting my twitch API page generating links... it seems to generate the proper link, and when i copy and paste the line into my browser it works fine, but it i click the link (which opens a new page) twitch seems to hang? any help?
Ken Haduch
@khaduch
Jul 05 2016 17:51 UTC
@spot1000 - if you post a link to your project, I can take a look and see if I can help?
don't judge my code too hard... I've been fighting with this for the past couple hours...
Ken Haduch
@khaduch
Jul 05 2016 17:54 UTC
@spot1000 - OK... :hammer: just kidding... learning this takes time! :)
Adam Lichter
@spot1000
Jul 05 2016 17:55 UTC
hahaha
i didn't think it was THAT bad... besides not commenting anything...
and still being fairly new
Ken Haduch
@khaduch
Jul 05 2016 17:57 UTC
@spot1000 - well, so it's not opeining the page when you click the link? At least it opens the page and then hangs... but that seems to be a problem even if you open it directly and click on one of the available links from the twitch.tv home page? I wonder if the site is having some kind of issues?
Adam Lichter
@spot1000
Jul 05 2016 17:58 UTC
ok! that's what i was experienceing too
now copy the link, close that window, and open a new one and past the link in there
that works fine!
or at least it did for me...
Ken Haduch
@khaduch
Jul 05 2016 18:00 UTC
@spot1000 - yeah, okay... it did pop up in a new window? Seems like the same URL? kind of crazy. I wonder if I got far enough with my project to try this? I started, but I don't know if I formed the page with the URLs on it?
Adam Lichter
@spot1000
Jul 05 2016 18:00 UTC
I'm glad I'm not going crazy... or it's not just my computer
haha
but even if you click on the example project, it does the same thing
Ken Haduch
@khaduch
Jul 05 2016 18:02 UTC
@spot1000 - definitely not working for me, either - it brings up the page with the navbar on the left hand side, but the wheel just keeps spinning...
Adam Lichter
@spot1000
Jul 05 2016 18:02 UTC
and I have ZERO idea how to fix that...
I assume yours was working when you completed it?
when was that?
Tyler Conoff
@Yoplay8
Jul 05 2016 18:04 UTC
Can anyone help me with figuring out how to center bullet points in HTML. I cant get the bullet points to be centered.
Ken Haduch
@khaduch
Jul 05 2016 18:04 UTC
@spot1000 - I haven't completed my project. But when I load my pen, it says that freecodecamp is OFFLINE?
Adam Lichter
@spot1000
Jul 05 2016 18:04 UTC
currently it is
but try it with one of the ones that's online
mine still does that
@Yoplay8 link your pen, so we can see what you've tried
Tyler Conoff
@Yoplay8
Jul 05 2016 18:06 UTC
how do i link it?
just send url?
Adam Lichter
@spot1000
Jul 05 2016 18:07 UTC
yep
Ken Haduch
@khaduch
Jul 05 2016 18:07 UTC
@Yoplay8 - you don't really want to get your bullet points centered - at least I don't think you do. If the lines are different lengths, it makes it a jagged-edged display of text, not too nice looking.
ehh then what i need is to get the all alinged
Adam Lichter
@spot1000
Jul 05 2016 18:09 UTC
if you put text in your <li> elements they center like i think you want...
Tyler Conoff
@Yoplay8
Jul 05 2016 18:10 UTC
well the text its self get centered
But i want is the bullets to be father inwards
Adam Lichter
@spot1000
Jul 05 2016 18:10 UTC
with the bullets
Ken Haduch
@khaduch
Jul 05 2016 18:10 UTC
@spot1000 - that's really strange about twitch.tv. If i go to a completely separate window, it works, at least it works better? I wonder why that could be?
Adam Lichter
@spot1000
Jul 05 2016 18:10 UTC
@khaduch right? I have no idea
could i see yours?
Tyler Conoff
@Yoplay8
Jul 05 2016 18:11 UTC
thanks adam you helped me figure out what i want now XD
Adam Lichter
@spot1000
Jul 05 2016 18:11 UTC
no problem! glad I could help
Ken Haduch
@khaduch
Jul 05 2016 18:12 UTC
@spot1000 - mine doesn't generate the links at this point - just the list of users. I am in an early phase of the design. Let me see if I can set up the page to at least add the URLs to the online users?
Adam Lichter
@spot1000
Jul 05 2016 18:13 UTC
oh yeah, that's probably a good things to have! I didn't realize you weren't done yours haha
don't worry about it right now if you're working on a different challenge or something
Thanks @khaduch for the second set of eyes
CamperBot
@camperbot
Jul 05 2016 18:13 UTC
spot1000 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1403 | @khaduch |http://www.freecodecamp.com/khaduch
Adam Lichter
@spot1000
Jul 05 2016 18:13 UTC
I'll let you know if i figure anything out about how to make it work!
Stephen
@stephepush
Jul 05 2016 18:14 UTC
any recommendations for a keyless weather api?
or how to keep the key to a weather app secure?
Adam Lichter
@spot1000
Jul 05 2016 18:14 UTC
I wasn't able to find a good keyless one
I just plugged my key into my pen
i don't think it's as big of a deal if you're building a website from scratch... but when you're building in a pen anyone can go in and look at your code
not a big deal with the weather api one since no one is paying for it
Stephen
@stephepush
Jul 05 2016 18:16 UTC
okay
i think ill just spend the day looking at code.org's jquery course anyways
thanks, though, @spot1000
CamperBot
@camperbot
Jul 05 2016 18:17 UTC
stephepush sends brownie points to @spot1000 :sparkles: :thumbsup: :sparkles:
:cookie: 317 | @spot1000 |http://www.freecodecamp.com/spot1000
Zelite
@zelite
Jul 05 2016 18:18 UTC
Anyone familiar with bootstrap and less can have a look at this issue: http://forum.freecodecamp.com/t/bootstrap-and-less-navbar/17554
Ken Haduch
@khaduch
Jul 05 2016 18:19 UTC
@spot1000 - I just went to take a look at the example project, and there are TONS of errors in the console having to do with some sandboxed elements or something? Not sure what it all means at this point? But it does not work, and maybe there have been changes to twitch, or it is temporarily hosed?
Adam Lichter
@spot1000
Jul 05 2016 18:20 UTC
my guess is changes to how they receive URL request? cause I just made a simple pen with a link to twitch and it does the same thing
Daniel Parvin
@danielparvin
Jul 05 2016 18:23 UTC
Hi all!
Adam Lichter
@spot1000
Jul 05 2016 18:23 UTC
hi @danielparvin
Darnetta
@NettyBetty
Jul 05 2016 18:26 UTC
Hello, everyone.
So... is anyone else here a citizen of Procrasti-Nation?
Brooks Van Buren
@woofiewilly
Jul 05 2016 18:28 UTC
Hello everyone. I have float right on my #author, and clear right on my #buttons, but they are still next to each other. What did I do wrong?
http://codepen.io/woofiewilly/pen/KrqGwP
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:28 UTC
How do you guys like my Twitch project? http://codepen.io/hristijankiko/full/WxOgQJ/
Adam Lichter
@spot1000
Jul 05 2016 18:30 UTC
looks good @hristijankiko but it seems like you're having the same problem that @khaduch and I are having with ours
in that the link hangs on twitch TV and doesn't show the video...
otherwise, good job!
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:31 UTC
@spot1000 It's probably a codepen thing, if you copy and paste the same url in new tab it works
Adam Lichter
@spot1000
Jul 05 2016 18:33 UTC
yeah, we found that too
either way, I love the look of it
looks really good
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:36 UTC
@spot1000 Thanks :)
CamperBot
@camperbot
Jul 05 2016 18:36 UTC
hristijankiko sends brownie points to @spot1000 :sparkles: :thumbsup: :sparkles:
:cookie: 318 | @spot1000 |http://www.freecodecamp.com/spot1000
Adam Lichter
@spot1000
Jul 05 2016 18:37 UTC
@woofiewilly you can take out the float all together if you want, just at "class='text-right'" to the author id, and it should work great
Floats are notoriously hard to deal with, I just try to avoid them
Brooks Van Buren
@woofiewilly
Jul 05 2016 18:38 UTC
@spot1000 That works I guess. Thank you!
CamperBot
@camperbot
Jul 05 2016 18:38 UTC
woofiewilly sends brownie points to @spot1000 :sparkles: :thumbsup: :sparkles:
:cookie: 319 | @spot1000 |http://www.freecodecamp.com/spot1000
Adam Lichter
@spot1000
Jul 05 2016 18:38 UTC
sorry, not the actual id itself, just in the same h2 tag
no problem! glad to help
Luke
@lukenetti3
Jul 05 2016 18:39 UTC
Hey guys, I am working on the wikipedia viewer and having some trouble getting started. I have read the documentation in the links and still a little confused. Can someone just explain how I retrieve the api? I thought to use one of the links but can't seem to figure it out.
Adam Lichter
@spot1000
Jul 05 2016 18:40 UTC
sure! I had a hard time with that one too
can you link your pen so I can see what you've got so far?
Its not much, was confused on how to retrieve the information with the api.
Its different than the weather app and the quote machine, so thats why I was confused.
Adam Lichter
@spot1000
Jul 05 2016 18:42 UTC
ahh
did you use ajax for those too?
Luke
@lukenetti3
Jul 05 2016 18:43 UTC
@spot1000 Yeah, I did. Can I not with this one?
Adam Lichter
@spot1000
Jul 05 2016 18:43 UTC
i have no idea, i used jquery haha
gimme a second to take a look at it
I'm not super familiar with ajax
Luke
@lukenetti3
Jul 05 2016 18:44 UTC
@spot1000 From my understanding I was trying to use jquery too but I found someone do it like that with ajax, and it made more sense to me. What url do you use though?
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:45 UTC
@lukenetti3 You need to use the opensearch option on the api
I built the URL in there, and then just plugged it into my code
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:47 UTC
@lukenetti3 Press make request
Adam Lichter
@spot1000
Jul 05 2016 18:48 UTC
if you query for extracts and links, and add search to generator
that's what I did
Luke
@lukenetti3
Jul 05 2016 18:49 UTC
@spot1000 What do you mean by add search to generator?
Adam Lichter
@spot1000
Jul 05 2016 18:50 UTC
scroll down to generator, and pick search from the dropdown
Luke
@lukenetti3
Jul 05 2016 18:53 UTC
@hristijankiko @spot1000 Okay I see where you add search to generator...I don't quite understand that api sandbox though? Like what is it doing?
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:54 UTC
@lukenetti3 Gives you a format on how your url should look like on the request
@lukenetti3 Here is the full link for that example https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=Earth
@lukenetti3 All you need to do in your code is to edit that &search=
Adam Lichter
@spot1000
Jul 05 2016 18:56 UTC
yep, that's basically it
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:57 UTC
@lukenetti3 And use a callback
Luke
@lukenetti3
Jul 05 2016 18:57 UTC
@hristijankiko Okay, I am starting to understand a little bit more. So when the search box in my code is filled with some string that someone types in that is used in the "&search=" spot?
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:57 UTC
@lukenetti3 Yes, you need to use the input like &search=input
Luke
@lukenetti3
Jul 05 2016 18:58 UTC
@hristijankiko Okay, I see what your saying. So the url I use should look like the url you sent me, but without the "Earth" at the end?
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 18:58 UTC
@lukenetti3 Yeah
Adam Lichter
@spot1000
Jul 05 2016 18:58 UTC
correct
Luke
@lukenetti3
Jul 05 2016 19:00 UTC
@hristijankiko @spot1000 Thanks guys! I really appreciate the help. Sometimes I just have a hard time getting started on these projects.
CamperBot
@camperbot
Jul 05 2016 19:00 UTC
lukenetti3 sends brownie points to @hristijankiko and @spot1000 :sparkles: :thumbsup: :sparkles:
:cookie: 320 | @spot1000 |http://www.freecodecamp.com/spot1000
:cookie: 296 | @hristijankiko |http://www.freecodecamp.com/hristijankiko
Adam Lichter
@spot1000
Jul 05 2016 19:00 UTC
same here, don't worry. it happens to everyone.
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 19:00 UTC
Yea its all good
Luke
@lukede
Jul 05 2016 19:22 UTC
For the portfolio section, I print screened, edited, and saved a copy of my tribute page to save in the portfolio section. But I'm having trouble figuring out where to put it on the web so I can create a link to it from my HTML code. Does anyone know where to put the image or if there is a better way to create portfolio images for that section?
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 19:31 UTC
@lukede You can use https://postimage.org/
vínαч puppαl
@vinaypuppal
Jul 05 2016 19:32 UTC
@lukede u can use https://cloudinary.com/
Luke
@lukede
Jul 05 2016 19:37 UTC
@hristijankiko @vinaypuppal thank yo
CamperBot
@camperbot
Jul 05 2016 19:37 UTC
lukede sends brownie points to @hristijankiko and @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 384 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
:cookie: 297 | @hristijankiko |http://www.freecodecamp.com/hristijankiko
Sabir
@SSaabbiirr
Jul 05 2016 19:39 UTC
Guys. How can i place my pic in the middle?
Hristijan Gjorgjievski
@hristijankiko
Jul 05 2016 19:41 UTC
@SSaabbiirr margin: 0 auto?
@SSaabbiirr That is horizontal middle
Sabir
@SSaabbiirr
Jul 05 2016 19:44 UTC
@hristijankiko "center-block" . found
Sabir
@SSaabbiirr
Jul 05 2016 20:04 UTC
Guys. <style> body {background color: gray;}</style>not working. why?
Islam Ibakaev
@dagman
Jul 05 2016 20:14 UTC
@SSaabbiirr background-color
Sabir
@SSaabbiirr
Jul 05 2016 20:14 UTC
@dagman yeah. thanks
CamperBot
@camperbot
Jul 05 2016 20:14 UTC
ssaabbiirr sends brownie points to @dagman :sparkles: :thumbsup: :sparkles:
:cookie: 600 | @dagman |http://www.freecodecamp.com/dagman
Islam Ibakaev
@dagman
Jul 05 2016 20:15 UTC
yw
Ken Haduch
@khaduch
Jul 05 2016 20:19 UTC
@spot1000 @hristijankiko - I just read your post, Adam and Hristijan - a thought occurred to me. If you open the page in debug mode on CodePen - it works! It has to do with the sandboxing within CodePen, apparently. Just replace the full in the URL with debug and try it.
Vadali Soumitri
@svadali2
Jul 05 2016 20:26 UTC
hey guys, i am having a problem setting the pause button in my javascript timer, could someone please help
thanks
Sabir
@SSaabbiirr
Jul 05 2016 20:27 UTC
hey guys, how make my text bold?
vínαч puppαl
@vinaypuppal
Jul 05 2016 20:37 UTC
@SSaabbiirr font-weight: bold use this as reference if you are new to css http://www.w3schools.com/css/css_font.asp
Nick Irvine
@irvin3
Jul 05 2016 20:47 UTC
hey does anyone know how to center a paragraph within a column vertically?
I feel like it is really simple but I cant find any good documentation online
Seth Koch
@sethkoch
Jul 05 2016 20:49 UTC
Are you using bootstrap?
vínαч puppαl
@vinaypuppal
Jul 05 2016 20:49 UTC
@irvin3 hi this video can help you https://www.youtube.com/watch?v=hIG-fZ2042k
Ken Haduch
@khaduch
Jul 05 2016 20:52 UTC

@svadali2 - one thing that you need to do, maybe the only thing? - is to save the value that is returned when you call setInterval, because you need that value to be able to stop the interval, that is the value that has to be passed to clearInterval().

Well, there is another thing that you have to do - if I click on your timer button multiple times, it seems that it also starts multiple interval timers, so that the timer then runs much more rapidly and then you won't be able to stop it. You need to save the return from setInterval, and make sure that you do not start another setInterval() while the clock is running. (Perhaps if you get your pause function running, it will be handled there, depending on how your logic is designed.)

Another helpful thing - I changed the session and break timers to 1, but the timer still started at 15:00.

One more thing - it simplifies the logic of the timer countdown if you keep your time value only in seconds, then you don't have to try and track minutes and seconds separately. You can just convert the seconds to a mm:ss value for output.

I hope that helps...

James Sral
@jamessral
Jul 05 2016 20:52 UTC
I can't seem to figure out why my getJSON isn't working
$(document).ready(function() {

  //Get search results on 'submit' event
  $('#regSearch').on('click', function() {
    var query = $('#searchBar').text();
    $.getJSON('https://jsonp.afeld.me/?callback=?&url=https://en.wikipedia.org/w/api.php?action=query&format=json&titles=' + query, function(json) {
      var result = json;
      alert(result);
    });
  });
});
I'm just trying to alert something so that I can make sure it was a success. It apparently is not successful...
I've tried it with and without the jsonp.afeld.me part (I had to use that for the quote generator)
vínαч puppαl
@vinaypuppal
Jul 05 2016 20:56 UTC
@jamessral in click handler prevent default form submission using event.preventDefault()
James Sral
@jamessral
Jul 05 2016 20:57 UTC
Woot!
Thanks, @vinaypuppal!
CamperBot
@camperbot
Jul 05 2016 20:57 UTC
jamessral sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 385 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
vínαч puppαl
@vinaypuppal
Jul 05 2016 20:57 UTC
where event is parameter to click handler function @jamessral
James Sral
@jamessral
Jul 05 2016 20:58 UTC
so
$(something).on('click', function(e) {
        e.preventDefault();

      //other stuff
});
This?
vínαч puppαl
@vinaypuppal
Jul 05 2016 20:58 UTC
@jamessral yes
James Sral
@jamessral
Jul 05 2016 20:58 UTC
Sweet! :smile:
Vadali Soumitri
@svadali2
Jul 05 2016 21:01 UTC
@khaduch wow, thanks for that, i found your comment super helpful, the problem is im not very sure about how setInterval worked and what it returned so i was having an issue
CamperBot
@camperbot
Jul 05 2016 21:01 UTC
svadali2 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1404 | @khaduch |http://www.freecodecamp.com/khaduch
Vadali Soumitri
@svadali2
Jul 05 2016 21:01 UTC
i will look in the others also
Spartano
@Spartano
Jul 05 2016 22:27 UTC
hello, i am tring to do the second challenge on React, but i am not able to use the data that is returned from axios. I keep getting promises. Anione can help me pls http://codepen.io/Spartano/pen/pbwGLy?editors=1010
vvkgdm
@vvkgdm
Jul 05 2016 22:32 UTC
guys this is my i need to change lot of things to look alike qincy's codehttps://codepen.io/vvkgdm/pen/KrqEgm
Mariya
@mariyadiminsky
Jul 05 2016 22:34 UTC
If you're doing a GET request with AJAX on the client-side, you don't need to create a GET for the same URL in the server side right(ie. Node)?
Suzanne Atkinson
@AdventureBear
Jul 05 2016 22:35 UTC
@vvkgdm it's a great start. What specifically do you want to change ?
vvkgdm
@vvkgdm
Jul 05 2016 22:36 UTC
qincy put a quote under the image and i cant
btw thanks @AdventureBear
CamperBot
@camperbot
Jul 05 2016 22:36 UTC
vvkgdm sends brownie points to @adventurebear :sparkles: :thumbsup: :sparkles:
:cookie: 449 | @adventurebear |http://www.freecodecamp.com/adventurebear
Suzanne Atkinson
@AdventureBear
Jul 05 2016 22:37 UTC
What have you tried so garb
Tried so far
vvkgdm
@vvkgdm
Jul 05 2016 22:38 UTC
i dont know hwere or how to start
and im ended up here
*where
Suzanne Atkinson
@AdventureBear
Jul 05 2016 22:39 UTC
Well you've done a good job of adding all the content so far. How much CSS do you know?
vvkgdm
@vvkgdm
Jul 05 2016 22:40 UTC
im beginner
level
Suzanne Atkinson
@AdventureBear
Jul 05 2016 22:42 UTC
Have you done any of the CSS challenges in the curriculum yet? What you want to do requires a little CSS. Not a lot , just a little.
vvkgdm
@vvkgdm
Jul 05 2016 22:43 UTC
yes ,i know css
i took already css challenge
sorry for my bad english
Mariya
@mariyadiminsky
Jul 05 2016 22:46 UTC
nvm
vvkgdm
@vvkgdm
Jul 05 2016 22:46 UTC
ok any one help me out
Suzanne Atkinson
@AdventureBear
Jul 05 2016 22:47 UTC
That's ok. If it's the quote you are trying to get to look like quinceys you just need to give to an ID , then use CSS to center the text, increase the font size and make it italic if you want.
vvkgdm
@vvkgdm
Jul 05 2016 22:48 UTC
okey dokey lemme try it
Suzanne Atkinson
@AdventureBear
Jul 05 2016 22:48 UTC
You probably want to give it a width and center it so that it sits in the middle with padding on either side
look it now
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:08 UTC
Ok good..so now all the text is centered and bigger and italic...is that how you want it, or do you want some text to be bigger, some smaller, etc... ?
vvkgdm
@vvkgdm
Jul 05 2016 23:09 UTC
is this ok to move on?
i mean to next step?
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:11 UTC
this one is kind of self graded. I think there are lots of areas for improvement in your code and for you to gain comfort with how to make those changes. They only get harder from here. I think going to quote machine could be OK if you want to spend time on something different. I am happy to offer you some ideas to help make this one better in terms of makign it easier for you to code and understand all the things going on.
so what I'm saying is I don't think you are ready to move on.
because they will get more challenging and I think you'll be frustrated
but quote machine has a different type of CSS required and you might like the change from this one.
then go back to this one and fix it up a little.
vvkgdm
@vvkgdm
Jul 05 2016 23:12 UTC
oh ok thanks
i will do it then
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:14 UTC
here is mine. You can look at some of the code (the HTML) and see how there are a lot fewer "divs" and "classes" than you have right now in yours.
vvkgdm
@vvkgdm
Jul 05 2016 23:15 UTC
omg nice man
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:15 UTC
basically if you have a lot of text, say several paragraphs, you can enclose them all in one div and style it all the same. So you don't have to make every paragraph "white-text". You can actually declare the whole page to have white text by stying the body like this:
vvkgdm
@vvkgdm
Jul 05 2016 23:15 UTC
that is qincy style
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:15 UTC
thanks. ;)
I'm happy with it. Jeff is my step brother he passed away last month
vvkgdm
@vvkgdm
Jul 05 2016 23:15 UTC
oh yeah lemme remove it first
sorry
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:16 UTC
html, body {
  background-color: #fafafa;

  font-family: 'Verela Round', sans-serif;
  text-align: center;
}
vvkgdm
@vvkgdm
Jul 05 2016 23:16 UTC
for your loss
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:17 UTC
Thank you. He found out he was since Christmas of 2015 and lived 4 months. :( Really adds meaning to "sieze the day". BEcause of Jeff I try to help everyone's day be a little better. But if you use something like that above^^^ You can go in and remove all that extra code from your HTML, and just style the things that are "different".
one more thing, you should use the "tidy" button or drop down for your css and html and practice writing code that looks like the "tidy" version. it's easier for others to read and trouble shoot, and harder to make small mistakes like a missed semicolon.
vvkgdm
@vvkgdm
Jul 05 2016 23:18 UTC
im doing and will ping u after i done
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:18 UTC
I have to run, but wokr on that for a bit. Send me a PM if you like if I'm not on here and i'll take another ook.
:)
good luck!
vvkgdm
@vvkgdm
Jul 05 2016 23:18 UTC
thanks
have a beautiful day
Suzanne Atkinson
@AdventureBear
Jul 05 2016 23:19 UTC
thank you, you too.