These are chat archives for FreeCodeCamp/Help

14th
Jul 2017
Margaret
@Margaret2
Jul 14 2017 00:03
lol revizzy and :fork_and_knife: man in the Help room? what is happening!! :sweat_smile:
davidlair
@davidlair
Jul 14 2017 00:03
?
Need h4lp?
Uriel Guzmán
@Burinson
Jul 14 2017 00:41

How do I make this:

``````function palindrome(str) {
// Good luck!
str = str.replace(/\W/g, '').toLowerCase;
return true;
}

palindrome("eye");``````

return `false` if the palindrome does not match? I already got it to return `true` if the `str` is a palindrome

korzo
@korzo
Jul 14 2017 00:46
@Burinson Now reverse str, compare it to str and return result
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 00:48
@Burinson use this regex `/[\W_]/g`
@Burinson after converting to lowercase store that in new var and compare that with the `str`
Uriel Guzmán
@Burinson
Jul 14 2017 00:51
@korzo
``````function palindrome(str) {
// Good luck!
str === str.replace(/\W/g, '').toLowerCase.split('').reverse().join('');
return true;
}

palindrome("eye");``````
korzo
@korzo
Jul 14 2017 00:52
@Burinson No, you must store reversed string in new variable, otherwise you can't compare it
@Burinson
``var reversed = str.split('').reverse().join('');``
Uriel Guzmán
@Burinson
Jul 14 2017 00:56

@korzo ```
function palindrome(str) {
// Good luck!
str = str.replace(/\W/g, '').toLowerCase;
var reversed = str.split('').reverse().join('');

return true;
}

palindrome("eye");
```

``````function palindrome(str) {
// Good luck!
str = str.replace(/\W/g, '').toLowerCase;
var reversed = str.split('').reverse().join('');

return true;
}

palindrome("eye");``````
korzo
@korzo
Jul 14 2017 00:57
@Burinson now compare str with reversed and return result
Uriel Guzmán
@Burinson
Jul 14 2017 00:57
@korzo
``````function palindrome(str) {
// Good luck!
str = str.replace(/\W/g, '').toLowerCase;
var reversed = str.split('').reverse().join('');
str = reversed;
return true;
}

palindrome("eye");``````
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 00:59
@Burinson single `=` is for assigning
korzo
@korzo
Jul 14 2017 00:59
@Burinson this is assignment ( = )
To compare use ===
Uriel Guzmán
@Burinson
Jul 14 2017 01:00
``````function palindrome(str) {
// Good luck!
str = str.replace(/\W/g, '').toLowerCase;
var reversed = str.split('').reverse().join('');
str === reversed;
return true;
}

palindrome("eye");``````
It gives me an error
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 01:00
@Burinson that is wrong
korzo
@korzo
Jul 14 2017 01:00
@Burinson Because you are returning always true
Return result of comparison
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 01:01
@Burinson that can be done in two ways
1> use return
2> use if else condition
Uriel Guzmán
@Burinson
Jul 14 2017 01:04
TypeError: str.split is not a function
I mean, this error too
``````function palindrome(str) {
// Good luck!
str = str.replace(/\W/g, '').toLowerCase;
var reversed = str.split('').reverse().join('');

if (str === reversed) {
return true;
} else {
return false;
}
}

palindrome("eye");``````
korzo
@korzo
Jul 14 2017 01:06
@Burinson Missing parenthesis after toLowerCase
Uriel Guzmán
@Burinson
Jul 14 2017 01:12

@korzo

``````function palindrome(str) {
// Good luck!
str = str.replace(/\W/g, '').toLowerCase();
var reversed = str.split('').reverse().join('');

if (str === reversed) {
return true;
} else {
return false;
}
}

palindrome("eye");``````

Okay, it's nearly done, one more error

Katie
@SpaceChick04
Jul 14 2017 01:13
Hey, Can anyone help me out with a "simple" fix to VERTICALLY spacing text within a div? Here's my pen. I'm trying to change the header text and move it down a tiny bit. https://codepen.io/SpaceChick04/pen/xrmZvZ?editors=1100
Uriel Guzmán
@Burinson
Jul 14 2017 01:13
`palindrome("_eye") should return true.`
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 01:13
Uriel Guzmán
@Burinson
Jul 14 2017 01:13
It doesn't replace the underscore
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 01:13
@Burinson use that regex
korzo
@korzo
Jul 14 2017 01:13
@Burinson Which error?
Uriel Guzmán
@Burinson
Jul 14 2017 01:13
@ravikishorethella another regex for underscores?
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 01:13
@Burinson `/[\W_]/g`
replace your regex with this
Uriel Guzmán
@Burinson
Jul 14 2017 01:14
@ravikishorethella Thanks, that worked
CamperBot
@camperbot
Jul 14 2017 01:14
burinson sends brownie points to @ravikishorethella :sparkles: :thumbsup: :sparkles:
:cookie: 952 | @ravikishorethella |http://www.freecodecamp.com/ravikishorethella
Uriel Guzmán
@Burinson
Jul 14 2017 01:15
@korzo thank you too
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 01:15
@Burinson :thumbsup:
korzo
@korzo
Jul 14 2017 01:17
@SpaceChick04 Which text?
@SpaceChick04 Anyway, for verical spacing, use padding on parent element for multi-line or line-height on element for oneliners
Katie
@SpaceChick04
Jul 14 2017 01:19
@korzo I'm having issues and any spacing I've tried either didn't work or simply made the original cell bigger which did nothing for moving my text downward
and it's the "katie's portfolio" text on top of the earth background
korzo
@korzo
Jul 14 2017 01:23
@SpaceChick04 `.jumbotron h1 {margin: 20px 0}` change 20px accordingly
@SpaceChick04 but you have several errors in your code structure
Katie
@SpaceChick04
Jul 14 2017 01:28
@korzo no effect for the padding
Which errors? If it's anything with vertical spacing it's just junk code I've been throwing in. Anything else please point out if you don't mind.
korzo
@korzo
Jul 14 2017 01:32
@SpaceChick04 You want to make div with image background heighter?
Or do you want to move it little bit down, because it's under navigation?
Katie
@SpaceChick04
Jul 14 2017 01:33
@korzo neither. The menu bar is fixed at the top and the cell with the background is perfect. I want to move the TEXT that's INSIDE that frame down. I've tried to use the vertical align=bottom and stuff but can't get it to work. . . .
korzo
@korzo
Jul 14 2017 01:34
@SpaceChick04 `.jumbotron h1 {margin-top: 20px;}` ?
@SpaceChick04 or `.jumbotron {padding-bottom: 55px}`
@SpaceChick04 or `.jumbotron h1 {transform: translateY(20px);}`
Katie
@SpaceChick04
Jul 14 2017 01:38
@korzo First suggestion only moves the entire cell down (the cell includes both the background and the text). . .trying your second
Alexander Køpke
@alexanderkopke
Jul 14 2017 01:39
you people you're so fine, you're so fine you blow my mind.. you people! :dancers:
Kyle Holm
@thekholm80
Jul 14 2017 01:39
clap clap clap
Katie
@SpaceChick04
Jul 14 2017 01:39
OOH - the padding-bottom works if I set the value to a negative number :)
@korzo Thanks!
CamperBot
@camperbot
Jul 14 2017 01:39
spacechick04 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 245 | @korzo |http://www.freecodecamp.com/korzo
Manish Giri
@Manish-Giri
Jul 14 2017 01:40
@thekholm80 do you have webpack installed globally?
Kyle Holm
@thekholm80
Jul 14 2017 01:40
nope
haven't seen the need yet
Manish Giri
@Manish-Giri
Jul 14 2017 01:43
sigh
Kyle Holm
@thekholm80
Jul 14 2017 01:43
what's wrong?
Manish Giri
@Manish-Giri
Jul 14 2017 01:43
I wonder why I installed mine globally
Kyle Holm
@thekholm80
Jul 14 2017 01:43
`sudo npm uninstall -g webpack`
Alexander Køpke
@alexanderkopke
Jul 14 2017 01:43
because you did -g or --global
oh
Manish Giri
@Manish-Giri
Jul 14 2017 01:44
lol
@thekholm80 what's your current webpack ver in the cards app?
3.x?
Kyle Holm
@thekholm80
Jul 14 2017 01:45
``````"webpack": "^3.2.0",
"webpack-dev-server": "^2.5.1"``````
Manish Giri
@Manish-Giri
Jul 14 2017 01:45
cool
I'm doing the stephen grider course
he uses 2.2-rc
quite old at this point
Kyle Holm
@thekholm80
Jul 14 2017 01:45
oh yeah
Manish Giri
@Manish-Giri
Jul 14 2017 01:45
so I skipped it
Kyle Holm
@thekholm80
Jul 14 2017 01:46
i used his boilerplate for the ones i did
Manish Giri
@Manish-Giri
Jul 14 2017 01:46
did you face any breaking changes from 2.x to 3.x?
Kyle Holm
@thekholm80
Jul 14 2017 01:47
i had to redo how i configured my image loaders, but I rarely use those so it doesn't matter lol

in 2.x i did:

``````{ test: /\.(gif|png|jpe?g|svg)\$/i, use: [ 'file-loader?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack-loader?{optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}, mozjpeg: {quality: 65}}' ]}``````

but in 3.x i had to use:

``````{ test: /\.(jpe?g|png|gif|svg)\$/i,
loaders: ['file-loader?context=src/images&name=images/[path][name].[ext]', {
loader: 'image-webpack-loader',
query: {
mozjpeg: {
progressive: true,
},
gifsicle: {
interlaced: false,
},
optipng: {
optimizationLevel: 4,
},
pngquant: {
quality: '75-90',
speed: 3,
},
},
}],
exclude: /node_modules/,
include: __dirname,
},``````
it's more of a pain, but whatever
Manish Giri
@Manish-Giri
Jul 14 2017 01:49
wow
Kyle Holm
@thekholm80
Jul 14 2017 01:51
there was something non-react-redux i learned from Girder that i think is pretty cool
`const MY_CONST = 'MY_CONST'` for constants, so you don't have to worry about typos and can easily identify them
Manish Giri
@Manish-Giri
Jul 14 2017 01:52
uppercase for constants?
Kyle Holm
@thekholm80
Jul 14 2017 01:52
yeah
Manish Giri
@Manish-Giri
Jul 14 2017 01:52
hm
Kyle Holm
@thekholm80
Jul 14 2017 01:52
well, it was more than that, but yeah
Manish Giri
@Manish-Giri
Jul 14 2017 01:52
that's a convention in most languages
Kyle Holm
@thekholm80
Jul 14 2017 01:53
like:
``````export const USER_LOGIN = 'USER_LOGIN';

export function userLogin(userID) {
const url = `http://localhost:8000/api/user/getprofile/\${ userID }`;
const request = axios.get(url);

return {
type: USER_LOGIN,
payload: request
}
}``````
i can import my constant in my reducer so they'll always match
Manish Giri
@Manish-Giri
Jul 14 2017 01:54
:fire:
Kyle Holm
@thekholm80
Jul 14 2017 01:54
well i thought it was neat lol
Eric Miller
@ericmiller777
Jul 14 2017 01:55
hey guys

var word = 0;
function findLongestWord(str) {

var array = str.split(" ");
for (i = 0; i < array.length; i ++){
if(word < array[i].length){
word = array[i].length;
}
}
return word;
}

findLongestWord("May the force be with you");

