These are chat archives for FreeCodeCamp/Help

25th
Aug 2015
Arami Guerra
@cowboy63
Aug 25 2015 00:01
@EllieAdam what is the name of the problem
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:02
Hello, I'm just starting out on the bonfires, I need some help on the first one. how do I use .reverse() it's saying that it's not a function
I see that it's called a method but I can't seem to understand how to use them
in a function
Arami Guerra
@cowboy63
Aug 25 2015 00:03
@patrickmac110 did you called it on an array?
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:03
I'm pretty sure I did
DTing
@dting
Aug 25 2015 00:03
@EllieAdam i think @cowboy63 i saying:
  return(Math.floor(Math.random()*10));
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:04
I used it after string.split()
Terry
@tmosoff
Aug 25 2015 00:04
@patrickmac110 link your code
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:04
..how do I do that?
DTing
@dting
Aug 25 2015 00:04
@chriscrosscutler you are missing a $ at the front
$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
for each one
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:05

//function reverseString(str) {
str.split('');
str.reverse();
return str;
}

reverseString('hello').reverse();//

chriscrosscutler
@chriscrosscutler
Aug 25 2015 00:06
@dting That worked! Thanks!
CamperBot
@camperbot
Aug 25 2015 00:06
chriscrosscutler sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
DTing
@dting
Aug 25 2015 00:06
@patrickmac110 you need to join that array back into a string before returnin it
CamperBot
@camperbot
Aug 25 2015 00:06
:star: 640 | @dting | http://www.freecodecamp.com/dting
Terry
@tmosoff
Aug 25 2015 00:06
you need to join your string back together using .join("")
Terry
@tmosoff
Aug 25 2015 00:06
@patrickmac110 you need to join your string back together using .join("")
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:07
still says str.reverse is not a funciton

function reverseString(str) {
str.split('');
str.reverse();
str.join('');
return str;
}

reverseString('hello').reverse();

Terry
@tmosoff
Aug 25 2015 00:08
remove the .reverse from the function call
it should just be reverseString('hello');
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:08
yeah I was doing that to ry it there, i removed it still no beuno
Terry
@tmosoff
Aug 25 2015 00:09
also .reverse works on an array, not on a string
so you either need to chain them, or store them in variables
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:09
i thought str.split turned it into an array
Terry
@tmosoff
Aug 25 2015 00:09
it does, but it isnt stored. you either need to store it in a variable or chain the function calls together
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:10

'''function reverseString(str) {
str.split('').reverse().join('');

return str;
}

reverseString('hello');'''

CamperBot
@camperbot
Aug 25 2015 00:10
:bulb: to format code use backticks! ``` more info
Terry
@tmosoff
Aug 25 2015 00:10
like this str.split('').reverse().join('')
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:10
tried that too, it just spits out "hello"
Terry
@tmosoff
Aug 25 2015 00:10
hmm
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:10

```function reverseString(str) {
str.split('').reverse().join('');

return str;
}

reverseString('hello');```

Terry
@tmosoff
Aug 25 2015 00:11
you need to return str.split('').reverse().join(''); not string
str*
you are returning the original input
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:12
hmm so when I make a change to a variable in a function and then return it at the end it's returning the original and not the changed variable?
Terry
@tmosoff
Aug 25 2015 00:13
you arent changing the original variable, you are just manipulating it
if you said str = str.split('').reverse().join(''); then you would be changing it
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:15
function reverseString(str) {
 var arry1 = str.split('');
  var arry2 = arry1.reverse();
  var arry3 = arry2.join('');
  return arry3;

}

reverseString('my dog has fleas');
so that worked also, is that the long version of doing that
Terry
@tmosoff
Aug 25 2015 00:15
that would also work
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:16
i get it!
Terry
@tmosoff
Aug 25 2015 00:16
good! :-)
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:16
your the best! thanks @tmosoff
CamperBot
@camperbot
Aug 25 2015 00:16
patrickmac110 sends brownie points to @tmosoff :sparkles: :thumbsup: :sparkles:
:star: 217 | @tmosoff | http://www.freecodecamp.com/tmosoff
DTing
@dting
Aug 25 2015 00:17
@patrickmac110
you can also chain those calls since you dont need the intermediate values elsewhere in the code.
function reverseString(str) {
 return str.split('').reverse().join('');
}
Terry
@tmosoff
Aug 25 2015 00:17
@patrickmac110 no prob. glad i could help
DTing
@dting
Aug 25 2015 00:17
ahh nm tmosoff mentioned that
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:17
oh that helps too
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:24
can I not put a for loop in a function?
nevermind
chriscrosscutler
@chriscrosscutler
Aug 25 2015 00:29

function factorialize(num) {
var i;
var total = 1;
for(i = 1; i < num; i++)
{
newNUm = i * total;

}

newNum = num;
return num;
}

factorialize(5);

Patrick McWilliams
@patrickmac110
Aug 25 2015 00:30
var Fact =1;
function factorialize(num) {
  var Fact =1;
  for(i = 1; i<= num; i++){
   Fact *= i;
  }
  return Fact;
}

factorialize(5);
it works!!!!
chriscrosscutler
@chriscrosscutler
Aug 25 2015 00:30
Sweet! My idea was to do a loop where it would create a total and then times that total by i until the loop reached the original number. Thanks @patrickmac110
CamperBot
@camperbot
Aug 25 2015 00:30
chriscrosscutler sends brownie points to @patrickmac110 :sparkles: :thumbsup: :sparkles:
:star: 193 | @patrickmac110 | http://www.freecodecamp.com/patrickmac110
Patrick McWilliams
@patrickmac110
Aug 25 2015 00:32
*= is nice isn't it
chriscrosscutler
@chriscrosscutler
Aug 25 2015 00:33
yeah I nearly forgot about all the += and -= and such that I learned from C++
DJ
@qualitymanifest
Aug 25 2015 00:33
Anyone here good and familiar with RegEx?
Lux3
@Lux3
Aug 25 2015 00:33
@platypusrex thanks
CamperBot
@camperbot
Aug 25 2015 00:33
lux3 sends brownie points to @platypusrex :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for platypusrex
@qualitymanifest
DTing
@dting
Aug 25 2015 00:40
@patrickmac110 careful with using global i in your for loops.
Tim P
@xTimpi
Aug 25 2015 00:44
Hi guys, I’m working on the twitch.tv api zipline and I can’t my requests get to work, it always gives me the following error: XMLHttpRequest cannot load https://api.twitch.tv/kraken/streams/medrybw. Origin http://s.codepen.io is not allowed by Access-Control-Allow-Origin. Can someone help me with that?
Frank Cooke
@platypusrex
Aug 25 2015 00:44
@Lux3 hey! Glad I could help!
Matt Yamamoto
@MattYamamoto
Aug 25 2015 00:50
@xTimpi what does your api request look like?
Tim P
@xTimpi
Aug 25 2015 00:51
@MattYamamoto
  var buildStreamObject = function(streamerName) {
    var obj = {};
    $.ajax({
      url: 'https://api.twitch.tv/kraken/streams/' + streamerName,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Accept': 'application/vnd.twitchtv.v3+json'
      },
      method: 'GET',
      dataType: 'json',
      success: function(stream) {
        console.log(stream);
      }
  });
    return obj;
  };
Matt Yamamoto
@MattYamamoto
Aug 25 2015 00:54
@xTimpi well... you need to add a &callback=? to the end of the url...that will stop the cross-origin error...but then I'm getting an empty object.
Rex Schrader
@SaintPeter
Aug 25 2015 00:55
@xTimpi You also need to change the dataType to 'jsonp'
Tim P
@xTimpi
Aug 25 2015 00:56
@MattYamamoto twitch api documentation doesn’t mention parameters for the /streams/:channel request though
@SaintPeter changing the dataType fixed it, thank you
CamperBot
@camperbot
Aug 25 2015 00:57
xtimpi sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 328 | @saintpeter | http://www.freecodecamp.com/saintpeter
Tim P
@xTimpi
Aug 25 2015 00:57
@SaintPeter can you elaborate why that was the fix?
Rex Schrader
@SaintPeter
Aug 25 2015 00:58
@xTimpi Just barely. Gimmie a sec.
Matt Yamamoto
@MattYamamoto
Aug 25 2015 00:58
hahaha... I think the link I always read is the jquery one, which is not necessary here.
whoops... I mean the getJSON jQuery one
Tim
@timmcallister
Aug 25 2015 01:01
I'm working on the falsey bouncer bonfire, and I'm having trouble with either the filter() function or the Boolean object, either or.
function bouncer(arr) {

  arr.filter(function(x) { 
    return Boolean(x);
  });

  return arr;
}

bouncer([7, 'ate', '', false, 9]);
Matt Yamamoto
@MattYamamoto
Aug 25 2015 01:02
@xTimpi from the jquery page: >"jsonp": Loads in a JSON block using JSONP. Adds an extra "?callback=?" to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the cache option is set to true
Rex Schrader
@SaintPeter
Aug 25 2015 01:02
@xTimpi ok, here is the deal: For security reasons, browsers don't want to pull data from a domain (IE: example.com) OTHER than the one they're currently pulling from. That's usualyl a good thing, since it protects you. In the case of 3rd party APIs, though, we need to be able to pull data. JSONP is a way of returning the data such that it is passed as a parameter to a callback function (the 'callback=?' in the URL). When you pull the data from the server, that callback is executed . . . the callback is actually written on your local page.
@xTimpi So . . if that makes sense, then bully for you. I've got years of experience and I find it fairly confusing.
@xTimpi The main thing is that both jQuery needs to be expecting JSONP data, and the request you're sending to the server must be returning JSONP data.
Tim P
@xTimpi
Aug 25 2015 01:03
@MattYamamoto @SaintPeter okay yeah that makes sense I guess, thank you
CamperBot
@camperbot
Aug 25 2015 01:03
xtimpi sends brownie points to @mattyamamoto and @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: xtimpi already gave saintpeter points
:star: 307 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
Frank Cooke
@platypusrex
Aug 25 2015 01:03
@timmcallister just return the val in the callback. The filter function won't return false values
.filter method...sorry
Matt Yamamoto
@MattYamamoto
Aug 25 2015 01:04
@SaintPeter I agree... I mean if it's unsafe for page code to get something from a third party server, why is it okay to get it in a callback and then allow that to be executed
Frank Cooke
@platypusrex
Aug 25 2015 01:05
@timmcallister return arr.filter(function(val){return val;});
Rex Schrader
@SaintPeter
Aug 25 2015 01:05
@MattYamamoto Umm . . .reasons? I think it's because it's not possible for executable code to be called by the callback. Because the info is passed as a parameter, there is simply no way it could be executed.
Tim
@timmcallister
Aug 25 2015 01:07
@platypusrex thanks buddy, although I'm going to have to read up on that
CamperBot
@camperbot
Aug 25 2015 01:07
timmcallister sends brownie points to @platypusrex :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for platypusrex
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:08
is there any shorter way to do this in regex: var newString = str.replace(/[.,!@#$%\^&\*()\-_=+]|\s/g, '').toLowerCase();
Matt Yamamoto
@MattYamamoto
Aug 25 2015 01:11
@SaintPeter somehow it still feels unsecure, or at least open to abuse if not used correctly. but i guess that is true of code in general
Justin Crawford
@JCrawford1122
Aug 25 2015 01:12
@patrickmac110 /\W/ can be used to find all the non word characters
DTing
@dting
Aug 25 2015 01:13
@patrickmac110 you could try using str.replace(/\W|_/gi, '').toLowerCase();
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:13
why the underscore?
DTing
@dting
Aug 25 2015 01:14
underscore is technically a punctuation.
and would not be matched with /\W/
"\W is equivalent to [^a-zA-Z_0-9]."
hmm i guess you wouldn't use the i flag
Arami Guerra
@cowboy63
Aug 25 2015 01:20
what exactly do we do in Zipline: Build a Personal Portfolio Webpage
DTing
@dting
Aug 25 2015 01:21
@cowboy63 make your own portfolio
Arami Guerra
@cowboy63
Aug 25 2015 01:21
@dting Yeah but what do we put in it my name and a few pictures
DTing
@dting
Aug 25 2015 01:22
there are user stories that they want implemented in the zipline pages and some optional ones
they are on the left of the video
you can put place holders until you have things to throw in there
Arami Guerra
@cowboy63
Aug 25 2015 01:23
lol I'm dumb ,thanks for reply ,I over complicated the exercise
CamperBot
@camperbot
Aug 25 2015 01:23
if you want to thank someone, put an @ before their name!
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:23
thanks @dting
CamperBot
@camperbot
Aug 25 2015 01:23
patrickmac110 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 644 | @dting | http://www.freecodecamp.com/dting
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:24
function palindrome(str) {
  // Good luck!
  var newString = str.replace(/[.,!@#$%\^&\*()\-_=+]|\s/g, '').toLowerCase().split('').reverse().join('');

  if(newString!=str.replace(/[.,!@#$%\^&\*()\-_=+]|\s/g, '').toLowerCase()){
    return false;
  }
  else{
    return true;
  }

}



palindrome("race, CAR.");
it works
DTing
@dting
Aug 25 2015 01:24
@patrickmac110 nice
Frank Cooke
@platypusrex
Aug 25 2015 01:24
@timmcallister no worries!
kuhan
@nkuhan
Aug 25 2015 01:25
hi
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:25
hello @nkuhan
Arami Guerra
@cowboy63
Aug 25 2015 01:25
@nkuhan hey there
kuhan
@nkuhan
Aug 25 2015 01:25
yes
can you tell me @cowboy63
<button class="btn btn-block btn-primary"><i class="fa fa-twitter fa-fw">Twitter</i></button>
what is the problem in this code
Arami Guerra
@cowboy63
Aug 25 2015 01:27
@nkuhan what is the matter with it?
kuhan
@nkuhan
Aug 25 2015 01:28
twitter button didn't appear
DTing
@dting
Aug 25 2015 01:28
did you import or load font awesome?
kuhan
@nkuhan
Aug 25 2015 01:29
no
how to import
DTing
@dting
Aug 25 2015 01:30
where are you using that?
codepen?
kuhan
@nkuhan
Aug 25 2015 01:30
yes
Arami Guerra
@cowboy63
Aug 25 2015 01:30
@nkuhan sorry could not help you there i am also quite new

Paste the following code into the <head> section of your site's HTML.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">

kuhan
@nkuhan
Aug 25 2015 01:32
Thnks it works
CamperBot
@camperbot
Aug 25 2015 01:32
if you want to thank someone, put an @ before their name!
kuhan
@nkuhan
Aug 25 2015 01:32
Thanks @dting
CamperBot
@camperbot
Aug 25 2015 01:32
nkuhan sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 645 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 25 2015 01:33
nps
or in code pen you can click the css sprocket
Screen Shot 2015-08-24 at 6.32.42 PM.png
Screen Shot 2015-08-24 at 6.32.14 PM.png
kuhan
@nkuhan
Aug 25 2015 01:34
why I need to include the code in the code in head seaction
because bootstrab added on codepen
DTing
@dting
Aug 25 2015 01:35
bootstrap doesn't include font awesome
it includes a few glyphicons but font awesome is a separate thing
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:37
is there a way in javascript to find the largest number in an array?
or pseudo imperatively:
largest = array's first element
for  each element in the array:
  largest = larger of largest or element
nachum
@nachal88
Aug 25 2015 01:45
can someone help me with JavaScript challenge " Waypoint: Generate Random Whole Numbers within a Range". my code is return Math.floor(Math.random() * (9- 0 + 1)) + 0;
}
i get error You should be using the function given in the description to calculate the random in number in a range
Mukul Patel
@Mukul215
Aug 25 2015 01:47
You have to use the min & max variables and not physically type in the numbers
nachum
@nachal88
Aug 25 2015 01:48
@Mukul215 thanks. that worked
CamperBot
@camperbot
Aug 25 2015 01:48
nachal88 sends brownie points to @mukul215 :sparkles: :thumbsup: :sparkles:
:star: 173 | @mukul215 | http://www.freecodecamp.com/mukul215
Mukul Patel
@Mukul215
Aug 25 2015 01:48
no problem!
DJ
@qualitymanifest
Aug 25 2015 01:51
I'm having a problem with scope. I'm doing "find the longest word". I've got the words separated into individual arrays and I'm using a for loop to iterate through them, and an if statement to see which is the longest. But I can't figure out how to access that outside the for loop so I can return the longest word. Anyone got any ideas?
Ian Hyndman
@ian-splintercell-splinter
Aug 25 2015 01:52
Hi can any one help please. I'm stuck on this tried to Google but no joy. Your image should be 100 pixels wide. ? Waypoint Size your images (45)
Justin Crawford
@JCrawford1122
Aug 25 2015 01:52
can you post your code
DJ
@qualitymanifest
Aug 25 2015 01:53
function findLongestWord(str) {
  // Separate words
  var words = str.split(/\W/);
  // Find longest word
  for (var i = 0; i < words.length; i++) {
    if (words[i].length > words[i++].length) {
      str = words[i];
    }
  }

  return str;
}
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:54
@dting why isn't this working, or is this improper use of .apply()
function findLongestWord(str) {

  return Math.max(str);
}

var macks = [1,2,3,4,5,6,7,8,9,10,47382];
var myObj = findLongestWord.apply(myObj, macks);


//findLongestWord('The quick brown fox jumped over the lazy dog');
DTing
@dting
Aug 25 2015 01:54
@qualitymanifest you can make a variable outside the for loop to use across iterations. be careful with using the post increment in your loop.
@patrickmac110 you would use apply. like Math.max.apply(null, someArray);
Ramses
@ram535
Aug 25 2015 01:55
@patrickmac110 this is my solution to that problem
'''
CamperBot
@camperbot
Aug 25 2015 01:55
:bulb: to format code use backticks! ``` more info
Ramses
@ram535
Aug 25 2015 01:56

