These are chat archives for FreeCodeCamp/HelpFrontEnd

28th
Apr 2017
caseym94
@caseym94
Apr 28 2017 00:10
Anyone know how to check the offset of a specific div with a scroll bar?
Garo
@Garabed96
Apr 28 2017 00:15
Guys for the local weather is there a json .on("load", function()... or something
Im trying to make the function execute when I load the webpage
Tom
@moT01
Apr 28 2017 00:17
@Garabed96 you can run a function when the page loads by putting it right after a $(document).ready
yash5657
@yash5657
Apr 28 2017 00:17
$(document).ready should do @Garabed96
Tom
@moT01
Apr 28 2017 00:17
or put it in the html on the body tag like.... <body onLoad=function()>
@caseym94 offset from where
caseym94
@caseym94
Apr 28 2017 00:20
I found it
I was trying to find the offset for window but I needed it for a div, document.querySelector.scrollTop shows where the div is in it's scroll
pretty neat
Garo
@Garabed96
Apr 28 2017 00:22
@yash5657 @moT01 thank you
CamperBot
@camperbot
Apr 28 2017 00:22
garabed96 sends brownie points to @yash5657 and @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 90 | @yash5657 |http://www.freecodecamp.com/yash5657
:cookie: 645 | @mot01 |http://www.freecodecamp.com/mot01
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 01:37
Jorge
@OrangeKulture
Apr 28 2017 01:41
@sevensixtwo762 looks interesting, thanks for sharing
CamperBot
@camperbot
Apr 28 2017 01:41
orangekulture sends brownie points to @sevensixtwo762 :sparkles: :thumbsup: :sparkles:
:cookie: 296 | @sevensixtwo762 |http://www.freecodecamp.com/sevensixtwo762
Brandon
@rilebra
Apr 28 2017 01:45
I can't figure out why I have white space in between my divs on my portfolio page. Anyone know why this might be?
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 01:45
@rilebra can we see?
Brandon
@rilebra
Apr 28 2017 01:46
Yes, but I'm not sure how to add a picture to this chat...
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 01:46
is it in codepen?
Brandon
@rilebra
Apr 28 2017 01:47
yes
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 01:47
if so, paste the url to the pen
Brandon
@rilebra
Apr 28 2017 01:48
Any help is appreciated
Gulsvi
@gulsvi
Apr 28 2017 01:53

@rilebra This is a case of collapsing margins. The simple fix is to add 1px of padding to uncollapse the margins:

.blue,
.black {
  padding-top: 1px;
  padding-bottom: 1px
}

For all the boring details :) here's an explanation: https://www.sitepoint.com/web-foundations/collapsing-margins/

Jean-Paul Sauve
@jp-sauve
Apr 28 2017 01:55
I was looking for margins, but didn't see any relevant ones set.
Gulsvi
@gulsvi
Apr 28 2017 01:55
Another easy fix is to just use a lightgrey or deepskyblue background color for your body. The gaps will still be there, but invisible because the background color will fill it in.
Brandon
@rilebra
Apr 28 2017 01:55
I thought about that, but I thought that would be cheating...lol
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 01:56
isn't collapsing margin where there's less margin than you expect?
Gulsvi
@gulsvi
Apr 28 2017 01:57
I think it's when two margins combine / collapse into a single margin
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 01:57
but in this case, he can't get rid of the margin. It's not that it's too small
Gulsvi
@gulsvi
Apr 28 2017 01:57
In this case, the default margins that get used with the <h2>
Brandon
@rilebra
Apr 28 2017 01:59
Yea that css padding worked
Check it out though @SkyCoder01 there is a weird horizontal white line about the Contact section lined up below the bottom picture
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 02:02
also @rilebra you should only use an ID on a single element. You use "portfolio" at least twice.
Brandon
@rilebra
Apr 28 2017 02:02
Oh yea that's right, maybe I should turn it into a class?
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 02:03
yes
Gulsvi
@gulsvi
Apr 28 2017 02:03
@rilebra I don't see a white line - under the "Let's connect" text? Maybe I'm not looking in the right place
image.png
Brandon
@rilebra
Apr 28 2017 02:05
interesting it's not showing on my screen anymore either after I just refreshed
Gulsvi
@gulsvi
Apr 28 2017 02:05
There is one under the footer, but that's because your <p> tag has a 10px bottom margin.
footer p {
  margin-bottom: 0;
}
Brandon
@rilebra
Apr 28 2017 02:06
that is by default?
Gulsvi
@gulsvi
Apr 28 2017 02:07
Yes, it's a bootstrap default
Brandon
@rilebra
Apr 28 2017 02:07
Damn you're good
Gulsvi
@gulsvi
Apr 28 2017 02:07
I'm still a noob, just hit all these issues before :)
Brandon
@rilebra
Apr 28 2017 02:08
Well that gives me hope. How long have you been doing this?
Gulsvi
@gulsvi
Apr 28 2017 02:08
and I read the bootstrap css like a shampoo bottle lol https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css
Brandon
@rilebra
Apr 28 2017 02:08
hahaha
Gulsvi
@gulsvi
Apr 28 2017 02:08
I started free code camp around late january/early february
Brandon
@rilebra
Apr 28 2017 02:09
Oh good for you
thanks for the help once again @SkyCoder01 and @sevensixtwo762
CamperBot
@camperbot
Apr 28 2017 02:11
rilebra sends brownie points to @skycoder01 and @sevensixtwo762 :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @sevensixtwo762 |http://www.freecodecamp.com/sevensixtwo762
:star2: 1213 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Pagnito
@Pagnito
Apr 28 2017 02:38
@SkyCoder01 hey sky
Paradox5
@Paradox5
Apr 28 2017 02:40
Hey @SkyCoder01
Gulsvi
@gulsvi
Apr 28 2017 02:45
Hey @Paradox5
Hey @Pagnito
lol
image.png
#brokenautocomplete
Jean-Paul Sauve
@jp-sauve
Apr 28 2017 02:47

itsnotabugitsafeature