returns 5 but i dont pass says should return 5.....
Manish Giri
@Manish-Giri
Jul 14 2017 01:56
make `word` local
Alexander Køpke
@alexanderkopke
Jul 14 2017 01:56
@ericmiller777 put word in the function
Eric Miller
@ericmiller777
Jul 14 2017 01:56
oh
why tho?
Alexander Køpke
@alexanderkopke
Jul 14 2017 01:56
idk
Eric Miller
@ericmiller777
Jul 14 2017 01:56
lol
understood
@Manish-Giri thanks
CamperBot
@camperbot
Jul 14 2017 01:57
ericmiller777 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6251 | @manish-giri |http://www.freecodecamp.com/manish-giri
Alexander Køpke
@alexanderkopke
Jul 14 2017 01:57
it should work the other way though
Eric Miller
@ericmiller777
Jul 14 2017 01:57
@alexanderkopke thanks
CamperBot
@camperbot
Jul 14 2017 01:57
ericmiller777 sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star2: 1623 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Jul 14 2017 01:57
@ericmiller777 its just a fcc thing, so in normal js you could do what you did and it would work
Eric Miller
@ericmiller777
Jul 14 2017 01:58
i understand, i suppose it wanted to return the function
Manish Giri
@Manish-Giri
Jul 14 2017 01:59
@ericmiller777 when you use global variables, it doesn't reset when FCC's tests cases are run consecutively
so if `word = 5` for this challenge, the next test case would also begin with `word = 5`
then `if(word < array[i].length){` - this might fail
Eric Miller
@ericmiller777
Jul 14 2017 02:00
i see
Joshua Waller
@Obscureether1
Jul 14 2017 02:01
Whats a good FTP
Alexander Køpke
@alexanderkopke
Jul 14 2017 02:01
hmm I wonder if it would work if you after the invocation do word=0;
Kyle Holm
@thekholm80
Jul 14 2017 02:02
@Obscureether1 what do you mean?
Joshua Waller
@Obscureether1
Jul 14 2017 02:02
FTP transfer client
Momozor
@momozor
Jul 14 2017 02:02
@Obscureether1 If you want GUI based, FZilla is great in my experience.
Joshua Waller
@Obscureether1
Jul 14 2017 02:02
trying file zilla but not working
Eric Miller
@ericmiller777
Jul 14 2017 02:03
winscp is small
Kyle Holm
@thekholm80
Jul 14 2017 02:03
@Obscureether1 i use command-line
`ftp ftp.yourserver.com`
Alexander Køpke
@alexanderkopke
Jul 14 2017 02:03
hmm would be cool if there was like a vim based ftp lol
Eric Miller
@ericmiller777
Jul 14 2017 02:03
make sure youu got your server passwords right is somtimes different then the password you use to login to domain registrar/host
Joshua Waller
@Obscureether1
Jul 14 2017 02:04
it even changed ...lol
Momozor
@momozor
Jul 14 2017 02:04
@Obscureether1 why it is not working? What operating system are you using? Some operating system already has ftp tools (usually command line).
Joshua Waller
@Obscureether1
Jul 14 2017 02:04
10
Alexander Køpke
@alexanderkopke
Jul 14 2017 02:06
turns out vim has a build in ftp plugin
Joshua Waller
@Obscureether1
Jul 14 2017 02:06
this is what i get
v
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (64,210,232,41,236,208).
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
Status: Disconnected from server
Joseph
@revisualize
Jul 14 2017 02:17
Im at SeattleJS Meetup ... this is the current talk... https://github.com/JoshuaKGoldberg/async-await-generators-typescript-and-jquery
Ayush Mahajan
@ay2306
Jul 14 2017 02:18
hey guys.. need some help here. please help me on how to assign clearTimeout JS method to this setTimout Method
``````
function blink(){
var i = 0;
function change_color(a){
if(running_state && !inputAllowed){
removeById(a[0],a[2]);
addById(a[0],a[1]);
if(i==(randomNumbers.length-1) && (a[2]=='-hovering-state')){
inputAllowed = true;
// setTimeout()
}
}
}
function run(b){
change_color([b,'-hovering-state','']);
setTimeout(change_color.bind(null,[b,'','-hovering-state']),1000);
}
for(i = 0; i < randomNumbers.length; ++i){
setTimeout(run.bind(null,randomNumbers[i]),(i*1100));
}
}``````
Alexander Køpke
@alexanderkopke
Jul 14 2017 02:26
^
Kyle Holm
@thekholm80
Jul 14 2017 02:28
i imagine it's just like clearInterval in that you'd assign your timer to a variable then you can `clearTimeout(myVariable)`
but i've never looked at the mdn page for that
Momozor
@momozor
Jul 14 2017 02:28
@Obscureether1 MSLD connection timed out error was actually common with FileZilla. Are you sure your firewall or antivirus not blocking connections for the command (uploading files for example)?
Ayush Mahajan
@ay2306
Jul 14 2017 02:33
@thekholm80 can you help me here. clearTimeout is not working as I intended it to be. I wanted blinking to restart after i press power button but it continues
https://codepen.io/ayush2306/pen/PjyWpz?editors=1010
Kyle Holm
@thekholm80
Jul 14 2017 02:34
what lines am i looking at?
Ayush Mahajan
@ay2306
Jul 14 2017 02:35
@thekholm80 60-80 for power on click code and 80-120 for blink code
Kyle Holm
@thekholm80
Jul 14 2017 02:39
yeah, i dunno buddy
dmlk418
@dmlk418
Jul 14 2017 02:56
Hey guys, I am working on the Title Case a Sentence problem in Basic Algorithm Scripting where I capitalize the first letter of each word in a string. Anyways, I am stuck and am wondering if I am on the right track: function titleCase(str) {
myStr = str.toLowerCase();
myArray = myStr.split(' ');
for (var i = 0; i < myArray.length; i++) {
myArray[i][0] = myArray.toUpperCase;
}
return myArray.join(' ');
}
Yew Woei Low
@Yewwoei
Jul 14 2017 02:58
Hello! sorry to interrupt but I need some help on my portfolio here: https://codepen.io/yewwoei/pen/bRxgwR
I'm trying to achieve a menubar that stretches across the entire page, but even with margin and padding of 0 there's still space left and right of my div. What's wrong?
korzo
@korzo
Jul 14 2017 03:02
@Yewwoei container-fluid has padding 15px
either move your menubar out of container or add negative margin to menubar
Yew Woei Low
@Yewwoei
Jul 14 2017 03:03
@korzo oh thank you so much! I really appreciate it.
CamperBot
@camperbot
Jul 14 2017 03:03
yewwoei sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 248 | @korzo |http://www.freecodecamp.com/korzo
Eric Miller
@ericmiller777
Jul 14 2017 03:18
hey guys

function titleCase(str) {
var string;
string = str.toLowerCase().split(" ");
for (i = 0; i < string.length; i++){
string.charAt(0).replace([a-z], [A-Z]);
}
return string;
}

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

that dont work i know
hows it look?
Claudio Restifo
@Marmiz
Jul 14 2017 03:19
Hello campers :sparkles:
Eric Miller
@ericmiller777
Jul 14 2017 03:19
hello
Kyle Holm
@thekholm80
Jul 14 2017 03:19
@Marmiz :wave:
Claudio Restifo
@Marmiz
Jul 14 2017 03:23
@ericmiller777 you know that the same way that `toLowerCase` exists, there is also a `toUpperCase` :)
Eric Miller
@ericmiller777
Jul 14 2017 03:23
.>
Kyle Holm
@thekholm80
Jul 14 2017 03:23
but, you can't mutate a string
i can't say `string[letter] = something else`
Eric Miller
@ericmiller777
Jul 14 2017 03:24
still good to know @Marmiz thanks
CamperBot
@camperbot
Jul 14 2017 03:24
ericmiller777 sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:cookie: 992 | @marmiz |http://www.freecodecamp.com/marmiz
Claudio Restifo
@Marmiz
Jul 14 2017 03:25
@ericmiller777 also if you want to go on the regex route you have to implement the correct syntax:
``.replace(/[a-z]/,  replacer)``
mind the `/`
@thekholm80 :wave: nice to see you :)
Kyle Holm
@thekholm80
Jul 14 2017 03:26
@Marmiz thanks!
CamperBot
@camperbot
Jul 14 2017 03:26
thekholm80 sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:cookie: 993 | @marmiz |http://www.freecodecamp.com/marmiz
Kyle Holm
@thekholm80
Jul 14 2017 03:26
you're getting close to that star
Claudio Restifo
@Marmiz
Jul 14 2017 03:26
hope it's not the sun or I'll get burned :fire:
Kyle Holm
@thekholm80
Jul 14 2017 03:26
lol i mean 1000 cookies
Eric Miller
@ericmiller777
Jul 14 2017 03:27
@Marmiz thanks
CamperBot
@camperbot
Jul 14 2017 03:27
ericmiller777 sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:warning: ericmiller777 already gave marmiz points
Claudio Restifo
@Marmiz
Jul 14 2017 03:27
or tanned :bikini:
@thekholm80 I know, just dumb jokes
it's friday
Kyle Holm
@thekholm80
Jul 14 2017 03:27
it's almost friday
for me
Claudio Restifo
@Marmiz
Jul 14 2017 03:27
@thekholm80 it's always Friday somewhere
Kyle Holm
@thekholm80
Jul 14 2017 03:28
i should watch more Rick and Morty instead of news
news is depressing
Claudio Restifo
@Marmiz
Jul 14 2017 03:28
wubba lubba dub-dub
for sure :)
Kyle Holm
@thekholm80
Jul 14 2017 03:28
have you seen bojack horseman?
Claudio Restifo
@Marmiz
Jul 14 2017 03:30
was going over a Golang book and they had this in the intro:
@thekholm80 never, is it good?
have it in my list since forever
Kyle Holm
@thekholm80
Jul 14 2017 03:32
i've never seen an entire episode, but i watched a compilation of every scene on character has been in and it was very funny
so i might have to watch the whole show now
Joseph
@revisualize
Jul 14 2017 03:43
hey
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:43
@thekholm80 just saw you can use the parent select to select something it outside the current selector you don't have to nest it inside the parent but suppose you have elements that exist both in and outside the parent, so it creates a better overview to be able to select the parent from the child
``````// css
.button{ color: red;}
. theme .button {color: #333;}
//scss
.button {
color: red;
.theme & {
color:#333;
}
}``````
hiya
did the meetup go well? @revisualize
Kyle Holm
@thekholm80
Jul 14 2017 03:44
@alexanderkopke very cool
Joseph
@revisualize
Jul 14 2017 03:44
@alexanderkopke It was ok.
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:47
haven't gone to a meetup yet because I live in denmark but I already have my icebreaker ready: what up, guys!
Joseph
@revisualize
Jul 14 2017 03:47
@alexanderkopke don't say that
Kyle Holm
@thekholm80
Jul 14 2017 03:47
ain't no meetup like a denmark meetup cause a denmark meetup don't stop
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:48
lol
Joseph
@revisualize
Jul 14 2017 03:49
@alexanderkopke Are you near Copen?
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:49
nope
Joseph
@revisualize
Jul 14 2017 03:49
@alexanderkopke Ahh.
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:49
in cph there are lots of meetups but everywhere else very much not so much
Kyle Holm
@thekholm80
Jul 14 2017 03:50
I'd never tell diomed but this app he asked me to make is freaking fun to build lol
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:52
:)
Kyle Holm
@thekholm80
Jul 14 2017 03:52
you're next, he's going to make you deploy it for him
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:52
no prob
Joseph
@revisualize
Jul 14 2017 03:52
@alexanderkopke you can look at online meetups
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:53
but I don't get why he doesn't just use ghpages
Kyle Holm
@thekholm80
Jul 14 2017 03:53
i dunno lol
Alexander Køpke
@alexanderkopke
Jul 14 2017 03:53
@revisualize I did but maybe there are more now.. I'll give it another shot
Alexander Køpke
@alexanderkopke
Jul 14 2017 04:01
lol the meetup site gave me a shock. It looked like there is a meetup in my town with 50 interested. I click and a big button reads: be the organizer
heroiczero
@heroiczero
Jul 14 2017 04:02
lol in other words be the one responsible
Alexander Køpke
@alexanderkopke
Jul 14 2017 04:03
yeah
I think I should have experienced a meetup before even considering organizing one
Egan1572
@Egan1572
Jul 14 2017 04:15
Good evening. Can somebody help me with Accessing Nested Objects. My code looks correct but is not passing
heroiczero
@heroiczero
Jul 14 2017 04:16
@Egan1572 lets see your code
Egan1572
@Egan1572
Jul 14 2017 04:16

@heroiczero // Setup
var myStorage = {
"car": {
"inside": {
"glove box": "maps",
"passenger seat": "crumbs"
},
"outside": {
"trunk": "jack"
}
}
};

// Only change code below this line

var gloveBoxContents = myStorage.car.inside.["glove box"]; // Change this line

heroiczero
@heroiczero
Jul 14 2017 04:17
@Egan1572 `myStorage.car.inside.["glove box"];` you don't need the `.` before the `["glove box"]`
@Egan1572 because you are accessing it with a bracket instead of dot notation
Egan1572
@Egan1572
Jul 14 2017 04:18
@heroiczero OMG! Looool. So glad that was the issue. Thank you!
CamperBot
@camperbot
Jul 14 2017 04:18
egan1572 sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1486 | @heroiczero |http://www.freecodecamp.com/heroiczero
Egan1572
@Egan1572
Jul 14 2017 04:18
@heroiczero Ahhhhhh, got it
heroiczero
@heroiczero
Jul 14 2017 04:18
@Egan1572 :+1:
Alexander Køpke
@alexanderkopke
Jul 14 2017 04:24
that is one happy cat
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:10
hey everyone..finally finished my random quote generator project
take a look.....and give any suggestions if there is any thing else i should add
Kyle Holm
@thekholm80
Jul 14 2017 05:10
lol you sure that's the right link?
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:10
the twitter button doesnt show up here i dont know why
Kyle Holm
@thekholm80
Jul 14 2017 05:12
@prakashyadav008 looks good but some of the quotes are too long for twitter
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:14
ya thats the random generated quote
so i cant cantrol how long it is
Kyle Holm
@thekholm80
Jul 14 2017 05:14
sure you can
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:14
control*
Kyle Holm
@thekholm80
Jul 14 2017 05:14
you're the one sending the quote to twitter
it's not going from the api to twitter
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:15
ya but ..the quote is generated randomly ..so size can be anything
Kyle Holm
@thekholm80
Jul 14 2017 05:15
...
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:15
should i generate a new quote if its too long
.?
Kyle Holm
@thekholm80
Jul 14 2017 05:16
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:16
i can truncate...buts its a quote.. ..if i truncate ...there would be no meaning left of the quote
Kyle Holm
@thekholm80
Jul 14 2017 05:17
if it don't tweet at all, what meaning is there?
prakash chandra yadav
@prakashyadav008
Jul 14 2017 05:18
thats a problem with the project a lot of quotes are beyond the length of what u can tweet
Darren
@DarrenfJ
Jul 14 2017 05:20
evening fCC.. can't stay long just wanted to come on in and say hi!
hi
Kyle Holm
@thekholm80
Jul 14 2017 05:20
@DarrenfJ :wave:
Darren
@DarrenfJ
Jul 14 2017 05:20
@thekholm80 hey buddy.. a definite trouper for always being in here helping out
Kyle Holm
@thekholm80
Jul 14 2017 05:21
i should be in bed, just wanted to finish one last thing
then one more
then one more
Viktor Tiutiun
@vittorioVT
Jul 14 2017 05:21
hello everybody
Kyle Holm
@thekholm80
Jul 14 2017 05:21
@vittorioVT hi
Viktor Tiutiun
@vittorioVT
Jul 14 2017 05:21
@DarrenfJ hi :smile:
@thekholm80 hi
Darren
@DarrenfJ
Jul 14 2017 05:22
@vittorioVT hello hello

this is how i am about everything:

i should be in bed, just wanted to finish one last thing

