These are chat archives for FreeCodeCamp/HelpFrontEnd

30th
Jun 2017
Tyler Johnson
@tylerjj17
Jun 30 2017 00:01
does anyone know the twitch api mine isnt working https://codepen.io/tylerjj17/pen/rwJzMv?editors=1010
Johnny
@jtan3
Jun 30 2017 00:04
@tylerjj17 you need an account after your api url.
@tylerjj17 https://wind-bow.glitch.me/twitch-api/streams/freecodecamp use glitch.me instead of the gomix.me
 $.getJSON(url,function(deta1){
    if(data1.stream===null){
@tylerjj17 you used deta1 in your function and then data1 in your if statement
Tyler Johnson
@tylerjj17
Jun 30 2017 00:07
@jtan3 okay thank you so much
CamperBot
@camperbot
Jun 30 2017 00:07
tylerjj17 sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 435 | @jtan3 |http://www.freecodecamp.com/jtan3
Miguel Ben
@Mius00
Jun 30 2017 00:19
Hello Guys, Can we ask question UX related here too?
ManOfUnknownNationality
@nhavar
Jun 30 2017 00:46
@Mius00 what do you need
shilpi verma
@shilpiverma509
Jun 30 2017 02:11
Hello everyone, I am unable to get the ajax call working to display the live streams. When I run into the console this it says $.ajax in not a function. If anyone looks into this , please help me with this.
$.ajax({
url:"https://api.twitch.tv/kraken/streams/users/44322889?client_id=i16sz6vhb69ua6rk83j2v1emsig1tu",
Accept: 'application/vnd.twitchtv.v5+json',
type: 'GET',
success: function (data){
console.log(data);
}
});
shivam gupta
@shivamg11000
Jun 30 2017 02:33
@shilpiverma509 you can use
$.getJSON( url , callback )
instead
@shilpiverma509
Kaz Baig
@kbaig
Jun 30 2017 02:45
@Saikat-Sinha I think it's because o.inc is not a function. You'd have to add o as a second parameter to the changer function
shilpi verma
@shilpiverma509
Jun 30 2017 02:49
@shivamg11000 can you ellaborate
shivam gupta
@shivamg11000
Jun 30 2017 02:50
@shilpiverma509
$.getJSON(  url , functon( data ){
     console.log( data );
}  )
you can use url =
https://api.twitch.tv/kraken/streams/[Channel Name]?client_id=i16sz6vhb69ua6rk83j2v1emsig1tu
Ccs99817
@ccs99817
Jun 30 2017 02:53
I am doing the 'show your local weather' challenge.
At the moment, I am trying to get the current location of the users and show on the screen. I have added the code required. But, nothing happened. I need your help.
here is my code
https://codepen.io/ccs99817/pen/jwYdqX?editors=0010
shivam gupta
@shivamg11000
Jun 30 2017 02:54
@ccs99817 what's the problem
shilpi verma
@shilpiverma509
Jun 30 2017 02:55
@shivamg11000 I gave the api wrong initilly. I'm using this url:"https://api.twitch.tv/kraken/streams/client_id=i16sz6vhb69ua6rk83j2v1emsig1tu
To display all the live streams. In your url : https://api.twitch.tv/kraken/streams/[Channel Name]?client_id=i16sz6vhb69ua6rk83j2v1emsig1tu , I will have to specify a particular channel name
shivam gupta
@shivamg11000
Jun 30 2017 02:56
@shilpiverma509 you can use this
'https://api.twitch.tv/kraken/streams/' + ChannelName + '?client_id=i16sz6vhb69ua6rk83j2v1emsig1tu'
@shilpiverma509 yes you have to specify the channel name like freecodecamp
Ccs99817
@ccs99817
Jun 30 2017 02:57
@shivamg11000 I have added some code toget the user' current location and show on the screen. But, there's no location shown on the screen after running the code.
shivam gupta
@shivamg11000
Jun 30 2017 02:57
@ccs99817 you know whats the difference between asynchronus and synchronus
the geolocation in asyn
after your geolocation code you are trying to make the url with coordinates, but at that instant geolocation is not completed
shilpi verma
@shilpiverma509
Jun 30 2017 03:02
@shivamg11000 I don't know why it isn't working for me. So I am running this in console. and I am geting, $.ajax is not a function everytime
shivam gupta
@shivamg11000
Jun 30 2017 03:05
@shilpiverma509 use linked jquery to your pen
shilpi verma
@shilpiverma509
Jun 30 2017 03:10
@shivamg11000 .Thanks I got it. My browser didnt have jquery included in it. This was why I was getting the error. Silly mistake
CamperBot
@camperbot
Jun 30 2017 03:10
shilpiverma509 sends brownie points to @shivamg11000 :sparkles: :thumbsup: :sparkles:
:cookie: 334 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
Ccs99817
@ccs99817
Jun 30 2017 03:14
@shivamg11000 how can i ensure the geolocation is completed before i try to make the url with coords.
shivam gupta
@shivamg11000
Jun 30 2017 03:15
@ccs99817 best solution is using promise in js but that would go above your mind.
For now I am giving a simple solution,
encapsulate all the thing that you wan to do after geolocation, and then call that function from geolocation
Ccs99817
@ccs99817
Jun 30 2017 03:17
@shivamg11000 thx i'll try
CamperBot
@camperbot
Jun 30 2017 03:17
ccs99817 sends brownie points to @shivamg11000 :sparkles: :thumbsup: :sparkles:
:cookie: 335 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
Aakash Bhusal
@aakashbhusal7
Jun 30 2017 03:33
hey guys..does anyone know the alternative to c9.io for backend tutorials here
Subramanya Chakravarthy
@chakrihacker
Jun 30 2017 03:44
@aakashbhusal7 try codeanywhere.com
Aakash Bhusal
@aakashbhusal7
Jun 30 2017 03:45
@chakrihacker thanks.. i will try
CamperBot
@camperbot
Jun 30 2017 03:45
aakashbhusal7 sends brownie points to @chakrihacker :sparkles: :thumbsup: :sparkles:
:cookie: 293 | @chakrihacker |http://www.freecodecamp.com/chakrihacker
Nathan
@clarken1996
Jun 30 2017 03:45
@aakashbhusal7 why do you need an alternative?
Aakash Bhusal
@aakashbhusal7
Jun 30 2017 03:45
@clarken1996 i dont have a credit card.
shivam gupta
@shivamg11000
Jun 30 2017 03:46
@aakashbhusal7 maybe use egghead
Aakash Bhusal
@aakashbhusal7
Jun 30 2017 03:46
ok
Nathan
@clarken1996
Jun 30 2017 03:48
@aakashbhusal7 okay thanks was just curious have not got to that part yet
CamperBot
@camperbot
Jun 30 2017 03:48
clarken1996 sends brownie points to @aakashbhusal7 :sparkles: :thumbsup: :sparkles:
:cookie: 268 | @aakashbhusal7 |http://www.freecodecamp.com/aakashbhusal7
Aakash Bhusal
@aakashbhusal7
Jun 30 2017 03:49
i too have not..learned some basics of js..now trying to learn nodejs..still left to solve intermediate and advanced projects of js
SuitedHound
@SuitedHound
Jun 30 2017 04:05
Finished my Personal Portfolio project. If anyone wants to take a look and tell me if it's good or needs to be improved, that would be great! :D
https://codepen.io/SuitedHound/full/vZeJOy/
Redoy
@redoy786
Jun 30 2017 04:09
Hi
Can anyone help me with the 181 map lesson named stand in line.?
I really don't understand this part.
iso
@iso1048
Jun 30 2017 04:12
@SuitedHound the elements are centered on the page.
image.png
SuitedHound
@SuitedHound
Jun 30 2017 04:13
@gothamknight ?
iso
@iso1048
Jun 30 2017 04:14
@SuitedHound did you want it to be centered?
SuitedHound
@SuitedHound
Jun 30 2017 04:14
@gothamknight Yes I want everything to be center
So it's symetric
Redoy
@redoy786
Jun 30 2017 04:16
@SuitedHound you still need to fix lots of things. First of all your nav bar. Then you should make it responsive. But with a basic knowledge good coding. Here can check my basic portfolio professionalwebdesign.site11.com
Johnny
@jtan3
Jun 30 2017 04:16
@redoy786 do you know how to add things to the end of an array?
SuitedHound
@SuitedHound
Jun 30 2017 04:17
@redoy786 what's wrong with my nav bar?
iso
@iso1048
Jun 30 2017 04:18
@SuitedHound "showcase" does not fully show
Redoy
@redoy786
Jun 30 2017 04:18
@jtan3 yes i know. But still confused with the math as it should return 5 etc conditions. I am thinking what number or numbers to add this part confusing
SuitedHound
@SuitedHound
Jun 30 2017 04:18
@gothamknight I don't know what you're looking at but with doepen in full screen everything is fine, no clipping or cutting so
codepen*
iso
@iso1048
Jun 30 2017 04:19
@SuitedHound did you look at that screenshot i sent?
SuitedHound
@SuitedHound
Jun 30 2017 04:19
@gothamknight yes but im not seeing the same thing
Redoy
@redoy786
Jun 30 2017 04:20
@SuitedHound good portfolio. but i viewed in mobile. Couldn't read anything.
SuitedHound
@SuitedHound
Jun 30 2017 04:21
@redoy786 Ah, i know how to fix that one sex
sec*
acually the code to fix that is in so idk why it's not working
Johnny
@jtan3
Jun 30 2017 04:22
@redoy786 it wants you to put the parameter "item" into the the parameter "arr"
@redoy786 function nextInLine(arr, item) there's 2 parameters inside the function.
SuitedHound
@SuitedHound
Jun 30 2017 04:24
@redoy786 Not sure why it messed up on mobile, added <meta name="viewport" content="width=device-width, initial-scale=1">
Well on a desktop, what is your opinion of the portfolio
Redoy
@redoy786
Jun 30 2017 04:24
Thanks @jtan3
CamperBot
@camperbot
Jun 30 2017 04:24
redoy786 sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 436 | @jtan3 |http://www.freecodecamp.com/jtan3
Redoy
@redoy786
Jun 30 2017 04:26
@jtan3 but how do i do the calculations because item and arr both are undefined.
Johnny
@jtan3
Jun 30 2017 04:27
@redoy786 the values in the parameters are given as the unchecked things you need to pass.
@redoy786nextInLine([2], 1) for example arr = [1] and item=1
@redoy786 nextInLine([5,6,7,8,9], 1) what are the arr and item values in this one?
Redoy
@redoy786
Jun 30 2017 04:31
Ok then if i add item into arr then what i will have to remove from its first line. Because arr will have only one value.
@jtan3 thanks got it
CamperBot
@camperbot
Jun 30 2017 04:31
redoy786 sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:warning: redoy786 already gave jtan3 points
Johnny
@jtan3
Jun 30 2017 04:32
@redoy786 look back on the lessons with push(), pop(), shift(), unshift();
Redoy
@redoy786
Jun 30 2017 04:32
Okay
Johnny
@jtan3
Jun 30 2017 04:38
@redoy786 did you get it?
Baibhav Gautam
@baibhavx
Jun 30 2017 05:14
what do you recommend using for Simon game user interface. I was thinking canvas but I don't have any experience with it
Gulsvi
@gulsvi
Jun 30 2017 05:30
@baibhavx Simon can be done with pure html and css
Something like:
.top-left {
  border-top-left-radius: 100%;
  border-width: 4px 2px 2px 4px;
}

.top-right {
  border-top-right-radius: 100%;
  border-width: 4px 4px 2px 2px;
}

.bottom-left {
  border-bottom-left-radius: 100%;
  border-width: 2px 2px 4px 4px;
}

.bottom-right {
  border-bottom-right-radius: 100%;
  border-width: 2px 4px 4px 2px;
}
make quadrants with circular edges
Baibhav Gautam
@baibhavx
Jun 30 2017 05:32
Thank you so much @SkyC0der, I had a feeling CSS would be good enough
CamperBot
@camperbot
Jun 30 2017 05:32
baibhavx sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1881 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 30 2017 05:32
I think <canvas> could be really cool too
I don't know where you would start though
Long Nguyen
@longnt80
Jun 30 2017 05:40

@SkyC0der

I don't know where you would start though

<canvas>
</canvas>

j/k

Gulsvi
@gulsvi
Jun 30 2017 05:40
:joy: @longnt80
I didn't know you were also a comedian :)
#nguyenning :)
Long Nguyen
@longnt80
Jun 30 2017 05:41
@SkyC0der lol
iso
@iso1048
Jun 30 2017 05:43
https://codepen.io/gothamknight/project/full/AyBKEz/ made this for practice. feedback is appreciated. Thanks.
Long Nguyen
@longnt80
Jun 30 2017 06:17
hey guys, in this website car comparison feature, the data is loaded from a json file. Is there any way to get that json file?
https://www.mazda3.ca/en/sedan/honda
Baibhav Gautam
@baibhavx
Jun 30 2017 06:31
@longnt80 I dont think so. I read their code, they make an API call to their own server. Unless they expose it themselves I dont think its available for public use.
Glen Westbrook
@glynnw
Jun 30 2017 06:36
@longnt80 https://www.mazda3.ca/en/sedan/json/data.json I answered in the other chat
Ccs99817
@ccs99817
Jun 30 2017 06:49
Can you guys take a look at my code?
I am making a weather show box.
In the JavaScript, I have added a code to get JSON and obtain the location name which is going to be placed in the browser screen. But, it does not work ==;
https://codepen.io/ccs99817/pen/MoQrVG?editors=0010
KinderPreet Singh
@kindercappy
Jun 30 2017 06:49
Wikipedia Viewer challenge. Please check it out. Feedback appreciated.
https://codepen.io/kindercappy/full/weymvN/
Ccs99817
@ccs99817
Jun 30 2017 06:50
@kindercappy It's really gorgeous. I like the hollow light.
shivam gupta
@shivamg11000
Jun 30 2017 06:51
@kindercappy it good, liked something new
KinderPreet Singh
@kindercappy
Jun 30 2017 06:52
@ccs99817 @shivamg11000 thanks :)
CamperBot
@camperbot
Jun 30 2017 06:52
kindercappy sends brownie points to @ccs99817 and @shivamg11000 :sparkles: :thumbsup: :sparkles:
:cookie: 263 | @ccs99817 |http://www.freecodecamp.com/ccs99817
:cookie: 336 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
Ccs99817
@ccs99817
Jun 30 2017 06:55
@kindercappy You deserve this. You must devoted a lot of time to build it.
KinderPreet Singh
@kindercappy
Jun 30 2017 06:59
@ccs99817 yes and the end result is good. so its all worth it. :)
Ccs99817
@ccs99817
Jun 30 2017 07:01
@kindercappy nice job man, keep going
KinderPreet Singh
@kindercappy
Jun 30 2017 07:02
@ccs99817 thanks. good day
CamperBot
@camperbot
Jun 30 2017 07:02
kindercappy sends brownie points to @ccs99817 :sparkles: :thumbsup: :sparkles:
:warning: kindercappy already gave ccs99817 points
Saeed Jassani
@saeedjassani
Jun 30 2017 07:10
hello! i am finally done with my Wikipedia Viewer and would like to hear feedbacks from you'll! https://codepen.io/saeedjassani/full/BZoeEL/
alpox
@alpox
Jun 30 2017 07:39
@saeedjassani i cannot search for anything on mobile :/
Ah wait worked now
But there should maybe be a button :D
@ccs99817 i dont see any place where you would call your functions except getCurrentTime
Ccs99817
@ccs99817
Jun 30 2017 07:47
@alpox O, ya ... THX Silly mistakes
CamperBot
@camperbot
Jun 30 2017 07:47
ccs99817 sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1183 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Jun 30 2017 08:23
@aakashbhusal7 if noone mentione it yet, fcc recommends to use glitch instead of c9 now. I made good experience with it so far
Alan Gabbianelli
@AlanGabbianelli
Jun 30 2017 08:30
@alpox what do you think the benefits are in using glitch over c9?
Alan Gabbianelli
@AlanGabbianelli
Jun 30 2017 08:36
Ok, I think this answer explains the benefits ;)
Ashik Ameer
@ashki98
Jun 30 2017 08:41
https://codepen.io/ashki98/pen/JNpxrw
Here s my Portfolio Page
I need to bring that social media part horizontally instead of vertically down.
I have used bootstrap row for this. But it doesn't seem to be working.
Please Help.
Saransh Barua
@saranshbarua
Jun 30 2017 08:44
Please review the Wikipedia viewer and give suggestions. Those are important!! https://codepen.io/saranshbarua/full/mwXpPd/
alpox
@alpox
Jun 30 2017 08:59
@AlanGabbianelli Mostly that you don't need a credit card and can just start and try :D
wonder
@wonder2991
Jun 30 2017 09:00
@saranshb it should work on enter
Saransh Barua
@saranshbarua
Jun 30 2017 09:01
@wonder2991 it works
wonder
@wonder2991
Jun 30 2017 09:01
ok. search doesn't work
Saransh Barua
@saranshbarua
Jun 30 2017 09:04
@wonder2991 it is working in my browser.
wonder
@wonder2991
Jun 30 2017 09:06
download (1).png
Spacetime
@justinemar
Jun 30 2017 09:21
Hello, i'm practicing media queries by cloning The Next Web homepage, but i'm having a problem with my fixed nav it goes underneath a content here is live preview https://justinemar.github.io/nextweb/ and here is my repository https://github.com/justinemar/justinemar.github.io/tree/master/nextweb i can't really figure out how to fix this problem...
wonder
@wonder2991
Jun 30 2017 09:28
@Hannibalony the nav should have z-index higher than the content
Spacetime
@justinemar
Jun 30 2017 09:36
@wonder2991 I see... i haven't really used z-index before thank you
CamperBot
@camperbot
Jun 30 2017 09:36
hannibalony sends brownie points to @wonder2991 :sparkles: :thumbsup: :sparkles:
:warning: @wonder2991's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Jonathan Meier
@jntme
Jun 30 2017 09:37
I want to make a background image on a div, which shows only a section of a big picture so its reziable to every width. Does somebody know a simple way to do this?
Spacetime
@justinemar
Jun 30 2017 09:38
you can use background: url(image url) and target that div
Jonathan Meier
@jntme
Jun 30 2017 09:39
@Hannibalony Thanks for you answer. I want it to behave like the intro on my previous page, for which I used a template: https://jntme.ch/
CamperBot
@camperbot
Jun 30 2017 09:39
jntme sends brownie points to @hannibalony :sparkles: :thumbsup: :sparkles:
:cookie: 8 | @hannibalony |http://www.freecodecamp.com/hannibalony
Jonathan Meier
@jntme
Jun 30 2017 09:40
@Hannibalony when it gets resized it doesn’t look strange or changes the height of the image
Spacetime
@justinemar
Jun 30 2017 09:40
@jntme i think background-size: cover will do it i am not really sure
Jonathan Meier
@jntme
Jun 30 2017 09:43
@Hannibalony sadly not
@Hannibalony it resizes: https://codepen.io/jntme/pen/owEMEy
wonder
@wonder2991
Jun 30 2017 09:51
@jntme try this :
.intro {
    background-image: url(https://upload.wikimedia.org/wikipedia/commons/3/3f/Fronalpstock_big.jpg);
    height: 1000px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
AlBMyName
@IshmaRey-Hool
Jun 30 2017 09:55
Can I use the open Weather API for the weather machine project
Zhanibek
@zhann1982
Jun 30 2017 09:59
@IshmaRey-Hool I had to change this API to another. There was a problem with CORS headers, which is related to the difference between "HTTP" and "HTTPS"
amatayamada
@amatayamada
Jun 30 2017 10:06
uh i feel uneasy with font awesome asking my e-mail to allow me to use their cdn
don't they just have static versions to link?
Zhanibek
@zhann1982
Jun 30 2017 10:06
@amatayamada yes. google for that
amatayamada
@amatayamada
Jun 30 2017 10:06
ya i found an alternative one, hosted by some other cdn
heroiczero
@heroiczero
Jun 30 2017 10:06
@amatayamada yes this : https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
amatayamada
@amatayamada
Jun 30 2017 10:07
i'm asking about the original one
heroiczero
@heroiczero
Jun 30 2017 10:07
amatayamada
@amatayamada
Jun 30 2017 10:07
thanks @heroiczero
CamperBot
@camperbot
Jun 30 2017 10:07
amatayamada sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1439 | @heroiczero |http://www.freecodecamp.com/heroiczero
Satyadeep Roat
@satyadeeproat
Jun 30 2017 10:56
Hey everyone. So I want to just ask something. There is a point we have react library. So does that mean we should do all the jquery stuff using react component cycle or we should import jquery to do the $ related stuff
shivam gupta
@shivamg11000
Jun 30 2017 11:05
@satyadeeproat You can use React amd jquery but React will always have speed advantage
Daniel Romero
@Ranacode
Jun 30 2017 12:02
Hey guys a one CSS question, i'm doing a dropdown secondary list from an item navbar, but depends on the resolution, the dropdown list get away from the list item, there are any method that autoadjust the margin and always appear the list below the list item?
Eric Weiss
@eweiss17
Jun 30 2017 14:04
@Ranacode What are you using currently
Gulsvi
@gulsvi
Jun 30 2017 14:20
@saranshb Good job! Looks good on mobile and desktop. There are several warnings/errors in your HTML and CSS if you analyze your code in codepen. Click the down arrow in the top, right-hand corner of the HTML/CSS panels and select the Analyze option.
Niichie
@Niichie
Jun 30 2017 14:21
Am I missing something here, it's telling me my h2 needs to be blue but this is my code?

<style>
  h2 {color: blue;}
</style>

<h2>CatPhotoApp</h2>
Eric Weiss
@eweiss17
Jun 30 2017 14:24
that h2 should be blue
Saransh Barua
@saranshbarua
Jun 30 2017 14:24
@SkyC0der thanks for the knowledge. I will look into it.
Niichie
@Niichie
Jun 30 2017 14:31
@eweiss17 I thought so too, but it refuses to let me contiune
Your h2 element should be blue.
so this sucks
Eric Weiss
@eweiss17
Jun 30 2017 14:33
reset challenge
refresh browser
try again
Nick Sladic
@Nickadiemus
Jun 30 2017 14:33
@SkyC0der how well are you with react?
Gulsvi
@gulsvi
Jun 30 2017 14:34
@Nickadiemus I only know the basics, haven't built any fully functional apps with react yet
Nick Sladic
@Nickadiemus
Jun 30 2017 14:35
@SkyC0der Ahh okay. I'm stuck on an error that just doesn't make any sense
Niichie
@Niichie
Jun 30 2017 14:37
@eweiss17 yep just did, still giving me the same error even though the preview is showing the correct color.
Eric Weiss
@eweiss17
Jun 30 2017 14:38
did it want you to use a hex number?
Niichie
@Niichie
Jun 30 2017 14:39
I dont think so. I tried the hex code and it just keeps saying it needs to be blue. I think it's bugged out :/
Gulsvi
@gulsvi
Jun 30 2017 14:40
@Niichie Click the "reset your code" button and try again, sometimes it's bugged :/
I copy/pasted your answer into the challenge and it passed, so your code is good
Niichie
@Niichie
Jun 30 2017 14:41
@SkyC0der Yeah I did several times, and refreshed my browser but it just won't let me! ugh
Eric Weiss
@eweiss17
Jun 30 2017 14:42
what browser
could be unsupported
You can go to the map and just go to the next challenge if all else fails
Niichie
@Niichie
Jun 30 2017 14:44
Yeah I just skipped it, I launched in chrome and tried it and it still wouldn't let me past the challenge. Thanks!
Yashawant Retharekar
@ygretharekar
Jun 30 2017 14:52
can anyboby help me solving react.js problem?
Ashik Ameer
@ashki98
Jun 30 2017 15:02
https://codepen.io/ashki98/pen/JNpxrw
Here s my Portfolio Page
I need to bring that social media part horizontally instead of vertically down.
I have used bootstrap row for this. But it doesn't seem to be working.
Please Help.
Gulsvi
@gulsvi
Jun 30 2017 15:05
@ashki98 You're missing the = after class for your columns. You also need to close the previous row </div> before your "Follow us on" text.
<div class="col-xs-4"> instead of <div class"col-xs-4">
Kiwalabye Richard
@xdon55
Jun 30 2017 15:06
@ashki98 can you try using lists instead. because it would be easier to display inline
Ashik Ameer
@ashki98
Jun 30 2017 15:07
@SkyC0der Thank You
CamperBot
@camperbot
Jun 30 2017 15:07
ashki98 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1883 | @skyc0der |http://www.freecodecamp.com/skyc0der
Ashik Ameer
@ashki98
Jun 30 2017 15:07
@xdon55 Let me check on that
Jonathan Meier
@jntme
Jun 30 2017 15:17
@wonder2991 it worked! thanks a lot!
CamperBot
@camperbot
Jun 30 2017 15:17
jntme sends brownie points to @wonder2991 :sparkles: :thumbsup: :sparkles:
:cookie: 375 | @wonder2991 |http://www.freecodecamp.com/wonder2991
shivam gupta
@shivamg11000
Jun 30 2017 15:24
@shivamg11000
I am making scroll to top thing , how can I slow down the scolling to the top
https://codepen.io/shivamg11000/pen/awqMZJ?editors=1010
Jan Shah
@JanShah
Jun 30 2017 15:38

@shivamg11000

$toTop.click(function(){
  $body.stop().animate({scrollTop:0}, 200, 'swing');
});

should work

shivam gupta
@shivamg11000
Jun 30 2017 15:41
@CentropyIT ty
CamperBot
@camperbot
Jun 30 2017 15:41
shivamg11000 sends brownie points to @centropyit :sparkles: :thumbsup: :sparkles:
:cookie: 433 | @centropyit |http://www.freecodecamp.com/centropyit
Jorge Castaño Delgado
@jhcastanod
Jun 30 2017 15:41

Hello guys, I need help with this:

<div class="class1">
  <article>something</article>
  <div class"block"><img class="image"></div>
</div>

What I need to do is to render the block class before the article tag. how can I get it with jquery? Any help would be great

Marcus Parsons
@marcusparsons
Jun 30 2017 15:42
Why wouldn't you just move the block class above the article?
Jorge Castaño Delgado
@jhcastanod
Jun 30 2017 15:43
I'm using a CMS that build the html automatically
Jan Shah
@JanShah
Jun 30 2017 15:43
what cms are you using? @jhcastanod
Jorge Castaño Delgado
@jhcastanod
Jun 30 2017 15:44
@CentropyIT Drupal
shivam gupta
@shivamg11000
Jun 30 2017 15:45
@CentropyIT I have this approach
$toTop.click(function(){
  function scroll_to_top(){
    if($body.scrollTop()==0){
      }
    else
      {
        $body.scrollTop($body.scrollTop()-100);
        scroll_to_top();
      } 
  }
});
but its not working
Moisés Man
@moigithub
Jun 30 2017 15:46
why u have function twice ? @shivamg11000
shivam gupta
@shivamg11000
Jun 30 2017 15:46
@moigithub this is called recursion
Moisés Man
@moigithub
Jun 30 2017 15:47
ur funciton inside ur other funciton is never called
when u click,, it just creates a function....
shivam gupta
@shivamg11000
Jun 30 2017 15:47
@moigithub why?
ok i see
silly mistake
Jan Shah
@JanShah
Jun 30 2017 15:47
@shivamg11000 the function in the click function exists but is never called
Moisés Man
@moigithub
Jun 30 2017 15:50
probably u should define the function outside the click,, and call it inside
else everytime u click.. it will re-create that function @shivamg11000
shivam gupta
@shivamg11000
Jun 30 2017 15:50
ok i see
Jan Shah
@JanShah
Jun 30 2017 15:51
@shivamg11000 even with the implementation corrected, it still only re-renders after the loop
shivam gupta
@shivamg11000
Jun 30 2017 15:51
@CentropyIT yeah using setInterval instead
Jan Shah
@JanShah
Jun 30 2017 15:51
did the code I originally sent not work for you?
seems the simplest way of achieving the outcome
shivam gupta
@shivamg11000
Jun 30 2017 15:52
@CentropyIT yeah it worked
but I am trying more approaches
Marcus Parsons
@marcusparsons
Jun 30 2017 15:56
Hey @jhcastanod, check out this Codepen I made. It shows you how to easily do that with jQuery: https://codepen.io/marcusparsons/pen/VWQNMo
Jorge Castaño Delgado
@jhcastanod
Jun 30 2017 15:58
@marcusparsons I gonna try it and let you know
Marcus Parsons
@marcusparsons
Jun 30 2017 15:59
@jhcastanod I had changed class1 to classy but I've changed it back to class1
@SkyC0der , That works if the article doesn't need to be seen.
Gulsvi
@gulsvi
Jun 30 2017 16:03
It would be seen (rendered) after 1 second
Marcus Parsons
@marcusparsons
Jun 30 2017 16:03
@SkyC0der , I'm assuming that the article element is probably the main content here
@SkyC0der, It would indeed be seen but in that same spot where it was lol
Gulsvi
@gulsvi
Jun 30 2017 16:04
I understood "after" as in time, not location :) different interpretations
Jorge Castaño Delgado
@jhcastanod
Jun 30 2017 16:04
@marcusparsons worked perfectly. thanks man
CamperBot
@camperbot
Jun 30 2017 16:04
jhcastanod sends brownie points to @marcusparsons :sparkles: :thumbsup: :sparkles:
:cookie: 414 | @marcusparsons |http://www.freecodecamp.com/marcusparsons
Marcus Parsons
@marcusparsons
Jun 30 2017 16:05
@SkyC0der, ah indeed! haha! And you're welcome, Jorge. Anytime!
I'm sorry that I just used the word indeed twice in a row
Lolol
Hopper Kremer
@hopperkremer
Jun 30 2017 16:05
Hi guys, why isn't anything happening?
https://codepen.io/HopperKremer/pen/gRmddY?editors=1010
Hope you can help.
Marcus Parsons
@marcusparsons
Jun 30 2017 16:07
Hey @hopperkremer, you're just missing a ) after your last }
$("#start").on("click", function timer() {

   //parseFloat($("#seconds").value)
   var secs = 50;
   $("#countdown").html(secs);
     var wTimer = setInterval( function() {
        $("#countdown").html(secs);
        secs--;
        if (secs == 0) {
           clearInterval(wTimer);
           $("#countdown").html("0000");
           $("#whiskey").trigger("play");
      }
   }, 1000);
}); 
//need a parenthesis (at least) on that last ending }
You weren't closing the method call to on so JavaScript was all confused
Hopper Kremer
@hopperkremer
Jun 30 2017 16:08
@marcusparsons Praise be! Thank you!
CamperBot
@camperbot
Jun 30 2017 16:08
hopperkremer sends brownie points to @marcusparsons :sparkles: :thumbsup: :sparkles:
:cookie: 415 | @marcusparsons |http://www.freecodecamp.com/marcusparsons
Marcus Parsons
@marcusparsons
Jun 30 2017 16:09
@hopperkremer, no worries!
Btw, the Developer Tools (F12) in Chrome, Opera, Firefox, etc. is your bestest buddy :)
tomjohn90
@tomjohn90
Jun 30 2017 16:32
hello everyone

