These are chat archives for FreeCodeCamp/Help

13th
Aug 2017
Margaret
@Margaret2
Aug 13 2017 00:13
@mbmontana i starts at 0 and increases over time. you get each value in the array using i: myArr[i]then you add that to total... does that help at all?
Mike Batista
@mbmontana
Aug 13 2017 00:15
@Margaret2 Yes. I finally figured it out. Javascript is very labyrinthine.
Margaret
@Margaret2
Aug 13 2017 00:15
ah good :+1:
aRtoo
@artoodeeto
Aug 13 2017 00:57
you have any solution other than this?? im really struggling to make less than 5 lines of codes. because of memory that i read. something like that.
function translatePigLatin(str) {
  var vowelsArr = 'aeiou'; //way
  //var constArr = 'BCDFGHJKLMNPQRSTVWXYZ'.toLowerCase(); //ay
  var uno = [];
  var dos = [];
  str = str.split('');

  if (vowelsArr.indexOf(str[0]) === -1) {
    for (var i = 0; i < str.length; i++) {
      if (vowelsArr.indexOf(str[i]) === -1) {
        dos.push(str[i]);
      } else if (vowelsArr.indexOf(str[i]) !== -1) {
        uno.push(str[i]);
        uno = uno.join('');
        dos = dos.join('');

        var newStr = str.splice(0,i);
        console.log(str);
        console.log(newStr);

        return str.join('') + dos + 'ay';
      }
    }
  } else {
    return str.join('') + 'way';
  }
}

//translatePigLatin("consonant");
translatePigLatin("california"); //should return "aliforniacay".
Margaret
@Margaret2
Aug 13 2017 01:16
@artoodeeto
1) use regex
2) don't split the string, just use charAt and slice to access different parts of the string, for example str.slice(1) + 'ay'
3) use an if statement rather than a for loop
If you use a ternary (condensed if statement) it's possible to do the whole thing in one line
aRtoo
@artoodeeto
Aug 13 2017 01:17
@Margaret2 bro wait confused
Margaret
@Margaret2
Aug 13 2017 01:17
i'm saying those are the ways you can shorten up your code
Manish Giri
@Manish-Giri
Aug 13 2017 01:18
"bro"?
Margaret
@Margaret2
Aug 13 2017 01:18
:sunglasses:
aRtoo
@artoodeeto
Aug 13 2017 01:22
@Margaret2 bro if i use charAt i will still use loop because what if theres more than one consonant? i need to loop that until it hits a vowel
Margaret
@Margaret2
Aug 13 2017 01:24

@artoodeeto you basically have only 3 possibilities:

  • 1st letter is a vowel
  • 2nd letter is a vowel
  • 3rd letter is a vowel

and you can cover those fine with an if /else statement

if you can think of an English word that starts with 3 consonants, let me know :joy: but they're not including one in their tests
i guess, school, but like i said, that's not in the tests
Kyle Holm
@thekholm80
Aug 13 2017 01:26
@Margaret2 Schtschurowskia
aRtoo
@artoodeeto
Aug 13 2017 01:26
@Margaret2 yea. but how can you check that without loop? unless youll use counter which u will use loop
Margaret
@Margaret2
Aug 13 2017 01:27
@artoodeeto you can check the value of any letter in a word using charAt
aRtoo
@artoodeeto
Aug 13 2017 01:27
@Margaret2 because they have a cluster of consonant.
Margaret
@Margaret2
Aug 13 2017 01:28
ok ok fine, there's a 4th possibility, the 4th letter is the vowel, doesn't change the approach
aRtoo
@artoodeeto
Aug 13 2017 01:28
@Margaret2 and theres a problem. i dont know how to use reggex. haha
Margaret
@Margaret2
Aug 13 2017 01:29
all you do is use if/else ... if 1st letter is vowel, do this, else if 2nd letter is vowel do that etc.
@artoodeeto ah, you better learn :D
regexone.com has a good tutorial
aRtoo
@artoodeeto
Aug 13 2017 01:30
@Margaret2 yea. i have an if else first. and if its consonant it will go inside the loop with an if else again. haha
@Margaret2 thanks bro. appreciate it
CamperBot
@camperbot
Aug 13 2017 01:30
artoodeeto sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
Margaret
@Margaret2
Aug 13 2017 01:30
sure
CamperBot
@camperbot
Aug 13 2017 01:31
api offline
Margaret
@Margaret2
Aug 13 2017 01:31
@thekholm80 :point_up: August 12, 2017 3:48 PM
thanks cbot
Kyle Holm
@thekholm80
Aug 13 2017 01:32
that's a cute cat
my dude
Margaret
@Margaret2
Aug 13 2017 01:32
isn't it tho :smile:
bromigo
Keith Nelson
@knjpainters
Aug 13 2017 01:35
I'm
Margaret
@Margaret2
Aug 13 2017 01:37
me too
Kyle Holm
@thekholm80
Aug 13 2017 01:37
@Margaret2 x
Margaret
@Margaret2
Aug 13 2017 01:38
@thekholm80 that's so scary :grimacing: :grimacing:
Can someone explain why the onlick function isn't working
// Change between F and C when the temp div is clicked
    var change = "F";
    $("#temp").on("click", function() {
      $("#temp").html(tempF + "&deg F");
      if (change == "F")
        {
          change = "C";
        }
      else
        {
          change = "F";
        }
    });