Kyle Holm
@thekholm80
Jul 14 2017 05:23
i'm just so close to finishing this part of my project but i keep finding other things to do
i should just give up for tonight lol
Darren
@DarrenfJ
Jul 14 2017 05:28
welp, i'm off to sleep too... been trying to go before 3:30 4 am lol
Kyle Holm
@thekholm80
Jul 14 2017 05:28
@DarrenfJ g'night
Darren
@DarrenfJ
Jul 14 2017 05:28
thanks for the usual help in the helpRoom if I don't see yah
Viktor Tiutiun
@vittorioVT
Jul 14 2017 05:29
@DarrenfJ goodnight
Darren
@DarrenfJ
Jul 14 2017 05:29
thanks @thekholm80 @vittorioVT @alexanderkopke @Marmiz
CamperBot
@camperbot
Jul 14 2017 05:29
darrenfj sends brownie points to @thekholm80 and @vittoriovt and @alexanderkopke and @marmiz :sparkles: :thumbsup: :sparkles:
:star2: 1332 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 780 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
:cookie: 994 | @marmiz |http://www.freecodecamp.com/marmiz
:star2: 1624 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
Darren
@DarrenfJ
Jul 14 2017 05:29
sleeeeep
Viktor Tiutiun
@vittorioVT
Jul 14 2017 05:29
@DarrenfJ thanks
CamperBot
@camperbot
Jul 14 2017 05:29
vittoriovt sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1902 | @darrenfj |http://www.freecodecamp.com/darrenfj
Kyle Holm
@thekholm80
Jul 14 2017 05:29
@DarrenfJ thank you sir
bleh
i can't even give cookies right
Manish Giri
@Manish-Giri
Jul 14 2017 05:32
@DarrenfJ :wave:
Kyle Holm
@thekholm80
Jul 14 2017 05:32
i give up, going to bed
g'night folks
Viktor Tiutiun
@vittorioVT
Jul 14 2017 05:33
@thekholm80 goodnight :smile:
Amit Patel
@AmitP88
Jul 14 2017 06:36
hey guys, I'm trying to do the factorial algorithm, but I'm stuck as to why my code isn't working. What's wrong with my logic?
``````
function factorialize(num) {

var factorial = 1;

for(i=1;i<=num;i++){
return factorial *= i;
}

}

factorialize(5);``````
Manish Giri
@Manish-Giri
Jul 14 2017 06:37
@AmitP88 `return` inside loop
will terminate the for immediately
Amit Patel
@AmitP88
Jul 14 2017 06:38
@Manish-Giri ugh, I should've known. thanks bro :)
CamperBot
@camperbot
Jul 14 2017 06:38
amitp88 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6252 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Jul 14 2017 06:38
@AmitP88 :+1:
wonder
@wonder2991
Jul 14 2017 06:44
is this enough to clear the challenge? calc
ilyasofficial
@ilyasofficial1617
Jul 14 2017 06:48
how do i turn
"10"
to
10
wonder
@wonder2991
Jul 14 2017 06:48
parseInt()
Akhilesh HM
@Akhiluoldfort15
Jul 14 2017 06:48
I understand Strings are immutables but the property of an object though it is holding string value can be changed. Is there any explanation why this difference is?
ilyasofficial
@ilyasofficial1617
Jul 14 2017 06:50
i want to change value to string (and vice versa)
to be used in html id to algorithm
Manish Giri
@Manish-Giri
Jul 14 2017 06:52
@Akhiluoldfort15 consider this
`let test = "abc";`
ilyasofficial
@ilyasofficial1617
Jul 14 2017 06:52
so that i dont have to re-enter each parameter to a each element
Manish Giri
@Manish-Giri
Jul 14 2017 06:52
you can't do `test[0] = "b";`
right?
but you can do `test = "bbc";`
Akhilesh HM
@Akhiluoldfort15
Jul 14 2017 06:52
@Manish-Giri Yes
wonder
@wonder2991
Jul 14 2017 06:52
@ilyasofficial1617 toString
parseInt
Manish Giri
@Manish-Giri
Jul 14 2017 06:52
that's what it is changing
you're just taking the reference to a string object and pointing it to a different string object
Akhilesh HM
@Akhiluoldfort15
Jul 14 2017 06:53
@Manish-Giri Oh okie…..It is like creating new string and assign it back to it
Manish Giri
@Manish-Giri
Jul 14 2017 06:53
yup
Akhilesh HM
@Akhiluoldfort15
Jul 14 2017 06:54
@Manish-Giri That helps….Thanks a lot for quick help :+1:
Manish Giri
@Manish-Giri
Jul 14 2017 06:54
:+1:
ilyasofficial
@ilyasofficial1617
Jul 14 2017 06:55
@wonder2991 thanks :smile:
CamperBot
@camperbot
Jul 14 2017 06:55
ilyasofficial1617 sends brownie points to @wonder2991 :sparkles: :thumbsup: :sparkles:
:cookie: 406 | @wonder2991 |http://www.freecodecamp.com/wonder2991
wonder
@wonder2991
Jul 14 2017 06:56
:thumbsup:
xiaoyimeng
@xiaoyimeng
Jul 14 2017 07:20
<img <a href="http://freecatphotoapp.com">link to cat photos </a>
what‘s wrong，please
wonder
@wonder2991
Jul 14 2017 07:24
@xiaoyimeng what's are you trying to do?
<img src="some.jpg"> <a href="url">some text</a>
xiaoyimeng
@xiaoyimeng
Jul 14 2017 07:31
@wonder2991 Passed,thankyou~
Karl Wills
@karlwills
Jul 14 2017 07:39
@karlwills
Hey all, currently working on the 'Smallest Common Multiple' task and have managed to get my code running and working in my Chrome sources panel. However when I run the code on FCC, I get the following:
Just wondering if anyone could help and let me know what could be causing this?
wonder
@wonder2991
Jul 14 2017 07:44
have you tried refreshing the browser
Karl Wills
@karlwills
Jul 14 2017 07:45
@wonder2991 yeah
wonder
@wonder2991
Jul 14 2017 07:47
paste your code here @karlwills
Pieter Stokkink
@forkerino
Jul 14 2017 07:48
@karlwills I don't know exactly which ; is causing the problem. How I would solve this issue: comment out the do/while loop and see if you still have this problem. If not, comment out the for loop inside it and check. Try to isolate the problem. You can comment out sections by selecting lines and pressing ctrl + /
Alexander R Bott
@Abott1222
Jul 14 2017 07:49
please rate your bash skills from 0 holy hell to 10 godlike
Pieter Stokkink
@forkerino
Jul 14 2017 07:51
@karlwills you might also click on the error in the console: smallest-common-multiple:33
Pieter Stokkink
@forkerino
Jul 14 2017 08:00
@Abott1222 3-ish, but recently switched to Ubuntu, so growing quickly.
Karl Wills
@karlwills
Jul 14 2017 08:15
hmm, it does seem to be my do while loop but can't seem to narrow it down 🤔
Pieter Stokkink
@forkerino
Jul 14 2017 08:16
@karlwills can you copy paste your code here, so I can plug it into FCC?
Karl Wills
@karlwills
Jul 14 2017 08:17
yeah sure
``````function smallestCommons(arr) {
arr.sort(function(a,b) {
return b - a;
});

var newArr = [];

for (var i = arr[0]; i >= arr[1]; i--) {
newArr.push(i);
}

var quot = 0;
var loop = 1;
var n;

do {
quot = newArr[0] * loop * newArr[1];
for (n = 2; n < newArr.length; n++) {
if (quot % newArr[n] !== 0) {
break;
}
}

loop++;

} while (n !== newArr.length);

return quot;
}

