These are chat archives for FreeCodeCamp/HelpFrontEnd

30th
Aug 2017
just1witness
@just1witness
Aug 30 2017 00:39
@Pagnito Holy cow! That. is. amazing!
Long Nguyen
@longnt80
Aug 30 2017 01:18

@sudeepnarkar

My solutions are saved though

what do you mean by "your progress is lost" then?

Chris Cullen
@123xylem
Aug 30 2017 01:20

I have simple project location
[IMG]http://i68.tinypic.com/2d6wshs.png[/IMG]

When I run Gulp watch

var gulp        = require('gulp');
var browserSync = require('browser-sync').create();
var reload      = browserSync.reload;

gulp.task('watch', function () {

    browserSync.init({
        server: {
            baseDir: "C:\Users\Chris\Documents\Projects\Coding\GalleryFlex\index.html"
        }
    });

    gulp.watch("*.html, *.css").on("change", reload);
});

It cannot find the file I get 404 error..
[Browsersync] Serving files from: C:UsersChrisDocumentsProjectsCodingGalleryFlexindex.html

I think my base Dir: is pointing to the wrong file location?

Long Nguyen
@longnt80
Aug 30 2017 01:39
@123xylem why don't you use relative path?
Chris Cullen
@123xylem
Aug 30 2017 01:40
@longnt80 like what?
Im really bad with paths and Directory
Long Nguyen
@longnt80
Aug 30 2017 01:41
@123xylem baseDir is supposed to point to your directory/folder, not a file
if your gulpfiles.js is in the same folder as your index.html
baseDir: "./"
Chris Cullen
@123xylem
Aug 30 2017 01:44
thanks
@longnt80 Solved it thankyou
CamperBot
@camperbot
Aug 30 2017 01:44
123xylem sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 537 | @longnt80 |http://www.freecodecamp.com/longnt80
Long Nguyen
@longnt80
Aug 30 2017 01:44
@123xylem np
Chris A.
@OpenProCramMaker
Aug 30 2017 01:50
good evening Coders. I'm having trouble with the Random Quote Generator.
iso
@iso1048
Aug 30 2017 01:55
@OpenProCramMaker i could try and help
Chris A.
@OpenProCramMaker
Aug 30 2017 01:56
Awesome! the trouble I'm having is with tweeting the quote.
iso
@iso1048
Aug 30 2017 01:58
@OpenProCramMaker do you know what url to use?
Chris A.
@OpenProCramMaker
Aug 30 2017 01:58
I pulled the Tweet button from Twitter's Dev Documentation. I'm having issues with updating the data-text to push the updated quote
iso
@iso1048
Aug 30 2017 01:59
@OpenProCramMaker are you working on codepen?
Chris A.
@OpenProCramMaker
Aug 30 2017 01:59
yes
iso
@iso1048
Aug 30 2017 01:59
could you link your pen
now that I have it on here, the new quote button isn't showing. Just a sev
sec
Chris A.
@OpenProCramMaker
Aug 30 2017 02:04
im a damn idiot... had the stupid button fixed.. HAHA
iso
@iso1048
Aug 30 2017 02:07
@OpenProCramMaker im not sure if you should be having a script tag in the middle of html like that. This is what I used: https://dev.twitter.com/web/tweet-button/web-intent. so something like https://twitter.com/intent/tweet?text=hello+world, where you change the text parameter to the quote. Im not familiar with the method you are using sorry. What is the problem you are having exactly?
Chris A.
@OpenProCramMaker
Aug 30 2017 02:09
when you click the tweet button, here, it says "CodePen - A Pen by Chris A". It's been blank when using in CodePen. The method I used was suggested by twitter's dev page here: https://dev.twitter.com/web/tweet-button
always gonna have a hit and miss until it's figured out. I'm going to see what you got and compare
I see what you're saying now... appears to be so much easier. I'll play with it. Thank you!! smh
iso
@iso1048
Aug 30 2017 02:11
@OpenProCramMaker yeah i saw that page too. no problem. good luck.
DJ Nixon
@tGxcoder
Aug 30 2017 02:21
```
  var back = str.length - 1;
that starts on the last letter of the string correct?
Chris A.
@OpenProCramMaker
Aug 30 2017 02:22
  • 1 i believe
plus 1
iso
@iso1048
Aug 30 2017 02:23
@tGxcoder yes, str.length-1 gives the index of the last character in the string.
DJ Nixon
@tGxcoder
Aug 30 2017 02:23
ok cool thanks @gothamknight @OpenProCramMaker
CamperBot
@camperbot
Aug 30 2017 02:23
tgxcoder sends brownie points to @gothamknight and @openprocrammaker :sparkles: :thumbsup: :sparkles:
:cookie: 408 | @gothamknight |http://www.freecodecamp.com/gothamknight
:cookie: 263 | @openprocrammaker |http://www.freecodecamp.com/openprocrammaker
Chris A.
@OpenProCramMaker
Aug 30 2017 02:24
I need to read up some more LOL
super rusty
Pagnito
@Pagnito
Aug 30 2017 02:32
@just1witness whats amazing?
iso
@iso1048
Aug 30 2017 02:35
@Pagnito that link you sent of the portfolio... how was the break?
Pagnito
@Pagnito
Aug 30 2017 02:35
@gothamknight ooh ya, kinda shitty, i had to walk like 7 miles to my dads house lol
i gotta walk back and forth now everyday O.o
hopefully by winter time i can just jog it
iso
@iso1048
Aug 30 2017 02:36
@Pagnito far out. good walk though? clear your head?
Pagnito
@Pagnito
Aug 30 2017 02:37
yea it was good, tho it was def not head clearing, i got so many ideas and so many things i wanna learn and learn fast, my minds always racing
tho its kind of a good thing
iso
@iso1048
Aug 30 2017 02:37
@Pagnito by the way, do you have any useful resources for understanding closures?
Pagnito
@Pagnito
Aug 30 2017 02:38
there was one video i watched that really helped me understand hold on
iso
@iso1048
Aug 30 2017 02:38
@Pagnito yeah I'm even further behind than you. I want to learn so much too but don't currently have the time
awesome
i watched this vid a few times even tho he explains very well
iso
@iso1048
Aug 30 2017 02:38
cool thanks bro
Pagnito
@Pagnito
Aug 30 2017 02:39
np
iso
@iso1048
Aug 30 2017 02:39
@Pagnito thanks
CamperBot
@camperbot
Aug 30 2017 02:39
gothamknight sends brownie points to @pagnito :sparkles: :thumbsup: :sparkles:
:cookie: 280 | @pagnito |http://www.freecodecamp.com/pagnito
Amit Patel
@AmitP88
Aug 30 2017 02:40
hey guys, has anyone here gotten a web developer job solely because of FreeCodeCamp?
Mo.
@mokyox
Aug 30 2017 02:42

Hey folks! I'm updating my weather app and I can't seem to get it work on codepen, even though it works fine locally (albeit slow...)

Does anyone know why? I think it has something to do with HTMl5 geolocation but I'm not sure.

https://codepen.io/mokyox/pen/rmdwWP

Janice He
@Janicekwing
Aug 30 2017 02:43
Hello can someone help me with the personal website challenge? I'm struggling to make my social media buttons "clickable"? :(
Corentin Whyte
@CorySW
Aug 30 2017 02:43
thats weird I could help you
Amit Patel
@AmitP88
Aug 30 2017 02:43
@Janicekwing do you have it on codepen?
Corentin Whyte
@CorySW
Aug 30 2017 02:43
yeah a link on codepen would help
I tried to link my linkedin url with the button.. but it turned purple and also doesn't lead to my linkedin profile :(
Corentin Whyte
@CorySW
Aug 30 2017 02:45
put target="_blank"
after the href
iso
@iso1048
Aug 30 2017 02:45
@mokyox openweathermap is served over http, and codepen is now served over https. that may be why
Amit Patel
@AmitP88
Aug 30 2017 02:45
@Janicekwing your LinkedIn link seems to work, but your Twitter one doesn't
Corentin Whyte
@CorySW
Aug 30 2017 02:46
that should solve it @Janicekwing
Mo.
@mokyox
Aug 30 2017 02:46
@gothamknight Cheers gothamknight. Do you know any other apis that could work?
With HTML5 and https
Janice He
@Janicekwing
Aug 30 2017 02:46
Oh thanks @CorySW :)
CamperBot
@camperbot
Aug 30 2017 02:46
janicekwing sends brownie points to @corysw :sparkles: :thumbsup: :sparkles:
:cookie: 306 | @corysw |http://www.freecodecamp.com/corysw
Janice He
@Janicekwing
Aug 30 2017 02:46
Also, this is minor but do you know why it turned purple?
Corentin Whyte
@CorySW
Aug 30 2017 02:47
np :smile:
well have you included bootstrap ?
if you have bootstrap it should turn it blue
Janice He
@Janicekwing
Aug 30 2017 02:47
Oh, I'm using a different computer. I thought the settings would be saved
iso
@iso1048
Aug 30 2017 02:48
@mokyox fCC provides one. I used darksky api (and google maps geocoding api to get location data) when i did it. https://fcc-weather-api.glitch.me/
Mo.
@mokyox
Aug 30 2017 02:49
@gothamknight Thanks man! I just found that one; I'll work migrating it over. Now to find out why it takes so long to load the page!
CamperBot
@camperbot
Aug 30 2017 02:49
mokyox sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 409 | @gothamknight |http://www.freecodecamp.com/gothamknight
iso
@iso1048
Aug 30 2017 02:50
@mokyox no problem
Janice He
@Janicekwing
Aug 30 2017 02:50
@CorySW is the target = "_blank" only required for codepen?
Corentin Whyte
@CorySW
Aug 30 2017 02:50
I use target blank all the time but it is required because they don't allow it I think @Janicekwing
Janice He
@Janicekwing
Aug 30 2017 02:52
Oh kk :)
Corentin Whyte
@CorySW
Aug 30 2017 02:56
also for the a tags of nav they won't work if you don't do "#home" etc.
BrianWilliams28
@BrianWilliams28
Aug 30 2017 03:03
can someone help with this algorithm? so far i've gotten the LCM of the two integers but i'm kinda at a loss on what to do next.
function smallestCommons(arr) {
  var multiplyArr = arr[0] * arr[1];
  var range = []; // [18, 19, 20, 21, 22, 23]
  // smallestCommons(23,18) => smallestCommons(18,23);
  var sort = arr.sort(function(a, b) { 
    return a - b;
  });
  // creating the range
  for (var i = sort[0]; i <= sort[1]; i++) { 
  range.push(i);
 }
  // function to get the greatest common divisor
 function getGCD(a, b) {
  var remainder = a % b;
   while (remainder > 0) {
     a = b;
     b = remainder;
     remainder = a % b;
   }
   return b; // outputs 1
 } 
 var LCM = multiplyArr / getGCD(sort[1], sort[0]); 
console.log(LCM);
return LCM; // outputs 414...need to test this against each number in the range to see if it divides...if not, next largest common multiple needs to be tested?
}

smallestCommons([23,18]);
Marat
@Marat89bluolyu
Aug 30 2017 03:09
hi all, how can i break up an array with objects? [{},{},{}] ?
I need to work with objects
piteto
@piteto
Aug 30 2017 03:12
what do you mean by break up?
var firstObject = arr[0];
Marat
@Marat89bluolyu
Aug 30 2017 03:13
@piteto i mean, need to get single objects w/o ar
ok, thanks @piteto
CamperBot
@camperbot
Aug 30 2017 03:14
marat89bluolyu sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 18 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Aug 30 2017 03:14
glad that helped
I asked this question in the other room, but didn't get an answer
do I need to use codepen?
DJ Nixon
@tGxcoder
Aug 30 2017 03:16
 array.sort(function(a,b) {
    return b.length - a.length; 
  });
does the b.length make it like .sort.length if that makes sense
iso
@iso1048
Aug 30 2017 03:17
@piteto no you do not. But it does make it easier if you need help.
DJ Nixon
@tGxcoder
Aug 30 2017 03:18
.sort if alphabetical the later b.length convert if to length of word instead of alphabetical?
piteto
@piteto
Aug 30 2017 03:20
okay, thank you @gothamknight
CamperBot
@camperbot
Aug 30 2017 03:20
piteto sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 410 | @gothamknight |http://www.freecodecamp.com/gothamknight
piteto
@piteto
Aug 30 2017 03:22
@tGxcoder it depends on the array, I believe, might be merge sort, quick sort, bubble sort depending on the values
DJ Nixon
@tGxcoder
Aug 30 2017 03:27
i know it worked i was just trying to understand better.
thanks for the visualago.net that seems like a good resource ill have to check that out more. @piteto
CamperBot
@camperbot
Aug 30 2017 03:28
tgxcoder sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 19 | @piteto |http://www.freecodecamp.com/piteto
Marat
@Marat89bluolyu
Aug 30 2017 03:32
if i have function for objects, and arguments may be objects or array with objects.
What should I do with the objects in the array so that they are all passed into the function?

i used for check

if (Array.isArray(obj)) {
        for (var i=0; i < obj.length; i++) {
           console.log(obj[i].product);
       }
    }

but function working only with objects

 var delivery = Math.floor(obj.price * deliveryK * geoK + tip);
Jan Shah
@JanShah
Aug 30 2017 03:49

@Marat89bluolyu

let arr = [0,1,2,3]
let obj = {0:0,1:1,2:2,3:3}
console.log(obj.length) //returns undefined
console.log(arr.length) // return 4

let obj2 = {first:'first',second:'second'}

if(obj2.length) {
  //...loop
} else {
let keys = Object.keys(obj2)
//... keys is an array of obj2 keys, loop through keys eg obj2[key]
}

is this what you mean?

Marat
@Marat89bluolyu
Aug 30 2017 03:53
@JanShah Sorry, I did not correctly ask the question wait
Marat
@Marat89bluolyu
Aug 30 2017 04:00
How to make this code shortly? ;)
function registerDelivery(obj) {
    var geoK = null;
    var deliveryK = 0.015;
    var tip = 175;

    if (Array.isArray(obj)) {
        for (var i=0; i < obj.length; i++) {
           switch (obj[i].destination) {
            case 'loc1':
                geoK = 1;
                break;

            case 'loc2':
                geoK = 1.1;
                break;

            default:
            console.log(obj[i].destination);
           }

           var delivery = Math.floor(obj[i].price * deliveryK * geoK + tip);

            console.log(obj[i].product + ', '
                + obj[i].price 
                + obj[i].count
                + delivery);
                }
    } 

    else {
        switch (obj.destination) {
            case 'loc1':
                geoK = 1;
                break;

            case 'loc2':
                geoK = 1.1;
                break;

            default:
            console.log(obj.destination);
    }

    var delivery = Math.floor(obj.price * deliveryK * geoK + tip);

    console.log(obj.product + ', '
        + obj.price 
        + obj.count
        + delivery);
    }
}

registerDelivery([{
    product: 'Canon EOS 1300D Kit 18-55mm DC Black',
    price: 12345,
    destination: 'loc1',
    count: 1
},
{
    product: 'Apple iPhone 7S',
    price: 54321,
    destination: 'loc2',
    count: 3
}]);
function can contain arguments with an object or an array with objects
Ken Haduch
@khaduch
Aug 30 2017 04:05
@Marat89bluolyu - how about if you get an argument coming in that is not an array, but just an object, that you convert it to an array by doing obj = [ obj ]; and then just handle them all within the for loop? That would make it uniform to handle either case, treat them all as an array of objects. Does it sound like it would work?
Marat
@Marat89bluolyu
Aug 30 2017 04:06
@khaduch wow
@khaduch now i try, thank you!!!
CamperBot
@camperbot
Aug 30 2017 04:06
marat89bluolyu sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3250 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 30 2017 04:07
@Marat89bluolyu - you're welcome - I hope it works out!
Jan Shah
@JanShah
Aug 30 2017 04:10
fn(obj) {
let completeThings =[]
if(obj.length) {
completeThings.push(obj.forEach(item=>completeThisItem(item))
else {
completeThings.push(completeThisItem(obj))
}
return completeThings
}

fn completeThisItem(data) {
//do your thing
}
@Marat89bluolyu
Marat
@Marat89bluolyu
Aug 30 2017 04:12
@JanShah thanks, good change with ES6 =)
CamperBot
@camperbot
Aug 30 2017 04:12
:cookie: 498 | @janshah |http://www.freecodecamp.com/janshah
marat89bluolyu sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
Chris Cullen
@123xylem
Aug 30 2017 05:30
 <div class="box">
              <div class="frame">
                                    <h4> Manley Gas Station</h4>

                  <img src="https://images.pexels.com/photos/159306/construction-site-build-construction-work-159306.jpeg?h=350&auto=compress&cs=tinysrgb">
              </div>

Why wont my Image Align in the center with flex box? CSS:

.box{
    margin-top:2rem ;
    display: flex;
        justify-content: space-between;
        flex-direction: column;
        flex-wrap: wrap;
        border:1px solid black;
        background-color: grey;
    }

@media all and (max-width: 760px) {
  .box { flex: 1; 
      background-color: blue;
    flex-direction: column;
    justify-content: center;
}
}

.frame img{
max-width: 20rem;
max-height: 20rem;
padding:0.3rem;
text-align: center;  
justify-content: center;
justify-content: space-around;

}

My image hugs the left of the box for some reasaon but the h4 is centered. Any ideas?

Sudeep Narkar
@sudeepnarkar
Aug 30 2017 05:45
@longnt80 My browser cache refreshed. I changed the setting. All good now.
Thanks
prakash chandra yadav
@prakashyadav008
Aug 30 2017 05:59
hello everyone
can anyone check if it is responsive
how can i keep the size of the search bar same when the resolution reduces to 600px
.?
Jan Shah
@JanShah
Aug 30 2017 06:01
@prakashyadav008 you could use media queries
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:04
@JanShah the width is same ...but its not aligning to the center as i want
cowCrazy
@cowCrazy
Aug 30 2017 06:05
@prakashyadav008 you can also use min-width property
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:06
min-width ...on which tag should i use it..?
can u give an example..? @cowCrazy
cowCrazy
@cowCrazy
Aug 30 2017 06:07
the input element that you want to preserve its width
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:07
no i am done with the width ...but when the screen size changes it aligns itself to the left
take a look
Jan Shah
@JanShah
Aug 30 2017 06:08
@prakashyadav008 you will solve a lot of issues if you use bootstrap
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:09
dont wanna use prebuild things ..jst plain css and html
Jan Shah
@JanShah
Aug 30 2017 06:10
@prakashyadav008 bootstrap is just a skeleton that helps with getting the outlines right
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:10
ya i know ..but there will be a way to jst do it with css i think
Jan Shah
@JanShah
Aug 30 2017 06:10
of course there is
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:12
do u know how to get it right
i mean center lol
@JanShah
cowCrazy
@cowCrazy
Aug 30 2017 06:15
@prakashyadav008 if you add margin: auto in the media query it will be centered
to the search-bar calss
Jan Shah
@JanShah
Aug 30 2017 06:18
//in media query
  .search-bar{
    float:left;
    width:100%;
    border:none;
  }
that's an idea
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:18
@cowCrazy ya
thanks a lot man
was confused because of that
cowCrazy
@cowCrazy
Aug 30 2017 06:19
@prakashyadav008 :+1:
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:19
but it should work when i use text-align:center
in the container1 class
@cowCrazy
its already floated left thats what i am removing in media query @JanShah
Jan Shah
@JanShah
Aug 30 2017 06:21

@prakashyadav008

  .search-bar{
    float:none;
    margin:auto;
  }

then

prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:29
works @JanShah
another issue popped up
i hav set the width of the search box+ button = 240 px
so the transition is not working now as expected
it should expand to the left
as it was previously before setting the width to 240 px;
Jan Shah
@JanShah
Aug 30 2017 06:31
I don't get what you mean
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:32
remove the width in the .search-bar class
and then click on the search bar
and the assign the width:240px
and then click on the search bar
u see the difference..?
cowCrazy
@cowCrazy
Aug 30 2017 06:34
@prakashyadav008 still on the center-alignment if you wanna go with a more modern css3 workflow you can also use flexbox:
.container1{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

// in media query
.container1{
    /*  center align with flex  */
    justify-content: center;
  }
Jan Shah
@JanShah
Aug 30 2017 06:36
  .search-bar > input {
    transition: all 1s;
    padding:10px;

  }
just an example transition, as long as both sides have a value in the same field, it works
@prakashyadav008
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:44
@JanShah not working
Jan Shah
@JanShah
Aug 30 2017 06:46
it expands and contracts slowly, that's the transition I put, Idk exactly what transition you wanted. that style goes into the media query@max-width 600
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:49
@JanShah
i dont want any style when the resolution is less than 600pixels
the transition should be there only when it is more than 600 pixels
Jan Shah
@JanShah
Aug 30 2017 06:50
@prakashyadav008 for that you need 0 when it's less than 600px
prakash chandra yadav
@prakashyadav008
Aug 30 2017 06:51
0 what..?
Jan Shah
@JanShah
Aug 30 2017 06:53
as I mentioned, if there's a style on both sides (above 600px and below 600px) the transition works.. 0 pixels, 0%, 0 whichever.. Whatever you want to transition, put a style in the normal size and a style in your media query with the same key, like width, or padding, or margin, or whatever. if they differ, there will be a transition between them.
Mo.
@mokyox
Aug 30 2017 07:15

Hey folks! I've been reworking my weather app. It works fine but now it displays the data alot slower than before. Can anyone give me some tips or explain why it's running slow?

https://codepen.io/mokyox/pen/rmdwWP

Jan Shah
@JanShah
Aug 30 2017 07:31
@mokyox seems to load ok, looks really nice. there may sometimes be a delay retrieving data from the api
cowCrazy
@cowCrazy
Aug 30 2017 07:32
@mokyox I tried it as well and the loading time seems to be reasonable :)
Mo.
@mokyox
Aug 30 2017 07:39
Thanks @JanShah and @cowCrazy. It seems to take 7+ seconds for me on multiple browsers but my previous version took about 3 seconds at most. Weird!
CamperBot
@camperbot
Aug 30 2017 07:39
mokyox sends brownie points to @janshah and @cowcrazy :sparkles: :thumbsup: :sparkles:
:cookie: 342 | @cowcrazy |http://www.freecodecamp.com/cowcrazy
:cookie: 503 | @janshah |http://www.freecodecamp.com/janshah
Mo.
@mokyox
Aug 30 2017 07:39
I think it might be to do with the html5 geolocation since I changed it from an ip config api
Gulsvi
@gulsvi
Aug 30 2017 07:40
it runs fast for me @mokyox
iso
@iso1048
Aug 30 2017 07:40
@SkyC0der oh shit
Gulsvi
@gulsvi
Aug 30 2017 07:40
hola :)
iso
@iso1048
Aug 30 2017 07:40
@SkyC0der how is it going bro!
Gulsvi
@gulsvi
Aug 30 2017 07:40
good, how are you?
iso
@iso1048
Aug 30 2017 07:41
same old. unlike yourself haha
Gulsvi
@gulsvi
Aug 30 2017 07:41
haha, the food here is different, and not much coding in my future lol
Mo.
@mokyox
Aug 30 2017 07:42
@SkyC0der Thanks Sky. How long does it take? Maybe I should reset computer again and internet.
CamperBot
@camperbot
Aug 30 2017 07:42
mokyox sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2575 | @skyc0der |http://www.freecodecamp.com/skyc0der
cowCrazy
@cowCrazy
Aug 30 2017 07:43
@mokyox I checked it with performance tab and it took 3s, so like your older version
iso
@iso1048
Aug 30 2017 07:43
@SkyC0der true. better or worse though? (or still deciding). Oh did you see @Pagnito 's comment
Gulsvi
@gulsvi
Aug 30 2017 07:44
@mokyox maybe slow because of the glitch.me domain? Maybe try some other weather apps on codepen that don't use that Weather API to see if they are faster? I have a couple of examples here: https://codepen.io/search/pens/?q=weather&limit=skycoder
@gothamknight I didn't see the comment, let me check
all I see is "yo skycoder" lol
iso
@iso1048
Aug 30 2017 07:45
@SkyC0der yeah i then i told him you wont be around for a while. He also linked an insane portfolio
Gulsvi
@gulsvi
Aug 30 2017 07:45
oh, the webgl website?
that's pretty cool :)
iso
@iso1048
Aug 30 2017 07:47
@SkyC0der this thing http://brunoquintela.com/ (is that what you mean by webgl?)
Mo.
@mokyox
Aug 30 2017 07:47

@cowCrazy Forgot about chrome's performance tab! Nice one, thanks!

@SkyC0der I check out a few ones, including that Dark Sky one and it seems slower at about 5 seconds or more. I used OpenWeather API before which was really fast but had problems with https

CamperBot
@camperbot
Aug 30 2017 07:47
mokyox sends brownie points to @cowcrazy and @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: mokyox already gave cowcrazy points
:warning: mokyox already gave skyc0der points
Gulsvi
@gulsvi
Aug 30 2017 07:47
@mokyox open weather map works with HTTPS now for free! Maybe try it again now?
@gothamknight Yes, that's what I meant :)
iso
@iso1048
Aug 30 2017 07:48
@SkyC0der just went to mdn haha
@SkyC0der bro do you wanna help me with an issue since you are here?
Gulsvi
@gulsvi
Aug 30 2017 07:48
I think it's what @Pagnito used with his portfolio
Mo.
@mokyox
Aug 30 2017 07:49
@SkyC0der Really? I had it on one of my github commits, I'll use it and see if it's faster. Thanks!
CamperBot
@camperbot
Aug 30 2017 07:49
mokyox sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: mokyox already gave skyc0der points
Gulsvi
@gulsvi
Aug 30 2017 07:49
sure @gothamknight
:sparkles:
iso
@iso1048
Aug 30 2017 07:50
@SkyC0der https://codepen.io/gothamknight/pen/jLzrBm?editors=0100 when you click the 'amino acids' nav-link, everything occurs as desired, except that the scrollbar for it gets hidden behind the scrollbar of the main window/page. any ideas on how to fix that?
Gulsvi
@gulsvi
Aug 30 2017 07:51
hmmm, maybe using vw somewhere?
I'll check
iso
@iso1048
Aug 30 2017 07:52
@SkyC0der yeah i am
Gulsvi
@gulsvi
Aug 30 2017 07:54
I don't see a quick fix
you want 2 scroll bars? It works well as is, IMO
iso
@iso1048
Aug 30 2017 07:55
@SkyC0der thought so. Nah i need a scrollbar for the amino acids section, and one for the main page. I might just give the section a fixed width
Gulsvi
@gulsvi
Aug 30 2017 07:56
you could use JS to get the exact width, but that seems ugly
maybe a really narrow progress bar?
kind of like a narrow progress bar you get on Mac OS
iso
@iso1048
Aug 30 2017 07:57
no idea how to make such a thing. You mean have it at the top of the section or something?
Gulsvi
@gulsvi
Aug 30 2017 07:59
it would be a narrow grid/colum on the right
or a shape with absolute positioning
I'm maybe not making much sense
:)
iso
@iso1048
Aug 30 2017 08:00
i think i get the general idea of what you are saying
Mo.
@mokyox
Aug 30 2017 08:02

Thanks guys, I changed the code back to using the openweather api and html5 geolocation. The speed has improved to 0 – 2.77 s to render the page. Thanks alot for all the help!

https://codepen.io/mokyox/pen/rmdwWP

iso
@iso1048
Aug 30 2017 08:02
@SkyC0der i think I will just make it fixed width for now. thanks man. How is your accommodation and stuff?
CamperBot
@camperbot
Aug 30 2017 08:02
gothamknight sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2576 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Aug 30 2017 08:03
hmmmmm
lol
not what I was expecting, but it will work :)
hanging out at the computer lab now
iso
@iso1048
Aug 30 2017 08:03
@SkyC0der oh so you are already at the uni? Did you not take your laptop?
Gulsvi
@gulsvi
Aug 30 2017 08:04
yeah, I have my laptop and wifi at the lab
iso
@iso1048
Aug 30 2017 08:05
i see
Gulsvi
@gulsvi
Aug 30 2017 08:16
@EgnaroDev @Pagnito adios / dosvidaniya / wadaeaan / ciao / bye
Rafael Monroy
@rafaelmonroy
Aug 30 2017 09:27
does anyone know of an weather api that is https? i tried adding https://crossorigin.me/ to my http api but its not working, works fine on local but does not execute on codepen :worried:
here is my code
$(document).ready(function (){

function getWeather(){
    $.ajax({
        type:'GET',
        url:'https://crossorigin.me/http://api.wunderground.com/api/9719325989e4ca09/conditions/q/CA/Los_Angeles.json',
        success: function(weather){
            $('#weather').text(weather.current_observation.temperature_string)
        }
    })
};

getWeather();

var x = $("#location");
function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    } else {
        x.html("Geolocation is not supported by this browser.");
    }
}
function showPosition(position) {
    x.html("Latitude: " + position.coords.latitude + 
    "<br>Longitude: " + position.coords.longitude); 
}

getLocation();

});
iso
@iso1048
Aug 30 2017 09:29
@rafaelmonroy darksky api, the one fCC provides...
Rafael Monroy
@rafaelmonroy
Aug 30 2017 09:30
iso
@iso1048
Aug 30 2017 09:32
yeah man
Rafael Monroy
@rafaelmonroy
Aug 30 2017 09:32
lol
@gothamknight
@gothamknight thanks !
CamperBot
@camperbot
Aug 30 2017 09:33
rafaelmonroy sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 411 | @gothamknight |http://www.freecodecamp.com/gothamknight
iso
@iso1048
Aug 30 2017 09:33
they will both be good. I used darksky api when i did it since the fcc one was not available then. If you do use darksky, you may need to use something like google maps geocoding api to get location data though
no problem
Rafael Monroy
@rafaelmonroy
Aug 30 2017 09:34
cool, ill try them both out and see whats easier for me lol thanks again.
Yvonne
@yvonne6344
Aug 30 2017 09:35
Q:JavaScript 的 Escape Sequences in Strings!
myStr should have encoded text with the proper escape sequences and no spacing.=> can't pass...
var myStr = "FristLine\n\b\\SecondLine\b\r\\ThirdLine";
iso
@iso1048
Aug 30 2017 09:38
@yvonne6344 you have a spelling error - FristLine
Yvonne
@yvonne6344
Aug 30 2017 09:40
@gothamknight thanks! Success :)
var myStr="FirstLine\n\\SecondLine\\\rThirdLine";
CamperBot
@camperbot
Aug 30 2017 09:40
yvonne6344 sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 412 | @gothamknight |http://www.freecodecamp.com/gothamknight
iso
@iso1048
Aug 30 2017 09:41
no problem
Chris Cullen
@123xylem
Aug 30 2017 09:51
https://123xylem.github.io/flexGallery/
Hi guys can you tell me if this Page I made is considered mobile responsive?
I think at small screens there is a problem with centering that im not sure how to fix. but Im not sure how important that is anyway
Rafael Monroy
@rafaelmonroy
Aug 30 2017 09:57
how can i access my var lat and long from my getLocation function? I tried adding them to the ajax call url in getWaether but im guessing since they are not in same function I cant access it…
$(document).ready(function (){

function getWeather(){
    $.ajax({
        type:'GET',
        url:'https://fcc-weather-api.glitch.me/api/current?lat=35&lon=139',
        success: function(weather){
            $('#weather').text(JSON.stringify(weather.main.temp))
        }
    })
};

getWeather();

var x = $("#location");
function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    } else {
        x.html("Geolocation is not supported by this browser.");
    }
}

function showPosition(position) {
    var lat = position.coords.latitude;
    var long = position.coords.longitude;
    x.html("Latitude: " + lat + 
    "<br>Longitude: " + long); 
}

getLocation();

});
Markus Kiili
@Masd925
Aug 30 2017 10:01
@rafaelmonroy The basic idea is to use the response inside the callback function.
Rafael Monroy
@rafaelmonroy
Aug 30 2017 10:03
@Masd925 so im suppose to get my location inside the ajax call so that I am able to edit url with proper values?
Markus Kiili
@Masd925
Aug 30 2017 10:04
@rafaelmonroy Not totally sure what you mean, but you can make another ajax call inside the geolocation callback function.
Rafael Monroy
@rafaelmonroy
Aug 30 2017 10:06
@Masd925 make anther ajax call when I callback my getLocation() function in the bottom?
Markus Kiili
@Masd925
Aug 30 2017 10:08
@rafaelmonroy Do you need to make another ajax call besides that geolocation call?
Rafael Monroy
@rafaelmonroy
Aug 30 2017 10:09
@Masd925 idk man lol now im just lost
Markus Kiili
@Masd925
Aug 30 2017 10:09
@rafaelmonroy Try to explain what you are trying to do and what is not working.
Rafael Monroy
@rafaelmonroy
Aug 30 2017 10:13
ok so in my getWeather() function I want to add the var “lat" and “long" form my showPosition function to the ajax url (replace the 35 and 139 values with my lat and long values)
@Masd925 but when i try to add them in there, nothing happens,
if i change the numbers 35 and 139 manualy to the numbers i get form my geo location, it works, but of course we dont want to do it manually
Markus Kiili
@Masd925
Aug 30 2017 10:16
@rafaelmonroy So you wan't to use lat and long from the geolocation position when you make the ajax call inside the getWeather function?
@rafaelmonroy You can put the function call getWeather(lat,long) at the end of showPosition function and add two parameters to the getWeather function. Then those parameters will hold the lat and long values and can be used when forming the ajax call there.
limbu
@limbu
Aug 30 2017 10:41
hi guys anyone know an alternative to webkit-search-cancel-button for firefox
korzo
@korzo
Aug 30 2017 12:24
@limbu Firefox doesn't display this little cancel button so there is no point for alternative
Elizabeth Paul
@Kowalatam
Aug 30 2017 13:55
who wants to help me/show me how write cleaner code ? :)..
i have my javascript calculator ... i want the code to look nice.. not too complicated but just clean .... something something something ... ```https://codepen.io/Kowalatam/pen/oeqrxa
korzo
@korzo
Aug 30 2017 14:17
@Kowalatam PI breaks your calculator
After you press PI, all next calculations show syntax error
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:23
@korzo didn't know that.. let me see.. thank you
CamperBot
@camperbot
Aug 30 2017 14:23
kowalatam sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 430 | @korzo |http://www.freecodecamp.com/korzo
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:27
fixed it @korzo . i made some changes to the code on my normal browser.. i think i didn't finish coping and pasting the html on codepen :)
Long Nguyen
@longnt80
Aug 30 2017 14:28
@Kowalatam 0.05-0.04=0.010000000000000002
also, dont't know if it's considered a bug: I can type 0.....2.....3
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:29
@longnt80 hmmm.. weird . :). ohh, i think i read something about precise something something something.. i will check it out
CallMeOrange
@EgnaroDev
Aug 30 2017 14:30
lol when you type ... it's like the calculator is talking
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:31
@longnt80 yeah i wanted it to work as my calculator does and u can type whatever u want, it just wont work when u execute it :)
lol.. its probably saying it doesn't look beautiful :) @EgnaroDev
Tom
@moT01
Aug 30 2017 14:33
@Kowalatam i would say to use more descriptive variable names, if someone else has to modify or debug your code its easier
korzo
@korzo
Aug 30 2017 14:33
@Kowalatam @longnt80 @EgnaroDev this is why I never ask for feedback. People are nitpickers and they will break my precious :smile:
Tom
@moT01
Aug 30 2017 14:33
some of them are fine, but some are a little confusing
Long Nguyen
@longnt80
Aug 30 2017 14:33
@Kowalatam after I got the Syntax ERROR from typing 0.....2.....3, whatever I do after that will get Syntax ERROR

