These are chat archives for FreeCodeCamp/HelpFrontEnd

1st
Aug 2017
CallMeOrange
@EgnaroDev
Aug 01 2017 00:00
After anime, I'm going to research DNA Pairing, I'm not good with science so this could be the problem
Mike
@MikeJSchorah
Aug 01 2017 00:01
Am I allowed to customize a Demo that I imported from a theme that I installed?
gerome0123
@gerome0123
Aug 01 2017 00:06
@Aman-SS what is use of iframe im sorry thanks for the reply :)
CamperBot
@camperbot
Aug 01 2017 00:06
gerome0123 sends brownie points to @aman-ss :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @aman-ss |http://www.freecodecamp.com/aman-ss
zacharey
@zacharey
Aug 01 2017 00:10
gitter gitter on the wallI have a question for you @/all : anyone here a functional programmer?
Ken Haduch
@khaduch
Aug 01 2017 00:12
@MikeJSchorah - see if they have any restrictions on the site where you got the demo from? I mean, a lot of doing this is copying code from some places (like Bootstrap has a template for a navbar, for example, you usually copy that and make modifications.) See if the site has any restrictions on using any sample code?
CallMeOrange
@EgnaroDev
Aug 01 2017 00:14
@/all :wave:
Gulsvi
@gulsvi
Aug 01 2017 00:18
@gerome0123 an iFrame is for putting one web page inside another (at a high level)
This has more low level details about it: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
zacharey
@zacharey
Aug 01 2017 00:19
@SkyC0der long time!!
Jim Tryon
@jimtryon
Aug 01 2017 00:19
IFrame = bad
Gulsvi
@gulsvi
Aug 01 2017 00:19
Hello @zacharey
Jim Tryon
@jimtryon
Aug 01 2017 00:19
That has been my experience with them back when I first started doing web development 10 years ago @SkyC0der
zacharey
@zacharey
Aug 01 2017 00:19
@EgnaroDev functional programming in js?
Jim Tryon
@jimtryon
Aug 01 2017 00:19
I was told to avoid iFrames
Gulsvi
@gulsvi
Aug 01 2017 00:20
I think they're needed for some things still, like youtube videos
I don't use them unless I have to though :)
maybe @gerome0123 is trying to figure out how iframes work in codepen?
zacharey
@zacharey
Aug 01 2017 00:21
@SkyC0der how is your js?
Gulsvi
@gulsvi
Aug 01 2017 00:21
Maybe 5/10?
7/10 on a good day
CallMeOrange
@EgnaroDev
Aug 01 2017 00:21
Mine 1/10
Compared to JS developer?
Gulsvi
@gulsvi
Aug 01 2017 00:22
You're being modest @EgnaroDev
zacharey
@zacharey
Aug 01 2017 00:22
lol
Long Nguyen
@longnt80
Aug 01 2017 00:22
who's 10/10?
CallMeOrange
@EgnaroDev
Aug 01 2017 00:22
:trollface:
Gulsvi
@gulsvi
Aug 01 2017 00:22
Is this an interview? What's the pay? :)
zacharey
@zacharey
Aug 01 2017 00:22
so I am trying to drill into my brain how the go to in functional programming for iteration
CallMeOrange
@EgnaroDev
Aug 01 2017 00:23
Guys, how is your algorithm?
1 - 10
Gulsvi
@gulsvi
Aug 01 2017 00:23
depends on the algorithm :trollface:
CallMeOrange
@EgnaroDev
Aug 01 2017 00:24
Hm..
Long Nguyen
@longnt80
Aug 01 2017 00:24
how do rate yourself btw
Netrunner21
@Netrunner21
Aug 01 2017 00:24
What's up everyone
Gulsvi
@gulsvi
Aug 01 2017 00:24
my addition algorithm is really good
CallMeOrange
@EgnaroDev
Aug 01 2017 00:24
lol
Gulsvi
@gulsvi
Aug 01 2017 00:24
hello @Netrunner21
Long Nguyen
@longnt80
Aug 01 2017 00:24
@Netrunner21 sup
Netrunner21
@Netrunner21
Aug 01 2017 00:24
I've ran into a bit of a wall. Maybe you guys can help me.
CallMeOrange
@EgnaroDev
Aug 01 2017 00:25
Mine is kyu 7/ 4 dan
Gulsvi
@gulsvi
Aug 01 2017 00:25
I'm kyu 5 :congratulations:
CallMeOrange
@EgnaroDev
Aug 01 2017 00:25
You became kyu 5 today?
Gulsvi
@gulsvi
Aug 01 2017 00:25
Yes
CallMeOrange
@EgnaroDev
Aug 01 2017 00:25
Congrats
Gulsvi
@gulsvi
Aug 01 2017 00:26
The polygon problem and the roman numerals helped!
Long Nguyen
@longnt80
Aug 01 2017 00:26
@Netrunner21 just post your question
CallMeOrange
@EgnaroDev
Aug 01 2017 00:27
lol
zacharey
@zacharey
Aug 01 2017 00:27
soo… this turned into a rating contest lol
i want to turn a string into an array, compare it to the same, except uppercase, and if any are true, post true
Moisés Man
@moigithub
Aug 01 2017 00:30
array of what ?
Netrunner21
@Netrunner21
Aug 01 2017 00:30
I got my freecodecamp front end certification last week and I've been trying to learn react through codecademy so I can do some of the projects for the Visualzation Certification. I also have a friend who wants a very basic data stroring android app which I'll probably use meteor to build. I've gotten through over half of the react courseand it appears the hand holding stage of freecodecamp is over (lol). This stuff is really difficult for me and most of the article I read to suppliment require knowledge of a lot javascript stuff I have no idea about. I'm confused about what my path forward should be. Should I really really go back and get a stronger javascript foundation in general and try and backtrack and fill in some gaps?
Maybe learn some basic programming principles?
zacharey
@zacharey
Aug 01 2017 00:30
just a string… for example, password
Moisés Man
@moigithub
Aug 01 2017 00:30
soo "hello" --> ["hello"]
string into an array <-- is what u said
zacharey
@zacharey
Aug 01 2017 00:31
that isn’t what i am asking
Sam
@sdedison
Aug 01 2017 00:31
Hi all - I'm having trouble with the wikipedia viewer project, currently just trying to get the titles of the searched articles to display on the page. I'm getting the following error, it looks like its happening on my for loop when I try to append the titles, but I can't figure out what's wrong
Uncaught TypeError: Cannot read property 'shouldStopExecution' of undefined
at Object.success (VM230 pen.js:25)
at i (VM243 jquery.min.js:formatted:1343)
at Object.fireWith [as resolveWith] (VM243 jquery.min.js:formatted:1397)
at A (VM243 jquery.min.js:formatted:3819)
at HTMLScriptElement.c (VM243 jquery.min.js:formatted:3997)
at HTMLScriptElement.dispatch (VM243 jquery.min.js:formatted:2067)
at HTMLScriptElement.q.handle (VM243 jquery.min.js:formatted:1993)
is the error
zacharey
@zacharey
Aug 01 2017 00:33
var arrayPass = “password”
var passSplit = arrayPass.split()
//returns [‘p’, ‘a’, ’s’, ’s’, ‘w’, ‘o’, ‘r’, ‘d’]
Moisés Man
@moigithub
Aug 01 2017 00:33
u need to provide a value to ur split method
split("") soo it split on letters
gerome0123
@gerome0123
Aug 01 2017 00:33
@SkyC0der thanks bro let me read your link
CamperBot
@camperbot
Aug 01 2017 00:33
gerome0123 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2275 | @skyc0der |http://www.freecodecamp.com/skyc0der
zacharey
@zacharey
Aug 01 2017 00:33
passSplit == // compares all to upper
and returns if any are true
CallMeOrange
@EgnaroDev
Aug 01 2017 00:35
var arrayPass = “password”
var passSplit = arrayPass.split("") //[‘p’, ‘a’, ’s’, ’s’, ‘w’, ‘o’, ‘r’, ‘d’]
@SkyC0der You solved Find the unique number on codewars right? I'm stuck with it :/
zacharey
@zacharey
Aug 01 2017 00:36
yh i get I screwed up the syntax on there, that was besides the point ;(
CallMeOrange
@EgnaroDev
Aug 01 2017 00:36
What do you want to do?
You want to compare [‘p’, ‘a’, ’s’, ’s’, ‘w’, ‘o’, ‘r’, ‘d’] and another with upper?
zacharey
@zacharey
Aug 01 2017 00:37
right except comparing that with PASSWORD
i dont want to right out the whole array right now on here.. its a b**
lol
CallMeOrange
@EgnaroDev
Aug 01 2017 00:38
so you want to compare [‘p’, ‘a’, ’s’, ’s’, ‘w’, ‘o’, ‘r’, ‘d’] and PASSWORD
Gulsvi
@gulsvi
Aug 01 2017 00:39
@EgnaroDev Hmmm, not sure I remember that one
CallMeOrange
@EgnaroDev
Aug 01 2017 00:39
Sorry PASSWORD or [‘P’, 'A’, ’S’, ’S’, ‘W’, ‘O’, ‘R’, ‘D’]?
@SkyC0der This code might jog your memory
zacharey
@zacharey
Aug 01 2017 00:39
the array
CallMeOrange
@EgnaroDev
Aug 01 2017 00:39
function findUniq(arr) {
  var answer = arr.filter(function(e){
    return e !== arr[0];
  });
  return answer[0];
}
Gulsvi
@gulsvi
Aug 01 2017 00:39
@zacharey If you want to figure out if a string has an uppercase letter in it:
var str = 'hElLo';
var otherStr = 'hello';
console.log(/[A-Z]/g.test(str.split(''))); //true
console.log(/[A-Z]/g.test(otherStr.split(''))); //false
CallMeOrange
@EgnaroDev
Aug 01 2017 00:39
:walking:
Gulsvi
@gulsvi
Aug 01 2017 00:40
okay
zacharey
@zacharey
Aug 01 2017 00:40
@SkyC0der is that es6?
Gulsvi
@gulsvi
Aug 01 2017 00:40
no @zacharey es5
CallMeOrange
@EgnaroDev
Aug 01 2017 00:40
Is .test() like .match()?
nvm
Gulsvi
@gulsvi
Aug 01 2017 00:40
It's actually ES3
CallMeOrange
@EgnaroDev
Aug 01 2017 00:41
I think I understand, so .test() check if one of regex exist?
Gulsvi
@gulsvi
Aug 01 2017 00:41
If there's a match, you get true, else false
CallMeOrange
@EgnaroDev
Aug 01 2017 00:41
I see
@SkyC0der Did you see that code I posted?
Gulsvi
@gulsvi
Aug 01 2017 00:41
Yes, I saw it
It jogged my memory :)
Moisés Man
@moigithub
Aug 01 2017 00:42
test return a boolean value
match return an array
CallMeOrange
@EgnaroDev
Aug 01 2017 00:42
Passed: 15 and failed 1...
Expected: 0, instead got: 1
zacharey
@zacharey
Aug 01 2017 00:42
thanks @SkyC0der @EgnaroDev
CamperBot
@camperbot
Aug 01 2017 00:42
zacharey sends brownie points to @skyc0der and @egnarodev :sparkles: :thumbsup: :sparkles:
:star2: 2276 | @skyc0der |http://www.freecodecamp.com/skyc0der
:cookie: 531 | @egnarodev |http://www.freecodecamp.com/egnarodev
CallMeOrange
@EgnaroDev
Aug 01 2017 00:42
No problem
Pagnito
@Pagnito
Aug 01 2017 00:42
@SkyC0der i think im ready to redeploy lol O.o
Gulsvi
@gulsvi
Aug 01 2017 00:42
@zacharey That isn't the functional JS way though
Happy to help if it works for you, of course
@Pagnito :) nice
zacharey
@zacharey
Aug 01 2017 00:43
its a helluva lot better than using for blocks
CallMeOrange
@EgnaroDev
Aug 01 2017 00:43
@zacharey Do you know ASL?
zacharey
@zacharey
Aug 01 2017 00:44
not really, but if it is cleaner and easier to manage I will learn it
CallMeOrange
@EgnaroDev
Aug 01 2017 00:45
Oh ok
That sign in your profile picture means "pay attention" to me or maybe its just a pose...
zacharey
@zacharey
Aug 01 2017 00:46
ha lol
that ASL
i knew a little bit
CallMeOrange
@EgnaroDev
Aug 01 2017 00:47
Nice
I think it will take many years to master ASL...
Like how you speak English normally
zacharey
@zacharey
Aug 01 2017 00:48
yh, I actually learned ASL when i was really roung
young*
CallMeOrange
@EgnaroDev
Aug 01 2017 00:48
Same
zacharey
@zacharey
Aug 01 2017 00:49
they thought I was going to be completely deaf
CallMeOrange
@EgnaroDev
Aug 01 2017 00:50
Oh
@SkyC0der
This is like cheating but this is what I did...
  if (answer[0] == 1) return 0;
  else if (answer[0] == 0) return 1;
  else return answer[0];
:trollface:
zacharey
@zacharey
Aug 01 2017 00:51
@SkyC0der could you break down /[A-Z]/g for me
Gulsvi
@gulsvi
Aug 01 2017 00:52
@EgnaroDev lol
CallMeOrange
@EgnaroDev
Aug 01 2017 00:52
@SkyC0der but still didn't pass lol
Gulsvi
@gulsvi
Aug 01 2017 00:52
@zacharey It's a regular expression that checks the entire string for an uppercase letter
CallMeOrange
@EgnaroDev
Aug 01 2017 00:52
Expected: 1, instead got: 0
wtf?
Gulsvi
@gulsvi
Aug 01 2017 00:53
[A-Z]= any upper-case letter from A - Z
CallMeOrange
@EgnaroDev
Aug 01 2017 00:53
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
zacharey
@zacharey
Aug 01 2017 00:53
@EgnaroDev yh i got that lol
CallMeOrange
@EgnaroDev
Aug 01 2017 00:53
:)
zacharey
@zacharey
Aug 01 2017 00:53
and the /g
Gulsvi
@gulsvi
Aug 01 2017 00:54
/g = global
zacharey
@zacharey
Aug 01 2017 00:54
?
Gulsvi
@gulsvi
Aug 01 2017 00:54
anywhere in the string
zacharey
@zacharey
Aug 01 2017 00:54
what about the first /
CallMeOrange
@EgnaroDev
Aug 01 2017 00:55
/regex/ and g
Gulsvi
@gulsvi
Aug 01 2017 00:55
about @zacharey
CamperBot
@camperbot
Aug 01 2017 00:55
:cookie: 151 | @zacharey |http://www.freecodecamp.com/zacharey
zacharey
@zacharey
Aug 01 2017 00:55
ah okay
wow now everybody knows me lol
Gulsvi
@gulsvi
Aug 01 2017 00:55
Trying to see how many more challenges until you learn regex
zacharey
@zacharey
Aug 01 2017 00:55
i really have been all around the net
CallMeOrange
@EgnaroDev
Aug 01 2017 00:55
@zacharey Well, you will learn more in Basic JS or OOP
zacharey
@zacharey
Aug 01 2017 00:56
I am a lot farther than my fcc says
CallMeOrange
@EgnaroDev
Aug 01 2017 00:56
I see
Well, you can just research about regex then you are good to go :)
Gulsvi
@gulsvi
Aug 01 2017 00:56
This site is helpful: http://www.regexpal.com/
And there are a few others like it
zacharey
@zacharey
Aug 01 2017 00:57
nice! thanks
is there somewhere that focuses on regex
in teaching
CallMeOrange
@EgnaroDev
Aug 01 2017 00:58
Yeah
well not teaching
zacharey
@zacharey
Aug 01 2017 00:59
i am trying to get away from all of the bogus sites that keep you in a loop :_(
CallMeOrange
@EgnaroDev
Aug 01 2017 00:59
http://www.regexpal.com/ , do compare /e/g and /[e]/g with Hello, my name is...
zacharey
@zacharey
Aug 01 2017 00:59
talking about you codecademy
CallMeOrange
@EgnaroDev
Aug 01 2017 00:59
Nvm.. you don't need to compare, pretty much the same
zacharey
@zacharey
Aug 01 2017 00:59
lol
afk
CallMeOrange
@EgnaroDev
Aug 01 2017 01:00
Now's my chance!
:runner:
Pagnito
@Pagnito
Aug 01 2017 01:35
is there way to hide the mozilla scrollbar
Long Nguyen
@longnt80
Aug 01 2017 01:36
@Pagnito what's the mozilla scrollbar?
Pagnito
@Pagnito
Aug 01 2017 01:37
the scroll bar on the right side of the screen people used to used to scroll down the page before mouse wheels
Long Nguyen
@longnt80
Aug 01 2017 01:38
@Pagnito why do you want to hide it? It could cause more trouble
Pagnito
@Pagnito
Aug 01 2017 01:39
i want to hide it in case it shows up on mobile, cuz im using overflow
CallMeOrange
@EgnaroDev
Aug 01 2017 01:39
You want to hide mozilla scrollbar?
Dang, I was making a joke
Gulsvi
@gulsvi
Aug 01 2017 01:40
I'm listening :ear: :)
Did you hear what Arnold Schwarzenegger said when they asked him why he doesn't use Windows 10?
CallMeOrange
@EgnaroDev
Aug 01 2017 01:41
Nope
Gulsvi
@gulsvi
Aug 01 2017 01:41
I still love Vista baby
CallMeOrange
@EgnaroDev
Aug 01 2017 01:41
lol
Is Vista outdated?
Gulsvi
@gulsvi
Aug 01 2017 01:41
Yeah, I think so
Windows 7 good for another couple of years
Long Nguyen
@longnt80
Aug 01 2017 01:42
@Pagnito the scrollbar is automatically hidden in mobile, isn't it? You might not need to hide it.
Pagnito
@Pagnito
Aug 01 2017 01:42
ah true, i think that might be the case
Long Nguyen
@longnt80
Aug 01 2017 01:43
@Pagnito usually, you don't want to mess with the default scrollbar, it would cause more headaches
Gulsvi
@gulsvi
Aug 01 2017 01:45
^^
Long Nguyen
@longnt80
Aug 01 2017 01:47

Windows 7 good for another couple of years

I have Windows 7 on my old laptop and Microsoft refuse to update it, keep saying unsupported hardware and push me to upgrade to 10

CallMeOrange
@EgnaroDev
Aug 01 2017 01:54
Imagine you are on window 7 and ask you to upgrade it to 10
"No, upgrade it to 8 first"
Shivaji
@psrijan
Aug 01 2017 02:01
hi can someone see what is wrong with this
this is intermediate coding -steamroller
it says arrCpy is not defined i can't figure out why
Tegh
@teghmehta
Aug 01 2017 02:16
@SkyC0der ty
CamperBot
@camperbot
Aug 01 2017 02:16
teghmehta sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2277 | @skyc0der |http://www.freecodecamp.com/skyc0der
The onclick to the function doesnt log
Ken Haduch
@khaduch
Aug 01 2017 02:30
@psrijan - one place you have arrCopy and most other places arrCpy? It's complaining about arrCopy...
@teghmehta - I"m getting an error "cannot read property "rec" of undefined" - are you relying on a recipy already existing, like from your local storage file?
Tegh
@teghmehta
Aug 01 2017 02:35
@khaduch hi i was just testing some stuff
Can you take a look again
I revererted it back
Ken Haduch
@khaduch
Aug 01 2017 02:35
@teghmehta - okay, now it is displaying some recipes.
Tegh
@teghmehta
Aug 01 2017 02:35
yup
Ken Haduch
@khaduch
Aug 01 2017 02:35
at least names of recipes
Tegh
@teghmehta
Aug 01 2017 02:35
But when u click on one it should log it back to the console from the show recipe function
but it doesnt
Ken Haduch
@khaduch
Aug 01 2017 02:37
@teghmehta - I cannot see that the click handler is actually attached to an item?
Tegh
@teghmehta
Aug 01 2017 02:37
<ListGroupItem onClick={RecipeList.showRecipe}>
28th line
Ken Haduch
@khaduch
Aug 01 2017 02:38
@teghmehta - I see that in your code, but I don't see it in the devtools - usually they show if an event handler is set on an element?
Tegh
@teghmehta
Aug 01 2017 02:38
So how do I set one
Ken Haduch
@khaduch
Aug 01 2017 02:39
@teghmehta - I'm not sure in React... still looking at this to see if I can understand it
Gulsvi
@gulsvi
Aug 01 2017 02:39
@teghmehta Move your onclick to the return for your createClass method
var RecipeList = React.createClass({
  showRecipe: function() {
    console.log("Click");
    //Open Panel
  },
  render: function () {
    var titles = this.props.recipes.map(function(recipe, i) {
      return (
        <ListGroupItem key={i}>
          {recipe.title}
        </ListGroupItem>
      )
    });

    return(
      <div>
        <ListGroup onClick={this.showRecipe}>
          {titles}
        </ListGroup>
      </div>
    );
  }
});
I also got rid of an extra map - you can do it all in one

and added that key because of:

Each child in an array or iterator should have a unique "key" prop. Check the render method of RecipeList. See https://fb.me/react-warning-keys for more information.

Kevin
@kevinwr
Aug 01 2017 02:41

Hey, all.

Can anyone tell me how I can keep the twitch logo and iframe I have the same height as the page size changes (I don't and won't use bootstrap).

I keep messing with adjusting the heights of the divs and elements through CSS, but haven't really found the results I wanted. Eventually, I will put some media-queries in there to change some things, but at this point, I just want both the logo and iframe to keep the same height as the screen size changes.

BTW, I tried using max-height: 100%; on them, but when I do that, the iframe stays at 100% height, but the logo gets smaller when it could expand to the 100%.

Here is the page:

https://kevinwr.github.io/fccprojects/twitchstatusviewer/tsv.html

Tegh
@teghmehta
Aug 01 2017 02:41
@SkyC0der Sky thanks you always are clutch
CamperBot
@camperbot
Aug 01 2017 02:41
teghmehta sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: teghmehta already gave skyc0der points
Tegh
@teghmehta
Aug 01 2017 02:41
@khaduch Ken thanks for the help
CamperBot
@camperbot
Aug 01 2017 02:41
teghmehta sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3153 | @khaduch |http://www.freecodecamp.com/khaduch
Kevin
@kevinwr
Aug 01 2017 02:42
This is what it looks like when I set them both to max-height: 100%;
image.png
Tegh
@teghmehta
Aug 01 2017 02:42
But sky how do i send the index to the showRecipe function
Kevin
@kevinwr
Aug 01 2017 02:42
you can see the logo isn't the 100% I would expect it to be
Gulsvi
@gulsvi
Aug 01 2017 02:44
@teghmehta Change console.log("Click") to console.log(this) and see what you can grab by studying it in the console
You should be able to get the key from that
@kevinwr Use pixels instead of percent if you want it to remain the same size regardless of the screen size
Tegh
@teghmehta
Aug 01 2017 02:46
@SkyC0der Im just getting the whole object not one of the list items data
Gulsvi
@gulsvi
Aug 01 2017 02:46
this.props.recipes lists each item
Tegh
@teghmehta
Aug 01 2017 02:47
Oh I know but I still cant show which one of the 3 I clicked
Gulsvi
@gulsvi
Aug 01 2017 02:47
Ahhh, I misunderstood
Do this with your function, for example:
  showRecipe: function(e) {
    console.log(e.target.textContent);
    //Open Panel
  },
You can study the event object if you need something different from e.target
Ken Haduch
@khaduch
Aug 01 2017 02:48
@teghmehta - you're welcome, but I didn't help too much... gotta go back to my React lessons! :)
Tegh
@teghmehta
Aug 01 2017 02:50
@SkyC0der I see! Now in the Id I can see partially the key, but how do I get that number
Gulsvi
@gulsvi
Aug 01 2017 02:50
hmmm, not sure, let me try some things
Since you have jQuery, you could cheat a little lol
  showRecipe: function(e) {
    console.log($(e.target).index());
    //Open Panel
  },