smallestCommons([1,13]);``````
Pieter Stokkink
@forkerino
Jul 14 2017 08:19
@karlwills apparently it chokes on the ; after `while (n !== newArr.length)`
This is a bug
cause it's valid syntax
Karl Wills
@karlwills
Jul 14 2017 08:20
Could I please ask how you found that out @forkerino ?
So my code is good?
Pieter Stokkink
@forkerino
Jul 14 2017 08:20
yes
maybe not the most efficient, but it gets the job done
@karlwills I found it by clicking the error message and seeing that it was on a line with while.
The FCC engine will probably parse the code somehow. I'm not entirely sure how it works behind the scenes.
Karl Wills
@karlwills
Jul 14 2017 08:22
ok thanks, is there anything I can do to get this to pass?
or should I look for another solution?
Pieter Stokkink
@forkerino
Jul 14 2017 08:22
@karlwills you can remove the ; after your `while (n !== newArr.length)`
it passes
@karlwills it does give a warning in your code window
but you can ignore it
Karl Wills
@karlwills
Jul 14 2017 08:23
ok thanks @forkerino
CamperBot
@camperbot
Jul 14 2017 08:23
karlwills sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2837 | @forkerino |http://www.freecodecamp.com/forkerino
Pieter Stokkink
@forkerino
Jul 14 2017 08:23
@karlwills one request: could you file a bug report? Saying that it doesn't work with the ; there?
Karl Wills
@karlwills
Jul 14 2017 08:23
yeah sure
Pieter Stokkink
@forkerino
Jul 14 2017 08:23
even though it is valid syntax
Karl Wills
@karlwills
Jul 14 2017 08:23
how do I file a bug report please?
Pieter Stokkink
@forkerino
Jul 14 2017 08:23
hmmm. there used to be a button for that.
Karl Wills
@karlwills
Jul 14 2017 08:24
Yeah I thought that too, there doesn't seem to be one anymore
Pieter Stokkink
@forkerino
Jul 14 2017 08:24
nvm, I'll do it
Karl Wills
@karlwills
Jul 14 2017 08:24
you sure? I don't mind if there is somewhere
I appreciate you taking the time to help me
Pieter Stokkink
@forkerino
Jul 14 2017 08:25
@karlwills no problem. I see they already fixed it for the beta.
so it was a known issue
do...while loops are not so common, so I guess they just let it be for the current version
Karl Wills
@karlwills
Jul 14 2017 08:29
ok thanks. I need to learn a bit more about more 'performant' code by the sounds of it too
I had to look at the hints for that task to help me. I understand the syntax but working out how something should work baffles me sometimes
Pieter Stokkink
@forkerino
Jul 14 2017 08:30
@karlwills It's definitely not the worst and since it passes the tests, it is relatively performant.
@karlwills the way I did it was to create a range of numbers much like you, then I used a .reduce and found the smallest common multiple of two numbers, then of the result of that and the next number and so on, until the end of the range.
Karl Wills
@karlwills
Jul 14 2017 08:53
ah that makes sense, thanks for your help @forkerino
CamperBot
@camperbot
Jul 14 2017 08:53
karlwills sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:warning: karlwills already gave forkerino points
MightyGarhem
@MightyGarhem
Jul 14 2017 09:02
How can I have ''Im Mighty'', ''My work'' and ''contact'' next to each other? https://codepen.io/MightyGarhem/pen/QgVmga?editors=1100
Johnny
@JohnnyBizzel
Jul 14 2017 09:09
@MightyGarhem change the <p> tags to <span> tags
MightyGarhem
@MightyGarhem
Jul 14 2017 09:10
@JohnnyBizzel still doesnt work
Johnny
@JohnnyBizzel
Jul 14 2017 09:11
@MightyGarhem shame :(
@MightyGarhem Put them in the same <p> with a small font?
MightyGarhem
@MightyGarhem
Jul 14 2017 09:15
@JohnnyBizzel No they should be seperated, you cant put them in the same p
Adit
@adittyagi
Jul 14 2017 09:15
Anyone who could help me with JAVA ?
Johnny
@JohnnyBizzel
Jul 14 2017 09:16
@adittyagi Are you a glutton for punishment?
Adit
@adittyagi
Jul 14 2017 09:17
NO not really !
Claudio Restifo
@Marmiz
Jul 14 2017 09:17
@MightyGarhem 3 things:
1: if you implement a grid system you need a `container` class parent. You have none.
2: it's `col-md-*` and not `.col-md-*` (the dot)
3: you gave those divs a `-350px` margin top. Remove it and you'll see them as a grid
Adit
@adittyagi
Jul 14 2017 09:18
@JohnnyBizzel btw what kind of punishment ?
Johnny
@JohnnyBizzel
Jul 14 2017 09:18
@adittyagi stress, stress and more stress
alinadir
@alinadir
Jul 14 2017 09:19
hi everybody, good days!
Adit
@adittyagi
Jul 14 2017 09:19
@JohnnyBizzel hahaha no !
alinadir
@alinadir
Jul 14 2017 09:19
i got stuck about challange that is "show local weather ".
Ene Catalin
@EneCatalin
Jul 14 2017 09:20
@alinadir tying to do it in java ?
alinadir
@alinadir
Jul 14 2017 09:20

i couldnt get data from this link https://fcc-weather-api.glitch.me/api/current?lat=35&lon=139 var lat;
var lon;

\$.ajax({
url: 'https://fcc-weather-api.glitch.me/api/current?lat=35&lon=139',
type: 'GET',
datatype: 'jsonapi',
success: function(location) {
var lat=location.base;
document.getElementById("a").innerHTML = lat;
}
});

MightyGarhem
@MightyGarhem
Jul 14 2017 09:20
@Marmiz Thanks! I have a grid now, but how do I place it at the top of the page?
CamperBot
@camperbot
Jul 14 2017 09:20
mightygarhem sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:cookie: 995 | @marmiz |http://www.freecodecamp.com/marmiz
Johnny
@JohnnyBizzel
Jul 14 2017 09:21
@alinadir this looks wrong `datatype: 'jsonapi',`
but I use .getJSON() so I don't know.
alinadir
@alinadir
Jul 14 2017 09:21

var lat;
var lon;

\$.ajax({
url: 'https://fcc-weather-api.glitch.me/api/current?lat=35&lon=139',
type: 'GET',
datatype: 'json',
success: function(location) {
var lat=location.base;
document.getElementById("a").innerHTML = lat;
}
});

Ene Catalin
@EneCatalin
Jul 14 2017 09:21
alinadir
@alinadir
Jul 14 2017 09:21
i fix it @JohnnyBizzel
Claudio Restifo
@Marmiz
Jul 14 2017 09:22
@MightyGarhem like a navbar? Since I saw you are using Bootstrap why not looking into `nav` and `navbar` components examples?
But if you just want a fixed "something" on top all you need is in CSS `position: absolute top:0` and you'll always have it on top no matter what
alinadir
@alinadir
Jul 14 2017 09:22
thanks @EneCatalin i read now
CamperBot
@camperbot
Jul 14 2017 09:22
alinadir sends brownie points to @enecatalin :sparkles: :thumbsup: :sparkles:
:cookie: 436 | @enecatalin |http://www.freecodecamp.com/enecatalin
Adit
@adittyagi
Jul 14 2017 09:23
What all I can do with JAVA ?
ATM I only know core java.
Sorry for the silly question!
Johnny
@JohnnyBizzel
Jul 14 2017 09:30
@adittyagi This is Free Code Camp. We don't do JAVA here.
No offence but why do you come onto a chat room from a school that doesn't teach Java and start asking about Java?
Are there no Java forums?
...silence...
MightyGarhem
@MightyGarhem
Jul 14 2017 09:39
How do I center the menu buttons to the center instead of left? https://codepen.io/MightyGarhem/pen/QgVmga?editors=1100
Adel
@AdelMahjoub
Jul 14 2017 09:45
@MightyGarhem , in your `.w3-bar`, try if it is what you want
``````display: flex;
justify-content: space-between;``````
MightyGarhem
@MightyGarhem
Jul 14 2017 09:51
@AdelMahjoub thanks ! how do i remove some of the space between te buttons?
CamperBot
@camperbot
Jul 14 2017 09:51
mightygarhem sends brownie points to @adelmahjoub :sparkles: :thumbsup: :sparkles:
:cookie: 491 | @adelmahjoub |http://www.freecodecamp.com/adelmahjoub
Adel
@AdelMahjoub
Jul 14 2017 09:53
@MightyGarhem try `justify-content: space-around`
Zeke
@Zerech124
Jul 14 2017 10:00
Hey where do I even start to build my tribute page, I have no clue how to even set it up
Bilal Mahmood Malik
@BilalMalik10
Jul 14 2017 10:00
@MightyGarhem if you are using bootstrap use this class to remove spaces between the buttons. btn-group
Zeke
@Zerech124
Jul 14 2017 10:01
I have my codepen set up and everything
but Im not even sure how to setup the actual Tribute page with HTML or CSS
wonder
@wonder2991
Jul 14 2017 10:02
Pieter Stokkink
@forkerino
Jul 14 2017 10:03
@wonder2991 rather than 'invalid operation', why don't you just disable the . button if there has been one entered already?
@wonder2991 If I type .1 + .2 the + disappears.
wonder
@wonder2991
Jul 14 2017 10:05
@forkerino yeah. lemme fix that. thanks.
CamperBot
@camperbot
Jul 14 2017 10:05
wonder2991 sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2840 | @forkerino |http://www.freecodecamp.com/forkerino
Pieter Stokkink
@forkerino
Jul 14 2017 10:06
@wonder2991 If I do one calculation and start typing a number, I think it shouldn't be added to the end of the previous result. I think it should just start again with a new number. Only keep the result if the next button is an operator (*+-/)
:+1:
Bilal Mahmood Malik
@BilalMalik10
Jul 14 2017 10:08
upon starting new calculation. it keeps on adding into the previous calculation.
wonder
@wonder2991
Jul 14 2017 10:08
hmm. Alright. Working on it. thanks. @BilalMalik10 @forkerino
CamperBot
@camperbot
Jul 14 2017 10:08
wonder2991 sends brownie points to @bilalmalik10 and @forkerino :sparkles: :thumbsup: :sparkles:
:warning: wonder2991 already gave forkerino points
:cookie: 118 | @bilalmalik10 |http://www.freecodecamp.com/bilalmalik10
alinadir
@alinadir
Jul 14 2017 10:24
hi everybody
how can i take data from this link ("https://fcc-weather-api.glitch.me/api/current?lat=35&lon=139")
i couldnt get them

var lat;
var lon;

\$.ajax({
url: 'https://fcc-weather-api.glitch.me/api/current?lat=35&lon=139',
type: 'GET',
datatype: 'json',
success: function(location) {
var lat=location.name;
document.getElementById("a").innerHTML = lat;
}
});

Pethaf
@Pethaf
Jul 14 2017 10:29
@alinadir The return doesn't seem to include a name.
Pieter Stokkink
@forkerino
Jul 14 2017 10:29
@Pethaf near the end
Pethaf
@Pethaf
Jul 14 2017 10:29
Oh it does.
I didn't look properly, again.
Pieter Stokkink
@forkerino
Jul 14 2017 10:30
@Pethaf my JSON viewer doesn't pick it up either, so had to look extra closely
@alinadir what happens if you console.log(location) inside your success function?
can you check that the data comes in?
alinadir
@alinadir
Jul 14 2017 10:31
there is no data
but i couldnt enderstand why.
understand
Pethaf
@Pethaf
Jul 14 2017 10:32
I think I battled a lot with this as well.
At the end I just used google maps api to get the location.
alinadir
@alinadir
Jul 14 2017 10:33
how should i change my codes?
i need local weather information depend on lat and lon
Pieter Stokkink
@forkerino
Jul 14 2017 10:43
@alinadir I can get it to work using \$.getJSON (instead of \$.ajax) and adding `&callback=?` at the end of the url. This wraps the json in a function and can prevent Cross Origin problems in some cases.
this might also work with \$.ajax: https://learn.jquery.com/ajax/working-with-jsonp/
alinadir
@alinadir
Jul 14 2017 10:53
thank you @forkerino i really got stuck. i think i dont understand general purpose of APIs
CamperBot
@camperbot
Jul 14 2017 10:53
alinadir sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2841 | @forkerino |http://www.freecodecamp.com/forkerino
Pieter Stokkink
@forkerino
Jul 14 2017 10:57
@alinadir the purpose of API's is to fetch data from a server which you can then use on your frontend to display something to the user (there are other usecases, and it can happen in the backend too, but let's not get ahead of ourselves). In this case, you get the weather data from a server and use it on your page.
PeetaJ
@PeetaJ
Jul 14 2017 10:59
Hello guys, I really need help since I'm losing my mind over this. I'm trying to use API for my random quote machine. But everytime I request data (through \$.getJSON or fetch() ) I get CORS error : The 'Access-Control-Allow-Origin' header contains multiple values '*, http://null', but only one is allowed. Origin 'null' is therefore not allowed access. What am I supposed to do?
Djordje Lozo
@djordjelozo
Jul 14 2017 11:03
Hey guys i have one question for you
How can i put picture and initials in same row
Words left picture right
Thanks alot if someone could help me
Is there someone who could help hahaha
Pieter Stokkink
@forkerino
Jul 14 2017 11:08
@PeetaJ do you have your code on codepen or something?
Bilal Mahmood Malik
@BilalMalik10
Jul 14 2017 11:15
@djordjelozo Use css float:right or float:left property
Djordje Lozo
@djordjelozo
Jul 14 2017 11:15
Look this
Idk how to put it in same row
Bilal Mahmood Malik
@BilalMalik10
Jul 14 2017 11:20
@djordjelozo insert initials after image tag.
Stephen James
@sjames1958gm
Jul 14 2017 11:22
@djordjelozo
``````.inicijali {
padding: 40px;
font-size: 50px;
display:inline;  << add this?
}``````
Djordje Lozo
@djordjelozo
Jul 14 2017 11:22
I did it thanks
But i dont undetstand why i did it
Stephen James
@sjames1958gm
Jul 14 2017 11:23
@djordjelozo display modes are inline and block, with block it assumes a "new line" after the element
with inline it does not.
Djordje Lozo
@djordjelozo
Jul 14 2017 11:25
Thanks alot
Stephen James
@sjames1958gm
Jul 14 2017 11:29
@djordjelozo :+1:
Hamza Saleemi
@Azmah21
Jul 14 2017 11:44
hey
can anyone help me with my nav?
I used flexbox to make it but the li elements keep overflowing out of the header
Victor Popescu
@VicPopescu
Jul 14 2017 11:47
@Azmah21 maybe
``````* {
box-sizing: border-box;
}``````
Hamza Saleemi
@Azmah21
Jul 14 2017 11:49

``@media (min-width: 500px) {
header {
background-color: #fff;
}

nav ul {
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
padding-left: 0;
}
nav li {
width: 25%;
}
}``

Victor Popescu
@VicPopescu
Jul 14 2017 11:49
use 3 ``` on a separate line
Hamza Saleemi
@Azmah21
Jul 14 2017 11:49
``````header {
display:flex;
flex-direction: column;
align-items: center;
background-color: #fff;
}

nav ul{
display: flex;
flex-direction: column;
font-family: 'Montserrat', sans-serif;
}
nav li {
padding: 0.9em;
flex-grow: 1;
text-align: center;
}

nav a {
padding: 0.9em 4em;
text-decoration: none;
color:#000;
}

nav a:hover {
background-color: #d9d9d9;
}

.logo {
flex-grow: 1;
}
@media (min-width: 500px) {
header {
background-color: #fff;
}

nav ul {
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
padding-left: 0;
}
nav li {
width: 25%;
}
}``````
Victor Popescu
@VicPopescu
Jul 14 2017 11:50
@Azmah21 and you can edit your code, dont repost it
Hamza Saleemi
@Azmah21
Jul 14 2017 11:50
@VicPopescu ohkay sorry
Harsh Rai
@harshTTH
Jul 14 2017 11:58
any redux guy here?
Pieter Stokkink
@forkerino
Jul 14 2017 12:01
@harshTTH I've been working with it a bit in the past weeks
but in an Angular app
Harsh Rai
@harshTTH
Jul 14 2017 12:02
i hava a question does react-redux's connect function automatically subscribes to the store for a given component?
Pieter Stokkink
@forkerino
Jul 14 2017 12:03
@harshTTH I really have to dig in my memory, but I think you need to also have a Provider
Harsh Rai
@harshTTH
Jul 14 2017 12:05
@forkerino ya i have that , but my component not rerenders so i thought that might be due to the fact that i have not subscribed to the store
Pieter Stokkink
@forkerino
Jul 14 2017 12:08
@harshTTH did you also pass in the mapStateToProps ?
@harshTTH some more knowledgeable people are over at https://gitter.im/FreeCodeCamp/HelpDataViz
Harsh Rai
@harshTTH
Jul 14 2017 12:08
@forkerino ya and that's working
@forkerino ok , should get over to there
Pieter Stokkink
@forkerino
Jul 14 2017 12:14
@harshTTH good luck
pranshu24
@pranshu24
Jul 14 2017 12:32
hello
i mined etc for on the same adress of my eth .but i am not getting any etc into my wallet . where i m able to find my etc.
Pieter Stokkink
@forkerino
Jul 14 2017 12:35
@pranshu24 this has nothing to do with FreeCodeCamp
look for the ethereum room
pranshu24
@pranshu24
Jul 14 2017 12:36
okay
sorry for the trouble
Pieter Stokkink
@forkerino
Jul 14 2017 12:37
no problem
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:42
hey campers
Kyle Holm
@thekholm80
Jul 14 2017 13:42
@ReactorboY :wave:
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:42
@thekholm80 hey man whatsup ?
Kyle Holm
@thekholm80
Jul 14 2017 13:42
trying to wake up lol
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:43
on what you're working ?
Kyle Holm
@thekholm80
Jul 14 2017 13:43
i'm building a game
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:43
js ?
Kyle Holm
@thekholm80
Jul 14 2017 13:43
yeah
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:43
completed ?
Kyle Holm
@thekholm80
Jul 14 2017 13:43
maybe 1/3 of the way done
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:43
can I see ?
Kyle Holm
@thekholm80
Jul 14 2017 13:44
not a lot to look at right now, all i've got done is a chat room
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:44
game with a chat room
!
Kyle Holm
@thekholm80
Jul 14 2017 13:45
yeah, it's a social, multiplayer game
a card game
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:45
any good way to increase problem solving skil
Kyle Holm
@thekholm80
Jul 14 2017 13:45
practice, practice, practice
i use codewars.com for that
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:46
where you have learned basic
Kyle Holm
@thekholm80
Jul 14 2017 13:46
doing the FCC lessons
here's what my app looks like right now
pretty basic, won't style it until it's all working
Koleen BP
@KBPsystem777
Jul 14 2017 13:48
I can create a global variable
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:49
chat against humanity ? :shipit:
Kyle Holm
@thekholm80
Jul 14 2017 13:49
@ReactorboY the card game is called Cards Against Humanity
@KBPsystem777 show your code?
Muhammad Hussain
@ReactorboY
Jul 14 2017 13:49
basically what it does ??
Koleen BP
@KBPsystem777
Jul 14 2017 13:50

@thekholm80

function myLocalScope() {
'use strict';
var myVar = 37;
console.log(myVar);

}
myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope

var myVar = 37;
// Now remove the console log line to pass the test

thats my code @thekholm80
Kyle Holm
@thekholm80
Jul 14 2017 13:50
`// Now remove the console log line to pass the test` do this
Koleen BP
@KBPsystem777
Jul 14 2017 13:51
@thekholm80 I just did that and error says:

function myLocalScope() {
'use strict';
var myVar = 37;
console.log(myVar);

}
myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope

var myVar = 37;
// Now remove the console log line to pass the test

Kyle Holm
@thekholm80
Jul 14 2017 13:51
you have `var myVar` twice, it should only be inside the function
Koleen BP
@KBPsystem777
Jul 14 2017 13:53
@thekholm80 there's 2 console.log line which part you think needs to be removed?
Kyle Holm
@thekholm80
Jul 14 2017 13:53
the one outside the function
Koleen BP
@KBPsystem777
Jul 14 2017 13:55

@thekholm80 this is my code now:

function myLocalScope() {
'use strict';

var myVar = 37;

console.log(myVar);
}

myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope
//console.log(myVar);

// Now remove the console log line to pass the test

**still not passing the global variable

