These are chat archives for FreeCodeCamp/Help

24th
Mar 2015
Aza Noriega
@MegaGM
Mar 24 2015 00:26
@crisberrios Thank you a lot!
Doug Shamoo
@dougshamoo
Mar 24 2015 02:58
Hey everybody... I have a question. I just got to the first challenge (36) that previously used codeschool courses (the ones that are no longer free). There is a link to another challenge page (http://www.freecodecamp.com/nodeschool-challenges). Am I correct in thinking that the challenges on this page replace all of the old challenges 36-47? They all seem to have relied on the codeschool courses that are no longer free.
Cristián Berríos
@crisberrios
Mar 24 2015 02:59
not every course is paid
but I don't remember the specific challenges
at least all paid courses were moved to nodeschool for now...
there's a courseware in the making
Doug Shamoo
@dougshamoo
Mar 24 2015 02:59
it looks like every challenge 36-47 has the link to the nodeschool challenges
Cristián Berríos
@crisberrios
Mar 24 2015 02:59
but not available for the moment :(
Doug Shamoo
@dougshamoo
Mar 24 2015 03:00
i see
just wanted to make sure that i was covering all of the material that i would have been covering with the codeschool courses
Harshal
@McQuinTrix
Mar 24 2015 03:00
@crisberrios I am stuck at 6th challenge of nodeschool
they jump levels as far as i see
Cristián Berríos
@crisberrios
Mar 24 2015 03:00
haven't done nodeschool :(
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:01
@McQuinTrix make it modular?
Harshal
@McQuinTrix
Mar 24 2015 03:01
alright alright .. do you know how to do that debress challenge ?
@chrisdziewa yes
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:01
that one was a pain in the butt ha
actually both the node school one and the map the debris bonfire ha
Harshal
@McQuinTrix
Mar 24 2015 03:01
i did the module .. but later it shows me some error ... i don't know what it is ..
xD
oh man
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:02
both just take persistence
and asking questions
Harshal
@McQuinTrix
Mar 24 2015 03:02
yeah but i don't understand the question of debris one ..
its just a formula .. right ?
or we have to do something ?
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:03
@McQuinTrix you have to have a formula and change something
looks like more information was added since I did it
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:05
the gravitational constant was specified which makes things easier
and even the earth radius is specified
a lot of us had to adjust our constants to pass before
Harshal
@McQuinTrix
Mar 24 2015 03:05
haha .. but we have GM ... why would we need Grav. constant now ?
ahhhhh
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:07
so you want to take the existing avgAlt and convert it using a formula from the wikipedia page. Then you will want to create a new key for the orbital period
with the value you came up with
Harshal
@McQuinTrix
Mar 24 2015 03:08
what is avgAlt ?
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:09
Average altitude of the object from the object it is orbiting
Harshal
@McQuinTrix
Mar 24 2015 03:10
so the satellite can be away as much as 35,000 miles ?
or am i wrong ?
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:11
@McQuinTrix that is for that specific object
the tests will pass more objects in as well
but your formula should work on all of them
Harshal
@McQuinTrix
Mar 24 2015 03:12
alright let me try thatt
Harshal
@McQuinTrix
Mar 24 2015 03:22
@chrisdziewa and the answer of orbital period should be in ?? minutes or seconds ?? or hours ?
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:25
@McQuinTrix seconds I believe
Harshal
@McQuinTrix
Mar 24 2015 03:25
@chrisdziewa yes sir ! :shipit:
Chris Dziewa
@chrisdziewa
Mar 24 2015 03:25
should be seconds as that is what is on wikipedia
@McQuinTrix does it make more sense now?
Harshal
@McQuinTrix
Mar 24 2015 03:26
yes yes .. i am trying that now
Cristián Berríos
@crisberrios
Mar 24 2015 04:38
Victor
@pahlsson
Mar 24 2015 15:21
is there a best practice regarding including your own files of popular libraries (eg jQuery) as compared to linking them from CDNs?
Cristián Berríos
@crisberrios
Mar 24 2015 15:24
I'd say it depends on the overall size of the scripts
bundling everything in one file and serving it from your server can have more advantages than serving everything from cdn
also the overall size of the page
for small pages with small scripts, jQuery is a hefty download
specially in mobile
Victor
@pahlsson
Mar 24 2015 15:34
Yeah that makes sense.
So much to learn!
Bianca Mihai
@biancamihai
Mar 24 2015 15:42
Also you can put your files in a ram dir and it loads really fast, enable cache and gzip ....
Danny Fritz
@dannyfritz
Mar 24 2015 16:02
Also, remember: CDN's don't have 100% uptime. CDNjs was even down for a few hours a week or 2 ago
Briana Swift
@brianamarie
Mar 24 2015 17:37
Hey all. I am having a doozy of a time with "Smallest Common Multiple" bonfire. I've done lots of searching for other ways to solve it, research on different ways to find the LCM...still can't get anything to work. Does anyone have any resources that maybe I've missed to figure this thing out?
Ryan Malm
@Rybar
Mar 24 2015 17:44
It's related to the greatest common divisor. I would start with figuring out how to calculate that.
Christian
@crisxian
Mar 24 2015 18:52
@brianamarie I agree with @Rybar The common algebraic formula uses Greatest Commond Divisor (GCD) to solve for Least Common Multiple (LCM) of two numbers
John Hampton
@jjhampton
Mar 24 2015 19:34
is anyone else having trouble logging in to FCC? i keep getting an error message: "Invalid email or password."
Christian
@crisxian
Mar 24 2015 19:35
regarding CDN, I came across this article letting people know to be aware of the firewalls that may be walling your viewers off. Good to know for your clients that may be giving access to a global base . It notes issues with Google Fonts, jQuery from Google’s CDN, Facebook, Google, Twitter APIs
http://edjiang.com/post/97299595332/how-googles-cdn-prevents-your-site-from-loading
@jjhampton g+ login: working here
John Hampton
@jjhampton
Mar 24 2015 19:38
@crisxian i'll try it like that, i usually log in w/ my email address instead, thanks
Christian
@crisxian
Mar 24 2015 19:40
another thing I'd do is doing a pw reset. keep an eye out to see if you see anyone else with issues so you can raise it up to the site volunteers to look at
Suzanne Atkinson
@AdventureBear
Mar 24 2015 19:41
OK more fun with CSS. thanks for the help you guys offered yestereday. I cleaned up the HTML which made the CSS more straightforward. I have two rows taht float, the bottom row clears, the evens & odds are properly alternating colors and I have a background div that serves as the "board".
John Hampton
@jjhampton
Mar 24 2015 19:42
@crisxian yup, tried it. still waiting on the pw reset email 10 mins. later :) i'm sure it will sort itself out
Suzanne Atkinson
@AdventureBear
Mar 24 2015 19:42
my current quest is to get each row .tow-row, .bottom-row to center in the board, which I made deliberately wider than needed So I could see if my code was working. I've tried using margin: auto; and it doesn't seem to have an effect.
then the 2nd challenge is getting the bottom row to sit at the bottom of hte defined board space. BAsically I want to define the size of the board, then have the top adn bottom row each fall on the upper & lower margins of the board, and evenly centered.
I know it's not an "official" board layout...it's just an exercise I'm doing to help learn. I've been referencing the W3 CSS reference and it's a big help, but these two points I'm struggling with.
John Hampton
@jjhampton
Mar 24 2015 19:45
@crisxian ah, looks like the pw reset worked. thx!
Aza Noriega
@MegaGM
Mar 24 2015 19:45
@jjhampton I have to reset pwd each time I want to sign in xD

to get each row .tow-row, .bottom-row to center in the board

margin: 0 auto; trick works only if an element has it's own width

Suzanne Atkinson
@AdventureBear
Mar 24 2015 19:49
so I would have to set a width for the top row and bottom row and not only the parent div?
Aza Noriega
@MegaGM
Mar 24 2015 19:49
@AdventureBear yup
Suzanne Atkinson
@AdventureBear
Mar 24 2015 19:50
I added a width large enough to contain all the points, but it still doesn't look centered within the board.
and thanks
Aza Noriega
@MegaGM
Mar 24 2015 19:50
however I didn't seen the quest, maybe there is another way to get it work
Suzanne Atkinson
@AdventureBear
Mar 24 2015 19:52
are you on irc? I pasted a codepen. big improvement from yesterdays, lol. it's just above like 10 messages back or less
@MegaGM here's the rest of my question that may be general enough if you can't see the codepen then the 2nd challenge is getting the bottom row to sit at the bottom of hte defined board space. BAsically I want to define the size of the board, then have the top adn bottom row each fall on the upper & lower margins of the board, and evenly centered.
Aza Noriega
@MegaGM
Mar 24 2015 19:55
@AdventureBear "centered" it mean http://i.imgur.com/qiz0PsH.png ?
Suzanne Atkinson
@AdventureBear
Mar 24 2015 19:58
no, the top row is in it's own div, adn I want the whole top row of 8 downpointing triangles centered in the width of the dark green/black boarder "board", which is an enclosing div.
then the bottom row also centered within the board directly below the first.
so 2 rows of 8 points centered in the green board
I had to set the width of the board to keep the rows from "floating" to a new row if the screen was too small. so now even if the screen size gets narrower, all 8 points stay in a row...it still looks like a game board.
Thanks for taking a look at it! I always learn
can someone help me resolving this error
Evan Davis
@davisec52
Mar 24 2015 22:57

Hi. I am hoping for a little clarification on this code sample
from stackoverflow at: http://stackoverflow.com/questions/8229037/prime-factor-and-javascript.

To help better understand one of the bonfire challenges,
I started looking at prime factors. I don't really understand
what is happening with with if-else portion of the code. I
understand that there is a kind of reduction going on, but
I don't really see how it works.


function largestPrimeFactor(number) {
var i = 2;
while (i <= number) {
    if (number % i == 0) {
        number /= i;    
    } else {
        i++;
    }
}
console.log(i);
}
var a = 600851475143 ; 
largestPrimeFactor(a)
Harshal
@McQuinTrix
Mar 24 2015 22:58
what didn't you understand in if-else ?(:
Evan Davis
@davisec52
Mar 24 2015 23:00
I don't quite get how it produces the result.