Gulsvi
@gulsvi
Apr 28 2017 02:48
:joy:
Paradox5
@Paradox5
Apr 28 2017 02:49
nahitsabug
Pagnito
@Pagnito
Apr 28 2017 03:51
@SkyCoder01 wanted to ask u a q
did u make ur own etarosyhense sieve or w/e its called to get primes
garrettspillman1
@garrettspillman1
Apr 28 2017 03:58
https://codepen.io/Garrett6610/pen/EmNRjE can someone tell me/help me move the the image to the center of the page, thanks.
Zhanibek
@zhann1982
Apr 28 2017 04:00
@garrettspillman1 Hello! You can add {display: block; margin: auto;} to img in css
@garrettspillman1 it will put your image to center
garrettspillman1
@garrettspillman1
Apr 28 2017 04:01
thank you @zhann1982
CamperBot
@camperbot
Apr 28 2017 04:01
garrettspillman1 sends brownie points to @zhann1982 :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @zhann1982 |http://www.freecodecamp.com/zhann1982
Robert Collins
@robbiemu
Apr 28 2017 04:29
looking for a bit of react help (no one's on HelpDataViz)
J3abyLucky
@J3abyLucky
Apr 28 2017 04:49
I'm stuck ==" the second project, need someone to help ???
CodingDoc
@CodingDoc
Apr 28 2017 05:08
anyone know how to center an image using bootstrap?
I've been searching online, but none of the suggestions work.
(using code pen)
Johnny
@jtan3
Apr 28 2017 05:09
@CodingDoc you can post your codepen and someone might help
CodingDoc
@CodingDoc
Apr 28 2017 05:09
@jtan3 post it here?
Johnny
@jtan3
Apr 28 2017 05:10
post the link if you want
CodingDoc
@CodingDoc
Apr 28 2017 05:10
how?
(Sorry, first time using it)
Johnny
@jtan3
Apr 28 2017 05:11
post your codepen link?
the url on what you're working in
CodingDoc
@CodingDoc
Apr 28 2017 05:11
oh, haha silly me. thought it'd go somewhere else.
Johnny
@jtan3
Apr 28 2017 05:12
CodingDoc
@CodingDoc
Apr 28 2017 05:13
awesome, thanks @jtan3
CamperBot
@camperbot
Apr 28 2017 05:13
codingdoc sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 374 | @jtan3 |http://www.freecodecamp.com/jtan3
CodingDoc
@CodingDoc
Apr 28 2017 05:14
also, just found a workaround
just had the css create auto margins on left and right
Johnny
@jtan3
Apr 28 2017 05:14
Codepen uses bootstrap 4. But you learned bootstrap 3 in freecodecamp.
CodingDoc
@CodingDoc
Apr 28 2017 05:14
centered it perfectly, also responds well with the bootstrap
ooooohhhhh, ok that explains it
so there are slight differences here and there
you can see the difference here
CodingDoc
@CodingDoc
Apr 28 2017 05:15
haven't gone over SASS at all in codecamp yet
Johnny
@jtan3
Apr 28 2017 05:16
different class names in bootstrap 4
CodingDoc
@CodingDoc
Apr 28 2017 05:16
also, img-responsive doesn't exist anymore
that's definitely good to know haha
ok, that's better. new code is: img-fluid mx-auto
that centers the image perfectly
snickerz
@snickerz
Apr 28 2017 05:54
in order to obtain the api code for the weather project has anyone have experience with this to work in codepen?? anyone would appreciate the help
h1tag
@h1tag
Apr 28 2017 05:57
@snickerz what's the problem?
snickerz
@snickerz
Apr 28 2017 05:58
@fortMaximus well have you used weather underground api code for the weather prject will it work in codepen
h1tag
@h1tag
Apr 28 2017 05:59
I didn't use that api in particular, but they should all work the same
and yea it will work
snickerz
@snickerz
Apr 28 2017 06:00
i ask because they are asking me about contact me in for and is this a project?
did you have to do something like that??
h1tag
@h1tag
Apr 28 2017 06:02
I don't remember having something like this with the api I used
if you don't like that, you can use another one
darksky, apixu
snickerz
@snickerz
Apr 28 2017 06:03
which one did you use???
that doesen't need money??
h1tag
@h1tag
Apr 28 2017 06:03
yes
snickerz
@snickerz
Apr 28 2017 06:04
really would be grateful to know what you used
h1tag
@h1tag
Apr 28 2017 06:05
I used apixu, but I think darksky is better
snickerz
@snickerz
Apr 28 2017 06:07
for js right?
on darksky
Vamp
@the-vampiire
Apr 28 2017 06:15
I used apixu as well
they have a ton of features that their API puts out. my only gripe is their night time icons are kinda shitty
@snickerz
snickerz
@snickerz
Apr 28 2017 06:20
thats awesome
snickerz
@snickerz
Apr 28 2017 06:29
does apixu charge any $$
money and no sneaky billing later??
Cara
@CaraLarissa
Apr 28 2017 06:31
Hello everyone! I am finishing up my personal portfolio and I was testing out the contact form (which doesn't work) and I noticed that when I attempt to type in the message box, the text is not visible. I had this same issue with the name and email boxes but was able to resolve it, but with the message box I am at a loss :/
kirbyedy
@kirbyedy
Apr 28 2017 06:33
@snickerz should be free, as far as I remember
snickerz
@snickerz
Apr 28 2017 06:38
ok found it and signed in now what???
snickerz
@snickerz
Apr 28 2017 06:42
anyway way for js instead of json??
h1tag
@h1tag
Apr 28 2017 06:47
you're still using js when you use json
snickerz
@snickerz
Apr 28 2017 06:47
i got to get some zzz's
thats what the apixus says?
h1tag
@h1tag
Apr 28 2017 06:48
that's what I say
you're using js to get the json object
snickerz
@snickerz
Apr 28 2017 06:50
folks i need some sleep thanks @fortMaximus thanks @kirbyedy
CamperBot
@camperbot
Apr 28 2017 06:50
snickerz sends brownie points to @fortmaximus and @kirbyedy :sparkles: :thumbsup: :sparkles:
:cookie: 750 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
:star2: 2046 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
snickerz
@snickerz
Apr 28 2017 06:52
need to hopefuly get together on here would appreciate your help
alpox
@alpox
Apr 28 2017 08:45
JSON is a TEXTformat which has the attribute of being a valid way to specify a javascript object without having to change the syntax. A javascript object and a JSON are therefore only slightly the same. JSON is the javascript object in its plain text form
Alexsen
@rahimelhaj
Apr 28 2017 08:48
Hello world
alpox
@alpox
Apr 28 2017 08:56
@rahimelhaj :wave:
Bogdan
@oblanao
Apr 28 2017 08:58
Hello, guys! http://codepen.io/oblanao/pen/BRQOPg This is my Pomodoro Clock Project. Please take a look at it, all feedback welcome! thanks!
alpox
@alpox
Apr 28 2017 09:30
@oblanao I suggest you to calculate your timer through the actual time difference given by the CPU's internal clock - https://www.w3schools.com/jsref/jsref_gettime.asp otherwise your clock just stops when changing the tab
Bogdan
@oblanao
Apr 28 2017 10:05
aplox thanks for feedback! can do that, but I do not encounter this problem. I am using Chrome on Win10 and the time keeps on going even if i change tabs in chrome or even if i enter a video game for example
@alpox thanks for feedback! can do that, but I do not encounter this problem. I am using Chrome on Win10 and the time keeps on going even if i change tabs in chrome or even if i enter a video game for example
CamperBot
@camperbot
Apr 28 2017 10:05
oblanao sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 988 | @alpox |http://www.freecodecamp.com/alpox
Vivekanand Padala
@VivekanandPadala
Apr 28 2017 10:07
I can't understand the Escape Sequences in Stings challenge in Basic JavaScript. Any help?
var myStr = "\rFirstLine\SecondLine\ThirdLine\n";
Bogdan
@oblanao
Apr 28 2017 10:13
what browser/os ?
@alpox from my research (i may be wrong of course) "When a tab is inactive, only at a maximum of once per second the function is called." and this is what i need, once per second
can anyone please confirm the issue? thanks
the0ffh
@the0ffh
Apr 28 2017 10:19
Hello! Could anyone provide me with an info where to find a free font host that allows hotlinking, google-fonts like?
Sonu Sasankan
@sonusasankan
Apr 28 2017 10:42
Hai, Could anyone tell me how to implement material date time picker on my JavaScript web projects. Is there no proper documentation or guidelines in material.io as well github.
Bogdan
@oblanao
Apr 28 2017 10:44
@alpox here is the "2.0 version" of my Pomodoro Clock project, using CPU's internal clock - https://codepen.io/oblanao/full/Omppdr/
Long Nguyen
@longnt80
Apr 28 2017 11:00
hey guys, I'm on the "Show the Local Weather" challenge. FCC recommend the Open Weather API but codepen won't load it because of non https. How do I fix that?
h1tag
@h1tag
Apr 28 2017 11:01
@longnt80 use darksky or apixu
Long Nguyen
@longnt80
Apr 28 2017 11:02
ok let me try that thanks @fortMaximus
CamperBot
@camperbot
Apr 28 2017 11:02
longnt80 sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 751 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
the0ffh
@the0ffh
Apr 28 2017 11:09
@longnt80 you can also try to use yahoo weather
Zhanibek
@zhann1982
Apr 28 2017 11:10
@oblanao I think your pomodoro clock needs sound effects.
BrewCoffeeSplash
@BrewCoffeeSplash
Apr 28 2017 11:16
@zhann1982 saw someone use a whip sound
every time you clicked go
Zhanibek
@zhann1982
Apr 28 2017 11:23
:)
Bogdan
@oblanao
Apr 28 2017 11:26
@zhann1982 @BrewCoffeeSplash added sound on press-play , session-finish and break-finish . Thanks! Everything else OK?
CamperBot
@camperbot
Apr 28 2017 11:26
oblanao sends brownie points to @zhann1982 and @brewcoffeesplash :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @brewcoffeesplash |http://www.freecodecamp.com/brewcoffeesplash
:cookie: 306 | @zhann1982 |http://www.freecodecamp.com/zhann1982
BrewCoffeeSplash
@BrewCoffeeSplash
Apr 28 2017 11:28
@oblanao Try and have a pause function in there, for an extra challenge
@oblanao then...end up with a clock lol
Bogdan
@oblanao
Apr 28 2017 11:29
@BrewCoffeeSplash that would be cool, thanks. I plan on getting back and improving ALL my projects once I'm done with the Frond-End Development Certificate
CamperBot
@camperbot
Apr 28 2017 11:29
oblanao sends brownie points to @brewcoffeesplash :sparkles: :thumbsup: :sparkles:
:warning: oblanao already gave brewcoffeesplash points
Bogdan
@oblanao
Apr 28 2017 11:29
except for the tribute page, maybe haha :D
BrewCoffeeSplash
@BrewCoffeeSplash
Apr 28 2017 11:29
@oblanao Make sure you have copies of old work, not just rewrite the code on the same project
Bogdan
@oblanao
Apr 28 2017 11:30
@BrewCoffeeSplash will do, thanks again
CamperBot
@camperbot
Apr 28 2017 11:30
oblanao sends brownie points to @brewcoffeesplash :sparkles: :thumbsup: :sparkles:
:warning: oblanao already gave brewcoffeesplash points
Alexander Domikov
@AlexanderDom
Apr 28 2017 12:04
nice pomodoro @oblanao :)
Bogdan
@oblanao
Apr 28 2017 12:05
@AlexanderDom thanks!
CamperBot
@camperbot
Apr 28 2017 12:05
oblanao sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 411 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Ming Zhu
@chocobrownie
Apr 28 2017 12:33
@chocobrownie
Hi I am forever having trouble with CORS error. Some API doesn't offer JSONP format, does that mean there's no way to get around it? I have to find HTTPS API and it has to offer JSONP, these two limitations makes my option very limited
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access.
h1tag
@h1tag
Apr 28 2017 12:36
@chocobrownie which API?
Ming Zhu
@chocobrownie
Apr 28 2017 12:37
I'm dealing with Dark Sky API now @fortMaximus
Btw is there a "once in for all" solution to this lol
h1tag
@h1tag
Apr 28 2017 12:38
?callback=?or &callback=? doesn't work? @chocobrownie
Ming Zhu
@chocobrownie
Apr 28 2017 12:38
Let me try
I'll add this to the end?
h1tag
@h1tag
Apr 28 2017 12:38
yes
Ming Zhu
@chocobrownie
Apr 28 2017 12:39
nope
It does not work
h1tag
@h1tag
Apr 28 2017 12:39
can you share the pen?
Ming Zhu
@chocobrownie
Apr 28 2017 12:39
Yes
h1tag
@h1tag
Apr 28 2017 12:48
@chocobrownie ?callback=? works with getJSON, because I haven't used ajax before I'm trying to figure where you should put dataType: 'jsonp' ((which is equivalent to ?callback=?) and if you're using correct format
^ use it like mentioned here
@chocobrownie
Ming Zhu
@chocobrownie
Apr 28 2017 12:52
Ok, is getJSON more robust?
h1tag
@h1tag
Apr 28 2017 12:53
idk
Ming Zhu
@chocobrownie
Apr 28 2017 12:53
Maybe I should switch to getJSON?
kk
h1tag
@h1tag
Apr 28 2017 12:53
add these two lines to ur ajax setup:
    // The name of the callback parameter, as specified by the YQL service
    jsonp: "callback",

    // Tell jQuery we're expecting JSONP
    dataType: "jsonp",
Ming Zhu
@chocobrownie
Apr 28 2017 12:54
what is yql service?
h1tag
@h1tag
Apr 28 2017 12:55
it seems it's this one: https://developer.yahoo.com/yql/
Ming Zhu
@chocobrownie
Apr 28 2017 12:55
It magically worked!
Just by adding these two lines
I didnt even add &callback=*
h1tag
@h1tag
Apr 28 2017 12:55
yes, &callback is for getJSON
I thought you are using getJSON
Ming Zhu
@chocobrownie
Apr 28 2017 12:57
So is this a universal solution for CORS?
I'm using .ajex
ajax
h1tag
@h1tag
Apr 28 2017 12:57
yes, I thought you are using getJSON before I saw ur pen
Ming Zhu
@chocobrownie
Apr 28 2017 12:58
Ok...
But something weird is happening
Did you see the return?
h1tag
@h1tag
Apr 28 2017 12:59
what is that?
Ming Zhu
@chocobrownie
Apr 28 2017 12:59
Lots of weird objects, a lot of expected variables are not returned
I mean within my console.log output
gulptech
@gulptech
Apr 28 2017 13:02
it did return that same output
h1tag
@h1tag
Apr 28 2017 13:03
I see the same thing in the console
there are some some extra prototype objects that come from javascript
Ming Zhu
@chocobrownie
Apr 28 2017 13:03
This is what I see when I expand:
Object {latitude: 37.7857704, longitude: -122.45237440000001, timezone: "America/Los_Angeles", offset: -8, hourly: Object…}
daily
:
Object
data
:
Array(1)
0
:
Object
length
:
1
proto
:
Array(0)
concat
:
function concat()
arguments
:
null
caller
:
null
length
:
1
name
:
"concat"
proto
:
function ()
apply
:
function apply()
arguments
:
(...)
bind
:
function bind()
call
:
function call()
caller
:
(...)
constructor
:
function Function()
length
:
0
name
:
""
toString
:
function toString()
Symbol(Symbol.hasInstance)
:
function Symbol.hasInstance
get arguments
:
function ThrowTypeError()
set arguments
:
function ThrowTypeError()
get caller
:
function ThrowTypeError()
set caller
:
function ThrowTypeError()
gulptech
@gulptech
Apr 28 2017 13:04
wow
is all i have to say :)
Ming Zhu
@chocobrownie
Apr 28 2017 13:04
lol
lmao
h1tag
@h1tag
Apr 28 2017 13:05
only expand 0: Object, ignore the others
Ming Zhu
@chocobrownie
Apr 28 2017 13:06
Object {latitude: 37.7857704, longitude: -122.45237440000001, timezone: "America/Los_Angeles", offset: -8, hourly: Object…}
daily
:
Object
hourly
:
Object
latitude
:
37.7857704
longitude
:
-122.45237440000001
offset
:
-8
timezone
:
"America/Los_Angeles"
proto
:
Object
I still don't see a lot of parameters
gulptech
@gulptech
Apr 28 2017 13:06
hmm....it is calling snow here :) yet it is 60 They got something wrong :)
keep expanding
Ming Zhu
@chocobrownie
Apr 28 2017 13:07
Ohhh
0:object
h1tag
@h1tag
Apr 28 2017 13:08
click on Object in hourly: Object or daily: Object then expand 0: Object on the right side
Ming Zhu
@chocobrownie
Apr 28 2017 13:08
Yea I see it
It's just overwhelming data size
Got it
Thx lol @fortMaximus
CamperBot
@camperbot
Apr 28 2017 13:09
chocobrownie sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 752 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
gulptech
@gulptech
Apr 28 2017 13:09
btw..you don't really need the jsonp: "callback", it should work without
Ming Zhu
@chocobrownie
Apr 28 2017 13:11
Just tried, works without it @gulptech
Guess I just need to force changing JSON to JSONP
Only thing is this API doesn't show the city, damn it lol
Need to find another whole new API just to do that
h1tag
@h1tag
Apr 28 2017 13:14
@chocobrownie you can use timezone property for the city
Ming Zhu
@chocobrownie
Apr 28 2017 13:26
It says LA but I'm in SF
So it's just a time zone
@fortMaximus
h1tag
@h1tag
Apr 28 2017 13:29
@chocobrownie u can use another api to convert geolocation to city name
Ming Zhu
@chocobrownie
Apr 28 2017 13:29
Yep that's the plan for now
Abdulah Hamzic
@hamzicabdulah
Apr 28 2017 14:15
Guys, should we aim to make our data visualization (D3) projects responsive or not? I can see the FCC examples are not responsive
Long Nguyen
@longnt80
Apr 28 2017 14:28
@hamzicabdulah
yes, we should. Responsive is standard.
jaizon
@jaizon
Apr 28 2017 14:28
@hamzicabdulah Depends on you, some people like to make it responsive and pretty at first and some like comeback later and fix all that stuff
Abdulah Hamzic
@hamzicabdulah
Apr 28 2017 14:30
@longnt80 @jaizon Makes sense, but I'm not really sure how the D3 projects would look like on smaller screens anyway
look at this https://codepen.io/freeCodeCamp/full/vGjLVZ what would be the point of making this mobile responsive if you can't see anything on mobile view
it would be too small anyway
in any case
jaizon
@jaizon
Apr 28 2017 14:36
@hamzicabdulah I see, but you can always add bootstraps and see how it would look, a lot of people would access this from their mobiles anyway.
Long Nguyen
@longnt80
Apr 28 2017 14:38
@jaizon
bootstrap only give you the tools, you still need to decide how it should look in mobile
@hamzicabdulah
if it take too much of your time, maybe you can focus on what you want to learn for now first
@hamzicabdulah you can always go back to design it later
Tom
@moT01
Apr 28 2017 14:46
@hamzicabdulah i wouldn't worry about it on the d3 projects
Jorge
@OrangeKulture
Apr 28 2017 14:51
hey wazzup guys .. good morning
Ken Haduch
@khaduch
Apr 28 2017 14:51
@OrangeKulture - howdy - good morning...
Tom
@moT01
Apr 28 2017 14:52
hi
Jorge
@OrangeKulture
Apr 28 2017 14:52
hows it going for you guys today? all good in da hood? :joy:
Tom
@moT01
Apr 28 2017 14:52
know a place i can host a large .json file?
github only allows to 25mb
Jorge
@OrangeKulture
Apr 28 2017 14:53
wow a string that weighs more than 25 megs .. that's one big file!
Tom
@moT01
Apr 28 2017 14:54
its 52mb
Gulsvi
@gulsvi
Apr 28 2017 14:57
@Pagnito Had to look that up lol. I did not implement the sieve of Eratosthenes to find all primes. Looking back now, I probably should have. I used a brute force approach and just looped through all the numbers to check if they had any divisors.
Jorge
@OrangeKulture
Apr 28 2017 14:57
oh shit! hah .. um im not really sure about the hosting, but I guess it's a matter of google?
Gulsvi
@gulsvi
Apr 28 2017 14:57
Good Morning/Afternoon/Evening :)
Jorge
@OrangeKulture
Apr 28 2017 14:58
hey Sky ... good morning!
Ken Haduch
@khaduch
Apr 28 2017 15:02
@moT01 - did you try something like pastebin? Not sure if you put something there if you could access it as a JSON file, but maybe?
Abdulah Hamzic
@hamzicabdulah
Apr 28 2017 15:03
@moT01 I see
@longnt80 It's not about the time, it's about whether it makes sense to make a bar chart mobile responsive
But yeah, that makes sense
I can always come back to the design part later
Tom
@moT01
Apr 28 2017 15:05
@hamzicabdulah i would familiarize yourself with d3 first, do a project or two, then maybe go for it
im looking into https://git-lfs.github.com/ @khaduch
Jorge
@OrangeKulture
Apr 28 2017 15:09