Kyle Holm
@thekholm80
Jul 14 2017 13:56
your code passed for me, try resetting your challenge
Koleen BP
@KBPsystem777
Jul 14 2017 13:57
thanks @thekholm80 I passed it. I've been stucked here since monday :P
CamperBot
@camperbot
Jul 14 2017 13:57
kbpsystem777 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1333 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Jul 14 2017 13:57
@KBPsystem777 that lesson is not written very well, it's very confusing
Muhammad Hussain
@ReactorboY
Jul 14 2017 14:12
@thekholm80 still here ?
Margaret
@Margaret2
Jul 14 2017 14:15
lol why do so many people come in here for ethereum help :joy:
Kyle Holm
@thekholm80
Jul 14 2017 14:17
@ReactorboY yep
@Margaret2 i have no idea what that is lol
Margaret
@Margaret2
Jul 14 2017 14:18
@thekholm80 it's a cryptocurrency, like bitcoin
Kyle Holm
@thekholm80
Jul 14 2017 14:18
ah, the next big thing
Margaret
@Margaret2
Jul 14 2017 14:18
yep..
Kyle Holm
@thekholm80
Jul 14 2017 14:18
many millionaires in the making
brb, gonna start mining
@Margaret2 x
Margaret
@Margaret2
Jul 14 2017 14:21
haha that dog is smart :smile:
Kyle Holm
@thekholm80
Jul 14 2017 14:22
gonna be fat soon, too
Joshua Friedman
@jsf2008
Jul 14 2017 14:29
Hey! If I'm working on the weather project. I am having a problem with my console not running anything. Can someone please help me figure out why?
According to the video I watched, it had something to do with weathermap being http and codepen being https
Muhammad Hussain
@ReactorboY
Jul 14 2017 14:34
@thekholm80 where to start first for problem solving ?
Ene Catalin
@EneCatalin
Jul 14 2017 14:48
guys
did you know about googlehost ?
Margaret
@Margaret2
Jul 14 2017 14:49
is it related to google Sites?
Stephen James
@sjames1958gm
Jul 14 2017 14:51
@jsf2008 Unfortunately you cannot use http APIs inside of https site like codepen.
PatrickHennessey
@PatrickHennessey
Jul 14 2017 14:51
Hi everyone! I am having an issue with a button border not being even with the button next to it despite the fact they are using the same css. Can someone look at the site and see if they see an issue? http://phennesseytestsites.com/moniquewonderly/research_profile_test.html

@yalishiduode
Jul 14 2017 14:51
<a href="freecatphotoapp.com">cat photos</a> is there somthing wrong？
Ene Catalin
@EneCatalin
Jul 14 2017 14:52
it's supposed to be free hosting
you know, for little projects
PatrickHennessey
@PatrickHennessey
Jul 14 2017 14:52
All the buttons are on the bottom right of each publication box. The right one has a fraction of a pixel bottom boder.
Margaret
@Margaret2
Jul 14 2017 14:54
@yalishiduode you probably need whatever it starts with `http` or `https://` or something
May Kittens Devour Your Soul
@diomed
Jul 14 2017 14:54
link me, big bird @EneCatalin
Margaret
@Margaret2
Jul 14 2017 14:55
@EneCatalin I just realized...
when people do :9 it's probably a typo for `:(`
all this time i've been thinking :9 is a separate emoticon and trying to figure it out :joy:
Stephen James
@sjames1958gm
Jul 14 2017 14:55
@jsf2008 You can use 'https://ipinfo.io' - for location, but most have switched to darksky to get past the no free https open weather api
May Kittens Devour Your Soul
@diomed
Jul 14 2017 14:55

@yalishiduode
Jul 14 2017 14:56

you are right,thinks

@Margaret2

Margaret
@Margaret2
Jul 14 2017 14:56
:candy: :candy:
Ene Catalin
@EneCatalin
Jul 14 2017 14:57
you sure :9 is not an emoji ?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 14:57
@Margaret2 @EneCatalin last night I watched a movie about :cat: in space and the woman who saved it
Margaret
@Margaret2
Jul 14 2017 14:57
is it ? @EneCatalin
@diomed last night I dreamed about Jin and Rap Monster
sounds like a cool movie
May Kittens Devour Your Soul
@diomed
Jul 14 2017 14:58
yeah. it's called Alien
Margaret
@Margaret2
Jul 14 2017 14:59
horror? :(

@yalishiduode
Jul 14 2017 14:59
yeah,I should be more serious
May Kittens Devour Your Soul
@diomed
Jul 14 2017 14:59
@Margaret2 it's not a horror. :cat: survived
Joshua Friedman
@jsf2008
Jul 14 2017 15:00
Thank you @sjames1958gm Checking out darksky now!
CamperBot
@camperbot
Jul 14 2017 15:00
jsf2008 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8067 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Joshua Friedman
@jsf2008
Jul 14 2017 15:02
can I still use https for info.io?
@sjames1958gm would you be able to walk me through how to write the \$.getJSON for darksky?
Stephen James
@sjames1958gm
Jul 14 2017 15:07
@jsf2008 You can use https for ipinfo.io
I am at work, so I am only on/off perodically
Joshua Friedman
@jsf2008
Jul 14 2017 15:08
that's understandable. Thanks! doing the open weather map was pretty clear and dry with adding the lat + Lon so it be generated for any user, but this one is a bit different.
Ene Catalin
@EneCatalin
Jul 14 2017 15:08
@diomed just google that
it should work
googiehost
wait
OMG
it's not google
it's googie
wtf did I just do
google needs to buy that shit out, the name tricked me :|
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:09
@EneCatalin man ,u're telling me some dangerous stuff I mean,come on
Joshua Friedman
@jsf2008
Jul 14 2017 15:12
```var API_KEY = "02749b5269b1ec2a26fd0fa7956a645e"; \$(function(){ var loc; \$.getJSON('https://ipinfo.io', function(d) { data = d.loc.split(","); console.log(loc); }); });```
Still comes back undefined in my console why....
as for the API key. Im in a federal building =p not much use in caring about that haha
Ene Catalin
@EneCatalin
Jul 14 2017 15:13
cat
how can I become a php god like you ?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:19
just install wordpress & u're a php god already
Ene Catalin
@EneCatalin
Jul 14 2017 15:20
hur hur har har
cat hiding his secrets
@jsf2008 don't share your api key maybe ?
oh, just read the next line
Joshua Friedman
@jsf2008
Jul 14 2017 15:22
Yeah coding at work is nice. Don't have to worry too much about that.
Ene Catalin
@EneCatalin
Jul 14 2017 15:23
eh, worst case the key gets blocked
Joshua Friedman
@jsf2008
Jul 14 2017 15:24
pretty much but before that, I'd like to at least get this project done. I can always make a new one later. I'm having a problem formatting the dark sky link currently
Pavel Sokolov
@nevaljawko
Jul 14 2017 15:24
Hi chaps! I need to do Multations task.
But 3 of 9 tests don't pass. Could you tell me the reason?
``````function mutation(arr) {
var tester = arr[0].toLowerCase();
var check = arr[1].toLowerCase();

for (var i = 0; i < tester.length; i++) {
if (tester.indexOf(check[i]) < 0) return false;
}
return true;
}

mutation(["hello", "hell"]); // returns false but have to be true``````
Margaret
@Margaret2
Jul 14 2017 15:28
@nevaljawko
because ...
what happens if you get to the end of `tester` but you haven't checked all the letters in `check` ?
or ..
what happens if `tester`is longer than `check`, so eventually you get to where `check[i]` doesn't exist?
better to use something like `.filter()` and `.includes()` for this one
rather than a for loop
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:30
@EneCatalin so what's the deal with this free hosting? send links, u infidel bird
Pavel Sokolov
@nevaljawko
Jul 14 2017 15:30
@Margaret2 thank you friend! but I already coped with it. I replaced check.length instead of tester.length and it's working now
CamperBot
@camperbot
Jul 14 2017 15:30
nevaljawko sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:star2: 2855 | @margaret2 |http://www.freecodecamp.com/margaret2
Stephen James
@sjames1958gm
Jul 14 2017 15:30
@nevaljawko you are testing with tester.length, but using i with the array check[i]
never mind :)
Ene Catalin
@EneCatalin
Jul 14 2017 15:30
I am waiting to get approved
but I think they let you host a free site
ima try to do that for testing
I want to do a few challanges then create a blog but you know with post and shit
then maybe a forum
or a primitive reddit
just to learn :D
no wordpress/drupal whatever the f
pure php then later laravel if I don't give up
WJ06
@WJ06
Jul 14 2017 15:32
Hi all, how can i send a picture of code here, i wrote it on paper and i want to find the easiest way to post it here
Pavel Sokolov
@nevaljawko
Jul 14 2017 15:32
@sjames1958gm thx anyway, I just was little bit quicker ;)))
CamperBot
@camperbot
Jul 14 2017 15:32
nevaljawko sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8068 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Margaret
@Margaret2
Jul 14 2017 15:33
@WJ06 are you working on an FCC challenge?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:33
@EneCatalin send bloody link already
Margaret
@Margaret2
Jul 14 2017 15:34
@diomed bloody google it yourself already
:smile:
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:34
bloody squid
:yum:
Margaret
@Margaret2
Jul 14 2017 15:34
:octocat:
NIKHILESHWARI NASIKA
@nikhileshwarinasika
Jul 14 2017 15:35
hey all
Make sure you have nested all HTML elements in .container-fluid.
WJ06
@WJ06
Jul 14 2017 15:36
@Margaret2 oh nope, i'm reading a book and i find it difficult to understand so i want to post here to be helped with them :D
NIKHILESHWARI NASIKA
@nikhileshwarinasika
Jul 14 2017 15:36
how to solve this?
Margaret
@Margaret2
Jul 14 2017 15:39
@WJ06 if it's short, you can just type it in here, but this room is mainly for FCC help
Ene Catalin
@EneCatalin
Jul 14 2017 15:39
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:39
googie
lol
Ene Catalin
@EneCatalin
Jul 14 2017 15:39
yeah
I got tricked
NIKHILESHWARI NASIKA
@nikhileshwarinasika
Jul 14 2017 15:40
i solved it by myself ...lol!!:)
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:40
very nice. thanks ostrich @EneCatalin
CamperBot
@camperbot
Jul 14 2017 15:40
diomed sends brownie points to @enecatalin :sparkles: :thumbsup: :sparkles:
:cookie: 437 | @enecatalin |http://www.freecodecamp.com/enecatalin
WJ06
@WJ06
Jul 14 2017 15:42
Here is it:
Margaret
@Margaret2
Jul 14 2017 15:45
@nikhileshwarinasika good for you!
shivam gupta
@shivamg11000
Jul 14 2017 15:45
anyone experienced with unsplash api
WJ06
@WJ06
Jul 14 2017 15:46
Hey how can i get a spacing between line, i'm using smartphone !!
Margaret
@Margaret2
Jul 14 2017 15:47
@WJ06 you probably need to switch to the computer
or type it in another app and then paste it
WJ06
@WJ06
Jul 14 2017 15:49
@Margaret2 okay tks :D
WJ06
@WJ06
Jul 14 2017 15:54
var balance = 10500;
var cameraOn = true;
function steal(balance, amount) {
cameraOn = false;
if (amount < balance) {
balance = balance - amount;
}
return amount;
cameraOn = true;
}
var amount = steal(balance, 1200);
alert("Criminal: you stole " + amount + "!");
There are some
Falses in these lines of code, can someone help me to define it and explain pls ??!
May Kittens Devour Your Soul
@diomed
Jul 14 2017 15:58
Margaret
@Margaret2
Jul 14 2017 16:01
@WJ06 you can set a variable to be either `true` or `false`, that's called a Boolean value https://developer.mozilla.org/en-US/docs/Glossary/Boolean
in this case it's kind of a joke, it's like the robber is turning the camera on and off
@diomed 🤔
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:02
@Margaret2 u can't say that it isn't
Margaret
@Margaret2
Jul 14 2017 16:03
@diomed it isn't
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:03
that woman is boss of IT department
she'd know
Margaret
@Margaret2
Jul 14 2017 16:03
@diomed my grandma is boss of IT dept
i'll ask her :smiling_imp:
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:03
oh wow!
how come u never mention your mum
Margaret
@Margaret2
Jul 14 2017 16:04
what?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:04
nothing
never mind
madhuri soni
@sonimadhuri
Jul 14 2017 16:04
@WJ06 `cameraOn = true;` will never be executed bacause you have put it after the return statement
Margaret
@Margaret2
Jul 14 2017 16:05
ah that's also true lol
@sonimadhuri he said it's an example from a book
madhuri soni
@sonimadhuri
Jul 14 2017 16:07
@Margaret2 maybe he had modified the example code
WJ06
@WJ06
Jul 14 2017 16:10
@sonimadhuri okay, can u find out some more ?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:10
Margaret
@Margaret2
Jul 14 2017 16:11
:joy: :joy: a policeman scared of a turtle :joy:
WJ06
@WJ06
Jul 14 2017 16:11
@Margaret2 what do you mean by "turning camera on and off", i don't get it !!
In the book, it mentioned 2 errors, that are shadowed variable and something with 'amount'
Margaret
@Margaret2
Jul 14 2017 16:12
@WJ06 when it says `cameraOn = true;`, you're supposed to imagine that the camera is on.
when it says `cameraOn = false;` you're supposed to imagine that the camera is off
it's like a yes or no question - Is the camera on? `true` means yes and `false` means no
madhuri soni
@sonimadhuri
Jul 14 2017 16:13
@WJ06 balance is declared outside your function so it is global .you need not pass it to the function it can be used by the function directly
Margaret
@Margaret2
Jul 14 2017 16:14
@sonimadhuri that's not good practice though, you should always be clear about what inputs your function has

@WJ06 but the errors are probably from what @sonimadhuri said above

cameraOn = true; will never be executed bacause you have put it after the return statement

