These are chat archives for FreeCodeCamp/Help

18th
Jul 2017
Sam Moradi
@sammymm
Jul 18 2017 00:13
hi everyone
i don't know how to process the data i get back from the weather api
here is my code
how do i get the temperature out of the data for example
Gary
@bluefishmarine
Jul 18 2017 00:16
@artoodeeto maybe try to make a separate div for each search result, that green part looks like it has all of the search results in one line
stealthygame
@stealthygame
Jul 18 2017 00:19
Guys. I was wondering if someone could give me a somewhat "computer sciencey" breakdown of why my URLs won't work in my .getJSON function unless i make them HTTPS instead of HTTP.... i understand that the HTTPS is more secure? but... I'm not understanding why the internet doesnt like it. I was trying to use a GitHub URL... if that matters?
Gary
@bluefishmarine
Jul 18 2017 00:20
@sammymm you have to access it using object notation, like, weather contains an array with an object inside, so you would need to do weather[0].main
stealthygame
@stealthygame
Jul 18 2017 00:20
When would http be ok without using HTTPS ? O.o
Gary
@bluefishmarine
Jul 18 2017 00:21
rather, data.weather[0].main. something like that, should work
stealthygame
@stealthygame
Jul 18 2017 00:21
StackOverflow says its because an UNSECURE site was trying to access a SECURE sight? ... but codepen is also HTTPS ... i dont understand...
Sam Moradi
@sammymm
Jul 18 2017 00:21
@bluefishmarine I tried that, it doesn't return anything
julien Demarque
@JulienDemarque
Jul 18 2017 00:21
Hello. My edit button won't open the react modal the second (after I opened it once and closed it) I think it is because the click doesn't fire the getInitialState function the second time. I tried to add a onClick function in the render() but nothing works... https://codepen.io/JulienDemarque/pen/ZyZJpe?editors=1111
Sam Moradi
@sammymm
Jul 18 2017 00:21
the data i get back is in a weird format, not pure json
Gulsvi
@gulsvi
Jul 18 2017 00:22
@stealthygame When your address bar starts with https, you expect security. That means only accessing resources over https. As soon as you access something over http you have compromised the security of the website, so your browser blocks it to keep everything secure.
Gary
@bluefishmarine
Jul 18 2017 00:23
yeah, that looks like xml probably
stealthygame
@stealthygame
Jul 18 2017 00:23
@SkyC0der so its my browsers fault? or a protocol thing in general ?
Sam Moradi
@sammymm
Jul 18 2017 00:23
i tried specifying data: json
but it still returns the same thing
Gulsvi
@gulsvi
Jul 18 2017 00:23
@stealthygame It is up to the browser to enforce
Gary
@bluefishmarine
Jul 18 2017 00:23
i don't know how that api works, you may need to add the data type somewhere in the url
Coy Sanders
@coymeetsworld
Jul 18 2017 00:24
https doesn't guarantee security
stealthygame
@stealthygame
Jul 18 2017 00:24
@SkyC0der , Thank you. :)
CamperBot
@camperbot
Jul 18 2017 00:24
stealthygame sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2135 | @skyc0der |http://www.freecodecamp.com/skyc0der
Sam Moradi
@sammymm
Jul 18 2017 00:25
it looks like it's supposed to only return json
but it doesn't
Coy Sanders
@coymeetsworld
Jul 18 2017 00:25
the connection is secure, but doesn't mean that what you're connecting to is necessarily legit. Someone could be scamming you on a https site
Gary
@bluefishmarine
Jul 18 2017 00:26
oh, actually nevermind. yeah when you type it into the browser it returns it as json
Sam Moradi
@sammymm
Jul 18 2017 00:26
yea but when i run a call, it returns jibberish
stealthygame
@stealthygame
Jul 18 2017 00:26
@SkyC0der HEY! Thanks again :) Another one for my bookmarks =]
CamperBot
@camperbot
Jul 18 2017 00:26
stealthygame sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: stealthygame already gave skyc0der points
Gary
@bluefishmarine
Jul 18 2017 00:27
maybe try something like this
function getLocationData(){
  $.ajax({
  dataType: "json",
  type: "GET",
  url:"https://ipapi.co/json/",
  success: success
});
}
Sam Moradi
@sammymm
Jul 18 2017 00:30
thanks @bluefishmarine I'll try that
CamperBot
@camperbot
Jul 18 2017 00:30
sammymm sends brownie points to @bluefishmarine :sparkles: :thumbsup: :sparkles:
:cookie: 302 | @bluefishmarine |http://www.freecodecamp.com/bluefishmarine
Gary
@bluefishmarine
Jul 18 2017 00:31
success is where you pass the callback function
Sam Moradi
@sammymm
Jul 18 2017 00:31
it does say that the api only takes .GET calls
Gulsvi
@gulsvi
Jul 18 2017 00:31
@coymeetsworld yeah, and your modem could be hacked with state-sponsored malware. :) Nothing is secure.
Sam Moradi
@sammymm
Jul 18 2017 00:31
so would AJAX work?
Gary
@bluefishmarine
Jul 18 2017 00:31
yeah, its still jquery
Sam Moradi
@sammymm
Jul 18 2017 00:31
k
Gary
@bluefishmarine
Jul 18 2017 00:31
.get() i think just does part of what .ajax() does
I had a lot of trouble getting it right when i was trying to figure it out
Sam Moradi
@sammymm
Jul 18 2017 00:32
that's the way I understand it
Gary
@bluefishmarine
Jul 18 2017 00:37
ok, i just saw you made some changes, did you get it?
Sam Moradi
@sammymm
Jul 18 2017 00:37
no
ajax doesn't return anything
Gary
@bluefishmarine
Jul 18 2017 00:38
ok, you need to pass data into the success function, and pass your url variable to url
function getLocationData(){
  $.ajax({
  dataType: "json",
  type: "GET",
  url: url,
  success: function(data){
    $('#temperature').html(data.weather[0].main);
  }
});
}
and of course you can change the name of the function to something like getWeatherData
Sam Moradi
@sammymm
Jul 18 2017 00:42
@bluefishmarine thanks
CamperBot
@camperbot
Jul 18 2017 00:42
sammymm sends brownie points to @bluefishmarine :sparkles: :thumbsup: :sparkles:
:warning: sammymm already gave bluefishmarine points
Sam Moradi
@sammymm
Jul 18 2017 00:42
I just realized that the url in the first function was not universal
so I was just passing a part of the url to the GET function
Gary
@bluefishmarine
Jul 18 2017 00:43
ya, plus you need to pass in data to the success function
Sam Moradi
@sammymm
Jul 18 2017 00:43
I thought when you make a variable outside of a function, then the value gets updated globally no?
Gary
@bluefishmarine
Jul 18 2017 00:43
which variable are you referring to? url?
Sam Moradi
@sammymm
Jul 18 2017 00:44
yea
if I go
var url = "https://fcc-weather-api.glitch.me/";

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