Eli
@Terrib1e
Aug 13 2017 03:36
use your console
seems to be working
why wont my list items work as buttons
<li class="list-group-item btn btn-default" style="color: blue; text-align: center; white-space: normal;"><a href=${data[3][i]}></a> ${data[1] [i]}</li>
fixhen
@fixhen
Aug 13 2017 03:57
image.png
help
setColor undefinded
Ruchika Sharma
@ruchika90
Aug 13 2017 03:57
@Manish-Giri it worked, ty
CamperBot
@camperbot
Aug 13 2017 03:57
ruchika90 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6405 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Aug 13 2017 03:59
@ruchika90 koi ni!
Eric Miller
@ericmiller777
Aug 13 2017 04:03
weird i see the linkin the web conole
console
but
still cant click iyt
hmm
Eric Miller
@ericmiller777
Aug 13 2017 04:09
ah got it
Kent Saeteurn
@sansae
Aug 13 2017 04:50
hi everyone; i went to the ruby on rails room but noticed that it's not active at the moment; i'm not sure where else to post this but i was wondering if anyone would like to help me out with my ruby coding challenge?
i can share what i have if anyone is willing to help me figure out my problem
Eric Miller
@ericmiller777
Aug 13 2017 05:00
gotta click the search button
cant press enter
@sansae if no one msg you soon try again in a little while or at a earlier time tommorow
Kent Saeteurn
@sansae
Aug 13 2017 05:06
@ericmiller777 thanks for the reply eric. will do
CamperBot
@camperbot
Aug 13 2017 05:06
sansae sends brownie points to @ericmiller777 :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @ericmiller777 |http://www.freecodecamp.com/ericmiller777
Kent Saeteurn
@sansae
Aug 13 2017 05:07
@ericmiller777 awesome app bro
Anon
@MikeyZee
Aug 13 2017 05:27
sorry about that **
```
#testing splitting function()

"""
Speeding Python Script.

This script determines whether a car is speeding in the given traffic data.
"""

from datetime import datetime #importing date and time module

DIST_1 = 133 # Distance between Camera 1 and Camera 2
DIST_2 = 57.5 # Distance between Camera 2 and Camera 3
SPEED_LIMIT = 110 # Speed limit between all cameras
TIME_FMT = "%H:%M:%S" # Format of times involved within the Script


def main():
    try:
        traffic = open("input.txt", "r") # import the data file
    except Exception as e:
        print("Failed to find input.txt")
        exit(1)

    traffic_list = traffic.readlines() # Creates a new list called traffic_list which comprises of the file traffic specified above

    number_of_logs = traffic_list[0].strip('\n') # This strips the text file of the "\n" which is the enter key to create a new line
    collectingnumplates(traffic_list, number_of_logs)
    checkifspeeding(number_plates, number_of_logs, traffic_list)


def collectingnumplates(traffic_list, number_of_logs):
    # collecting number plates
    number_plates = [] # Creating an empty list called number_plates

    for log_num in range(1, int(number_of_logs)+1):
        log = traffic_list[log_num].strip('\n')
        log_components = log.split() # SPlit separates log into a list for each line, with an index of 0,1,2 and so on
        if not log_components[2] in number_plates: # If the number plate found, isn't the list number_plates then add it
            number_plates.append(log_components[2])
    return number_plates[]


def checkifspeeding(number_plates, number_of_logs, traffic_list):
    speeding = [] # Creating an empty list for speeding cars
    for plate in number_plates:
        highway_times = {}  # Creating an empty dictionary
        for log_num in range(1, int(number_of_logs)+1):
            log = traffic_list[log_num].strip('\n') # \n = new line which is removed with .strip
            log_components = log.split() # Have to split log again due to scope of variables
            if plate == log_components[2]:
                highway_times.update({log_components[1]: log_components[0]})
        if '1' in highway_times and '2' in highway_times: # run this if the numberplate passes through checkpoint 1 and 2
            time1obj = datetime.strptime(highway_times['1'], TIME_FMT) # Gets the time that the car passes through checkpoint 1
            time2obj = datetime.strptime(highway_times['2'], TIME_FMT) # Gets the time that the car passes through checkpoint 2
            diffobj = time2obj - time1obj # Minus the later time from the earlier time to get difference or time taken to travel between them
            diff_hours = float(diffobj.seconds)/float(3600)
            avg_speed = DIST_1/diff_hours # calculates average speed of number plate between checkpoints 1 & 2
            avg_speed = round(avg_speed, 1) # Rounds the result of avg_speed to 1DP
            if avg_speed > SPEED_LIMIT:
                speeding_str = highway_times['2'] + " 2 " + plate + " " + str(avg_speed) # Create a string with appropriate information if car is speeding
                speeding.append(speeding_str) # add the above string to a list of speeding cars
        if '2' in highway_times and '3' in highway_times: # Run this if numberplate passes through checkpoint 2 and 3
            time1obj = datetime.strptime(highway_times['2'], TIME_FMT)
            time2obj = datetime.strptime(highway_times['3'], TIME_FMT)
            diffobj = time2obj - time1obj
            diff_hours = float(diffobj.seconds)/float(3600)
            avg_speed = DIST_2/diff_hours
            avg_speed = round(avg_speed, 1)
            if avg_speed > SPEED_LIMIT:
                speeding_str = highway_times['3'] + " 3 " + plate + " " + str(avg_speed) # Creates the required output string
                speeding.append(speeding_str) # Adds the created string to the speeding list

    for item in speeding:
        print(item)

if __name__ == '__main__':
    main()
Ai rui 艾瑞
@aisolae
Aug 13 2017 05:56
i need help
anyone here?
Luke Miller
@dalumiller
Aug 13 2017 06:07
@aisolae hey
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:08
hi
thnaks
i am having a problem with this
Luke Miller
@dalumiller
Aug 13 2017 06:09
@aisolae what's the problem specifically?
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:09
it's my tribute page, i need to make the centralize the background such that it shows full image at any screen size
i tried background-position: center center; but got nothing
Luke Miller
@dalumiller
Aug 13 2017 06:09
you're going to want to give it the image-responsive property
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:09
i declared the image with css
Luke Miller
@dalumiller
Aug 13 2017 06:10
also, choose a different image because on my screen its super grainy
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:10
that's the thing there, it will probably work with other images
just need to fina a solution using this image
can i see the screenshot of what it looks over there
bharathbheemireddy
@bharath506315
Aug 13 2017 06:11
@aisolae add the jquery plugin
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:12
then ?
@bharath506315
bharathbheemireddy
@bharath506315
Aug 13 2017 06:14
@aisolae i didn't get your problem
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:15
the image shown there isn't the full image
it shows the full image whenever i change the screen size
leaving the bottom with white background
bharathbheemireddy
@bharath506315
Aug 13 2017 06:18
@aisolae you don't want show the full size of image
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:19
ok
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:19
yeah, that's the full image but it's not showing the full image on the screen except when i change screen size
or simply put, can i add img-responsive to the image on the css tab
if you observe, i declared the image ppties in the css file and not the html
how do i make it responsive from there
?
bharathbheemireddy
@bharath506315
Aug 13 2017 06:24
@aisolae remove background in .panel class
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:26
that affect's background of the panel alone not the page background
yea
i want to make to the background to the center then make it responsive to all screen sizes
that's what i would like to do there
madhuri soni
@sonimadhuri
Aug 13 2017 06:38
@aisolae do you want it to look something like this https://codepen.io/madhurisoni12/pen/prrqEb?editors=0100
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:43
nice but doesn't look good on mobille version
i think it's the image itselg
itself
Eric Miller
@ericmiller777
Aug 13 2017 06:47
@sansae thanks
CamperBot
@camperbot
Aug 13 2017 06:47
ericmiller777 sends brownie points to @sansae :sparkles: :thumbsup: :sparkles:
:cookie: 308 | @sansae |http://www.freecodecamp.com/sansae
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:48
images stretches at fill screen
madhuri soni
@sonimadhuri
Aug 13 2017 06:52
thats because of the size of the image
Ai rui 艾瑞
@aisolae
Aug 13 2017 06:52
if there's a way to make the image fit no matter the size of the screen/image
Long Nguyen
@longnt80
Aug 13 2017 06:55
@aisolae no, there isn't. You'll have to compromise.
Eric Miller
@ericmiller777
Aug 13 2017 06:57
hey guys
$("#searchBox").keypress(function(enterKeyPressed){
    if(enterKeyPressed.which == 13){
        $("#searchButton").click();
    }
i cant get my search to work when i press enter
cowCrazy
@cowCrazy
Aug 13 2017 07:21
@ericmiller777 are you trying to trigger another event from another one?
Eric Miller
@ericmiller777
Aug 13 2017 07:22
i cant get anything to happen
i want it to do the same thing
that happens when i press the search button
from what i looked up that should do somthing....
i cant get it to do anything
cowCrazy
@cowCrazy
Aug 13 2017 07:25
@ericmiller777 to my opinion the easiest way to do it would be to take the event handler-function outside of the click() then you can call it from the other event
Eric Miller
@ericmiller777
Aug 13 2017 07:26
how would i go about doing that >.>;
cowCrazy
@cowCrazy
Aug 13 2017 07:26
you also have the option in jquery to do something like this:
$("#searchBox").keypress(function(enterKeyPressed){
    if(enterKeyPressed.which == 13){
        $("#searchButton").trigger("click");
    }
@ericmiller777 I'll write an example of the first one and will send it to you
Eric Miller
@ericmiller777
Aug 13 2017 07:28
ill try it
@cowCrazy thanks
CamperBot
@camperbot
Aug 13 2017 07:28
ericmiller777 sends brownie points to @cowcrazy :sparkles: :thumbsup: :sparkles:
:cookie: 325 | @cowcrazy |http://www.freecodecamp.com/cowcrazy
Liam Docherty
@ldocherty1
Aug 13 2017 07:30
I'm wondering if anyone can link me to a codepen or some sort of tutorial which tells me how I can do this image effect where when the user scrolls down the image scrolls down. Example https://jameslave.com
Eric Miller
@ericmiller777
Aug 13 2017 07:33
I might be wrong but im pretty sure that is called paralax scrolling
parallax scrolling

@camperbot

```