madhuri soni
@sonimadhuri
Jul 14 2017 16:17
@Margaret2 i suggested it because he mentioned about shadowed variable
Margaret
@Margaret2
Jul 14 2017 16:17
@sonimadhuri didn't you suggest it before he mentioned a shadowed variable
madhuri soni
@sonimadhuri
Jul 14 2017 16:18
no i dont think so
Margaret
@Margaret2
Jul 14 2017 16:19
oh good grief, you said that at 11:04 CDT, he said "shadowed variable" at 11:11, 7 minutes later
Kyle Holm
@thekholm80
Jul 14 2017 16:20
:popcorn:
Margaret
@Margaret2
Jul 14 2017 16:20
lol i'm just annoyed :P
Kyle Holm
@thekholm80
Jul 14 2017 16:21
i'm very upset that emoji does not exist
Margaret
@Margaret2
Jul 14 2017 16:21
:corn: :dash: ?
:joy:
Kyle Holm
@thekholm80
Jul 14 2017 16:21
:fire: :corn:
Margaret
@Margaret2
Jul 14 2017 16:21
:o
WJ06
@WJ06
Jul 14 2017 16:23
Why are you guys fighting on each other :worried: i'm just asking for help to seek out errors !!
Ene Catalin
@EneCatalin
Jul 14 2017 16:23
because this is valhalla
only the strong survive here
Kyle Holm
@thekholm80
Jul 14 2017 16:24
no, this is sparta
only 300 allowed in here
Margaret
@Margaret2
Jul 14 2017 16:24
well, you need to be more clear about what you're asking, you said "there's falses in this code, explain" so I explained true and false, but it turns out you're looking for something completely different @WJ06
Sweet Coding :)
@SweetCodingInc
Jul 14 2017 16:24
Ha!
Margaret
@Margaret2
Jul 14 2017 16:25
@thekholm80 lol
WJ06
@WJ06
Jul 14 2017 16:25
Then, will the value of balance will change after all ?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:26
Kyle Holm
@thekholm80
Jul 14 2017 16:26
lol that looks like The Stig
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:26
sure is
@thekholm80 did u see this :point_up: July 14, 2017 6:10 PM
Kyle Holm
@thekholm80
Jul 14 2017 16:30
lol that poor little fella, getting terrorized by a turtle
Pavel Sokolov
@nevaljawko
Jul 14 2017 16:32

The task Falsy Bouncer
My solution:

``````function bouncer(arr) {
// Don't show a false ID to this bouncer.
return arr.filter(function(arg) {
if (arg !== false || isNaN(arg) || arg !== undefined || arg !== 0 || arg !== '' || arg !== null) {
return arg;
}
});
}

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

And solution from Get a Hint:

``````function bouncer(arr) {
return arr.filter(Boolean);
}``````

What does mean Boolean and where can I read about it?

Ahmed Tarek
@ahmedtarek2134
Jul 14 2017 16:32
So for some reason before going to my flight I decided to check gitter
Bye bye and hello everyone 😂😂
Kyle Holm
@thekholm80
Jul 14 2017 16:33
Pavel Sokolov
@nevaljawko
Jul 14 2017 16:34
@thekholm80 could you explain in your own words please?
William/RipCrip
@RipCrip
Jul 14 2017 16:36
``````<style>
.red-text {
color: rgb(265,0,0);
}
.orchid-text {
color: rgb(218,112,214);
}
.sienna-text {
color: rgb(160,82,45);
}
.blue-text {
color: rgb(0,0,265);
}
</style>

<h1 class="red-text">I am red!</h1>

<h1 class="orchid-text">I am orchid!</h1>

<h1 class="sienna-text">I am sienna!</h1>

<h1 class="blue-text">I am blue!</h1>``````
What's wrong? It's telling me that I didn't use rgb for blue and red
Margaret
@Margaret2
Jul 14 2017 16:36
@ahmedtarek2134 Have a good flight :airplane:
Kyle Holm
@thekholm80
Jul 14 2017 16:37
@nevaljawko in this example, the thing to focus on is that everything with a real value is true
anything without a real value is false
Margaret
@Margaret2
Jul 14 2017 16:37
@RipCrip you have typos, you have to use exactly the numbers in the instructions
Kyle Holm
@thekholm80
Jul 14 2017 16:37
and will be filtered from the resulting array
William/RipCrip
@RipCrip
Jul 14 2017 16:37
nwm found the error
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:38
@ahmedtarek2134 where are u flying to?
Pavel Sokolov
@nevaljawko
Jul 14 2017 16:38
@thekholm80 ok, now I get it, thank you very much!
CamperBot
@camperbot
Jul 14 2017 16:38
nevaljawko sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1334 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Jul 14 2017 16:38
so `0, -0, null, false, NaN, undefined, or the empty string ("")` all return false, everything else is true
May Kittens Devour Your Soul
@diomed
Jul 14 2017 16:39
@ahmedtarek2134 if your :airplane: crashes , send me your Mac
Albert Cardona II
@daddycardona
Jul 14 2017 16:40
OMG how is it that Slasher Flick was so easy ?
William/RipCrip
@RipCrip
Jul 14 2017 16:40
@Margaret2 Found it. Thanks anyways
CamperBot
@camperbot
Jul 14 2017 16:41
ripcrip sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:star2: 2856 | @margaret2 |http://www.freecodecamp.com/margaret2
Albert Cardona II
@daddycardona
Jul 14 2017 16:41
and why did they introduce both of those concepts not just one?
hello yall ;)
oalharbi1
@oalharbi1
Jul 14 2017 16:47
Hi guys
I am stuck on myVar = myVar should be changed
Albert Cardona II
@daddycardona
Jul 14 2017 16:50
what about it are yoiu stuck on
what is the name of the place you are on?
@oalharbi1
oalharbi1
@oalharbi1
Jul 14 2017 16:51
Increment a Number with JavaScript
Stephen James
@sjames1958gm
Jul 14 2017 16:53
@oalharbi1 follow the pattern i = i + 1 is replaced by i++
So myVar = myVar + 1 is replaced by
Albert Cardona II
@daddycardona
Jul 14 2017 16:54
myVar++;
it will add 1 to itself
oalharbi1
@oalharbi1
Jul 14 2017 16:55
@daddycardona I already put this in the last ,but not changing anything
Albert Cardona II
@daddycardona
Jul 14 2017 16:55
so like say i = 1 when you iterate through a loop its going to add 1 at the end
let me see your code
@oalharbi1
MightyGarhem
@MightyGarhem
Jul 14 2017 16:56
Why is the red block overriding the first image? https://codepen.io/MightyGarhem/pen/QgVmga?editors=1100
oalharbi1
@oalharbi1
Jul 14 2017 16:56

var myVar = 87;

myVar = myVar + 1 ;

I just delete myVar++;
Pieter Stokkink
@forkerino
Jul 14 2017 16:59
@oalharbi1 delete the other line
not myVar++
oalharbi1
@oalharbi1
Jul 14 2017 17:01
I got it
Albert Cardona II
@daddycardona
Jul 14 2017 17:05
sorry I went away from computer
thanks @forkerino for stepping in ;)
CamperBot
@camperbot
Jul 14 2017 17:06
daddycardona sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2844 | @forkerino |http://www.freecodecamp.com/forkerino
Pieter Stokkink
@forkerino
Jul 14 2017 17:07
@daddycardona :+1:
Albert Cardona II
@daddycardona
Jul 14 2017 17:07
I have had a busy week full of driving :)
Albert Cardona II
@daddycardona
Jul 14 2017 17:12
@forkerino I am a little confused on the indexOf() function
Pieter Stokkink
@forkerino
Jul 14 2017 17:13
@daddycardona what about it?
Albert Cardona II
@daddycardona
Jul 14 2017 17:15
It is a little confusing because of the assignment I am on they give me a link but when I try to put in what I think it should be it's like confusing
let me try to explain I am gathering my words to make sense of what I am talking about lol
``````function mutation(arr) {

var na = arr = arr.map(v => v.toLowerCase());
var first= na[0];
var second = na[1];
if (na.indexOf(na[1])){
return true;
} else
return false;
}

mutation(["HELLo", "hey"]);``````
don't worr about var first or second however the na should return false there is no y in hello but still returns true
Pieter Stokkink
@forkerino
Jul 14 2017 17:18
@daddycardona you are checking if hey is in the array
which it is. .indexOf will return 1
Albert Cardona II
@daddycardona
Jul 14 2017 17:19
Okay
Pieter Stokkink
@forkerino
Jul 14 2017 17:19
however you need to check each letter of the second word and check if it is in the first word
Albert Cardona II
@daddycardona
Jul 14 2017 17:19
Okay that is where I must be off
Pieter Stokkink
@forkerino
Jul 14 2017 17:21
@daddycardona you can either use a loop to check one letter at a time, or turn the second word into an array of letters and use a fancy array method like .every
Albert Cardona II
@daddycardona
Jul 14 2017 17:21
I thought it would check to see if array[1] is in array[0] that is how I read it
Pieter Stokkink
@forkerino
Jul 14 2017 17:22
@daddycardona that will not work for all test cases
Albert Cardona II
@daddycardona
Jul 14 2017 17:22
like I started off withthe same thing but had na[0].indexOf(na[]1);
Pieter Stokkink
@forkerino
Jul 14 2017 17:22
because sometimes the letters are not in the same order
Albert Cardona II
@daddycardona
Jul 14 2017 17:23
I see now son of a gun it does say to see if it matches letter to letter dammit lol
well at least the v => map is working it had a warning because its es 6
thanks again @forkerino
CamperBot
@camperbot
Jul 14 2017 17:25
daddycardona sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:warning: daddycardona already gave forkerino points
Pieter Stokkink
@forkerino
Jul 14 2017 17:25
:+1:
Albert Cardona II
@daddycardona
Jul 14 2017 17:29
mutation(["zyxwvutsrqponmlkjihgfedcba", "qrstu"])
should return true and it's backwards and does return true this is why I get confused withy this dam indexOf()
Pieter Stokkink
@forkerino
Jul 14 2017 17:31
@daddycardona that is why you need to check each letter individually and return false if any of them is not in the first string
Albert Cardona II
@daddycardona
Jul 14 2017 17:31
never mind you already said it it is a string LMAO
devpahuja
@devpahuja
Jul 14 2017 17:32
please help me...i am not able to find the mistake in my jquery code
Pieter Stokkink
@forkerino
Jul 14 2017 17:33
@daddycardona you can use .indexOf both on strings and on arrays.
Albert Cardona II
@daddycardona
Jul 14 2017 17:34
?
Pieter Stokkink
@forkerino
Jul 14 2017 17:37
@devpahuja don't put "s around i, you want to put in the numbers, not the letter i. Also in the line above, I think you should use \$(this) instead of the other selector, because what you have now will give a list of all the buttons
@daddycardona "abc".indexOf("b") will give 1. ["a","b","c"].indexOf("b") as well.
Chris
@bestintown23
Jul 14 2017 17:38
how can i center the social media icons ? https://codepen.io/bestintown23/pen/gREoxb
devpahuja
@devpahuja
Jul 14 2017 17:38
thanks @forkerino
CamperBot
@camperbot
Jul 14 2017 17:38
devpahuja sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2845 | @forkerino |http://www.freecodecamp.com/forkerino
Pavel Sokolov
@nevaljawko
Jul 14 2017 17:38
what does this string do: `Array.prototype.slice.call(arguments)` ? I read about it but I didn't get the value of it.
Albert Cardona II
@daddycardona
Jul 14 2017 17:41
``````{
overflow: auto;
display: flex;
justify-content: center;
align-items: center;
min-height:5em;
}``````
@bestintown23 I did this to the div element
@forkerino I am going to try to break down the element
Liam Docherty
@ldocherty1
Jul 14 2017 17:43
Anyone knows what their doing with media queries and willing to help me sort out my messy text. I would really appreciate it.
May Kittens Devour Your Soul
@diomed
Jul 14 2017 17:44
such much css
would do just fine
mby just dis:
``````.Contact {
text-align: center;
}``````
Chris
@bestintown23
Jul 14 2017 17:47
i just did contact and it worked thanks @diomed
CamperBot
@camperbot
Jul 14 2017 17:47
bestintown23 sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5171 | @diomed |http://www.freecodecamp.com/diomed
Justin25
@Justin25
Jul 14 2017 18:14
Can someone help me find the problem in this code?

function palindrome(str) {
// Good luck!
str = str.toLowerCase().replace(/[^a-zA-Z0-9]+/g, "");
var strArr = str.replace(" ").split('');
strArr.join('');
var reverseArr = strArr;
reverseArr.reverse();
reverseArr.join('');
return reverseArr;
}

palindrome("sea turtles");

I'm only reversing "reverseArr", but strArr is getting reversed too.
Chris
@bestintown23
Jul 14 2017 18:18
why is my video not play on my page?
Tuomas Salokanto
@stuomas
Jul 14 2017 18:22
@bestintown23 where is the video hosted?
Stephen James
@sjames1958gm
Jul 14 2017 18:22
@bestintown23 without https:// and hostname it is looking for the video on codepen
@Justin25 Arrays are stored by reference and reverse reverses in place.
so reverseArr and strArr are the same array
Chris
@bestintown23
Jul 14 2017 18:23
gotcha i have it saved on my computer, its not online yet. any suggestions to get the video a url? @sjames1958gm
@stuomas
Stephen James
@sjames1958gm
Jul 14 2017 18:24
@bestintown23 Youtube?
@bestintown23 Maybe other sites for hosting videos.
Tuomas Salokanto
@stuomas
Jul 14 2017 18:24
@bestintown23 you can just put to your github
Manish Giri
@Manish-Giri
Jul 14 2017 18:25
@sjames1958gm @forkerino how come you guys are hanging out in Help today?
Kyle Holm
@thekholm80
Jul 14 2017 18:25
slumming it lol
Stephen James
@sjames1958gm
Jul 14 2017 18:25
Seems help is more active lately
Chris
@bestintown23
Jul 14 2017 18:26
gotcha i have a question in regards to resizing my video. im going to work on getting a url, maybe i can pull it from instagram or something. @sjames1958gm
what do you mean? @stuomas
Darren
@DarrenfJ
Jul 14 2017 18:27
gid'day fCC
Kyle Holm
@thekholm80
Jul 14 2017 18:27
@DarrenfJ :wave:
Darren
@DarrenfJ
Jul 14 2017 18:27
@thekholm80 @Manish-Giri hey giuys ! :wave:
Stephen James
@sjames1958gm
Jul 14 2017 18:27
@bestintown23 I was able to share images on dropbox, not sure about videos
Manish Giri
@Manish-Giri
Jul 14 2017 18:27
@DarrenfJ :wave:
Pieter Stokkink
@forkerino
Jul 14 2017 18:27
@Manish-Giri slow day everywhere
Tuomas Salokanto
@stuomas
Jul 14 2017 18:28
@bestintown23 I havent tried with video, but you should be able to make a repository in github, put video there, and then copy the address and use that. I use it in my projects with images
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:30
@DarrenfJ @thekholm80 :wave:
@Manish-Giri :wave:
Kyle Holm
@thekholm80
Jul 14 2017 18:30
@ravikishorethella heya Ravi
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:31
this room is so dull today
Kyle Holm
@thekholm80
Jul 14 2017 18:31
sorry :worried:
Manish Giri
@Manish-Giri
Jul 14 2017 18:31
@ravikishorethella :wave:
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:32
you are quite busy nowadays
Kyle Holm
@thekholm80
Jul 14 2017 18:32
i've been goofing off all morning lol
played golf then bought some movies
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:33
nowadays I rarely see manish in this room
Kyle Holm
@thekholm80
Jul 14 2017 18:33
Manish is too cool for FCC Help room
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:33
he is everywhere(main room, js room) except this room
:smile:
Manish Giri
@Manish-Giri
Jul 14 2017 18:34
Manish is too cool for FCC Help room
lol
i'm n00b
I'm not qualified enough to be here
Kyle Holm
@thekholm80
Jul 14 2017 18:34
if you're a noob, what does that make the rest of us?
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:34
that's what intelligent people say
Manish Giri
@Manish-Giri
Jul 14 2017 18:35
you guys are developers
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:35

