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

@sudeepnarkar

My solutions are saved though

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

Chris Cullen
@123xylem
Aug 30 2017 01:20 UTC

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();

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

});

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 UTC
@123xylem why don't you use relative path?
Chris Cullen
@123xylem
Aug 30 2017 01:40 UTC
@longnt80 like what?
Im really bad with paths and Directory
Long Nguyen
@longnt80
Aug 30 2017 01:41 UTC
@123xylem baseDir is supposed to point to your directory/folder, not a file
baseDir: "./"
Chris Cullen
@123xylem
Aug 30 2017 01:44 UTC
thanks
@longnt80 Solved it thankyou
CamperBot
@camperbot
Aug 30 2017 01:44 UTC
123xylem sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
Long Nguyen
@longnt80
Aug 30 2017 01:44 UTC
@123xylem np
Chris A.
@OpenProCramMaker
Aug 30 2017 01:50 UTC
good evening Coders. I'm having trouble with the Random Quote Generator.
iso
@iso1048
Aug 30 2017 01:55 UTC
@OpenProCramMaker i could try and help
Chris A.
@OpenProCramMaker
Aug 30 2017 01:56 UTC
Awesome! the trouble I'm having is with tweeting the quote.
iso
@iso1048
Aug 30 2017 01:58 UTC
@OpenProCramMaker do you know what url to use?
Chris A.
@OpenProCramMaker
Aug 30 2017 01:58 UTC
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 UTC
@OpenProCramMaker are you working on codepen?
Chris A.
@OpenProCramMaker
Aug 30 2017 01:59 UTC
yes
iso
@iso1048
Aug 30 2017 01:59 UTC
Chris A.
@OpenProCramMaker
Aug 30 2017 01:59 UTC
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 UTC
im a damn idiot... had the stupid button fixed.. HAHA
iso
@iso1048
Aug 30 2017 02:07 UTC
@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 UTC
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 UTC
@OpenProCramMaker yeah i saw that page too. no problem. good luck.
DJ Nixon
@tGxcoder
Aug 30 2017 02:21 UTC

  var back = str.length - 1;
that starts on the last letter of the string correct?
Chris A.
@OpenProCramMaker
Aug 30 2017 02:22 UTC
• 1 i believe
plus 1
iso
@iso1048
Aug 30 2017 02:23 UTC
@tGxcoder yes, str.length-1 gives the index of the last character in the string.
DJ Nixon
@tGxcoder
Aug 30 2017 02:23 UTC
ok cool thanks @gothamknight @OpenProCramMaker
CamperBot
@camperbot
Aug 30 2017 02:23 UTC
tgxcoder sends brownie points to @gothamknight and @openprocrammaker :sparkles: :thumbsup: :sparkles:
Chris A.
@OpenProCramMaker
Aug 30 2017 02:24 UTC
I need to read up some more LOL
super rusty
Pagnito
@Pagnito
Aug 30 2017 02:32 UTC
@just1witness whats amazing?
iso
@iso1048
Aug 30 2017 02:35 UTC
@Pagnito that link you sent of the portfolio... how was the break?
Pagnito
@Pagnito
Aug 30 2017 02:35 UTC
@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 UTC
Pagnito
@Pagnito
Aug 30 2017 02:37 UTC
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 UTC
@Pagnito by the way, do you have any useful resources for understanding closures?
Pagnito
@Pagnito
Aug 30 2017 02:38 UTC
there was one video i watched that really helped me understand hold on
iso
@iso1048
Aug 30 2017 02:38 UTC
@Pagnito yeah I'm even further behind than you. I want to learn so much too but don't currently have the time
awesome
Pagnito
@Pagnito
Aug 30 2017 02:38 UTC
i watched this vid a few times even tho he explains very well
iso
@iso1048
Aug 30 2017 02:38 UTC
cool thanks bro
Pagnito
@Pagnito
Aug 30 2017 02:39 UTC
np
iso
@iso1048
Aug 30 2017 02:39 UTC
@Pagnito thanks
CamperBot
@camperbot
Aug 30 2017 02:39 UTC
gothamknight sends brownie points to @pagnito :sparkles: :thumbsup: :sparkles:
Amit Patel
@AmitP88
Aug 30 2017 02:40 UTC
hey guys, has anyone here gotten a web developer job solely because of FreeCodeCamp?
Mo.
@mokyox
Aug 30 2017 02:42 UTC

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 UTC
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 UTC
Amit Patel
@AmitP88
Aug 30 2017 02:43 UTC
@Janicekwing do you have it on codepen?
Corentin Whyte
@CorySW
Aug 30 2017 02:43 UTC
yeah a link on codepen would help
Janice He
@Janicekwing
Aug 30 2017 02:44 UTC
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 UTC
put target="_blank"
after the href
iso
@iso1048
Aug 30 2017 02:45 UTC
@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 UTC
Corentin Whyte
@CorySW
Aug 30 2017 02:46 UTC
that should solve it @Janicekwing
Mo.
@mokyox
Aug 30 2017 02:46 UTC
@gothamknight Cheers gothamknight. Do you know any other apis that could work?
With HTML5 and https
Janice He
@Janicekwing
Aug 30 2017 02:46 UTC
Oh thanks @CorySW :)
CamperBot
@camperbot
Aug 30 2017 02:46 UTC
janicekwing sends brownie points to @corysw :sparkles: :thumbsup: :sparkles:
Janice He
@Janicekwing
Aug 30 2017 02:46 UTC
Also, this is minor but do you know why it turned purple?
Corentin Whyte
@CorySW
Aug 30 2017 02:47 UTC
np :smile:
well have you included bootstrap ?
if you have bootstrap it should turn it blue
Janice He
@Janicekwing
Aug 30 2017 02:47 UTC
Oh, I'm using a different computer. I thought the settings would be saved
iso
@iso1048
Aug 30 2017 02:48 UTC
@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 UTC
@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 UTC
mokyox sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
iso
@iso1048
Aug 30 2017 02:50 UTC
@mokyox no problem
Janice He
@Janicekwing
Aug 30 2017 02:50 UTC
@CorySW is the target = "_blank" only required for codepen?
Corentin Whyte
@CorySW
Aug 30 2017 02:50 UTC
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 UTC
Oh kk :)
Corentin Whyte
@CorySW
Aug 30 2017 02:56 UTC
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 UTC
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 UTC
hi all, how can i break up an array with objects? [{},{},{}] ?
I need to work with objects
piteto
@piteto
Aug 30 2017 03:12 UTC
what do you mean by break up?
var firstObject = arr[0];
Marat
@Marat89bluolyu
Aug 30 2017 03:13 UTC
@piteto i mean, need to get single objects w/o ar
ok, thanks @piteto
CamperBot
@camperbot
Aug 30 2017 03:14 UTC
marat89bluolyu sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
piteto
@piteto
Aug 30 2017 03:14 UTC
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 UTC
 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 UTC
@piteto no you do not. But it does make it easier if you need help.
DJ Nixon
@tGxcoder
Aug 30 2017 03:18 UTC
.sort if alphabetical the later b.length convert if to length of word instead of alphabetical?
piteto
@piteto
Aug 30 2017 03:20 UTC
okay, thank you @gothamknight
CamperBot
@camperbot
Aug 30 2017 03:20 UTC
piteto sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
piteto
@piteto
Aug 30 2017 03:22 UTC
@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 UTC
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 UTC
tgxcoder sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
Marat
@Marat89bluolyu
Aug 30 2017 03:32 UTC
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 UTC

@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 UTC
@JanShah Sorry, I did not correctly ask the question wait
Marat
@Marat89bluolyu
Aug 30 2017 04:00 UTC
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
Aug 30 2017 04:05 UTC
@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 UTC
@khaduch now i try, thank you!!!
CamperBot
@camperbot
Aug 30 2017 04:06 UTC
marat89bluolyu sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
Aug 30 2017 04:07 UTC
@Marat89bluolyu - you're welcome - I hope it works out!
Jan Shah
@JanShah
Aug 30 2017 04:10 UTC
fn(obj) {
let completeThings =[]
if(obj.length) {
completeThings.push(obj.forEach(item=>completeThisItem(item))
else {
completeThings.push(completeThisItem(obj))
}
return completeThings
}

fn completeThisItem(data) {
}
@Marat89bluolyu
Marat
@Marat89bluolyu
Aug 30 2017 04:12 UTC
@JanShah thanks, good change with ES6 =)
CamperBot
@camperbot
Aug 30 2017 04:12 UTC
marat89bluolyu sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
Chris Cullen
@123xylem
Aug 30 2017 05:30 UTC
 <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;
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 UTC
@longnt80 My browser cache refreshed. I changed the setting. All good now.
Thanks
Aug 30 2017 05:59 UTC
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 UTC
@prakashyadav008 you could use media queries
Aug 30 2017 06:04 UTC
@JanShah the width is same ...but its not aligning to the center as i want
cowCrazy
@cowCrazy
Aug 30 2017 06:05 UTC
@prakashyadav008 you can also use min-width property
Aug 30 2017 06:06 UTC
min-width ...on which tag should i use it..?
can u give an example..? @cowCrazy
cowCrazy
@cowCrazy
Aug 30 2017 06:07 UTC
the input element that you want to preserve its width
Aug 30 2017 06:07 UTC
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 UTC
@prakashyadav008 you will solve a lot of issues if you use bootstrap
Aug 30 2017 06:09 UTC
dont wanna use prebuild things ..jst plain css and html
Jan Shah
@JanShah
Aug 30 2017 06:10 UTC
@prakashyadav008 bootstrap is just a skeleton that helps with getting the outlines right
Aug 30 2017 06:10 UTC
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 UTC
of course there is
Aug 30 2017 06:12 UTC
do u know how to get it right
i mean center lol
@JanShah
cowCrazy
@cowCrazy
Aug 30 2017 06:15 UTC
@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 UTC
//in media query
.search-bar{
float:left;
width:100%;
border:none;
}
that's an idea
Aug 30 2017 06:18 UTC
@cowCrazy ya
thanks a lot man
was confused because of that
cowCrazy
@cowCrazy
Aug 30 2017 06:19 UTC
Aug 30 2017 06:19 UTC
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 UTC

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

then

Aug 30 2017 06:29 UTC
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 UTC
I don't get what you mean
Aug 30 2017 06:32 UTC
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 UTC
@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 UTC
  .search-bar > input {
transition: all 1s;

}
just an example transition, as long as both sides have a value in the same field, it works
Aug 30 2017 06:44 UTC
@JanShah not working
Jan Shah
@JanShah
Aug 30 2017 06:46 UTC
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
Aug 30 2017 06:49 UTC
@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 UTC
@prakashyadav008 for that you need 0 when it's less than 600px
Aug 30 2017 06:51 UTC
0 what..?
Jan Shah
@JanShah
Aug 30 2017 06:53 UTC
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 UTC

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 UTC
@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 UTC
@mokyox I tried it as well and the loading time seems to be reasonable :)
Mo.
@mokyox
Aug 30 2017 07:39 UTC
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 UTC
mokyox sends brownie points to @janshah and @cowcrazy :sparkles: :thumbsup: :sparkles:
Mo.
@mokyox
Aug 30 2017 07:39 UTC
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 UTC
it runs fast for me @mokyox
iso
@iso1048
Aug 30 2017 07:40 UTC
@SkyC0der oh shit
Gulsvi
@gulsvi
Aug 30 2017 07:40 UTC
hola :)
iso
@iso1048
Aug 30 2017 07:40 UTC
@SkyC0der how is it going bro!
Gulsvi
@gulsvi
Aug 30 2017 07:40 UTC
good, how are you?
iso
@iso1048
Aug 30 2017 07:41 UTC
same old. unlike yourself haha
Gulsvi
@gulsvi
Aug 30 2017 07:41 UTC
haha, the food here is different, and not much coding in my future lol
Mo.
@mokyox
Aug 30 2017 07:42 UTC
@SkyC0der Thanks Sky. How long does it take? Maybe I should reset computer again and internet.
CamperBot
@camperbot
Aug 30 2017 07:42 UTC
mokyox sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2575 | @skyc0der |http://www.freecodecamp.com/skyc0der
cowCrazy
@cowCrazy
Aug 30 2017 07:43 UTC
@mokyox I checked it with performance tab and it took 3s, so like your older version
iso
@iso1048
Aug 30 2017 07:43 UTC
@SkyC0der true. better or worse though? (or still deciding). Oh did you see @Pagnito 's comment
Gulsvi
@gulsvi
Aug 30 2017 07:44 UTC
@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 UTC
@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 UTC
oh, the webgl website?
that's pretty cool :)
iso
@iso1048
Aug 30 2017 07:47 UTC
@SkyC0der this thing http://brunoquintela.com/ (is that what you mean by webgl?)
Mo.
@mokyox
Aug 30 2017 07:47 UTC

@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 UTC
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 UTC
@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 UTC
@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 UTC
I think it's what @Pagnito used with his portfolio
Mo.
@mokyox
Aug 30 2017 07:49 UTC
@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 UTC
mokyox sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: mokyox already gave skyc0der points
Gulsvi
@gulsvi
Aug 30 2017 07:49 UTC
sure @gothamknight
:sparkles:
iso
@iso1048
Aug 30 2017 07:50 UTC
@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 UTC
hmmm, maybe using vw somewhere?
I'll check
iso
@iso1048
Aug 30 2017 07:52 UTC
@SkyC0der yeah i am
Gulsvi
@gulsvi
Aug 30 2017 07:54 UTC
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 UTC
@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 UTC
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 UTC
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 UTC
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 UTC
i think i get the general idea of what you are saying
Mo.
@mokyox
Aug 30 2017 08:02 UTC

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 UTC
@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 UTC
gothamknight sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2576 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Aug 30 2017 08:03 UTC
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 UTC
@SkyC0der oh so you are already at the uni? Did you not take your laptop?
Gulsvi
@gulsvi
Aug 30 2017 08:04 UTC
yeah, I have my laptop and wifi at the lab
iso
@iso1048
Aug 30 2017 08:05 UTC
i see
Gulsvi
@gulsvi
Aug 30 2017 08:16 UTC
rafaelmonroy
@rafaelmonroy
Aug 30 2017 09:27 UTC
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 UTC
@rafaelmonroy darksky api, the one fCC provides...
rafaelmonroy
@rafaelmonroy
Aug 30 2017 09:30 UTC
iso
@iso1048
Aug 30 2017 09:32 UTC
yeah man
rafaelmonroy
@rafaelmonroy
Aug 30 2017 09:32 UTC
lol
@gothamknight
@gothamknight thanks !
CamperBot
@camperbot
Aug 30 2017 09:33 UTC
rafaelmonroy sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
iso
@iso1048
Aug 30 2017 09:33 UTC
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
rafaelmonroy
@rafaelmonroy
Aug 30 2017 09:34 UTC
cool, ill try them both out and see whats easier for me lol thanks again.
Yvonne
@yvonne6344
Aug 30 2017 09:35 UTC
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 UTC
@yvonne6344 you have a spelling error - FristLine
Yvonne
@yvonne6344
Aug 30 2017 09:40 UTC
@gothamknight thanks! Success :)
var myStr="FirstLine\n\\SecondLine\\\rThirdLine";
CamperBot
@camperbot
Aug 30 2017 09:40 UTC
yvonne6344 sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
iso
@iso1048
Aug 30 2017 09:41 UTC
no problem
Chris Cullen
@123xylem
Aug 30 2017 09:51 UTC
https://123xylem.github.io/flexGallery/
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
rafaelmonroy
@rafaelmonroy
Aug 30 2017 09:57 UTC
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 UTC
@rafaelmonroy The basic idea is to use the response inside the callback function.
rafaelmonroy
@rafaelmonroy
Aug 30 2017 10:03 UTC
@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 UTC
@rafaelmonroy Not totally sure what you mean, but you can make another ajax call inside the geolocation callback function.
rafaelmonroy
@rafaelmonroy
Aug 30 2017 10:06 UTC
@Masd925 make anther ajax call when I callback my getLocation() function in the bottom?
Markus Kiili
@Masd925
Aug 30 2017 10:08 UTC
@rafaelmonroy Do you need to make another ajax call besides that geolocation call?
rafaelmonroy
@rafaelmonroy
Aug 30 2017 10:09 UTC
@Masd925 idk man lol now im just lost
Markus Kiili
@Masd925
Aug 30 2017 10:09 UTC
@rafaelmonroy Try to explain what you are trying to do and what is not working.
rafaelmonroy
@rafaelmonroy
Aug 30 2017 10:13 UTC
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 UTC
@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 UTC
hi guys anyone know an alternative to webkit-search-cancel-button for firefox
korzo
@korzo
Aug 30 2017 12:24 UTC
@limbu Firefox doesn't display this little cancel button so there is no point for alternative
Elizabeth Paul
@Kowalatam
Aug 30 2017 13:55 UTC
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 UTC
After you press PI, all next calculations show syntax error
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:23 UTC
@korzo didn't know that.. let me see.. thank you
CamperBot
@camperbot
Aug 30 2017 14:23 UTC
kowalatam sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:27 UTC
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 UTC
@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 UTC
@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 UTC
lol when you type ... it's like the calculator is talking
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:31 UTC
@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
@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 UTC
@Kowalatam @longnt80 @EgnaroDev this is why I never ask for feedback. People are nitpickers and they will break my precious :smile:
some of them are fine, but some are a little confusing
Long Nguyen
@longnt80
Aug 30 2017 14:33 UTC
@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 UTC
@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 UTC
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 UTC
Hm..
Bye guys, I have to go to school
korzo
@korzo
Aug 30 2017 14:38 UTC
@Kowalatam Naming things ...
Stephen James
@sjames1958gm
Aug 30 2017 14:38 UTC
@korzo lol
Jorge
@flawedLogic506
Aug 30 2017 14:39 UTC
@yvonne6344 i like your avatar :D
whats cracking guys
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:40 UTC
@EgnaroDev bye... study well and when u return reply my message asking what u are studying :)
Long Nguyen
@longnt80
Aug 30 2017 14:40 UTC
@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 UTC
@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

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 UTC
@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 :)
yea, that's in the confusing pile
korzo
@korzo
Aug 30 2017 14:46 UTC
@moT01 I think HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor isn't any better :)
what
korzo
@korzo
Aug 30 2017 14:46 UTC
@moT01 It's class name from AspectJ
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:48 UTC

muahahahaha lol

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

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 UTC
hello
hello
Elizabeth Paul
@Kowalatam
Aug 30 2017 14:55 UTC
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 UTC
help @korzo @moT01 @longnt80 any1.. i feel if i don't tag sm1.. i won't get an answer in a long time lol
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 UTC
@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 UTC
@OrangeKulture cute? :smile:
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:04 UTC
and it will display everything u press but it won't execute if u press exe
k, so you allow long strings
like 894
8x9x4
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:04 UTC
@moT01 yes
so apply the same thing, and just check if the last entry was an operator
Jorge
@flawedLogic506
Aug 30 2017 15:05 UTC
@yvonne6344 yeah .. looks so happy listening to music and coding .. nothing like real life :joy:
Elizabeth Paul
@Kowalatam
Aug 30 2017 15:05 UTC
brb
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 UTC
guys anyone what is npm debug log
i havent used it, but my guess is it's a log of errors
not sure
Utsav Kafley
Aug 30 2017 15:37 UTC
Hello everyone I have a quick question regarding a lesson in javascript. It has to do with objects. Can anyone help me?
Aug 30 2017 15:38 UTC
Utsav Kafley
Aug 30 2017 15:40 UTC

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

function checkObj(checkProp) {
if (myObj.hasOwnProperty(checkProp)){
return checkProp;
}

}

// Test your code by modifying these values

damn anyone know how to post code?

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

function checkObj(checkProp) {
if (myObj.hasOwnProperty(checkProp)){
return checkProp;
}

}

// Test your code by modifying these values
'

'code'
Aug 30 2017 15:43 UTC
@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
Aug 30 2017 15:46 UTC
// Setup
var myObj = {
pet: "kitten",
bed: "sleigh"
};

function checkObj(checkProp) {
if (myObj.hasOwnProperty(checkProp)){
return checkProp;
}

}