$("#searchBox").keydown(function(enterKeyPressed){
    if(enterKeyPressed.which == 13){
        $("#searchButton").trigger("click");
    }
});
still nothing
@cowCrazy
Morchid Chellali
@Morched23MJ
Aug 13 2017 07:37
Anyone can tell me how to distinguish between an existing channel and another which doesn't exist using api call of twitch?
What differs the two?
status?
cowCrazy
@cowCrazy
Aug 13 2017 07:40
@ericmiller777 can you give a link to a codepen or something like that?
Eric Miller
@ericmiller777
Aug 13 2017 07:40
can you see that
cowCrazy
@cowCrazy
Aug 13 2017 07:42
@ericmiller777 yes, I'll be back soon
Eric Miller
@ericmiller777
Aug 13 2017 07:42
theres a jsfiddle
glitz20
@glitz20
Aug 13 2017 07:47
hey guys can anyone let me know why my caption in the carsoule is not visible? I have used media query for that. https://codepen.io/sabin20/pen/EvPgMd
cowCrazy
@cowCrazy
Aug 13 2017 07:52
@ericmiller777 take a look here, I have to go, I'll come back later and will write you what was the problem in your code.
Eric Miller
@ericmiller777
Aug 13 2017 07:52
thank you
@cowCrazy thanks
CamperBot
@camperbot
Aug 13 2017 07:53
ericmiller777 sends brownie points to @cowcrazy :sparkles: :thumbsup: :sparkles:
:warning: ericmiller777 already gave cowcrazy points
Liam Docherty
@ldocherty1
Aug 13 2017 08:03
Can link me to a codepen or some sort of tutorial which tells me how I can do this image effect where when the user scrolls down the image scrolls down. Example https://jameslave.com
David
@davidcedresx
Aug 13 2017 08:16
hey I need help deleting the <li> item father of an <a> item im clicking
SOLVED IT :D
Eric Miller
@ericmiller777
Aug 13 2017 08:35
@ldocherty1 did you look up parallax scrolling?
Anuj Mishra
@Jun03
Aug 13 2017 08:54
https://codepen.io/jun03/pen/jLWyqJ : this is my codepen page for the pomodoro clock problem on FCC , its not properly working although i don't see any problem with the code . when the timer should reset from session time to break time it gets stuck , can anyone help me with this ?
Lyn Magdaong
@miellyn30
Aug 13 2017 09:09
I need a help ..
myStr should have encoded text with the proper escape sequences and no spacing.
swhat does it mean?
var myStr="\nnewline\backslash\backslash\rcarriagereturn"; //Change this line
heroiczero
@heroiczero
Aug 13 2017 09:25
@miellyn30 you need to use \n and \r to make return
FirstLine
\SecondLine\
ThirdLine
cowCrazy
@cowCrazy
Aug 13 2017 09:44
@ericmiller777 have you managed with it?
gishy1
@gishy1
Aug 13 2017 11:35
hello world !!
need help
image.png
Stephen James
@sjames1958gm
Aug 13 2017 11:35
@Jun03 if($(".main").text().trim()==="Session"){ try this - your text() has spaces on the ends, so you need to trim to get a match
The same for the else
@gishy1 Don't add new lines, modify the three there to use +=
Also, you never use var with += as += implies the variable already exists
gishy1
@gishy1
Aug 13 2017 11:39
@sjames1958gm not fully understanding the last part but ok
it worked thanks!!!
Stephen James
@sjames1958gm
Aug 13 2017 11:39
@gishy1 :+1:
rainfroid
@rainfroid
Aug 13 2017 13:39
what does the value of css style border-radius refer to?
Stephen James
@sjames1958gm
Aug 13 2017 13:49
@rainfroid The radius of the circle that forms the corner. With 0 being no curve
Anuj Mishra
@Jun03
Aug 13 2017 13:50
It worked like it should thanks for explanation too ,
I'll keep this in mind next time .,
Stephen James
@sjames1958gm
Aug 13 2017 13:50
You can also use a percentage value
@Jun03 :+1:
rainfroid
@rainfroid
Aug 13 2017 13:51
thx
Stephen James
@sjames1958gm
Aug 13 2017 13:52
@rainfroid yw
MattUnderwood
@MattUnderwood
Aug 13 2017 14:23

hello all! I'm having trouble understanding .reduce in javascript and how to apply it to an array. I've seen in the MDN guides that the format is arr.reduce(callback[, initialValue])

but I can't seem to make sense of how to use .reduce still

Kyle Holm
@thekholm80
Aug 13 2017 14:25
@diomed moving day
Stephen James
@sjames1958gm
Aug 13 2017 14:34
@MattUnderwood The idea of reduce is to produce a single value from all the elements of the array (reduce it to a single value).
[1, 2, 3, 4].reduce(function(acc, curr, index, array) { return acc + curr; }, 0);
This reduce will compute the sum of all the values. with the initial value of 0
the function will get called once for each entry in the array.
acc - starts as the initial value - here it will start as 0, then the return from the function is the next acc value, so 0, then 1 (0 + 1), then 3 (0 + 1 + 2), then 6
curr - is each value from the array in turn, 1, 2, 3, 4
the result of reduce is the return when curr is the last element in the array. in this case it is 10 0 + 1 + 2 + 3 + 4
MattUnderwood
@MattUnderwood
Aug 13 2017 14:38
this is a good explanation
so I want to use it on a stored array.... myArray.reduce
what are the needed inputs? Should I includde acc, curr, index, array?
or can I leave certain parts of it empty?
myArray.reduce(function(1,curr,index.array) { return acc * curr;} . to multiply all numbers in array?
Stephen James
@sjames1958gm
Aug 13 2017 14:49
@MattUnderwood You usually need both acc and curr
function(acc, curr) { return acc * curr; }
@MattUnderwood If you don't supply an initial value then initial acc = array[0] and initial curr is array[1]
Albert Cardona II
@daddycardona
Aug 13 2017 15:58
so in exercise Roman Numeral Converter, how far should we go converting?
Darren
@DarrenfJ
Aug 13 2017 16:15
happy Sunday fCC
@daddycardona I recall doing the M's...
lemme go check mine
@daddycardona the test cases go up to 3999 but I did mine to 10,000... but it was switch statements so for me easy to copy and paste..
Albert Cardona II
@daddycardona
Aug 13 2017 16:18
yes I was thinking about that as well but I am like do I make an array with every number up to a million that would take a while. LOL or do I make an array with like I have now and work with it
@DarrenfJ Okay I was thinking about that
Darren
@DarrenfJ
Aug 13 2017 16:19
@daddycardona i did it with the logic of whether it's III or IV etc.. so my switch statements were if 1000 do this... but i broke the number up into it's digits and did the logic based on that
Albert Cardona II
@daddycardona
Aug 13 2017 16:19
  var rN = {
    1: 'I',
    5: 'V',
    10: 'X',
    50: 'L',
    100: 'C',
    500: 'D',
    1000: 'M',
    5000: 'V`',
    10000: 'X`',
    50000: 'L`',
    100000: 'C`',
    500000: 'D`',
    1000000: 'M`'
};
Darren
@DarrenfJ
Aug 13 2017 16:19
so i didn't have to account for every number.. just the digits
@daddycardona oh yah.. that should work
Albert Cardona II
@daddycardona
Aug 13 2017 16:20
I was thinking about using the rN for roman numerals and searching through this as if first Number was etc.. but now I am confuse how to do this lmao
would I be able to do an M with a line over it instead is thap Possible?
Darren
@DarrenfJ
Aug 13 2017 16:23
@daddycardona I dunno, i never coded it for over 10,000
Albert Cardona II
@daddycardona
Aug 13 2017 16:23
I was looking for a font like that so it is clearer to people or does M'` does that for me lol
that would be like x with a line over it
Darren
@DarrenfJ
Aug 13 2017 16:24
@daddycardona hrmmm, I wonder if there is a font for it somewhere out there?
Albert Cardona II
@daddycardona
Aug 13 2017 16:24
@DarrenfJ I am going to search for it lol
Darren
@DarrenfJ
Aug 13 2017 16:27
coolCool
Albert Cardona II
@daddycardona
Aug 13 2017 16:30
@DarrenfJ this was a font or image I used in css looking for a font with that content: '♬';
content: '♬';
so if I can find somethign similar lol
Darren
@DarrenfJ
Aug 13 2017 16:34
cool :D
good luck brutha!
brownies for rawking the challenges too.. i see you in here everyday making great progress too :D
lights a :fire: under my butt too
thanks @daddycardona
CamperBot
@camperbot
Aug 13 2017 16:35
darrenfj sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 309 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Aug 13 2017 16:36
You welcome and thanks for always using the I will guide your mind not give you the answer for me I like that so much better @DarrenfJ
CamperBot
@camperbot
Aug 13 2017 16:36
daddycardona sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1968 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Aug 13 2017 16:37
:D
does anyone remember how to get the list of gitter rooms? It used to be easy to find on the wiki but now i google and only get a link to main room and some Quara articles....
camperbot gitter rooms
gah!
Albert Cardona II
@daddycardona
Aug 13 2017 16:51
the globe on the top I think
Darren
@DarrenfJ
Aug 13 2017 16:53
ah cool! thanks brutha! learning new things everyday :D
Darren
@DarrenfJ
Aug 13 2017 17:04
thanks @daddycardona for hanging gonna go watch coding vids :D
CamperBot
@camperbot
Aug 13 2017 17:04
darrenfj sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:warning: darrenfj already gave daddycardona points
gishy1
@gishy1
Aug 13 2017 17:10
hello world need help
image.png
Razvan
@razvanlikespizza
Aug 13 2017 17:12
@gishy1 Could you give me the link?
Razvan
@razvanlikespizza
Aug 13 2017 17:14
You need to assign that value to the variable "fahrenheit".It would look something like fahrenheit = "here you transform celsius to fahrenheit";
@gishy1
gishy1
@gishy1
Aug 13 2017 17:20
@razvanlikespizza my first calculation came out
others didnt
dont know why
mbsyaswanth
@mbsyaswanth
Aug 13 2017 17:23
https://codepen.io/mbs-yaswanth/pen/yooojo unable to align footer to the end of screen. plz help
Alexander Køpke
@alexanderkopke
Aug 13 2017 17:35
@mbsyaswanth instead of flexing the body tag, make a new div with wraps everything except the footer, then use flex on the wrap like you did with the body tag. This way you'll take the footer out of the flex circle. You can then give the footer div a class name like footer, select it in css and give it text-align: center;
mbsyaswanth
@mbsyaswanth
Aug 13 2017 17:48
still doesnt work @alexanderkopke
madhuri soni
@sonimadhuri
Aug 13 2017 17:52

@mbsyaswanth try this:

.footer{
  position:absolute;
  bottom:0;
}

give the footer div the class .footer

mbsyaswanth
@mbsyaswanth
Aug 13 2017 17:55
u mean i need to use div inside footer?
madhuri soni
@sonimadhuri
Aug 13 2017 17:56
nah only give the div .footer class
mbsyaswanth
@mbsyaswanth
Aug 13 2017 17:57
it looks like above now @sonimadhuri
once check the code, i didnt get exactly what you said @sonimadhuri
mbsyaswanth
@mbsyaswanth
Aug 13 2017 18:03
that doesnt make it @sonimadhuri
Razvan
@razvanlikespizza
Aug 13 2017 18:09
@gishy1 Do you still have problems with it?
gishy1
@gishy1
Aug 13 2017 18:09
@razvanlikespizza na bro youtube helped
Thanks either way
Razvan
@razvanlikespizza
Aug 13 2017 18:10
@gishy1 Great!!! <3
Gulsvi
@gulsvi
Aug 13 2017 18:14
@mbsyaswanth
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
}
That's an advanced front-end project. It's a good time to get familiar with the Position property in CSS: https://www.w3schools.com/cssref/pr_class_position.asp
Razvan
@razvanlikespizza
Aug 13 2017 18:15
@SkyC0der Heey!
Gulsvi
@gulsvi
Aug 13 2017 18:16
@razvanlikespizza :wave: Hello :)
Razvan
@razvanlikespizza
Aug 13 2017 18:16
@SkyC0der Helpin' people?
Gulsvi
@gulsvi
Aug 13 2017 18:16
Trying to
We'll see if that one helps
And trying to figure out how to not do promise.all on a bunch of promise.all calls...
Razvan
@razvanlikespizza
Aug 13 2017 18:31
@SkyC0der Wanna drink some beer? :beers:
Gulsvi
@gulsvi
Aug 13 2017 18:31
Cheers @razvanlikespizza lol :beers:
Razvan
@razvanlikespizza
Aug 13 2017 18:31
@SkyC0der Cheers xDDD..
kyle-kauzlarich
@kyle-kauzlarich
Aug 13 2017 19:32