'''function findLongestWord(str) {
str = str.split(' ');
var word = str[0];
for(var j = 0;j < str.length ; j++ ){
if(word.length <= str[j].length){
word = str[j];
}
}
str = word;
return str.length;
}

findLongestWord('The quick brown fox jumped over the lazy dog');

CamperBot
@camperbot
Aug 25 2015 01:56
:bulb: to format code use backticks! ``` more info
Ramses
@ram535
Aug 25 2015 01:56

function findLongestWord(str) {
str = str.split(' ');
var word = str[0];
for(var j = 0;j < str.length ; j++ ){
if(word.length <= str[j].length){
word = str[j];
}
}
str = word;
return str.length;
}

findLongestWord('The quick brown fox jumped over the lazy dog');

'''
function findLongestWord(str) {
str = str.split(' ');
var word = str[0];
for(var j = 0;j < str.length ; j++ ){
if(word.length <= str[j].length){
word = str[j];
}
}
str = word;
return str.length;
}

findLongestWord('The quick brown fox jumped over the lazy dog');
'''

CamperBot
@camperbot
Aug 25 2015 01:57
:bulb: to format code use backticks! ``` more info
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:57
the ` key is in the top left corner below ~
Ramses
@ram535
Aug 25 2015 01:58
function findLongestWord(str) {
      str = str.split(' ');
    var word = str[0];
        for(var j = 0;j < str.length ; j++ ){
           if(word.length  <= str[j].length){
              word = str[j];
           }
        }
  str = word;
  return str.length;
}

findLongestWord('The quick brown fox jumped over the lazy dog');
DTing
@dting
Aug 25 2015 01:59
@qualitymanifest
function findLongestWord(str) {
  // Separate words
  var words = str.split(/\W/);
  // declare a variable here to track your longest word or length.
  // Find longest word
  for (var i = 0; i < words.length; i++) {
    // set that variable to the word or length if word[i] is longer
  }
  return str; // return longest length found
}
Ramses
@ram535
Aug 25 2015 01:59
sorry about that
Patrick McWilliams
@patrickmac110
Aug 25 2015 01:59
yay! @ram535
...took me a few tries too
Ramses
@ram535
Aug 25 2015 02:05
why isn't this working
function truncate(str, num) {
    if(str.length > num){
    str = str.slice(0,num-3);
    str = str + '...';
  return str;
    }
    else
        return false;
}

truncate('A-tisket a-tasket A green and yellow basket', 11);
I don't know why is not accepted as correct if it does what is suppose to do
Julie Myers
@BlueOceanView
Aug 25 2015 02:07
@ram535 Write out the algorithm...the steps you expect your coding to do.
Kevin Gilpin
@KevinGilpin
Aug 25 2015 02:07
well looks like your missing a { after else
not sure if that's affecting it
@ram535
Ramses
@ram535
Aug 25 2015 02:08
it does not affect if it is just one stament @KevinGilpin
Kevin Gilpin
@KevinGilpin
Aug 25 2015 02:08
oh ok
DJ
@qualitymanifest
Aug 25 2015 02:09
@dting Thanks, finally got it
viznev
@viznev
Aug 25 2015 02:09
@ram535 which test is failing?
DTing
@dting
Aug 25 2015 02:10
@ram535 dont return false return the str
Julie Myers
@BlueOceanView
Aug 25 2015 02:10
@ram535 Try doing the coding in the javaScript console to see if it works there.
DTing
@dting
Aug 25 2015 02:10
in the else case
Ramses
@ram535
Aug 25 2015 02:10
I did it in a console @BlueOceanView
DTing
@dting
Aug 25 2015 02:11
@ram535 if the string is sorted than num, they want you to jsut return the str
viznev
@viznev
Aug 25 2015 02:11
@ram535 @dting is right, you don't need the return false
Ramses
@ram535
Aug 25 2015 02:11
assert(truncate('A-tisket a-tasket A green and yellow basket', 'A-tisket a-tasket A green and yellow basket'.length) === 'A-tisket a-tasket A green and yellow basket', 'should not truncate if string is = length');should not truncate if string is = length
assert(truncate('A-tisket a-tasket A green and yellow basket', 'A-tisket a-tasket A green and yellow basket'.length) === 'A-tisket a-tasket A green and yellow basket', 'should not truncate if string is = length');should not truncate if string is = length
BabyKosh
@badbabykosh
Aug 25 2015 02:11
Bonfire where art thou
CamperBot
@camperbot
Aug 25 2015 02:11

:fire:Bonfire: Where art thou :link:

function where(collection, source) {
  var arr = [];
  // What's in a name?
  return arr;
}

where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });

Make a function that looks through a list (first argument) and returns an array of all objects that have equivalent property values (second argument).

more info:  bf details | bf links | hint

viznev
@viznev
Aug 25 2015 02:12
@ram535 yeah it's not returning the string if it matches length, you have it set to return false instead, so you might want to remove that
Ramses
@ram535
Aug 25 2015 02:15
thanks @dting @viznev
CamperBot
@camperbot
Aug 25 2015 02:15
ram535 sends brownie points to @dting and @viznev :sparkles: :thumbsup: :sparkles:
:star: 238 | @viznev | http://www.freecodecamp.com/viznev
:star: 646 | @dting | http://www.freecodecamp.com/dting
Patrick McWilliams
@patrickmac110
Aug 25 2015 02:17
I'm getting an error with this one:
function findLongestWord(str) {
  var words = str.split(' ');
  var lengths;
  for(var j = 0; j<words.length; j++){
    lengths.push(words[j].length);
  }
  return Math.max.apply(null,lengths);
}



findLongestWord('The quick brown fox jumped over the lazy dog');
Julie Myers
@BlueOceanView
Aug 25 2015 02:17
@patrickmac110 What error are you getting?
Patrick McWilliams
@patrickmac110
Aug 25 2015 02:17
cannot read property 'push' of undefined
Julie Myers
@BlueOceanView
Aug 25 2015 02:18
@patrickmac110 Right now the variable lengths is undefined, so you are trying to push data into an undefined variable which is why you are getting the error.
Bill
@kirah1314
Aug 25 2015 02:18
@patrickmac110 use var lengths = [];
Julie Myers
@BlueOceanView
Aug 25 2015 02:19
@patrickmac110 What @kirah1314 said. :)
Bill
@kirah1314
Aug 25 2015 02:19
this will declare lengths as an array
Patrick McWilliams
@patrickmac110
Aug 25 2015 02:19
WOOHOO!!! Thanks! that did it @BlueOceanView @kirah1314
CamperBot
@camperbot
Aug 25 2015 02:19
patrickmac110 sends brownie points to @blueoceanview and @kirah1314 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for blueoceanview
:star: 169 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Julie Myers
@BlueOceanView
Aug 25 2015 02:20
You're welcome.
curious-jane
@curious-jane
Aug 25 2015 02:22

hi guys! I have trouble in building a weather app.. below is my code: ```$(document).ready(function(){

var location = $('.submit').click(function(){
$('.location').val();
});

var url = "http://api.openweathermap.org/data/2.5/weather?q=" + location;

console.log(url);

$.getJSON(url).success(function(data) {
$('h3').text(Math.floor(data.main.temp - 273) + ' C' );

});

})

``` I want to let the user type in the city in a input field and then tell the weather. I am having trouble in jQuery as how to select the input value. It seems that after the user type the city and hit enter or submit button, the value still jump back to the initial value.

var location = $('.submit').click(function(){
$('.location').val();
});
var url = "http://api.openweathermap.org/data/2.5/weather?q=" + location;
console.log(url);
$.getJSON(url).success(function(data) {
$('h3').text(Math.floor(data.main.temp - 273) + ' C' );
});
})
DTing
@dting
Aug 25 2015 02:23
do you have your code up on codepen?
curious-jane
@curious-jane
Aug 25 2015 02:23
yes.
DTing
@dting
Aug 25 2015 02:29
@curious-jane couple issues with your code mainly you are setting var location = whatever setting a callback on submit returns. instead put your logic into the click callback function. Something like http://codepen.io/dting/pen/KpOyXL
curious-jane
@curious-jane
Aug 25 2015 02:32
thanks!
CamperBot
@camperbot
Aug 25 2015 02:32
if you want to thank someone, put an @ before their name!
curious-jane
@curious-jane
Aug 25 2015 02:32
@dting Thanks!!
CamperBot
@camperbot
Aug 25 2015 02:32
curious-jane sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 649 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 25 2015 02:34
nps
p00gz
@p00gz
Aug 25 2015 02:34

just completed and passed bonfire #7

function largestOfFour(arr) {

  for (var i=0; i<arr.length; i++) {
    for (var j=0; j<arr[i].length; j++) {
         var array1  = Math.max.apply(Math, arr[j]);
         var array2  = Math.max.apply(Math, arr[j+1]);
         var array3  = Math.max.apply(Math, arr[j+2]);
         var array4  = Math.max.apply(Math, arr[j+3]);
         newArray = [];
         newArray.push(array1, array2, array3, array4);
         return newArray;
    }     
  }
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

Can someone help me clean up the middle part? is there a better way to compute the max on all four arrays in parallel?

DTing
@dting
Aug 25 2015 02:34
@p00gz
function largestOfFour(arr) {
  return arr.map(function(sub) {
    return Math.max.apply(null, sub);
  });
}
Frank Cooke
@platypusrex
Aug 25 2015 02:35
that .map method is so hot right now
DTing
@dting
Aug 25 2015 02:35
actually for your code you have a for loop that always returns after the first iteration
function largestOfFour(arr) {

         var array1  = Math.max.apply(Math, arr[0]);
         var array2  = Math.max.apply(Math, arr[1]);
         var array3  = Math.max.apply(Math, arr[2]);
         var array4  = Math.max.apply(Math, arr[3]);
         newArray = [];
         newArray.push(array1, array2, array3, array4);
         return newArray;
}
is the same thing as your code
err wait damn it
there we go thats the same as your code.
wait dang it
Frank Cooke
@platypusrex
Aug 25 2015 02:36
something like this
for(var i = 0; i < arr.length; i++){
for(var j = 0; j < arri.length; j++){
if(arr[i][j] > largesti){
largesti = arr[i][j];
}
}
}
DTing
@dting
Aug 25 2015 02:38
there we go thats the same as your code. you are explicitly doing math.max on each of the elements. you can write it like this also:
function largestOfFour(arr) {
  var newArray = [];
  for (var i = 0; i < arr.length; i++) {
    newArray.push(Math.max.apply(null, arr[i]);
  }
  return newArray;
}
p00gz
@p00gz
Aug 25 2015 02:38
@dting holy cow, map is the best!
p00gz
@p00gz
Aug 25 2015 02:40
@dting :thumbsup: thanks so much!
CamperBot
@camperbot
Aug 25 2015 02:40
p00gz sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 650 | @dting | http://www.freecodecamp.com/dting
curious-jane
@curious-jane
Aug 25 2015 02:40
@dting sorry, I have to bug you again. I am still having trouble in getting the location... When I hit enter, the city still go back to the initial value.. Is there anyway to avoid this?
DTing
@dting
Aug 25 2015 02:42
@curious-jane because your submit doesnt call that function
curious-jane
@curious-jane
Aug 25 2015 02:44
???
Bill
@kirah1314
Aug 25 2015 02:47
@dting can I pm you for some help on the weather app zipline too?
James Funk
@jfunk46360
Aug 25 2015 02:56

Must input a string and check for a palindrome. Must remove punctuation from input and change to lower case. No clue here, so thought I would throw out some code and get some hints.

function palindrome(checkThis) {

checkThis = checkThis.stringReplace();
checkThis = checkThis.toLowerCase();

var array;
array = checkThis.split("");
array = array.reverse();
reversed = array.join("");

if (checkThis === reversed)

return true;
else return false;
}

palindrome("eye");

DTing
@dting
Aug 25 2015 02:57
@curious-jane sorry was grabbing dinner
fyrfterjr
@fyrfterjr
Aug 25 2015 03:01
blob
What am I doing wrong?
Seth
@itzsaga
Aug 25 2015 03:02

Nobody around in the HelpZiplines chat. Anybody able to help with this:

function newQuote() {
  var generatedQuote = quotes[Math.floor(Math.random() * quotes.length)];
  document.getElementById("randomQuote").innerHTML = generatedQuote;
}
newQuote();

function convert(str) {
    return str.replace(/[&<>"']/g, function($0) {
        return {"&":"&amp;", "<":"&lt;", ">":"&gt;", '"':"&quot;", "'":"&apos;"}[$0];
    });
};

var tweetText = convert(generatedQuote);
var tweetLink = "https://twitter.com/intent/tweet?t=" + tweetText + "&via=itzsaga&related=itzsaga,FreeCodeCamp";
document.getElementById("tweet").setAttribute("href",tweetLink).setAttribute("target","new");

I need to grab the generatedQuote from the newQuote() function so I can add it to my link when the tweet goes out. Thoughts?

@fyrfterjr which waypoint is that?
Justin Crawford
@JCrawford1122
Aug 25 2015 03:03
@fyrfterjr which waypoint?
fyrfterjr
@fyrfterjr
Aug 25 2015 03:03
Target the Parent of an Element Using jQuery
DTing
@dting
Aug 25 2015 03:04
@itzsaga you can get it the same way you set it: document.getElementById("randomQuote").innerHTML
Justin Crawford
@JCrawford1122
Aug 25 2015 03:05
try .target instead of #left-well
Seth
@itzsaga
Aug 25 2015 03:07
I need to get it in my JS so I can URL-encode it and put that on the end of the link.
Justin Crawford
@JCrawford1122
Aug 25 2015 03:07
because you are targeting the well using parent(). the left-well is the parent of .target
DTing
@dting
Aug 25 2015 03:08
@itzsaga are you using the twitter widet?
widget?
Matt Yamamoto
@MattYamamoto
Aug 25 2015 03:08
@itzsaga you could also just have your newQuote function return the text
fyrfterjr
@fyrfterjr
Aug 25 2015 03:09
@JCrawford1122 Thanks for your help. I cut and pasted the line from the next lesson and it worked. Not sure why because it looks the same to me. ????
DTing
@dting
Aug 25 2015 03:09
or just move those 3 lines at the bottom into the newQuote function
i'm not sure if thats actually your code but if thats just sitting in a script tag that code on the bottom will only run when the page loads
Justin Crawford
@JCrawford1122
Aug 25 2015 03:11
@fyrfterjr The only difference was the element you were selecting at the begging of the line
fyrfterjr
@fyrfterjr
Aug 25 2015 03:12
@JCrawford1122 upon further inspection I see that I needed "#target1" instead of "#left-well". Thanks again.
CamperBot
@camperbot
Aug 25 2015 03:12
fyrfterjr sends brownie points to @jcrawford1122 :sparkles: :thumbsup: :sparkles:
:star: 147 | @jcrawford1122 | http://www.freecodecamp.com/jcrawford1122
Seth
@itzsaga
Aug 25 2015 03:12
@MattYamamoto @dting thanks. Got the button generating the correct html now but I need to change that text to URL-encode. Which I think I can do now.
Justin Crawford
@JCrawford1122
Aug 25 2015 03:12
np
Seth
@itzsaga
Aug 25 2015 03:13
@dting @MattYamamoto thanks (want you to get those brownie points)
CamperBot
@camperbot
Aug 25 2015 03:13
itzsaga sends brownie points to @dting and @mattyamamoto :sparkles: :thumbsup: :sparkles:
:star: 308 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
:star: 652 | @dting | http://www.freecodecamp.com/dting
Ryan Harmaning
@rharmaning
Aug 25 2015 03:14
I'm having a basic but frustrating issue on waypoint 18: a CSS linter hints at the issue being how I'm trying to assign two classes to my <img> . Results on stackoverflow haven't helped: I've tried <img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"> and <img class="smaller-image class="thick-green-border" src="https://bit.ly/fcc-relaxing-cat"> the completed tasks for the waypoint switch based on which class is assigned first, but can't get it to take both. I miss something in the instructions?
Cristián Berríos
@crisberrios
Aug 25 2015 03:17
the 2nd one is wrong
DTing
@dting
Aug 25 2015 03:17
@rharmaning the first is correct. the second you'd end up with only one of those classes
Cristián Berríos
@crisberrios
Aug 25 2015 03:17
multiple classes should be on the same class statement
Ryan Harmaning
@rharmaning
Aug 25 2015 03:17
This message was deleted
DTing
@dting
Aug 25 2015 03:17
@rharmaning what's the rest of the code look like (inside the style tag)
Matt Yamamoto
@MattYamamoto
Aug 25 2015 03:17
@rharmaning and the order shouldn't matter, as long as they are in the same class statement
Ryan Harmaning
@rharmaning
Aug 25 2015 03:18
ok, so I could only get all tasks to pass when I did this <img class="thick-green-border>" <img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat"> which isn't as clean as I expected it would be.

@dting looks like this: ```<style>
...
.smaller-image {
width: 100px;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}

</style>``` hopefully that's enough to answer your ?? Inserting the other code-snippets I see would be nice too :)

Patrick McWilliams
@patrickmac110
Aug 25 2015 03:20
though it's not foolproof (it only finds the first of the largest words if there are multiple with the same length) this is pretty cool addition to the bonfire I added:
function findLongestWord(str) {
  var words = str.split(' ');
  var lengths;
  for(var j = 0; j<words.length; j++){
    lengths.push(words[j].length);
  }
  return Math.max.apply(null,lengths);
}



findLongestWord('The quick brown fox jumped over the lazy dog');

that's the original, sorry. here:
```function findLongestWord(str) {
var words = str.split(' ');
var lengths = [];
for(var j = 0; j<words.length; j++){
lengths.push(words[j].length);
}
var longest = Math.max.apply(null,lengths);
for(var l = 0; l<words.length; l++){
if(longest == lengths[l]){
return words[l];
}
}
}

findLongestWord('My name is patrick');
```

function findLongestWord(str) {
  var words = str.split(' ');
  var lengths = [];
  for(var j = 0; j<words.length; j++){
    lengths.push(words[j].length);
  }
  var longest = Math.max.apply(null,lengths);
  for(var l = 0; l<words.length; l++){
    if(longest == lengths[l]){
      return words[l];
    }
  }
}

findLongestWord('My name is patrick');
Matt Yamamoto
@MattYamamoto
Aug 25 2015 03:21
@rharmaning I copied and pasted your first class statement just to check my eyes weren't missing a type (with the classes together in one img tag, and that works for me)
Patrick McWilliams
@patrickmac110
Aug 25 2015 03:22
couldn't have done it without you bud, thanks @dting
CamperBot
@camperbot
Aug 25 2015 03:22
patrickmac110 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 653 | @dting | http://www.freecodecamp.com/dting
Ryan Harmaning
@rharmaning
Aug 25 2015 03:22
hrm ok, @MattYamamoto - thanks for checking! I'll retry. At least I got it to work, if somewhat clunky-ly ;)
DTing
@dting
Aug 25 2015 03:22
@rharmaning it looks like you are missing some closing tags
or quots
quotes
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
Justin Crawford
@JCrawford1122
Aug 25 2015 03:23
@rharmaning mine looked like this
 .thick-green-border {
    border-style: solid;
    border-width: 10px;
    border-color: green;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
Ryan Harmaning
@rharmaning
Aug 25 2015 03:25
doh, I see @JCrawford1122 and @dting I had added closing quotes to each class which 'breaks' it. Thanks guys!
CamperBot
@camperbot
Aug 25 2015 03:25
rharmaning sends brownie points to @jcrawford1122 and @dting :sparkles: :thumbsup: :sparkles:
:star: 148 | @jcrawford1122 | http://www.freecodecamp.com/jcrawford1122
:star: 653 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 25 2015 03:26
@rharmaning nps glad you got it working
Feners4
@Feners4
Aug 25 2015 03:34
what would be a good way to check in js if set of numbers in an array are divisble by two like so:
input = {2,3,4}
output={1,0,1}
output = input.map(function(v) {return (v+1)%2;}); if you want 1's and 0's
Feners4
@Feners4
Aug 25 2015 03:44
@dting thx man!
CamperBot
@camperbot
Aug 25 2015 03:44
feners4 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 655 | @dting | http://www.freecodecamp.com/dting
Patrick McWilliams
@patrickmac110
Aug 25 2015 03:44

why is it saying letterss.unshift is not a function?
```function titleCase(str) {
var letters = str.split('');

for(var m=0; m<letters.length; m++){
if(letters[m-1]==" "){
letters[m].toUpperCase();
}
}

var letterss = letters.shift();
letters[0].toUpperCase();
letterss = letterss.unshift(letters[0]);
return letterss;
}

titleCase("I'm a little tea pot");
```

function titleCase(str) {
  var letters = str.split('');

  for(var m=0; m<letters.length; m++){
    if(letters[m-1]==" "){
      letters[m].toUpperCase();
    }
  }



  var letterss = letters.shift();
  letters[0].toUpperCase();
  letterss = letterss.unshift(letters[0]);
  return letterss;
}

titleCase("I'm a little tea pot");
array.shift would return the first element of the array
so your letters would be a string.
letterss would be a string. which doesnt have an unshift method
Patrick McWilliams
@patrickmac110
Aug 25 2015 03:46
oh so I don't need to have it equal anything
Eugeniu Botnaru
@ebv-gh
Aug 25 2015 03:46
Hi evryone, need some help with the following challange
pop() removes last item in array
and I can’t find an option to tell it to remove the first item in array
Jesse Rafael Dizon
@jesserafael
Aug 25 2015 03:48
Hello everyone, I'm just wondering why I can't activate my portfolio page even though I already linked my Github account with FCC.
wontoan
@wontoan
Aug 25 2015 03:48
.shift() removes first item in array and shifts each element one index down
DTing
@dting
Aug 25 2015 03:48
@rumpumpum shift removes the first
@rumpumpum but it wants you to remove the last
Justin Crawford
@JCrawford1122
Aug 25 2015 03:48
@rumpumpum Arent' you supposed to remove the last item on that waypoint?
DTing
@dting
Aug 25 2015 03:49
@rumpumpum it wants you to set removed equal to the element you removed from the end
thefacilitator
@thefacilitator
Aug 25 2015 03:49

Hi, I'm having trouble with Waypoint: Iterate with JavaScript For Loops. Is this code correct? ```var myArray = [];
//Push the numbers zero through four to myArray using a "for loop" like above.
var ourArray = [];

for(var i = 0; i < 5; i++) {

  ourArray.push(i);

}```

DTing
@dting
Aug 25 2015 03:49
@thefacilitator they want you to push to myArray
thefacilitator
@thefacilitator
Aug 25 2015 03:50
@dting I'm not sure what you mean, sorry :/
DTing
@dting
Aug 25 2015 03:50
you have var ourArray = [];
they are looking for myArray
Can someone help me reverse a string?
Xchel Hernandez
@xchelm
Aug 25 2015 03:51
@thefacilitator do you want to push 0 into your array?
I've been attempting for three days now with no luck yet
Xchel Hernandez
@xchelm
Aug 25 2015 03:51
@oyp I can
DTing
@dting
Aug 25 2015 03:51
bf reverse
CamperBot
@camperbot
Aug 25 2015 03:51

:fire:Bonfire: Reverse a String :link:

function reverseString(str) {
  return str;
}

reverseString('hello');

Reverse the provided string.

more info:  bf details | bf links | hint

DTing
@dting
Aug 25 2015 03:51
bf links
thefacilitator
@thefacilitator
Aug 25 2015 03:51
@dting @xchelm Okay, it's worked now - thanks for pointing that out!
CamperBot
@camperbot
Aug 25 2015 03:51
thefacilitator sends brownie points to @dting and @xchelm :sparkles: :thumbsup: :sparkles:
Justin Crawford
@JCrawford1122
Aug 25 2015 03:51
@oyp convert it to an array first
CamperBot
@camperbot
Aug 25 2015 03:51
:star: 166 | @xchelm | http://www.freecodecamp.com/xchelm
:star: 656 | @dting | http://www.freecodecamp.com/dting
Xchel Hernandez
@xchelm
Aug 25 2015 03:52
Does anyone know how to iterate over a nested array?
Haremantra
@haremantra
Aug 25 2015 03:52
Hi, on HTML lesson 40, where you learn what happens when there is conflicting styles of color, the body is green, and the h1 element is pink . You are to assign pink to h1 with a class, I am pretty sure I did it, but there obviously is something wrong because it is now working, help
now=not
Xchel Hernandez
@xchelm
Aug 25 2015 03:53
@haremantra can you post your code?
Ma. Fritz Gerald G Kasala
@fritzkasala
Aug 25 2015 03:53
blob
any one, i need help
This message was deleted
DTing
@dting
Aug 25 2015 03:54
@fritzkasala remove that part that is <! Sample code
Xchel Hernandez
@xchelm
Aug 25 2015 03:54
@fritzkasala without giving you the answer - paragraph two is your best friend
Ma. Fritz Gerald G Kasala
@fritzkasala
Aug 25 2015 03:54
blob
Haremantra
@haremantra
Aug 25 2015 03:54
<style>
body {
background-color: black;
font-family: Monospace;
color: green;
}
h1.pink-text{
color: pink
}

</style>
DTing
@dting
Aug 25 2015 03:54
@fritzkasala oh sorry
Ma. Fritz Gerald G Kasala
@fritzkasala
Aug 25 2015 03:55
what should i do?
@JCrawford1122 @xchelm Should the array have 'hello' 'Howdy' and 'Greetings from Earth' all included?
Haremantra
@haremantra
Aug 25 2015 03:55

<style>
body {
background-color: black;
font-family: Monospace;
color: green;
}
h1.pink-text{
color: pink
}

</style>

<h1 class:"pink-text">Hello World!</h1>

Ma. Fritz Gerald G Kasala
@fritzkasala
Aug 25 2015 03:55
what do you mean @xchelm ?
Xchel Hernandez
@xchelm
Aug 25 2015 03:55
@haremantra your problem is in your h1 tag
DTing
@dting
Aug 25 2015 03:55

@fritzkasala

Remember that in order to start a comment, you need to use <!-- and to end a comment, you need to use -->.

Xchel Hernandez
@xchelm
Aug 25 2015 03:56
@haremantra look closely at how you 'class' your h1 element
Haremantra
@haremantra
Aug 25 2015 03:56
ok, give will check
yes =
Justin Crawford
@JCrawford1122
Aug 25 2015 03:56
@oyp can you post the code you have?
Xchel Hernandez
@xchelm
Aug 25 2015 03:56
@fritzkasala well to comment out multiple lines you have to use
@haremantra did you change it?
Ma. Fritz Gerald G Kasala
@fritzkasala
Aug 25 2015 03:57
blob
Patrick McWilliams
@patrickmac110
Aug 25 2015 03:57
why is this not working?:
function titleCase(str) {
  var letters = str.split('');
  var input = str;

  var firstLetter = letters[0].toUpperCase();
  letters.shift();
  letters.unshift(firstLetter);

  for(var m=1; m<letters.length; m++){
    if(letters[m-1]== " "){
      letters[m].toUpperCase();
    }
  }
  input = letters.join('');
  return input;
}

titleCase("i'm a little tea pot");
Haremantra
@haremantra
Aug 25 2015 03:57
yes, thank you xchelm!
DTing
@dting
Aug 25 2015 03:57
@patrickmac110 strings are immutable. calling .toUpperCase() doesnt change the string. it returns the uppercase version of that string
CamperBot
@camperbot
Aug 25 2015 03:57
if you want to thank someone, put an @ before their name!

function reverseString(str) {
return str;
}

reverseString('hello');
var string = ['hello' , 'Howdy', "Greetings from Earth"];

Haremantra
@haremantra
Aug 25 2015 03:58
thank you @xchelm !
CamperBot
@camperbot
Aug 25 2015 03:58
haremantra sends brownie points to @xchelm :sparkles: :thumbsup: :sparkles:
:star: 167 | @xchelm | http://www.freecodecamp.com/xchelm
DTing
@dting
Aug 25 2015 03:58
you want to replace the letters[m] element with the uppercase version right now you are just returning the uppercase version and not doing anything with it.
Xchel Hernandez
@xchelm
Aug 25 2015 03:58
@patrickmac110 your split call clogs the array
Patrick McWilliams
@patrickmac110
Aug 25 2015 03:58
Thanks again @dting letters[m] = letters[m].toUpperCase(); worked
CamperBot
@camperbot
Aug 25 2015 03:58
patrickmac110 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 658 | @dting | http://www.freecodecamp.com/dting
Eugeniu Botnaru
@ebv-gh
Aug 25 2015 03:58
OK, got it. It was embarrassingly easy.
Xchel Hernandez
@xchelm
Aug 25 2015 03:59
@rumpumpum I've done that so many times :/
@JCrawford1122
DTing
@dting
Aug 25 2015 03:59
@fritzkasala
<!--
this stuff is commented out
-->
This stuff is not.
Xchel Hernandez
@xchelm
Aug 25 2015 04:00
@oyp Hey, your answer is those green links on the side of the page
@oyp split reverse and join will help you :D
@xchelm thank you
CamperBot
@camperbot
Aug 25 2015 04:03
oyp sends brownie points to @xchelm :sparkles: :thumbsup: :sparkles:
:star: 168 | @xchelm | http://www.freecodecamp.com/xchelm
Justin Crawford
@JCrawford1122
Aug 25 2015 04:04
@oyp I'm fairly new at this, but you want to work inside your function. the variable your declaring outside of your function isn't going to do anything
Seth
@itzsaga
Aug 25 2015 04:05
Any idea why encodeURI is not working?
function newQuote() {
  var generatedQuote = quotes[Math.floor(Math.random() * quotes.length)];
  document.getElementById("randomQuote").innerHTML = generatedQuote;
  var tweetText = encodeURI(generatedQuote);
  var tweetLink = "https://twitter.com/intent/tweet?t=" + tweetText + "&via=itzsaga&related=itzsaga,FreeCodeCamp";
  document.getElementById("tweet").setAttribute("href",tweetLink).setAttribute("target","new");
}
newQuote();
@JCrawford1122 thank you
CamperBot
@camperbot
Aug 25 2015 04:05
oyp sends brownie points to @jcrawford1122 :sparkles: :thumbsup: :sparkles:
:star: 149 | @jcrawford1122 | http://www.freecodecamp.com/jcrawford1122
Justin Crawford
@JCrawford1122
Aug 25 2015 04:07
@oyp and to simplify the instructions, you must change the string to an array, reverse the array, then change it back to a string.
wontoan
@wontoan
Aug 25 2015 04:09
Can someone help with 'Arguments Optional' bonfire? I'm pretty sure I understand the 'arguments object' but what I don't get is how to write code that "waits for an argument".
(For example, add(2, 3) should return 5, and add(2) should return a function that is waiting for an argument so that var sum2And = add(2); return sum2And(3); // 5
CamperBot
@camperbot
Aug 25 2015 04:09
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Justin Crawford
@JCrawford1122
Aug 25 2015 04:09
The first Bonfires took me a long time too.
Justin Crawford
@JCrawford1122
Aug 25 2015 04:14
@oyp Are you having any luck?
DTing
@dting
Aug 25 2015 04:20
@wontoan you want to return a function
bf arguments optional
CamperBot
@camperbot
Aug 25 2015 04:20

:fire:Bonfire: Arguments Optional :link:

function add() {
  return false;
}

add(2,3);

Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.

more info:  bf details | bf links | hint

wontoan
@wontoan
Aug 25 2015 04:21
hmm..
I guess my problem is not knowing what to put within the parentheses for the function
DTing
@dting
Aug 25 2015 04:23
in javascript, functions can return functions:
function fn(greeting) {
  return function(name) {
    return greeting + name;
  };
}
@JCrawford1122 Not quite, but I added your advice in a commented out way so I'm going to go back to the links and more thoroughly go through the material
DTing
@dting
Aug 25 2015 04:24
then i could call:
var myGreeting = fn("hello ");
myGreeting("bob");
myGreeting("chris");
etc
I was reading and not understanding but clearly that won't do. @JCrawford1122
Justin Crawford
@JCrawford1122
Aug 25 2015 04:25
My problem was over thinking it
Oh i do have that habit
DTing
@dting
Aug 25 2015 04:25
@wontoan that challenge is to figure out when to return a function and when to return undefined and when to return a value
it came up a few times in completing waypoints
Justin Crawford
@JCrawford1122
Aug 25 2015 04:25
have you figured out how to convert the string to an array?
wontoan
@wontoan
Aug 25 2015 04:26
Yea I figured that much out but its the return a function part thats messing me up
all tests passed except those ones.
I understand the concept of recursion as well so I don't know what it is im missing.
a function that "waits for an argument"
ugh.. =[
DTing
@dting
Aug 25 2015 04:27
@wontoan post your code
i dont think this is recursive
wontoan
@wontoan
Aug 25 2015 04:29
function add(numbers) {

  var args = Array.prototype.slice.call(arguments);
  var subtotal;

  function addMore (additionalNumbers) {//function
    return subtotal + arguments[1];
  }

  function sumAll (previousValue, currentValue) {//reduce
    if (typeof previousValue !== "number" || typeof currentValue !== "number") {
      return undefined;
    } else {
    return previousValue + currentValue;
    }
  }

  function isANumber (value) {//filter
    if (typeof value !=="number") {
      return undefined;
    } else {
      return value;
    }
  }

  if(typeof numbers !== "number") {
    return undefined;
  } else if (args.length > 1) {    
    return args.reduce(sumAll); 
  } else {//args.length < 1
    subtotal = args[0];
    //return add(subtotal, arguments[1]);
  }


}

add(2, 3);
DTing
@dting
Aug 25 2015 04:29
wontoan
@wontoan
Aug 25 2015 04:30
don't mind the function addMore
DTing
@dting
Aug 25 2015 04:31
@wontoan in that else statement you want to return a function that also checks if the argument it is passed is a number
wontoan
@wontoan
Aug 25 2015 04:31
thats the exact part im stuck on
DTing
@dting
Aug 25 2015 04:32
you are really close
wontoan
@wontoan
Aug 25 2015 04:32
i know T_T"
DTing
@dting
Aug 25 2015 04:32
you just need to return addMore
and change addMore a little bit
wontoan
@wontoan
Aug 25 2015 04:32
hmm...
DTing
@dting
Aug 25 2015 04:33
your addMore function takes an argument but you aren't using it
you should be using it
wontoan
@wontoan
Aug 25 2015 04:33
!
DTing
@dting
Aug 25 2015 04:34
@wontoan also this isn't always right.
else if (args.length > 1) {    
    return args.reduce(sumAll);
i think you are overthinking it. you are on the right mindset but this is simplier than that. just assume 2 arguments at most
oh actually nm your function there works
wontoan
@wontoan
Aug 25 2015 04:35
:P
DTing
@dting
Aug 25 2015 04:35
i guess you just need to type check your arguemnt for addMore and use it
wontoan
@wontoan
Aug 25 2015 04:36
I don't think I should be using addMore
expect(add(2)(3)).to.equal(5);add(...) is not a function
DTing
@dting
Aug 25 2015 04:37
else {//args.length < 1
    subtotal = args[0];
    return addMore;
  }
Yawar Jamal
@yj7o5
Aug 25 2015 04:37
can anyone give hints on this
```
function sumAll(arr) {
  return arr.reduce(function(acc, cur, _, a){
    a.push();
  }, Math.min(arr[0], arr[1]));
}
function createArr(strt, end) {

}
sumAll([1, 4]);
wontoan
@wontoan
Aug 25 2015 04:37
@dting whoaaa
Justin Crawford
@JCrawford1122
Aug 25 2015 04:38
@yj7o5 is that comma supposed to be before the Math.min
DTing
@dting
Aug 25 2015 04:39
you could have also returned an anonymous function like this:
else {//args.length < 1
    return function(v) {
      if (typeof v !== 'number') return undefined;
      return args[0] + v;
    }
  }
Yawar Jamal
@yj7o5
Aug 25 2015 04:39
yes its the second optional parameter that reduce function allows; its the starting value
wontoan
@wontoan
Aug 25 2015 04:39
anonymous functions
omgg
It works now.
DTing
@dting
Aug 25 2015 04:40
@wontoan cool
wontoan
@wontoan
Aug 25 2015 04:40
Omg. thanks @dting
CamperBot
@camperbot
Aug 25 2015 04:40
wontoan sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 662 | @dting | http://www.freecodecamp.com/dting
wontoan
@wontoan
Aug 25 2015 04:40
I've gotta go refresh my memory on that
Yawar Jamal
@yj7o5
Aug 25 2015 04:40
@dting can u look over that problem
DTing
@dting
Aug 25 2015 04:41
@yj7o5 you probably shouldn't be using arr.reduce
you can but it's not very natural in that problem
DrakeMikels
@DrakeMikels
Aug 25 2015 04:42
This message was deleted
Erica
@Buzzlightyear90
Aug 25 2015 04:42
I need help ..... again
DTing
@dting
Aug 25 2015 04:42
did you solve it using an imperative for loop?
Erica
@Buzzlightyear90
Aug 25 2015 04:42
I am on the chunky monkey problem
here is my code ```
function chunk(arr, size) {
  var outArray = [];
  var inArray = [];
  var newArray = [];

  var counter = 0;
  for (var i = 0; i < arr.length; i++){
    if(counter > size){
        newArray.push(inArray);
        counter = 0;
    }else{
        inArray.push(arr[i]);
    }
    counter ++;

    outArray.push(newArray);
  }
  return outArray;
}


chunk(['a', 'b', 'c', 'd', 'g', 'v'], 2);
DTing
@dting
Aug 25 2015 04:42
@DrakeMikels 1 < 5 is always true
Erica
@Buzzlightyear90
Aug 25 2015 04:43
I know nothing works in that code and is very wrong
I am tired of creating new Arrays
DrakeMikels
@DrakeMikels
Aug 25 2015 04:43
@dting Thanks I placed a 1 instead of i which created the issue. Thank you! for looking
CamperBot
@camperbot
Aug 25 2015 04:43
drakemikels sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 663 | @dting | http://www.freecodecamp.com/dting
Davis
@ajdavis56
Aug 25 2015 04:44
can someone help with the font awesome script for the freeCodeCamp logo?
Erica
@Buzzlightyear90
Aug 25 2015 04:44
Anyone can at least help on what I am doing wrong?
Justin Crawford
@JCrawford1122
Aug 25 2015 04:47
I haven't done that one yet
DTing
@dting
Aug 25 2015 04:47
@Buzzlightyear90 you just keep pushing items into your inArray
Justin Crawford
@JCrawford1122
Aug 25 2015 04:47
bf chunky monkey
CamperBot
@camperbot
Aug 25 2015 04:47

:fire:Bonfire: Chunky Monkey :link:

function chunk(arr, size) {
  // Break it up.
  return arr;
}

chunk(['a', 'b', 'c', 'd'], 2);

Write a function that splits an array (first argument) into groups the length of size (second argument) and returns them as a multidimensional array.

more info:  bf details | bf links | hint

DTing
@dting
Aug 25 2015 04:48
function chunk(arr, size) {
  var outArray = [];
  var inArray = [];
  var newArray = [];

  var counter = 0;
  for (var i = 0; i < arr.length; i++){
    if(counter > size){
        newArray.push(inArray);
        counter = 0;
       // what is inArray here each time? try console.log(inArray); here
    }else{
        inArray.push(arr[i]);
    }
    counter ++;

    outArray.push(newArray);
  }
  return outArray;
}
Lightwaves
@Lightwaves
Aug 25 2015 04:48
@camperbot no women will give you details on their bf sorry.
DTing
@dting
Aug 25 2015 04:49
also you are pushing inArray into newArray.
Erica
@Buzzlightyear90
Aug 25 2015 04:49
I console.log and it outputs a b c
DTing
@dting
Aug 25 2015 04:50
console.log it before you return outArray
Erica
@Buzzlightyear90
Aug 25 2015 04:53
I am trying out more things like check the length of inArray is less than 3 instead of counter
DTing
@dting
Aug 25 2015 04:57
@Buzzlightyear90 counter is fine. the problem you have is that you push inArray some where but you just keep adding stuff to it
Justin Crawford
@JCrawford1122
Aug 25 2015 04:58
I just finished Repeat a string. Could anyone give me advice on how I could do it better?
function repeat(str, num) {
  var string1 = '';
  var string2 = '';
  if(num > 0){
   string1 = str.repeat(num);
    return string1;
  }
  else {
    return string2;

  }
}



repeat('abc', 3);
DTing
@dting
Aug 25 2015 04:58
@Buzzlightyear90 look at this example:
var a = [];
var b = [];
var c = [];
var d = []

b.push(a);
a.push(1);
c.push(a);
a.push(2);
d.push(a);
a.push(3);
what do each of these variables look like?
@JCrawford1122 you declare some extra variables that you dont really need:
function repeat(str, num) {
  if(num > 0){
    return str.repeat(num);
  }
  else {
    return str;
  }
}
repeat('abc', 3);
Justin Crawford
@JCrawford1122
Aug 25 2015 05:01
@dting Thanks
CamperBot
@camperbot
Aug 25 2015 05:01
jcrawford1122 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 664 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 25 2015 05:01
or:
function repeat(str, num) {
  return num > 0 ? str.repeat(num) : str;
}
Justin Crawford
@JCrawford1122
Aug 25 2015 05:02
Will those return an empty string if num < 0?
DTing
@dting
Aug 25 2015 05:02
or:
function repeat(str, num) {
  if (num > 0) {
    return str.repeat(num);
  }
  return str;
}
they would just return the string like your example
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:14
Below is my code to determine if a string is palindrome or not. Please help me on where did i go wrong.
function palindrome(str) {
  // Good luck!
var str_arr = str.toLowerCase().split('');
var str_arr_rev = str.toLowerCase().split('').reverse();
 var str_new="", str_rev = ""; 
  for(var i = 0;i<str_arr.length;i++)
    {
      if(str_arr[i].charCodeAt()>96||str_arr[i].charCodeAt()<123)
        {
          console.log(i+" "+ str_arr[i].charCodeAt());
           str_new +=str_arr[i];

        }
      if(str_arr_rev[i].charCodeAt()>96||str_arr_rev[i].charCodeAt()<123)
        {
           str_rev += str_arr_rev[i];
        }   

    }
//console.log("value is "+str_new);
//console.log(str_rev);
  return str_new == str_rev;
}

palindrome("race car");
@JCrawford1122 can you please help me on this
DTing
@dting
Aug 25 2015 05:18
@yashaswiyogeshwara you are doing array == array
oh nm hmm
@yashaswiyogeshwara you want to change your if's to be && rather than ||
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:18

there are not arrays

if i am not wrong i am adding them as string s @dting

DTing
@dting
Aug 25 2015 05:19
you want the charCode to be both greater than 96 and less than 123
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:20
yes so that i will eliminate all the other charachters
DTing
@dting
Aug 25 2015 05:20
right now you are checking for or instead of and
Xchel Hernandez
@xchelm
Aug 25 2015 05:21
@yashaswiyogeshwara yo! I had trouble on this one until I removed the puncation...
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:21
that is why i've taken care of that using ascii codes @xchelm
however that is not working i dont know where did i go wrong @xchelm
DTing
@dting
Aug 25 2015 05:22
@yashaswiyogeshwara and you want to check for charCodeAt(0) range 65 to 90
since you are checking lower case a-z
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:22
yeah @dting
DTing
@dting
Aug 25 2015 05:23
you want to check for str_arr.charCodeAt(0)>= 65 && str_arr.charCodeAt(0) <= 90
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:23
thanks @dting
CamperBot
@camperbot
Aug 25 2015 05:23
yashaswiyogeshwara sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 666 | @dting | http://www.freecodecamp.com/dting
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:23
gotit
thankyou very much @dting
atlast passed the challenge
Xchel Hernandez
@xchelm
Aug 25 2015 05:25
@yashaswiyogeshwara I did it a little simpler - I would think of it as lowercase, remove punctionation split (reverse if it's the second string) and join
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:26
@xchelm i was trying to remove all the charachters other than just punctuation and there by make the code more dynamic.
Xchel Hernandez
@xchelm
Aug 25 2015 05:28
@yashaswiyogeshwara your code is dynamic - I did it wrong then - i programmed to get it done
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 25 2015 05:30
@xchelm thanks if its a compliment
CamperBot
@camperbot
Aug 25 2015 05:30
yashaswiyogeshwara sends brownie points to @xchelm :sparkles: :thumbsup: :sparkles:
:star: 175 | @xchelm | http://www.freecodecamp.com/xchelm
Lightwaves
@Lightwaves
Aug 25 2015 05:32

For everyone finding themselves in front of a unix terminal a cautionary tale from a book I'm reading haha.

"in the winter of 1998, we’d been hit with a series of three smaller, random events—the first of which would threaten the future of Pixar.
To understand this first event, you need to know that we rely on Unix and Linux machines to store the thousands of computer files that comprise all the shots of any given film. And on those machines, there is a command—/bin/rm -r -f *—that removes everything on the file system as fast as it can. Hearing that, you can probably anticipate what’s coming: Somehow, by accident, someone used this command on the drives where the Toy Story 2 files were kept. Not just some of the files, either. All of the data that made up the pictures, from objects to backgrounds, from lighting to shading, was dumped out of the system."

I just about died reading this considering I've been using mv, cp and rm quite a bit it's like if I'm using a wildcard and I miss a few extra letters ... bye bye data

DTing
@dting
Aug 25 2015 05:32
@xchelm i found @yashaswiyogeshwara pretty interesting but i opted for the str.replace function
Lightwaves
@Lightwaves
Aug 25 2015 05:35
rm -rf recursively goes through the tree of folders and deletes the folders and the files within the folders.
the * is a wildcard which matches anything so essentially they just ran a command that completely nuked their computer
everything on that hard drive gone
whoops meant to post this in general
Paweł
@ridlez
Aug 25 2015 05:49
hi guys, does anyone know why in bootstrap when i make navigation button (the menu button) i does not work? I tried 2 different codes I even tried code from other portfolios on codepen which works on their pen, but on my pen it never works it is not responsive
when I mouse over the menu it does not highlight, yesterday I tried other people code and it didn't work either, yet on their pens it worked perfectly
ok i have one mistake, in div class"collape" instead of "collapse" but now it work but is not clickable..
DTing
@dting
Aug 25 2015 06:02
@ridlez did you load the bootstrap js?
Cory Johnson
@CygnusSW
Aug 25 2015 06:07
Anybody have issues in code pen with using http requests? Looks like the cross-domain thing might be messing with me
DTing
@dting
Aug 25 2015 06:08
@Cory2911 you probably need to use jsonp
are you working on something in particular?
Cory Johnson
@CygnusSW
Aug 25 2015 06:09
the zipline for random quotes
using the forismatic api
Using this code, but getting Access-Control-Allow-Origin error
$(document).ready(function(){
  var xhr = new XMLHttpRequest();
  xhr.open('GET', "http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en", true);
  xhr.send();
)}
is the query formatted incorrectly, maybe?
Paweł
@ridlez
Aug 25 2015 06:12
@dting I thing so, I did something with libraries yesterday that worked but I can't remember what was it :(
and i uploaded everything like in zipline tutorial
DTing
@dting
Aug 25 2015 06:13
@ridlez i made a demo for using jsonp http://codepen.io/dting/pen/PqrZgb
for that api
Cory Johnson
@CygnusSW
Aug 25 2015 06:14
Thanks! That helps a lot
CamperBot
@camperbot
Aug 25 2015 06:14
if you want to thank someone, put an @ before their name!
Cory Johnson
@CygnusSW
Aug 25 2015 06:14
@dting thanks, for the help!
CamperBot
@camperbot
Aug 25 2015 06:14
cory2911 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 669 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 25 2015 06:22
np
Mbos95
@Mbos95
Aug 25 2015 06:33
Hey guys. I am having trouble with an assigment in Basic Javascript! It is Waypoint: Use Bracket Notation to Find the Nth Character in a String
I don't get the assignment or what I need to do. Can someone give me an quick example and an little explanation. It would be really really appreciated
DTing
@dting
Aug 25 2015 06:36

@Mbos95

Let's try to set thirdLetterOfLastNameto equal the third letter of the lastName variable.

do you know how to get the third letter of the lastName variable?
Mbos95
@Mbos95
Aug 25 2015 06:37
no not really.
I took a break for like.. 2-3 days and now I am totally lost :D
var thirdLetterOfLastName = lastName[4];
is that it ?
oh wait! var thirdLetterOfLastName = lastName[2];
I think I figured it out. Thanks @dting
CamperBot
@camperbot
Aug 25 2015 06:41
mbos95 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 673 | @dting | http://www.freecodecamp.com/dting
Mbos95
@Mbos95
Aug 25 2015 06:41
Sometimes you just need someone to requote the assignment. sometimes it gets more clear
DTing
@dting
Aug 25 2015 06:47
@Mbos95 nice!
lol
Michael Bomholt
@bomholtm
Aug 25 2015 06:57
hey everyone. iam building my portfolio project and im stuck. everything is just hard right now :(. one problem i trying to solve for a long time now is to display the correctly on mobile tablet and desktop
the menu button is just tiny on mobile and i can figure it out
later i just want to have this menu on tablet and mobile and another menu for large screen sizes
Mbos95
@Mbos95
Aug 25 2015 06:58
I can't really help you, for I have less knowledge then you. but I like your design!
Michael Bomholt
@bomholtm
Aug 25 2015 06:59
haha thanks its a long way :P before it will be a real design ^^
CamperBot
@camperbot
Aug 25 2015 06:59
if you want to thank someone, put an @ before their name!
Mbos95
@Mbos95
Aug 25 2015 06:59
for me, you're an programming god right6 now
nothing to do about that.
Jesse Rafael Dizon
@jesserafael
Aug 25 2015 07:00
hello, Can anybody tell me what the result would be for this code
var a = []
a.length;
Mbos95
@Mbos95
Aug 25 2015 07:00
in your CSS there is @media... Is that for the javascript?
Michael Bomholt
@bomholtm
Aug 25 2015 07:00
its my first site ever .. just did some html pages as a kid :)
ehm no thats my problem i think @Mbos95 this stuff is for foundation an alternative to bootstrap
Bianca Mihai
@biancamihai
Aug 25 2015 07:00
@jesserafael should be 0 because it is an empty array
Michael Bomholt
@bomholtm
Aug 25 2015 07:01
it makes the website responsive but i never really used it before =)
Mbos95
@Mbos95
Aug 25 2015 07:01
Hmm oke. Well I used bootstrap to make an website
it is so ugly :D it is weird as can be xD
But that has nothing to do with bootstrap. mainly with my skills
Michael Bomholt
@bomholtm
Aug 25 2015 07:02
haha arent we all here to improve those
Mbos95
@Mbos95
Aug 25 2015 07:02
That is true!
but I already did the codecademy tutorials of PhP,Javascript and html&css
and now im here.. :D
Michael Bomholt
@bomholtm
Aug 25 2015 07:02
for me its the same.. i think i really suck
Jesse Rafael Dizon
@jesserafael
Aug 25 2015 07:02
thanks @biancamihai
CamperBot
@camperbot
Aug 25 2015 07:02
jesserafael sends brownie points to @biancamihai :sparkles: :thumbsup: :sparkles:
:star: 239 | @biancamihai | http://www.freecodecamp.com/biancamihai
Mbos95
@Mbos95
Aug 25 2015 07:03
I like your menu alot, bomholt
Michael Bomholt
@bomholtm
Aug 25 2015 07:03
want to do this kind of menu for tablet and mobile and another for desktop
now it works like i want it to for desktop and tablet
but for mobile the button is to small
Mbos95
@Mbos95
Aug 25 2015 07:03
yea, I have literally no idea how to works yet. I'll be quiet so that people can red it :D
Michael Bomholt
@bomholtm
Aug 25 2015 07:05
:D you dont have to. enjoying the chat. my head feels like exploding as i tried the same thing for 3 hours :D
Tahmid Zahin
@Zahin-10
Aug 25 2015 07:05
Can anyone tell me where can i find "freecodecamp" icon like font awesome ???
Paweł
@ridlez
Aug 25 2015 07:08
@bomholt how did you uploaded librarier on codepen?
libraries*
my menu button does not work yet I know the code is good
@bomholt do you use div class"container" maybe this has something to do with that
Mbos95
@Mbos95
Aug 25 2015 07:12
@bomholt haha I know that feeling. when you get stuck it can be so frustrating. but when you figure it out! SO REWARDING WOOHOO
@ridlez click the "gear" in the js window
@ridlez then click quick add and click bootstrap
i think you are using bootstrap from code you posted earlier
Paweł
@ridlez
Aug 25 2015 07:16
yes yes I do but I do have in js window bootstrap and jquery and also in css bootstrap and it does not work properly still :D
when i use someone's codepan it works, but when I copy his code into my account it breaks
DTing
@dting
Aug 25 2015 07:22
@ridlez link me your codepen
Tahmid Zahin
@Zahin-10
Aug 25 2015 07:22
Thanks @dting
CamperBot
@camperbot
Aug 25 2015 07:22
zahin-10 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 678 | @dting | http://www.freecodecamp.com/dting
Michael Bomholt
@bomholtm
Aug 25 2015 07:24
@ridlez i use foundation instead of javascript
odera24
@odera24
Aug 25 2015 07:24
@dting thanks so much!
CamperBot
@camperbot
Aug 25 2015 07:24
odera24 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 679 | @dting | http://www.freecodecamp.com/dting
Paweł
@ridlez
Aug 25 2015 07:27
@bomholt maybe try giving it different classes for button in bootstrap?
DTing
@dting
Aug 25 2015 07:27
@ridlez your data-target is off
<button class="navbar-toggle" data-toggle="collapse" data-target="#navHeaderCollapse"> you have that
you need <button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
Michael Bomholt
@bomholtm
Aug 25 2015 07:29
@ridlez ehh instead of javascript lol... i mean i use foundation instead of bootstrap =)
sorry my head is pure jelly =)
Paweł
@ridlez
Aug 25 2015 07:30
@dting thank you so much!
CamperBot
@camperbot
Aug 25 2015 07:30
ridlez sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 680 | @dting | http://www.freecodecamp.com/dting
Michael Bomholt
@bomholtm
Aug 25 2015 07:30
trying to figure out why my mobile version does the stuff it does
Mbos95
@Mbos95
Aug 25 2015 07:32
bomholt, you use the browser tester thingy to see if it works ?
Michael Bomholt
@bomholtm
Aug 25 2015 07:33
yea i do
Mbos95
@Mbos95
Aug 25 2015 07:33
oke :) never knew that existed before I looked at your codepen and somehow ended up that page
Michael Bomholt
@bomholtm
Aug 25 2015 07:34
i use chromium dev tools. no idea if there is a better method :D
haha you visited my codepen and got into dev tools? thats weired :D
-e
i also use my mobile phone to check it. and it runs fine in every of my browsers
it runs fine on tablet according to dev tools
and the mobile version scales down to much dont know why
Mbos95
@Mbos95
Aug 25 2015 07:36
Oh you'll be surprised how I end up on certain websites xD click click click.. I went from codepen to the year numbers of the Sony company
Michael Bomholt
@bomholtm
Aug 25 2015 07:36
:D hahaha
Mbos95
@Mbos95
Aug 25 2015 07:38
Hmm.. bomholt. you can try to summon the almighty @dting to help you with this
he is helpful in many ways! :)
DTing
@dting
Aug 25 2015 07:39
i'm not much help with foundation. =P
Mbos95
@Mbos95
Aug 25 2015 07:39
awh oke
Michael Bomholt
@bomholtm
Aug 25 2015 07:42
yea everybody here seems to use bootsrap. maybe i should too
Michael Bomholt
@bomholtm
Aug 25 2015 07:43
but foundation is somehow more appealing to me
Mbos95
@Mbos95
Aug 25 2015 07:43
well, I suggest trying some other ways first. Maybe after that it'll click in that brain of yours!
If you don't get it, keep practicing. everything gets easy once you know it
Luxan Suthaharan
@luxan14
Aug 25 2015 07:45
Struck on Bonfire: Return Largest Numbers in Arrays. Need help?
Michael Bomholt
@bomholtm
Aug 25 2015 07:45
thanks @Mbos95 for the encouraging words
CamperBot
@camperbot
Aug 25 2015 07:45
bomholt sends brownie points to @mbos95 :sparkles: :thumbsup: :sparkles:
:star: 146 | @mbos95 | http://www.freecodecamp.com/mbos95
Nikola Vuksanovic
@NikolaVuksanovic
Aug 25 2015 07:45
I'm just about to start the first bonfire
Michael Bomholt
@bomholtm
Aug 25 2015 07:45
@dting do you think its for sure a foundation problem?
Luxan Suthaharan
@luxan14
Aug 25 2015 07:47
any suggestion on how to do that! ?
DTing
@dting
Aug 25 2015 07:48
@bomholt are you saying the collapsed menu button is too small?
Michael Bomholt
@bomholtm
Aug 25 2015 07:52
@dting yea on mobile
on tablet it is like i want it too according to dev tools
and on desktop i may go with a completly other menu
if not the size is okay
its just that mobile scales it down to much... in dev tools and on my phone
DTing
@dting
Aug 25 2015 07:56
hmm
Michael Bomholt
@bomholtm
Aug 25 2015 07:57
im not sure its because of foundation but it should be
maybe try to go in some foundation chatroom
DTing
@dting
Aug 25 2015 07:58
@bomholt ya i feel like thats a foundation thing but i can't easily find an answer online.
CamperBot
@camperbot
Aug 25 2015 07:58
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
DTing
@dting
Aug 25 2015 07:58
thats one benefit of bootstrap so many people use it there are answers for everything haha
Michael Bomholt
@bomholtm
Aug 25 2015 07:58
yea clearly an advantage of bootstrap
way bigger community
ahmeddin
@ahmeddin
Aug 25 2015 08:11
hi folx
<code>var string = str.replace(/&/g,'&amp').replace(/</g,'&lt').replace(/>/g,'&gt').replace(/"/g,'&quot').replace(/'/g,'&apos');</code>
is this wrong??
hey bot..........at least u can reply :D
Michael Bomholt
@bomholtm
Aug 25 2015 08:15
@ahmeddin type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom i can also do that :P
CamperBot
@camperbot
Aug 25 2015 08:15
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Michael Bomholt
@bomholtm
Aug 25 2015 08:16
you should at least post a link to your bonfire
ahmeddin
@ahmeddin
Aug 25 2015 08:17
convert to html entities
DTing
@dting
Aug 25 2015 08:17
@ahmeddin you are missing the ; after each thing &apos;
help formatting
CamperBot
@camperbot
Aug 25 2015 08:17

:point_right: code formatting [wiki]

Inline code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

Code Block

``` ⇦ Type 3 backticks, then press [shift + enter ⏎]

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Michael Bomholt
@bomholtm
Aug 25 2015 08:19
haha seems like @dting is the most helpful user out here :shipit:
man you should learn some foundation :P
DTing
@dting
Aug 25 2015 08:19
hah
ahmeddin
@ahmeddin
Aug 25 2015 08:21
@dting u see i am chaining function call with . dot, only at last i put ;
DTing
@dting
Aug 25 2015 08:21
@ahmeddin no i mean you want to replace it with "&amp;"
not "&amp"
ahmeddin
@ahmeddin
Aug 25 2015 08:22
no, it is an argument
ok...got what u mean
DTing
@dting
Aug 25 2015 08:23
@ahmeddin literally:
var string = str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&apos;');
ahmeddin
@ahmeddin
Aug 25 2015 08:23
ok got that...my bad...
i might have come of as rude....
DTing
@dting
Aug 25 2015 08:23
np
ahmeddin
@ahmeddin
Aug 25 2015 08:24
and actually html entity is like &quot[;] not &quot
DTing
@dting
Aug 25 2015 08:24
you got it
ahmeddin
@ahmeddin
Aug 25 2015 08:24
thanx
CamperBot
@camperbot
Aug 25 2015 08:24
if you want to thank someone, put an @ before their name!
DTing
@dting
Aug 25 2015 08:25
@luxan14 did you still need help?
ahmeddin
@ahmeddin
Aug 25 2015 08:25
@camperbot thanx :D
CamperBot
@camperbot
Aug 25 2015 08:25
ahmeddin sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 94 | @camperbot | http://www.freecodecamp.com/camperbot
Stein Gee
@Stiino0
Aug 25 2015 08:36
Hey guys, can anyone tell me why my h1 aren't getting smaller and are exceeding my container class in bootstrap? First Zipline. http://codepen.io/Stiino0/pen/rVgqNP/?editors=110
They stack when too small however they still exceed... oh and the preview isn't loading my imported fonts apparently!
Saad
@Saad-Bashar
Aug 25 2015 08:39
hey guys in the jQuery 1st lesson, it says that I need to make a script element. What should I do? Help please!
Stein Gee
@Stiino0
Aug 25 2015 08:41
Hi @Saad-Bashar I think they mean you need to put <script></script>
above the other code so that you can input the JQuery code.
Saad
@Saad-Bashar
Aug 25 2015 08:42
I did that
hey thanks
CamperBot
@camperbot
Aug 25 2015 08:42
if you want to thank someone, put an @ before their name!
Saad
@Saad-Bashar
Aug 25 2015 08:42
the problem was I write the type = "text/javascript"!
Stein Gee
@Stiino0
Aug 25 2015 08:45
Normally that shouldn't give an error, but you usually use the text/javascript when linking a script instead of using inline script tags
DTing
@dting
Aug 25 2015 08:46
@Stiino0
@import url("//fonts.googleapis.com/css?family=Indie+Flower");
@import url("//fonts.googleapis.com/css?family=Lato:400,400italic");
that will make your fonts work in the preview too
Stein Gee
@Stiino0
Aug 25 2015 08:47
so just wrap it in double quotes?
DTing
@dting
Aug 25 2015 08:47
no remove the http: also
Stein Gee
@Stiino0
Aug 25 2015 08:48
allright th x, did that
@dting do you have any idea why the h1 is exceeding my container? I don't really know Bootstrap that good :s been looking for hours now, don't want to continue untill this is resolved :(
DTing
@dting
Aug 25 2015 08:50
what do you want it to do?
Saad
@Saad-Bashar
Aug 25 2015 08:50
so these classes that we use, like animated bounce, animated shake... they are already in bootstrap css. Right?
DTing
@dting
Aug 25 2015 08:50
they are part of animate.css
Saad
@Saad-Bashar
Aug 25 2015 08:51
animate.css is a part of bootstrap?
DTing
@dting
Aug 25 2015 08:51
no they loaded it separately
Saad
@Saad-Bashar
Aug 25 2015 08:51
so if I want to use animate.css ... where can I find that?
Stein Gee
@Stiino0
Aug 25 2015 08:52
is it from animate.css? I thought that JQuery did the animations
Saad
@Saad-Bashar
Aug 25 2015 08:52
yea its from that css file
Stein Gee
@Stiino0
Aug 25 2015 08:52
@dting I want it to not exceed my container but adjust when I resize my window?
Saad
@Saad-Bashar
Aug 25 2015 08:53
Jquery is just adding the class from that css file
Stein Gee
@Stiino0
Aug 25 2015 08:54
oh I didn't know that!
Saad
@Saad-Bashar
Aug 25 2015 08:55
go to that link that dting gave me :D it's pretty fun :smile:
Stein Gee
@Stiino0
Aug 25 2015 08:55
I did :D
I'll look it up, but isn't Bootstrap going to fix this for me? After all, that's why I need to use Bootstrap... to setup this website easily and fast?!
Because the example portfolio that we need to follow has this, no issues there
DTing
@dting
Aug 25 2015 08:59
@Stiino0 bootstrap isnt fixing his font sizes either. hes using https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
Stein Gee
@Stiino0
Aug 25 2015 09:02
Aren't media queries a part of Bootstrap? I really don't get why it is that appealing if I still have to manually add media queries. I thought they were put in Bootstrap by default? add classes = responsive website??
DTing
@dting
Aug 25 2015 09:04
people usually dont want fonts to scale.
so that's the default
Stein Gee
@Stiino0
Aug 25 2015 09:06
mkay then
the H1 tags aren't even contained in my container
Abdul Rafay Khan
@khanrafay
Aug 25 2015 09:07
Hello, i am stuck in some kitty ipsm text, i don't know i have typed all text in but still cannot go to next challenge.
Stein Gee
@Stiino0
Aug 25 2015 09:07
But I don't think thats what people want by default, I'm probably doing something wrong here
Luxan Suthaharan
@luxan14
Aug 25 2015 09:08
@dting
function largestOfFour(arr) {
  // You can do this!
  for (var i = 0; i < arr.length; i++){
    for(var j = 0; j < arr[i].length; j++){
      return arr[i][j];
    }
  }
}


largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
this code isn't working! ?
DTing
@dting
Aug 25 2015 09:08
@luxan14 you will only ever look at the first element and return that element
first element of the first array
Stein Gee
@Stiino0
Aug 25 2015 09:09
But that's maybe because of the "long" H1 text
probably
DTing
@dting
Aug 25 2015 09:09
@khanrafay link your code
Luxan Suthaharan
@luxan14
Aug 25 2015 09:09
@dting u mean this array
[4, 5, 1, 3]
Abdul Rafay Khan
@khanrafay
Aug 25 2015 09:10
@dting Its done thanks.
CamperBot
@camperbot
Aug 25 2015 09:10
khanrafay sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 684 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 25 2015 09:10
@luxan14 you need to return an array with 4 numbers the max of each of the 4 arrays. right now your code will enter the first for loop. enter the nested for loop and return arr[0][0]
Luxan Suthaharan
@luxan14
Aug 25 2015 09:11
@dting Yeah!, It's printing the number 4 only!
what do i need to do to print all the max numbers in each of the 4 arrays?
Luxan Suthaharan
@luxan14
Aug 25 2015 09:15
@dting Thanks! :smile:
CamperBot
@camperbot
Aug 25 2015 09:15
luxan14 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 685 | @dting | http://www.freecodecamp.com/dting
Luxan Suthaharan
@luxan14
Aug 25 2015 09:16
@dting i'm so pissed off by this.. bt u saved me! :+1: :smile:
again thanks for ur help
CamperBot
@camperbot
Aug 25 2015 09:17
if you want to thank someone, put an @ before their name!
Stein Gee
@Stiino0
Aug 25 2015 09:19
@dting thanks for the help with my Zipline as well :)
CamperBot
@camperbot
Aug 25 2015 09:19
stiino0 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 686 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 25 2015 09:20
my pleasure =)
Jon Deng
@dengjonathan
Aug 25 2015 09:37
hi wondering if somebody wouldn't mind helping with javascript waypoint- slot machine
'''
CamperBot
@camperbot
Aug 25 2015 09:37
:bulb: to format code use backticks! ``` more info
Remus Cicu
@RemusAndrei
Aug 25 2015 09:37
@dengjonathan try posting your code
Jon Deng
@dengjonathan
Aug 25 2015 09:37
''' slotOne = Math.floor(Math.random() (3 - 1 + 1)) + 1;
slotTwo = Math.floor(Math.random()
(3 - 1 + 1)) + 1;
slotThree = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
$(".logger").html("");
$(".logger").html("Not A Win")
$($('.slot')[0]).html(slotOne);
$($('.slot')[1]).html(slotTwo);
$($('.slot')[2]).html(slotThree);
'''
CamperBot
@camperbot
Aug 25 2015 09:37
:bulb: to format code use backticks! ``` more info
Jon Deng
@dengjonathan
Aug 25 2015 09:38
the slot machine shows the numbers
however am missing this checkpoint: You should have used the the selector given in the description to select each slot and assign it the value of slotOne, slotTwo and slotThree respectively
Remus Cicu
@RemusAndrei
Aug 25 2015 09:41
hmm , don’t seem to bee any problem
Jon Deng
@dengjonathan
Aug 25 2015 09:42
@RemusAndrei thanks for looking
CamperBot
@camperbot
Aug 25 2015 09:42
dengjonathan sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:star: 185 | @remusandrei | http://www.freecodecamp.com/remusandrei
Jon Deng
@dengjonathan
Aug 25 2015 09:42
yeah the jquery line is exactly the same as example
and the numbers do populate in the slotmachine output
Saad
@Saad-Bashar
Aug 25 2015 09:43
$(".well:target:nth-child(2)").addClass("animated bounce"); what's wrong here?
duub qnnp
@duub
Aug 25 2015 09:45
@Saad-Bashar I don't anything wrong can you give me the name of the exercise to check mine
Teejay Parker
@TeejayParker
Aug 25 2015 09:52
This message was deleted
Saad
@Saad-Bashar
Aug 25 2015 09:55
target-a-specific-child-of-an-element-using-jquery... this one @dengjonathan
Remus Cicu
@RemusAndrei
Aug 25 2015 09:56
@Saad-Bashar $(“#right-well :nth-child(2)").addClass("animated shake");
i think this was the corect answer
Saad
@Saad-Bashar
Aug 25 2015 09:57
why right well..it says that every well :/
duub qnnp
@duub
Aug 25 2015 09:58
for me worked with this: $(".target:nth-child(2)").addClass("animated bounce");
but now that I read it… has no sense it worked...
Saad
@Saad-Bashar
Aug 25 2015 09:59
Make the second child in each of your well elements bounce. this is the instruction right?
Remus Cicu
@RemusAndrei
Aug 25 2015 09:59
@Saad-Bashar $(“.well ").addClass("animated shake");
this should be for every well
and it was bounce not shake
$(“.well :nth-child(2) ").addClass("animated bounce");
duub qnnp
@duub
Aug 25 2015 10:01
@RemusAndrei it should work your answer but it doesn’t work to me...
Saad
@Saad-Bashar
Aug 25 2015 10:01
blob
duub qnnp
@duub
Aug 25 2015 10:02
@Saad-Bashar have you tried the .target class?
maybe has a bugg
Remus Cicu
@RemusAndrei
Aug 25 2015 10:02
do you have space between "well" and “:nth" ?
Saad
@Saad-Bashar
Aug 25 2015 10:04
yes! it works now :D I did not give the space. Thanks @RemusAndrei and @duub . btw it is actually bounce not shake
CamperBot
@camperbot
Aug 25 2015 10:04
saad-bashar sends brownie points to @remusandrei and @duub :sparkles: :thumbsup: :sparkles:
:star: 178 | @duub | http://www.freecodecamp.com/duub
:star: 186 | @remusandrei | http://www.freecodecamp.com/remusandrei
Remus Cicu
@RemusAndrei
Aug 25 2015 10:04
@Saad-Bashar for nothing :) and keep up the good work
duub qnnp
@duub
Aug 25 2015 10:19
@RemusAndrei @Saad-Bashar I think now I understand more how it works!
“.well :nth-child(2)” means the 2nd child in a ".well"
“.target:nth-child(2)” means “.target" that are 2nd childs
the difference between this two examples is in the space between the class and the :nth-child, (only in the first one)
that’s why both solutions worked
duub qnnp
@duub
Aug 25 2015 10:26
I’m finding difficult to make the portfolio exercise, someone can share his/her own to have another reference?
I think that I need to learn more bootstrap to it.
to do it
Dennis Andersson
@deandersson
Aug 25 2015 10:32
@duub what do you find difficult, the coding or the design?
duub qnnp
@duub
Aug 25 2015 10:33
coding the design :P
Dennis Andersson
@deandersson
Aug 25 2015 10:33
hehe aight, soo im guessing you have a basic design down then?
Mbos95
@Mbos95
Aug 25 2015 10:33
BAM!
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 10:33
Boom ! Booom ! :D
Dennis Andersson
@deandersson
Aug 25 2015 10:34
Slam?
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 10:34
Now i am Enjoying this Camping :D
duub qnnp
@duub
Aug 25 2015 10:34
I was trying to “reverse engineer” the example it comes
Mbos95
@Mbos95
Aug 25 2015 10:34
camping brings great relaxation!
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 10:34
@Mbos95 Yes BoSS :D
Dennis Andersson
@deandersson
Aug 25 2015 10:38
aight, well what I did was break it down into the basic parts and focus on one part at a time. So if you begin with the header and want a basic bootstrap header, check the examples on bootstraps website and begin with that as a base, then modify to better suit what you want.
Then move on to the logo, make it a big div and try to get the basic block positioned and sized correctly and then move deeper into the div..
Sorry if im not being helpful but its all really about tinkering and tinkering until you learn it, and then I guess its still some tinkering
Soumya Rauth
@soumyaRauth
Aug 25 2015 10:38
Heyyy everyone..
Which one is the best api for local weather. I am in my ZIPLINE.
Dennis Andersson
@deandersson
Aug 25 2015 10:39
@duub sometimes when I want to move and size a basic block I make the background pink or something until I have the content in that block
@soumyaRauth alot of people have used openweathermap
duub qnnp
@duub
Aug 25 2015 10:40
@deandersson there are things I’m trying that I don’t understant why it happens, look at this example: http://codepen.io/duub/full/waVJyK/
Jonny Morley
@morley92
Aug 25 2015 10:41
@soumyaRauth id reccommend http://www.telize.com/ for finding the users location, it's speedy compared to some others i failed with
duub qnnp
@duub
Aug 25 2015 10:42
@deandersson there are comments in the code
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 10:42
@morley92 what is Portfolio ?
Soumya Rauth
@soumyaRauth
Aug 25 2015 10:43
@deandersson Thanks but will it automatically detect the local city? Or i have to set the zipcode myself??
CamperBot
@camperbot
Aug 25 2015 10:43
soumyarauth sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 232 | @deandersson | http://www.freecodecamp.com/deandersson
@soumyaRauth use the link i sent you :)
Dennis Andersson
@deandersson
Aug 25 2015 10:44
@duub what do you want to happen whit the "duub's Portfolio" ? If you dont want a collapsing menu like the examples at bootstrap is it that it gets hidden behind the menu?
Soumya Rauth
@soumyaRauth
Aug 25 2015 10:44
@morley92 okayyyyy.
Dennis Andersson
@deandersson
Aug 25 2015 10:44
@duub the two divs with "duub's Portfolio" looks the same for me
@duub but the first one is more "correct" i think
@soumyaRauth No you will have to get the users location either by a external site like @morley92 said or using javascripts "geolocation"
@duub you could look at mine, but I guess its still against the "rules" if you look at the code.. :)
http://codepen.io/delkasko/full/KpLvXy/
duub qnnp
@duub
Aug 25 2015 10:48
@deandersson the problem is that the first “duub's Portfolio things to share with you” goes under the menubar
 <!-- the bootstrap code -->
  <div class="container">
    <div class="page-header">
      <h1>duub's Portfolio <small>things to share with you</small></h1>
    </div>
    <!-- the code worked for me -->
  </div>
  <div class="container page-header">
    <h1>duub's Portfolio <small>things to share with you</small></h1>
  </div>
this is the code
Dennis Andersson
@deandersson
Aug 25 2015 10:49
@duub so I guessed hehe, for that you have to put a margin up on top, because when a element is set as "fixed" which the navbar is it gets taken out of the regular order of elements, so things will go behind it
duub qnnp
@duub
Aug 25 2015 10:50
then it’s normal that happens that… I thought that I was typing something wrong with the first part of the code..
Dennis Andersson
@deandersson
Aug 25 2015 10:51
Nope its as it should be
what I did was put a padding-top: 50px
on the body element
This is because the bootstrap navbar is 50px in height
duub qnnp
@duub
Aug 25 2015 10:54
@deandersson thank you for your advices, time and pattience :+1: I’ll keep trying!
CamperBot
@camperbot
Aug 25 2015 10:54
duub sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 233 | @deandersson | http://www.freecodecamp.com/deandersson
Dennis Andersson
@deandersson
Aug 25 2015 10:54
@duub no problem, happy to help
@duub Just be sure not to take my code for "the way to do things" Im still learning aswell.. haha
duub qnnp
@duub
Aug 25 2015 10:56
hehe ok! :)
learn alone at some points can be difficult and if someone tells you you’re not doing so wrong it’s motivating!
Alexander Karpenko
@alexkarpandrus
Aug 25 2015 10:58
Hi, mates!
'''
var test = 'test';
'''
CamperBot
@camperbot
Aug 25 2015 10:58
:bulb: to format code use backticks! ``` more info
Dennis Andersson
@deandersson
Aug 25 2015 10:59
hello @alexkarpandrus
@duub i know the feeling :)
Alexander Karpenko
@alexkarpandrus
Aug 25 2015 10:59
var test;
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 10:59
hey how to add two classes into a single iamge ?
Alexander Karpenko
@alexkarpandrus
Aug 25 2015 10:59
yup, so guy, here is the thing, may be possible bug i've found? i dont know, look:
function mutation(arr) {
  target = arr[0];
  str = arr[1].split('');

  str.forEach(function(item){
    if(target.indexOf(item) == -1) { 
      console.log('false'); 
      return false;
    }
  });
  return true;
}

mutation(['hello', 'neo']);
the thing is that it writes in console 'false', but it skips statement of returrn
Dennis Andersson
@deandersson
Aug 25 2015 11:00
@MustafaMohsin with a space, <img class="class1 class2"
@MustafaMohsin that goes for every element in html
@alexkarpandrus its because you are returning from the function inside the forEach
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:01
@deandersson but i didnt named the classes ? then ?
Dennis Andersson
@deandersson
Aug 25 2015 11:02
then it goes on to return true from mutation
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:02
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .smaller-image
  {

    width: 100px;
  }
  .thick-green-border
{
  border-color: green;
  border-width: 10px;
  border-style: solid;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Alexander Karpenko
@alexkarpandrus
Aug 25 2015 11:02
@deandersson well, i somehow thought i did that before and it worked, i'll check it out. thanks!
CamperBot
@camperbot
Aug 25 2015 11:02
alexkarpandrus sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 234 | @deandersson | http://www.freecodecamp.com/deandersson
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:03
@deandersson Look i want to add the thick-green-border class to my image ??
Alexander Karpenko
@alexkarpandrus
Aug 25 2015 11:03
@MustafaMohsin <img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
Dennis Andersson
@deandersson
Aug 25 2015 11:03
@MustafaMohsin its the same principle, you would do `smaller-image thick-green-border
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:04
@deandersson thank u sir :)
CamperBot
@camperbot
Aug 25 2015 11:04
mustafamohsin sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 235 | @deandersson | http://www.freecodecamp.com/deandersson
Dennis Andersson
@deandersson
Aug 25 2015 11:04
:thumbsup:
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:04
@MustafaMohsin cuz i am a new learner thats why :D
Dennis Andersson
@deandersson
Aug 25 2015 11:04
which everyone here is and have been
:smile:
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:05
@deandersson you said that you can add two classes with a space but this thing freecodecamp didnt told me ? why ?
Dennis Andersson
@deandersson
Aug 25 2015 11:07
@MustafaMohsin that I cannot answer :smile:
But a guess is its hard to cover 100% of everything
It would take many years to complete it otherwise
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:08
@deandersson yes, but the freecodecamp should tell everything.. :(
Dennis Andersson
@deandersson
Aug 25 2015 11:08
And one valuable lesson to learn is to tinker and search for an answer if it is not given
@MustafaMohsin its impossible
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:08
@deandersson Why ?
Alexander Karpenko
@alexkarpandrus
Aug 25 2015 11:09
@MustafaMohsin noone knows everything
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:09
@deandersson then how we learn these things LIKE HTML 5 and CSS
if in future I am Stuck In a Coding then from whom I would ask ? @alexkarpandrus
Dennis Andersson
@deandersson
Aug 25 2015 11:09
@MustafaMohsin you learn the basics in a course and then you have to learn the skill to tinker and search for solutions
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:10
@deandersson :O :(
@deandersson but there are many sharp minded people over here :D
Dennis Andersson
@deandersson
Aug 25 2015 11:11
@MustafaMohsin well if you cant find the answer by searching around, then you go on to ask on forums like this, css-tricks, stack-overflow etc
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:11
@deandersson did you know in C++ Coding i get easily :( confued what to do next :(
@deandersson so we can add lots of classes into a single tag with a space ?
duub qnnp
@duub
Aug 25 2015 11:12
@MustafaMohsin there’s a big picture on freecodecamp site https://i.imgur.com/EWWZBag.jpg
and it says several times
Alexander Karpenko
@alexkarpandrus
Aug 25 2015 11:13
@MustafaMohsin c++ is one of the toughest languages to learn and use in fact
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:13
@alexkarpandrus yes :( :(
@alexkarpandrus JAva is Easy then the C++
Dennis Andersson
@deandersson
Aug 25 2015 11:13
@duub hehe I was just about to link that, and it is very true
duub qnnp
@duub
Aug 25 2015 11:13
:)
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:14
@duub Google :D
@duub Long Live Google XD :D
duub qnnp
@duub
Aug 25 2015 11:14
@MustafaMohsin I’m not saying that the lessons are perfect, but FCC it’s a very good guide to learn
Dennis Andersson
@deandersson
Aug 25 2015 11:14
@MustafaMohsin the good thing if you start with c++ and learn it is that it will be very easy to go from c++ to java
I know from experience... :)
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:15
@deandersson yes yes :D
Jonny Morley
@morley92
Aug 25 2015 11:15
took me a while but it's finally finished..... could anybody test this please? http://codepen.io/Morleee/full/NqQRPW?editors=101
Dennis Andersson
@deandersson
Aug 25 2015 11:15
Like @duub said FCC is a very good guide, I learnt more from following this than courses on the univeristy
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:16
@deandersson yes you are right :) :)
Dennis Andersson
@deandersson
Aug 25 2015 11:16
@morley92 it is working for me
Giacomo
@Jack1618
Aug 25 2015 11:21

Hi guys, can anyone help me? I don't understand why this cose is not working. It should filter all non-false values of an array.
But it deletes also non-empty strings. Any suggests? Thank you!

` function bouncer(arr) {
// Don't show a false ID to this bouncer.

var filteredArr = arr.filter( function (value){
return !(value === '' || value === undefined || value === null || value === false || value === 0 || isNaN(value));

});

return filteredArr;
}

bouncer([7, 'ate', '', false, 9]);`

Dennis Andersson
@deandersson
Aug 25 2015 11:21
byebye
anyhoo, back to work now for me.. :)
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:21
@morley92 wow its Awsome :D
Jonny Morley
@morley92
Aug 25 2015 11:22
@deandersson @MustafaMohsin thanks both for testing :)
CamperBot
@camperbot
Aug 25 2015 11:23
morley92 sends brownie points to @deandersson and @mustafamohsin :sparkles: :thumbsup: :sparkles:
:star: 21 | @mustafamohsin | http://www.freecodecamp.com/mustafamohsin
:star: 237 | @deandersson | http://www.freecodecamp.com/deandersson
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:34
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>