// 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.
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.
CamperBot
@camperbot
Aug 30 2017 15:47 UTC
Aug 30 2017 15:47 UTC
Elizabeth Paul
@Kowalatam
Aug 30 2017 16:34 UTC
@moT01 thanks, will look into that..
CamperBot
@camperbot
Aug 30 2017 16:34 UTC
kowalatam sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
Elizabeth Paul
@Kowalatam
Aug 30 2017 16:34 UTC
have to go work now :(...
Ahmed raza
@Raza403
Aug 30 2017 16:56 UTC
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 UTC

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 UTC
@Ryanwfile github do not run php scripts
Ryan Williams
@Ryanwfile
Aug 30 2017 17:27 UTC
@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 UTC
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 UTC
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 UTC
@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 UTC
@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 UTC
ryanwfile sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: ryanwfile already gave sorinr points
Sorin Ruse
@sorinr
Aug 30 2017 17:35 UTC
@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 UTC
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
Jorge
@flawedLogic506
Aug 30 2017 17:48 UTC
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 UTC
@OrangeKulture its there man. @hemakshis I think its the navbar too
Jorge
@flawedLogic506
Aug 30 2017 17:52 UTC
@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 UTC
@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 UTC
@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 UTC
@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;
}
Enrique Alejandro Arzamendi Picazzo
@AleCx4
Aug 30 2017 18:52 UTC
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 UTC
@piteto well if @hemakshis remove the left:45% it should fix it.
Maulik Patel
@patelmr3
Aug 30 2017 19:02 UTC
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 UTC
Ivan Ngundela
@ingundela
Aug 30 2017 19:06 UTC
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
could be that the mac has higher resolution?
Jorge
@flawedLogic506
Aug 30 2017 19:11 UTC
yeah sounds like resolution
Ivan Ngundela
@ingundela
Aug 30 2017 19:11 UTC
@moT01 hum... let me check.......Thnaks
@moT01 Thanks..
CamperBot
@camperbot
Aug 30 2017 19:11 UTC
ingundela sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
korzo
@korzo
Aug 30 2017 19:13 UTC
@ingundela If you use OS fonts, Mac has installed other fonts than Windows
Mercy Manrique
@mers89
Aug 30 2017 19:49 UTC
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 UTC
what's data2.follows @mers89 ?
Mercy Manrique
@mers89
Aug 30 2017 19:59 UTC
@coymeetsworld here is my code https://codepen.io/mers89/pen/RZeeLW?editors=1012
Coy Sanders
@coymeetsworld
Aug 30 2017 19:59 UTC
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 UTC
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 UTC
Omg you figured it out. Thanks so much! It's confusing that they changed the API
Coy Sanders
@coymeetsworld
Aug 30 2017 20:09 UTC
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 UTC
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 UTC
why use a div at all? just give the background image to the body
Eric Hasegawa
@EricHasegawa
Aug 30 2017 20:15 UTC
@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 UTC
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 UTC
@coymeetsworld Fair enough, I just moved it into the body and specified with vh instead
Coy Sanders
@coymeetsworld
Aug 30 2017 20:17 UTC
anything that is visible needs to be in the body tags, just FYI
Eric Hasegawa
@EricHasegawa
Aug 30 2017 20:18 UTC
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 UTC
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 UTC
@gpiliponyte I got to the end and nothing happen :(
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:33 UTC
@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 UTC
@gpiliponyte No, try to play for "O"
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:37 UTC
@korzo well, I guess I suck at testing then :D
korzo
@korzo
Aug 30 2017 20:41 UTC
@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 UTC
@korzo no, it's a bug
I'm working on it
thanks for noticing
Greta Piliponytė
@gpiliponyte
Aug 30 2017 20:57 UTC
@korzo yay, it's doing something :D
korzo
@korzo
Aug 30 2017 21:11 UTC
@gpiliponyte Good work :+1:
LiciniusRex
@hashtagyolo1
Aug 30 2017 21:23 UTC
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 UTC
CamperBot
@camperbot
Aug 30 2017 21:31 UTC
:star2: 1341 | @quincylarson |http://www.freecodecamp.com/quincylarson
Eric Hasegawa
@EricHasegawa
Aug 30 2017 21:39 UTC
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 UTC
@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 UTC
@jtlscout Thanks I got it!
CamperBot
@camperbot
Aug 30 2017 21:43 UTC
erichasegawa sends brownie points to @jtlscout :sparkles: :thumbsup: :sparkles:
Jonas Lee
@jtlscout
Aug 30 2017 21:44 UTC
no prob
Trommelochse
@Trommelochse
Aug 30 2017 21:46 UTC
@EricHasegawa I'd add background-position: center` as well
István Kozma
@Manfred28
Aug 30 2017 21:50 UTC
@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 UTC
Thanks @Manfred28. I'll have to start again :)
CamperBot
@camperbot
Aug 30 2017 21:54 UTC
hashtagyolo1 sends brownie points to @manfred28 :sparkles: :thumbsup: :sparkles:
István Kozma
@Manfred28
Aug 30 2017 21:54 UTC
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 UTC
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 UTC
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
rafaelmonroy
@rafaelmonroy
Aug 30 2017 23:41 UTC
@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 UTC
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 UTC
Hello, all!
I'm working on the Tribute page and it says we're not supposed to use CSS