Challenge Escape Sequences in Strings
Instructions
Assign the following three lines of text into the single variable myStr using escape sequences.

FirstLine
\SecondLine\
ThirdLine
You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words.

Here is the text with the escape sequences written out.

FirstLinenewlinebackslashSecondLinebackslashcarriage-returnThirdLine
var myStr ="FirstLine\n\SeccondLine\\rThirdLine";

my code var myStr ="FirstLine\n\SeccondLine\rThirdLine";
only box not ticked is myStr should have encoded text with the proper escape sequences and no spacing.
var myStr ="FirstLine\n\SeccondLine\\rThirdLine"; that is not passing the challenge ether could someone assist please?
the backslash is excaped out for seccond line just not pasting into chat
Julien Midedji
@ResamVi
Aug 13 2017 19:36
var myStr ="FirstLine\n\\SeccondLine\\\rThirdLine";
oh wait i just copied your mistake
var myStr ="FirstLine\n\\SecondLine\\\rThirdLine";
you had two c in second
and you also need to escape \ because \ alone has a special meaning as well @kyle-kauzlarich
Ravi Kishore Thella
@ravikishorethella
Aug 13 2017 19:38
@kyle-kauzlarich did you finish the challenge?
kyle-kauzlarich
@kyle-kauzlarich
Aug 13 2017 19:40
@ravikishorethella yes i just did
Ravi Kishore Thella
@ravikishorethella
Aug 13 2017 19:40
:+1:
kyle-kauzlarich
@kyle-kauzlarich
Aug 13 2017 19:41
@ResamVi thank you i missed the spelling mistake and the second backslash was in i just dont know how to paste in code without it changing it slightly
CamperBot
@camperbot
Aug 13 2017 19:41
:cookie: 321 | @resamvi |http://www.freecodecamp.com/resamvi
kyle-kauzlarich sends brownie points to @resamvi :sparkles: :thumbsup: :sparkles:
Julien Midedji
@ResamVi
Aug 13 2017 19:41
backticks ```
CamperBot
@camperbot
Aug 13 2017 19:41
:bulb: to format code use backticks! ``` more info
Ankit Anand
@Ankit888
Aug 13 2017 20:19
hi
the text on the output phone does not change to latitude and longitude.
korzo
@korzo
Aug 13 2017 20:20
@Ankit888 Post your code
Ankit Anand
@Ankit888
Aug 13 2017 20:20
As i am able to finish the assignment but i am not able to see the user locations