i have small problem
https://codepen.io/tomjohn90/pen/LLeLyB

how can i add white space between those two images. i tried to make it with margin or white border, but as you see i use :hover filter: brightness (60%) witch make the border dark as well what is unwanted. any idea how to solve it?

shivam gupta
@shivamg11000
Jun 30 2017 16:40
@tomjohn90 use margin-top in .img2
Daniel Romero
@Ranacode
Jun 30 2017 17:06
Hey guys i'm so confusing right now with fundation
the foundation.css is not working for me, i linked another css file and worked good
I can't use the classes of foundation because this problem
I'm using the latest version of firefox and chrome and downloaded the complete install
Marcus Parsons
@marcusparsons
Jun 30 2017 17:08
@Ranacode, ensure that foundation.css is properly linked to the page
Can we see the header of your document between the <head> tags?
Daniel Romero
@Ranacode
Jun 30 2017 17:08
<!DOCTYPE html>
<html class="no-js" lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Foundation for Sites</title>
  <link rel="stylesheet" href="css/foundation.css">
  <link rel="stylesheet" href="css/app.css">
</head>

<body>


  <script src="js/vendor/jquery.js"></script>
  <script src="js/vendor/what-input.js"></script>
  <script src="js/vendor/foundation.js"></script>
  <script src="js/app.js"></script>