@korzo

People are nitpickers and they will break my precious

I actually like that though, I like that better than "It's working". :D

Elizabeth Paul
@Kowalatam
Aug 30 2017 14:34
@longnt80 i think it has a lot more issues.. i think it has to do with the delete button. just found out my pi doesnt completely delete if u do so lol...
@korzo i am actually enjoying the feedbacks lol.. i would have just skipped and went on to the next project with the bugs :) and thats not good
@moT01 yeah.. i will work on that. i'm not to good in giving names .. after a while i run out of names to give and get bored :)
Long Nguyen
@longnt80
Aug 30 2017 14:37
I remember I had to ask 4 times for feedback when I did my calculator so I could find all the bugs
so I always try to find as much as possible for others when they ask for feedback
CallMeOrange
@EgnaroDev
Aug 30 2017 14:37
Hm..
Bye guys, I have to go to school
korzo
@korzo
Aug 30 2017 14:38
@Kowalatam Naming things ... alt
Stephen James
@sjames1958gm
Aug 30 2017 14:38
@korzo lol
Jorge
@flawedLogic506
Aug 30 2017 14:39
@yvonne6344 i like your avatar :D
whats cracking guys
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:40
@EgnaroDev bye... study well and when u return reply my message asking what u are studying :)
Long Nguyen
@longnt80
Aug 30 2017 14:40
@korzo lol, sometimes I just ran out of idea for naming, I just name them in my native language
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:40
@korzo nice... see.. i'm not alone

lol

@korzo lol, sometimes I just ran out of idea for naming, I just name them in my native language

Tom
@moT01
Aug 30 2017 14:43
yea, naming can be tough, but some of those are.... what
im not saying im any better
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:45
@moT01 so for eg.. is theCara among lol.. cus i kinda meant 'the characters' lol :) .. looking at it now i see how confusing it is :)
Tom
@moT01
Aug 30 2017 14:45
yea, that's in the confusing pile
korzo
@korzo
Aug 30 2017 14:46
@moT01 I think HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor isn't any better :)
Tom
@moT01
Aug 30 2017 14:46
what
korzo
@korzo
Aug 30 2017 14:46
@moT01 It's class name from AspectJ
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:48

muahahahaha lol

@moT01 I think HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor isn't any better :)

Tom
@moT01
Aug 30 2017 14:50
we should do a little challenge, see who can make the most confusing block of code
Le Hong Son
@tomnyson
Aug 30 2017 14:53
hello
hello
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:55
hi hi
@moT01 i think @korzo would win lol :)
how can i stop 8xx9 from executing as 8**9, i need it to be an error, i tried using the if statement in line 20 that i have commented out now but that causes other problems ...
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:01
help @korzo @moT01 @longnt80 any1.. i feel if i don't tag sm1.. i won't get an answer in a long time lol
Tom
@moT01
Aug 30 2017 15:01
why is it 8xx9 in the first place
i put a little flag on mine
so when an operator is pushed the flag it true
and its checked everytime an operator is pressed
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:03
@moT01 i want it to work as a scientific calculator. it allows u to press whatever u want lol
Yvonne
@yvonne6344
Aug 30 2017 15:03
@OrangeKulture cute? :smile:
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:04
and it will display everything u press but it won't execute if u press exe
Tom
@moT01
Aug 30 2017 15:04
k, so you allow long strings
like 894
8x9x4
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:04
@moT01 yes
Tom
@moT01
Aug 30 2017 15:04
so apply the same thing, and just check if the last entry was an operator
Jorge
@flawedLogic506
Aug 30 2017 15:05
@yvonne6344 yeah .. looks so happy listening to music and coding .. nothing like real life :joy:
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:05
brb
Tom
@moT01
Aug 30 2017 15:06
var operatorLast = false;