hey guys .. so in the drop it challenge, it says:

dropElements([0, 1, 0, 1], function(n) {return n === 1;}) should return [1, 0, 1]

Why would it return the 0 tho, isn;t it supposed to only return items that pass the truthy test for the function?

anyone knows what im talking about?
Abdulah Hamzic
@hamzicabdulah
Apr 28 2017 15:09
@moT01 Yeah, I've done the D3 tutorials in the beta version of FCC, and I'll try building some of the projects now, and see how that goes. Thanks!
CamperBot
@camperbot
Apr 28 2017 15:09
hamzicabdulah sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 646 | @mot01 |http://www.freecodecamp.com/mot01
Jorge
@OrangeKulture
Apr 28 2017 15:10
is it because it means that you need to drop items until you get truth, then push ALL items after that?
Capi Etheriel
@barraponto
Apr 28 2017 15:26
Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.
@OrangeKulture until
Jorge
@OrangeKulture
Apr 28 2017 15:33
right .. yeah, i thought about it as soon as i posted here :S thanks @barraponto
CamperBot
@camperbot
Apr 28 2017 15:33
orangekulture sends brownie points to @barraponto :sparkles: :thumbsup: :sparkles:
:cookie: 26 | @barraponto |http://www.freecodecamp.com/barraponto
Ken Haduch
@khaduch
Apr 28 2017 15:41
@moT01 - well, that sounds interesting - hope that it works out!
Jay Ibrahim
@Krumpberry
Apr 28 2017 16:08
so i got to the build a tribute page project
i'm just wondering, do i have to make this project entirely in html?
when i watched the vid, he showed his code quickly (didn't peek), but he said he made it pretty much entirely in html
Tom
@moT01
Apr 28 2017 16:13
@Krumpberry make it however you want, ...html and css will get you there, or html and some bootstrap(which is what you probly learned the best from the challenges up until then)
i dont like that they say not to look at the code, ...i think you can learn a lot from checking it out
Jay Ibrahim
@Krumpberry
Apr 28 2017 16:14
@moT01 thanks, just typing in html is making it messy
CamperBot
@camperbot
Apr 28 2017 16:14
krumpberry sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 647 | @mot01 |http://www.freecodecamp.com/mot01
Pagnito
@Pagnito
Apr 28 2017 16:17
i dont see the point of gettin notifed that someone mentioned me if i dont get taken to the spot/time where i was mentioned and i gotta keep scrolling up...to not even find the mention...feelin like i got off the wrong side of the bed today
@SkyCoder01 hey u still online?
Gulsvi
@gulsvi
Apr 28 2017 16:18
Good morning @Pagnito
Pagnito
@Pagnito
Apr 28 2017 16:19
@SkyCoder01 mornin!
Gulsvi
@gulsvi
Apr 28 2017 16:19
Notifications work better in the browser
Pagnito
@Pagnito
Apr 28 2017 16:19
ya seems so
i
can iu
u
can u answer my question again?
Gulsvi
@gulsvi
Apr 28 2017 16:19
I did not implement the sieve of Eratosthenes to find all primes. Looking back now, I probably should have. I used a brute force approach and just looped through all the numbers to check if they had any divisors.
Pagnito
@Pagnito
Apr 28 2017 16:20
haha. ya i was about to do that too lol "brute force"
then someone showed the sieve now im tryin to understand it
That makes it seem pretty easy ^^
Ming Zhu
@chocobrownie
Apr 28 2017 16:22
This API tells me my place is raining hard, my apple watch and my eyes tells me it's strong sunny all day, which one should I believe? https://codepen.io/chocobrownie/pen/qmRPYL
utkarshonly
@utkarshonly
Apr 28 2017 16:23
<div class="text-center b3">
<h2> Contact Me </h2>
<form action="/somewhere" class="col-md-6 bbx float-center">
<input type="text" placeholder="Name">
<br>
<br>
<input type="text" placeholder="Email ID">
<br>
<br>
<input type="text" placeholder="Number">
<br>
<br>
<input type="text" placeholder="Comment" class="bbh">
<br>
<br>
<button type="submit">Send</button>


</form>
</div>
^The form is not coming centre aligned! :(
Gulsvi
@gulsvi
Apr 28 2017 16:24
@chocobrownie Believe your eyes :) maybe a problem with the weather station they're using?
At least, if you can confirm the city is correct from your reverse geocode
Ming Zhu
@chocobrownie
Apr 28 2017 16:25
@SkyCoder01 It is totally correct
It's just i've been coding this for 10 hours, start having illusions. Maybe I should trust my app from now
Gulsvi
@gulsvi
Apr 28 2017 16:26
Actually....it's way off for me too, let me take a closer look
Says it's freezing out, but it's a nice spring morning
@chocobrownie I think this is changing the location: ,409467600?exclude=currently,flags";
what is the 409467600 for? If I delete that number, it's much more accurate
Ming Zhu
@chocobrownie
Apr 28 2017 16:29
Oh really wow
Let me try
Gulsvi
@gulsvi
Apr 28 2017 16:29
And, if anything, you want currently for the current weather. You're getting the forecasted daily weather with that URL
Ming Zhu
@chocobrownie
Apr 28 2017 16:30
so how should I get the weather now?
It actually becomes right when I delete the number
https://darksky.net/dev/docs/response this is the api im using
Gulsvi
@gulsvi
Apr 28 2017 16:32
After your API key, it should be: + lati + "," + longi + "?exclude=daily,hourly,minutely,flags";
Then your temperature would be: var myTemp = Math.floor(fullData.currently.apparentTemperature);
Ming Zhu
@chocobrownie
Apr 28 2017 16:33
The part confusing me is why does it need time? Normal weather app only need date
Gulsvi
@gulsvi
Apr 28 2017 16:33
It doesn't need time
You're excluding the forecast data with those parameters - future expected weather data by day, hour, minutes
Ming Zhu
@chocobrownie
Apr 28 2017 16:34
so i literally put it "daily,hourly,minutely,flags"
Gulsvi
@gulsvi
Apr 28 2017 16:34
Yes
Remove those parameters and you'll see them in the JSON, add them, and your JSON object will be smaller
Ming Zhu
@chocobrownie
Apr 28 2017 16:35
Ohh
But I guess what I'm doing now is fine right? Because I have all the data
I just need to pick what I need
Gulsvi
@gulsvi
Apr 28 2017 16:36
It looks to me like you're taking the forecasted max temperature for the day + the forecasted min temperature and dividing it by 2?
      var myTemp = Math.floor(
        (fullData.daily.data[0].apparentTemperatureMax +
          fullData.daily.data[0].apparentTemperatureMin) /2
      );
Ming Zhu
@chocobrownie
Apr 28 2017 16:36
Yea
Gulsvi
@gulsvi
Apr 28 2017 16:36
That isn't right, but it will be close. Just not going to tell you what the temp is now
Ming Zhu
@chocobrownie
Apr 28 2017 16:37
Oh...
Gulsvi
@gulsvi
Apr 28 2017 16:37
Forecasted temperatures vs. actual current temperature
Pagnito
@Pagnito
Apr 28 2017 16:39
@SkyCoder01 thanks
CamperBot
@camperbot
Apr 28 2017 16:39
pagnito sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1216 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 28 2017 16:39
Hope that helped, I might give it a try later today @pagnito
Ming Zhu
@chocobrownie
Apr 28 2017 16:40
@SkyCoder01 I'm looking at it now.
Ming Zhu
@chocobrownie
Apr 28 2017 16:49
@SkyCoder01 Do you think my code is closer to ideal now? https://codepen.io/chocobrownie/pen/qmRPYL
Gulsvi
@gulsvi
Apr 28 2017 16:50
Yes, the weather data looks great @chocobrownie
To get the city information, you'll need to find the address with type = locality
Ming Zhu
@chocobrownie
Apr 28 2017 16:51
I already have city information
Gulsvi
@gulsvi
Apr 28 2017 16:51
It shows me a very long number + postal code
You'll want to get the one with types: ["locality", "political"] to make sure it works for every location
Jorge
@OrangeKulture
Apr 28 2017 16:52
i think i saw that video, that chalk board about removing multiples
Ming Zhu
@chocobrownie
Apr 28 2017 16:52
Oh yea, I intentionally did that to show ppl what information can a single click bring
I do know how to access individual data
@SkyCoder01 but when I go back to ready the api doc I still don't get what it's trying to say, I still don't know why did I put hourly, currently, minutely cool, but when I go back to ready the api doc I still don't get what it's trying to
sry.but when I go back to ready the api doc I still don't get what it's trying to say, I still don't know why did I put hourly, currently, minutely https://darksky.net/dev/docs/time-machine
Gulsvi
@gulsvi
Apr 28 2017 16:55
@chocobrownie Those parameters are optional. Remove them and look at the JSON, you'll have all of the hourly, minutely, and daily forecast data in addition to the currently measured temperature.
Excluding hourly, minutely, and daily data from your JSON makes it smaller - and quicker
Ming Zhu
@chocobrownie
Apr 28 2017 16:56
Then what's wrong with my original? It also excluded forcast data and made it smaller right
Jorge
@OrangeKulture
Apr 28 2017 16:56
dude the steam roller is no joke
:anger:
Gulsvi
@gulsvi
Apr 28 2017 16:57
@chocobrownie Your original excluded the currently measured weather data. It only included predicted weather - the forecasts.
Ming Zhu
@chocobrownie
Apr 28 2017 16:57
Ohhhh
That's terribly wrong
Gulsvi
@gulsvi
Apr 28 2017 16:57
Yeah, your approach might have worked for some areas, but not all :) like in the desert where it's really cold at night and really hot during the day
@OrangeKulture lol :)
Keon Samuel
@keonsam
Apr 28 2017 16:59
anyone else quote machine broke?
Gulsvi
@gulsvi
Apr 28 2017 17:00
if you used forismatic, I think they broke
can't seem to get it working any more - was trying to help someone with it the other day
Keon Samuel
@keonsam
Apr 28 2017 17:01
ok cool.
Gulsvi
@gulsvi
Apr 28 2017 17:02
I searched for forismatic on codepen and every single quote machine is broken...
Jorge
@OrangeKulture
Apr 28 2017 17:02
lol
go forismatic!
Gulsvi
@gulsvi
Apr 28 2017 17:02
quotemageddon
Mamun Abdullah
@thetradecoder
Apr 28 2017 17:03
hi sky
Jorge
@OrangeKulture
Apr 28 2017 17:04
yeah it's all fcked
Gulsvi
@gulsvi
Apr 28 2017 17:04
Hello mamun
Mamun Abdullah
@thetradecoder
Apr 28 2017 17:05
@chocobrownie weather showing 'rain' in my location that is false, but i am really expecting heavy rains
Gulsvi
@gulsvi
Apr 28 2017 17:09
@fsdmamun compare with what they say at: https://darksky.net
I think we worked out the issues, but maybe overlooked something in the process
Mamun Abdullah
@thetradecoder
Apr 28 2017 17:11
haha it's saying from tomorrow morning till afternoon will be cloudy, hmm forecast!
Gulsvi
@gulsvi
Apr 28 2017 17:13
lol
Mamun Abdullah
@thetradecoder
Apr 28 2017 17:16
i need some modification in my project while converting... http://codepen.io/fsdmamun/full/RogzQv/
@SkyCoder01 my weather is not working on chrome and opera, can you pls find out the issue
Gulsvi
@gulsvi
Apr 28 2017 17:34
@fsdmamun nvm my last comment. Still drinking coffee... You're using navigator.geolocation to get the location. That will only work over HTTPS, but Open Weather Map doesn't support HTTPS unless you pay for a premium plan. Use a different weather API that supports HTTPS if you want your weather app to work on Chrome, Opera, and Safari.
Vitor Medeiros
@HeyCenturies
Apr 28 2017 17:38
Does anyone have a link or article i can read about how to make the elements go to the place i want in the webpage? I have no idea how to send them to the left/right/down/up
https://codepen.io/HeyCenturies/pen/ybMpzd I have this code but i have zero idea how to make the button go a little up and right .-.
JD Tadlock
@jdtdesigns
Apr 28 2017 17:45
@HeyCenturies I'd recommend taking the HTML/CSS course on codecademy.com
Gulsvi
@gulsvi
Apr 28 2017 17:45
@HeyCenturies Probably the best place to start learning about positioning HTML elements is learning about the Box Model: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model
After that, it helps to understand inline vs block elements - the display property: https://developer.mozilla.org/en-US/docs/Web/CSS/display
And the position property: https://developer.mozilla.org/en-US/docs/Web/CSS/position
As JD mentions, there are courses out there to teach you all of these concepts ^^
Rob
@s31181
Apr 28 2017 17:49
@HeyCenturies have you played around with flex-box?
Vitor Medeiros
@HeyCenturies
Apr 28 2017 17:49
I can create but i don't know how to space/move
No, i started to learn abou 4-5days ago, the front-end
i did well on the tribute project, this portfolio one is harder
Rob
@s31181
Apr 28 2017 17:50
its all good
abhishek
@abhishek9650
Apr 28 2017 17:51
i think have completed this ... can you guys suggest me how can i make it responsive .. and mobile compatible??? https://codepen.io/abhishek9650/pen/NjdzPP
Rob
@s31181
Apr 28 2017 17:51
i love flexbox makes my life a lot easier if you have the time you should play around with this: https://flexboxfroggy.com/
Mamun Abdullah
@thetradecoder
Apr 28 2017 17:53
@SkyCoder01 thanks
CamperBot
@camperbot
Apr 28 2017 17:53
fsdmamun sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1217 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Rob
@s31181
Apr 28 2017 17:53
@abhishek9650 hey man i love the cool backgrounds! as far as responsive have you looked into media queries?
abhishek
@abhishek9650
Apr 28 2017 17:54
@s31181 thanks for liking the images.. media queries??
CamperBot
@camperbot
Apr 28 2017 17:54
abhishek9650 sends brownie points to @s31181 :sparkles: :thumbsup: :sparkles:
:cookie: 294 | @s31181 |http://www.freecodecamp.com/s31181
Jorge
@OrangeKulture
Apr 28 2017 17:56
@s31181 looks good! thanks for sharing
CamperBot
@camperbot
Apr 28 2017 17:56
orangekulture sends brownie points to @s31181 :sparkles: :thumbsup: :sparkles:
:cookie: 295 | @s31181 |http://www.freecodecamp.com/s31181
Rob
@s31181
Apr 28 2017 17:57
@abhishek9650 yeah its the way a lot of people make their websites responsive - https://www.youtube.com/watch?v=h3IdEqpjMvQ
@OrangeKulture for sure! happy coding!
abhishek
@abhishek9650
Apr 28 2017 17:59
@s31181 thanks for the link...
CamperBot
@camperbot
Apr 28 2017 17:59
abhishek9650 sends brownie points to @s31181 :sparkles: :thumbsup: :sparkles:
:warning: abhishek9650 already gave s31181 points
Rob
@s31181
Apr 28 2017 18:00
@abhishek9650 of course, this was one of the first videos i watched to get a better understanding about responsiveness
media queries start around the 5 minute mark but i would watch the whole thing.
abhishek
@abhishek9650
Apr 28 2017 18:03
@s31181 what about PWA ?? i think they need a seperate mobile website
Rob
@s31181
Apr 28 2017 18:04
pwa?
abhishek
@abhishek9650
Apr 28 2017 18:04
@abhishek9650 progressive web apps .. i think they are the future
Rob
@s31181
Apr 28 2017 18:08
I can't really provide information on that, because i don't work with apps at least not yet, but these are the foundations of html and css essentially. The trend is moving away from making 2 separate sites for mobile and desktop - its easier to manage a single website that's responsive. also why is Hitler on your page?
Garo
@Garabed96
Apr 28 2017 18:08
https://codepen.io/CapGaro/pen/YZYqmo?editors=1111
I'm confused how to connect html with json, anyone have any links that would help me thoroughly understand this
Jorge
@OrangeKulture
Apr 28 2017 18:11
hey guys, how did you compare the NaN on the 'Everything be true' bonfire ? anyone ? ..
Rob
@s31181
Apr 28 2017 18:12