<a href="http://catphotoapp.com"> 
  </a>   
<h2 class="red-text">CatPhotoApp</h2>

<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Your a element should have the anchor text of "cat photos"
what do do ? now :(
Your a element should have the anchor text of "cat photos"
André Duarte
@clint74
Aug 25 2015 11:41
@MustafaMohsin wich lesson is this?
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:41
I'm doing the weather app zipline...and I'm having a lot of trouble working with an API.
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:41
HTMLA 5 and CSS
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:41
I'm trying to get the JSON object back.
$(function weather(){

    $.ajax ({
        type:"GET",
        url: "api.openweathermap.org/data/2.5/weather?",
        success: function(data) {

        console.log(data);

        }
    });

});
What am I doing wrong?
Omar
@oab00
Aug 25 2015 11:44
@TheHighPriestess url needs to start with either http:// or just //
André Duarte
@clint74
Aug 25 2015 11:44
@MustafaMohsin help me help you, hahahaha... plz put the link
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:45
@oab00 oh right haha
Omar
@oab00
Aug 25 2015 11:45
should be working otherwise ^^
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:45
@oab00 it doesn't
Omar
@oab00
Aug 25 2015 11:45
what does it say?
in the console
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:46
"Uncaught DOMExcpetion:
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:46
@clint74 ahha waht ? :D
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:46
Failed to execute
Omar
@oab00
Aug 25 2015 11:47
@TheHighPriestess I didn't get that when I tried it in codepen o_o
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:47
oh
hm
Omar
@oab00
Aug 25 2015 11:47
u have a link ?
Omar
@oab00
Aug 25 2015 11:48
it's empty :sweat_smile:
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:48
I know LOL
I was using dev tools
Omar
@oab00
Aug 25 2015 11:48
it's working !
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:48
where?
André Duarte
@clint74
Aug 25 2015 11:49
@MustafaMohsin You must put the link for the lesson you are asking for help because I need to know what is required and compare with my solution.
Omar
@oab00
Aug 25 2015 11:49
getting this in the console Object {cod: "404", message: "Error: Not found city"}
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 11:49
@clint74 ohho kok :D
ok ok
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:49
@oab00 ok..so what do I need to do?
Omar
@oab00
Aug 25 2015 11:50
is that what u're getting as well?
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:50
I'm not getting even that
it's empty
Omar
@oab00
Aug 25 2015 11:50
hmmm try https:// instead
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:50
no..nothing
Mbos95
@Mbos95
Aug 25 2015 11:52

Hey guys, I am having troubles with BasIc Javascript. Waypoint: Generate Random Whole Numbers within a Range

I have this now.

var min = 0;
var max = 9;
function myFunction() {
  // Make myFunction return a random number between zero and nine instead of a decimal
  // Only change code below this line.
  Math.floor(Math.random() * (max - min +1));
}


// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
(function(){return(myFunction());})();
and I need to have a random number which is greater or equal to min
and equal or less then max
Omar
@oab00
Aug 25 2015 11:53
@TheHighPriestess strange :/
try adding dataType: 'JSON' to the ajax request
Mbos95
@Mbos95
Aug 25 2015 11:53
I am not sure what to do.. I can make a random number, I can make it a whole number instead of a decimal number.. but how to make sure it is between 0 and 9?
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 11:54
@oab00 nothing
doesn't work in dev tools either
Mbos95
@Mbos95
Aug 25 2015 11:57
got it working already
Marcus Eisele
@eiselems
Aug 25 2015 11:58
can anybody recommend a weather api for the zipline? :)
Omar
@oab00
Aug 25 2015 11:59
I'm out of ideas dunno if it's a browser problem :x
I'm using chrome on windows 7
Mustafa Hussain
@MustafaMohsin
Aug 25 2015 12:00
@eiselems Pakistan weather :D
Omar
@oab00
Aug 25 2015 12:02
@TheHighPriestess by nothing do u mean that same error or is it just nothing?
Omar
@oab00
Aug 25 2015 12:11
@TheHighPriestess does this work for u ? -> http://repl.it/BD6G
Osman Fındık
@ofindik
Aug 25 2015 12:14
Anyone finished "Waypoint: Manage Packages with NPM" ?
I got error for "npm outdated" command. Can anyone help?...Error is "missing : async"
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 12:24
@oab00 I got something working
what sort of temp is that?
288?
Eric Pudalov
@direclown
Aug 25 2015 12:25
blob
Omar
@oab00
Aug 25 2015 12:26
@TheHighPriestess sweet!
that temperature is in Kelvin u can subtract 273.15 from it to get it in celcius
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 12:26
oh right haha
Omar
@oab00
Aug 25 2015 12:27
so getJSON seems to do the magic better than ajax xD
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 12:27
I found this video... @oab00 https://www.youtube.com/watch?v=3hN4PrJ7R6A
...and it helped a lot
.getJSON is much more intuitive
and I've been having a hard time wrapping my head around this for some reason.
Ammar Ali Shah
@AmmarAliShah
Aug 25 2015 12:29
Need some Bonfire help here people
Omar
@oab00
Aug 25 2015 12:29
only problem with it is if the server responds with jsonp instead of just json then u would have to use ajax
Elizabeth Hatleli
@TheHighPriestess
Aug 25 2015 12:29
@oab00 no...don't say that
but in this case...it's obviously responding with json
Omar
@oab00
Aug 25 2015 12:30
yeah indeed now that u got the object everything else is easy ^^
@AmmarAliShah which bonfire?
Juliano Rafael
@thefrontendwizard
Aug 25 2015 12:38
anyone here have experience with cross domain api resquests? I'm in pain and need some help
Ammar Ali Shah
@AmmarAliShah
Aug 25 2015 12:39
@oab00 Return Largest Numbers in Arrays
Omar
@oab00
Aug 25 2015 12:40
@AmmarAliShah what problem are u facing?
Ammar Ali Shah
@AmmarAliShah
Aug 25 2015 12:41
@oab00 Kind of lost here. Don't know where to start. A loop to access the first array, then?
Omar
@oab00
Aug 25 2015 12:44
then a second loop to access the numbers
you could store a number as variable and compare it to each of the other elements to find the largest one
store that largest number in a new array corresponding to each of the input arrays
Aadith V Menon
@cysys
Aug 25 2015 13:29
Hi
i need help in the first jquery exercise
Betsey Biggs
@betsbillabong
Aug 25 2015 13:30
What's your problem, @cysys ? Can you post code?
Aadith V Menon
@cysys
Aug 25 2015 13:30
i have done it correctly but the continue buttion is not becoming green
''''
CamperBot
@camperbot
Aug 25 2015 13:30
:bulb: to format code use backticks! ``` more info
Aadith V Menon
@cysys
Aug 25 2015 13:30
````
<script>$(document).ready(function() {});</script>

<!-- You shouldn't need to modify code below this line -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
@betsbillabong
here is the code
Betsey Biggs
@betsbillabong
Aug 25 2015 13:33
@cysys I'm a beginner, but even though it shouldn't matter, the instructions do ask you to put }0; on the next line; maybe try that? It may be trying to help you learn correct syntax.
Aadith V Menon
@cysys
Aug 25 2015 13:33
@betsbillabong thanks it worked
CamperBot
@camperbot
Aug 25 2015 13:33
cysys sends brownie points to @betsbillabong :sparkles: :thumbsup: :sparkles:
:star: 229 | @betsbillabong | http://www.freecodecamp.com/betsbillabong
Betsey Biggs
@betsbillabong
Aug 25 2015 13:34
@cysys great!
Khalif Cooper
@theatrekid09
Aug 25 2015 13:36
is there any other resources where I can learn how to do the bonfires, I having a tough time with them and doing algorithms
I'm*
Aadith V Menon
@cysys
Aug 25 2015 13:42
@theatrekid09 the best way to get good at them is to break the problem into small parts and implement meant them one by one
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:42
me too!
Aadith V Menon
@cysys
Aug 25 2015 13:43
@renelis the best way to easily do them is to break the problem into small parts and implement meant them one by one
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:43
I'm having trouble with the palindromes
Aadith V Menon
@cysys
Aug 25 2015 13:43
@renelis can i have the link to the challenge please
Tim P
@xTimpi
Aug 25 2015 13:44
@renelis what exactly is your problem with it?
Khalif Cooper
@theatrekid09
Aug 25 2015 13:44
@cysys that doesn't work if you don't know basic alorigthim you can't do the problem
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:44
right now all I have is this:
function palindrome(str) {
  function lowerC(l){
  return l.toLowerCase();
}

  return str.replace(/[A-Z]/g, lowerC);
}



palindrome("eye");
Aadith V Menon
@cysys
Aug 25 2015 13:45
@renelis split the string into two haves and compare them is the general way i would do it
Khalif Cooper
@theatrekid09
Aug 25 2015 13:45
these problems use alot of regular expression which I rarely use my self ever
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:45
@cysys I was trying to make an "if" statement to return true or false, but it won't work either
Aadith V Menon
@cysys
Aug 25 2015 13:46
@theatrekid09 an algorithm is a sequence of logical steps to solve the problem . Try doing the problem and put effort into solving more you will get good at it naturally
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:46
@cysys I tried with the .split() , but I don't know how to remove the blank spaces between two words
Tim P
@xTimpi
Aug 25 2015 13:46
@renelis If I was you I would split the string up into chars and make 2 new strings, one forward and one backward, and then compare the two, if they are equal its a palindrome
Marcus Eisele
@eiselems
Aug 25 2015 13:47
Anyone want to give me a little feedback on my weather app?
Aadith V Menon
@cysys
Aug 25 2015 13:47
@renelis first you should remove any spaces
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:47
@xTimpi Good, I'll try that
Aadith V Menon
@cysys
Aug 25 2015 13:47
@eiselems would love that
Tim P
@xTimpi
Aug 25 2015 13:47
@renelis its the same as you did for the lowercase, its just a different regExp!
Marcus Eisele
@eiselems
Aug 25 2015 13:47
@cysys http://codepen.io/eiselems/full/MwNGpb/ hmm think the design looked better with that fullscreen background but wanted to try that API to generate the images
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:48
@cysys the thing is I don't know how to remove the spaces, I've searched and it says something like ( /\s/gi) but it didn't work
Marcus Eisele
@eiselems
Aug 25 2015 13:48
@cysys hope you don't mind that the output is in german :D
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:48
@xTimpi ok, thanks, let me try that
CamperBot
@camperbot
Aug 25 2015 13:48
renelis sends brownie points to @xtimpi :sparkles: :thumbsup: :sparkles:
:star: 245 | @xtimpi | http://www.freecodecamp.com/xtimpi
Renelis Abreu Ramirez
@renelis
Aug 25 2015 13:49
@cysys Thanks too
CamperBot
@camperbot
Aug 25 2015 13:49
renelis sends brownie points to @cysys :sparkles: :thumbsup: :sparkles:
:star: 117 | @cysys | http://www.freecodecamp.com/cysys
Tim P
@xTimpi
Aug 25 2015 13:49
@eiselems hey, what API are you using to get the users current city? your website is extremely precise for germany, all APIs I tried are at least 100km off lol
Marcus Eisele
@eiselems
Aug 25 2015 13:49
using the browser interface
Aadith V Menon
@cysys
Aug 25 2015 13:49
@xTimpi geoloaction api is availible directly in html5
Tim P
@xTimpi
Aug 25 2015 13:50
I see
@cysys exactly just wanted to paste the link to the docs
Tim P
@xTimpi
Aug 25 2015 13:50
@eiselems thanks
CamperBot
@camperbot
Aug 25 2015 13:50
xtimpi sends brownie points to @eiselems :sparkles: :thumbsup: :sparkles:
:star: 226 | @eiselems | http://www.freecodecamp.com/eiselems
Moisés Man
@moigithub
Aug 25 2015 13:51
unlesss.. u using an older browser.. then u need to fallback to api
Marcus Eisele
@eiselems
Aug 25 2015 13:51
yes
Aadith V Menon
@cysys
Aug 25 2015 13:51
@eiselems you can use geo ip as fallback
Marcus Eisele
@eiselems
Aug 25 2015 13:52
@cysys & @xTimpi the color of the background is supposed to change dependent on the temperature
Aadith V Menon
@cysys
Aug 25 2015 13:52
ok
i see a orange one
I live in Kerala,India
Marcus Eisele
@eiselems
Aug 25 2015 13:52
how much °C do you have :D?
Tim P
@xTimpi
Aug 25 2015 13:53
19.2 partly cloudy in bremen, green background @eiselems
Aadith V Menon
@cysys
Aug 25 2015 13:53
@eiselems 29
Marcus Eisele
@eiselems
Aug 25 2015 13:53
@xTimpi ok :D at least someone who isn't put of by the language haha :D
Tim P
@xTimpi
Aug 25 2015 13:53
@eiselems :D
Marcus Eisele
@eiselems
Aug 25 2015 13:53