find a better word

if you're a noob, what does that make the rest of us?

Manish Giri
@Manish-Giri
Jul 14 2017 18:35
not me
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:37
I'm a goat. :goat:
BWAAAAAAAAAAAAAAH!
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:38
:cat:
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:39
@thekholm80 what movies did u bought?
Abdullah Ali
@aali21
Jul 14 2017 18:39
Do we need to use javascript for the personal portfolio page
Kyle Holm
@thekholm80
Jul 14 2017 18:39
a lot of them
diomed @diomed does it on purpose so @Margaret2 can see
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:39
@thekholm80 like what?
Kyle Holm
@thekholm80
Jul 14 2017 18:40
the place i went to was selling DVDs for \$0.50 so i stocked up
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:40
@aali21 not mandatory
Manish Giri
@Manish-Giri
Jul 14 2017 18:40
this morning I received Split and Snowden in mail
Netflix DVD
Kyle Holm
@thekholm80
Jul 14 2017 18:40
wow, such speed!
Manish Giri
@Manish-Giri
Jul 14 2017 18:40
still no news on Fringe
lol yea
Kyle Holm
@thekholm80
Jul 14 2017 18:40
glad they finally arrived
Margaret
@Margaret2
Jul 14 2017 18:40
What is Margaret2 supposed to see?
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:41
@aali21 if you want you can write some js but, the fcc doesn't need js to pass the challenge
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:41
@Manish-Giri did u even watch that show?
Manish Giri
@Manish-Giri
Jul 14 2017 18:41
what show?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:41
@Margaret2 did u bought :yum:

one that u ordered @Manish-Giri
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:42
:point_up: July 14, 2017 2:32 PM @Margaret2
Manish Giri
@Manish-Giri
Jul 14 2017 18:42
not yet, they came just a few hours ago
Abdullah Ali
@aali21
Jul 14 2017 18:42
@ravikishorethella no I havent learnt any JS yet so I cant do it
Manish Giri
@Manish-Giri
Jul 14 2017 18:43
@thekholm80 does mongo/mongoose play well on windows?
MightyGarhem
@MightyGarhem
Jul 14 2017 18:43
Why is the im might text on the image instead of under it? https://codepen.io/MightyGarhem/pen/QgVmga?editors=1100
Ravi Kishore Thella
@ravikishorethella
Jul 14 2017 18:43
@aali21 no pbm
@aali21 you can have a portfolio page without js
Margaret
@Margaret2
Jul 14 2017 18:44
My brother has the entire boxed DVD set of the clone wars cartoon, should I watch it? 😋
Tuomas Salokanto
@stuomas
Jul 14 2017 18:44
@MightyGarhem because image is absolutely positioned
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:44
I have complete LOST on DVD's but do I ever watch it? no
Margaret
@Margaret2
Jul 14 2017 18:44
😂😂
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:44
coz I'm stupid
Kyle Holm
@thekholm80
Jul 14 2017 18:45
@Manish-Giri they have an installer package for windows, i'm pretty sure. I guess i should actually look
@Manish-Giri yeah, they have a windows version
Margaret
@Margaret2
Jul 14 2017 18:45
I have watched the complete I Love Lucy series 😂 now you know who my role model is
Kyle Holm
@thekholm80
Jul 14 2017 18:46
rickey?
Fred?
Little Rickey?
Margaret
@Margaret2
Jul 14 2017 18:46
:P Lucy lol
Ethel's not bad
Tuomas Salokanto
@stuomas
Jul 14 2017 18:46
@MightyGarhem make the image background-image of its div instead, saves you a lot of troube
Kyle Holm
@thekholm80
Jul 14 2017 18:46
I like lucy from the movie lucy
Margaret
@Margaret2
Jul 14 2017 18:47
You like Lucy? No Kyle, you have to Love Lucy
:joy:
Kyle Holm
@thekholm80
Jul 14 2017 18:48
@Manish-Giri oops, looks like they only have windows packages for Windows Server 2008
what a load of crap
@Margaret2 you're pretty clever for a fish
Margaret
@Margaret2
Jul 14 2017 18:49
:expressionless:
Kyle Holm
@thekholm80
Jul 14 2017 18:49
i actually groaned, so it was a good pun
May Kittens Devour Your Soul
@diomed
Jul 14 2017 18:50
well, she's not climbing trees, so it's all good there
Margaret
@Margaret2
Jul 14 2017 18:50
:joy: :zap: :zap:
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:02
can anyone tell me why my newArr in blank

function diffArray(arr1, arr2) {
var newArr = [];
// Same, same; but different.
var arr=arr1.concat(arr2);
for(var i=0;i<arr1.length;i++){
if(arr.includes(arr1[i])===false){
newArr.push(arr1[i]);
}
}
for(i=0;i<arr2.length;i++){
if(arr.includes(arr2[i])===false){
newArr.push(arr2[i]);
}
}
return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);

Darren
@DarrenfJ
Jul 14 2017 19:05
@ravikishorethella hey man :D
Manish Giri
@Manish-Giri
Jul 14 2017 19:06
@thekholm80 I had a lot of trouble with mongo on windows, with my FCC PRs which needed to be saved to the db
Alexander R Bott
@Abott1222
Jul 14 2017 19:06
@DarrenfJ this gangster!
Manish Giri
@Manish-Giri
Jul 14 2017 19:06
i can only imagine that mongoose will be even more painful
Darren
@DarrenfJ
Jul 14 2017 19:07
@Abott1222 buddy!
Alexander R Bott
@Abott1222
Jul 14 2017 19:07
people still use windows?
Kyle Holm
@thekholm80
Jul 14 2017 19:07
@Manish-Giri wait, are you running an instance of mongo local?
Alexander R Bott
@Abott1222
Jul 14 2017 19:07
@DarrenfJ hah how is it going?
Manish Giri
@Manish-Giri
Jul 14 2017 19:07
@thekholm80 yup
Kyle Holm
@thekholm80
Jul 14 2017 19:07
time to get you some linux in your life
Alexander R Bott
@Abott1222
Jul 14 2017 19:07
@DarrenfJ I think I found a gig as developer advocate. so random though... just wanna be SDE
Manish Giri
@Manish-Giri
Jul 14 2017 19:07
I do have ubuntu on my dell
which gets hotter than a `******'s` `*****`
Kyle Holm
@thekholm80
Jul 14 2017 19:08
oh right
Alexander R Bott
@Abott1222
Jul 14 2017 19:09
lololol
Kyle Holm
@thekholm80
Jul 14 2017 19:09
there's always cloud 9
Alexander R Bott
@Abott1222
Jul 14 2017 19:09
@Manish-Giri you crack me up man
Manish Giri
@Manish-Giri
Jul 14 2017 19:09
:smiling_imp:
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:10

@imyashbhardwaj
can anyone tell me why my newArr in blank

function diffArray(arr1, arr2) {
var newArr = [];
// Same, same; but different.
var arr=arr1.concat(arr2);
for(var i=0;i<arr1.length;i++){
if(arr.includes(arr1[i])===false){
newArr.push(arr1[i]);
}
}
for(i=0;i<arr2.length;i++){
if(arr.includes(arr2[i])===false){
newArr.push(arr2[i]);
}
}
return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);

May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:10
@Manish-Giri make me Kanban
Manish Giri
@Manish-Giri
Jul 14 2017 19:11
?
cowCrazy
@cowCrazy
Jul 14 2017 19:11
@imyashbhardwaj couse arr.includes(arr1[i]) is true, then making comparing it to false makes it false, and the push function isn't running
Kyle Holm
@thekholm80
Jul 14 2017 19:11
poof you're kanban
Manish Giri
@Manish-Giri
Jul 14 2017 19:13
@thekholm80 have you used code splitting with webpack(so far)?
Kyle Holm
@thekholm80
Jul 14 2017 19:14
not yet, it's on my list
i'd like to do server rendering
Manish Giri
@Manish-Giri
Jul 14 2017 19:15
code splitting seems very neat
blazing fast
Kyle Holm
@thekholm80
Jul 14 2017 19:15
yeah
it adds some complications from what i've seen, but has huge benefits
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:16
some1 should make an app for code spitting
Kyle Holm
@thekholm80
Jul 14 2017 19:16
lol
Duplicated
@Duplicated
Jul 14 2017 19:17
first draft here, still trying to figure out how to align text lol - https://duplicated.github.io/dmr-tribute-page
wait, should I be linking the codepen instead?
Manish Giri
@Manish-Giri
Jul 14 2017 19:17
we should build something like webpack
and get rich very fast
Kyle Holm
@thekholm80
Jul 14 2017 19:18
the webpack project is broke
if they can't get money, how would we?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:18
we're building cards against humanity
that'll get us rich
Kyle Holm
@thekholm80
Jul 14 2017 19:19
'we'
Manish Giri
@Manish-Giri
Jul 14 2017 19:19
lol
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:19
:yum:
"we"
glitz20
@glitz20
Jul 14 2017 19:20
anyone who can help me to create a server using node and express. I am having a big problem lately
Kyle Holm
@thekholm80
Jul 14 2017 19:20
sure
``````const express = require('express');
const app = express();

app.listen(8000);``````
there's a server
Manish Giri
@Manish-Giri
Jul 14 2017 19:24
try `app.listen(8080)` if you're on windows
:smiling_imp:
Kyle Holm
@thekholm80
Jul 14 2017 19:24
my webpack runs on 8080
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:24
Hey guys, who would won
Batman vs. Alien
Kyle Holm
@thekholm80
Jul 14 2017 19:24
which alien?
like Marvin the Martian?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:25
Alien Alien
Abdullah Ali
@aali21
Jul 14 2017 19:26
is there something as padding-top ?
Manish Giri
@Manish-Giri
Jul 14 2017 19:26
the one in the Alien movies?
@aali21 yes
Kyle Holm
@thekholm80
Jul 14 2017 19:27
like the queen? or one of the face huggers or chest busters? there were a lot of aliens in those movies
Manish Giri
@Manish-Giri
Jul 14 2017 19:27
lol
"chest busters"
sounds like a tv show name
Kyle Holm
@thekholm80
Jul 14 2017 19:27
haha that's what they were called
Abdullah Ali
@aali21
Jul 14 2017 19:27
https://codepen.io/aali21/pen/weRaLV?editors=1100 guys how do I bring the btn buttons to the center
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:28
@Manish-Giri did u know that Alien is really about saving a :cat:
glitz20
@glitz20
Jul 14 2017 19:29
@thekholm80 are you familiar with node and express?
Kyle Holm
@thekholm80
Jul 14 2017 19:29
yeah
David Lower
@davidlower
Jul 14 2017 19:29
Hi everyone
Manish Giri
@Manish-Giri
Jul 14 2017 19:29
@diomed :confused:
Kyle Holm
@thekholm80
Jul 14 2017 19:29
:wave:
Ozan Araz
@haraldur12
Jul 14 2017 19:30
what's up guys
glitz20
@glitz20
Jul 14 2017 19:30
@thekholm80 can you please help me with setting up a server. I am having big time trouble with it
Ozan Araz
@haraldur12
Jul 14 2017 19:30
what's wrong ?
Kyle Holm
@thekholm80
Jul 14 2017 19:30
can you give me more information?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:30
@Manish-Giri if u don't remember, [I've seen it last night] only Ripley and :cat: survived in the end
they had a :cat: on a space ship
how cool is that
glitz20
@glitz20
Jul 14 2017 19:31
@thekholm80 can I send you the snapshot of the problem I am having right now??
Kyle Holm
@thekholm80
Jul 14 2017 19:31
yeah
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:31
of course , pretty much every1 dies looking for a :cat: on ship
Manish Giri
@Manish-Giri
Jul 14 2017 19:31

@aali21 do this

``````<div class="btn f-c">
<a class="btn btn-default" href="#">Twitter</a>
<a class="btn btn-default" href="#">FreeCodeCamp</a>
<a class="btn btn-default" href="#">Facebook</a>
<a class="btn btn-default" href="#">GitHub</a>

</div>``````

and

``````.f-c {
display: flex;
justify-content: center;
}``````
MightyGarhem
@MightyGarhem
Jul 14 2017 19:32
I really need some help
Abdullah Ali
@aali21
Jul 14 2017 19:32
@Manish-Giri thanks
CamperBot
@camperbot
Jul 14 2017 19:32
aali21 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6253 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Jul 14 2017 19:32
@diomed lol I wonder how :cat: will survive on space ship
MightyGarhem
@MightyGarhem
Jul 14 2017 19:32
Everything I add in the html code places itself on the top image? How can I change the code so its fixed ?
So everything i place in the code, is under the image
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:33
@cowCrazy what now bro
can anyone help me why my newArr in blank