</body>

</html>
I checked the links like 100 times or so
its all ok
Marcus Parsons
@marcusparsons
Jun 30 2017 17:09
Can you set up a codepen for this?
Daniel Romero
@Ranacode
Jun 30 2017 17:09
yes
In codepen is working
but in my browser no :S
Marcus Parsons
@marcusparsons
Jun 30 2017 17:14
If app.css is working, it's not the directory. Make sure foundation.css has styles in the file. Or try to hard refresh the page with Shift + F5
Daniel Romero
@Ranacode
Jun 30 2017 17:16
my app.css is working because i changed the background color of body and it works
foundation.css have styles and 'm refreshing like a demon
Marcus Parsons
@marcusparsons
Jun 30 2017 17:16
If you want to upload a copy of the entire folder like to dropbox, I will take a look at it on my end.
Daniel Romero
@Ranacode
Jun 30 2017 17:17
I didn't change anything
I just download the files throught the foundation page
and put the html in the browser
Gulsvi
@gulsvi
Jun 30 2017 17:18
are you sure it isn't foundation.min.css? it's hard to debug without seeing your local environment :(
Looks like you followed the instructions according to http://foundation.zurb.com/sites/docs/v/5.5.3/css.html
Daniel Romero
@Ranacode
Jun 30 2017 17:20
i'm not using the 5 version
I'm using the 6
Either way - unless you upload to your github with the same directory structure you use locally, we can't really help too much :(
Daniel Romero
@Ranacode
Jun 30 2017 17:21
I'm using the same structure of the docs
I just put the files i download throught the download page
and put it in a folder
and drag the index.html into the browser
Gulsvi
@gulsvi
Jun 30 2017 17:23
That won't work... you need to run a local web server, or use it in a HTML previewer
Daniel Romero
@Ranacode
Jun 30 2017 17:23
i need a local server?
Gulsvi
@gulsvi
Jun 30 2017 17:23
Or, a HTML Previewer if your editor supports it (like Atom, Brackets, Sublime Text)
Daniel Romero
@Ranacode
Jun 30 2017 17:24
I have the files opened in atom
Gulsvi
@gulsvi
Jun 30 2017 17:24
You will need to install this package: https://atom.io/packages/atom-html-preview
Then press Ctrl+Shift+H to view your index.html in a special browser window that Atom provides
Jan Shah
@JanShah
Jun 30 2017 17:26
@SkyC0der,@Ranacode have you ever tried http-server npm package?
Daniel Romero
@Ranacode
Jun 30 2017 17:26
i tried atom live server
Gulsvi
@gulsvi
Jun 30 2017 17:27
@CentropyIT I just use IIS and Atom HTML Previewer
Jan Shah
@JanShah
Jun 30 2017 17:27
@SkyC0der I've been looking at IIS recently as thinking about asp.net
Mayank Gupta
@mayankgupta02
Jun 30 2017 17:28
Hey guys! I'm working on the random quote generator project, but I don't really know how to use jquery to get data from an api. Are there any resources that could help me?
Daniel Romero
@Ranacode
Jun 30 2017 17:29
The fucking foundation is not working
And i don't know why OMG
Gulsvi
@gulsvi
Jun 30 2017 17:31
joder...tranquilate, tio :)
It's hard setting up a local environment for the first time
Jan Shah
@JanShah
Jun 30 2017 17:31
@mayankgupta02 $.getJSON() or fetch()
Daniel Romero
@Ranacode
Jun 30 2017 17:32
The local environment is not the problem, i know work with it
Its just the css of foundation is not applying to my html file
I tried now with a cdn and nothing
Bootstrap works and the other css files too
Marcus Parsons
@marcusparsons
Jun 30 2017 17:34
@mayankgupta02 the way I learned how to get the data was to first do a call to the JSON directly from the address bar in my browser (with a pretty print JSON extension in Chrome so that it display nicely) and then think of your data part of function (data) in your json retrieval function as the root element of the JSON returned.
Daniel Romero
@Ranacode
Jun 30 2017 17:35
I already checked the console the sources tab, and foundation.css appeared here
Don't know why the styles is not applying to my file
Marcus Parsons
@marcusparsons
Jun 30 2017 17:38

So if your JSON is:

{
  "coord": {
    "lon": -84.56,
    "lat": 37.86
  },
  "weather": [
    {
      "id": 803,
      "main": "Clouds",
      "description": "broken clouds",
      "icon": "04d"
    }
  ],
  "base": "stations",
  "main": {
    "temp": 300.16,
    "pressure": 1016,
    "humidity": 65,
    "temp_min": 299.15,
    "temp_max": 301.15
  },
  "visibility": 16093,
  "wind": {
    "speed": 4.1,
    "deg": 190
  },
  "clouds": {
    "all": 75
  },
  "dt": 1498841700,
  "sys": {
    "type": 1,
    "id": 1138,
    "message": 0.0084,
    "country": "US",
    "sunrise": 1498817986,
    "sunset": 1498871060
  },
  "id": 4296292,
  "name": "Jessamine County",
  "cod": 200
}

Think of data from function(data) as your root. data.coord is the coord object in the JSON and data.coord.lon is the longitude of -84.56.

Eric Weiss
@eweiss17
Jun 30 2017 17:38
did u add the normalize.css?
never used foundation.css, but at the bottom they have an example mark up, why not just copy that directly and see if it works
Daniel Romero
@Ranacode
Jun 30 2017 17:39
I tried @eweiss17 and didn't work
maybe is my pc?
It seems weird that foundation.css not works on both, chrome and firefox
no console errors, the source tab is correctly
the structure of my folder is ok..
BrianWilliams28
@BrianWilliams28
Jun 30 2017 17:40
anyone else notice freecodecamp removed the help tabs from their challenges?
Marcus Parsons
@marcusparsons
Jun 30 2017 17:40
I noticed I couldn't get on the Gitter from the main page, as well. I haven't done any challenges in a while, though.
CamperBot
@camperbot
Jun 30 2017 17:41
:bulb: to format code use backticks! ``` more info
Eric Weiss
@eweiss17
Jun 30 2017 17:44
dumb question but you did download it right
BrianWilliams28
@BrianWilliams28
Jun 30 2017 17:44
Can someone who's used the Twitch API before show me how to include multiple channels in the call? I can get the data for 1 channel but when I try to add more it doesn't work. Below is what I have so far.
$.ajax({
  type: 'GET',
  url: 'https://api.twitch.tv/kraken/channels/noobs2ninjas',
  headers: {
    'Client-ID': 'XXXXXXXXXX'
  },
  success: function(data){
    console.log(data);
  }
Eric Weiss
@eweiss17
Jun 30 2017 17:44
@BrianWilliams28 use an array
Daniel Romero
@Ranacode
Jun 30 2017 17:44
@eweiss17 how can i know that?
BrianWilliams28
@BrianWilliams28
Jun 30 2017 17:44
@eweiss17 i did make an array variable, but when i inputed it into the url it didn't work either
Marcus Parsons
@marcusparsons
Jun 30 2017 17:44
@BrianWilliams28, You would want to dynamically change the name as you call the api. i.e.
var users = ["noobs2ninjas","terakilobyte","freecodecamp"];
for (let i = 0; i < users.length; i++) {
$.ajax({
  type: 'GET',
//change the ending username call to be the users in the list
  url: 'https://api.twitch.tv/kraken/channels/' + users[i],
  headers: {
    'Client-ID': 'XXXXXXXXXX'
  },
  success: function(data){
    console.log(data);
  }
});
}
BrianWilliams28
@BrianWilliams28
Jun 30 2017 17:45
@marcusparsons wouldnt that create 3 different calls though?
Marcus Parsons
@marcusparsons
Jun 30 2017 17:45
You will need 3 different calls to retrieve the data.
BrianWilliams28
@BrianWilliams28
Jun 30 2017 17:46
@marcusparsons i see. alright i was thinking there was a way to input them as parameters to avoid using multiple calls and it doing it in one shot. thanks!
CamperBot
@camperbot
Jun 30 2017 17:46
:cookie: 417 | @marcusparsons |http://www.freecodecamp.com/marcusparsons
brianwilliams28 sends brownie points to @marcusparsons :sparkles: :thumbsup: :sparkles:
Eric Weiss
@eweiss17
Jun 30 2017 17:47
foundation.PNG
@Ranacode read setting up , after downloading it says
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 17:47
question, when I open a webpage on my local machine, none of the external javescript works.
It this a permissions thing?
Eric Weiss
@eweiss17
Jun 30 2017 17:48
what type of js
Jan Shah
@JanShah
Jun 30 2017 17:48
@TheRealCasadaro are you using internet explorer?
Marcus Parsons
@marcusparsons
Jun 30 2017 17:49
@BrianWilliams28, you're welcome!
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 17:49
its just a script.js file that's stored in a js folder in the same directory as index.html. I'm using google chrome and MS Edge
Eric Weiss
@eweiss17
Jun 30 2017 17:50
you are calling it right
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 17:51
yea
Eric Weiss
@eweiss17
Jun 30 2017 17:51
how are you calling it
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 17:51
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Color Changer</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">

</head>
    <body>
        <h1> Color Changer</h1>
        <p>This is a button that does nothing but change the background</p>
        <button class=backgroundButton>Click Me!</button>

        <script src="/js/script.js" type="text/js"></script>

        <!--<script>
        var anchors = document.getElementsByClassName("backgroundButton")
        var body = document.body
        for (var i=0; i < anchors.length; i++) {
            anchors[i].onclick = function(){
             body.classList.toggle("backgroundColor")

            }
        }
        </script>-->

    </body>
</html>
Eric Weiss
@eweiss17
Jun 30 2017 17:53
it's in the same directory ?
src="script.js" maybe
it may be looking where you are for a file called /js/ and it doesn't find it
Daniel Romero
@Ranacode
Jun 30 2017 17:54
add a point before the first src backslash like this:
 <script src="./js/script.js" type="text/js"></script>
./ means the current directory
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 17:55
the js file is on a directory called js
that directory 1 level from index.html
Eric Weiss
@eweiss17
Jun 30 2017 17:56
could do the whole path
you can right click it and look under properties
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 17:56
lets give that a shot
Daniel Romero
@Ranacode
Jun 30 2017 17:57
foundation now works
I just downloaded it again choosing the float grid
instead of the flex grid
CallMeOrange
@EgnaroDev
Jun 30 2017 18:07
:wave:
Karthik Nallasivan
@furball514
Jun 30 2017 18:11
What is the best way to detect mobile or desktop and redirect them accordingly . But on a static site
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:11
it has to be something to do with the way the browsers handle local Js files I put everything on code pen and it all works just fine
Hopper Kremer
@hopperkremer
Jun 30 2017 18:12
@hopperkremer NVM
Pagnito
@Pagnito
Jun 30 2017 18:19
@hopperkremer figured it out?
Hopper Kremer
@hopperkremer
Jun 30 2017 18:19
@Pagnito Yep, thanks!
CamperBot
@camperbot
Jun 30 2017 18:19
hopperkremer sends brownie points to @pagnito :sparkles: :thumbsup: :sparkles:
:cookie: 258 | @pagnito |http://www.freecodecamp.com/pagnito
Pagnito
@Pagnito
Jun 30 2017 18:19
@hopperkremer sweet, np
Hopper Kremer
@hopperkremer
Jun 30 2017 18:19
@Pagnito "It's $("#seconds").val() not $("#seconds").value"
Pagnito
@Pagnito
Jun 30 2017 18:20
yup
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:27
this HTML
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Color Changer</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">

</head>
    <body>
        <h1> Color Changer</h1>
        <p>This is a button that does nothing but change the background</p>
        <button class=backgroundButton>Click Me!</button>

        <script src="script.js" type="text/js"></script>

        <!--<script>
        var anchors = document.getElementsByClassName("backgroundButton")
        var body = document.body
        for (var i=0; i < anchors.length; i++) {
            anchors[i].onclick = function(){
             body.classList.toggle("backgroundColor")

            }
        }
        </script>-->

    </body>
</html>
won't execute this javascript


var anchors = document.getElementsByClassName("backgroundButton")
var body = document.body
for (var i=0; i < anchors.length; i++) {
    anchors[i].onclick = function(){
        body.classList.toggle("backgroundColor")

    }
}
the name of the javascript file is script.js and its in the same directory as index.html, yet when I open index.html in the browser, the button doesn't work.
Eric Weiss
@eweiss17
Jun 30 2017 18:30
you don't have semi colons at the end or your js lines
Gulsvi
@gulsvi
Jun 30 2017 18:32
semi colons aren't needed in JS
CallMeOrange
@EgnaroDev
Jun 30 2017 18:33
really?
@SkyC0der Can I have sort method with compare function inside loop?
Marcus Parsons
@marcusparsons
Jun 30 2017 18:35
@MCTwoDigitZero, the browser sees carriage returns (as well as semicolons) as endings of statements so although ; aren't needed, you should use them because it will only hurt your code later on not having them, especially when minifying code and such.
CallMeOrange
@EgnaroDev
Jun 30 2017 18:35
Hm..
Gulsvi
@gulsvi
Jun 30 2017 18:36
Good discussion - sometimes needed, but most of the time not :) twbs/bootstrap#3057
99.999999% of the time not needed
Eric Weiss
@eweiss17
Jun 30 2017 18:36
idk man i'm still using them all the time
Gulsvi
@gulsvi
Jun 30 2017 18:37
It doesn't affect the code above at all
@TheRealCasadaro Your code works fine in this pen: https://codepen.io/skycoder/pen/GEQVoK
not sure what's up
CallMeOrange
@EgnaroDev
Jun 30 2017 18:37
@SkyC0der lol > 99.9999999999999999% of the time
Marcus Parsons
@marcusparsons
Jun 30 2017 18:37
@SkyC0der, that is bad programming habits. And since most other languages require semicolons, you're better off using them.
CallMeOrange
@EgnaroDev
Jun 30 2017 18:37
What happen to 0.000000000000000000001%?
Marcus Parsons
@marcusparsons
Jun 30 2017 18:37
I speak from experience as I'm currently a developer.
CallMeOrange
@EgnaroDev
Jun 30 2017 18:38
@SkyC0der
I am error...
about @MCTwoDigitZero
CamperBot
@camperbot
Jun 30 2017 18:38
:cookie: 404 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
Eric Weiss
@eweiss17
Jun 30 2017 18:38
i know but for the sake of the guys code earlier, no semis wasn't breaking his code
Gulsvi
@gulsvi
Jun 30 2017 18:38
There are many current developers who agree and disagree with you @marcusparsons, as I'm sure you're aware
My link above is an example of that
Marcus Parsons
@marcusparsons
Jun 30 2017 18:39
@SkyC0der, I don't know if you're trolling or what, but that's terrible advice to tell someone to not use semicolons in their code lol.
I can tell you that it will bite you in the rear end when you go to use other languages and you need to feed JavaScript to the page lol
Gulsvi
@gulsvi
Jun 30 2017 18:40
@marcusparsons I'm not prescribing anything...
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:41
only if the javaScript isn't parsed and or the next line in the code starts with a ( in which case you just start the line with ;()
devs at Spotify don't use ; either. not needed because at runtime the Js engine add semicolons
Gulsvi
@gulsvi
Jun 30 2017 18:42
Node.js workshops don't use semi-colons either
Google style guides require them
It's an endless debate, just know what you're doing :)
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:43
beyond that, I'm just trying to figure out whether or not browsers don't like local js files
Eric Weiss
@eweiss17
Jun 30 2017 18:44
you can use local js files on browsers....
Marcus Parsons
@marcusparsons
Jun 30 2017 18:44
This is hilarious to be honest.
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:45
well I mean do browsers not like local js files when they are called from HTML because for the life of me I can't figure out why this is not working
thay
@thaynacoelho
Jun 30 2017 18:46
@thaynacoelho
Hi, guys, how are you? I just finished the newest version of my website and I'd love to hear your opinion!
https://www.thaynacoelho.com
Eric Weiss
@eweiss17
Jun 30 2017 18:47
what ide are you using?
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:47
chrome edge and firefox
CallMeOrange
@EgnaroDev
Jun 30 2017 18:48
VSC, Brackets
Marcus Parsons
@marcusparsons
Jun 30 2017 18:48
Hi @thaynacoelho, I have to highly recommend making your own site mobile friendly before offering to make others' sites mobile friendly. If they go to your portfolio on a cell phone right now, it does not scale at all and is very hard to use. People will naturally assume that if you can't make your own site mobile friendly, you won't be able to do theirs correctly, even if you can.
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:48
I have usually done this stuff in either a mamp or lamp stack or through some sort of local http server like express.
Marcus Parsons
@marcusparsons
Jun 30 2017 18:48
Otherwise, it does look great!
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:49
vs code
Marcus Parsons
@marcusparsons
Jun 30 2017 18:50
@thaynacoelho, you can make your site mobile friendly in less than 60 minutes, though, by using Chrome's Dev Tools and some media queries.
thay
@thaynacoelho
Jun 30 2017 18:51
@marcusparsons besides the footer map, it does scale correctly on my phone
Marcus Parsons
@marcusparsons
Jun 30 2017 18:51
@thaynacoelho, sorry about that! I do see it, now. :) Great work, then, and my apologies!
@thaynacoelho, oh the Assistant Deck Seawoman portion goes to your Yoga page, as well.
Eric Weiss
@eweiss17
Jun 30 2017 18:54
@TheRealCasadaro Brackets, Atom, Sublime, notepad++?
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 18:54
Visual Studio Code
Eric Weiss
@eweiss17
Jun 30 2017 18:56
take a screenshot of your site and all your files, there could be an error somewhere
clearly there is, i am not familar with using visual studio for front end though
thay
@thaynacoelho
Jun 30 2017 18:56
@marcusparsons thanks for taking the time to take a look at my website! Gonna fix those things rn
CamperBot
@camperbot
Jun 30 2017 18:56
thaynacoelho sends brownie points to @marcusparsons :sparkles: :thumbsup: :sparkles:
:cookie: 418 | @marcusparsons |http://www.freecodecamp.com/marcusparsons
Marcus Parsons
@marcusparsons
Jun 30 2017 18:58
@thaynacoelho, you're very welcome, and best of luck to you!
CallMeOrange
@EgnaroDev
Jun 30 2017 19:02
@SkyC0der
Gulsvi
@gulsvi
Jun 30 2017 19:02
@MCTwoDigitZero ?
CallMeOrange
@EgnaroDev
Jun 30 2017 19:02
@SkyC0der Found another solution just with loop
function largestOfFour(arr) {

  for (var i = 0; i < arr.length; i++) {
    arr[i].sort(function(a,b) {
      return a - b;
    });
  }
  var popOne = [arr[0].pop()];
  var popTwo = [arr[1].pop()];
  var popThree = [arr[2].pop()];
  var popFour = [arr[3].pop()];
  return popOne.concat(popTwo, popThree, popFour);
}

largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
Im not done yet, Im working on it
to make it more simple (shorter)
Gulsvi
@gulsvi
Jun 30 2017 19:03
Much better :)
CallMeOrange
@EgnaroDev
Jun 30 2017 19:03
Yeah
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 19:03
Im not doing anything special. its just HTML CSS and Super basic JavaScript
Gulsvi
@gulsvi
Jun 30 2017 19:03
usually when you need to copy/paste a line and only change one character, there is always a better way :)
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 19:03
real Vanilla stuff
Marc
@MWBauer
Jun 30 2017 19:03
Hey folks
Khoa Le
@khoamle
Jun 30 2017 19:04
I'm having issue with getting the quote jQuery function to work in gitHub pages. It works fine in codepen
Gulsvi
@gulsvi
Jun 30 2017 19:04
@TheRealCasadaro You should be using a local web server or a HTML previewer in your IDE. I'm not 100% certain, but I wouldn't be surprised if security policies prevent you from running local .js files if you're just opening a .html file via file:///
Marc
@MWBauer
Jun 30 2017 19:04
I'm getting a TypeError: Function Expected. But it doesn't show me where the concern is
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 19:05
yea thats what im thinking also
Eric Weiss
@eweiss17
Jun 30 2017 19:05
little late, but did you google your problem
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 19:05
@SkyC0der I came here because I couldnt get a clear anser from google
Eric Weiss
@eweiss17
Jun 30 2017 19:05
maybe someone has had same problem
nvm
Khoa Le
@khoamle
Jun 30 2017 19:05
nvm, looks like there is a delay lag from typing git push origin gh-pages and viewing it on the gh-pages.
Gulsvi
@gulsvi
Jun 30 2017 19:05
@khoamle It seems to work fine for me https://khoamle.github.io/rand_quote_gen/
nvm from me too lol
The Real Casadaro
@TheRealCasadaro
Jun 30 2017 19:06
for me its no big deal, but for an absolute beginner they will pull all of their hair out LOL
Khoa Le
@khoamle
Jun 30 2017 19:06
@SkyC0der Thanks. I got too impatient.
CamperBot
@camperbot
Jun 30 2017 19:06
khoamle sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1885 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 30 2017 19:06
Nice work on the quote machine :)
Matthew Pavouris
@mattpavo
Jun 30 2017 19:06

Hey guys. I'm working on the Twitch project, and I want to add color coded elements to the channel logos depending on their status (online = green, offline = red). In my code, I've added a color coded border around the logo, and a div with a color coded background-color that shows through by lowering the opacity of the logo. But, these elements are not added correctly or consistently like the rest of my code (streaming status, stream name, etc.). Here's the code I'm using:

        // Streams
        var streamStatus;
        if (stream.stream === null) {
          console.log(stream);
          streamStatus = "Offline";
          if ($(".channellogo").hasClass("statuson") && $("div").hasClass("img-container-green")) {
            $(".channellogo").removeClass("statuson").addClass("statusoff");
            $(".div").removeClass("img-container-green").addClass("img-container-red");
          }
          else {
            $(".channellogo").addClass("statusoff");
            $("div").addClass("img-container-red");
          }
        }
        else {
          console.log(stream);
          streamStatus = stream.stream.game + ": " + stream.stream.channel.status;
          if ($(".channellogo").hasClass("statusoff") && $("div").hasClass("img-container-red")) {
            $(".channellogo").removeClass("statusoff").addClass("statuson");
            $(".div").removeClass("img-container-red").addClass("img-container-green");
          }
          else {
            $(".channellogo").addClass("statuson");
            $("div").addClass("img-container-green");
          }
        } // End Streams

And here's my codepen:
https://codepen.io/mattpavo/pen/rwJmoO/?editors=0010
As you can see it's all screwy, and I can't figure out why. Any hints/tips would be appreciated.

Marcus Parsons
@marcusparsons
Jun 30 2017 19:09
edited
largest([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1], [0,5000,1,9]]);
Marc
@MWBauer
Jun 30 2017 19:10
phoneticLookup("") should equal undefined
how do I get this to happen?
Eric Weiss
@eweiss17
Jun 30 2017 19:11
you need to post the context of your code @MWBauer
CallMeOrange
@EgnaroDev
Jun 30 2017 19:13
Finally figured it out
@SkyC0der
function largestOfFour(arr) {

  for (var i = 0; i < arr.length; i++) {
    arr[i].sort(function(a,b) {
      return a - b;
    });
  }
  var array = [];
  for (var j = 0; j < arr.length; j++) {
    var pop = arr[j].pop();
    array.push(pop);
  }
  return array;
}

largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
Gulsvi
@gulsvi
Jun 30 2017 19:14
@MCTwoDigitZero Another good step ahead! Now try to combine those two loops ;)
CallMeOrange
@EgnaroDev
Jun 30 2017 19:15
..
Gulsvi
@gulsvi
Jun 30 2017 19:15
And don't scroll up - spoiler above
CallMeOrange
@EgnaroDev
Jun 30 2017 19:15
I saw :/
Marcus Parsons
@marcusparsons
Jun 30 2017 19:15
Is this a challenge?
CallMeOrange
@EgnaroDev
Jun 30 2017 19:15
Yeah
Marcus Parsons
@marcusparsons
Jun 30 2017 19:15
Oops
CallMeOrange
@EgnaroDev
Jun 30 2017 19:15
@marcusparsons Its fine, I solved it already but just looking to solve with different solution
Marcus Parsons
@marcusparsons
Jun 30 2017 19:15
Edited it out. Sorry buddy
CallMeOrange
@EgnaroDev
Jun 30 2017 19:16
@SkyC0der nested loop?
Gulsvi
@gulsvi
Jun 30 2017 19:17
@mattpavo You are using $('div') and $('.div') I noticed. One will select all divs and the other selects all elements with the "div" class. That seems to be a potential issue
@MCTwoDigitZero No, just one loop
you can do more than one thing inside every iteration of the loop (hint)
Marcus Parsons
@marcusparsons
Jun 30 2017 19:18
@MCTwoDigitZero, instead using a second loop, why not try using the array's length to add in the last element which will be the largest?
CallMeOrange
@EgnaroDev
Jun 30 2017 19:18
function largestOfFour(arr) {
var array = [];
  for (var i = 0; i < arr.length; i++) {
    arr[i].sort(function(a,b) {
      return a - b;
    });
  var pop = arr[i].pop();
    array.push(pop);
  }
  return array;
}

largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
@SkyC0der well this was easier than I thought
both loop are pretty much the same so removed second one
Gulsvi
@gulsvi
Jun 30 2017 19:19
Good job
You could also sort by descending order (b-a) and just get arr[0] instead of doing the pop()
CallMeOrange
@EgnaroDev
Jun 30 2017 19:20
Yeah I thought same thing
Gulsvi
@gulsvi
Jun 30 2017 19:20
errrr arr[i][0] I mean
CallMeOrange
@EgnaroDev
Jun 30 2017 19:20
I could just do either
Nah I wrote it, dont wanna change it
:D
Gulsvi
@gulsvi
Jun 30 2017 19:20
better performance compared to using .pop() :)
CallMeOrange
@EgnaroDev
Jun 30 2017 19:22
Practice and looking for more solution is actually fun
Gulsvi
@gulsvi
Jun 30 2017 19:23
Good way to learn too
Now try to do it with .map()!
Or just move on to the next challenge already lol
Marcus Parsons
@marcusparsons
Jun 30 2017 19:24
@SkyC0der, haha I agree! XD
CallMeOrange
@EgnaroDev
Jun 30 2017 19:25
@SkyC0der lol
Im working on Check for Palindromes
Its uglier so fixing it
Look at this replace method.. str.replace(/[\]\[\(\)\/;:'"!?*,._-\s]/g, '')
Gulsvi
@gulsvi
Jun 30 2017 19:26
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!
Marc
@MWBauer
Jun 30 2017 19:26
eh
Gulsvi
@gulsvi
Jun 30 2017 19:26
Yeah, your regex is a little bit complicated
Marc
@MWBauer
Jun 30 2017 19:26
?
Gulsvi
@gulsvi
Jun 30 2017 19:26
Another canadian?
Marc
@MWBauer
Jun 30 2017 19:27
nein
CallMeOrange
@EgnaroDev
Jun 30 2017 19:27
@SkyC0der lol Im going to add that after fixing that regex
CallMeOrange
@EgnaroDev
Jun 30 2017 19:27
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!
Matthew Pavouris
@mattpavo
Jun 30 2017 19:28
@SkyC0der Doh. I corrected that, but it didn't rectify the issue.
CallMeOrange
@EgnaroDev
Jun 30 2017 19:28
I think I messed up my regex..
str.replace(/^[a-z][0-9]/g, '')
Gulsvi
@gulsvi
Jun 30 2017 19:29
@mattpavo Can you save your pen? I still see it after a refresh. I can take a closer look
Didn't look very closely the first time, but that issue jumped out as a possible fix needed
Miljan Grcic
@Nightimer
Jun 30 2017 19:29
Why is the second elements height different than others
I will provide css and html in sec
Marcus Parsons
@marcusparsons
Jun 30 2017 19:30
@MCTwoDigitZero, if you think of a string as its own array with 0 being the first character, 1 being second, etc. you can use that methodology with array methods to reverse the string
Miljan Grcic
@Nightimer
Jun 30 2017 19:31
<div class="forecast">
    <div id="day1" class="forecast-box">
      <i class="maxTemp"></i>
      <i class="minTemp"></i>
    </div>
    <div id="day2" class="forecast-box">
      <i class="maxTemp"></i>
      <i class="minTemp"></i>
    </div>
    <div id="day3" class="forecast-box">
      <i class="maxTemp"></i>
      <i class="minTemp"></i>
    </div>
    <div id="day4" class="forecast-box">
      <i class="maxTemp"></i>
      <i class="minTemp"></i>
    </div>
    <div id="day5" class="forecast-box">
      <i class="maxTemp"></i>
      <i class="minTemp"></i>
    </div>
    <div id="day6" class="forecast-box">
      <i class="maxTemp"></i>
      <i class="minTemp"></i>
    </div>
  </div>
This is HTML
  .forecast {
    display: block;
    border: 1px solid red;
  }
  .forecast-box {
    display: inline-block;
    padding: 0px;
    font-size: 1.2em;
    border: 1px solid blue;
  }

  .forecast-box i {
    display: block;
    text-align: center;
  }
This is css
Eric Weiss
@eweiss17
Jun 30 2017 19:36
@Nightimer if you have a pen just post it, easier
Matthew Pavouris
@mattpavo
Jun 30 2017 19:38
@SkyC0der I saved it. Thanks for offering your help Sky
CamperBot
@camperbot
Jun 30 2017 19:38
mattpavo sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1886 | @skyc0der |http://www.freecodecamp.com/skyc0der
@eweiss17 True that :)
Just make sure to resise window to mobile screen size
CallMeOrange
@EgnaroDev
Jun 30 2017 19:40
@SkyC0der
function palindrome(str) {

  str = str.replace(/[^a-z0-9]/gi, '').toLowerCase();

   if (str === str.split("").reverse().join("")) {
 return true;
 } else {
    return false;
  }

}



palindrome("A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!");
Gulsvi
@gulsvi
Jun 30 2017 19:40

@Nightimer You have some extra spacing in your second <div>, make sure there are no extra spaces after the closing </i> tags:

  <div id="day2" class="forecast-box">
    <i class="maxTemp"></i>
    <i class="minTemp"></i>
  </div>

Or, just copy/paste that over your current HTML ^^

@MCTwoDigitZero The regex needs some work still :)
also remember the anti-pattern. No need to return true/false
CallMeOrange
@EgnaroDev
Jun 30 2017 19:42
anti-pattern?
function palindrome(str) {

  str = str.replace(/[^a-z0-9]/gi, '').toLowerCase();

   if (str === str.split("").reverse().join("")) {
 return true;
 } 
  return false;
}



palindrome("A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!");
// http://www.fun-with-words.com/palin_panama.html
Better?
Gulsvi
@gulsvi
Jun 30 2017 19:43

This:

if (str === str.split("").reverse().join("")) {
  return true;
} else {
  return false;
}

Is the same as:

return str === str.split("").reverse().join("")
Miljan Grcic
@Nightimer
Jun 30 2017 19:43
@SkyC0der Ahahahahahaha, thanks, i was trying like 2 hours clearing floats and changing display values haha
CamperBot
@camperbot
Jun 30 2017 19:43
nightimer sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1887 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 30 2017 19:43
@Nightimer Easy fixes are always nice! :)
CallMeOrange
@EgnaroDev
Jun 30 2017 19:44
oh
Nah I wanna keep my code
:d
Gulsvi
@gulsvi
Jun 30 2017 19:44
It's your code :)
Embrace it :3
Marc
@MWBauer
Jun 30 2017 19:45
Ok ya'll. this app may disappear forever.
CallMeOrange
@EgnaroDev
Jun 30 2017 19:45
@SkyC0der lol thanks
CamperBot
@camperbot
Jun 30 2017 19:45
mctwodigitzero sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1888 | @skyc0der |http://www.freecodecamp.com/skyc0der
CallMeOrange
@EgnaroDev
Jun 30 2017 19:45
@MWBauer which app?
Marc
@MWBauer
Jun 30 2017 19:45
I'm signed in to 2 computers at home. Everytime ya'll make a comment it blows up like 3 times on both computers.
I have signed out.
I have turned off notification sounds.
I have done all I know short of deleting this accursed thing.
Gulsvi
@gulsvi
Jun 30 2017 19:45
Enter this command: /notify-mute
CallMeOrange
@EgnaroDev
Jun 30 2017 19:45
Did it really blow up?
Hello911
@Hello911
Jun 30 2017 19:46
How can I replace text with @media in CSS? I use display:none and content: "". But it does not work. https://codepen.io/Hello911/pen/gReYMR
CallMeOrange
@EgnaroDev
Jun 30 2017 19:46
@anthonygallina1 :wave:
Marc
@MWBauer
Jun 30 2017 19:46
Let's go with yes for now.
CallMeOrange
@EgnaroDev
Jun 30 2017 19:46
alright
lol good, thought Roman Numerals was in Basic Algorithms
Definitely not ready for it if that was on Basic Algorithms
Confirm the Ending will be fun...
Need a break now :/
:v:
ALeoCorazon
@ALeoCorazon
Jun 30 2017 19:52
MC don't take too long of a break
Marcus Parsons
@marcusparsons
Jun 30 2017 19:56
@Hello911, check out this version of your codepen: https://codepen.io/marcusparsons/pen/JJLPWd
@Hello911, also notice how I just set the font-size to 0 which removes the main text from the display, and then use the ::before pseudo element to add the words to the div with the original font size. You need to use a unit on the ::before element that isn't reliant on the font size of the parent like px here. em won't work in the pseudo element.
CallMeOrange
@EgnaroDev
Jun 30 2017 20:01
@ALeoCorazon why?
Greta Piliponytė
@gpiliponyte
Jun 30 2017 20:16
hey guys, any idea why this twitch tv example link is not working? https://api.twitch.tv/kraken/streams/freecodecamp?callback=?
Ivan Ngundela
@ingundela
Jun 30 2017 20:20
hello everyone.. need some help with my project.. I'm building a website and need it to be in 2 languages, What's the best way to have it done?
MadsSN
@MadsSN
Jun 30 2017 20:43
@ingundela I guess you could just make a button to switch between the languages given that the content is similar? And the way you could do the switch is that you would just have a duplicate html file part, and switch between which is shown. Maybe with display none?
Pagnito
@Pagnito
Jun 30 2017 20:44
can someone possibly give me a simple explanation what buffer object is
MadsSN
@MadsSN
Jun 30 2017 20:45
@Pagnito in what sort of context?
Pagnito
@Pagnito
Jun 30 2017 20:45
node js
Gulsvi
@gulsvi
Jun 30 2017 20:45
@mattpavo sorry, had to step away - I just reloaded your pen and you're still applying the class to every div on the page $("div"). You'll need to choose the specific div you want to have the green/red/gray border.
@Pagnito My understanding of a buffer in node is like a compressed data stream.
Pagnito
@Pagnito
Jun 30 2017 20:47
@SkyC0der sweet thanks
CamperBot
@camperbot
Jun 30 2017 20:47
pagnito sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1889 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 30 2017 20:47
It's a way to marshall data back and forth - but you have to "decompress" it to view it
reading one byte at a time is slow, reading thousands of bytes at a time in a buffer is faster
Pagnito
@Pagnito
Jun 30 2017 20:49
sweet
Ivan Ngundela
@ingundela
Jun 30 2017 20:49
@MadsSN I'm thinking that to... but I'm will have 2 index.html , how will I link one to another and also make sure that the css is the same
Gulsvi
@gulsvi
Jun 30 2017 20:49
@gpiliponyte The api.twitch.tv endpoint requires a client ID / an api key. You can get the data from here instead: https://wind-bow.glitch.me/twitch-api/streams/freecodecamp
MadsSN
@MadsSN
Jun 30 2017 20:51
@ingundela You could just make it in the same index or something similar to this
<div>Language 1 and all the context stuff</div>
<div style="display:none">Language 2 and all the context stuff </div>
Gulsvi
@gulsvi
Jun 30 2017 20:53
@ingundela I'd recommend storing all of your text strings in a separate file - a JSON file, or simply an array in your javascript. You can then populate your elements with the language selected and keep all of your HTML/CSS the same. Otherwise, every time you make a change to your HTML or CSS, you'll have to change it in 2+ places.
Ivan Ngundela
@ingundela
Jun 30 2017 20:53
@MadsSN I managed to link the home page to the desired language page by putting the new index.html in a folder but the css style in not being applied to this new index.html...is it because it is in a folder?
MadsSN
@MadsSN
Jun 30 2017 20:53
@ingundela How do you apply your css style?
@ingundela Use something like this <link href="/public/css/main.css" rel="stylesheet" type="text/css">?
Ivan Ngundela
@ingundela
Jun 30 2017 20:55
@MadsSN I'm just leaving the same link linke css/style.css from the home page on this new one..
@MadsSN yes, it is similar <link rel="stylesheet" type="text/css" href="css/style.css" />
Pagnito
@Pagnito
Jun 30 2017 20:58
@SkyC0der wow, node seems like alot to learn, for a long time i couldnt find a way inside the understanding circle, and now that i did, and im looking at the docs, im a bit taken back lol
MadsSN
@MadsSN
Jun 30 2017 21:00
@ingundela Not entirely sure what is wrong - I guess there is no error messages? Try create a style element in the same folder to test if Its simply because it cant find the css file. That is what I would expect is why it is not applying.
Ivan Ngundela
@ingundela
Jun 30 2017 21:00
@SkyC0der I'm getting more confused now.... I'm still a beginner..... for now I don't mind having to change the code in both html pages.. and was thinking that I could just link the pages like i'm doing when linking other html files of the same website
Gulsvi
@gulsvi
Jun 30 2017 21:01
@Pagnito On top of all that, there are two versions - a LTS release which is version 6 now. The most stable one...and I think it's supported for a few years. The latest release is version 8... and there's a lot of differences between the two versions.
Pagnito
@Pagnito
Jun 30 2017 21:01
T.
T.T
Gulsvi
@gulsvi
Jun 30 2017 21:02
@ingundela If you don't mind duplicating your efforts, just make two websites :)
That should help simplify it - you can then combine the two as you get more advanced
Pagnito
@Pagnito
Jun 30 2017 21:02
I hope node never becomes obselete cuz of somethin new anytime soon or react etc
Gulsvi
@gulsvi
Jun 30 2017 21:02
Everything becomes obsolete eventually :)
Ivan Ngundela
@ingundela
Jun 30 2017 21:03
@MadsSN ok.. will try that.Thanks.. I wanted to avoid having lots of files as the css is going to be exatly
CamperBot
@camperbot
Jun 30 2017 21:03
ingundela sends brownie points to @madssn :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @madssn |http://www.freecodecamp.com/madssn
Gulsvi
@gulsvi
Jun 30 2017 21:03
My Dads CD collection is worthless lol
Ivan Ngundela
@ingundela
Jun 30 2017 21:03
the same
Pagnito
@Pagnito
Jun 30 2017 21:03
@SkyC0der yea def, thats why im sayin anytime soon
@Pagnito trying milk this cow while im alive
@Pagnito tho part of me wants to jump on the vr train at some point, but i dunno, maybe im just a kid at the candy store right now, and my eyes are on crack
Gulsvi
@gulsvi
Jun 30 2017 21:04
There is way too much to get excited about out there :)
MadsSN
@MadsSN
Jun 30 2017 21:04
Think about how Vinyl is slightly cool again, you never know whats going to happen :)
Pagnito
@Pagnito
Jun 30 2017 21:04
@SkyC0der yea hehe
Gulsvi
@gulsvi
Jun 30 2017 21:04
node.js helps you get exposed to a lot of it though
Pagnito
@Pagnito
Jun 30 2017 21:05
@SkyC0der nice!
MadsSN
@MadsSN
Jun 30 2017 21:07
@Pagnito I felt that it was so nice to work with when I got a good feeling for applying web-sockets and DB with it :)
Pagnito
@Pagnito
Jun 30 2017 21:07
@MadsSN what does web sockets mean? i havent got that far yet
Gulsvi
@gulsvi
Jun 30 2017 21:08
True about Vinyl :) I'm sure a car from 1990 with a CRT in it would be pretty cool too :p
VHS tape player
Pagnito
@Pagnito
Jun 30 2017 21:09
shit, gotta go be back in a bit @MadsSN
MadsSN
@MadsSN
Jun 30 2017 21:10
@Pagnito Its for communicating between different users of a website. Lets say I wanted a chat site, then whenever I send a message I would want it to pop up on the other users screen. So I would emit(send) a message from the user that send the message to the server, which would emit a message to all users and apply the new message to the screen, in somewhat or simulated real time.
Im pretty confident that there is a lot of cool old cars! :o
Pagnito
@Pagnito
Jun 30 2017 21:11
thanks @MadsSN
CamperBot
@camperbot
Jun 30 2017 21:11
pagnito sends brownie points to @madssn :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @madssn |http://www.freecodecamp.com/madssn
MadsSN
@MadsSN
Jun 30 2017 21:13
But I feel like when you got those two things down, maybe also with some sort of authentication(which I still suck at), then you got a nice basis for like doing(almost) anything :)
@SkyC0der Sky are you comfortable with the authentication in node?
Gulsvi
@gulsvi
Jun 30 2017 21:14
@MadsSN No, haven't done anything with that yet
Just finished a lot of the basic workshops recently, so know enough to write really bad code now
Jan Shah
@JanShah
Jun 30 2017 21:18
@SkyC0der you're selling yourself very short there, I think you're really really good at coding
MadsSN
@MadsSN
Jun 30 2017 21:18
@SkyC0der I know that feeling. Been going through alot of the backend-challenges lately, and if you start without a solid plan, all the code is going to be a mess..
At some point I got to backtrack and go through my old code again and see if I can figure out better solutions. And maybe make some prettier front-end(Maybe...)
Ivan Ngundela
@ingundela
Jun 30 2017 21:19
@MadsSN lots fo confusin now.. not working I need to find a better soluting for this
@MadsSN put all contant if 2 different folder and linked one to another...
Gulsvi
@gulsvi
Jun 30 2017 21:19
@CentropyIT Node.js is a different beast :p (but thank you!) :)
CamperBot
@camperbot
Jun 30 2017 21:19
skyc0der sends brownie points to @centropyit :sparkles: :thumbsup: :sparkles:
:cookie: 440 | @centropyit |http://www.freecodecamp.com/centropyit
Ivan Ngundela
@ingundela
Jun 30 2017 21:20
I just get to mixed up for me..
MadsSN
@MadsSN
Jun 30 2017 21:20
@ingundela How is your folder structure?
Ivan Ngundela
@ingundela
Jun 30 2017 21:22
@MadsSN in the main folder I have index.html (not in a folder) and then css folder, js folder and fonts folder
CallMeOrange
@EgnaroDev
Jun 30 2017 21:23
Hm... I should create file structures for algorithms
and other languages such as .html, .js and .css
Ivan Ngundela
@ingundela
Jun 30 2017 21:24
there needs to have a better way of doing this php or maibe advanced javascript to have a website with 2 languages?
MadsSN
@MadsSN
Jun 30 2017 21:26
@ingundela the file that does not have the css applied does it turnout any sort of error?
jowright
@jowright
Jun 30 2017 21:28
I am working on the Roman numeral coverter and have solved it with a for loop and while loop but I would like to understand how the problem can be solve with splice and indexOf. These are the recommended useful links but I can find not example of how these can be used. I want to better understand before I move on. Thanks for any suggestions. Usually there are example code but no one have tackled the problem with these.
Ivan Ngundela
@ingundela
Jun 30 2017 21:29
@MadsSN no... its just show the html contant with no style when I click on it from the home page
MadsSN
@MadsSN
Jun 30 2017 21:32
@ingundela Sounds odd. Not entirely sure whats wrong. Its the worst when errorsmessages dont turn up :O In my case I just have a global css folder that all my files refer to and use.
Ivan Ngundela
@ingundela
Jun 30 2017 21:37
@MadsSN that what I'm also trying to have... all I need is to have a new index.html and about.html (in the onther language) all linke to the existing css styles files from the home page..
let me google some more to see if I can get some solution for what I'm trying to anchive
I was really thinking that I could easelly link the files from one language to another
alpox
@alpox
Jun 30 2017 22:04
@ingundela the common way to use multiple languagey with javascript is to use i18next. You can google that :)
But it might be a lot of overkill and too much setup for some easy pages
John
@AnonymousLords
Jun 30 2017 22:07
Guys
why isnt this working
Ivan Ngundela
@ingundela
Jun 30 2017 22:07
@alpox thanks, I'll have a look at it
CamperBot
@camperbot
Jun 30 2017 22:07
ingundela sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1186 | @alpox |http://www.freecodecamp.com/alpox
Jan Shah
@JanShah
Jun 30 2017 22:08
@John-freeCodeCamp what's not working?
Jan Shah
@JanShah
Jun 30 2017 22:09
; is a new line in javascript
alpox
@alpox
Jun 30 2017 22:09
@ingundela if you want to go with two seperate html files you can do that but they cannot have the same name. You would just redirect the user to the other html. Both of them can link to the same other files like css, javascript etc
John
@AnonymousLords
Jun 30 2017 22:09
oh so no ;
Jan Shah
@JanShah
Jun 30 2017 22:09
not there
you need = there
John
@AnonymousLords
Jun 30 2017 22:10
ill try

// Example
var ourName; "myName"

// Define myName below this line

var myName = "John";
Ivan Ngundela
@ingundela
Jun 30 2017 22:11
@alpox that's what I've been trying to do... but the linking it's not working..
John
@AnonymousLords
Jun 30 2017 22:11
@CentropyIT "Missing semi-Colin"
colon
Jan Shah
@JanShah
Jun 30 2017 22:12
you declare var, then the var name and optionally, values. You can write
var ourName; //will have the value undefined
ourName = 'something'; //will change the value of ourName to 'something'
var newName = 'another value';//all three bits together, var,its name, it's value
Ivan Ngundela
@ingundela
Jun 30 2017 22:12
just created let say the home page as index.html and the other is pt.html both files are not in a individual folder all the rest of the file are in folder
Jan Shah
@JanShah
Jun 30 2017 22:12
@John-freeCodeCamp has that example been altered, it's not right
// Example
var ourName; "myName"  //is not correct
John
@AnonymousLords
Jun 30 2017 22:13
yep
Jan Shah
@JanShah
Jun 30 2017 22:14
@John-freeCodeCamp if there is invalid code, it won't run
John
@AnonymousLords
Jun 30 2017 22:14
i tried thius

// Example
var ourName; 

// Define myName below this line

var ourName = 'something';
Jan Shah
@JanShah
Jun 30 2017 22:14
@John-freeCodeCamp what is the challenge called?
Jan Shah
@JanShah
Jun 30 2017 22:15
@John-freeCodeCamp you're supposed to define myName, not ourName
Define myName below this line
John
@AnonymousLords
Jun 30 2017 22:15
I got it
thx @CentropyIT
CamperBot
@camperbot
Jun 30 2017 22:15
john-freecodecamp sends brownie points to @centropyit :sparkles: :thumbsup: :sparkles:
:cookie: 442 | @centropyit |http://www.freecodecamp.com/centropyit
John
@AnonymousLords
Jun 30 2017 22:16

// Example
var ourName;

// Define myName below this line

var myName;

var myName = "john";


// Example
var ourName; 

// Define myName below this line

var myName;

var myName = "john";
Jan Shah
@JanShah
Jun 30 2017 22:16
@John-freeCodeCamp exactly right, second line is not needed in this exercise and you don't redeclare a variable

// Example
var ourName; 

// Define myName below this line

var myName;
console.log(myName)
myName = "john"; //myName is already a variable
console.log(myName)
John
@AnonymousLords
Jun 30 2017 22:17
Oh okay
That prints it right>
console.log
Like puts it on teh screen
anything in that
Jan Shah
@JanShah
Jun 30 2017 22:18
if you have chrome browser, open developer tools and then you can see the output, i.e. what a variable is
John
@AnonymousLords
Jun 30 2017 22:18
like a string
Jan Shah
@JanShah
Jun 30 2017 22:19
yes, there's not much you can't put into console.log and see the output of
John
@AnonymousLords
Jun 30 2017 22:19
So the outout is like a lg
string*
console.log(myName + myName)
OHHH
I GET IT @CentropyIT
Jan Shah
@JanShah
Jun 30 2017 22:22
great! :)
I think everyone should use console.log :)
DarrylJLTolentino
@DarrylJLTolentino
Jun 30 2017 22:23
hey all got a question. I found a pen from someone who made animated weather icons. If possible, is there any way for me to use those icons within my own pen? I would cite and give recognition to who made it in my pen, of course.
John
@AnonymousLords
Jun 30 2017 22:23
Cab i put myName = "john"; before console
@CentropyIT can i? :D
CallMeOrange
@EgnaroDev
Jun 30 2017 22:24
You can..
John
@AnonymousLords
Jun 30 2017 22:24
okay
CallMeOrange
@EgnaroDev
Jun 30 2017 22:24
Your code
John
@AnonymousLords
Jun 30 2017 22:24
thx @MCTwoDigitZero
CamperBot
@camperbot
Jun 30 2017 22:24
john-freecodecamp sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 407 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
CallMeOrange
@EgnaroDev
Jun 30 2017 22:24
:+1:
John
@AnonymousLords
Jun 30 2017 22:24
we were just talking about :point_up: June 30, 2017 6:16 PM
anywasy i gtg
started java today, simple so far
CallMeOrange
@EgnaroDev
Jun 30 2017 22:26
@John-freeCodeCamp java is not the same as JavaScript
JavaScript is used for server-side with HTML/CSS I think and Java is used to build android apps and stuff
Drawgo
@Drawgo
Jun 30 2017 22:27
Hello. I'm finishing up the tribute page project and trying to add a few media queries to make my header and the paragraph after it smaller, it doesn't seem to work though. Any ideas? https://codepen.io/Drawgo/pen/gRvWGv/?editors=1100
Solved it. Forgot to add "." in front of the display-1 and lead selectors...
Jan Shah
@JanShah
Jun 30 2017 22:28
@Drawgo have you tried media queries? I can't see any
Drawgo
@Drawgo
Jun 30 2017 22:28
@CentropyIT Yes, at the very bottom of the css
Jan Shah
@JanShah
Jun 30 2017 22:29
.wrapper {
  padding: 3% 10%;
  background-color: #fff;
}

you mean that?

have you saved your edits?

Drawgo
@Drawgo
Jun 30 2017 22:31
@CentropyIT Ah, I am very sorry. Just saved it.
Jan Shah
@JanShah
Jun 30 2017 22:32
@Drawgo ok, .display-1 already has a font-size of 6em
you can override it with !important but that's bad practice, better to use a new class
CallMeOrange
@EgnaroDev
Jun 30 2017 22:33
@CentropyIT Have you tried beta fCC?
Drawgo
@Drawgo
Jun 30 2017 22:34
@CentropyIT Can I change the class with a media query? For example, from .display-1 to display-2?
Jan Shah
@JanShah
Jun 30 2017 22:34
@Drawgo or try changing h1 to a div
@MCTwoDigitZero I've done some of it, it's very interesting but I don't want to do it all on there and lose it potentially
I am waiting for it to be released here and I will definitely jump on it
CallMeOrange
@EgnaroDev
Jun 30 2017 22:35
Yeah
Will be merged with fCC soon
Beta fCC need more work..
Jan Shah
@JanShah
Jun 30 2017 22:35
@Drawgo you can't change the class, but you can change what the class contains
@MCTwoDigitZero I did some of the react challenges and they were really good
CallMeOrange
@EgnaroDev
Jun 30 2017 22:36
oh
Most instructions are pretty long
Jan Shah
@JanShah
Jun 30 2017 22:36
also, the javascript exercises are much more tightly focused, less easy to shortcut your way to an answer
Drawgo
@Drawgo
Jun 30 2017 22:36
@CentropyIT Thanks for helping me out.
CamperBot
@camperbot
Jun 30 2017 22:36
drawgo sends brownie points to @centropyit :sparkles: :thumbsup: :sparkles:
:cookie: 443 | @centropyit |http://www.freecodecamp.com/centropyit
CallMeOrange
@EgnaroDev
Jun 30 2017 22:36
Yeah
Jan Shah
@JanShah
Jun 30 2017 22:37
@Drawgo no worries, very interesting character, it was nice to read about him :)
Drawgo
@Drawgo
Jun 30 2017 22:37
@CentropyIT I'm very glad!
CallMeOrange
@EgnaroDev
Jun 30 2017 22:38
Jeez I cant even pass a single challenge of ES6 part
Jan Shah
@JanShah
Jun 30 2017 22:39
es6 huh?
CallMeOrange
@EgnaroDev
Jun 30 2017 22:40
image.png
I dont like beta fCC..., will wait till they are merged
I dont want to sign up since it will mess up my progress of original fCC
Jan Shah
@JanShah
Jun 30 2017 22:44
@MCTwoDigitZero there are some errors in the instructions on es6
CallMeOrange
@EgnaroDev
Jun 30 2017 22:44
yeah there is
but someone said there is only errors in last 5-6 of ES6 part
So strange..
I gtg
Gulsvi
@gulsvi
Jun 30 2017 22:45
noob question...how can I make an animated gif of an animation on my web page? Do I have to record my screen and then convert the mp4?
I was thinking some of my portfolio images could be animated...to show the websites in action on hover
Jan Shah
@JanShah
Jun 30 2017 22:49
@SkyC0der there is a way of loading the video into canvas and exporting images as a sequence
complicated stuff, I only saw a few videos from the coding train on youtube about it using p5.js or java with Processing
CallMeOrange
@EgnaroDev
Jun 30 2017 23:08
@SkyC0der You can also upload GIF as an image or background
Gulsvi
@gulsvi
Jun 30 2017 23:09
Screencastify, a plugin for chrome does what I want, but they want $24 to crop, edit, and remove watermarks
5millerk
@5millerk
Jun 30 2017 23:10

@5millerk
hmm i can't figure out what i'm doing wrong on this. Trying to find the Palidromes, I know I'm removing all the symbols correctly (tested that) and making it all lower case (tested that). There is something wrong in my loop because it kicks back false everytime (even if i set isPal = true when i declare it)

function palindrome(str) {
// Good luck!
var isPal = false;
var newStr = "";
newStr = str.replace(/[^A-Z0-9a-z]/g, newStr).toLowerCase();
var palArray = newStr.split("");
var end = palArray.length;

for (i = 0; i <= end; i++){
if (palArray[i] == palArray[end]){
isPal = true;
end--;
} else {
isPal = false;
return isPal;
}
}
return isPal;
}

Gulsvi
@gulsvi
Jun 30 2017 23:11
@MCTwoDigitZero Did you make that animation?
CallMeOrange
@EgnaroDev
Jun 30 2017 23:11
See my codepen? lol
@SkyC0der no
Its just an image
GIF
Gulsvi
@gulsvi
Jun 30 2017 23:11
I want to make one :(
CallMeOrange
@EgnaroDev
Jun 30 2017 23:11
Look at my code
Gulsvi
@gulsvi
Jun 30 2017 23:11
Kind of hard to figure out...
CallMeOrange
@EgnaroDev
Jun 30 2017 23:11
yeah...
There is actually CSS for animations
Nyan cat for example
lol going to add that as my showcase
People will probably look at my showcase then "Wtf?"
@SkyC0der I feel like you need to know backend to make that way
Like game of life you know?
Gulsvi
@gulsvi
Jun 30 2017 23:14
@5millerk Your regex is not right. Try practicing here to get it the way you want: http://www.regexpal.com/
Also, there is the .reverse() method for reversing an array that will help out a lot
@MCTwoDigitZero I think I just need to make a video and then use giphy.com to convert it to an animated gif
CallMeOrange
@EgnaroDev
Jun 30 2017 23:15
@SkyC0der How is his regex wrong?
str.replace(/[^A-Z0-9a-z]/g, newStr) looks correct to me
newStr contain a value ""
Gulsvi
@gulsvi
Jun 30 2017 23:16
if str is eye, it won't select anything
CallMeOrange
@EgnaroDev
Jun 30 2017 23:17
What do you mean by eye?
Gulsvi
@gulsvi
Jun 30 2017 23:17
isn't that one of the palindrome tests? The word "eye"
CallMeOrange
@EgnaroDev
Jun 30 2017 23:17
oh
I thought you meant a view or something..
5millerk
@5millerk
Jun 30 2017 23:18
why would it not select anything for "eye"?
Gulsvi
@gulsvi
Jun 30 2017 23:18
The ^ only checks for the first letter and would need to be outside of the bracket
(if you just want the first letter)
Trying to not to give too much away - but what do you want your regex to select?
5millerk
@5millerk
Jun 30 2017 23:19
I'm trying to get it to replace any non alphanumeric character with a blank, or nothing
CallMeOrange
@EgnaroDev
Jun 30 2017 23:20
/[^A-Z0-9a-z]/g is same as /[^0-9a-z]/gi
5millerk
@5millerk
Jun 30 2017 23:20
when i test it in a bunch of random input, it filters out all the symbols and makes it lowercase
but when i put the ^ outside the bracket it would leave all the symbols in the string
Gulsvi
@gulsvi
Jun 30 2017 23:20
I see.... yes
@5millerk There is also \W for that in regex
CallMeOrange
@EgnaroDev
Jun 30 2017 23:21
If you have ^ in regex within replace method, it will replace everything you like except that set with ^ in it
Gulsvi
@gulsvi
Jun 30 2017 23:21
Matches any character that is not a word character from the basic Latin alphabet. Equivalent to [^A-Za-z0-9].
For example, `/\W/ or /[^A-Za-z0-9
]/` matches "%" in "50%".
5millerk
@5millerk
Jun 30 2017 23:22
so
figured it out
@arecvlohe pointed out the actual issue lol
CallMeOrange
@EgnaroDev
Jun 30 2017 23:22
lol I remember Confirm the Ending
5millerk
@5millerk
Jun 30 2017 23:22
end was undefined in the array
CallMeOrange
@EgnaroDev
Jun 30 2017 23:22
I was really confused of that challenge
5millerk
@5millerk
Jun 30 2017 23:22
all i needed was end = palArray - 1 ....because we start from 0 lol
i didn't have the -1
CallMeOrange
@EgnaroDev
Jun 30 2017 23:23
I see
5millerk
@5millerk
Jun 30 2017 23:23
so my loop was comparing the first element to an undefined, and then it was off by 1 for the rest of the loop
so they never matched
when i added the -1 it worked right away
:-)
Gulsvi
@gulsvi
Jun 30 2017 23:23
interesting, I could not tell in that code what you were trying to do
Did you finish that one @MCTwoDigitZero
5millerk
@5millerk
Jun 30 2017 23:24
i forgot the reverse function, but i was basically doing that. Check the first and last element in the array. move in 1, check, move in 1, check
until you get beyond the halfway point, then break the loop
unless you find a non-match sooner
thanks for the help though! @SkyC0der @MCTwoDigitZero
CamperBot
@camperbot
Jun 30 2017 23:25
5millerk sends brownie points to @skyc0der and @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 408 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
:star2: 1890 | @skyc0der |http://www.freecodecamp.com/skyc0der
CallMeOrange
@EgnaroDev
Jun 30 2017 23:25
@SkyC0der No not yet
I have not even started it lol
I need to check out these links first
Last time I was really confused because of this
confirmEnding("Walking on water and developing software from a specification are easy if both are frozen", "specification") should return false.
I was thinking "how? specification is right there"
but only end of sentence
substr is the same as substring?
never mind
we would like you to use one of the JavaScript substring methods instead.
I thought I had to use both
CallMeOrange
@EgnaroDev
Jun 30 2017 23:34
@SkyC0der
Hey!
I found easiest way in the world to solve Confirm the Ending!!
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:35
Hi I was wondering if I could get some assitance here. I have this image that I would like to have it rounded using bootstrap css however when I do it it looks more like an oval than a circle. Question, how do I fix the css so that is actually a circle vs an oval?
<img class="img-responsive center-block img-circle” src=“...">
CallMeOrange
@EgnaroDev
Jun 30 2017 23:36
Try have these classes added to new div element around it
Does it really work with image element?
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:36
so yes it works just that it looks like an oval and I want it to be a circle
CallMeOrange
@EgnaroDev
Jun 30 2017 23:38
I see
Are you on codepen?
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:38
I am
CallMeOrange
@EgnaroDev
Jun 30 2017 23:38
Can I see it?
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:38
hmmm I would have to migrate my tribute page but no big deal one moment
CallMeOrange
@EgnaroDev
Jun 30 2017 23:38
Sure
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:39
I setup an apache2 server on ubuntu
Brb migrating
CallMeOrange
@EgnaroDev
Jun 30 2017 23:41
Oh I also had hard time to make an image circle...
I dont know if it is possible but that might depends on image's height
Sorry this is one thing I cant help you with :/
korzo
@korzo
Jun 30 2017 23:42
@mrmcmuffinz You need image with same width/height to get circle
CallMeOrange
@EgnaroDev
Jun 30 2017 23:42
^
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:42
Is there a way I force the wxh?
Hello911
@Hello911
Jun 30 2017 23:43
@marcusparsons thanks. But 1 question. What does ::before do? Without it, the text wont change. From what I know, ::before used to place something before the content already on the screen. So say if you have <p>Hello.</p> And you do p::before{content:"It's me."Then, It is gonna be <p>It's me. Hello.</p>.
CamperBot
@camperbot
Jun 30 2017 23:43
hello911 sends brownie points to @marcusparsons :sparkles: :thumbsup: :sparkles:
:cookie: 421 | @marcusparsons |http://www.freecodecamp.com/marcusparsons
Jan Shah
@JanShah
Jun 30 2017 23:43
@mrmcmuffinz your image has to be the same width as height to get a true circle
Netrunner21
@Netrunner21
Jun 30 2017 23:43
So I noticed my usual route to get here has changed. The challenges no longer offer a link to the chat rooms, instead there's a hint page, unless they've put the help button somewhere else.
korzo
@korzo
Jun 30 2017 23:44
@mrmcmuffinz Either crop the image or wrap it in another div with overflow:hidden and height/width set
Jan Shah
@JanShah
Jun 30 2017 23:44
you can force it but it will stretch/squash the image
Gulsvi
@gulsvi
Jun 30 2017 23:44
@MCTwoDigitZero How did you do it?
.endswith()?
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:44
I see, could I in theory overlay some circle on top of the image instead of modifying the image itself?
Like a layer on top of it?
CallMeOrange
@EgnaroDev
Jun 30 2017 23:45
@SkyC0der The secret is out
Netrunner21
@Netrunner21
Jun 30 2017 23:46
Word. I need to visit the forums more often.
haha
korzo
@korzo
Jun 30 2017 23:46
@mrmcmuffinz That's what I said
<div style="width:50px;height:50px; overflow:hidden;border-radius: 50%"><img src="..." /></div>
Netrunner21
@Netrunner21
Jun 30 2017 23:46
I've completed the Tic Tac Toe project (for now, will add a few things later). Would anyone like to give me some input? It's "almost" unbeatable. There's a few instaces where the computer goes off script.
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:46
So we had the same idea, just explained it differently?
Netrunner21
@Netrunner21
Jun 30 2017 23:47
Also does not line up right on android (and possibly other mobile devices)
CallMeOrange
@EgnaroDev
Jun 30 2017 23:47
@Netrunner21 lol I won by first try
Same algorithms again and again?
Netrunner21
@Netrunner21
Jun 30 2017 23:48
It's programmed to check if it can win first and do that, then it checks if you can win and trys to block you
it does that most of the time
CallMeOrange
@EgnaroDev
Jun 30 2017 23:48
I see
Got a draw this time
Looks great
Netrunner21
@Netrunner21
Jun 30 2017 23:49
Thanks man. I'm cool with being able to win. I just wanted it to be more than random assignments by the computer
@MCTwoDigitZero Thanks
CamperBot
@camperbot
Jun 30 2017 23:49
netrunner21 sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 409 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
Netrunner21
@Netrunner21
Jun 30 2017 23:49
let me know if it beats you lol
CallMeOrange
@EgnaroDev
Jun 30 2017 23:50
lol
Unfortunately I have learned ways to get a draw or be able to win everytime
There is good video for that
Netrunner21
@Netrunner21
Jun 30 2017 23:51
I see
I'm a tic tac toe noob
CallMeOrange
@EgnaroDev
Jun 30 2017 23:51
It will probably beat me if I mess up or become lazy
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:54
@korzo ok, I did as you suggested but did not have the effect I wanted
Pagnito
@Pagnito
Jun 30 2017 23:55
the best way to plat tic tac toe, is start at some corner, then next of your turn put on on the opposite side, then another side, and create likea 90 degree angle, so u have two opportunities to win
its pretty much the limit of tic tac toe skill
CallMeOrange
@EgnaroDev
Jun 30 2017 23:56
@Pagnito Exactly
Netrunner21
@Netrunner21
Jun 30 2017 23:56
I will probably add a select corner algorithm before it hits its final randomized choice (trying to win and stop you from winning are its first choices)
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:58
Does anyone know how to set the circle right for the image in my tribute page?
Pagnito
@Pagnito
Jun 30 2017 23:58
@mrmcmuffinz what do u mean
Abraham Cabrera
@mrmcmuffinz
Jun 30 2017 23:58
Above is my tribute page and I want to have a circle around the image
I tried using the class image-circle from css bootstrap but that made it look oval.
Pagnito
@Pagnito
Jun 30 2017 23:59
oh
hold on
i tihnk u can just give ur image a border
border-radius