<script>
// Only change code below this line.

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
});
}

// Only change code above this line.
</script>

<div id = "data">
<h4>You are here:</h4>

</div>

korzo
@korzo
Aug 13 2017 20:21
@Ankit888 Sometimes it doesn't work.
You can try to refresh page.
Ankit Anand
@Ankit888
Aug 13 2017 20:22
i tried but still in the output no response..
chrome is asking for allowing the location,,
i am allowing too
korzo
@korzo
Aug 13 2017 20:23
@Ankit888 Strange. It works for me and it display the output. I pasted your exact code
Ankit Anand
@Ankit888
Aug 13 2017 20:24
can u show me ur output pls
korzo
@korzo
Aug 13 2017 20:25
@Ankit888
latitude: 41.1509709
longitude: 27.0882719
@Ankit888 It refresh after every change in the code
Ankit Anand
@Ankit888
Aug 13 2017 20:26
great ...but why i am facing this issue..i changed my browser too .
from chrome to opera
but still no change in the output section..
korzo
@korzo
Aug 13 2017 20:27
@Ankit888 Try this
<script>
// Only change code below this line.
$(function() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
});
}
});
// Only change code above this line.
</script>
Ankit Anand
@Ankit888
Aug 13 2017 20:27
however i am able to run all the test cases but still why its not coming ..
ok
no its not working however i am able to submit my code ..
korzo
@korzo
Aug 13 2017 20:30
@Ankit888 Try to check console for errors
Ankit Anand
@Ankit888
Aug 13 2017 20:31
ok
there is no error i checked
korzo
@korzo
Aug 13 2017 20:34
@Ankit888 well, that's strange. Sometimes people write that preview is not working, but usually CTRL+F5 or code reset solve it
@Ankit888 For me it works in all browsers
@Ankit888 Are you sure geolocation is working?
Try to pass also second argument for error
Gilarath
@Gilarath
Aug 13 2017 20:39
Ummm
for some reason when i logged in all of the things i completed got reset
korzo
@korzo
Aug 13 2017 20:40
@Gilarath it's difference between .com and .org domain
@Gilarath better use https://www.freecodecamp.org/Gilarath
I have problems with .com sometimes too
Ankit Anand
@Ankit888
Aug 13 2017 20:43
its working but i am not able to see my location..
Gilarath
@Gilarath
Aug 13 2017 20:43
now it says i completed the stuff but, when i go to look at them none of the code i put in is there.
korzo
@korzo
Aug 13 2017 20:44
@Gilarath Use link from your profile 'View solution'
code is part of the url
@Gilarath Otherwise code is stored in local storage, but it's exclusive to origin. So if your code is stored on .com, you will not see it at -org
Gilarath
@Gilarath
Aug 13 2017 20:45
kk
@korzo Ty for the help it worked :D
CamperBot
@camperbot
Aug 13 2017 20:47
gilarath sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 372 | @korzo |http://www.freecodecamp.com/korzo
glitz20
@glitz20
Aug 13 2017 20:51
hey guys my nav bar is preventing my caraousel from being responsive. How can I stop this?https://codepen.io/sabin20/full/EvPgMd/
Aita Kane
@aita-kane
Aug 13 2017 21:23
hello can you guys tell me if we put a first div of the body with z-index=-1 , when you add another div how to make be under the first div with the z-index ?
Gulsvi
@gulsvi
Aug 13 2017 21:35
@aita-kane Use z-index: -2
probably better to use positive numbers though, I believe
The lower the number, the further away from where you are sitting
Aita Kane
@aita-kane
Aug 13 2017 21:44
@SkyC0der hello actually i didn't assign a z-index i just use a video as background so how to make the second div appear under ?
JuicyBits
@JuicyBits
Aug 13 2017 21:50
Hi everyone! So I'm developing my first full stack web app, but I'm trying to find the best tools for the job. It'll be a relatively simple app, I'm just not sure which JS Libraries to use / what backend tools are best for a simple project. Any suggestions?
There are just so many JS Libraries
Gulsvi
@gulsvi
Aug 13 2017 21:51
@aita-kane I'd have to see how you made the background, but if your video has position absolute, you can use z-index numbers to layer it.
korzo
@korzo
Aug 13 2017 21:52
@aita-kane Friendly reminder that z-index works only on elements with position other then static and whose are in the same stacking context
JuicyBits
@JuicyBits
Aug 13 2017 21:53
Is this question too broad / am I in the right place?
Kyle Holm
@thekholm80
Aug 13 2017 21:54
@JuicyBits without knowing what you're trying to accomplish, there's not really any way to make suggestions.
well, one: use express if you're using node
JuicyBits
@JuicyBits
Aug 13 2017 21:55
Fair enough. I was hoping that there would be some tools universal to a simple web application (ReactJS for front end, MongoDB or PostGreSQL for back end...)
Kyle Holm
@thekholm80
Aug 13 2017 21:56
the MERN stack is fun to work with
mongo, express, react, node
JuicyBits
@JuicyBits
Aug 13 2017 21:57
That's a great starting point, thanks @thekholm80
CamperBot
@camperbot
Aug 13 2017 21:57
juicybits sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1442 | @thekholm80 |http://www.freecodecamp.com/thekholm80
JuicyBits
@JuicyBits
Aug 13 2017 21:58
how do you feel about On Rails and PostGre?
Kyle Holm
@thekholm80
Aug 13 2017 21:59
i don't have an opinion on that. rails is dying so i never bothered learning it, so i don't really know much about it. I love mongodb so i never tried postgres
JuicyBits
@JuicyBits
Aug 13 2017 22:01
I'd rather not waste time learning a dying framework, so good to know. MERN seems to be the way to go (from my limited searching)
Kyle Holm
@thekholm80
Aug 13 2017 22:02
react is amazing, but there's a bit of a learning curve
I'm happy i learned it, and pretty much every front end i make is done in react now
JuicyBits
@JuicyBits
Aug 13 2017 22:11
Good to know, thanks again!
Aita Kane
@aita-kane
Aug 13 2017 22:11
@SkyC0der @korzo sorry here is the pen : https://codepen.io/akane96/pen/MvEWNK
Derek
@dsoucie
Aug 13 2017 22:12
Hi. can anyone help me with the flag-sprites on the force directed graph? Been stuck for a while now.
then each country has a class code to add to the node
Derek
@dsoucie
Aug 13 2017 22:15
@thekholm80 I'm having an issue making it work with the force directed graph
korzo
@korzo
Aug 13 2017 22:16
@aita-kane
header {
    position: relative;
    z-index: 100;
}
Derek
@dsoucie
Aug 13 2017 22:16
@thekholm80 i'm trying to append the image to an SVG, but it never wants to show the background image. so it just ends up being blank
Kyle Holm
@thekholm80
Aug 13 2017 22:16