('x').click(
if (!operatorLast)
 operator = true
do other stuff
then set it back to false on any other buttons
that's how i would probly do it anyway
something like that
Gaurav
@gauravmagan
Aug 30 2017 15:27
guys anyone what is npm debug log
Tom
@moT01
Aug 30 2017 15:29
i havent used it, but my guess is it's a log of errors
not sure
Utsav Kafley
@chopedada
Aug 30 2017 15:37
Hello everyone I have a quick question regarding a lesson in javascript. It has to do with objects. Can anyone help me?
Ken Haduch
@khaduch
Aug 30 2017 15:38
@chopedada - just ask and you'll get help
Utsav Kafley
@chopedada
Aug 30 2017 15:40

// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};

function checkObj(checkProp) {
// Your Code Here
if (myObj.hasOwnProperty(checkProp)){
return checkProp;
}

return "Not Found";

}

// Test your code by modifying these values
checkObj("gift");

damn anyone know how to post code?

'
// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};

function checkObj(checkProp) {
// Your Code Here
if (myObj.hasOwnProperty(checkProp)){
return checkProp;
}

return "Not Found";

}

// Test your code by modifying these values
checkObj("gift");
'

'code'
Ken Haduch
@khaduch
Aug 30 2017 15:43
@chopedada - use three backticks like this: ``` on a line before and after the code.
@chopedada - full details on this forum posting https://forum.freecodecamp.com/t/markdown-code-formatting/18391
@chopedada - but I'll bet you want to know how to return the value that corresponds to the property in checkProp? Use bracket notation - that's a hint... I don't want to give too much away. There is a lesson "Accessing Objects Properties with Variables" But it involves the object name myObj, some square brackets [ and ] and the variable name checkProp ;)
Utsav Kafley
@chopedada
Aug 30 2017 15:46
// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here
  if (myObj.hasOwnProperty(checkProp)){
    return checkProp;  
  }

  return "Not Found";

}

// Test your code by modifying these values
checkObj("gift");
So the tutorial wants my function to return a the name of the item if it can be found on the myObj list using the .hasOwnProperty.
When I run this I get no results.
To test the code I replaced check prop with "gift" or "bed" and it returns the desired input but for some reason wont accept checkProp. What am I doing wron?
coolio!! Just realized that it was asking for the value.
Thanks a bunch @khaduch
CamperBot
@camperbot
Aug 30 2017 15:47
chopedada sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3251 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 30 2017 15:47
@chopedada - you're welcome...
Elizabeth Paul
@Kowalatam
Aug 30 2017 16:34
@moT01 thanks, will look into that..
CamperBot
@camperbot
Aug 30 2017 16:34
:cookie: 823 | @mot01 |http://www.freecodecamp.com/mot01
kowalatam sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
Elizabeth Paul
@Kowalatam
Aug 30 2017 16:34
have to go work now :(...
Ahmed raza
@Raza403
Aug 30 2017 16:56
Hi all, I just need little help about bootstrap, When I drag the screen size to small mobile size my search bar is not fully 12 column, rather have kind of some margin while I have given it class of col-sm-12. Here is the link https://codepen.io/raza403/pen/mMGqML
Ryan Williams
@Ryanwfile
Aug 30 2017 17:22

Anyone familiar with the facebook widget that can help explain why my website when run directly from my computer shows the fb widget and it functions perfectly but when uploaded to github the website doesn't show the fb widget at all? The code for the widget is below.

<div class="fb-like fb_iframe_widget" data-href="https://ryanwfile.github.io/SocialCelebrity.html" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false" fb-xfbml-state="rendered" fb-iframe-plugin-query="action=like&amp;app_id=&amp;container_width=0&amp;href=https%3A%2F%2Ffollows.com%2F&amp;layout=button_count&amp;locale=en_US&amp;sdk=joey&amp;share=false&amp;show_faces=false">

Console shows this error
Failed to load resource: the server responded with a status of 404 () assets/social.php

Sorin Ruse
@sorinr
Aug 30 2017 17:26
@Ryanwfile github do not run php scripts
Ryan Williams
@Ryanwfile
Aug 30 2017 17:27
@sorinr oh thank you so much for the response, so the same files run outside of github should work similarly to how they work on my computer?
CamperBot
@camperbot
Aug 30 2017 17:27
ryanwfile sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1332 | @sorinr |http://www.freecodecamp.com/sorinr
Hemakshi Sachdev
@hemakshis
Aug 30 2017 17:29
Hii everyone... can pls someone tell me why I have a blank white space to the right of my page (scroll to right) I guess it is because of the fixed navbar because the navbar moves to the right with it on scrolling right...
here's the link to my pen https://codepen.io/hemakshis/pen/xLQRJB
Sorin Ruse
@sorinr
Aug 30 2017 17:30
@Ryanwfile think if you have the php file hosted some part and if you call it with the full url like: "http://www.example.com/assets/social.php" it should work
Ryan Williams
@Ryanwfile
Aug 30 2017 17:31
@sorinr thank you so much, for the widget how would that code look then? the site url is https://ryanwfile.github.io/SocialCelebrity.html
CamperBot
@camperbot
Aug 30 2017 17:31
ryanwfile sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: ryanwfile already gave sorinr points
Sorin Ruse
@sorinr
Aug 30 2017 17:35
@Ryanwfile .github.io does not know how to handle php files. its not like an lamp, wamp,xamp, etc server
Hemakshi Sachdev
@hemakshis
Aug 30 2017 17:40
Hii everyone... can pls someone tell me why I have a blank white space to the right of my page (scroll to right) I guess it is because of the fixed navbar because the navbar moves to the right with it on scrolling right...
here's the link to my pen https://codepen.io/hemakshis/pen/xLQRJB
Please help!!
Jorge
@flawedLogic506
Aug 30 2017 17:48
hey whats up peeps
@hemakshis i dont see a white space
I like your About me section .. very Groot of you :joy:
Ronique Ricketts
@RoniqueRicketts
Aug 30 2017 17:51
@OrangeKulture its there man. @hemakshis I think its the navbar too
Jorge
@flawedLogic506
Aug 30 2017 17:52
@RoniqueRicketts yeah u right dude
and that is because of the iframe
i mean because of the iframe that codepen uses, i was not able to see it properly until resize
@hemakshis try mocing all of the metadata inside the settings tab .. that sometimes messes up the iframe
Ronique Ricketts
@RoniqueRicketts
Aug 30 2017 17:57
@hemakshis just so you know it only shows that way on small screens. I switched to another screen to troubleshoot and it ok
Ronique Ricketts
@RoniqueRicketts
Aug 30 2017 18:31
@hemakshis this is what i see floating to the right of the nav bar
<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>
piteto
@piteto
Aug 30 2017 18:51
@hemakshis It's this CSS:
.container .row .project-title:after {
  content: '';
  display: block;
  position: absolute;
  bottom: -1px;
  left: 45%;
  width: 100%;
  text-align: center;
  z-index: 5;
  padding-top: 50%;
}
Enrique Alejandro Arzamendi Picazzo
@AleCx4
Aug 30 2017 18:52
Hi everyone, I need recommendations for something that I need to do.Say you have a form right? I need to have this form to where when the page is immediately accessed, the first input(be it a select box or whatever) is highlighted and as soon as the user finishes typing on it the next input box will automatically highlight for the user to start typing. I have seen this functionality before and I am quite sure that at one point I saw a jquery plugin for this case in particular(and yes I am aware of .focus())
if anyone has some recommendations for this or interesting plugins I will really appreciate it
Ronique Ricketts
@RoniqueRicketts
Aug 30 2017 18:53
@piteto well if @hemakshis remove the left:45% it should fix it.
Maulik Patel
@patelmr3
Aug 30 2017 19:02
Hello everyone, this site will help you stay up-to-date with topics of your choice. Check it out https://www.postpandit.com/
korzo
@korzo
Aug 30 2017 19:04
@Kowalatam Sorry, I had to leave. Did you solve your problem?
Ivan Ngundela
@ingundela
Aug 30 2017 19:06
Hello everyone... I'm need some advice, when I build my web sites for I usually use % when giving margins, paddings and size... I use macbook... when I open my project on a Windows lap to test (same browser "google chrome") the website looks larger than on mac..the fonts, etc even the max-width I gave on mac let's say max-width of 1200px (all page) do you have an idea on what might be happening? Thanks in advance
Tom
@moT01
Aug 30 2017 19:10
could be that the mac has higher resolution?
Jorge
@flawedLogic506
Aug 30 2017 19:11
yeah sounds like resolution
Ivan Ngundela
@ingundela
Aug 30 2017 19:11
@moT01 hum... let me check.......Thnaks
@moT01 Thanks..
CamperBot
@camperbot
Aug 30 2017 19:11
ingundela sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 824 | @mot01 |http://www.freecodecamp.com/mot01
korzo
@korzo
Aug 30 2017 19:13
@ingundela If you use OS fonts, Mac has installed other fonts than Windows
Mercy Manrique
@mers89
Aug 30 2017 19:49
Hi, still working on API :) I need help getting the user data to display the followers and display their name. I was running it on the console to see if it was extracting the info but its not happening so far.

var followerURL= "https://wind-bow.glitch.me/twitch-api/channels/freecodecamp";
$.getJSON(followerURL, function(data2){
for (var i=0;i<data2.follows.length;i++){
var displayName= data2.follows[i].channel.display_name;
}
console.log(displayName);
}

);
});

this is the documentation I found. Not sure if I am doing the correct getJson callhttps://wind-bow.glitch.me/twitch-api/channels/freecodecamp
Coy Sanders
@coymeetsworld
Aug 30 2017 19:58
what's data2.follows @mers89 ?
Mercy Manrique
@mers89
Aug 30 2017 19:59
@coymeetsworld here is my code https://codepen.io/mers89/pen/RZeeLW?editors=1012
Coy Sanders
@coymeetsworld
Aug 30 2017 19:59
the followers link is somewhere different, and I think you need to make another api call to get the list of followers
data2._links.follows will get you the URL for the follows api call @mers89
Coy Sanders
@coymeetsworld
Aug 30 2017 20:05
and I guess for the workaround the url would be https://wind-bow.glitch.me/twitch-api/channels/freecodecamp/follows
Mercy Manrique
@mers89
Aug 30 2017 20:07
Omg you figured it out. Thanks so much! It's confusing that they changed the API
Coy Sanders
@coymeetsworld
Aug 30 2017 20:09
np, I think I registered for an api key when they came out and just used my own, didn't use the workaround. I'm not sure if that was easier or not
Eric Hasegawa
@EricHasegawa
Aug 30 2017 20:10
Having what feels like a simple problem here, I'm trying to get the image in the div with the class "wb" to fit the screen and I can't figure out how. Can anyone help? Here's my code https://codepen.io/erichasegawa/pen/brdYKd
Coy Sanders
@coymeetsworld
Aug 30 2017 20:14
why use a div at all? just give the background image to the body
Eric Hasegawa
@EricHasegawa
Aug 30 2017 20:15
@coymeetsworld I just want the background image to cover some of the screen, and I want to put the weather details below it
Coy Sanders
@coymeetsworld
Aug 30 2017 20:16
second question why is the div outside of the body tags? It shouldn't be like that either
also you can't just say 40% for height, it won't know what that means since body or html don't have a height specified
Eric Hasegawa
@EricHasegawa
Aug 30 2017 20:17
@coymeetsworld Fair enough, I just moved it into the body and specified with vh instead
Coy Sanders
@coymeetsworld
Aug 30 2017 20:17
anything that is visible needs to be in the body tags, just FYI
Eric Hasegawa
@EricHasegawa
Aug 30 2017 20:18
https://codepen.io/erichasegawa/pen/brdYKd @coymeetsworld I'm getting close to figuring this out, I have this set up but now the width is off
And okay, I'll remember that for next time
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:19
Hello guys
Can you please review my tic tac toe game? Does anybody know how to stop the board front shifting downwards when the game ends?
korzo
@korzo
Aug 30 2017 20:31
@gpiliponyte I got to the end and nothing happen :(
screenshot-codepen.io-2017-08-30-22-31-16.png
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:33
@korzo sorry, wait a minute, I'll fix that :)
@gpiliponyte did you play a two player game?
@korzo seems like it's working to me ...
korzo
@korzo
Aug 30 2017 20:36
@gpiliponyte No, try to play for "O"
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:37
@korzo well, I guess I suck at testing then :D
korzo
@korzo
Aug 30 2017 20:41
@gpiliponyte Maybe I'm doing something wrong :(
I choose single player, "O", game ends in draw... and nothing
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:43
@korzo no, it's a bug
I'm working on it
thanks for noticing
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:57
@korzo yay, it's doing something :D
korzo
@korzo
Aug 30 2017 21:11
@gpiliponyte Good work :+1:
LiciniusRex
@hashtagyolo1
Aug 30 2017 21:23
Howdy folks. I'm really struggling with Diff Two Arrays. Tried so many different ways and nothing seems to be working. This is my current travesty of code:
function diffArray(arr1, arr2) {
  var newArr = arr1.includes(function(test) {
    for (var i = 0; i < arr2.length; i++) {
      return arr2[i];
    }
  });
  //console.log(newArr);
  return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
@gpiliponyte Game looks really good
Jonas Lee
@jtlscout
Aug 30 2017 21:31
about @QuincyLarson
CamperBot
@camperbot
Aug 30 2017 21:31
:star2: 1341 | @quincylarson |http://www.freecodecamp.com/quincylarson
Eric Hasegawa
@EricHasegawa
Aug 30 2017 21:39
Could anyone help me resize the image in the background so that it fits the width of the screen and still remains proportional? https://codepen.io/erichasegawa/pen/brdYKd
Jonas Lee
@jtlscout
Aug 30 2017 21:40
@EricHasegawa set it as a background image and put the background-size:cover;
height:100%;
width:100%;
Eric Hasegawa
@EricHasegawa
Aug 30 2017 21:43
@jtlscout Thanks I got it!
CamperBot
@camperbot
Aug 30 2017 21:43
erichasegawa sends brownie points to @jtlscout :sparkles: :thumbsup: :sparkles:
:cookie: 418 | @jtlscout |http://www.freecodecamp.com/jtlscout
Jonas Lee
@jtlscout
Aug 30 2017 21:44
no prob
Trommelochse
@Trommelochse
Aug 30 2017 21:46
@EricHasegawa I'd add background-position: center as well
István Kozma
@Manfred28
Aug 30 2017 21:50
@hashtagyolo1 array.includes does not take a callback as an argument
it takes a value
you could say arr.includes(2)
now you are just checking if the function you declared there also appears in the array
it also return a boolean value, so assigning the result to newArr is not what you want to do
LiciniusRex
@hashtagyolo1
Aug 30 2017 21:54
Thanks @Manfred28. I'll have to start again :)
CamperBot
@camperbot
Aug 30 2017 21:54
hashtagyolo1 sends brownie points to @manfred28 :sparkles: :thumbsup: :sparkles:
:cookie: 171 | @manfred28 |http://www.freecodecamp.com/manfred28
István Kozma
@Manfred28
Aug 30 2017 21:54
I am not sure how to help you further without giving too much away
but roughly what you want to do is, go through each element in one of the arrays, and determine if that element appears in the other array. If it doesnt, add it to a new array (one by one)
you can use array.include, but if thats too confusing, using 2 for loops (one for each array) might click better for you
2 nested for loops*
I hope that helps and I didn't just confuse you :P
Eric Hasegawa
@EricHasegawa
Aug 30 2017 22:20
https://codepen.io/erichasegawa/pen/brdYKd Can anyone tell me why when I open this on mobile, the bottom of the screen cuts out way too early?
just1witness
@just1witness
Aug 30 2017 23:17
I'm not very good at this yet, but, why do you have something called ,onload= "hide_buttons"?
Maybe it's hiding your buttons, haha
Yeah, I deleted it, and your buttons reappeared.
@EricHasegawa
Rafael Monroy
@rafaelmonroy
Aug 30 2017 23:41
@Masd925 hey man, a bit late but thanks! I the code now gives me the weather for my location! wooo
CamperBot
@camperbot
Aug 30 2017 23:41
rafaelmonroy sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4455 | @masd925 |http://www.freecodecamp.com/masd925
imperial-isms
@imperial-isms
Aug 30 2017 23:58
Hello, all!
I'm working on the Tribute page and it says we're not supposed to use CSS