Tegh
@teghmehta
Aug 01 2017 02:51
@SkyC0der sneaky
Gulsvi
@gulsvi
Aug 01 2017 02:51
I'm sure there's a non-jquery way though
Tegh
@teghmehta
Aug 01 2017 02:51
lol cool ty
Pagnito
@Pagnito
Aug 01 2017 02:55
@SkyC0der
Tegh
@teghmehta
Aug 01 2017 02:55
Sky another question
Pagnito
@Pagnito
Aug 01 2017 02:55
yo check it out again, lemme know what u think
Tegh
@teghmehta
Aug 01 2017 02:55
The panel doesnt open and close
Gulsvi
@gulsvi
Aug 01 2017 02:55
@teghmehta It's pretty ugly....I'm not sure how to do it in a clean way with react :/
Pagnito
@Pagnito
Aug 01 2017 02:55
it seems kinda slow on mobile tho
i think it might be cause of the social media links
pngs
Gulsvi
@gulsvi
Aug 01 2017 02:57

@teghmehta Maybe something like this?

  render: function () {
    var titles = this.props.recipes.map(function(recipe, i) {
      return (
        <ListGroupItem key={i} id={'recipe-' + i}>
          {recipe.title}
        </ListGroupItem>
      )
    });

Give it an ID you can predict

I'm positive you should be talking to someone else lol
Tegh
@teghmehta
Aug 01 2017 02:58
@SkyC0der It works
My next step is not buid a panel
but the panel does not open
Shivaji
@psrijan
Aug 01 2017 02:58
@khaduch thanks :)
CamperBot
@camperbot
Aug 01 2017 02:58
psrijan sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3154 | @khaduch |http://www.freecodecamp.com/khaduch
Gulsvi
@gulsvi
Aug 01 2017 02:59
I'm not sure what's going on there, which I could help more
Tegh
@teghmehta
Aug 01 2017 02:59
ty anyways
Gulsvi
@gulsvi
Aug 01 2017 03:01
@Pagnito It looks good!
Pagnito
@Pagnito
Aug 01 2017 03:04
@SkyC0der woop woop!
finaly can restart my react course, tho doing this reminded me how much there is still to learn about the basics
Pagnito
@Pagnito
Aug 01 2017 03:10
i think i might have made the page slower by throwing all the content onto one page using display: none;, i thought it would make it faster, but for some reason is slow
its normal on my mac
but on my phone its laggy
iso
@iso1048
Aug 01 2017 03:11
@Pagnito did you make a website?
Pagnito
@Pagnito
Aug 01 2017 03:11
@gothamknight
yea
its just a portfolio
pavelyeganov.com
iso
@iso1048
Aug 01 2017 03:14
@Pagnito that welcome animation is cool.
looks good
Pagnito
@Pagnito
Aug 01 2017 03:14
thank you!
it took HOURS to make lol
iso
@iso1048
Aug 01 2017 03:14
where did you learn about that animation stuff?
Pagnito
@Pagnito
Aug 01 2017 03:15
just research
and determination lol
w/e cool idea u have dont compromise it
try to do it just like u see it in ur head
there is one i wanted to do that i couldnt to be honest
but i like this one even more
eventually tho ill make the original idea
i can do it now, if i pay for GSAP library
but i dont have money to pay for it atm
plus there is a way to do it without it
CallMeOrange
@EgnaroDev
Aug 01 2017 03:58
@Pagnito Dude, looks great
Pagnito
@Pagnito
Aug 01 2017 04:00
@EgnaroDev thanks!
CamperBot
@camperbot
Aug 01 2017 04:00
pagnito sends brownie points to @egnarodev :sparkles: :thumbsup: :sparkles:
:cookie: 532 | @egnarodev |http://www.freecodecamp.com/egnarodev
CallMeOrange
@EgnaroDev
Aug 01 2017 04:01
you know who I am right?
Pagnito
@Pagnito
Aug 01 2017 04:01
yes!
CallMeOrange
@EgnaroDev
Aug 01 2017 04:01
ah
Pagnito
@Pagnito
Aug 01 2017 04:01
mzt...somethin sometihng
CallMeOrange
@EgnaroDev
Aug 01 2017 04:01
mctwodigitzero
Pagnito
@Pagnito
Aug 01 2017 04:01
oh yea
lol
CallMeOrange
@EgnaroDev
Aug 01 2017 04:01
lol
Pagnito
@Pagnito
Aug 01 2017 04:01
i had two letter right
CallMeOrange
@EgnaroDev
Aug 01 2017 04:01
xd
Your portfolio is amazing, you will be able to become Full Stack Developer
Don't give up :wink:
iso
@iso1048
Aug 01 2017 04:10
@SkyC0der @AdiSkywalker https://swapi.co/
Gulsvi
@gulsvi
Aug 01 2017 04:14
lol, time for a new quote machine @gothamknight thanks :)
CamperBot
@camperbot
Aug 01 2017 04:14
skyc0der sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 336 | @gothamknight |http://www.freecodecamp.com/gothamknight
Pagnito
@Pagnito
Aug 01 2017 04:17
@EgnaroDev oh shit thanks haha
CamperBot
@camperbot
Aug 01 2017 04:17
pagnito sends brownie points to @egnarodev :sparkles: :thumbsup: :sparkles:
:warning: pagnito already gave egnarodev points
CallMeOrange
@EgnaroDev
Aug 01 2017 04:18
You're welcome :)
Pagnito
@Pagnito
Aug 01 2017 04:26
:cry:
CallMeOrange
@EgnaroDev
Aug 01 2017 04:28
What's wrong
Pagnito
@Pagnito
Aug 01 2017 04:28
no its a happy cry
Michael Karpinski
@karpimpski
Aug 01 2017 04:33

can anybody explain why this React code works:

this.state.available.map((arr) => {
  if(arr[0] === coordinates[0] && arr[1] === coordinates[1]) matched = true;
});

but this doesn't

this.state.available.map((arr) => {
  if(arr === coordinates) matched = true;
});

the arrays only have 2 elements in each, and I've made sure that they match

Pagnito
@Pagnito
Aug 01 2017 04:35
i remember tryin to compare arrays and i had some trouble wit it
im not sure u can compare arrays
Michael Karpinski
@karpimpski
Aug 01 2017 04:37
@Pagnito you're right. I assumed it was a React thing, but trying to compare arrays in the console always returns false. thanks for the help!
CamperBot
@camperbot
Aug 01 2017 04:37
karpimpski sends brownie points to @pagnito :sparkles: :thumbsup: :sparkles:
:cookie: 274 | @pagnito |http://www.freecodecamp.com/pagnito
Michael Karpinski
@karpimpski
Aug 01 2017 04:37
any clue why JavaScript doesn't let you compare arrays?
Pagnito
@Pagnito
Aug 01 2017 04:37
@karpimpski np
i dunno
CallMeOrange
@EgnaroDev
Aug 01 2017 04:47
I think you should be able to compare arrays..
Michael Karpinski
@karpimpski
Aug 01 2017 04:48
@EgnaroDev you could easily make a function for it yourself. not a big deal that it's not native, I'm sure there's some kind of reason
CallMeOrange
@EgnaroDev
Aug 01 2017 04:48
Well unless you compare each element in an array
Michael Karpinski
@karpimpski
Aug 01 2017 04:50
@EgnaroDev something like this should work for any length:
function compareArray(arrOne, arrTwo){
    if(arrOne.length !== arrTwo.length) return false;
    arrOne.map((el, index) => {
        if(arrTwo[index] !== el) return false;
    });
    return true;
}
CallMeOrange
@EgnaroDev
Aug 01 2017 04:50
function test(arr, arr1){
  console.log(arr !== arr1); // true
  console.log(arr === arr1); // false
}
test([1,2,3], [1,2,3]);
:trollface:
iso
@iso1048
Aug 01 2017 04:50
@karpimpski would it be because arrays are not immutable?
CallMeOrange
@EgnaroDev
Aug 01 2017 04:50
Is this Diff two arrays?
Michael Karpinski
@karpimpski
Aug 01 2017 04:51
@gothamknight you're probably right
@EgnaroDev Diff two arrays? I'm still testing it, but so far every set of arrays I've put in is accurate
CallMeOrange
@EgnaroDev
Aug 01 2017 04:52
I thought you are working on an algorithm
Michael Karpinski
@karpimpski
Aug 01 2017 04:53
@EgnaroDev yeah, I completed it. the compareArray function I wrote works to accurately compare any two arrays
CallMeOrange
@EgnaroDev
Aug 01 2017 04:53
I see
Michael Karpinski
@karpimpski
Aug 01 2017 04:54
there could be some obvious improvements, like making sure the two things are arrays. you could also prototype it in your Array class so you could clean it up to a arr.compare(arrTwo). but this is just a quick mockup for something you could use in your code if you run into this issue
CallMeOrange
@EgnaroDev
Aug 01 2017 04:54
hm.. I'm going to try out .compare()
or that method doesn't exist? :/
Well either way, I don't need to learn it
Michael Karpinski
@karpimpski
Aug 01 2017 04:56
@EgnaroDev here you go:
Array.prototype.compare = function(arrTwo) {
  if(this.length !== arrTwo.length) return false;
    this.map((el, index) => {
        if(arrTwo[index] !== el) return false;
    });
    return true;
};

console.log([1,2,3].compare([1,2,3,5]));
you can put that into your code to make your own .compare() function
CallMeOrange
@EgnaroDev
Aug 01 2017 04:56
oh I thought its a method
Interesting
Michael Karpinski
@karpimpski
Aug 01 2017 04:57
nope, I just meant you can create your own prototype method
CallMeOrange
@EgnaroDev
Aug 01 2017 04:57
I never tried to create prototype method
Hm.. looks fun
Michael Karpinski
@karpimpski
Aug 01 2017 04:57
it's a useful tool, but not necessary. as you can see I did the same thing with the method I used before. this one just looks a whole lot cleaner when you use it
CallMeOrange
@EgnaroDev
Aug 01 2017 04:58
Yeah
it is useful tool, indeed
prakash chandra yadav
@prakashyadav008
Aug 01 2017 04:59
hey can anyone help me out with css grids
the divs are getting mis aligned
Michael Karpinski
@karpimpski
Aug 01 2017 05:03
@prakashyadav008 I wouldn't use display: grid in the first place. I would use Flexbox or bootstrap for responsive grid design. it seems like grid's documentation online is almost non-existant and I've never used it
prakash chandra yadav
@prakashyadav008
Aug 01 2017 05:05
flex box doesnt works only for horizontal and vertical alignment
Michael Karpinski
@karpimpski
Aug 01 2017 05:06
that should be all you need, there are only 2 dimensions on the webpage. what are you trying to accomplish with grid that flexbox doesn't do?
Darth Skywalker
@AdiSkywalker
Aug 01 2017 05:10
@gothamknight :+1:
Lallo Vigil
@lalov1
Aug 01 2017 05:12
Starting to work on the Simon Project , but I'm having some layout issues. Also, I'm using flexbox for the first time. Is there any easy way to get the controls on top of the colors like in the example? https://codepen.io/lalov1/full/MvgvxY/
Michael Karpinski
@karpimpski
Aug 01 2017 05:13
@prakashyadav008 hey, I'm gonna head to bed. if you still need help tomorrow I'll definitely try to help out. I've been using Flexbox for most of my projects so I can probably help you figure out the grid with Flexbox if you wanna try that. good luck!
prakash chandra yadav
@prakashyadav008
Aug 01 2017 05:17
i am trying to make a responsive design like i am learning the basics at the moment
flex works well for a one dimensional design and grid works well for one or two dimensional design
@karpimpski
i think the problem may be the browser
Long Nguyen
@longnt80
Aug 01 2017 05:35
@lalov1 position: absolute
Fernando
@lestairon
Aug 01 2017 05:44
Hm
Is it good to always use a grid system to build our pages?
can someone please help me found out why my javascript code is not working ?
iso
@iso1048
Aug 01 2017 06:26
@singhchamp1234 your url needs to use https not http...?
Trommelochse
@Trommelochse
Aug 01 2017 06:26
@singhchamp1234 the success function for your AJAX call needs to be placed within the object that you pass to $.ajax()
Long Nguyen
@longnt80
Aug 01 2017 06:27

@lestairon

Is it good to always use a grid system to build our pages?

what do you mean?

Gegiskhan
@gegiskhan
Aug 01 2017 06:38
hi guys, anyone tells my why this pen not work on firefox and ms edge?
zivce_
@zivce
Aug 01 2017 07:20
@khaduch thanks saw it now you are right I might add a refresh button ! :clap:
CamperBot
@camperbot
Aug 01 2017 07:20
zivce sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3156 | @khaduch |http://www.freecodecamp.com/khaduch
Kevin
@kevinwr
Aug 01 2017 08:05
Anyone know why my site is flickering white when I resize in chrome, but doesn't do it in Firefox?
glitz20
@glitz20
Aug 01 2017 08:10
hey guys how can I make these four images touch to each other and each of them covering 50%of total width?
iso
@iso1048
Aug 01 2017 08:17
@sabin20 why is the image not showing? Could you set the images as background-image, then have background-size: cover ?
glitz20
@glitz20
Aug 01 2017 08:18
can you check it again
iso
@iso1048
Aug 01 2017 08:18
still no image @sabin20
glitz20
@glitz20
Aug 01 2017 08:20
@gothamknight it is not for background. I am trying image layover
@gothamknight it seems that imgur doesnot allow to post the image in codepen
iso
@iso1048
Aug 01 2017 08:24
@sabin20 you could use cloudinary
glitz20
@glitz20
Aug 01 2017 08:24
so maybe you can fork it
iso
@iso1048
Aug 01 2017 08:28
@sabin20 i can pm you the urls of your images after I upload them to cloudinary if you want? I did fork it but nothing changed....(what does forking even do?)
glitz20
@glitz20
Aug 01 2017 08:29
yeah that would be great
iso
@iso1048
Aug 01 2017 08:29
cool give me a sec
glitz20
@glitz20
Aug 01 2017 08:30
you can just upload one image and we can work with that
Muhammad IMRAN
@m-imran79
Aug 01 2017 09:03
Hello, Can anyone look into this code to see the error.

<!DOCTYPE HTML>

<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form>
<input type="text" name="num1" placeholder="Number1" />
<input type="text" name="num2" placeholder="Number2" />

<select name="operator">
<option>None</option>
<option>Add</option>
<option>Subtract</option>
<option>Multiply</option>
<option>Divide</option>
</select>
<br>
<br>
<button type="submit" name="submit" value="submit">Calculate</button>
</form>
<p>The answer is :</p>

<?php

if (isset($_GET['submit'])) {
$result1 = $_GET['num1'];
$result2 = $_GET['num2'];
$operator = $_GET['$operator'];
switch ($operator){
case "None":
echo "Please select entry";
Break;
case "Add":
echo $result1 + $result2;
Break;
case "Subtract":
echo $result1 - $result2;
Break;
case "Multiply":
echo $result1 * $result2;
Break;
case "Divide":
echo $result1 / $result2;
Break;
}
}
?>
</body>
</html>

image.png
image.png
Fabien SHAN
@X140hu4
Aug 01 2017 09:58
Can you edit your message and put your code between ?
`
Roberto Di Lillo
@koop4
Aug 01 2017 11:06
Is there a list of possible answer of the weather API provided by FCC?
Thayyeb salim
@Thayyebsalim
Aug 01 2017 11:22
Haven't seen any @koop4
heroiczero
@heroiczero
Aug 01 2017 11:24
@koop4 do you mean a list of properties you could try using console.log to see an example of the properties they return
Ken Haduch
@khaduch
Aug 01 2017 11:29
@sabin20 - :point_up: August 1, 2017 4:20 AM - imgur does block cross-linking of images, and they specifically state in their terms of service that they will not allow cross-linking. There are other free image hosting sites, you might have found one by now.
Roberto Di Lillo
@koop4
Aug 01 2017 11:49
@heroiczero no i mean all the possible weather like "clear sky", "rainy" etc
heroiczero
@heroiczero
Aug 01 2017 11:54
@koop4 probably you could do a switch and list it all and show the image that is retrieved for your region
heroiczero
@heroiczero
Aug 01 2017 12:11
@koop4 try using http://openweathermap.org/weather-conditions they are using the OpenWeatherAPI but codepen does not accept http calls anymore so you have to use the new freecodecamp link
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:24
var enterT = "Enter  some text";
var numChars = enterT.length;
for (var i = 0; i < numChars; i++) {
  if (enterT.slice(i, i + 2) === "  ") {
    document.write(i);
    break;
  }
}
I don't understand why there is +2 in the splice...
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:25
@RasBiehl slice takes start index and end index
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:26
i know
but why + 2=?
what does 2 do?
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:26
that I don't know
From the look of it, it is checking for 2 spaces
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:26
in this case if the string assigned to enterT have double spaces
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:27
appearing consecutively
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:27
but i want to know why there is +2
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:27
@RasBiehl I see. Got your question now
consider, your i is 5
so enterT.slice(i, i+2) will give you " "
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:28
your what
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:28
i
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:30
i still don't understand why it says +2
when the slice already takes the whole strnig
string
@AdiSkywalker
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:32
becuase you want to check for double spaces
so 2
for triple spaces, you would have written + 3
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:33
  • 3?
no that's not right
when i try it, it doesn't work
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:34
what did you try?
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:34
it only works with +2 for some reason.
that's the mystery here.
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:34
because you don't have 3 consecutive spaces in your enterT
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:34
ive been trying to finding out since yesterday why the heck there is +2
yes but i edited it inside codepen
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:34
okay
so did you also update === " " ?
to match === " "
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:35
no, but if i did it will work.
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:35
yes
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:35
but when the spacing inside the string, is already a part of the string.
why +2=?
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:36
because at index 5, the slice of enterT from 5 to 7 is " "
and 7-5 = 2
so at any index, the possibility of finding consecutive spaces is index and index+2
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:37
i get it a litte.
now i lost it. :D
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:37
@RasBiehl hold on.. I'll prepare a repl for you
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:37
@AdiSkywalker ok thx
CamperBot
@camperbot
Aug 01 2017 12:37
rasbiehl sends brownie points to @adiskywalker :sparkles: :thumbsup: :sparkles:
:cookie: 307 | @adiskywalker |http://www.freecodecamp.com/adiskywalker
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:38
@RasBiehl Take a look at what is getting logged in console
Huỳnh Trần Khanh
@khanh2003
Aug 01 2017 12:39
          Enter  some text
i=0       -- str.slice(i, i+2) === "En"
i=1        -- str.slice(i, i+2) === "nt"
i=2         -- str.slice(i, i+2) === "te"
i=3          -- str.slice(i, i+2) === "er"
i=4           -- str.slice(i, i+2) === "r "
i=5            -- str.slice(i, i+2) === "  " // double space here yay!
i=6             -- str.slice(i, i+2) === " s"
i=7              -- str.slice(i, i+2) === "so"
i=8               -- str.slice(i, i+2) === "om"
i=9                -- str.slice(i, i+2) === "me"
i=10                -- str.slice(i, i+2) === "e "
i=11                 -- str.slice(i, i+2) === " t"
i=12                  -- str.slice(i, i+2) === "te"
i=13                   -- str.slice(i, i+2) === "ex"
i=14                    -- str.slice(i, i+2) === "xt"
@RasBiehl your stuff here ^
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:43
still don't understand it... i guuesss m supid
oh i understand it a litte now.
instead of i + 1
e
n
t
e
r
some text
for every letter
it goes en
ter
Huỳnh Trần Khanh
@khanh2003
Aug 01 2017 12:46
@RasBiehl what you need is Chrome DevTools
Chrome DevTools is a JS debugger, it helps you understand your JS code better. Learn to use it, it is built in your Chrome browser.
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:48
why en, nt, te, er?
now i don't get it....
Eric Weiss
@eweiss17
Aug 01 2017 12:49
your slice is i+2, if it was i+1 i'd be one letter
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:50
var myName = Rasmus Biehl;
so if i wanted to see if there was 'us' in my name, i would say i + 2?
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:52
@RasBiehl +2 because 'us'.length is 2
Eric Weiss
@eweiss17
Aug 01 2017 12:53
the u starts at index 4
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:53
and if i wanted "asmus" i would say +5?
Huỳnh Trần Khanh
@khanh2003
Aug 01 2017 12:53
@RasBiehl yeah, you are right
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:53
ok i understand it a little now, now i will practice it.
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:53
Correct
Rasmus Biehl
@RasBiehl
Aug 01 2017 12:53
thx @khanh2003 @AdiSkywalker @eweiss17
CamperBot
@camperbot
Aug 01 2017 12:53
rasbiehl sends brownie points to @khanh2003 and @adiskywalker and @eweiss17 :sparkles: :thumbsup: :sparkles:
:warning: rasbiehl already gave adiskywalker points
:cookie: 110 | @khanh2003 |http://www.freecodecamp.com/khanh2003
:cookie: 577 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Aug 01 2017 12:53
mdn gives good examples if you get stuck
Huỳnh Trần Khanh
@khanh2003
Aug 01 2017 12:54
mdn is 1000 times better than w3schools
Darth Skywalker
@AdiSkywalker
Aug 01 2017 12:56
Lots of poorly written code in the industry => Thanks to W3Schools
devpaaji
@devpaaji
Aug 01 2017 13:25
hello darth
how are you doing @AdiSkywalker
Darth Skywalker
@AdiSkywalker
Aug 01 2017 13:28
@devpaaji :wave:
devpaaji
@devpaaji
Aug 01 2017 13:33
how is your work going @AdiSkywalker
Darth Skywalker
@AdiSkywalker
Aug 01 2017 13:45
all good mate.. how are you?
devpaaji
@devpaaji
Aug 01 2017 13:53
good
Baillie O'Grady
@baillieo
Aug 01 2017 14:23
anybody got any interesting project ideas?
gusmancity
@gusmancity
Aug 01 2017 14:45
hello) is there anyone who can help me with media queries? )
Eric Weiss
@eweiss17
Aug 01 2017 15:18
@gusmancity defines attributes based on the size of the screen
Ramsey Njire
@RamseyNjire
Aug 01 2017 15:58
@baillieo I do. But it's probably going to be demanding, and might even require us to develop a mobile app.
Getting an Error in the console
Elektra NatchuSs
@ElektraNatchus
Aug 01 2017 16:28
Anyone can please explain to me why is my animate() method for a thumbnail slider NOT working? Here is Codepen
https://codepen.io/anon/pen/ayZbRN
Eric Weiss
@eweiss17
Aug 01 2017 16:46
@ElektraNatchus did you attach those animates to anything?
Gulsvi
@gulsvi
Aug 01 2017 16:49

@ElektraNatchus With Relative positioning, right and bottom don't behave as expected compared to an element with position: absolute. Change this:

function myFunctionB() {
    $(".c").animate({right: "530px"});  
}

to:

function myFunctionB() {
    $(".c").animate({left: "-530px"});  
}
Eric Weiss
@eweiss17
Aug 01 2017 16:50
nvm i saw you did
Marko Rajkovic
@marko88ks
Aug 01 2017 17:05
does somebody know how to add divs into the full-page-scroll ?? when I insert some div , strange things hapend to the rest of section! pls help
Gulsvi
@gulsvi
Aug 01 2017 17:18
@marko88ks Can you show your code? I'm not sure what you mean by the "full-page-scroll"
Marko Rajkovic
@marko88ks
Aug 01 2017 17:19
@SkyC0der ok just a sec
@SkyC0der html : http://prntscr.com/g32l93 css : http://prntscr.com/g32lkz , in this video you can see better https://www.youtube.com/watch?v=CtPDQudzjnM
Gulsvi
@gulsvi
Aug 01 2017 17:23
@marko88ks I've never used that plugin
Probably a better question for the video author - or the author of the plugin if you know how to contact them
Marko Rajkovic
@marko88ks
Aug 01 2017 17:24
@SkyC0der aha , ok .. thanks anyway
CamperBot
@camperbot
Aug 01 2017 17:24
marko88ks sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2278 | @skyc0der |http://www.freecodecamp.com/skyc0der
hifede
@hifede
Aug 01 2017 17:46
hi again guys! thanks to @SkyC0der for all your help yesterday. basically i read the link you sent regarding the centering of grids, but it somehow still doesnt work on my codepen project
CamperBot
@camperbot
Aug 01 2017 17:46
hifede sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2279 | @skyc0der |http://www.freecodecamp.com/skyc0der
hifede
@hifede
Aug 01 2017 17:47
https://codepen.io/arolf_flora/pen/KvzMmE the quote and "accomplishments" are still on the left sid
Gulsvi
@gulsvi
Aug 01 2017 17:50
@hifede Seems you are using Bootstrap 4, which uses different class names
  <div class="row text-center">
    <div class="col-8 offset-2">
      <h3 class="text-center"><i>"The future is female."</i></h3>
    </div>
  </div>
  <div class="row">
    <a href="#">
      <img class="img-fluid d-block mx-auto" src="https://s2.postimg.org/cib8h9tl5/Nm_Fm_ZWMx_MTc5_MCMvbm_VKRF83_S3du_VFJRUGxlemp_GYmh_Sb_Xdo.jpg" alt="Kiran Gandhi on stage">
    </a>
  </div>
Hey Sky will you take a look
Gulsvi
@gulsvi
Aug 01 2017 17:55
@teghmehta I'm not sure what's going on - you get a bunch of warnings if you use the non-minified react js files

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of RecipeList. See https://fb.me/react-warning-keys for more information.

\

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of IngredientList. See https://fb.me/react-warning-keys for more information.

\

Warning: Unknown DOM property class. Did you mean className?

\

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of Modal.

^^ This last one repeats hundreds of tims before giving you an uncaught exception
Uncaught RangeError: Maximum call stack size exceeded
@teghmehta
Tegh
@teghmehta
Aug 01 2017 17:59
I fixed the maximum call stack error
But now the modal isnt showing
Gulsvi
@gulsvi
Aug 01 2017 18:05
@teghmehta I'm sorry, I don't know anything about react bootstrap js
Without any errors to debug, I'm at a loss...
@hifede Curious, where are people getting this code from? (I see it in a lot of tribute pages!)
document.getElementsByTagName("h1")[0].style.fontSize = "80px";
It's the same as doing this in CSS, so wondering why people prefer to set it in their JS:
h1 {
  font-size: 80px;
}
gsea4
@gsea4
Aug 01 2017 18:22
Hi guys,
In my Random Quote project, I'm trying to hide my buttons (get quote and twitter) when it is clicked, then show them again when quote is loaded. I've tried to wrap them with a div and make that div hidden; but somehow it doesn't hide the twitter button inside that div. Could anyone show me what is wrong with it?
https://codepen.io/Gsea4/pen/bredzr
Quinn Vinlove
@quin2
Aug 01 2017 18:23
lol I'm still having problems with callbacks
how does AJAX know when to run? like if I need the data in a global variable it just returns the value I set it to
@gsea4 it works for me!
Abhilash Kumar
@apravink
Aug 01 2017 18:27
Hi guys. Anyone here speak React?
gsea4
@gsea4
Aug 01 2017 18:27
@quin2 when I comment out the code that make the div visible, the get your quote button is hidden but the tweet button stills appear
@quin2 I've just commented out that part. You can try to run it again, the Tweet button won't be hidden
Gulsvi
@gulsvi
Aug 01 2017 18:30
@gsea4 It would help to separate your logic into different functions to manage it better. You have some tricky timing going on that will make this a little more challenging the way it's set up now. For example, a 500ms and 700ms fade out and an 800ms fadeIn without animation complete events attached.
@gsea4 A quick and dirty way to get it working is to trigger your displayButtons() function off of the animation complete event for your blockquote-reverse fadeIn:
  $(".blockquote-reverse").fadeIn(800, function() {
    createTwitBtn($('.blockquote-reverse').text())
  });
hifede
@hifede
Aug 01 2017 18:40
@SkyC0der the JS code is automatically set by codepen.
Eric Weiss
@eweiss17
Aug 01 2017 18:41
@quin2 do you have function to call your ajax?
Gulsvi
@gulsvi
Aug 01 2017 18:42
@hifede Maybe if you opened a template, but by default codepens are blank: https://s.codepen.io/pen
Quinn Vinlove
@quin2
Aug 01 2017 18:44
@eweiss17 yes, but it's not calling everything correctly
I have like 3 Ajax requests I'm trying to string together, and one needs to go after the other or else they all fail
Gulsvi
@gulsvi
Aug 01 2017 18:48
@eweiss17 What did I do for them?
look at their code and look at mine
Eric Weiss
@eweiss17
Aug 01 2017 18:48
oops sorry I must have struck a nerve
Quinn Vinlove
@quin2
Aug 01 2017 18:48
So could I nest requests inside of each other ?
like request{
request{
success: request{
success: request{
}
}
}
Gulsvi
@gulsvi
Aug 01 2017 18:49
Please @eweiss17, look at their code, look at mine, and tell me what you think is lame
Eric Weiss
@eweiss17
Aug 01 2017 18:50
i deleted it man, forget about it
glitz20
@glitz20
Aug 01 2017 18:51
Hey everyone can anyone help me picture attached to each other and each of them covering 50% width/ https://codepen.io/sabin20/pen/rzeqNJ
gsea4
@gsea4
Aug 01 2017 18:52
@SkyC0der I think I'm only having problem with the Twitter button, I seems like I can't control it. I've tried the code you provided. The get quote button stills display before the Tweet button. I'm trying to make them appear at the same time
Eric Weiss
@eweiss17
Aug 01 2017 18:53
@quin2 so you have an ajax call within an ajax call?
Gulsvi
@gulsvi
Aug 01 2017 18:58
@gsea4 Wow, there is a tiny delay there - good eye. Change visibility: hidden to display: none and visibility: visible to display: block.
Quinn Vinlove
@quin2
Aug 01 2017 18:58
yes. I think I figured out a method, which involves assigning variables to the Ajax calls and working from there to parse data with .done
@eweiss17 it's more like a call within a call within a call
I could do it all in one call but it would require a "premium subscription" to the API
Eric Weiss
@eweiss17
Aug 01 2017 19:00
as far as i am aware, data retrieved can only be used in it's immediate callback function
hifede
@hifede
Aug 01 2017 19:00
hey guye - this time i'm having problems with margins/padding. i would like h2 to be just a little below h1 with not so much space in between, but trying to adjust margin or padding didnt seem to help. anyone has an idea?
Eric Weiss
@eweiss17
Aug 01 2017 19:01
aka you can't use data gotten from the first ajax request in the second (except for the call to the second)
@quin2 so u got it then?
Eunice Park
@eunicode
Aug 01 2017 19:02
I'm sorry if this is a dumb question, but why isn't the Element.innerHTML property working? I retrieved a city from an API and I'm trying to input that city into <div id="cityselector">. It's on line 25. (The API call works fine, so it's not that)
https://codepen.io/eunipa/pen/qXNEaP?editors=1010
Quinn Vinlove
@quin2
Aug 01 2017 19:03
@eweiss17 sort of. Ill come running back to gitter if it doesn't work though :D Im learning so much about AJAX though.
Eric Weiss
@eweiss17
Aug 01 2017 19:03
@quin2 alright gl
@hifede margin-bottom: 0; on the h1 element?
@hifede you are assigning margin to the h1 here
h1 {
   font-family: Aclonica;
  margin: 30px;

}
that applies to all directions
Koderkid1936
@Koderkid1936
Aug 01 2017 19:07
An "Instance" in programming means an object belonging to a particular class. <---------Is this statement true?
gsea4
@gsea4
Aug 01 2017 19:11
@SkyC0der now I'm able to hide both of the buttons, but when displaying that div, somehow there is still a delay with the Tweet button
Eric Weiss
@eweiss17
Aug 01 2017 19:11
@Koderkid1936 is this for a quiz?
Koderkid1936
@Koderkid1936
Aug 01 2017 19:15
@eweiss17 sort of, I'm just using my own words to try and define what an "instance" means and I need people to tell me if I described it correctly
Jack Lyons
@JackEdwardLyons
Aug 01 2017 19:33
Hi guys, I'm wondering why these youtube videos wont play in my codepen -- can someone help?
https://codepen.io/JackEdwardLyons/pen/oeLbPy?editors=1010
im retrieving them dynamically
Abhilash Kumar
@apravink
Aug 01 2017 19:34
Hi. Is anyone well versed in React here?
teevik
@teevik
Aug 01 2017 19:35
probably better to ask in HelpDataViz
Abhilash Kumar
@apravink
Aug 01 2017 19:36
Good call
glitz20
@glitz20
Aug 01 2017 19:47
can anyone please let me know why my carousel is not working? https://codepen.io/sabin20/pen/rzeqNJ
Jack Lyons
@JackEdwardLyons
Aug 01 2017 19:52
its ok I got it working
Pagnito
@Pagnito
Aug 01 2017 20:07
anyone have a problem with chrome loggin out everytime u close the browser?
i have my cookies and data not to clear after closing too
glitz20
@glitz20
Aug 01 2017 20:12
can anyone please let me know why my carousel is not working? https://codepen.io/sabin20/pen/rzeqNJ
Ken Haduch
@khaduch
Aug 01 2017 21:05
@sabin20 - I posted answers for you here: :point_up: August 1, 2017 4:36 PM
hifede
@hifede
Aug 01 2017 21:33
@eweiss17 thank you for your help !
CamperBot
@camperbot
Aug 01 2017 21:33
hifede sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 578 | @eweiss17 |http://www.freecodecamp.com/eweiss17
hifede
@hifede
Aug 01 2017 21:33
another thing i seem to be stuck with is that i am trying to move my caption to the left but it stays in the middle... anyone has a suggestion what i could do? https://codepen.io/arolf_flora/pen/KvzMmE
Hello911
@Hello911
Aug 01 2017 21:34
What does Google Place Photo API responseTeext comes in? Do I get the image url? I try to parse the returned info and stringify it and store it in a variable. I could see the result in console.log. Here is my project the API request is near the end of the JS section. https://codepen.io/Hello911/pen/prbEjz?editors=0010
iso
@iso1048
Aug 01 2017 21:39
@hifede text-align: left, not align: left. Doing that takes the caption completely to the left though so you would have to make other adjustments....
Paige T
@pmtaylor832
Aug 01 2017 21:53
image.png
Liam Docherty
@ldocherty1
Aug 01 2017 22:10
What is the best way in bootstrap v4 to put text in the middle centre of the page? What type of col would I use for that? Is this the best way of doing it?
<!-- Page content -->
    <div class="container">
      <div class="row">
        <div class="col">
          <div class="main-text text-center">
            <h2>Test</h2>
          </div>
        </div>
      </div>
    </div><!-- /.container -->

.container {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
dyon3334
@dyon3334
Aug 01 2017 22:37
any intermediate javascript video links ?
aRtoo
@artoodeeto
Aug 01 2017 23:11
hello master! how do you make a live search on a API?? i have 2 solutions but both of them doesnt work. been struggling for 2 days now to figure this out. heres my solution.
  var test=[];
      //event to live search. still not working.
      $('#search-user').keyup(function() {
        var searchUser = $('#search-user').val();
        var expression = new RegExp(searchUser,'i');
          for(var i=0; i<userArr.length; i++){
            test.push(userArr[i].search(expression));
          }
        })

        console.log(test);

        //shit solution 
        $('#search-user').keyup(functon() {
          var searchUser = $('#search-user').val();
          userDataAndStatus(searchUser);
        })
glitz20
@glitz20
Aug 01 2017 23:33
hey guys how can I make the image in carousel cover 100% of screen width?https://codepen.io/sabin20/pen/rzeqNJ
Anthony Armfield
@Anthony-Armfield
Aug 01 2017 23:38

@sabin20 you can add a style to the image. I used:

.pic {width: 100%}

This will make for it to be responsive when the screensize is different.

glitz20
@glitz20
Aug 01 2017 23:43
@Anthony-Armfield thank you. I had forgotten to add my style.css in my html and it has causing trouble for a while
CamperBot
@camperbot
Aug 01 2017 23:43
sabin20 sends brownie points to @anthony-armfield :sparkles: :thumbsup: :sparkles:
:warning: @anthony-armfield's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Curtis
@CurtisJCamp
Aug 01 2017 23:44
Hey I was wondering if anybody can help me out with some css. I put a hover overlay over an img and but the text that I put inside the overlay stays only a word or two wide and ends up looking weird. I feel like its something really simple but I'm just not that experienced with overlays. Its for my Twitch project which I hope to actually use myself in the future because I play a lot of Destiny in my free time. https://codepen.io/CurtisjCamp/pen/xLwvaQ?editors=0110
There is also a problem with all the links that I click on in a browser, it works perfectly on my phone, but on my computer the links just stay on a blank page.
Anthony Armfield
@Anthony-Armfield
Aug 01 2017 23:51
It looks like your div that has a class of "middle" is limiting the space for the text. If you add a width: 75%, and a height: auto, that should make enough room for the text to be on each line. Though, I didn't go through all of your items to see if more width is needed.
korzo
@korzo
Aug 01 2017 23:52
@CurtisJCamp it's because .bannerContainer has width 50%
Long Nguyen
@longnt80
Aug 01 2017 23:53

@CurtisJCamp

There is also a problem with all the links that I click on in a browser, it works perfectly on my phone, but on my computer the links just stay on a blank page.

that's weird

Gulsvi
@gulsvi
Aug 01 2017 23:54
@CurtisJCamp Twitch doesn't let you open channels from inside an iframe, like the one codepen uses to show your page in Editor, Full, and Details views. Click "Change View" -> "Debug Mode" and it will work fine.
(the same thing happens with the example project and every other Twitch app on Codepen)
Curtis
@CurtisJCamp
Aug 01 2017 23:58
Thankyou to @Anthony-Armfield @korzo @longnt80 and @SkyC0der for helping me out! Everything looks great now.
CamperBot
@camperbot
Aug 01 2017 23:58
curtisjcamp sends brownie points to @anthony-armfield and @korzo and @longnt80 and @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: @anthony-armfield's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
:cookie: 326 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 474 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 2280 | @skyc0der |http://www.freecodecamp.com/skyc0der
Long Nguyen
@longnt80
Aug 01 2017 23:59
please check out my twitch app too, just finished it:
https://longnt80.github.io/twitchtv/