9th
Feb 2018
Darren
@DarrenfJ
Feb 09 2018 03:37 UTC
evening fCC
Kyle Holm
@thekholm80
Feb 09 2018 03:37 UTC
@DarrenfJ :wave:
Darren
@DarrenfJ
Feb 09 2018 03:39 UTC
@thekholm80 yo brutha!
how goes it?
Kyle Holm
@thekholm80
Feb 09 2018 03:40 UTC
Pretty darn good. Watching a new show and it's [expletive deleted] brilliant. How's your world?
Darren
@DarrenfJ
Feb 09 2018 03:41 UTC
got sucked into Van Helsing... been binge watching it
Kyle Holm
@thekholm80
Feb 09 2018 03:41 UTC
hmm, I saw the movie. I didn't know there was a show
oh wait
With a female van helsing?
Darren
@DarrenfJ
Feb 09 2018 03:41 UTC
it's alright.. no walking dead but satisfies the need for post-apocalyptic nightmare alternate-reality stuff
yah sorta but they haven;t called her that yet..
Kyle Holm
@thekholm80
Feb 09 2018 03:42 UTC
interesting
Darren
@DarrenfJ
Feb 09 2018 03:42 UTC
she's basically a reverse vampire.. has the same strength and healing but human
a 'blade' but without the need to a vaccine for the urge
but she does go into rages and killing sprees..
but then, is it killing if it's the undead?
Kyle Holm
@thekholm80
Feb 09 2018 03:43 UTC
I might have to check that out
"laying to rest" maybe?
putting down?
Darren
@DarrenfJ
Feb 09 2018 03:43 UTC
yes..
putting down i was just gonna say too lol
Kyle Holm
@thekholm80
Feb 09 2018 03:43 UTC
lol
Darren
@DarrenfJ
Feb 09 2018 03:46 UTC
ok, off to watch CSS vids
still trying to deep dive the CSS but it's an endless trench in the sea
Kyle Holm
@thekholm80
Feb 09 2018 03:46 UTC
@DarrenfJ thanks for the show recommend
CamperBot
@camperbot
Feb 09 2018 03:46 UTC
thekholm80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2382 | @darrenfj |http://www.freecodecamp.org/darrenfj
Darren
@DarrenfJ
Feb 09 2018 03:46 UTC
and @thekholm80 thanks for the chat
:D
thanks @thekholm80
CamperBot
@camperbot
Feb 09 2018 03:46 UTC
darrenfj sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1688 | @thekholm80 |http://www.freecodecamp.org/thekholm80
jeddionido
@jeddionido
Feb 09 2018 04:11 UTC
Hello
Can i have some help from you folks?
Kyle Holm
@thekholm80
Feb 09 2018 04:12 UTC
possibly, depends on the help you need
jeddionido
@jeddionido
Feb 09 2018 04:12 UTC
OK
I made a Program using Javascript and put a CSS background syntax and didn't work. How to troubleshoot this?
..
Kyle Holm
@thekholm80
Feb 09 2018 04:15 UTC
@jeddionido it looks like your css is
body (
background-color: lightblue;
)
should use { } instead of ( )
unless i'm just blind
yep, i'm blind lol
jeddionido
@jeddionido
Feb 09 2018 04:16 UTC
It is like this
{ }
Kyle Holm
@thekholm80
Feb 09 2018 04:17 UTC
can you paste the code here? I'd like to stick it in a jsbin
so i can see what's going on
thanks, one sec
jeddionido
@jeddionido
Feb 09 2018 04:18 UTC
<html>
<style type="type/css">
body {
background-color: lightblue;
}
</style>
<script type="text/javascript">
function verify(){
var name=prompt("Enter Name:","");
var gender=prompt("Enter Gender:","");
var no=parseInt(prompt("Enter Age:",""));
document.write("<h1>You're visiting an Age Verification Program! </h1>");
document.write("Hello! ", name);
document.write("<br>");
document.write("You are a ", gender);
document.write("<br>");
document.write("Your age is ", no);
document.write("<br>");
if(no<18) { alert("UNDER 18"); document.write("Sorry! You're underage."); document.write("<br>"); document.write("THANKS FOR PARTICIPATING IN THE AGE VERIFICAITON!"); } else { alert("Your an adult!"); document.write("Your an ADULT!"); document.write("<br>"); document.write("THANKS FOR PARTICIPATING IN THE AGE VERIFICAITON!"); } } </script>
</body>
</html>
There
I'm just beginning to start learning JavaScripting and CSS
Kyle Holm
@thekholm80
Feb 09 2018 04:19 UTC
if i take the type="type/css" out of your <style> tag it works
jeddionido
@jeddionido
Feb 09 2018 04:21 UTC
Not working for me
Kyle Holm
@thekholm80
Feb 09 2018 04:22 UTC
if you're looking at the jsbin, click "Run with JS" in the top-right corner
Irina Brennen
@iabrenne
Feb 09 2018 04:23 UTC
@jeddionido take out type attribute alltogether
just leave at as <script>
sorry nevermind. oops looking at the wrong thing
jeddionido
@jeddionido
Feb 09 2018 04:24 UTC
Did the right thing @thekholm80 but nothing happened...
Kyle Holm
@thekholm80
Feb 09 2018 04:25 UTC
is there a reason you're using document.write() for all of this?
the color shows up until your script finishes
seems like an odd way to go about all this
jeddionido
@jeddionido
Feb 09 2018 04:27 UTC
IKR, thats the model that my teacher gave and i copyed it...
Kyle Holm
@thekholm80
Feb 09 2018 04:27 UTC
I see
for whatever reason, it's removing your css during the script execution
jeddionido
@jeddionido
Feb 09 2018 04:28 UTC
And i tried to troubleshoot all over again but the result is the same
Kyle Holm
@thekholm80
Feb 09 2018 04:29 UTC
jeddionido
@jeddionido
Feb 09 2018 04:30 UTC
Whats that for sir @thekholm80 ?
Kyle Holm
@thekholm80
Feb 09 2018 04:30 UTC
that's Chrome's built-in inspector
it's how you see what's going on on a page
jeddionido
@jeddionido
Feb 09 2018 04:31 UTC
Oh ok
Ill test the program there
Kyle Holm
@thekholm80
Feb 09 2018 04:31 UTC
sorry i can't help you, I really don't know what the deal is
Claudio Restifo
@Marmiz
Feb 09 2018 04:32 UTC
@jeddionido write used after a page is loaded will destroy the HTML and replace it.
therefore your original CSS will be erased
jeddionido
@jeddionido
Feb 09 2018 04:33 UTC
It's fine @thekholm80 :smile:
Claudio Restifo
@Marmiz
Feb 09 2018 04:33 UTC
I've never seen anyone using write besides for testing or for some funky new tabs creation
Kyle Holm
@thekholm80
Feb 09 2018 04:33 UTC
@Marmiz yeah, it's a new one for me, too
jeddionido
@jeddionido
Feb 09 2018 04:34 UTC
I'll try to troubleshoot... Thanks anyways! :D
Claudio Restifo
@Marmiz
Feb 09 2018 04:34 UTC
Jut to make it simple, everything you use in document.write will be like a brand new page. So if you want to use it as it is, you have to write the head as well
Kyle Holm
@thekholm80
Feb 09 2018 04:35 UTC
that would explain why the style is disappearing
jeddionido
@jeddionido
Feb 09 2018 04:35 UTC
But how?
Claudio Restifo
@Marmiz
Feb 09 2018 04:35 UTC
That'syour duty to find out :)
jeddionido
@jeddionido
Feb 09 2018 04:35 UTC
Ok
Thanks @Marmiz !!
CamperBot
@camperbot
Feb 09 2018 04:35 UTC
jeddionido sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:star2: 1150 | @marmiz |http://www.freecodecamp.org/marmiz
Claudio Restifo
@Marmiz
Feb 09 2018 04:36 UTC

pppppsssst... i told you how a second ago:

Jut to make it simple, everything you use in document.write will be like a brand new page. So if you want to use it as it is, you have to write the head as well

:shipit:

@thekholm80 the only time I used write was with window.open to test a backend feature :)
Kyle Holm
@thekholm80
Feb 09 2018 04:37 UTC
lol
i've done some crazy vanilla stuff just to avoid jquery, but never document.write
lots of querySelector and appendChild stuff
Claudio Restifo
@Marmiz
Feb 09 2018 08:37 UTC
Someone in here willing to help me with a React thingy?
wangzhizheng
@asuka-wzz
Feb 09 2018 08:39 UTC
？？
Olapri
@Olapri
Feb 09 2018 09:13 UTC
@thekholm80 @sjames1958gm @HeinousTugboat thanks.It was in a basic solution.
CamperBot
@camperbot
Feb 09 2018 09:13 UTC
olapri sends brownie points to @thekholm80 and @sjames1958gm and @heinoustugboat :sparkles: :thumbsup: :sparkles:
:star2: 8953 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
:cookie: 341 | @heinoustugboat |http://www.freecodecamp.org/heinoustugboat
:star2: 1689 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Ancusor
@ancusor
Feb 09 2018 12:15 UTC
Hi there,I want to replace 16 GIF images from a website and replace it with one CSS SPRITE PNG,to have fewer requests.I made it work,but when CSS swap/alternate 2 images like GIF, it sees the other images when scrolls. I want to hide the scroll effect like a GIF,1 sec img1 & 1 sec img2 like a real GIF. Here my project https://codepen.io/ancusor/pen/oEZgXo
I hope somebody will help me :)
ehutchllew
@ehutchllew
Feb 09 2018 13:06 UTC
@Marmiz Still need help?
dkbast
@dkbast
Feb 09 2018 14:35 UTC
Hi, Im trying to figure out how the facebook pixel code works. In a first step, I am interested in how the cookie is set. Can anybody shed some light on that? I have been going through the minified code https://connect.facebook.net/en_US/fbevents.js for about an hour. Somehow I can't find the snippet where the cookie is set.
VaseJS
@VaseJS
Feb 09 2018 14:48 UTC
@dkbast cookies can be set on the back end so you’ll never see that code. they could be using Sessions or any back end tool to handle such things.
dkbast
@dkbast
Feb 09 2018 15:27 UTC
@VaseJS but they only want people to paste a small js snippet calling the fbevents - so I assume the cookie has to be set in the browser
Olapri
@Olapri
Feb 09 2018 15:47 UTC
Hallo. Pls help - I dont understand ((((( - https://www.freecodecamp.org/challenges/wherefore-art-thou
function whatIsInAName(collection, source) {
var keySource = Object.keys(source);
return collection.filter(function (item) {
for(var i = 0; i < keySource.length; i++) {
if(!item.hasOwnProperty(keySource[i]) || source[keySource[i]] !== item[keySource])
{return false;}
else {return true;}
}
});
}
whatIsInAName([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "b": 2 });
it does not work
Olapri
@Olapri
Feb 09 2018 15:55 UTC
Feb 09 2018 16:02 UTC
@Olapri - what kind of results are you getting?
@Olapri - you might just need to add [i] to the source[keySource[i]] !== item[keySource]) - make it source[keySource[i]] !== item[keySource[i]])
Feb 09 2018 16:11 UTC
@Olapri - always reference keySource[i] in your inner loop.
Feb 09 2018 16:16 UTC
@Olapri - another helpful thing here is to post your code properly formatted, it makes it easier to study the code... proper indentation and surround your block of code with three backticks on a separate line at the top and bottom -  makes the code more readable.
Feb 09 2018 16:21 UTC
@Olapri - there might be another issue, too - you are missing a case where there are multiple properties in an object and by returning true when there is only a single match, it is not fully testing all of the sub-object properties - for example, the source in your test case above has { "a": 1, "b": 2 } and the second object in the array only consists of { "a": 1 }. Unless you determine that the second key/value "b": 1 exists and matches in the item, you will not get the correct result. so you don't want to return true in that case...
Olapri
@Olapri
Feb 09 2018 16:31 UTC
exactly - it is the problem I dont know how to exclude this mistake - not to display only { "a": 1 } if the source has the second key/value "b": 1 as well
@ezioda004
Feb 09 2018 16:43 UTC
@Olapri As @khaduch said your first problem is source[keySource[i]] !== item[keySource]) since keySource is an array. That can be solved with source[keySource[i]] !== item[keySource[i]]) now with the second problem of it returning true too early, that can be solved with having return true outside the loop so something like this.
for(var i = 0; i < keySource.length; i++) {
if(!item.hasOwnProperty(keySource[i]) || source[keySource[i]] !== item[keySource[i]]){
return false;}
else {}
}
return true;
Olapri
@Olapri
Feb 09 2018 17:06 UTC
@ezioda004 @khaduch right you are. I managed to fix it. Thanks
CamperBot
@camperbot
Feb 09 2018 17:06 UTC
olapri sends brownie points to @ezioda004 and @khaduch :sparkles: :thumbsup: :sparkles:
:cookie: 446 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Gersho
@Gersho
Feb 09 2018 17:39 UTC
Hello /Help
@ezioda004
Feb 09 2018 17:43 UTC
@Gersho :wave:
Kyle Holm
@thekholm80
Feb 09 2018 17:53 UTC
@Gersho :wave:
VaseJS
@VaseJS
Feb 09 2018 18:56 UTC
@Gersho lol
Albert Cardona II
Feb 09 2018 19:21 UTC
what up yall
been busy sorry a little sick :)
VaseJS
@VaseJS
Feb 09 2018 19:22 UTC
@daddycardona damn, where you been
Albert Cardona II
Feb 09 2018 19:22 UTC
school surgery etc.. lol
I was starting a mini bootcamp with the lambada and when I was doing it I was learning how to use github properly then I got sick found out my appendix was being a a hole so I had to take that out and I only got to day 2 lol
I can basically say my calculator is done I have not worked on it since lol
Gersho
@Gersho
Feb 09 2018 19:24 UTC
and here i was slowing down out of plain lazyness
Albert Cardona II
Feb 09 2018 19:24 UTC
Oh I was being lazy too I still have not fixed the ... or the 3.4.2 issues lmao
Gersho
@Gersho
Feb 09 2018 19:32 UTC
if you github via command line don't forget to setup your key or you won't be getting the points
Albert Cardona II
Feb 09 2018 19:37 UTC
I was learning that with that school @Gersho
so I will be tackling the ... and 3.4.6 etc.. LOL
Gersho
@Gersho
Feb 09 2018 19:39 UTC
i'm still on week3 of cs50, it's getting a bit more intense (plus the lazy thing)
Albert Cardona II
Feb 09 2018 19:39 UTC
did not do cs50 at all LOL yet
Gersho
@Gersho
Feb 09 2018 19:39 UTC
well there's only 24 hours in a day
and you're doing that school stuff too
Albert Cardona II
Feb 09 2018 19:40 UTC
yeah electronics etc..
Kelechi Chinaka
@ke1echi
Feb 09 2018 19:55 UTC
:wave: @Gersho
Gersho
@Gersho
Feb 09 2018 19:56 UTC
@kelechy :wave:
Kelechi Chinaka
@ke1echi
Feb 09 2018 19:56 UTC
am doing cash now, do u have some mins to spare? @Gersho
C is banging ma head :smile:
Gersho
@Gersho
Feb 09 2018 19:59 UTC
sure
Kelechi Chinaka
@ke1echi
Feb 09 2018 19:59 UTC
#include <stdio.h>
#include <cs50.h>
#include <math.h>