with each node i used

.attr('class', (d) => {
   return 'flag flag-' + d.code;
 });

to add the flag icon

korzo
@korzo
Aug 13 2017 22:17
@aita-kane Also give header some background as it's black bg with black color
Derek
@dsoucie
Aug 13 2017 22:17
@thekholm80 i can't get it to work at all. I've even tried hard coding in the same flag for every node just to see if i can get anything to show, and it doesnt.
Kyle Holm
@thekholm80
Aug 13 2017 22:18
sorry
the way i just detailed was the only way i found to make it work
Derek
@dsoucie
Aug 13 2017 22:20
@thekholm80 can you look at my pen? I tried hard coding in great brittan's flag for everything but it still just comes up blank
https://codepen.io/dsoucie/pen/JyNwom
I must not be appending the image correctly to the SVG or something, but i'm seeing very little in the way of guides on the internet for using sprites with SVGs
Aita Kane
@aita-kane
Aug 13 2017 22:22
\ @korzo okay thank you so much for the help @SkyC0der
CamperBot
@camperbot
Aug 13 2017 22:22
aita-kane sends brownie points to @korzo and @skyc0der :sparkles: :thumbsup: :sparkles:
:cookie: 374 | @korzo |http://www.freecodecamp.com/korzo
:star2: 2382 | @skyc0der |http://www.freecodecamp.com/skyc0der
Sunny Wong
@swong194
Aug 13 2017 22:31
hi does anybody here know ruby?
dyon3334
@dyon3334
Aug 13 2017 22:59
can anyone helpe me with this code it only returns 0

function chunkArrayInGroups(arr, num) {
  var output = [];
  var index ;
  index = arr.length / num;
  Math.floor(index);
  for (i=0;i<=num;i++){
    for(j=0;j<=index;j++){
   output[i][j].push(arr[i]);
    }
  }
  return output;
}

chunkArrayInGroups(["a", "b", "c", "d"], 2);
MattUnderwood
@MattUnderwood
Aug 13 2017 23:30
@sjames1958gm This did it, I still don't fully understand but have a better understanding and appreciate the help. Thank you! =)
CamperBot
@camperbot
Aug 13 2017 23:30
mattunderwood sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8310 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 13 2017 23:31
@MattUnderwood :+1:
Margaret
@Margaret2
Aug 13 2017 23:33
@dyon3334 output[i][j] doesn't exist because output is an empty array, so you can't push to it...
dyon3334
@dyon3334
Aug 13 2017 23:34
@Margaret2 thanks im doing more research now
CamperBot
@camperbot
Aug 13 2017 23:34
dyon3334 sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:star2: 2880 | @margaret2 |http://www.freecodecamp.com/margaret2