@Garabed96 https://www.youtube.com/watch?v=ecT42O6I_WI <-- this guy's api tutorial is awesome

https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en <-- this extension for google let's you look at JSON-data in a more friendly way

Garo
@Garabed96
Apr 28 2017 18:13
isn't that kinda cheating
Idk if that sounds dumb of me, I saw that but I feel like it would spoon feed me everything lol
Rob
@s31181
Apr 28 2017 18:14
oh are you working on the weather app?
Garo
@Garabed96
Apr 28 2017 18:14
ya
Rob
@s31181
Apr 28 2017 18:14
my bad dude
hld on
Nazar
@IsaakNazar
Apr 28 2017 18:17
hi Guys, Just finished randomQuote project. How can I make better this. Plz give your feedback
https://codepen.io/NazarIsaak/full/XRpOLB/
abhishek
@abhishek9650
Apr 28 2017 18:19
@s31181 because hitler is our lord and saviour .... .... lol.. because at the time of making it i had no idea what to put as image .. so i chose hitler... dark humour
Garo
@Garabed96
Apr 28 2017 18:19
@IsaakNazar when you click tweet, maybe add who wrote the quote
Jorge
@OrangeKulture
Apr 28 2017 18:20
nvm i got it ...
Nazar
@IsaakNazar
Apr 28 2017 18:20
@Garabed96 ok. I'll try, thx
CamperBot
@camperbot
Apr 28 2017 18:20
isaaknazar sends brownie points to @garabed96 :sparkles: :thumbsup: :sparkles:
:cookie: 287 | @garabed96 |http://www.freecodecamp.com/garabed96
Rob
@s31181
Apr 28 2017 18:20
@Garabed96 https://www.youtube.com/watch?v=rJesac0_Ftw&t=57s try this - its pretty lengthy but i remember picking up some cool things from it
if no one can tell i'm a visual learner
Garo
@Garabed96
Apr 28 2017 18:21
@IsaakNazar looks really good though
@s31181 Thank you
CamperBot
@camperbot
Apr 28 2017 18:21
garabed96 sends brownie points to @s31181 :sparkles: :thumbsup: :sparkles:
:cookie: 296 | @s31181 |http://www.freecodecamp.com/s31181
Rob
@s31181
Apr 28 2017 18:21
@Garabed96 all good
Johnny
@jtan3
Apr 28 2017 18:22
@Garabed96 did you use an api in your quote generator?
Nazar
@IsaakNazar
Apr 28 2017 18:22
@Garabed96 i tried to do my best, thx
CamperBot
@camperbot
Apr 28 2017 18:22
isaaknazar sends brownie points to @garabed96 :sparkles: :thumbsup: :sparkles:
:warning: isaaknazar already gave garabed96 points
I used a json file, but tbh I took a long time off (a month) and It's a big leap
Johnny
@jtan3
Apr 28 2017 18:26
@Garabed96 Looks like you called data from api with getJSON before. The weather app should be similar with the api.
Garo
@Garabed96
Apr 28 2017 18:39
https://codepen.io/CapGaro/pen/YZYqmo?editors=1111
is that how I would call name and temp, using [weather].name, ..
Sean Rowe
@SeanInDev
Apr 28 2017 18:43
I think the code is messy and I am not sure why I can't change text sizes. I did cheat a bit so I want to start over and try more from scratch before I move on, but this is my first try at a "tribute" page. https://codepen.io/freeCodeCamp/pen/NNvBQW
err that's not it...
Garo
@Garabed96
Apr 28 2017 18:50
@SeanInDev use photobucket, I don't think imgur works on codepen
for the picture
Pagnito
@Pagnito
Apr 28 2017 19:04
does anyone else get sleepy when cant solve a problem for a while?
alpox
@alpox
Apr 28 2017 19:08
@Pagnito I get headaches - mostly because i forget to drink and eat for hours because i wanna solve it :D
Pagnito
@Pagnito
Apr 28 2017 19:08
@alpox haha
Daniel Romero
@Ranacode
Apr 28 2017 19:21
Hey guys i need a little feedback to improve this front-end accordion
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:23
How do i create a header like that? https://codepen.io/freeCodeCamp/full/YqLyXB/
Using 3 languages at the same time is killing me lol
How to create this purple rectangle? I only have the body but i need to place the buttons somewhere else
Dalton Escoe
@Alenero129
Apr 28 2017 19:24
@Ranacode I think it's awesome. I think it'd look cleaner without the border in the drop down section though. Maybe add a shadow instead.
Carlos Reyes
@carloskappa
Apr 28 2017 19:25
Using flex-box how can i have 2 items in colum the first 1 is at the top and right aligned and the 2nd item is totally centered
Daniel Romero
@Ranacode
Apr 28 2017 19:26
@alenero thanks for the feedback gonna experiment with some finish bottom bordres
CamperBot
@camperbot
Apr 28 2017 19:26
ranacode sends brownie points to @alenero :sparkles: :thumbsup: :sparkles:
:warning: @alenero's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Daniel Romero
@Ranacode
Apr 28 2017 19:26
hey @HeyCenturies A top navbar like that its easy
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:27
@Ranacode I have 0 idea
Daniel Romero
@Ranacode
Apr 28 2017 19:27
share me your code pen
to take a look at your prototype of portfolio
i started right now
tbh i'll search on google how to separate the elements properly
usha1989
@usha1989
Apr 28 2017 19:28
Access to Font at 'https://production-assets.codepen.io/assets/telefon/bold/af889c53-1ee3-4868…50-3-b7a87e0fbd213943fae0c0ef5985635dd43fa9c24876b2725127a13ccaf4ab6a.woff' from origin 'https://codepen.io' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://codepen.io' that is not equal to the supplied origin. Origin 'https://codepen.io' is therefore not allowed access.
Daniel Romero
@Ranacode
Apr 28 2017 19:28
Are you using bootstrap or just pure css?
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:28
bootstrap
In the portfolio example he created a main page with a background and the header covering both on top
Daniel Romero
@Ranacode
Apr 28 2017 19:29
More easy too then, bootstrap have tutorials to do navbars
Dalton Escoe
@Alenero129
Apr 28 2017 19:29
@HeyCenturies You can do it in css by setting the header's z-index, position: absolute, width: 100%. And add box-shadow
You can edit with css what you want
usha1989
@usha1989
Apr 28 2017 19:31
How can I resolve this error?
Dalton Escoe
@Alenero129
Apr 28 2017 19:31
@HeyCenturies What you could do with the text inside the header is give set the display: inline-block
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:31
Hm, so i will usually create the elements on html and style them on the CSS, right?
Daniel Romero
@Ranacode
Apr 28 2017 19:32
yes
When u are start learning its normal to do a lot of handwork
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:33
Ok, thank you @Ranacode . I'll read the article
CamperBot
@camperbot
Apr 28 2017 19:33
heycenturies sends brownie points to @ranacode :sparkles: :thumbsup: :sparkles:
:cookie: 342 | @ranacode |http://www.freecodecamp.com/ranacode
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:33
Ye, first time actually learning
Daniel Romero
@Ranacode
Apr 28 2017 19:33
And when u go forward there are many techniques and libraries to do that hard handwork to a simply handwork
But i suggest you to work with pure html, css and js
To understand the basics of the web
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:35
Ok! Thank you,again.
Garo
@Garabed96
Apr 28 2017 19:36
Guys for the LOCAL WEATHER project, I keep getting a REQUEST blocked, content must be served over HTTPS but HTTPS blocks openweatherapi
Daniel Romero
@Ranacode
Apr 28 2017 19:37
U need an api key to use the openweather api
Gulsvi
@gulsvi
Apr 28 2017 19:38
@Garabed96 navigator.geolocation requires HTTPS, openweathermap doesn't support HTTPS. So, your options are to use a different location API, a different weather API or both. Try to support HTTPS if you can, codepen will be requiring it on June 1.
Glenn Gillen
@GlennSG
Apr 28 2017 19:39
Can someone help me out real quick, please? Having trouble displaying navbar for portfolio project. For some reason, netdna works but maxcdn is giving a different output. I'm using this pen as reference(http://codepen.io/richpav/pen/sdgzl) and this is the pen I'm currently working on (https://codepen.io/GlennSG/pen/bWqMjO).
Gulsvi
@gulsvi
Apr 28 2017 19:40
@GlennSG You're using a bootstrap theme CSS, replace your link to bootstrap with this one: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
Glenn Gillen
@GlennSG
Apr 28 2017 19:41
Thanks Sky! It worked
Garo
@Garabed96
Apr 28 2017 19:43
@SkyCoder01 thanks, it's kind of funny how they recommend openweather and show you how to use geolocation and they're not compatible
CamperBot
@camperbot
Apr 28 2017 19:43
garabed96 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1218 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 28 2017 19:46
@Garabed96 The challenge is over 2 years old now. These changes are fairly new I guess, and the new version of free code camp should be ready soon.
Paradox5
@Paradox5
Apr 28 2017 19:58
New version
Define soon
Month soon or week soon
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:58
Ok, so i managed to put all the things i need in my header together. https://codepen.io/HeyCenturies/pen/ybMpzd
Gulsvi
@gulsvi
Apr 28 2017 19:58
"when it is ready" soon
Paradox5
@Paradox5
Apr 28 2017 19:59
I see
Gulsvi
@gulsvi
Apr 28 2017 19:59
That's what they keep saying @Paradox5 :(
Paradox5
@Paradox5
Apr 28 2017 19:59
And I heard you say all my progress will be deleted
Can you confirm or deny
Gulsvi
@gulsvi
Apr 28 2017 19:59
Yeah, Quincy said that on the forums not too long ago
Vitor Medeiros
@HeyCenturies
Apr 28 2017 19:59
How can i move the img just a little bit to the right and the topics to the extreme right? .-.
Paradox5
@Paradox5
Apr 28 2017 19:59
I see
JD Tadlock
@jdtdesigns
Apr 28 2017 19:59
@Paradox5 You can go ahead and start it here http://beta.freecodecamp.com/en/map
Paradox5
@Paradox5
Apr 28 2017 20:00
sheds a tear well progress is needed I guess
Gulsvi
@gulsvi
Apr 28 2017 20:00
At least it will be easy to do it all over again :p
Paradox5
@Paradox5
Apr 28 2017 20:01
Yep
I imagine some people will be pissed
Lol
Garo
@Garabed96
Apr 28 2017 20:02
@SkyCoder01 would you know how I would solve this access-control-Allow-Origin header error Im getting
JD Tadlock
@jdtdesigns
Apr 28 2017 20:02
It's just a free service. You don't get anything from the certs tbh. They're all automated.
Tom
@moT01
Apr 28 2017 20:02
save your algorithms in a pen
JD Tadlock
@jdtdesigns
Apr 28 2017 20:02
@Paradox5
Tom
@moT01
Apr 28 2017 20:02
projects are the same, and you will have those somewhere
Paradox5
@Paradox5
Apr 28 2017 20:02
Oh IK
Ik
Any new lessons?
jaizon
@jaizon
Apr 28 2017 20:03
How many project to front-end certificate ?
Garo
@Garabed96
Apr 28 2017 20:03
I believe my site is reaching the darksky site, but It simply is denying the request
JD Tadlock
@jdtdesigns
Apr 28 2017 20:03
check out the new map from the link i sent you @Paradox5
Paradox5
@Paradox5
Apr 28 2017 20:03
Oh hea
Tom
@moT01
Apr 28 2017 20:03
theres a lot of new lessons
Paradox5
@Paradox5
Apr 28 2017 20:03
Sorry
JD Tadlock
@jdtdesigns
Apr 28 2017 20:04
@Garabed96 We can't determine the problem without seeing your code
Gulsvi
@gulsvi
Apr 28 2017 20:05
@Garabed96 Dark Sky requires you to use JSONP. With ajax, you specify dataType: 'jsonp'. With $.getJSON, you add &callback=? to the end of your URL.
Garo
@Garabed96
Apr 28 2017 20:07
Ok, so XML doesn't work?
JD Tadlock
@jdtdesigns
Apr 28 2017 20:07
@Garabed96 There's not really a good reason to use vanilla js for ajax requests
Use jquery or another library
You already have it included in settings as well, so no reason to not use jQuery ;)
Pagnito
@Pagnito
Apr 28 2017 20:12

i keep looking over this code and still cant understand it

function eratosthenes(limit) {
    var primes = [];
    if (limit >= 2) {
        var sqrtlmt = Math.sqrt(limit) ;
        var nums = new Array();
        // start with an empty Array...
        for (var i = 2; i <= limit; i++) {// and
            nums.push(i);
        }// only initialize the Array once...
        for (var a = 0; a <= sqrtlmt; a++) {

            var p = nums[a]
            if (p)
                for (var j = p * p - 2; j < nums.length; j += p)
                    nums[j] = 0;
        }
        for (var i = 0; i < nums.length; i++) {
            var p = nums[i];
            if (p)
                primes.push(p);
        }
    }
    console.log( primes);
}

 eratosthenes(100);

what does this part do?

 for (var a = 0; a <= sqrtlmt; a++) {

            var p = nums[a]
            if (p)
                for (var j = p * p - 2; j < nums.length; j += p)
                    nums[j] = 0;
        }
Garo
@Garabed96
Apr 28 2017 20:15
I'm a noob, what's vanilla js.. is xmlrequests vanilla
while jquery replaces it?
Vitor Medeiros
@HeyCenturies
Apr 28 2017 20:15
What's wrong with my <a href>? it makes my entire header a link
JD Tadlock
@jdtdesigns
Apr 28 2017 20:18
@Garabed96 Vanilla js just means Javascript without any framework or library wrapper. It's just straight plain ol' javascript.
Gulsvi
@gulsvi
Apr 28 2017 20:19
@Garabed96 With Dark Sky, you have to use JSONP to make API calls and a library like jQuery will make this much easier for you. https://teamtreehouse.com/community/json-vs-jsonp
Pagnito
@Pagnito
Apr 28 2017 20:19
what does this does thi operator mean <<
JD Tadlock
@jdtdesigns
Apr 28 2017 20:20
@Pagnito That's a bitshift which you should definitely not be using lol
Pagnito
@Pagnito
Apr 28 2017 20:21
@jdtdesigns lol how come
Gulsvi
@gulsvi
Apr 28 2017 20:21
@HeyCenturies I think you might have more luck using Bootstrap's navbar rather than trying to create your own: http://v4-alpha.getbootstrap.com/components/navbar/
JD Tadlock
@jdtdesigns
Apr 28 2017 20:22
@Garabed96 jQuery is a 'wrapper' for Javascript. It wraps all the crazy technical code of js and gives you easy human readable functions to use instead.
Vitor Medeiros
@HeyCenturies
Apr 28 2017 20:22
@SkyCoder01 Yes, i'll try. But do you why it became a full link? I don't see what i did wrong opening and closing the <a> tag
Gulsvi
@gulsvi
Apr 28 2017 20:23
I will look now
JD Tadlock
@jdtdesigns
Apr 28 2017 20:23
@Pagnito Unless you're wanting to shift binary values around in machine code, you won't be using bitshifts
Pagnito
@Pagnito
Apr 28 2017 20:25
@jdtdesigns i see, yea i think i got ways to go to use that
Gulsvi
@gulsvi
Apr 28 2017 20:27
@HeyCenturies I believe it is because you have use a percentage for the width of your image. Specify an exact width in pixels instead and the link will not be 100% wide.
Vitor Medeiros
@HeyCenturies
Apr 28 2017 20:28
but if i dont use the width it will be super big
the img
Gulsvi
@gulsvi
Apr 28 2017 20:32

@HeyCenturies

#img1{
  width:50px;
  margin-left:80px;
}

Pixels allow you to specify exactly how big you want the image (or how small)

Your margin-right: 800px was causing the <a> tag to extend 800px to the right.
Amit Patel
@AmitP88
Apr 28 2017 22:24
Hey guys, I'm working on the Random Quote Machine project and I wanted to use the cat picture generator first as sort of a template, however, when I tried to do that in codepen I run into a GET 404 error: https://codepen.io/AmitP88/project/editor/ZJVMdZ/
grfraser
@grfraser
Apr 28 2017 22:24
sounds useful
Keon Samuel
@keonsam
Apr 28 2017 23:18
lol
Gulsvi
@gulsvi
Apr 28 2017 23:23
@AmitP88 The URL you are using is a relative path, but even if you used the full path to freecodecamp.com/json/cats.json, I think they block it. Try this URL instead: https://cdn.rawgit.com/SkyCoder01/skycoder01.github.io/86a4427f/cats.json