int main (void)
{

float f = 0;

//prompt user for a valid input
do
{
f = get_float("How much do we owe you?: \n");
}
while (f < 0);

printf("%f\n", f);
}
Gersho
@Gersho
Feb 09 2018 20:01 UTC
since you're using a do loop you don't need to set f to 0 , it'll work even with float f;`
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:02 UTC
i think i need to first multiply f by 100 then round it right?
Gersho
@Gersho
Feb 09 2018 20:03 UTC
yes
have you done the change challenge in JS on freecodecamp ?
they work pretty much the same way
only here you only need amount of coin and don't need to take supply in consideration
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:06 UTC
yes
i got confused at some point
so 5 should give me 500? @Gersho
Gersho
@Gersho
Feb 09 2018 20:07 UTC
you convert to cents to avoid floating errors, then you count down the money in a loop while storing the increasing number of coins
when converting to cents ? yes
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:08 UTC
ok
needed to be sure
hows pset3 going for you
Gersho
@Gersho
Feb 09 2018 20:10 UTC
week 3 is actually pset4 (week 1 has 2 parts) and it's a bit hard ^^
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:13 UTC
wow
Gersho
@Gersho
Feb 09 2018 20:13 UTC
Specification
Implement a program called recover that recovers JPEGs from a forensic image.
that's the one i'm "working" on atm ( IDE open, nothing written)
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:14 UTC
lol
gather your thoughts before opening the ide :smile:
it happens to everyone..u would get it
Gersho
@Gersho
Feb 09 2018 20:15 UTC
i tried that, the ide stayed closed for some time ^^
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:16 UTC
lol
Gersho
@Gersho
Feb 09 2018 20:16 UTC
but well, i'm making progress so it should work out at some point
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:16 UTC
it can be confusing at times too
i input 35 and it gave me 140 coins
Gersho
@Gersho
Feb 09 2018 20:17 UTC
well 35 dollars in coins would be 35*4 quarters i guess ?
you should use check50 instead of manual testing
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:18 UTC
i think my logic is correct
Gersho
@Gersho
Feb 09 2018 20:18 UTC
well the result is valid
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:19 UTC
just watched the short and am correct
:smile:
Gersho
@Gersho
Feb 09 2018 20:19 UTC
short ?
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:20 UTC
zamayla's videos
Gersho
@Gersho
Feb 09 2018 20:21 UTC
oh the walkthrough
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:21 UTC
correct
i did mario(more) yesterday and cash today
Gersho
@Gersho
Feb 09 2018 20:24 UTC
gratz! go for the (more) version
sometimes i do both, sometime only the (more) one
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:25 UTC
sure will
i think am begining to pick up.. had a very slow start to the course :smile:
Gersho
@Gersho
Feb 09 2018 20:29 UTC
well C is a bit ...harsh
my internet keeps going on and off, today is an annoying day :(
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:31 UTC
yea...it have to do almost everything yourself in C
Gersho
@Gersho
Feb 09 2018 20:33 UTC
yeah, and that's with cs50.h that includes some stuff like strings
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:37 UTC
the cs50.h has only 8 functions attached to it
Gersho
@Gersho
Feb 09 2018 20:38 UTC
it also had data types, like string
Kelechi Chinaka
@ke1echi
Feb 09 2018 20:39 UTC
o ok
Kyle Holm
@thekholm80
Feb 09 2018 22:11 UTC
@daddycardona hey welcome back
Altin Rrahmani
@DevKosov
Feb 09 2018 22:12 UTC
@thekholm80 :wave:
Kyle Holm
@thekholm80
Feb 09 2018 22:13 UTC
@DevKosov hey man, how are you?
Altin Rrahmani
@DevKosov
Feb 09 2018 22:13 UTC
i am great, what about you?
Kyle Holm
@thekholm80
Feb 09 2018 22:14 UTC
pretty darn good. almost 60 degrees today, took a 1/2 day off and rode my motorcycle
always makes for a good day
Altin Rrahmani
@DevKosov
Feb 09 2018 22:14 UTC
That's good to hear :)
Kenneth "Leeoku" Lee
@Leeoku
Feb 09 2018 22:15 UTC
@thekholm80 i hate you, its snowing outside here and a snowstorm is brewing T_T
jealous*
Kyle Holm
@thekholm80
Feb 09 2018 22:15 UTC
haha i have friends in Maine (USA) and they've got like 90 inches of snow
Kenneth "Leeoku" Lee
@Leeoku
Feb 09 2018 22:15 UTC
no way
Altin Rrahmani
@DevKosov
Feb 09 2018 22:15 UTC
Kyle have you had any experience using Drupal cms
happysoccerboy
@happysoccerboy
Feb 09 2018 22:16 UTC
hey guys, just wonder if you guys know how to clear recent files on Atom icon
it's confusing, when right click the icon, a bunch of same file names show up
Kyle Holm
@thekholm80
Feb 09 2018 22:17 UTC
@DevKosov nope, sorry.
Altin Rrahmani
@DevKosov
Feb 09 2018 22:18 UTC
i just started like today
i have lots of questions lol
Kyle Holm
@thekholm80
Feb 09 2018 22:56 UTC
@DevKosov I have not learned PHP so Drupal is a long way off for me
Kaz Baig
@kbaig
Feb 09 2018 23:00 UTC
@thekholm80 I'm about to head off to chicago via amtrak in a couple hours...not looking forward to it
one foot of snow between last night and tonight
Kyle Holm
@thekholm80
Feb 09 2018 23:01 UTC
@kbaig I love riding Amtrak, but I've never used it during any kind of bad weather
hope you don't get crappy delays
Stephen James
@sjames1958gm
Feb 09 2018 23:06 UTC
@happysoccerboy Try unpin from task bar then re-pin
happysoccerboy
@happysoccerboy
Feb 09 2018 23:08 UTC
@sjames1958gm you meant updock and re-dock Atom?
not working either
Stephen James
@sjames1958gm
Feb 09 2018 23:10 UTC
@happysoccerboy Is that not windows :)
happysoccerboy
@happysoccerboy
Feb 09 2018 23:11 UTC
@sjames1958gm using Macbook, that doesn't fix lol
Stephen James
@sjames1958gm
Feb 09 2018 23:12 UTC
@happysoccerboy made the stupid assumption it was windows :(
Kyle Holm
@thekholm80
Feb 09 2018 23:12 UTC
1. install windows
2. pin to task bar
3. unpin from task bar
4. re-pin to task bar
win
happysoccerboy
@happysoccerboy
Feb 09 2018 23:13 UTC
@sjames1958gm no worry
Stephen James
@sjames1958gm
Feb 09 2018 23:15 UTC
@thekholm80 Watch out for that first step it's a doozy :)
Kyle Holm
@thekholm80
Feb 09 2018 23:15 UTC
lol
someday I'm going to buy a mac, just so I can understand how they work
Gersho
@Gersho
Feb 09 2018 23:37 UTC
@happysoccerboy you could disable recent files system wide, but ofc that would impact your other software
Kaz Baig
@kbaig
Feb 09 2018 23:42 UTC
@thekholm80 it's always delayed in this direction of the journey so it's only going to be exacerbated (severely) by the weather
Kyle Holm
@thekholm80
Feb 09 2018 23:42 UTC
@kbaig sorry man. the worst part is when it's all over you'll be in Chicago
;)
Kaz Baig
@kbaig
Feb 09 2018 23:43 UTC
rude af
Kyle Holm
@thekholm80
Feb 09 2018 23:43 UTC
to be fair, i've never been to chicago so it could be awesome for all i know
VaseJS
@VaseJS
Feb 09 2018 23:53 UTC
hey, don’t hate on the Chi! this place is awesome!
:D