url = url + "/api/current?lon=" + position.coords.longitude +"&lat=" + position.coords.latitude;
shouldn't url be updated outside of the function?
Gary
@bluefishmarine
Jul 18 2017 00:45
yeah, it is. you originally had url = "https://fcc-weather-api.glitch.me/" inside the ajax call
Sam Moradi
@sammymm
Jul 18 2017 00:45
yea that's why it was giving me jiberish
thanks man
Gary
@bluefishmarine
Jul 18 2017 00:46
no prob. this one frustrated me for a bit when i was working on it
Sam Moradi
@sammymm
Jul 18 2017 00:47
the last one (random quote) was so bad for me. I had everything right, except i didn't even know about http versus https
wasted hours of my life on that shit
Luis
@luishzapata
Jul 18 2017 00:47
Hello. i am working on the Search and Replace exercise, my code works on my computer, but for some reason it is failing on the site. can anybody take a look at the code?
Gary
@bluefishmarine
Jul 18 2017 00:50
@sammymm yeah, that was annoying. but you've gotten pretty far so keep it going.
Sam Moradi
@sammymm
Jul 18 2017 00:51
@bluefishmarine can someone really land a dev job after completing this thing?
CamperBot
@camperbot
Jul 18 2017 00:51
:bulb: to format code use backticks! ``` more info
Gary
@bluefishmarine
Jul 18 2017 00:54
@sammymm I would say, not just with freecodecamp. use some other resources as well. udemy, youtube, books, etc. but a good portfolio will help a lot. i haven't gotten a job yet, still working on the projects and doing some udemy courses
@luishzapata lemme take a look, i can try to help
@luishzapata also, to format the code type the backticks, then hit shift+enter
Sam Moradi
@sammymm
Jul 18 2017 00:54
@bluefishmarine this development manager told me, you have to contribute to projects related to what you are interested in
like if you are interested in AI you have to find a big public project related to AI and contribute to it
Luis
@luishzapata
Jul 18 2017 00:56

var newstr = "";

function myReplace(str, before, after) {

if (before.charAt(0) === before.charAt(0).toLowerCase()){
newstr = str.replace (before, after);
}
else {
capAfter = after.charAt(0).toUpperCase() + after.slice(1);
newstr = str.replace (before, capAfter);
return newstr;
}
}

myReplace("This has a spellngi error", "spellngi", "spelling");

console.log(newstr);

Sam Moradi
@sammymm
Jul 18 2017 00:56
but I don't know enough to know what I am interested in. I like front end so far
Gary
@bluefishmarine
Jul 18 2017 00:56
makes sense. I haven't tried contributing to anything yet, mostly because I don't feel like i would be good enough to provide proper code yet
Sam Moradi
@sammymm
Jul 18 2017 00:56
yea me either, i know how you feel
Raj Patel
@rajp1847
Jul 18 2017 00:58
help plz
Gary
@bluefishmarine
Jul 18 2017 00:59
crap, well i gotta go for now, good luck to everyone
Raj Patel
@rajp1847
Jul 18 2017 00:59
nooooooooooooooooooooooooooo
plz m
help me
Luis
@luishzapata
Jul 18 2017 01:00
Trying again.
var newstr = "";

function myReplace(str, before, after) {


  if  (before.charAt(0) === before.charAt(0).toLowerCase()){
      newstr = str.replace (before, after);
  } 
 else {
  capAfter = after.charAt(0).toUpperCase() + after.slice(1);
  newstr = str.replace (before, capAfter);
  return newstr;
  }
}


myReplace("This has a spellngi error", "spellngi", "spelling");

 console.log(newstr);
Ryan Draves
@RyanDraves
Jul 18 2017 01:01
@rajp1847 what do you need help with?
Luis
@luishzapata
Jul 18 2017 01:01
Thanks @sammymm
CamperBot
@camperbot
Jul 18 2017 01:01
luishzapata sends brownie points to @sammymm :sparkles: :thumbsup: :sparkles:
:cookie: 262 | @sammymm |http://www.freecodecamp.com/sammymm
Alex
@cyberpunk1971
Jul 18 2017 01:07
hello all
Ryan Draves
@RyanDraves
Jul 18 2017 01:15
hello, does anyone know how to import audio clips into codepen? I'm trying to use audio for the pomodoro clock
MrSpock
@DrSpock123
Jul 18 2017 01:24
Hello, I'm trying to use the .text(...); jQuery function, the only other example they list as a template doesn't work. They use the .html(...); jQuery function. The syntax for the .html(); is: $("h3").html("<em>jQuery Playground</em>"); I know that the <em> wouldn't be in the definition. However, what sort of syntax do you use just to change the text?
Hello, is there anybody out there? Just smile if you can hear me :-} Is there anyone at all?
MrSpock
@DrSpock123
Jul 18 2017 01:31
Oh well, sorry for the drama, of course it's a Pink Floyd song.
just1witness
@just1witness
Jul 18 2017 01:56

Hello all you beautiful people! Can someone per chance tell me why I can't get this to round up?

console.log('ready');
$("#c").on("click", myFunction);
function myFunction() {
console.log('Clicked');

var celcius = (temp -32)*.5556;
var converted = math.round(celcius);
converted = $('#temp').html('Current Temperature: ' + converted + '°C');

}

I just realized I spelled celcius wrong, but I did it consistently, so that shouldn't be it.
Gulsvi
@gulsvi
Jul 18 2017 01:59
@just1witness To round up, use Math.ceil() your code needs to remove the last converted = part:
function myFunction() {
  var celsius = (temp -32)*.5556;
  var converted = Math.ceil(celsius);
  $('#temp').html('Current Temperature: ' + converted + '&deg;C');
}
I fixed celsius for you :)
And I *believe* we should use &deg; instead of ° in HTML
Also, fixed math to Math
just1witness
@just1witness
Jul 18 2017 02:02
The ° works well, is that because it can have issues on other browsers? Also, you are awesome, that worked. I did it before, but realize I didn't capitalize Math... :/
@SkyC0der Thank you!!!!!
CamperBot
@camperbot
Jul 18 2017 02:02
just1witness sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2137 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jul 18 2017 02:03
@just1witness I'm not positive, but I think it's a best practice to use HTML Entities for special characters like that. Maybe it doesn't render correctly on other language browsers.
(Happy to help, by the way) :)
just1witness
@just1witness
Jul 18 2017 02:04
@SkyC0der Cool thank you for the advice! :D
CamperBot
@camperbot
Jul 18 2017 02:04
just1witness sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: just1witness already gave skyc0der points
just1witness
@just1witness
Jul 18 2017 02:06
Yay! Now I only have one more thing to figure out before I'm done with this zipline, this one was a LOT easier than the quote machine IMO, lol.
just1witness
@just1witness
Jul 18 2017 02:12
@DrSpock123 I think I just needed to do what your doing. .html() worked for me. Just put the function you want to replace the current text in the brackets. Try attaching an id to the element you want to change and instead of h3 use ('#id') (that's how I did it.
@DrSpock123 $('#id').html(new input goes here);
Carlos Nah
@RA9
Jul 18 2017 03:06
Hi I am kind of stuck in my work I actually wanted to make the combine pages as one , please take a look https://codepen.io/RA9/pen/WOWMzM
Joseph
@revisualize
Jul 18 2017 03:11
Hey.
Ross Scarborough
@SourceHorse
Jul 18 2017 03:24

function factorialize(num) {
var integers = 0;
for (var i = 1; i < num + 1; i++) {
integers.push(i);
}
return integers;
}

factorialize(5);

i get integers.push is not a function
i want a list of integers from 1 to 5
i can't see what I'm doing wrong, can anyone else?
Ross Scarborough
@SourceHorse
Jul 18 2017 03:29
trying to push i to a variable to make an array
Manish Giri
@Manish-Giri
Jul 18 2017 03:30
@SourceHorse integers should be an array for you to push
@SourceHorse integers = 0;
Ross Scarborough
@SourceHorse
Jul 18 2017 03:30
i see now
needed []
thanks @Manish-Giri
CamperBot
@camperbot
Jul 18 2017 03:31
sourcehorse sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6275 | @manish-giri |http://www.freecodecamp.com/manish-giri
Claudio Restifo
@Marmiz
Jul 18 2017 03:41

@Manish-Giri discovered a new thing today:
function generator in JS... so you can pause and resume the execution as you like.

Feels a lot like mambo-jambo to me
function*

Manish Giri
@Manish-Giri
Jul 18 2017 03:41
ooh yes I learnt about that a few days back while doing a codewars problem
@Marmiz
very neat though
@Marmiz my question on SO about it..
Claudio Restifo
@Marmiz
Jul 18 2017 03:42
Discovered it trough redux-saga :)
Still not sold... I think there's some magic about it
Manish Giri
@Manish-Giri
Jul 18 2017 03:43
the iterator returns an object when you call .next()
that's the whole magic lol
Kyle Holm
@thekholm80
Jul 18 2017 03:43
it's essentially voodoo with a little hocus-pocus mixed in
Manish Giri
@Manish-Giri
Jul 18 2017 03:44
lol
Ross Scarborough
@SourceHorse
Jul 18 2017 03:44
I have another question
how can i get factorialize(0) to come back as 1?

function factorialize(num) {
var integers = [];
for (var i = 1; i < num + 1; i++) {
integers.push(i);
}
var factorial = 0;
factorial = integers.reduce(function(accumulator, current) {
return accumulator * current;
});
return factorial;
}

factorialize(5);

Claudio Restifo
@Marmiz
Jul 18 2017 03:45
@thekholm80 @Manish-Giri
:sparkles: magic :sparkles:
Ross Scarborough
@SourceHorse
Jul 18 2017 03:45
i mean i could do it with an if statement, but i think there's a better way
Manish Giri
@Manish-Giri
Jul 18 2017 03:46
ternary statement
Kyle Holm
@thekholm80
Jul 18 2017 03:47
default value
Claudio Restifo
@Marmiz
Jul 18 2017 03:55

@SourceHorse while we are at it:
in your function you are taking a number and than saving all integer up to that number into an array.
That is very inefficient.
What if the number was an absurd long one like a 2^64, that would exceed your 64 bit OS maximum stacks :)

Pretty edgy case but sometimes is worth to think about it :)

andrea
@girlcodecrush
Jul 18 2017 04:51
@Marmiz I'm lost as I'm trying to figure out how to align an image and the matching text. As you advised last time, I used a code that specifies image and p elements. Yes. the images are displayed correctly - on the left-hand side of the page-, but the thing is all three blocks of text that descibe corresponding images are all together on the right-hand side, right next to the first image. I did some trials and errors using a div element and css property float. How can I get the text to be placed on the right spot that matches the right image?
Katie
@SpaceChick04
Jul 18 2017 04:54
@girlcodecrush I'm not sure exactly what you're doing, but try either Caption (if you're trying to get text under a certain graphic) or you can always use translate.. .for example: <h1 class="text-center" style="transform: translateY(40px)">
Claudio Restifo
@Marmiz
Jul 18 2017 05:01

@girlcodecrush you look like you want a grid system so that you'll have the elements displayed as:

img -- text
img -- text
img -- text

In order to do so you need to create rows and colums to allign the element... otherwise with floating you are just instructing all the image to stay on the left and the text on the right... but NOT each one on its row:

img -- text / text /text
img --
img --
@girlcodecrush you can make it yourself with flexbox or use a library with some grid system aready implemented (like bootstrap, bulma...)
Kyle Holm
@thekholm80
Jul 18 2017 05:05
.row {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}
flexbox is fun
Claudio Restifo
@Marmiz
Jul 18 2017 05:06
@thekholm80 until you remember why you hate CSS
:fire:
Kyle Holm
@thekholm80
Jul 18 2017 05:07
i would happily be a back end dev just so i never have to write css again
Viktor Tiutiun
@vittorioVT
Jul 18 2017 05:21
i love css :smile:
hello
@girlcodecrush your code is in codepen?
Ming Zhu
@chocobrownie
Jul 18 2017 05:53
Why do we need all those arial or role attribute to help screen reader? Is it required?
Cuz it is a lot of code and takes up a lot of space inside an html
__mifflin__
@cdrainxv
Jul 18 2017 05:55
Yeah! F@#$ short vision impaired people. :smile:
Ming Zhu
@chocobrownie
Jul 18 2017 05:57
aria, I misspelled
Rainrus
@Rainrus
Jul 18 2017 06:09
Hello. My name is Anton to me 29 years. I live in Russia in Volgograd. I really want to find English-speaking friends for correspondence and communication. My hobbies include programming in a web environment, fishing, traveling. I'll be very glad to write: kova22111@gmail.com, viber / whatsapp: +79616942868
andrea
@girlcodecrush
Jul 18 2017 06:12
@Marmiz flexbox. alright. will see how I can go about it. Thanks for your advice! @thekholm80 thanks for your input as well!
CamperBot
@camperbot
Jul 18 2017 06:12
girlcodecrush sends brownie points to @marmiz and @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1002 | @marmiz |http://www.freecodecamp.com/marmiz
:star2: 1349 | @thekholm80 |http://www.freecodecamp.com/thekholm80
andrea
@girlcodecrush
Jul 18 2017 06:14
@vittorioVT yes. here's the link. https://codepen.io/girlcodecrush/pen/yXKaYb
i'm super beginner. My code is messy and not well structured.. embarrassing.
Coy Sanders
@coymeetsworld
Jul 18 2017 06:16
one thing that stands out are the multiple style tags you have in your HTML pane @girlcodecrush, you should just put all your CSS in one place, and for codepen I would just put it in the CSS pane
Viktor Tiutiun
@vittorioVT
Jul 18 2017 06:17
@girlcodecrush you can to connect Bootstrap in settings and add to you project grid (container, rows and col) and put in it everything
@girlcodecrush you connected the bootstrap to the css but did not do it in the js settings
Viktor Tiutiun
@vittorioVT
Jul 18 2017 06:29

@girlcodecrush put all your code in the container:

<div class="container">
<div class="row">
<div class="col-md-12"> you image ...</div> // if do you want to have one column or if do you want to have two
<div class="col-md-6"> your image </div>...
<div class="col-md-6"> ...your text ...</div>....

</div>
</div>

Viktor Tiutiun
@vittorioVT
Jul 18 2017 06:35
@girlcodecrush this can to you help: https://hackerthemes.com/bootstrap-cheatsheet/ here you can see how to create navbar and container
vbaghdas
@vbaghdas
Jul 18 2017 06:47
Can someone tell me why my message is printing an empty string in this switch statement: https://codepen.io/vbaghdas/pen/zzQzXK?editors=0012
Coy Sanders
@coymeetsworld
Jul 18 2017 06:48
getDay returns a number, not the name of the day
Viktor Tiutiun
@vittorioVT
Jul 18 2017 06:52
@vbaghdas look at console.log(dayOfWeek);
Darren
@DarrenfJ
Jul 18 2017 06:53
evening fCC
hey guys :wave:
Coy Sanders
@coymeetsworld
Jul 18 2017 06:53
hey @DarrenfJ
Viktor Tiutiun
@vittorioVT
Jul 18 2017 06:54
@DarrenfJ hi
vbaghdas
@vbaghdas
Jul 18 2017 06:54
returns a number, so would I need to change it to Case 1: ?
Coy Sanders
@coymeetsworld
Jul 18 2017 06:54
try
vbaghdas
@vbaghdas
Jul 18 2017 06:54
and just write out dayOfWeek = Monday.. etc for each case statement?
Coy Sanders
@coymeetsworld
Jul 18 2017 06:54
also, read the link I gave :)
Viktor Tiutiun
@vittorioVT
Jul 18 2017 06:55
@DarrenfJ you now have morning or night? really evening?
vbaghdas
@vbaghdas
Jul 18 2017 06:55
thank you @coymeetsworld
CamperBot
@camperbot
Jul 18 2017 06:55
vbaghdas sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 2977 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jul 18 2017 06:55
np
vbaghdas
@vbaghdas
Jul 18 2017 06:55
thank you @vittorioVT
CamperBot
@camperbot
Jul 18 2017 06:55
vbaghdas sends brownie points to @vittoriovt :sparkles: :thumbsup: :sparkles:
:cookie: 789 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
Viktor Tiutiun
@vittorioVT
Jul 18 2017 06:56
@vbaghdas welcome
vbaghdas
@vbaghdas
Jul 18 2017 06:56
switch(dayOfWeek){
case 0:
dayOfWeek = "Sunday";
message = "it is the weekend";
break;
that statement above returns what i am looking for
Darren
@DarrenfJ
Jul 18 2017 07:06
@vittorioVT it's pretty late here actually
i should say "happy early almost morning fCC'
Viktor Tiutiun
@vittorioVT
Jul 18 2017 07:08
@DarrenfJ :smile: i think about 5.00
Darren
@DarrenfJ
Jul 18 2017 07:15
where are you located?
Viktor Tiutiun
@vittorioVT
Jul 18 2017 07:16
@DarrenfJ in Kiev, Ukraine i have 10.16
Darren
@DarrenfJ
Jul 18 2017 07:17
7ish hours ahead.. cool
it's like 3:12 here or something
Viktor Tiutiun
@vittorioVT
Jul 18 2017 07:19
i mistaked two hours :smile:
Manish Giri
@Manish-Giri
Jul 18 2017 07:21
@DarrenfJ :wave:
GeorgeII
@GeorgeII
Jul 18 2017 07:24
Hello! Why twitch links don't work? I can open them in browser but can't open them through my application
heroiczero
@heroiczero
Jul 18 2017 07:25
@GeorgeII link your codepen.io
Darren
@DarrenfJ
Jul 18 2017 07:32
@Manish-Giri buddy! :D
@GeorgeII youtrying to open them up inside codepen?
@GeorgeII you doing the whole target="_blank" thing? https://blog.codepen.io/2014/02/06/opening-links-pens/
Darren
@DarrenfJ
Jul 18 2017 07:46
ok guys gotta sneak off to bed.. faaaadingfast...
thanks for all your volunteering.... yer better people than me for sticking it out in the room...
heroiczero
@heroiczero
Jul 18 2017 07:46
@DarrenfJ :wave: good night?
Darren
@DarrenfJ
Jul 18 2017 07:47
thanks @Manish-Giri @heroiczero @vittorioVT @coymeetsworld
CamperBot
@camperbot
Jul 18 2017 07:47
darrenfj sends brownie points to @manish-giri and @heroiczero and @vittoriovt and @coymeetsworld :sparkles: :thumbsup: :sparkles:
:cookie: 790 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
:star2: 1500 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 6277 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 2978 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Manish Giri
@Manish-Giri
Jul 18 2017 07:47
@DarrenfJ ty, g'night!
Darren
@DarrenfJ
Jul 18 2017 07:47
@heroiczero oh yah man, gotta sneak off to bed... before I fall outta my chair asleep on the floor :D
CamperBot
@camperbot
Jul 18 2017 07:47
sorry manish-giri, you can't send brownie points to yourself! :sparkles: :sparkles:
Viktor Tiutiun
@vittorioVT
Jul 18 2017 07:47
@DarrenfJ thanks and you
Manish Giri
@Manish-Giri
Jul 18 2017 07:48
dumb cbot
ty @DarrenfJ
CamperBot
@camperbot
Jul 18 2017 07:48
manish-giri sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1911 | @darrenfj |http://www.freecodecamp.com/darrenfj
heroiczero
@heroiczero
Jul 18 2017 07:48
@DarrenfJ ty
CamperBot
@camperbot
Jul 18 2017 07:48
heroiczero sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
Coy Sanders
@coymeetsworld
Jul 18 2017 07:48
later @DarrenfJ
CamperBot
@camperbot
Jul 18 2017 07:48
:star2: 1912 | @darrenfj |http://www.freecodecamp.com/darrenfj
Viktor Tiutiun
@vittorioVT
Jul 18 2017 07:48
ty @DarrenfJ
CamperBot
@camperbot
Jul 18 2017 07:48
vittoriovt sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1913 | @darrenfj |http://www.freecodecamp.com/darrenfj
TJ Hardin
@AndroidNinjaX
Jul 18 2017 07:55
function test(stuff, moreStuff) {
sorry
EpicTriffid
@EpicTriffid
Jul 18 2017 08:05
So in my codepen I'm trying to get it that when i click on the random button, if the search box is open, it will close it, but I think I'm having trouble working out how to reference it. You can see my attempts in randbut to initialize closeSearch when clicked, but its not working. Any ideas? https://codepen.io/EpicTriffid/pen/WOYrzg
GeorgeII
@GeorgeII
Jul 18 2017 08:14
@heroiczero @DarrenfJ Sorry I'm late. https://codepen.io/GeorgeIV/pen/jwRmvp I mean Twitch page can't be load
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:15
anyone have asec to help me with some objects?
*a sec
heroiczero
@heroiczero
Jul 18 2017 08:16
@GeorgeII i would get the url from your JSON API
GeorgeII
@GeorgeII
Jul 18 2017 08:19
@heroiczero ?
Does it work in your case?
heroiczero
@heroiczero
Jul 18 2017 08:20
@GeorgeII yes it does
GeorgeII
@GeorgeII
Jul 18 2017 08:21
@heroiczero I mean when you click on Twitch channel it loads in new tab?
In my case, a page can't load
heroiczero
@heroiczero
Jul 18 2017 08:22
@GeorgeII yes
GeorgeII
@GeorgeII
Jul 18 2017 08:22
hm
such a strange thing
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:23
@EpicTriffid I'm looking through your code, but its gonna take me a sec. You might be able to find it easier, but when you click "search" the "X" pops up. When you click the "Random" button, you want the same thing as if you did click that "X" that popped up when search was clicked..... did that make since.
@EpicTriffid I just say you might be able to find it faster cause you know your code lol.
GeorgeII
@GeorgeII
Jul 18 2017 08:25
@EpicTriffid I'm newbie but.. you can replace your nameless function in var closeRand = cross1.click(function() { and just invoke it when you need
EpicTriffid
@EpicTriffid
Jul 18 2017 08:25
@GeorgeII See, i tried that, but its doesn't seem to work
GeorgeII
@GeorgeII
Jul 18 2017 08:26
something like var closeRand = cross1.click(f()
hm
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:27
@EpicTriffid do corss2? It seems like cross2 is your "X" for the search
EpicTriffid
@EpicTriffid
Jul 18 2017 08:28
@AndroidNinjaX nope, still nothing :(
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:29
@EpicTriffid well dang..... let me keep looking
EpicTriffid
@EpicTriffid
Jul 18 2017 08:29
@AndroidNinjaX Thankyou :)
CamperBot
@camperbot
Jul 18 2017 08:29
epictriffid sends brownie points to @androidninjax :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @androidninjax |http://www.freecodecamp.com/androidninjax
heroiczero
@heroiczero
Jul 18 2017 08:30
@GeorgeII you forgot to add target="_blank" in '<div class="list-group"><a href="https://www.twitch.tv/' + channel +'" class="list-group-item list-group-item-action list-group-item-info">' + channel + '</a></div>' you need to add one to each one
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:32
@EpicTriffid GOT IT
GeorgeII
@GeorgeII
Jul 18 2017 08:32

@EpicTriffid

cross2.click(closeSearch);

```
function closeSearch() {
resultsbox.empty().animate({opacity:0},100);
searchbar.animate({opacity:"0"},100);
searchicon.fadeOut(100);
searchbut.animate({width:"105px"},300);
searchtext.fadeIn(1000);
cross2.fadeOut('fast');
setTimeout(revert, 800)
function revert (){
  searchbut.removeAttr('style');
};
searchstatus = 0;

};