function diffArray(arr1, arr2) {
var newArr = [];
// Same, same; but different.
var arr=arr1.concat(arr2);
for(var i=0;i<arr1.length;i++){
if(!(arr.includes(arr1[i]))){
newArr.push(arr1[i]);
}
}
for(i=0;i<arr2.length;i++){
if(!(arr.includes(arr2[i]))){
newArr.push(arr2[i]);
}
}
return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);

Manish Giri
@Manish-Giri
Jul 14 2017 19:36
@imyashbhardwaj do you know what `arr` is?
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:37
@Manish-Giri it is just an arrray name see in line 4
Manish Giri
@Manish-Giri
Jul 14 2017 19:37
i know that
do you know what the array elements are?
@imyashbhardwaj
cowCrazy
@cowCrazy
Jul 14 2017 19:38
@imyashbhardwaj I would go a bit different I think, try to check if one array has an object from the other one, if yes throw them both out, if not then you found the difference.
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:39
yes arr is elements[1,2,3,4,1,2,3,4,5]
arr1 is[1,2,3,5] arr2 is[1,2,3,4,5]
@Manish-Giri
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:40
@Manish-Giri via Socratic method
Manish Giri
@Manish-Giri
Jul 14 2017 19:40
so `arr` is formed by merging all elements of `arr1` and `arr2`, yes?
@imyashbhardwaj
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:40
yes
@Manish-Giri
Manish Giri
@Manish-Giri
Jul 14 2017 19:40
so how will this `if` ever be reached? `if(!(arr.includes(arr1[i]))){`
same for `if(!(arr.includes(arr2[i]))){`
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:41
@cowCrazy yes but can you say what is wrong in this code
@Manish-Giri i cant get you?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:42
@Manish-Giri is just like JS
impossible to get
cowCrazy
@cowCrazy
Jul 14 2017 19:43
@imyashbhardwaj you try to check if an element from arr1 or arr2 is already in arr, and it has to, because arr is created of them both
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:43
@cowCrazy thats why i used "!" in front of function
Manish Giri
@Manish-Giri
Jul 14 2017 19:43
@imyashbhardwaj `arr` already contains all elements from both `arr[1]` and `arr[2]`, so when you loop through `arr[2]` for example, and check if `!arr.includes(arr2[i])`, what do you think will happen?
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:44
@Manish-Giri @thekholm80 do u know about this:https://tutorialzine.com/2017/07/javascript-async-await-explained
Sladyn
@sladyn98
Jul 14 2017 19:44
im trying to install a platformio terminal
im getting the following error

pty.js@0.3.0 install /tmp/apm-install-dir-117615-7479-lgltpm.9sh40u23xr/node_modules/platformio-ide-terminal/node_modules/pty.js
node scripts/install.js

/tmp/apm-install-dir-117615-7479-lgltpm.9sh40u23xr
`-- (empty)

module.js:471
throw err;
^

Error: Cannot find module '/tmp/apm-install-dir-117615-7479-lgltpm.9sh40u23xr/node_modules/platformio-ide-terminal/node_modules/pty.js/scripts/install.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-117615-7479-lgltpm.9sh40u23xr/package.json'
npm WARN apm-install-dir-117615-7479-lgltpm.9sh40u23xr No description
npm WARN apm-install-dir-117615-7479-lgltpm.9sh40u23xr No repository field.
npm WARN apm-install-dir-117615-7479-lgltpm.9sh40u23xr No README data
npm WARN apm-install-dir-117615-7479-lgltpm.9sh40u23xr No license field.
npm ERR! Linux 4.8.0-52-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/sladyn/.atom/.apm/.apmrc" "--userconfig" "/home/sladyn/.atom/.apmrc" "install" "/tmp/d-117615-7479-xiy4es.s7xvfgvi/package.tgz" "--runtime=electron" "--target=1.3.15" "--arch=x64" "--global-style"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! pty.js@0.3.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js@0.3.0 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pty.js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/apm-install-dir-117615-7479-lgltpm.9sh40u23xr/npm-debug.log
npm ERR! code 1

Kyle Holm
@thekholm80
Jul 14 2017 19:44
@diomed @manish is a pro at that
Sladyn
@sladyn98
Jul 14 2017 19:44
can anyone help me
cowCrazy
@cowCrazy
Jul 14 2017 19:45
but then you still stuck because you will get the same result for all elements!!! try to compare them without combining them @imyashbhardwaj
Manish-Giri @Manish-Giri hides in the corner
May Kittens Devour Your Soul
@diomed
Jul 14 2017 19:46
@thekholm80 you should name app Cats against Humanity
did I mention that already?
Johnny
@JohnnyBizzel
Jul 14 2017 19:46
@sladyn98 looks like `Error: Cannot find module '/tmp/apm-install-dir-117615-7479-lgltpm.9sh40u23xr/node_modules/platformio-ide-terminal/node_modules/pty.js/scripts/install.js'`
Manish Giri
@Manish-Giri
Jul 14 2017 19:47
@thekholm80 will you make an app for me?
Kyle Holm
@thekholm80
Jul 14 2017 19:47
@Manish-Giri what app?
Sladyn
@sladyn98
Jul 14 2017 19:47
what should i do
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:47
@Manish-Giri i think if element is not in arr2 but is present in arr1 in !arr.includes(arr2[i]) then "if" will be executed
Manish Giri
@Manish-Giri
Jul 14 2017 19:47
idk, i'll think of something if you say yes
Kyle Holm
@thekholm80
Jul 14 2017 19:47
I'm still waiting for diomed to pay for his
so you pay up front
Manish Giri
@Manish-Giri
Jul 14 2017 19:48
lol
I iz broke
Johnny
@JohnnyBizzel
Jul 14 2017 19:48
@sladyn98 ask the add on's developer what is going on
Manish Giri
@Manish-Giri
Jul 14 2017 19:48
@imyashbhardwaj then you must modify your if/for accordingly
Johnny
@JohnnyBizzel
Jul 14 2017 19:49
@Manish-Giri Shame you can't cash in brownies :/
glitz20
@glitz20
Jul 14 2017 19:49
@thekholm80 here is the snapshot of the problem https://megabackup.com/#popup/MediaViewer//59691f653f5595568d6ca8d6
Manish Giri
@Manish-Giri
Jul 14 2017 19:49
because as of now they iterate only over one array and check if those elements are present in `arr`
Darren
@DarrenfJ
Jul 14 2017 19:49
@Abott1222 sorry man, stepped out to go eat
Anthony DeSordi
@desordi3
Jul 14 2017 19:49
how do i turn off gitter notifications? Lmao
Kyle Holm
@thekholm80
Jul 14 2017 19:49
@sabin20 sorry, i can't see anything
Johnny
@JohnnyBizzel
Jul 14 2017 19:49
@sabin20 megabackup is an untrustworthy site :O
Kyle Holm
@thekholm80
Jul 14 2017 19:49
@desordi3 top right of your screen -> settings -> notifications
Manish Giri
@Manish-Giri
Jul 14 2017 19:49
such backup
much mega
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:50
@Manish-Giri yes if element is not present then "if" will run right??
it should be like this
Anthony DeSordi
@desordi3
Jul 14 2017 19:50
@thekholm80 tried that, they still appear in the top right when im not in the chat
cowCrazy
@cowCrazy
Jul 14 2017 19:51
@imyashbhardwaj try to check if `arr1.includes(arr2[i])` then you can compare to different arrays
Johnny
@JohnnyBizzel
Jul 14 2017 19:51
@desordi3 do it for every room
Manish Giri
@Manish-Giri
Jul 14 2017 19:51
but it will always be present
glitz20
@glitz20
Jul 14 2017 19:51
@JohnnyBizzel can you give me suggestion for free cloud site, from which I can share the link of the document
Manish Giri
@Manish-Giri
Jul 14 2017 19:51
you're checking `arr.includes()`
Anthony DeSordi
@desordi3
Jul 14 2017 19:51
@JohnnyBizzel yup, thats it. thanks!
CamperBot
@camperbot
Jul 14 2017 19:51
desordi3 sends brownie points to @johnnybizzel :sparkles: :thumbsup: :sparkles:
:star2: 1721 | @johnnybizzel |http://www.freecodecamp.com/johnnybizzel
Manish Giri
@Manish-Giri
Jul 14 2017 19:51
not `arr1.includes()`
@imyashbhardwaj
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:53
@cowCrazy if i do that then it will print all elements in newArr and result is[1,2,3,5,1,2,3,4,5]
Johnny
@JohnnyBizzel
Jul 14 2017 19:53
@sabin20 make a gist https://gist.github.com/
@thekholm80 thanks in advance
CamperBot
@camperbot
Jul 14 2017 19:53
johnnybizzel sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1336 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:54
@Manish-Giri bro thats the whole point i merged both arrays and then i m trying to store those elements which are not in arr1 into newArr
Manish Giri
@Manish-Giri
Jul 14 2017 19:55
@imyashbhardwaj okay then why does `newArr` return empty?
Johnny
@JohnnyBizzel
Jul 14 2017 19:55
@sabin20 Dropbox is another
Abdullah Ali
@aali21
Jul 14 2017 19:56
https://codepen.io/aali21/pen/weRaLV?editors=1100 how do I bring down my block element a bit so thats its not stuck right on the nav bar
Manish Giri
@Manish-Giri
Jul 14 2017 19:56
glitz20
@glitz20
Jul 14 2017 19:56
@thekholm80 https://www.mediafire.com/?dltb8ywbhvb62cf can you see now?
Manish Giri
@Manish-Giri
Jul 14 2017 19:56
look at the console logs inside the if
note that they never execute
cowCrazy
@cowCrazy
Jul 14 2017 19:56
@imyashbhardwaj can you post your current code?
glitz20
@glitz20
Jul 14 2017 19:57
@JohnnyBizzel are you familiar with express and node?
Johnny
@JohnnyBizzel
Jul 14 2017 19:57
@sabin20 yes sir
glitz20
@glitz20
Jul 14 2017 19:58
@JohnnyBizzel can you help me please?I am having hard time setting up a server. Here is the problem. https://www.mediafire.com/?dltb8ywbhvb62cf
Johnny
@JohnnyBizzel
Jul 14 2017 19:58
@sabin20 you can drag and drop screenshots here
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:58
@Manish-Giri @cowCrazy thanks bro's i tried onther think and it worked
CamperBot
@camperbot
Jul 14 2017 19:58
imyashbhardwaj sends brownie points to @manish-giri and @cowcrazy :sparkles: :thumbsup: :sparkles:
:cookie: 252 | @cowcrazy |http://www.freecodecamp.com/cowcrazy
:star2: 6254 | @manish-giri |http://www.freecodecamp.com/manish-giri
Yash Bhardwaj
@imyashbhardwaj
Jul 14 2017 19:59

function diffArray(arr1, arr2) {
var newArr = [];
// Same, same; but different.
var arr=arr1.concat(arr2);
for(var i=0;i<arr1.length;i++){
if(!(arr2.includes(arr1[i]))){
newArr.push(arr1[i]);
}
}
for(i=0;i<arr2.length;i++){
if(!(arr1.includes(arr2[i]))){
newArr.push(arr2[i]);
}
}
return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
this is the working code

Johnny
@JohnnyBizzel
Jul 14 2017 19:59

A screenshot example
@sabin20 Also, better do discuss in HelpBackEnd
glitz20
@glitz20
Jul 14 2017 20:00
Manish Giri
@Manish-Giri
Jul 14 2017 20:00
@sabin20 whats the error?
glitz20
@glitz20
Jul 14 2017 20:01
Kyle Holm
@thekholm80
Jul 14 2017 20:04
do you have node installed?
oh, i see a modules folder and package.json, so there's at least npm there
the errors are all coming from your linter, not from node itself?
oh, he's gone to the back end room. oh well
Manish Giri
@Manish-Giri
Jul 14 2017 20:07
lol
Kyle Holm
@thekholm80
Jul 14 2017 20:07
Manish build me an app
Manish Giri
@Manish-Giri
Jul 14 2017 20:08
`sudo build app`
:smiling_imp:
Kyle Holm
@thekholm80
Jul 14 2017 20:08
i want an easy vr animation library that works with react vr
tons of affordable, lower-spec head sets shipping this holiday season, i want to make vr websites
building vr ecommerce sites, that's how i'll become the next jeff bezos
Manish Giri
@Manish-Giri
Jul 14 2017 20:10
:+1:
Manish Giri
@Manish-Giri
Jul 14 2017 20:16
@thekholm80 how did you install node on linux?
did you do it directly via the download
I'm trying to upgrade to 6.11.1, and I forgot what I did the last time
Kyle Holm
@thekholm80
Jul 14 2017 20:19
one sec
@Manish-Giri i can't find the walkthrough i used, but this one looks good https://nodesource.com/blog/installing-node-js-tutorial-debian-linux/
the trick is to not install from the linux repo, use the node repo instead
Abdullah Ali
@aali21
Jul 14 2017 20:21

Hi guys, does something like block-2 exist <div class="block-2">
<h3>About me</h3>

</div>

Kyle Holm
@thekholm80
Jul 14 2017 20:22
it can exist if you create it
Abdullah Ali
@aali21
Jul 14 2017 20:22
I already have a block class but thats for pageOne
@thekholm80 oh ok i'll try that ty
CamperBot
@camperbot
Jul 14 2017 20:22
aali21 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1337 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Manish Giri
@Manish-Giri
Jul 14 2017 20:27
@thekholm80 ty
CamperBot
@camperbot
Jul 14 2017 20:27
manish-giri sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1338 | @thekholm80 |http://www.freecodecamp.com/thekholm80
nirtamir2
@nirtamir2
Jul 14 2017 21:17
``````        let arr = [];
for (let key of keys) {
arr.push(this.array[key])
}
return arr;``````
works well
but i want to do it with reducers
how to do it?
CamperBot
@camperbot
Jul 14 2017 21:17
:bulb: to format code use backticks! ``` more info