randtext.click(function () {
closeSearch();
.....
...
```

TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:32
@EpicTriffid HELL YA.... IM EXCITED I DID lol
GeorgeII
@GeorgeII
Jul 18 2017 08:32
oops
broken
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:33

@EpicTriffid ok So I copied this

cross2.click(function closeSearch() {
resultsbox.empty().animate({opacity:0},100);
searchbar.animate({opacity:"0"},100);
searchicon.fadeOut(100);
searchbut.animate({width:"105px"},300);
searchtext.fadeIn(1000);
cross2.fadeOut('fast');
setTimeout(revert, 800)
function revert (){
searchbut.removeAttr('style');
};
searchstatus = 0;
});

This is what told the "X" to pop up when you click on search

@EpicTriffid So then I took out the "Function" and made it this

resultsbox.empty().animate({opacity:0},100);
searchbar.animate({opacity:"0"},100);
searchicon.fadeOut(100);
searchbut.animate({width:"105px"},300);
searchtext.fadeIn(1000);
cross2.fadeOut('fast');
setTimeout(revert, 800)
function revert (){
searchbut.removeAttr('style');
};
searchstatus = 0;

Bassicall all I took out was "cross2.click(function closeSearch() {" From the front.... and also "});" from the end

GeorgeII
@GeorgeII
Jul 18 2017 08:35
@heroiczero I think you don't understand what I'm talking about. I've got also page opens in a new tab but it's empty
it's just clear white tab
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:36
@EpicTriffid oh and copied it to where you have the stuff for you "random button click". I put it very first thing in there.
@EpicTriffid so you had "randtext.click(function () {" and right after that, I pasted the stuff I just sent you.
EpicTriffid
@EpicTriffid
Jul 18 2017 08:37
@AndroidNinjaX And does the cross still work as standard?
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:38
@EpicTriffid yup
heroiczero
@heroiczero
Jul 18 2017 08:38
@GeorgeII hmm thats interesting for me it opens a page to twitch but not to the link
EpicTriffid
@EpicTriffid
Jul 18 2017 08:38
@AndroidNinjaX Cool. Lemme try!
GeorgeII
@GeorgeII
Jul 18 2017 08:39
@AndroidNinjaX can you take a look at my Twitch app? I need to know if you can open any of my twitch link and wind up to Twitch channel
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:39
@EpicTriffid here you go, I just "forked" it and saved it to mine, so then I can show you. https://codepen.io/AndroidNinjaX/pen/webpvO?editors=1010
EpicTriffid
@EpicTriffid
Jul 18 2017 08:39
@AndroidNinjaX Oh you god
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:40
@GeorgeII ya give me a sec.
GeorgeII
@GeorgeII
Jul 18 2017 08:40
@heroiczero yeah that's it. I also can open these links for my own but can't open them through me app
llcc9091
@llcc9091
Jul 18 2017 08:40
what can I do ?
I don't know how to do?
EpicTriffid
@EpicTriffid
Jul 18 2017 08:42
@AndroidNinjaX Im so confused now. Why does the x still work even after I've removed the event listener that says when the x is clicked, do this?
@AndroidNinjaX No, i understand
I just copied it didn't i, so its in two places
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:45
@EpicTriffid lol its ok. Ya you are basically saying when i click "random" first close all the search stuff, then open the random stuff.
@EpicTriffid btw your solution of doing "var randbut = $(".randbut");" is awesome, but also its a pain to look through trying to find what exactly a certain line is referencing. Well at least at first, just cause iv never seen that.
EpicTriffid
@EpicTriffid
Jul 18 2017 08:48
@AndroidNinjaX Thankyou :) Im just lazy :P
CamperBot
@camperbot
Jul 18 2017 08:48
epictriffid sends brownie points to @androidninjax :sparkles: :thumbsup: :sparkles:
:warning: epictriffid already gave androidninjax points
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:48
@GeorgeII Im assuming you are just getting the "Blocked" error?
heroiczero
@heroiczero
Jul 18 2017 08:49
Well Good Night Everyone. Getting late :wave:
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:49
@EpicTriffid Its cool. Like I said its nice short hand, but also it creates that issue a little, unless you document well.
GeorgeII
@GeorgeII
Jul 18 2017 08:50
@AndroidNinjaX perhaps. How can I avoid this error?
Ashik Ameer
@ashki98
Jul 18 2017 08:52
I was trying to build a Random Quote Machine.But there seems to be something wrong in the code. The quote doesn't appear or load. Please help me out.
https://codepen.io/ashki98/pen/vZwWMd?editors=1111
P.S I just started working so didnt work on the styling part yet.
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:52
@GeorgeII what I did was get the link to the profile from the API. Here is mine. https://codepen.io/AndroidNinjaX/pen/pwVKqx
GeorgeII
@GeorgeII
Jul 18 2017 08:52
FreeCodeCamp example also catches the same error
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:54
@GeorgeII So I set the link to the profile like this "var profileURL = data.stream.channel.url;" which that comes from the API. Then I added it with this "<a id='click' target='_Blank' href='" + profileURL + "'>"
GeorgeII
@GeorgeII
Jul 18 2017 08:54
@AndroidNinjaX but ... you have the same error
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:55
@GeorgeII I do?
GeorgeII
@GeorgeII
Jul 18 2017 08:55
can't open any channel through your app
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:56
@GeorgeII are you behind a VPN?
GeorgeII
@GeorgeII
Jul 18 2017 08:56
No xD
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:56
@GeorgeII I know when I am streaming that does cause issues every now and then
@GeorgeII This the error you are getting? "You have been blocked from using Twitch. Please visit the Support Center for more information on why you may have been banned."
GeorgeII
@GeorgeII
Jul 18 2017 08:57
@AndroidNinjaX No no no
I call it 'error' by myself
when I click on any twitch channel the clear link opens
just clear white tab
TJ Hardin
@AndroidNinjaX
Jul 18 2017 08:59
@GeorgeII oh haha, well that's "blocked" is what happens when you are behind a VPN sometimes. But yes I also get the "blank white screen" even on mine...... was working the other day.
GeorgeII
@GeorgeII
Jul 18 2017 09:02
@AndroidNinjaX that's strange enough. Because I can open a channel if I write address by my hands
So, I don't have to afraid of it?
TJ Hardin
@AndroidNinjaX
Jul 18 2017 09:03
@GeorgeII ya Im testing that out. I think im getting the same. Soryrr its taking me so long, im on a really slow computer.
GeorgeII
@GeorgeII
Jul 18 2017 09:07
@heroiczero @AndroidNinjaX ok ty anyway
CamperBot
@camperbot
Jul 18 2017 09:07
georgeii sends brownie points to @heroiczero and @androidninjax :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @androidninjax |http://www.freecodecamp.com/androidninjax
:star2: 1503 | @heroiczero |http://www.freecodecamp.com/heroiczero
TJ Hardin
@AndroidNinjaX
Jul 18 2017 09:11
@GeorgeII Ya I dont think its you. It literally just happened on my own stream. I loaded it up from my bookmark and it was fine, but click it on my app and it dosnt work.... No clue there honestly
@GeorgeII wish I could be of better help. I bet its something to do with codepen and twitch. I know that codepen has some issues on some sites. Ill have to test mine out again when I get to me other computer
Ahmad Abdolsaheb
@ahmadabdolsaheb
Jul 18 2017 09:20
@ahmadabdolsaheb
I have a question about git push :)
anyone would like to h elp
Ashik Ameer
@ashki98
Jul 18 2017 09:51
Any Game of Thrones fans out there?
Any suggestions?
Stephen James
@sjames1958gm
Jul 18 2017 10:10
@ashki98 Nice.
The background cuts off the bottom of the throne, is there a way to get more of the throne in the background?
Maybe the text larger to be closer to the size of the quote marks.
Momozor
@momozor
Jul 18 2017 10:14
@ahmadabdolsaheb Don't ask to ask, just ask.
I also have a question, is it a good idea to use "use strict" as in using ecmascript 2015+?
Stephen James
@sjames1958gm
Jul 18 2017 10:16
@faraco IMO, yes.
Momozor
@momozor
Jul 18 2017 10:18
what is the major disadvantage for newer projects? I like the class syntactic sugars it has, but also want to use existing libraries including JQuery, Lodash and even bootstrap.
Stephen James
@sjames1958gm
Jul 18 2017 10:18
@faraco The recommendation is to use function scoped use strict so as to break things when combined with other scripts.
Not sure why use strict would prevent you from using those libraries
Momozor
@momozor
Jul 18 2017 10:20
@sjames1958gm I heard that "use strict" will in some way break compatibilities with legacy code (which I assume for those big libraries that has been built over the years).
but the function scope recommendation actually make sense.
Stephen James
@sjames1958gm
Jul 18 2017 10:21
@faraco If you have code in an IIFE and you do the use strict inside the function then it should have minimal impact with using those libraries
Momozor
@momozor
Jul 18 2017 10:22
Thanks, I should no worry more than I supposed to then. :) @sjames1958gm
CamperBot
@camperbot
Jul 18 2017 10:22
faraco sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8095 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 18 2017 10:22
@faraco Worry only as much as needed and no more? :)
Momozor
@momozor
Jul 18 2017 10:24
Beyond that, I'll get crazy and and burn all of my servers right away.
Stephen James
@sjames1958gm
Jul 18 2017 10:27
@faraco NOoooooo
Ahmad Abdolsaheb
@ahmadabdolsaheb
Jul 18 2017 10:40
@faraco thanks for the tip :)
CamperBot
@camperbot
Jul 18 2017 10:40
ahmadabdolsaheb sends brownie points to @faraco :sparkles: :thumbsup: :sparkles:
:cookie: 370 | @faraco |http://www.freecodecamp.com/faraco
Tejas B N
@tejasbanga
Jul 18 2017 12:18
var arr1=arr;
var k=0;
var temp=0;
while(k>=0 && k<4)
{
for(var i=0;i<arr1.length;i++)
{
for(var j=0;j<arr1.length-1;j++)
{
if(arr1[k][j]<arr1[k][j+1])
{
temp=arr1[k][j];
arr1[k][j]=arr1[k][j+1];
arr1[k][j+1]=temp;
}
k++;
}
}
}
is there anything wrong with my code
it says arr1[k] is undefinded
madhuri soni
@sonimadhuri
Jul 18 2017 12:29
@tejasbanga i guess this line var arr1=arr; isnt right
Uler
@Uler
Jul 18 2017 12:44
<button class="btn btn-block">Like</button>
what is wrong here?
May Kittens Devour Your Soul
@diomed
Jul 18 2017 12:46
nothing
Uler
@Uler
Jul 18 2017 12:47
why it is saying that something is wrong D:
nvm
refreshed the page now it works fine
Stephen James
@sjames1958gm
Jul 18 2017 13:31
@tejasbanga What is the input to that code?
Why loop with i if you don't use i?
Eric Weiss
@eweiss17
Jul 18 2017 13:52
yo guys i need some help on understanding people's need to tell others that they are currently drinking coffee
damarnadh
@damarnadh
Jul 18 2017 13:57
how to convert a given string to array in java script
korzo
@korzo
Jul 18 2017 13:58
@damarnadh 'string'.split('')
Sanket Chaudhari
@sanket143
Jul 18 2017 14:00
how to get page id of wikipedia page
damarnadh
@damarnadh
Jul 18 2017 14:01

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

reverseString("hello");
@korzo
korzo
@korzo
Jul 18 2017 14:02
@damarnadh You have to assign result to variable.
Stephen James
@sjames1958gm
Jul 18 2017 14:02
@damarnadh That will split between words, you need empty string to split between chars
May Kittens Devour Your Soul
@diomed
Jul 18 2017 14:05
@eweiss17 can't help u there, I am vegan.
Eric Weiss
@eweiss17
Jul 18 2017 14:06
i don't think coffee has any animal products in it..... if you don't add any dairy
May Kittens Devour Your Soul
@diomed
Jul 18 2017 14:07
I too have no sense of humor
Ayush Mahajan
@ay2306
Jul 18 2017 14:11
Please help me. When I remove p elements then image is show else it isnt. What should I do?
<style>
html{ 
    background: url("loading_image.png") no-repeat center center fixed; 
    -webkit-background-size: contain;
    -moz-background-size: contain;
    -o-background-size: contain;
    background-size: contain;
}

#footer {
    position: fixed;
    bottom: 0;
    width: 100%;
}
</style>
</head>


<body>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>
<p>sadfljasdfklasdjfklasjfkadsjkfjaskdfjkasjfkadsfjasddddd1</p>

</body>
May Kittens Devour Your Soul
@diomed
Jul 18 2017 14:13
and what do u think is supposed to be shown?
since p elements are only thing in your page
Ayush Mahajan
@ay2306
Jul 18 2017 14:15
@diomed background-image
Stephen James
@sjames1958gm
Jul 18 2017 14:41
@ay2306 When I put this in jsbin - it showed the background.
Ayush Mahajan
@ay2306
Jul 18 2017 14:45
@sjames1958gm thanks bro. But it has been solved
CamperBot
@camperbot
Jul 18 2017 14:45
ay2306 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8097 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 18 2017 14:45
@ay2306 :+1:
What was the issue?
Ayush Mahajan
@ay2306
Jul 18 2017 14:46
My background-image was getting hidden behind elements
image.png
damarnadh
@damarnadh
Jul 18 2017 14:49

function factorialize(num) {
  var i;
  for(i=0;i<=num;i++)
    {
      num=num*(num-1);

    }
  return num;
}

factorialize(5);
Stephen James
@sjames1958gm
Jul 18 2017 14:49
@damarnadh num is growing at a fast rate and i will never catch it.
damarnadh
@damarnadh
Jul 18 2017 15:09
@sjames1958gm

function factorialize(num) {
  var i;var a=1;
  for(i=1;i<=num;i++){

   a=a*i;   


  return a;
  }
}

factorialize(5);
Stephen James
@sjames1958gm
Jul 18 2017 15:09
@damarnadh You are returning inside the loop, so it will only 'loop' once
Darren
@DarrenfJ
Jul 18 2017 15:13
morning fellow fCC coding warriors
madhuri soni
@sonimadhuri
Jul 18 2017 15:14
hello @DarrenfJ
Darren
@DarrenfJ
Jul 18 2017 15:19
@sonimadhuri hey buddy :D
@damarnadh the trick that @sjames1958gm is pointing to I think is in the definition of how factorializing works
Stephen James
@sjames1958gm
Jul 18 2017 15:25
@DarrenfJ :wave:
bononoi
@bononoi
Jul 18 2017 15:25
good day everyone! I'm new here
damarnadh
@damarnadh
Jul 18 2017 15:26
@DarrenfJ

function palindrome(str) {
  // Good luck!
  var a=[50];a=str.split("");
  var b=[50];b=a.reverse("");
  var c=b.join("");
  if (c==str)
    {
  return true;
    }
  else{
    return "not a palindrome";
  }
}



palindrome("eye");
palindrome("_eye") should return true.
palindrome("race car") should return true.
palindrome("not a palindrome") should return false.
palindrome("A man, a plan, a canal. Panama") should return true.
palindrome("never odd or even") should return true.
palindrome("nope") should return false.
palindrome("almostomla") should return false.
palindrome("My age is 0, 0 si ega ym.") should return true.
palindrome("1 eye for of 1 eye.") should return false.
palindrome("00 (: /-\ :) 0-0") should return true.
palindrome("five|\
/|four") should return false.
madhuri soni
@sonimadhuri
Jul 18 2017 15:28
@damarnadh why do you need this var a=[50];
damarnadh
@damarnadh
Jul 18 2017 15:29
@sonimadhuri no need of it,anything else
madhuri soni
@sonimadhuri
Jul 18 2017 15:30
Note
You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything lower case in order to check for palindromes.
@damarnadh
Darren
@DarrenfJ
Jul 18 2017 15:30
@sjames1958gm hey man :D
@bononoi welcome!
bononoi
@bononoi
Jul 18 2017 15:31
@sonimadhuri you should make a line that deletes anything except for letters,
@sonimadhuri you should make a line that deletes anything except for letters,
@damarnadh you should make a line that deletes anything except for letters,
madhuri soni
@sonimadhuri
Jul 18 2017 15:31
@bononoi yes buddy but you are tagging the wrong person
bononoi
@bononoi
Jul 18 2017 15:32
yes, lol, i repeat copy paste over and over lol, sorry
Darren
@DarrenfJ
Jul 18 2017 15:32
@damarnadh yah.. they got it covered.. just need to remove all commas, spaces etc.
bononoi
@bononoi
Jul 18 2017 15:32
@DarrenfJ thanks man
CamperBot
@camperbot
Jul 18 2017 15:32
bononoi sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1914 | @darrenfj |http://www.freecodecamp.com/darrenfj
Stephen James
@sjames1958gm
Jul 18 2017 15:33
@DarrenfJ FYI, reverse reverses the array in place, so a.reverse() changes array a no need for another variable.
damarnadh
@damarnadh
Jul 18 2017 15:34
@DarrenfJ @bononoi @sonimadhuri but how to create a line that deletes anything except letters
Darren
@DarrenfJ
Jul 18 2017 15:34
@damarnadh regex is what's usually used
the horror

and I think @sjames1958gm line is meant for you too @damarnadh

@DarrenfJ FYI, reverse reverses the array in place, so a.reverse() changes array a no need for another variable.

madhuri soni
@sonimadhuri
Jul 18 2017 15:36
@damarnadh check out the first link under the helpful links in the challenge
Darren
@DarrenfJ
Jul 18 2017 15:36
@damarnadh the first part of this is free and gives a hint at what regex can do; https://www.codeschool.com/courses/breaking-the-ice-with-regular-expressions
@damarnadh some people use this to test their regex; https://regex101.com/
@damarnadh this one's pretty good too: http://regexr.com/
Stephen James
@sjames1958gm
Jul 18 2017 15:38
@DarrenfJ :+1: thanks - wasn't sure who was doing palindrome
CamperBot
@camperbot
Jul 18 2017 15:38
sjames1958gm sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1915 | @darrenfj |http://www.freecodecamp.com/darrenfj
bononoi
@bononoi
Jul 18 2017 15:39
@sonimadhuri @DarrenfJ @sjames1958gm guys, does anyone of you know how to make JSON work in codepen?
madhuri soni
@sonimadhuri
Jul 18 2017 15:39
@DarrenfJ thankyou for the links
CamperBot
@camperbot
Jul 18 2017 15:39
sonimadhuri sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1916 | @darrenfj |http://www.freecodecamp.com/darrenfj
Stephen James
@sjames1958gm
Jul 18 2017 15:39
@bononoi What do you mean by make JSON work? Access an API that returns JSON?
Darren
@DarrenfJ
Jul 18 2017 15:40
@damarnadh and the original incarnation of fCC had this as a link in the regex 'exercises': https://regexone.com/
bononoi
@bononoi
Jul 18 2017 15:41
@sjames1958gm yes, I test it on my computer and it works fine, but when i transfer the code to codepen no results given
Darren
@DarrenfJ
Jul 18 2017 15:41
gotta run and do some testing code on!
and thanks @sjames1958gm for being the helper... brownies for all the ones you missed so far ;0
CamperBot
@camperbot
Jul 18 2017 15:41
darrenfj sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8098 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 18 2017 15:41
@bononoi Are you trying to access a http:// URL - codepen is https:// and the browser won't allow access to http:// from https://
@DarrenfJ :+1:
@bononoi Check your devtools console for errors
Darren
@DarrenfJ
Jul 18 2017 15:42
sweet jeebus you guys are in good hands with @sjames1958gm 8098 brownies... you are a machine!! :D
bononoi
@bononoi
Jul 18 2017 15:46
@sjames1958gm yes, i use https://crossorigin.me to https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?lat=24&lon=47&appid= and I also add '&callback' to the end but to no avail,
Stephen James
@sjames1958gm
Jul 18 2017 15:50
@bononoi FCC has a weather URL if you don't want to fight these issues.
https://fcc-weather-api.glitch.me/
My page doesn't work anymore, haven't updated since change to https
bononoi
@bononoi
Jul 18 2017 15:53
@sjames1958gm wow, you're amazing man, thanks!
CamperBot
@camperbot
Jul 18 2017 15:53
bononoi sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8099 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 18 2017 15:54
@bononoi :+1:
Eric Weiss
@eweiss17
Jul 18 2017 17:02
@diomed do you enjoy biscuits with your :coffee:?
rushendra
@rushendrarushi
Jul 18 2017 17:03

// Setup
var testObj = {
"an entree": "hamburger",
"my side": "veggies",
"the drink": "water"
};

// Only change code below this line

testObj["an entree"];
testObj["the drink"];

whats wrong with this code
?
Stephen James
@sjames1958gm
Jul 18 2017 17:03
@rushendrarushi Aren't you supposed to assign the values from the objects to some variables?
rushendra
@rushendrarushi
Jul 18 2017 17:04
you are saying me to give that object a variable?
Stephen James
@sjames1958gm
Jul 18 2017 17:05
@rushendrarushi I believe the instructions give you two variables names to assign
rushendra
@rushendrarushi
Jul 18 2017 17:05
@sjames1958gm var entreeval = testObj["an entree"];
var drinkval =testObj["the drink"];
like this?
Stephen James
@sjames1958gm
Jul 18 2017 17:05
@rushendrarushi Yes, assuming those are the correct names
rushendra
@rushendrarushi
Jul 18 2017 17:05
but that is not reading those values
it's showing var drinkval =testObj["the drink"];
Stephen James
@sjames1958gm
Jul 18 2017 17:06
@rushendrarushi Remember case counts in variable names
entreeValue and drinkValue
rushendra
@rushendrarushi
Jul 18 2017 17:06
doesn't work
why are they checking each and every element man
Stephen James
@sjames1958gm
Jul 18 2017 17:07
Like this?
var entreeValue = testObj["an entree"];
rushendra
@rushendrarushi
Jul 18 2017 17:07
i didn't write the full code
i just wrote var entreeVal = testObj["an entree"]
that's the error :worried:
@sjames1958gm thanks man
CamperBot
@camperbot
Jul 18 2017 17:08
rushendrarushi sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8100 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 18 2017 17:08
@rushendrarushi :+1:
rushendra
@rushendrarushi
Jul 18 2017 17:08
what do these brownie points do?
Daniel Narilton
@spaganger
Jul 18 2017 17:11

I'm trying to solve the Seek and Destroy algorithm challenge but I can't seem to pass an array as a function parameter yet. Anyone?

function destroyer(arr, firstValue, secondValue) {
var newArray = [];
for (var i = 0; i < arr.length; i++) {
if (arr[i] === firstValue || arr[i] === secondValue) {
arr[i] = 0;
}
}
for (var j = 0; j < arr.length; j++) {
if (arr[j] != 0) {
newArray.push(arr[j]);
}
}
return newArray;
}

Albert Cardona II
@daddycardona
Jul 18 2017 17:13
what up everyone how is the crew :)
I think I jsut finished that one hold on @Vigariuoluvi
Stephen James
@sjames1958gm
Jul 18 2017 17:15
@rushendrarushi Nothing really.
Albert Cardona II
@daddycardona
Jul 18 2017 17:15
actually I am on that one
rushendra
@rushendrarushi
Jul 18 2017 17:15
lol
Stephen James
@sjames1958gm
Jul 18 2017 17:15
@Vigariuoluvi You are supposed to use the arguments object to access the arguments passed in
Albert Cardona II
@daddycardona
Jul 18 2017 17:16
I did that and i just made a new array with everything in it
so annoying
I had a script then deleted it lol
madhuri soni
@sonimadhuri
Jul 18 2017 17:16
@Vigariuoluvi okay wasnt there only one parameter to the desroyer function.you arent supposed to change that
Stephen James
@sjames1958gm
Jul 18 2017 17:17
@Vigariuoluvi the link provided shows how to convert arguments to a true array, which is easier to
work with (for example you can use indexOf on and array but no on arguments object)
Albert Cardona II
@daddycardona
Jul 18 2017 17:20
you suppose to have it like
var newArr= arr.slice.call(argurments); // orsomething like this
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:22
@daddycardona since arr argument is defined in function body, the var newArr= arr.slice.call(argurments); part is entirely pointless
Albert Cardona II
@daddycardona
Jul 18 2017 17:23
Oh I was just searching it and that came up and worked lol
i think it might be on the hints too I just have not cheated yet.
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:23
haha
okay
Albert Cardona II
@daddycardona
Jul 18 2017 17:24
unfortunately I am still trying to understand arguments object somewhat confusing
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:24
right...
so don't use .call when you don't understand what it's doing.
rushendra
@rushendrarushi
Jul 18 2017 17:24

var testObj = {
12: "Namath",
16: "Montana",
19: "Unitas"
};

// Only change code below this line;

var playerNumber = testObj[16]; // Change this Line
var player = testObj[16]; // Change this Line

Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:24
go the typical programming fanatic way
rushendra
@rushendrarushi
Jul 18 2017 17:24
correct me please
player variable should return montana and player number should return the property
no one?
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:27
var playerNumber = 16; // Change this Line
var player = testObj[playerNumber]; // Change this Line
@rushendrarushi
May Kittens Devour Your Soul
@diomed
Jul 18 2017 17:28
@eweiss17 yes, I very much do. I like dipping :yum:
rushendra
@rushendrarushi
Jul 18 2017 17:28
i should use a bracket notation on playernumber too @SweetCodingInc
Aita Kane
@aita-kane
Jul 18 2017 17:29
hello can js resize height and width div on scroll?
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:29
@rushendrarushi whats the name of this challenge?
@aita-kane Yes
May Kittens Devour Your Soul
@diomed
Jul 18 2017 17:29
@SweetCodingInc everything is jade :dizzy_face:
rushendra
@rushendrarushi
Jul 18 2017 17:30
challenge 200 accessing object properties with variables
Aita Kane
@aita-kane
Jul 18 2017 17:31
@SweetCodingInc ohh like in the website of good organic only when the video div resize on scroll to let the content under goes up
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:31
@rushendrarushi it says You should be using the variable playerNumber in your bracket notation
Bartosz Cechmann
@cechu11
Jul 18 2017 17:32
Hey there! I'm on my quotes machine project and here's link, tell me what do you think!
https://codepen.io/cechu11/full/YQbMvJ/
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:32
@aita-kane Yes... that's possible...
Albert Cardona II
@daddycardona
Jul 18 2017 17:32
I thought it was calling all the arguments from the array being passed @SweetCodingInc
Aita Kane
@aita-kane
Jul 18 2017 17:33
@cechu11 clean the design ... it's nice
@SweetCodingInc do you have a snippet of that js
Sweet Coding :)
@SweetCodingInc
Jul 18 2017 17:34
@aita-kane Not right now.. sorry...
but in a nutshell, you need to use onwheel event and in the callback modify css of the divs you want to change size and position of
Cameron Sumpter
@csumpter
Jul 18 2017 17:35
Hey all! Anyone know if there is a mini test suite for the fcc calc project? I have been manually testing it against results from using the google and apple calc. It all seems good, but was just curious
Eric Weiss
@eweiss17
Jul 18 2017 17:37
try floats. i know that seems to be a common problem
May Kittens Devour Your Soul
@diomed
Jul 18 2017 17:38
I tried floats once. I drowned
Cameron Sumpter
@csumpter
Jul 18 2017 17:38
@diomed Get a longer and bigger float ;-)
@eweiss17 good call! Thank you!
CamperBot
@camperbot
Jul 18 2017 17:38
csumpter sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 541 | @eweiss17 |http://www.freecodecamp.com/eweiss17
May Kittens Devour Your Soul
@diomed
Jul 18 2017 17:39
and they say floats are for goats....
BWAAAAAAAAAAAAAAAAAAAAAAH
Eric Weiss
@eweiss17
Jul 18 2017 17:40
name 5 people that say that.... nobody says that
Aita Kane
@aita-kane
Jul 18 2017 17:41
@SweetCodingInc ok i'll try that can i after show you the code cause I'm beginner in coding
Joshua Arnett
@josha5
Jul 18 2017 17:47
Can anyone tell me why this code isn't working? I'm trying to return the element that is unique and only appears once in the array. ----------------------function diffArray(arr1, arr2) {
return arr1.concat(arr2).filter(function(elem, index, array) {
return array.indexOf(elem) != array.lastIndexOf(elem);
});
}
Stephen James
@sjames1958gm
Jul 18 2017 17:54
@josha5 If the two indexes don't match, doesn't that mean there is more than one entry?
You are telling filter to keep those values, by returning true
Joshua Arnett
@josha5
Jul 18 2017 17:59
Meh im so confused
Vishal G.
@vishalgautamm
Jul 18 2017 17:59
whats the best way to sort an object
var meetingTimes = [
  {start: 9, end:10 },
  {start: 10.5, end:11 },
  {start: 2, end: 4},
  {start: 1, end: 3},
  {start: 10.5, end:12 },
  ]

var sortedMeeting = meetingTimes.sort(function(a, b) {
  return b.start - a.start
})

console.log(sortedMeeting)

/*
[ { start: 10.5, end: 11 },
  { start: 10.5, end: 12 },
  { start: 9, end: 10 },
  { start: 2, end: 4 },
  { start: 1, end: 3 } ]
*/

// but actually wanted

/*
[ { start: 9, end: 10 },
  { start: 10.5, end: 11},
  { start: 10.5, end: 12},
  { start: 1, end: 3 },
  { start: 2, end: 4} ]
*/
Joshua Arnett
@josha5
Jul 18 2017 18:00
ohh I get what you're saying
@sjames1958gm comparing the index of array(elem) == last index of array(elem) right?
Stephen James
@sjames1958gm
Jul 18 2017 18:02
@josha5 Yes, you want to return true when they are the same
Joshua Arnett
@josha5
Jul 18 2017 18:02
Wow you gave me the mental jump start I needed thank you haha!
Stephen James
@sjames1958gm
Jul 18 2017 18:03
@vishalgautamm What is the ordering criteria for what you actually wanted?
Vishal G.
@vishalgautamm
Jul 18 2017 18:04
@sjames1958gm by ascending order of starting time
Stephen James
@sjames1958gm
Jul 18 2017 18:04
@vishalgautamm If you return a.start - b.start that would do it, but 1 and 2 will be before 9
@vishalgautamm How do you know that 1 goes after 10.5 ?
Albert Cardona II
@daddycardona
Jul 18 2017 18:06
@SweetCodingInc when I use var ss = arr.slice.call(arguments); vs `var ss = arr.slice(arguments);' like I said it calls all the arguments being passed not just the array
@vishalgautamm maybe you can use military time and have something like 13 for 1300 so that you dont have to adjust it to pm or am
Stephen James
@sjames1958gm
Jul 18 2017 18:09
arr.slice.call(arguments) this is taking the function from arr (Array.slice) and using it on arguments, which results in all the arguments converted to an array.
Think of it as arguments.slice()
arr.slice(arguments) is calling slice on arr with an invalid value, so you get all of arr
Vishal G.
@vishalgautamm
Jul 18 2017 18:10
@sjames1958gm changing to military time worked :)
Albert Cardona II
@daddycardona
Jul 18 2017 18:10
oh okay shit im slow lol
Vishal G.
@vishalgautamm
Jul 18 2017 18:10
thank you @sjames1958gm
CamperBot
@camperbot
Jul 18 2017 18:10
vishalgautamm sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8101 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 18 2017 18:10
@vishalgautamm :+1:
Talkingbaby
@Talkingbaby
Jul 18 2017 18:12
anyone having issues with the submit button in the es6 lessons?
I guess it's the run tests button
Albert Cardona II
@daddycardona
Jul 18 2017 18:13
well that is what im talking about when I do it arr.slice.call way i get [1,2,3],2,3 which is the result I thought I wanted to get. but acactually I just want to seprate the , 2 ,3 and get those numbers so I can use filter
everything outside the ]
yeah this using argurments is very confusing to me I am stuck I hate not understanding
Eric Weiss
@eweiss17
Jul 18 2017 18:16
the beta has bugs @Talkingbaby
Stephen James
@sjames1958gm
Jul 18 2017 18:23
@daddycardona arguments is just an object, that has all the values passed to the function
The keys are like array indexes "0" "1" "2", etc. It is called array-like, because of these keys and that it has a .length property
If you just want 2, 3 then pass a value to slice to slice past the first value
var ss = arr.slice.call(arguments, 1); The values after arguments here become the parameters to the slice function
Albert Cardona II
@daddycardona
Jul 18 2017 18:24
Oh okay let me try that out ;)
thanks so much @sjames1958gm I was trying to figure that out and feel stupid. I also forgot slice not split dam to much knowledge at one time brain overload lol
CamperBot
@camperbot
Jul 18 2017 18:26
daddycardona sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8102 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 18 2017 18:27
@daddycardona It is a lot all at once. :bomb:
Albert Cardona II
@daddycardona
Jul 18 2017 18:27
yeah you see why did you use call
I guess I don't understand why you can't use slice(arguments,1) and slice.call(argurments,1)
Stephen James
@sjames1958gm
Jul 18 2017 18:45
@daddycardona because .call is stealing the function from Array. without the call you are just invoking slice on an array with invalid parameters
Josie
@Josie-N
Jul 18 2017 19:02
any UI & dev freelancers on here that can give me some advice on business related stuff? cookies for everyone 🍪
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:04
@Josie-N just practice, do side projects and the business will come
Josie
@Josie-N
Jul 18 2017 19:04
@ahmedtarek2134 right. do you speak from experience?
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:05
I can't speak about making money, most freelancing website require credit cards and I am still 16 so I can't but what I can say is that side projects will get business
I made a library called butns and it got somewhat a bit popular
now I get weekly job offer
offers
but still I can't accept any since school and stuff
Josie
@Josie-N
Jul 18 2017 19:06
good for you @ahmedtarek2134
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:06
also side projects will improve you alot
Josie
@Josie-N
Jul 18 2017 19:07
thank @ahmedtarek2134 will do
CamperBot
@camperbot
Jul 18 2017 19:07
josie-n sends brownie points to @ahmedtarek2134 :sparkles: :thumbsup: :sparkles:
:cookie: 574 | @ahmedtarek2134 |http://www.freecodecamp.com/ahmedtarek2134
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:07
@Josie-N np
also if you could add libraries and frameworks under your belt, companies will be delighted to hire you
for example if you learn angular, vue and react
that will give you a huge advantage
Eric Weiss
@eweiss17
Jul 18 2017 19:09
@ahmedtarek2134 butns is just a stylesheet?
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:09
@eweiss17 its a css only library yes
Josie
@Josie-N
Jul 18 2017 19:10
@ahmedtarek2134 my questions are more business management related atm
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:11
making and handling side projects will improve your business management
also contributing on open source projects
something I haven't done yet :smile: :yum:
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:11
I'm working on the tic-tac-toe game and am having some trouble
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:12
@nsuchy what's up?
So when I 'win' the alert doesn't popup like it should
The computer can't even move yet
So I can literally select any squares and always win
Eric Weiss
@eweiss17
Jul 18 2017 19:12
business management? like you want to hire developers?
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:12
But the computer isn't detecting my win
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:12
@nsuchy I noticed a lot of errors in your javascript buddy
just looking at it the first second
its not elseif
its else if
there has to be a space
Eric Weiss
@eweiss17
Jul 18 2017 19:13
I don't care for the butns style but I think it's the way you set up your site showcasing it..... looks super professional
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:13
oh
:joy:
used to python with elif
opps
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:14
:smile:
@eweiss17 tbh I don't really like the site design
I am awful at designing
Eric Weiss
@eweiss17
Jul 18 2017 19:15
the center logo in purple following my cursor is creepy :/
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:15
I just wanna collaborate with a good designer, we would do wonders
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:15
@ahmedtarek2134 works as expected now
thank you @ahmedtarek2134
CamperBot
@camperbot
Jul 18 2017 19:15
nsuchy sends brownie points to @ahmedtarek2134 :sparkles: :thumbsup: :sparkles:
:cookie: 575 | @ahmedtarek2134 |http://www.freecodecamp.com/ahmedtarek2134
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:15
@nsuchy np man :+1:
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:15
now I just gotta write the computerMove function
this is gonna be fun :joy:
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:16
@eweiss17 I can design anything in css but the imagination to design is not there
@nsuchy good luck
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:16
I wanna be finished by 6pm
and it's 3:16pm now
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:16
@eweiss17 I literally designed my exact macbook in full css with like the exact correct keyboard keys position
@nsuchy you got more than enough, just focus
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:17
im just not sure where to start
with the algo
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:17
@nsuchy I have never done this challenge so I don't know :smile:
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:18
that's the only frustration
I'll figure it out
writing the code isn't the issue
(assuming i remember spaces)
it's just figuring out the algo
Eric Weiss
@eweiss17
Jul 18 2017 19:19
@ahmedtarek2134 i only have one question ..... why
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:19
@eweiss17 hmm...I often ask myself the same but I guess I can use this model later in a project or something
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:19
Nice
Eric Weiss
@eweiss17
Jul 18 2017 19:20
"to see if I could" - is probably the right answer
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:20
@nsuchy you can do it bro, I often have no idea how to achieve something but then it turns out to be easy
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:20
Not mobile responsive, but nice
Nathaniel Suchy
@nsuchy
Jul 18 2017 19:20
@ahmedtarek2134 It's just staying focused and motivated
BRB editing my AV filters need to block facebook
:joy:
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:20
@BrewCoffeeSplash it's just for fun, not really made to be fully working and responsive
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:21
Now, make it so i can click on em lol
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 19:21
@BrewCoffeeSplash I am shouting at my backend atm :smile:
probably gonna release this project tonight, its somewhat finished
I'm just taking a break for a while here
Joshua Friedman
@jsf2008
Jul 18 2017 19:43
can anyone help me with some quick CSS positioning?
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:43
sure
my footer doesn't seem to want to position at the bottom of my screen when in full screen mode
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:46
@jsf2008 try margin and padding to 0px for the footer
@jsf2008 lemme check some stuff
Joshua Friedman
@jsf2008
Jul 18 2017 19:48
Just tried changing it. That did not work
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:49
@jsf2008 try position: absolute; instead
Joshua Friedman
@jsf2008
Jul 18 2017 19:50
absolute did it! Thank you.
https://codepen.io/jsf2008/full/rwgEZa/ This is my other footer. Absolute will not work here
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:51
or make it a container-fluid as well
@jsf2008 it's cuz you have certain other elements forced to the bottom as well as the footer
Joshua Friedman
@jsf2008
Jul 18 2017 19:53
so change that to container fluid as well?
I did that, and it didn't do it. I'm just really trying to create a copy pasta for my header and footer for all my projects
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:54
@jsf2008 I put my stuff in container or container-fluid
Gary
@bluefishmarine
Jul 18 2017 19:55
@jsf2008 What are you trying to do? push your footer to the bottom of the page?
Joshua Friedman
@jsf2008
Jul 18 2017 19:55
yes
Gary
@bluefishmarine
Jul 18 2017 19:56
@jsf2008 oh dear. what happened? its way up there now
Joshua Friedman
@jsf2008
Jul 18 2017 19:56
yes
I have no clue
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:57
Gary
@bluefishmarine
Jul 18 2017 19:57
maybe put the footer outside all those divs?
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:57
a good example of a footer, with explanations
@bluefishmarine he has other elements competing for the bottom of the page
in his css
so they overlap
Joshua Friedman
@jsf2008
Jul 18 2017 19:58
if you change the position to relative it just sticks to the bottom of the block div
Gary
@bluefishmarine
Jul 18 2017 19:58
oh nevermind, all those divs are inside the footer
Joshua Friedman
@jsf2008
Jul 18 2017 19:58
yep
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 19:58
@jsf2008 your .center also has bottom: 0
Joshua Friedman
@jsf2008
Jul 18 2017 19:58
it's semi fixed now, but I'm still not 1--% pleased
100%*
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 20:01
@jsf2008 footer on the weather app is not on the bottom for me
Joshua Friedman
@jsf2008
Jul 18 2017 20:02
No? it is for me now
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 20:02
@jsf2008 only on editor view oddly
full page view is good
the code looks good as well
Joshua Friedman
@jsf2008
Jul 18 2017 20:03
Thank you! I spent 4 days working on this one
It's just understanding how to create copy and paste headers and footers now
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 20:04
@jsf2008 learn how to do it all without copy-pasting code
Joshua Friedman
@jsf2008
Jul 18 2017 20:05
That's what I'm trying to do. But I mean my header and footer I plan on using the same every time
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 20:06
even when working with clients and such?
Guess it works as long as you know how to modify it
Joshua Friedman
@jsf2008
Jul 18 2017 20:10
I haven't gotten that far yet! But I hope
Albert Cardona II
@daddycardona
Jul 18 2017 20:19
function destroyer(arr) {
  // Remove all the values
  var ss = arr.slice.call(arguments,1);
  var fs = arr.slice(arguments);
  var ok =[];
    for(var i in fs){
      for(var x in ss){
        if(fs[i] !== ss[x]){
         ok.push(fs[i]);
         //console.log( i +" " +x);
        }
      }
    }

  return ok;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
I understand why I didi not get the desire results but can someone help me understand why I didn't just get 1's?
confusing to me too LOL
just1witness
@just1witness
Jul 18 2017 21:09

I think I may be in over my head on this... Please check it out. I'm trying to change the div "id" using javascript, if a certain word can be found in the forcast.

https://codepen.io/Just1witness/pen/BZRozr

__mifflin__
@cdrainxv
Jul 18 2017 21:22
@daddycardona: I would suggest throwing your code into http://www.pythontutor.com/javascript.html#mode=edit and seeing for yourself what is happening in your code. As a side note I would suggest using something like includes or even indexOf
Albert Cardona II
@daddycardona
Jul 18 2017 21:24
@just1witness put <div><p id="yourstuff"></p></div> I had this issue before and they said don't change a dive change a paragraph or something else :)
@cdrainxv I am trying all of that right now I broke that code down too
function destroyer(arr) {
  // Remove all the values
  var fs = arr.slice(arguments);
  var ss = arr.slice.call(arguments,1); 
   var dammit = fs.filter(function(value){
     return fs.includes(ss);
   });

  return dammit;
}

destroyer([1, 2, 3, 5, 1, 2, 3],2,3);
// this is what I am doing right now
the word dammit is because I am being confused
just1witness
@just1witness
Jul 18 2017 21:27
@daddycardona Whoa cool! That did something, it was super wonky, but it ran the function correctly. Is there a reason why my css images would look good as a <div>, but get all messed when it's a <p>?
Albert Cardona II
@daddycardona
Jul 18 2017 21:28
Yes p is for paragraph
just1witness
@just1witness
Jul 18 2017 21:28
Is there a better tag to use? To keep the formatting I had for the <div>?
Albert Cardona II
@daddycardona
Jul 18 2017 21:29
what are you trying to do change pictures?
or change information in a paragraph?
@just1witness
you might have to format the <p> element thats all
just1witness
@just1witness
Jul 18 2017 21:33
I made images using css, they each have a different #id, ideally when certain words are found in the forcast, the #id changes to the css image I made. All the images are lined up correctly and look good as of right now, but the function doesn't work. When I nest the #id into a <p> tag in the <div> tag, the formatting gets all messed up, but the javascript formula runs correctly and changes the tag...
I was hoping you wouldn't say that, haha! I spent hours making those images look right. Oh, well, I'm guessing it's the nature of the beast. I just started coding three weeks ago.
@daddycardona
@daddycardona Thank you! :)
CamperBot
@camperbot
Jul 18 2017 21:34
just1witness sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 272 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Jul 18 2017 21:35
you can put it like in a block element
img { display: block; }
you should be able to copy and paste your formats for div to p in css
and you welcome ;)
just1witness
@just1witness
Jul 18 2017 21:37
That's just it, I don't understand why the formatting would go all wonky in the first place. It's tied to the #id, not the div.
so if I change the #id to a <p> why would it mess my formatting up?
have you looked at the pen?
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 18 2017 21:38
@just1witness certain elements have their own built CSS definitions
@just1witness like comparing <h1> to <h3> to a <p> and a <div>
you have to override certain things yourself in the CSS
Nick Cleary
@Hijerboa
Jul 18 2017 21:42
Hey all, I'm having trouble with my wiki viewer (again!) Currently it only updates the links on the buttons the after the first character is typed, and not for any subsequent characters. Any ideas? https://codepen.io/hijerboa/pen/bRzdaQ
Albert Cardona II
@daddycardona
Jul 18 2017 21:45
@cdrainxv that site crashed lol
um what is not happening it works fine in my eyes
@Hijerboa
__mifflin__
@cdrainxv
Jul 18 2017 21:48
@daddycardona: You are using filter incorrectly… should be:
return !ss.includes(value);
Anthony DeSordi
@desordi3
Jul 18 2017 21:49
should i be creating all of my FCC projects on git/github?
Nick Cleary
@Hijerboa
Jul 18 2017 21:49
@daddycardona when you click on the buttons after typing in a search that's multiple characters, does it take you to the correct wikipedia page?
Albert Cardona II
@daddycardona
Jul 18 2017 21:49
oh snap i suck sometimes
@Hijerboa no
Nick Cleary
@Hijerboa
Jul 18 2017 21:50
@daddycardona that's the issue... any idea how to fix it?
@desordi3 maybe... I just use codepen. But if you feel better having version control its not a bad idia
*idea
Albert Cardona II
@daddycardona
Jul 18 2017 21:51
its funny because it shows many great links but too me to chlorine lol
At least you got the right site wikapedia
@Hijerboa
Nick Cleary
@Hijerboa
Jul 18 2017 21:52
@daddycardona i mean... that is a start
it gets the correct link for the first character, but it doesn't update the links as more are typed in
Albert Cardona II
@daddycardona
Jul 18 2017 21:53
@cdrainxv dude you are correct thanks but why would that have not been return ss.includes(value); I don't get it I thought it wanted to filter the stuff that was doubled?
CamperBot
@camperbot
Jul 18 2017 21:53
daddycardona sends brownie points to @cdrainxv :sparkles: :thumbsup: :sparkles:
:star2: 2766 | @cdrainxv |http://www.freecodecamp.com/cdrainxv
Albert Cardona II
@daddycardona
Jul 18 2017 21:54
I did not read all your code yet @Hijerboa but let me see if I can see if there is a problem with the way it does something wierd with the adding of the end of the site
Nick Cleary
@Hijerboa
Jul 18 2017 21:55
@daddycardona alright. thanks mate
CamperBot
@camperbot
Jul 18 2017 21:55
hijerboa sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Jul 18 2017 21:58
I think it haves to do with your splits
Nick Cleary
@Hijerboa
Jul 18 2017 22:00
@daddycardona that would make sense, since im adding on to the end and not deleting it.....
@daddycardona yep! that seems to be the issue. A simple splice() fixed it!
Albert Cardona II
@daddycardona
Jul 18 2017 22:02
did it work ?
Nick Cleary
@Hijerboa
Jul 18 2017 22:04
@daddycardona Yep! thanks mate!
CamperBot
@camperbot
Jul 18 2017 22:04
hijerboa sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:warning: hijerboa already gave daddycardona points
Albert Cardona II
@daddycardona
Jul 18 2017 22:05
That was the only thing that looked wierd to me but I was like dam I found it lol
Nick Cleary
@Hijerboa
Jul 18 2017 22:05
@daddycardona haha
Scott Rhoades
@srhoades
Jul 18 2017 22:09
any thoughts why var playerTurn = 'default'; declared inside my function would return undefined after assigning playerTurn = gameObj.Player;
nevermind :D finally clicked
Vishal G.
@vishalgautamm
Jul 18 2017 23:04
what is the purpose of first parameter in call and apply in JS. For ex:
fn.call(null, a,b,c) or
fn.apply(null, [a,b,c])
Stephen James
@sjames1958gm
Jul 18 2017 23:17
@vishalgautamm That sets the this value for the function
@vishalgautamm The function probably doesn't use the this value if you set it to null.
For example Math.max.apply(null, [1, 2, 3]);
Ahmed Tarek
@ahmedtarek2134
Jul 18 2017 23:22
guys
is github down?
I can't access it from any of my devices
oke its back now
aRtoo
@artoodeeto
Jul 18 2017 23:25
haloo guys. when i put a class form-control on my input tag the button goes under the input tag. any idea?? tried floating it and it worked but kinda ugly though.
Coy Sanders
@coymeetsworld
Jul 18 2017 23:34
for future ref @ahmedtarek2134 https://status.github.com/
no reported outages today at :100: