These are chat archives for FreeCodeCamp/Help

25th
Jul 2017
Mike Batista
@mbmontana
Jul 25 2017 00:03
On my portfolio page, should I make all my CSS declarations in the CSS window in CodePen and get rid of the style tags in HTML? Does it make a difference?
Kyle Holm
@thekholm80
Jul 25 2017 00:04
it's best to keep the css in the css box
Mike Batista
@mbmontana
Jul 25 2017 00:09
@thekholm80 So are style tags even necessary?
Kyle Holm
@thekholm80
Jul 25 2017 00:09
not when you're building in codepen
dyon3334
@dyon3334
Jul 25 2017 01:46
When and why to use the strict statement?
Harshit Garg
@theharshitgarg
Jul 25 2017 01:59
@dyon3334 it is used when u want your javascript to be ecma5 or 6 standard compliant
@dyon3334 after doing, it points out the bugs that otherwise would be ignored. It helps one to write clean, bug-free code.
dyon3334
@dyon3334
Jul 25 2017 02:06
@theharshitgarg thanks !!
CamperBot
@camperbot
Jul 25 2017 02:06
dyon3334 sends brownie points to @theharshitgarg :sparkles: :thumbsup: :sparkles:
:cookie: 725 | @theharshitgarg |http://www.freecodecamp.com/theharshitgarg
Eric Miller
@ericmiller777
Jul 25 2017 02:46
hey guys
doing quote machine
<script>$.getJSON(("https://talaikis.com/api/quotes/random/", function(json) {
    $(".message").html(JSON.stringify(json));
}));</script>
shouldnt that work kinda?
lol
Eric Miller
@ericmiller777
Jul 25 2017 03:08
<script>$.getJSON("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
  $("#quote").append(a[0].content + "<p>&mdash; " + a[0].title + "</p>")
});</script>
Raj Patel
@rajp1847
Jul 25 2017 03:31
hi
knight2
@knight2
Jul 25 2017 03:40

Also doing quote machine.

how do we use bootstrap with React to style the elements?

If I have something like

  render(){
    return(
                  <div>
                  <p class="text-primary">Test</p>
                </div>
 );
}

Right now I try to add bootstrap into the React JSX code, but it does not update anything. Where is the correct place to put bootstrap code with JSX react code?

Claudio Restifo
@Marmiz
Jul 25 2017 03:56
@knight2 class is a riserved word in JS.
so you need to use className
knight2
@knight2
Jul 25 2017 03:58
@Marmiz ah right forgot about taht
Kyle Holm
@thekholm80
Jul 25 2017 03:58
@knight2 also, you might try https://react-bootstrap.github.io/
knight2
@knight2
Jul 25 2017 03:58
Looks to fix things, And yeah @thekholm80 saw that too thanks :D
CamperBot
@camperbot
Jul 25 2017 03:58
knight2 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1366 | @thekholm80 |http://www.freecodecamp.com/thekholm80
knight2
@knight2
Jul 25 2017 03:58
@Marmiz thanks
Kyle Holm
@thekholm80
Jul 25 2017 03:58
twitter bootstrap requires jquery, which isn't react-friendly
knight2
@knight2
Jul 25 2017 03:59
Not sure why they introduce bootstrap and react and then give us those projects in beta course the
shouldn't they be more clear which front end libraries we should use? or are we supposed to just know...
Kyle Holm
@thekholm80
Jul 25 2017 04:00
i couldn't say. i've not looked at the beta very much
knight2
@knight2
Jul 25 2017 04:00
They give you bootstrap, jquery, sass, react, redux, react+redux, then have you do the following projects: random quote machine, markdown previewer, drum machine, javascript calc, and pomorodo clock
Kyle Holm
@thekholm80
Jul 25 2017 04:01
I see
Claudio Restifo
@Marmiz
Jul 25 2017 04:01
@knight2 react is an UI library, Bootstrap is a CSS library
knight2
@knight2
Jul 25 2017 04:02
I like the grid system in bootstrap, but apparently might be a pain to integrate with react?
Claudio Restifo
@Marmiz
Jul 25 2017 04:03
@knight2 no it's not
but all depends on how you structure your app
in big project it is
for small one (single page and few UI) it's not that hard
people have already made some bootstrap components library
Kyle Holm
@thekholm80
Jul 25 2017 04:04
bootstrap grid is just flexbox
Claudio Restifo
@Marmiz
Jul 25 2017 04:04
^
Kyle Holm
@thekholm80
Jul 25 2017 04:04
and flexbox is not hard to learn
i'm an idiot and i can use it
Claudio Restifo
@Marmiz
Jul 25 2017 04:04
no one has time for CSS
that's why whe have library like
https://www.styled-components.com/docs/basics
CSS in JS :laughing:
Kyle Holm
@thekholm80
Jul 25 2017 04:05
image.png
this is my current project, it's all flexbox
well, i mean the layout is all flexbox
mrwangkis
@mrwangkis
Jul 25 2017 04:14
zai
有人在吗
SIMAABAMIR
@SIMAABAMIR
Jul 25 2017 04:49

function golfScore(par, strokes) {
// Only change code below this line
if (strokes == 1)
{return "Hole-in-one!";}
else if (strokes <=par-2)
{return "Eagle";}
else if (strokes ==par-1){
return "Birdie";}
else if (strokes == par){
return "par";}
else if (strokes ==par+1){
return "Bogey";}
else if (strokes ==par+2){
return "Double Bogey";}
else
{return "Go Home!";}

// Only change code above this line
}

* strokes==par is not working for me

heroiczero
@heroiczero
Jul 25 2017 04:51
@SIMAABAMIR try refreshing maybe
elad ben aderet
@eladonline
Jul 25 2017 04:53
function golfScore(par, strokes) {
  // Only change code below this line
  if (strokes == 1)
    {return "Hole-in-one!";}
   else if (strokes <=par-2)
   {return "Eagle";}
   else if (strokes ==par-1){
    return "Birdie";}
   else if (strokes == par){
    return "par";}
  else if (strokes ==par+1){
    return "Bogey";}
    else if (strokes ==par+2){
    return "Double Bogey";}
  else
  {return "Go Home!";}







  // Only change code above this line
}


*****  strokes==par is not working for me
@SIMAABAMIR this is not how you right a code
instead of if else () try switch(strokes)
@SIMAABAMIR
SIMAABAMIR
@SIMAABAMIR
Jul 25 2017 04:58
@eladonline , yes elad I will work on switch, i just came to this exercise. but can you please tell me , whatsa wrong in my code for the case strokes == par ? others are executing
heroiczero
@heroiczero
Jul 25 2017 04:58
@SIMAABAMIR Par need capital "P"
mrwangkis
@mrwangkis
Jul 25 2017 04:59
?
SIMAABAMIR
@SIMAABAMIR
Jul 25 2017 05:00
@heroiczero , i looked the hint ,it was same as mine , on pasting that hint code, there's no problem. and if I make "P" i might have to change all the cases.
for now I pasted the hint code and moved on... now I'll work on switch method
heroiczero
@heroiczero
Jul 25 2017 05:01
@SIMAABAMIR return "par"; it is returning par instead of Par
@SIMAABAMIR the answer is case sensitive
SIMAABAMIR
@SIMAABAMIR
Jul 25 2017 05:01
@heroiczero thanks
CamperBot
@camperbot
Jul 25 2017 05:01
simaabamir sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1528 | @heroiczero |http://www.freecodecamp.com/heroiczero
SIMAABAMIR
@SIMAABAMIR
Jul 25 2017 05:02
a difference of sing case sensitive could be so important !!!
Albert Cardona II
@daddycardona
Jul 25 2017 05:06
you don't need a capital p if all your parameter did not have a capital p.
@SIMAABAMIR also you might need to use === vs == for strokes === par
Albert Cardona II
@daddycardona
Jul 25 2017 05:12
@FreeCodeCampCoder3 thanks I saw some of your videos with another person thanks for everything
CamperBot
@camperbot
Jul 25 2017 05:12
daddycardona sends brownie points to @freecodecampcoder3 :sparkles: :thumbsup: :sparkles:
:cookie: 17 | @freecodecampcoder3 |http://www.freecodecamp.com/freecodecampcoder3
Raj Patel
@rajp1847
Jul 25 2017 05:12
plz help
Albert Cardona II
@daddycardona
Jul 25 2017 05:13
@QuincyLarson i meant to thank yoiu
CamperBot
@camperbot
Jul 25 2017 05:13
daddycardona sends brownie points to @quincylarson :sparkles: :thumbsup: :sparkles:
:star2: 1328 | @quincylarson |http://www.freecodecamp.com/quincylarson
Albert Cardona II
@daddycardona
Jul 25 2017 05:13
you
@rajp1847 what you need
elad ben aderet
@eladonline
Jul 25 2017 05:18
<DropdownButton id="dropdownBtn" bsSize="xsmall"  title={this.state.fltrName} >
              <MenuItem eventKey="1" onSelect={()=>this.setState({fltrName:"pentium"})} >pentium </MenuItem>
<DropdownButton/>
for those who know react why is the setState not working it doesn't throw any error it just not working
Albert Cardona II
@daddycardona
Jul 25 2017 05:18
@heroiczero i see what you are saying now LOL good job pointing that out the return LOL
could it be Down is spelled down
in <deopdownbutton>
never mind I am not there @eladonline
but i also see onSelect a different amount of ()) if that is an issue
elad ben aderet
@eladonline
Jul 25 2017 05:23
@daddycardona dude i guess your not familiar with this language so pls stop try to help
@daddycardona no offence your just dont know what your saying
Albert Cardona II
@daddycardona
Jul 25 2017 05:25
its not that from where I was looking it looked like ())= but i see its {()
but you can also see right there onselect={)) that second => looks like it closes the MenuItem but according to this editor
elad ben aderet
@eladonline
Jul 25 2017 05:28
nvm ive got the problam
Albert Cardona II
@daddycardona
Jul 25 2017 05:34
was it dropdownbutton/ not /dropdownbutton
Uriel Guzmán
@Burinson
Jul 25 2017 05:36
A little help here?
function getIndexToIns(arr, num) {
  // Find my place in this sorted array.
  arr.sort(function(a, b) {

  return a - b;
});
  // sort numbers from smallest to greatest
  var placeholder = arr.indexOf(num);
  // index value
  for (var i=0; i < arr.length; i++) {
  if (placeholder == -1) {
    return arr.indexOf(arr[i] < num);
  }
  }
  // if index is not found, return the nearest smallest number of num
  return placeholder;
}

getIndexToIns([1, 5, 50, 2, 60], 40);
elad ben aderet
@eladonline
Jul 25 2017 05:38
arr.sort() cant have a - b is a sort function not reduce
try to change to arr.reduce
@Burinson
wonder
@wonder2991
Jul 25 2017 05:40
what does this do?
 return arr.indexOf(arr[i] < num);
Levyian
@levyian
Jul 25 2017 05:40
the sort function works. (it sorts from smallest to largest as intended by his code
elad ben aderet
@eladonline
Jul 25 2017 05:42
@levyian @Burinson you right my wrong
Levyian
@levyian
Jul 25 2017 05:42
the problem is the loop. it will always return the first value of the array if the placeholder was not found
Albert Cardona II
@daddycardona
Jul 25 2017 05:42
according to modziller that is how they compare number
oh okay
Joseph
@revisualize
Jul 25 2017 05:43
@Burinson Unicode Sort is default.
@wonder2991 That returns the index of an element. Where the element value is arr[i] < num
elad ben aderet
@eladonline
Jul 25 2017 05:44
@Burinson it seems the problam is in the return from the loop you returning index istead of number
Joseph
@revisualize
Jul 25 2017 05:44
@wonder2991 So, it depends on what the value of arr[i] is less than num
Levyian
@levyian
Jul 25 2017 05:44
@Burinson you need to keep track of the smallest number so far in the loop, and only update the placeholder if the curent number is smaller than num.
Levyian
@levyian
Jul 25 2017 05:53
@Burinson did you still need help?
wonder
@wonder2991
Jul 25 2017 05:54
doesn't arr[i] < num return true or false? @revisualize
Joseph
@revisualize
Jul 25 2017 05:55
@wonder2991 correct.
@wonder2991 I didn't say the code was good ... or that it was correct.
wonder
@wonder2991
Jul 25 2017 05:59
i was trying to point that out. :smile:
Darren
@DarrenfJ
Jul 25 2017 06:00
evening fCC
Viktor Tiutiun
@vittorioVT
Jul 25 2017 06:01
@DarrenfJ hi :smile:
Darren
@DarrenfJ
Jul 25 2017 06:01
@vittorioVT hey buddy!
Joseph
@revisualize
Jul 25 2017 06:01
Hey.
Darren
@DarrenfJ
Jul 25 2017 06:01
@revisualize hey man :D
Darren
@DarrenfJ
Jul 25 2017 06:07
oh man it's slow in the ole helpRoom ;)
Viktor Tiutiun
@vittorioVT
Jul 25 2017 06:11
those who help a lot more than those who need help :smile:
Darren
@DarrenfJ
Jul 25 2017 06:12
i know.....
i might slink off to sleep but brownies for yah and revisualize for sticking it out in the loneliest room in the world ;)
thanks @revisualize @vittorioVT
CamperBot
@camperbot
Jul 25 2017 06:13
darrenfj sends brownie points to @revisualize and @vittoriovt :sparkles: :thumbsup: :sparkles:
:cookie: 801 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
:star2: 4379 | @revisualize |http://www.freecodecamp.com/revisualize
Darren
@DarrenfJ
Jul 25 2017 06:13
I'm gonna hafta come more in the day to actually git some helpin' in
Joseph
@revisualize
Jul 25 2017 06:13
@DarrenfJ Thank you.
CamperBot
@camperbot
Jul 25 2017 06:13
:star2: 1931 | @darrenfj |http://www.freecodecamp.com/darrenfj
revisualize sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
Viktor Tiutiun
@vittorioVT
Jul 25 2017 06:14
@DarrenfJ thanks
CamperBot
@camperbot
Jul 25 2017 06:14
vittoriovt sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1932 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Jul 25 2017 06:14
have fun and see yah tomorrow day EST :D
Raj Patel
@rajp1847
Jul 25 2017 06:14
@daddycardona help
Mukul Agrawal
@mukul09
Jul 25 2017 06:47
I tried my hand on wikipedia viewer project. I would appreciate , if you give some valuable feedback. Also how can i improve it .
https://codepen.io/mukul09/full/LLvaaz/
Aakriti
@Aakriti94
Jul 25 2017 06:47
@wonder2991 thank you
CamperBot
@camperbot
Jul 25 2017 06:47
aakriti94 sends brownie points to @wonder2991 :sparkles: :thumbsup: :sparkles:
:cookie: 412 | @wonder2991 |http://www.freecodecamp.com/wonder2991
elad ben aderet
@eladonline
Jul 25 2017 06:56
@mukul09 post it on code review not here
Jill Lee
@jill-lee
Jul 25 2017 07:10
Hi can anyone help me remove the margin on top of BG when you resize it? https://codepen.io/phoenix-burn/pen/bRRaEO
Sorin Ruse
@sorinr
Jul 25 2017 07:21
@phoenix-burn something like this ?
Jill Lee
@jill-lee
Jul 25 2017 07:35
@sorinr Hi I already got it fixed but this time when i resize the browser the image squeezes i want to make the bg responsive but i dont like my face squeezed if that makes any sense?
Sorin Ruse
@sorinr
Jul 25 2017 07:36
@phoenix-burn have u tried my version above?
Albert Cardona II
@daddycardona
Jul 25 2017 07:36
@rajp1847 what you need help with ?
Jill Lee
@jill-lee
Jul 25 2017 07:39
@sorinr yes I like it thanks but i want to make the bg full size like this when you resize it https://codepen.io/phoenix-burn/full/bRRaEO/
Victor Popescu
@VicPopescu
Jul 25 2017 07:40
@phoenix-burn you an try
    width: 100%;
    height: auto;
    background-size: contain;
Jill Lee
@jill-lee
Jul 25 2017 07:42
@VicPopescu thanks :)
CamperBot
@camperbot
Jul 25 2017 07:42
phoenix-burn sends brownie points to @vicpopescu :sparkles: :thumbsup: :sparkles:
:warning: phoenix-burn already gave vicpopescu points
Sorin Ruse
@sorinr
Jul 25 2017 07:43
@phoenix-burn on smaller screens u can't filling both view port height and width without distorting your bg img. imgs have a scale ratio that u have to maintain no matter the display size. otherwise u land on the distorsion problem u have now
Jill Lee
@jill-lee
Jul 25 2017 07:44
@sorinr I you're right maybe I should just use color instead for mobile devices thanks
CamperBot
@camperbot
Jul 25 2017 07:44
phoenix-burn sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1313 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Jul 25 2017 07:48
@phoenix-burn using color or maybe an appropiate gradient to mask the space around bg can do the trick
Sorin Ruse
@sorinr
Jul 25 2017 07:53
@phoenix-burn the idea is that if you have a landscape img its very hard to present it on a portrait "phone/tablet" without distortion unless you work on that photo in "photoshop" and have two versions for it. one for full screen landscape and one for smaller portrait screens
Jill Lee
@jill-lee
Jul 25 2017 07:55
@sorinr I'm actually working on a new image now for mobile I thought there's another way but yea you're right. thanks again :)
CamperBot
@camperbot
Jul 25 2017 07:55
phoenix-burn sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: phoenix-burn already gave sorinr points
Victor Popescu
@VicPopescu
Jul 25 2017 07:56
@sorinr deppends on the photo actually, in this case she can just display the left side of the photo and leave the right side as an overflow
for mobile devices
Jill Lee
@jill-lee
Jul 25 2017 07:56
@VicPopescu Hey you gave me an idea!
Sorin Ruse
@sorinr
Jul 25 2017 07:57
@VicPopescu yep. that can be an alternative solution
Victor Popescu
@VicPopescu
Jul 25 2017 07:58
@phoenix-burn :D
Sorin Ruse
@sorinr
Jul 25 2017 07:58
@VicPopescu @phoenix-burn but you have to keep in mind also the proportions of text size over the bg and text position
any new solution brings new aspects to be solved :)
Jill Lee
@jill-lee
Jul 25 2017 07:59
@sorinr I'll keep that in mind. Thanks guys! :) @sorinr @VicPopescu
CamperBot
@camperbot
Jul 25 2017 07:59
phoenix-burn sends brownie points to @sorinr and @vicpopescu :sparkles: :thumbsup: :sparkles:
:warning: phoenix-burn already gave sorinr points
:warning: phoenix-burn already gave vicpopescu points
Victor Popescu
@VicPopescu
Jul 25 2017 08:02
@sorinr yea, that can be fixed using relative sizes %, vw, vh, vmin, vmax or whichever fit the context
@phoenix-burn np, good luck!
Sorin Ruse
@sorinr
Jul 25 2017 08:05
@VicPopescu i prefer em's for fonts
Victor Popescu
@VicPopescu
Jul 25 2017 08:05
@sorinr yea, that is the usual approach
@sorinr but em is relative to the font size, 16px or something like that
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 08:07
anyone there?
My menu won't collapse. Help Please! https://codepen.io/scodavinci/pen/RZNWoO
elad ben aderet
@eladonline
Jul 25 2017 08:13
@Scodavinci well you dont have any hundler for the click \
@Scodavinci you need to make a click hundler in two option s the first is css by changing the display from none to block
the second is to make a javascript function
Victor Popescu
@VicPopescu
Jul 25 2017 08:14
@eladonline it's a bootstrap navbar, he doesn't need a handler.
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 08:15
Im using bootstrap 4
@eladonline @VicPopescu
Victor Popescu
@VicPopescu
Jul 25 2017 08:16
@Scodavinci well, first thing, make sure you include jquery before bootstrap.js
I am trying to figure what is the issue
@Scodavinci oh, I think that was all
just include jquery
elad ben aderet
@eladonline
Jul 25 2017 08:19
@Scodavinci i see that well if you look at the console you will see that u need to include jquery first
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 08:19
I included jquery and I'm still getting the same result
Victor Popescu
@VicPopescu
Jul 25 2017 08:21
@Scodavinci because you included after bootstrap
@Scodavinci move it before bootstrap
use those 3 lines in the left side to drag it above it
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 08:22
@VicPopescu It worked thank you!
CamperBot
@camperbot
Jul 25 2017 08:22
scodavinci sends brownie points to @vicpopescu :sparkles: :thumbsup: :sparkles:
:cookie: 518 | @vicpopescu |http://www.freecodecamp.com/vicpopescu
Victor Popescu
@VicPopescu
Jul 25 2017 08:22
@Scodavinci np
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 08:38
I'm trying to input information in one of my tabs so it can show on its own page but still on the Home page like a portfolio. I have the grid input for each tab. Can somebody tell me what Im doing wrong?
Aita Kane
@aita-kane
Jul 25 2017 08:38
hello can someone help me please
i'm using a scrollmagic script and after that i made a another script for my nav . everything work fine when I scroll but when I reach the end of scrollmagic' script the effect I apply on my nav are gone . What can I do to resolve that
Huỳnh Trần Khanh
@khanh2003
Jul 25 2017 09:10
@aita-kane can you share your code (preferably a codepen link)
GeorgeII
@GeorgeII
Jul 25 2017 09:46

I've got this code. On hover it smothly increases (0.5s)

li:hover {
  transform: scale(1.05);
  -webkit-transition: transform 0.5s ease;
}

How can I make smoothly decreasing when the mouse is getting out of this block?

elad ben aderet
@eladonline
Jul 25 2017 09:55
@GeorgeII add "ease-in-out"
okayaj
@okayaj
Jul 25 2017 09:55
hello! I got bored during one of my python lessons on another site and tried making a code to verify a matching password with a conditional statement to verify character length. i got the original code working, but failed when i tried to make the code revert to the beginning after an invalid input. can anyone take a look? https://repl.it/JhNs/0
i know both my lesson and this code are outside of FCC but i didnt know where else to ask :( sorry if im breaking any rules
GeorgeII
@GeorgeII
Jul 25 2017 09:57
@eladonline doesn't work
Tiago Correia
@tiagocorreiaalmeida
Jul 25 2017 09:58
hello
anyone here knows php?
elad ben aderet
@eladonline
Jul 25 2017 09:59
@okayaj i looked at your code and it has a lots of missing things
okayaj
@okayaj
Jul 25 2017 09:59
@eladonline that makes sense, im very new at this.
elad ben aderet
@eladonline
Jul 25 2017 10:00
@okayaj as i see you made a condition that if the password is wrong it infinite restart the code
@okayaj change the while to if
Tiago Correia
@tiagocorreiaalmeida
Jul 25 2017 10:00
<html>
  <head>
    <title>Modifying Elements</title>
  </head>
  <body>
    <p>
      <?php
        $languages = array("HTML/CSS",
        "JavaScript", "PHP", "Python", "Ruby");

        // Write the code to modify
        // the $languages array!
        $languages[0] = "css3";
        echo $languages[0];
      ?>
    </p>
  </body>
</html>
can someone point out my mistake?
I have to change a value from the $languages array and echo it..
okayaj
@okayaj
Jul 25 2017 10:01
if invalid_pass1 = false:
start()
@eladonline would that work
Tiago Correia
@tiagocorreiaalmeida
Jul 25 2017 10:02
nm solved
elad ben aderet
@eladonline
Jul 25 2017 10:02

@okayaj thats the idea but try this

if(!invalid_pass1){start()}

okayaj
@okayaj
Jul 25 2017 10:03
@eladonline is that just better syntax or is this a different statement
elad ben aderet
@eladonline
Jul 25 2017 10:03
@okayaj sry its python lol do if(invalid_pass1){start()}
okayaj
@okayaj
Jul 25 2017 10:04
@eladonline syntax error
elad ben aderet
@eladonline
Jul 25 2017 10:05
@okayaj if( invalid_pass1):
start()
im a javascript programer translate it to python but this is the answer
okayaj
@okayaj
Jul 25 2017 10:08
@eladonline thanks. this stopped the errors and infinite looping, but now it is not reverting to the beginning of the code when it encounters an invalid response
CamperBot
@camperbot
Jul 25 2017 10:08
okayaj sends brownie points to @eladonline :sparkles: :thumbsup: :sparkles:
:cookie: 228 | @eladonline |http://www.freecodecamp.com/eladonline
okayaj
@okayaj
Jul 25 2017 10:08
i think i can play with it though
dyon3334
@dyon3334
Jul 25 2017 10:12
javascript:When to use a object over an array?
elad ben aderet
@eladonline
Jul 25 2017 10:14
@okayaj all your conditions is messed up how can u do two elses ? dont you need elseif ?
@dyon3334 when ever it make thing less complicated
okayaj
@okayaj
Jul 25 2017 10:16

'''
invalid_pass1 = True

def start():
pass_old = "bark123"
entry_oldpass = input("Enter old password:")
if entry_oldpass == pass_old:
print("Password verified!")
invalid_pass1 = False
entry_newpass = input("Enter new password: ")
if len(entry_newpass) > 7:
print("New password accepted!")
invalid_pass1 = False
else:
print("Password length must be eight or more characters.")
start()
else:
print("Password does not match records. Password is case sensitive.")
start()

if(invalid_pass1):{start()}
'''

CamperBot
@camperbot
Jul 25 2017 10:16
:bulb: to format code use backticks! ``` more info
okayaj
@okayaj
Jul 25 2017 10:16
lol oops
elad ben aderet
@eladonline
Jul 25 2017 10:16
invalid_pass1 = True
def start():
pass_old = "bark123"
entry_oldpass = input("Enter old password:")
if entry_oldpass == pass_old:
print("Password verified!")
invalid_pass1 = False
entry_newpass = input("Enter new password: ")
if len(entry_newpass) > 7:
print("New password accepted!")
invalid_pass1 = False
else:
print("Password length must be eight or more characters.")
start()
else:
print("Password does not match records. Password is case sensitive.")
start()
if(invalid_pass1):{start()}
okayaj
@okayaj
Jul 25 2017 10:17
thanks. now its working @eladonline
CamperBot
@camperbot
Jul 25 2017 10:17
okayaj sends brownie points to @eladonline :sparkles: :thumbsup: :sparkles:
:warning: okayaj already gave eladonline points
elad ben aderet
@eladonline
Jul 25 2017 10:17
@okayaj np
okayaj
@okayaj
Jul 25 2017 10:17
i called start() directly rather than checking if invalid_pass was true or not
im sure there is a better structure, but the point of doing it was to learn some stuff so mission accomplished haha @okayaj
wow im tagging myself. time for bed. thanks again @eladonline
CamperBot
@camperbot
Jul 25 2017 10:18
okayaj sends brownie points to @eladonline :sparkles: :thumbsup: :sparkles:
:warning: okayaj already gave eladonline points
elad ben aderet
@eladonline
Jul 25 2017 10:18
@okayaj thats ok i made thing like this too
good night
JkSue
@JkSue
Jul 25 2017 10:19
hi,what time is it?
dyon3334
@dyon3334
Jul 25 2017 10:19
javascript:When and why use the "this" method ?
JkSue
@JkSue
Jul 25 2017 10:19
i am in china
elad ben aderet
@eladonline
Jul 25 2017 10:22
@dyon3334 u use this method especially when you working with objects
dyon3334
@dyon3334
Jul 25 2017 10:22
@thanks elad can you be more specifick
dyon3334
@dyon3334
Jul 25 2017 10:26
@eladonline yes but i like to hear it from the community because i like to find out the common way to work
Stephen James
@sjames1958gm
Jul 25 2017 10:37
@dyon3334 this is not a method, it is a keyword/variable and refers to the current context of a function.
It is so you can access the object that a function has been called on.
Aita Kane
@aita-kane
Jul 25 2017 10:50
@JkSue hello 10:49 AM in Senegal
JkSue
@JkSue
Jul 25 2017 10:54
@aita-kane it feels a bit magical,do you?
18:54 in china
Aita Kane
@aita-kane
Jul 25 2017 10:55
@khanh2003 when i post it in codepen nothin appear can send you a zip ?
@JkSue totally :sparkles: :sparkles: lol
Adetayo Timilehin
@Sprimage
Jul 25 2017 11:01
Hi
I'm trying to code on my phone with quodq text editor
Somehow, i cant figure out how to link external CSS and js files to my HTML
Anybody here using quoda too?
Hi all,
Are there any good (free) image hosting sites to use for codepen for portfolio page usage? Thanks in advance
Dean
@SupernaturalDean
Jul 25 2017 11:49
blob
blob
blob
i want to know what's wrong with my "button" code ? Can anyone help me,please
Eric Weiss
@eweiss17
Jul 25 2017 12:13
@SupernaturalDean you forgot to close our the <i class with an ending "
jenmarti
@jenmarti
Jul 25 2017 12:15
@oatz I am also looking for a good FREE image hosting site. I was using Photobucket and now it's telling me I must upgrade to continue linking to third-party sites like codepen. So when anyone views my tribute page, its a oops icon!
@jenmarti I'm getting the exact same thing!
Dean
@SupernaturalDean
Jul 25 2017 12:23
@eweiss17 Thanks.I have to say you are really careful
CamperBot
@camperbot
Jul 25 2017 12:23
supernaturaldean sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 562 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jul 25 2017 12:25
@SupernaturalDean if you look at your code you can see that your tags are red. The fact that your ending </i> tag and </button> tag were not red was a large hint
@jenmarti @oatz i'm looking into it
@jenmarti @oatz if you guys trust google. https://photos.google.com/
Eric Weiss
@eweiss17
Jul 25 2017 12:30
I uploaded and got it to display on my pen, just click on it and right click (copy image address)
image host.PNG
jenmarti
@jenmarti
Jul 25 2017 12:33
@oatz found this in an old chat http://cloudinary.com
@oatz cloudinary looks awesome! I may try it. I don't like google for hosting purposes. Earlier I tried imageshack and it's good, but only a free trial
madhuri soni
@sonimadhuri
Jul 25 2017 12:36
@jenmarti you could also use postimage.io
*.org
jenmarti
@jenmarti
Jul 25 2017 12:36
@eweiss17 @sonimadhuri Thanks!
CamperBot
@camperbot
Jul 25 2017 12:36
jenmarti sends brownie points to @eweiss17 and @sonimadhuri :sparkles: :thumbsup: :sparkles:
:cookie: 563 | @eweiss17 |http://www.freecodecamp.com/eweiss17
:cookie: 335 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
Eric Weiss
@eweiss17
Jul 25 2017 12:37
gl, in the future you can just upload pictures to your repository
jenmarti
@jenmarti
Jul 25 2017 12:38
oh really?! cool I didn't know that!
Eric Weiss
@eweiss17
Jul 25 2017 12:40
image host.PNG
jenmarti
@jenmarti
Jul 25 2017 12:41
@eweiss17 HA!! how did I not know that? LOL Thank you. This should work perfect
CamperBot
@camperbot
Jul 25 2017 12:41
jenmarti sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:warning: jenmarti already gave eweiss17 points
Eric Weiss
@eweiss17
Jul 25 2017 12:42
do you know how to use github already?
that doesn't help you on codepen
jenmarti
@jenmarti
Jul 25 2017 12:42
I'm on github yes but I haven't done much with it
yet
newbie
Eric Weiss
@eweiss17
Jul 25 2017 12:46
@jenmarti you can do the projects on codepen just fine. In the future, try to get accustomed to github, as it is large in the coding industry
dyon3334
@dyon3334
Jul 25 2017 12:53
what is a function and when do you use it in your own words ?
Aita Kane
@aita-kane
Jul 25 2017 12:57
hello hello can someone help me with my css
please
plz check my codepen code..need help
Eric Weiss
@eweiss17
Jul 25 2017 12:59
@dyon3334 function just has code in it to be executed. what is the question?
@aita-kane post it, what is the problem?
Aita Kane
@aita-kane
Jul 25 2017 13:00
@eweiss17 in codepen nothing appear that's why i put it in zip is it okay for you?
Eric Weiss
@eweiss17
Jul 25 2017 13:00
what.... why in a zip , why doesn't it appear on codepen
Aita Kane
@aita-kane
Jul 25 2017 13:02
@eweiss17 maybe it's because of the scrollmagic i added and i don't have the links of them script
Eric Weiss
@eweiss17
Jul 25 2017 13:02
what is scroll magic? ii don't undestand
@rupamverma does that use JS?
Aita Kane
@aita-kane
Jul 25 2017 13:11
@eweiss17 that allow to make animation js
@eweiss17 but well my drop-down menu does'nt use that it's only css
Eric Weiss
@eweiss17
Jul 25 2017 13:15
it's hard to help without a visual representation or some code snippets
are you trying to use a framework by any chance and forgot to include it?
Aita Kane
@aita-kane
Jul 25 2017 13:19
@eweiss17 here is the pen : https://codepen.io/akane96/pen/MvYpgV
Eric Weiss
@eweiss17
Jul 25 2017 13:23
I don't know what you are trying to do man, i can't help if you don't describe your problem
Aita Kane
@aita-kane
Jul 25 2017 13:27
@eweiss17 actually i'm trying to do a drop-down menu .. when i hover on "Fruits Exotiques " to have dropdown menu
@eweiss17 and right now you see on my pen when i remove the visibility hidden you can already see that the drop-down is cut
Eric Weiss
@eweiss17
Jul 25 2017 13:30
are you doing it from raw css or are you trying to use bootstrap
Rupam Varma
@rupamverma
Jul 25 2017 13:41
Praveen Saraogi
@saraogipraveen
Jul 25 2017 14:10
I am having a problem . i dont have access to the server API , I am making an AJAX call to it to retrieve some data, so i wanted to ask if its possible to enable CORS on client side without that chrome extension.
image.png
if i use CORS chrome extension it works, but i want to know is it possible without that extension to make AJAX call to the server which dont add CORS in their headers or server that dont have CORS enabled
Jay Jariwala
@jayjariwala
Jul 25 2017 14:28
@rupamverma You may wanna start with learning css transition. checkout on youtube
Eric Weiss
@eweiss17
Jul 25 2017 14:31
@raviloop ..... format jsonp?
@jenmarti @eweiss17 @sonimadhuri thanks for the info! I'll be sure to check it out
CamperBot
@camperbot
Jul 25 2017 14:34
oatz sends brownie points to @jenmarti and @eweiss17 and @sonimadhuri :sparkles: :thumbsup: :sparkles:
:cookie: 336 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
:cookie: 123 | @jenmarti |http://www.freecodecamp.com/jenmarti
:cookie: 564 | @eweiss17 |http://www.freecodecamp.com/eweiss17
zealsham
@zealsham
Jul 25 2017 14:59
how do i implement role based acesss in node.js and express
:cactus:
Eric Weiss
@eweiss17
Jul 25 2017 15:05
:deciduous_tree:
Darren
@DarrenfJ
Jul 25 2017 15:10
morning fCC
Praveen Saraogi
@saraogipraveen
Jul 25 2017 15:12
@eweiss17 nope
passing data within url string
one of my ajax call :smile:

        $.ajax({
            url: "https://bulkpush.mytoday.com/BulkSms/SingleMsgApi?",
        type: "get",
        crossDomain: true,
         //send it through get method
        data: {
            jobname: 'RELSEC',
            feedid: '365430',
            password: 'jptpa',
            UserName: '8108292646',
            senderid: 'RELSEC',
            To: mobile,
            Text: 'Thank you for showing interest in opening a trading account with Reliance Securities. Your OTP is ' + otp

        },
        success: function(response) {
            //console.log( " success "+ otp + ' and mobile is '+mobile);
            //console.log(" Successful Request Made on " + (new Date().toLocaleString()));
        },
        error: function(xhr, err) {
            console.log("readyState: " + xhr.readyState + "\nstatus: " + xhr.status);
            console.log("Something went wrong when connecting on " +
                (new Date().toLocaleString()));
        }
    });
Kyle Holm
@thekholm80
Jul 25 2017 15:15
@DarrenfJ :wave:
Eric Weiss
@eweiss17
Jul 25 2017 15:15
do you need a key ?
@raviloop sorry, it's always hard to help people with non fcc related scenarios
Praveen Saraogi
@saraogipraveen
Jul 25 2017 15:18
@eweiss17 ohh
so can you help or guide me anyway
Eric Weiss
@eweiss17
Jul 25 2017 15:18
I can TRY i am not a professional or anything
Praveen Saraogi
@saraogipraveen
Jul 25 2017 15:22
@eweiss17 okay
wait i'll share you the link you try
so basically the problem is ,
when you enter the details i made a ajax call and i'm getting a response over http but not with https.
Darren
@DarrenfJ
Jul 25 2017 15:30
@thekholm80 hey buddy :D
catapulto
@catapulto
Jul 25 2017 15:30
hey @DarrenfJ
:wave:
Darren
@DarrenfJ
Jul 25 2017 15:31
@catapulto :wave:
catapulto
@catapulto
Jul 25 2017 15:32
whats up?
Eric Weiss
@eweiss17
Jul 25 2017 15:32
@raviloop sorry i am not sure i can help. I have gotten busy with work
Rishabh Kashyap
@iamrkcheers
Jul 25 2017 16:13

I am currently doing the 'Twitch.tv JSON API' challenge in the Front-End-Dev part of FCC.
However, I am not able to determine as to how to determine whether a channel is, currently, online or offline. I mean I have figured out what API call to make for individual channel ..

https://wind-bow.glitch.me/twitch-api/streams/ESL_SC2
// for channel 'ESL_SC2'

If it returns with 'stream=null', that means the channel is offline, and if it returns a json, that means it is live.
However, how to to determine on page load all the channels that are currently live and all those that are not.
Could you guys help me with that.
It'll be so great of you.
Thank You.

István Kozma
@Manfred28
Jul 25 2017 16:16

@iamrkcheers it might be simpler if you could link your project on codepen or some such, but anyway:

You are likely storing the data you get from the twitch api in some fashion. If you don't, you probably should.

so for each stream you might have something like

{
streamer: 'ayy',
gamePlayed: 'minesweeper',
offline: true
}

I honestly don't remember the file that the twitch api returns, so you might not even need to create a new object, and could just use that file
in this case, you would simply check if the object storing the data about the given stream has 'stream=null'
Bilal
@BilalSaqib
Jul 25 2017 16:25
hello every one
István Kozma
@Manfred28
Jul 25 2017 16:25
I looked back on my project, and at the time I simply created a div with the data I got from the api. In retrospect, I would rather create an array of objects that store all the relevant data you need - much easier to handle in the long run. Hope that helps
Bilal
@BilalSaqib
Jul 25 2017 16:27
@iamrkcheers listen ! you should read API documentation again. your problem will be solved easily !!!!
Rishabh Kashyap
@iamrkcheers
Jul 25 2017 16:27
@BilalSaqib ok thanks.
Bilal
@BilalSaqib
Jul 25 2017 16:29
@iamrkcheers first ! yous should be able to get full object by using API then further access stream property to check weather the channel is online or not.
you
EpicTriffid
@EpicTriffid
Jul 25 2017 16:53
Hey all. So my twitch feed is almost done, and I can push new requests to the usernames array and update the table to show the results. However, everytime i do, it pulls up a duplicate of the last entered search. Is there anyway to refresh the element, but not allow a repeat of the entry? https://codepen.io/EpicTriffid/pen/rwEmgQ
If you add a couple new channels, you'll see what i mean
dyon3334
@dyon3334
Jul 25 2017 16:59
javascript question: When and why use the "this" method ?
Ravi Kishore Thella
@ravikishorethella
Jul 25 2017 17:09
@dyon3334
When calling an object constructor or any of its methods, this refers to the instance of the object
When calling a function this remains the global object
Kyle Holm
@thekholm80
Jul 25 2017 17:09
what about a class?
Maitree Shah
@ms231197
Jul 25 2017 17:18
@thekholm80 A class is a group of similar objects.
Razvan
@razvanlikespizza
Jul 25 2017 17:23
@EpicTriffid That looks amazing...I dont know how to help xD
Rishabh Kashyap
@iamrkcheers
Jul 25 2017 17:26
When I click any of the streams, an alert with the value of the stream must pop up. But, as of right now, an alert pops up with nothing.
I am using '$(this).val()' for this.
Following is my code ..
https://codepen.io/iamrkcheers/pen/vJEZwY
Anyhelp is appreciated.
Thank You.
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 17:31
Can anyone help? Im trying to get my navbar to fill the width of the page. I tried setting the width to a 100% https://codepen.io/scodavinci/pen/dzPRda
Moisés Man
@moigithub
Jul 25 2017 17:33
@Scodavinci move it outside the "cols"
bootstrap cols add 15px padding to both sides....
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 17:35
@moigithub Thank you
CamperBot
@camperbot
Jul 25 2017 17:35
scodavinci sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3531 | @moigithub |http://www.freecodecamp.com/moigithub
Moisés Man
@moigithub
Jul 25 2017 17:39
right click inspect element help.. seems container-fluid also add paddings,,
put <nav> directly inside ur <header> @Scodavinci
hi anyone can help out here?
how to center my video?
Razvan
@razvanlikespizza
Jul 25 2017 17:55
@dragonmaiden Make a container ,set its width and then : margin: 0 auto; Try and see if it works.
Yash_Science
@yassh-pandey
Jul 25 2017 17:57
Hi guys i am learning javascript . i was just learning randomly as otherwise it gets boring . But due to some reason my code isn't working . here is my code .

<!DOCTYPE html>

<html>
<head>
<title>On_Click</title>
</head>
<body>
<input type="button" value="Click" onclick="click(event)" id="sex">
<script type="text/javascript">
function click(event) {
var details = "Event name" + event.type + "X Coordinate" + event.clientX +"Target Type" + event.target.type + "Target tag name" + event.target.tagName ;
document.getElementById("sex").innerHTML = details ;

}
</script>
</body>
</html>

it would be a great help if you could help me fix the problem .
Rishabh Kashyap
@iamrkcheers
Jul 25 2017 17:58
I am currently doing the 'Twitch.tv JSON API' challenge in the 'Front-End-Dev' part of FCC.
However, I am not able to figure out how to determine whether a particular stream account has been deleted (as the 4th user story requires us to do).
Does anyone know how to do this.
Following is my code ..
https://codepen.io/iamrkcheers/pen/vJEZwY
Thank You.
dragonmaiden
@dragonmaiden
Jul 25 2017 17:59
@razvanlikespizza i did my videocenter is the container
but only left and right is centered top and bottom is not
Rishabh Kashyap
@iamrkcheers
Jul 25 2017 18:00
Razvan
@razvanlikespizza
Jul 25 2017 18:00
@dragonmaiden Google: vertical align video
Jan Shah
@JanShah
Jul 25 2017 18:01
@iamrkcheers I think the api returns an error message for invalid users? have you tried logging the output to see what you get
Alexander Køpke
@alexanderkopke
Jul 25 2017 18:02
Yash_Science
@yassh-pandey
Jul 25 2017 18:03
<!DOCTYPE html>
<html>
<head>
    <title>On_Click</title>
</head>
<body>
<input type="button" value="Click" onclick="click(event)" id="sex">
<script type="text/javascript">
    function click(event) {
        var details = "Event name" + event.type + "X Coordinate" + event.clientX +"Target Type" + event.target.type + "Target tag name" + event.target.tagName ; 
        document.getElementById("sex").innerHTML = details ; 

    }
</script>
</body>
</html>
sorry guys , i am new so didnt know about that functionality . thanks anyway .
Rishabh Kashyap
@iamrkcheers
Jul 25 2017 18:08
@CentropyIT it returns only 2 kind of responses.
if the stream does not exist or is offline, then, 'stream=null' and if the stream is live, then, 'stream=(some JSON)'.
dyon3334
@dyon3334
Jul 25 2017 18:08
javascript :done with codecamp whats next? any suggestion for video tutorials ?
Jan Shah
@JanShah
Jul 25 2017 18:09
@iamrkcheers what about if you go own users route?
Rishabh Kashyap
@iamrkcheers
Jul 25 2017 18:13
@CentropyIT thanks.
CamperBot
@camperbot
Jul 25 2017 18:13
iamrkcheers sends brownie points to @centropyit :sparkles: :thumbsup: :sparkles:
:warning: @centropyit's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Darren
@DarrenfJ
Jul 25 2017 18:18
man oh man having one of those days where i can;t get anything done :/
Kyle Holm
@thekholm80
Jul 25 2017 18:19
@DarrenfJ i suggest youtube and twitter. if you're not going to get anything done, at least have some fun
Darren
@DarrenfJ
Jul 25 2017 18:20
@thekholm80 good plan ;)
Kyle Holm
@thekholm80
Jul 25 2017 18:20
and if you're feeling really brave, Reddit
Darren
@DarrenfJ
Jul 25 2017 18:20
i have a release going to prod Monday that I'm testing with a team as well as somehow catapult into running the stand-up meetings.. bah! Management BAH!
what I really need is time off with martinis and cigars or being dropped via helicopter out of cellphone range
Kyle Holm
@thekholm80
Jul 25 2017 18:21
my company forgets that i exist until they need me, which is rare
Darren
@DarrenfJ
Jul 25 2017 18:21
or a cloak of invisibility
or sumptin'
ok back to the slog
Kyle Holm
@thekholm80
Jul 25 2017 18:23
give 'em hell
Darren
@DarrenfJ
Jul 25 2017 18:23
thanks for listening to me complain ;)
thanks @thekholm80
CamperBot
@camperbot
Jul 25 2017 18:23
darrenfj sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1367 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:24
if you can't get anything done, shout at your code
then sleep
Kyle Holm
@thekholm80
Jul 25 2017 18:24
my poor code
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:24
they gotta treat us well so we can do the same :smile:
we ain't writing them for nothing
for errors*
Kyle Holm
@thekholm80
Jul 25 2017 18:25
my code is like a kid who's parents were related. it's special, but not in a way you'd want to be special
Robert Parasca
@robertparasca
Jul 25 2017 18:26
hi guys
Kyle Holm
@thekholm80
Jul 25 2017 18:26
@leaguu :wave:
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:26
@thekholm80 my code is like that annoying kid that does what he wants
Robert Parasca
@robertparasca
Jul 25 2017 18:26
i want to learn web design
what i mean by web design is the concepts of it, "how to" and so on
Kyle Holm
@thekholm80
Jul 25 2017 18:26
@leaguu sign up for freecodecamp.org and start going through the lessons
Robert Parasca
@robertparasca
Jul 25 2017 18:27
i already know frontend and backend
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:27
@leaguu please take me with you
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:27
so what don't u know?
Robert Parasca
@robertparasca
Jul 25 2017 18:27
web design
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:27
I am terrible at designing
Robert Parasca
@robertparasca
Jul 25 2017 18:27
how to make awesome templates
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:27
@diomed hey kitten :hand:
Kyle Holm
@thekholm80
Jul 25 2017 18:27
@diomed have you seen this rock group?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:27
@leaguu same bro same
Robert Parasca
@robertparasca
Jul 25 2017 18:28
@ahmedtarek2134 that's why i want to learn it. because i am a horrible web designer
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:28
hello @ahmedtarek2134 :cat:
Robert Parasca
@robertparasca
Jul 25 2017 18:28
i want to learn to make PSD files
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:28
@leaguu there are courses
Yash_Science
@yassh-pandey
Jul 25 2017 18:28
any java script expert here ?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:28
but they are paid
Robert Parasca
@robertparasca
Jul 25 2017 18:28
any free coursers, @ahmedtarek2134 ?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:28
@leaguu I know how to deal with photoshop, no imagination though
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:29
@thekholm80 oh, I get it. I get the 2/3rds of a joke
Robert Parasca
@robertparasca
Jul 25 2017 18:29
i also know photoshop
a bit to be honest
just the basics i needed to slice psd files
Kyle Holm
@thekholm80
Jul 25 2017 18:29
@diomed lol
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:29
@yassh-pandey yess, plenty. just ask
Kyle Holm
@thekholm80
Jul 25 2017 18:29
@diomed The Rock, Chris Rock and Kid Rock
Robert Parasca
@robertparasca
Jul 25 2017 18:30
but i could really use some tutorials to learn me the concepts
because i am sure there are some concepts behind the scenes
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:30
can't find
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:30
@thekholm80 oh ok. so that's kid rock. lol
Kyle Holm
@thekholm80
Jul 25 2017 18:30
#thatsthejoke
lol
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:31
well I told u. I got the joke
Yash_Science
@yassh-pandey
Jul 25 2017 18:31
@diomed
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:31
just didn't know who the 3rd rock was :yum:
Yash_Science
@yassh-pandey
Jul 25 2017 18:31
<!DOCTYPE html>
<html>
<head>
    <title>On_Click</title>
</head>
<body>
<input type="button" value="Click" onclick="click(event)" id="yy">
<script type="text/javascript">
    function click(event) {
        var details = "Event name" + event.type + "X Coordinate" + event.clientX +"Target Type" + event.target.type + "Target tag name" + event.target.tagName ; 
        document.getElementById("yy").innerHTML = details ; 

    }
</script>
</body>
</html>
Kyle Holm
@thekholm80
Jul 25 2017 18:31
I guess kid rock probably isn't all that popular in croatia
he's not exactly popular here in the us either
Yash_Science
@yassh-pandey
Jul 25 2017 18:32
this code doesnt work . i dont know whats the problem with it .
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:32
I heard of him. I just can't bother to know faces of all celebrities.
Kyle Holm
@thekholm80
Jul 25 2017 18:33
@yassh-pandey document.getElementById("yy").innerHTML = details ; why are you setting the button text to the results of the function?
well, actually the <input> doesn't even have an inner html
Yash_Science
@yassh-pandey
Jul 25 2017 18:36
well , i saw a video tutorial . in which a guy did the same thing and his code worked . so i was tryimg to practice the code but it didnt work in my case . The purpose is to replace the button text with the new text stored in the variable .
the button vanished in his case and the string appeared .
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 18:43
I need help with my starwars autoscroller: https://codepen.io/jamesjpk123/pen/dzPdGv.
For some reason, my JS is not autoscrolling down. Also, the user cannot manually scroll down. Can someone help me?
It doesn't work in the Gitter preview window
you need to go on the actual pen
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:45
@jamesjpk123 well, u have some error in js
click on Analyze & u'll see it
@thekholm80 probably knows more ...
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 18:47
Can someone tell me why my drop down menu is dropping behind the content on my page? https://codepen.io/scodavinci/pen/dzPRda
Robert Parasca
@robertparasca
Jul 25 2017 18:47
@ahmedtarek2134
you still here, my friend?
@ahmedtarek2134
https://webdesign.tutsplus.com/
look what i found
have fun
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 18:48
Ok @diomed, I fixed the JS so the linter doesn't say that anything is wrong, but it still doesn't work
New JS:
Kyle Holm
@thekholm80
Jul 25 2017 18:48
@jamesjpk123 where's your jQuery?
if you're going to use jQuery you need to add it to your project
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:48
Yessss
Thank your brother
Sorry I was easing delicious pizza 😋😋
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 18:49
Oh i forgot to add that into my codepen! Thanks @thekholm80
CamperBot
@camperbot
Jul 25 2017 18:49
jamesjpk123 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1368 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 18:50
eating*
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:50
bon apetit
Kyle Holm
@thekholm80
Jul 25 2017 18:50
@jamesjpk123 i got it to work but dang it scrolls fast lol
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 18:51
Yeah xD Going to change the speed :D
Thank you @diomed for also helping!
CamperBot
@camperbot
Jul 25 2017 18:51
jamesjpk123 sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5186 | @diomed |http://www.freecodecamp.com/diomed
May Kittens Devour Your Soul
@diomed
Jul 25 2017 18:52
in a galaxy fast, fast away
Kyle Holm
@thekholm80
Jul 25 2017 18:52
i like how the text grows so at the end you only see a few letters, then it all slams into reverse
Kenneth-Brisco
@Kenneth-Brisco
Jul 25 2017 18:53
Can someone tell me why my drop down menu is dropping behind the content on my page? https://codepen.io/scodavinci/pen/dzPRda
Kyle Holm
@thekholm80
Jul 25 2017 18:53

like it's saying

oops, lemme try that again

James Patrick Kerrane
@jamesjpk123
Jul 25 2017 18:55
Yeah xD
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 19:02
Oh um
going to delete this now that Gitter has a flaw with this
Apparently I can activate alerts in gitter
isn't that fun
Kyle Holm
@thekholm80
Jul 25 2017 19:02
image.png
rofl
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 19:03
Is gitter open source? Maybe there is some way to block it xD
Kyle Holm
@thekholm80
Jul 25 2017 19:03
the alert comes from your page lol
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 19:03
lol
With this same concept, I made a subreddit that does something like the pen: https://www.reddit.com/r/Owl24/
@thekholm80
Kyle Holm
@thekholm80
Jul 25 2017 19:05
never seen that on reddit before
James Patrick Kerrane
@jamesjpk123
Jul 25 2017 19:05
yeah xD
Oh if only r/starwars saw this xD
Robert Parasca
@robertparasca
Jul 25 2017 19:10
@ahmedtarek2134 thanks, but i am starving here
CamperBot
@camperbot
Jul 25 2017 19:10
leaguu sends brownie points to @ahmedtarek2134 :sparkles: :thumbsup: :sparkles:
:cookie: 579 | @ahmedtarek2134 |http://www.freecodecamp.com/ahmedtarek2134
May Kittens Devour Your Soul
@diomed
Jul 25 2017 19:14
.
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 19:14
@leaguu come have some pizza :smile:
@diomed nooooooo
May Kittens Devour Your Soul
@diomed
Jul 25 2017 19:48
@eweiss17 are u here?
who is here?
Eric Weiss
@eweiss17
Jul 25 2017 19:49
@diomed goat
dyon3334
@dyon3334
Jul 25 2017 19:49
javascript: == vs === ?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 19:50
@eweiss17 bwaaaah! @ your serviceeeeee
@eweiss17 can I have it like this : keywords: ['word anotherword']
or does it have to be dash between
Eric Weiss
@eweiss17
Jul 25 2017 19:53
@diomed for what?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 19:54
for JS
Eric Weiss
@eweiss17
Jul 25 2017 19:55
for an object?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 19:56
I guess. like this
  moment.holidays.croatia = {
    "Nova Godina": {
      date: '1/1',
      keywords: ['nova godina']
    },
Eric Weiss
@eweiss17
Jul 25 2017 19:58
oh boy, you are gonna ruin the illusion that I am good at js now
is that an object within an object?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 19:59
:yum:
I think so. wait. I'llshow u
Ross Scarborough
@SourceHorse
Jul 25 2017 19:59
anyone here familiar with the random code generator project?
dyon3334
@dyon3334
Jul 25 2017 19:59
when to use the this statement to navigate to a object ?
Ross Scarborough
@SourceHorse
Jul 25 2017 20:00
i have a very simple prototype. i was wondering if anyone could tell me if i'm going in the right direction
Eric Weiss
@eweiss17
Jul 25 2017 20:01
@dyon3334 as far as i am aware when it is the object in context...
Kyle Holm
@thekholm80
Jul 25 2017 20:01
@SourceHorse you got me all excited with 'random code generator'. then i saw a quote generator
Eric Weiss
@eweiss17
Jul 25 2017 20:02
IT is great when you have something such as
Ross Scarborough
@SourceHorse
Jul 25 2017 20:02
oops
Eric Weiss
@eweiss17
Jul 25 2017 20:02
when you press a button, animate it to bounce
Ross Scarborough
@SourceHorse
Jul 25 2017 20:02
sorry about the mistype
quote generator :/
niklooptriks
@niklooptriks
Jul 25 2017 20:02

<?php
include 'settings.php';

if(isset($_POST['submit'])){
$to = $_POST['receiver']; // Receiver's Email address
$from = $_POST['email']; // Sender's Email address
$full_name = $_POST['full_name'];
$telephone = $_POST['telephone'];
$url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$subject = $_POST['campaign'];
$msg = $_POST['msg'];
$message = $full_name . "\n" . $telephone . "\n" . $from . "\n Message:" . $msg . "\n\n Affiliate:" . $_GET['affid'] . "\n\n Promoted:" . $_GET['promo'] . "\n\n" . $url;

$headers = "From: $from\r\nBcc: $rebcc\r\n";
mail($to,$subject,$message,$headers);
header($redirect); // Write in the URL you want to redirect!
// echo "<center><b>ההודעה נשלחה בהצלחה</b></center>";
// You can also use header('Location: thank_you.php'); to redirect to another page.
}

?>

Eric Weiss
@eweiss17
Jul 25 2017 20:02
$("button").click(function() {
$(this).animate
will animate the one u clicked
Kyle Holm
@thekholm80
Jul 25 2017 20:03
@SourceHorse haha no worries, i just thought the machines were getting closer to programming themselves
i for one welcome our new robot overlords
Ross Scarborough
@SourceHorse
Jul 25 2017 20:03
@thekholm80 as long as they work for me
Eric Weiss
@eweiss17
Jul 25 2017 20:03
@diomed okay..... need to decipher this line
  var moment = (typeof require !== 'undefined' && require !== null) && !require.amd ? require('moment') : this.moment;
Ross Scarborough
@SourceHorse
Jul 25 2017 20:04
@thekholm80 Does it matter the size of our quote pool for this project? or is it the functionality that is more important?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:04
why would u need to decypher that one?
Kyle Holm
@thekholm80
Jul 25 2017 20:04
@SourceHorse i'm not sure it matters. I used an api to get my quotes so I have no idea how many were available
Eric Weiss
@eweiss17
Jul 25 2017 20:04
they use the moment right here
moment.holidays.canada = {
Ross Scarborough
@SourceHorse
Jul 25 2017 20:05
how can one find this api?
Kyle Holm
@thekholm80
Jul 25 2017 20:05
google, my good man
google
Ross Scarborough
@SourceHorse
Jul 25 2017 20:05
just nrandom quote api?
Kyle Holm
@thekholm80
Jul 25 2017 20:05
Eric Weiss
@eweiss17
Jul 25 2017 20:06
so that can be...
if ((typeof require !== 'undefined' && require !== null) && !require.amd === true) {
    require('moment')
}
else {
    this.moment
}
Ross Scarborough
@SourceHorse
Jul 25 2017 20:06
@thekholm80 thanks for the tips
CamperBot
@camperbot
Jul 25 2017 20:06
sourcehorse sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1370 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Jul 25 2017 20:07
@SourceHorse the api i used doesn't seem to be returning anything now lol
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:07
@thekholm80 hmm can I ask you about something ?
I am banging my head, uugggghhhh
Ross Scarborough
@SourceHorse
Jul 25 2017 20:07
@thekholm80 i noticed that too, have to find another
Eric Weiss
@eweiss17
Jul 25 2017 20:07
okay so moment is https://momentjs.com/
Kyle Holm
@thekholm80
Jul 25 2017 20:07
@ahmedtarek2134 please direct all questions to @diomed
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:07
no no he won't understand :smile:
anyway
Kyle Holm
@thekholm80
Jul 25 2017 20:07
lol yeah, what's up?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:08
so I am trying to make this regex expression work
I want an expression to follow npm versioning
Kyle Holm
@thekholm80
Jul 25 2017 20:08
oh, regexp is my kryptonite
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:08
lemme show you wait
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:08
:cat: is dum dum
@ahmedtarek2134 solves :cat: s problems
Kyle Holm
@thekholm80
Jul 25 2017 20:09
:goat: is smart though
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:09
validate: (input) => {
            if(/^\d\.\d\.\d$/.test(input)) { // check if the input follows the patten of x.x.x
                return true
            }
            else {
                return `Invalid version, try again :(` // if input is not in the pattern, return that error
            }
        }
this works
but if you try to like
input 11.0.0
since \d is only from 0 to 9
it doesn't work
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:09
u need dd
:yum:
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:10
if dd, 9.0.0 or like that won't work
Kyle Holm
@thekholm80
Jul 25 2017 20:10
well, 11 is 2 digits
so it gets the first 1
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:10
it'll have to be 09
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:10
yeah that's the problem
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:10
like a clock
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:11
I need it to match a specific pattern
if you wanna see what I am talking about, run npm install -g initior then go to an empty directory and run init
@diomed why 09 ???? :smile:
version 09.09.09
Kyle Holm
@thekholm80
Jul 25 2017 20:13
maybe something like /^(\d|\d\d)\.\d\.\d$/?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:14
oh what is that |
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:14
don't ask me, I don't work here
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:14
never seen it before
Kyle Holm
@thekholm80
Jul 25 2017 20:14
it should be an or operator
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:14
^carot
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:14
/^(\d|\d\d)\.(\d|\d\d)\.(\d|\d\d)$/ or like that?
Kyle Holm
@thekholm80
Jul 25 2017 20:14
worth a shot?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:14
because you might want 1.0.11 for example
May Kittens Devour Your Soul
@diomed
Jul 25 2017 20:14
she wants the d
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:15
yah lemme see actually
hahahahahahaha @diomed
ommmlllll
@thekholm80 thank you so much, it works
CamperBot
@camperbot
Jul 25 2017 20:15
ahmedtarek2134 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1371 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:15
yaaaaaaaaassssssss
Kyle Holm
@thekholm80
Jul 25 2017 20:15
super
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:16
I hate regex expressions, but thank to uncle Kyle...we set :smile:
thanks*
Kyle Holm
@thekholm80
Jul 25 2017 20:16
i've never been able to write a regexp without googling
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:16
same :smile:
I have an application called dash
its all about documentations
I have regex documentation on there
still I get stuck :smile:
Kyle Holm
@thekholm80
Jul 25 2017 20:17
I just found out Postman was done in Electron. All the cool things are in Electron now
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:18
Atom is made with Electron
Kyle Holm
@thekholm80
Jul 25 2017 20:18
yeah
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:18
tbh I feel like 5 years and everyone will use javascript for everything
Kyle Holm
@thekholm80
Jul 25 2017 20:18
Atom, VS Code, Discord, Slack
I'm enjoying playing with it
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:19
I mean, React Native, Electron, React VR
also Weex, excited about that
Kyle Holm
@thekholm80
Jul 25 2017 20:19
interesting
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:20
I don't like React Native though
Kyle Holm
@thekholm80
Jul 25 2017 20:20
I've not tried it
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:20
sticking with flexbox is just not cool for me
Kyle Holm
@thekholm80
Jul 25 2017 20:20
I'm doing React in Electron right now
wait, flexbox is awesome
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:20
its basically doing everything with flexbox
it is
but not doing everything in it
like no
Kyle Holm
@thekholm80
Jul 25 2017 20:21
the only better layout tool i've found is Grid, and it has almost 0 support
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:21
also
you can't use % measurments
Jan Shah
@JanShah
Jul 25 2017 20:21
support is improving for grid @thekholm80
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:21
or vh nor vw
Kyle Holm
@thekholm80
Jul 25 2017 20:21
@JanShah and it's only getting better!
i'm excited
@ahmedtarek2134 wait, so do you just build different uis for every device size?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:23
no, you do that in flexbox
flex: whatever;
Kyle Holm
@thekholm80
Jul 25 2017 20:23
i guess with flex-grow it wouldn't be too awful
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:23
wait
wair
apparently
styled-components support react native!!!!
hmm guess I know what I am doing this night
Kyle Holm
@thekholm80
Jul 25 2017 20:24
like Glamour?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:24
do you know styled-components
?
Kyle Holm
@thekholm80
Jul 25 2017 20:24
nope
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:24
oh goodddddd
Kyle Holm
@thekholm80
Jul 25 2017 20:24
i do old-fashioned css / scss
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:24
oke lemme share a snippet
Jan Shah
@JanShah
Jul 25 2017 20:24
it is awesom @ahmedtarek2134
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:24
@JanShah it is
Jan Shah
@JanShah
Jul 25 2017 20:25
I've used it in a recent react project, trying to follow 'best practice' for components
Kyle Holm
@thekholm80
Jul 25 2017 20:26
most of the 'react gods' use some kind of css-in-js now, i don't know how i feel about that
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:26
import React, { Component } from 'react'
import styled from 'styled-components'

const Wrapper = styled.div`
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
`

class Yooo extends Component {
    render() {
        return (
            <Wrapper></Wrapper>
        )
    }
}

export default Yooo
that's styled components
Kyle Holm
@thekholm80
Jul 25 2017 20:27
yeah, not sure i can love that either
separation of concerns and all that
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:27
you can also add like variables, props and such because of the ${} es6 syntax
which makes it cool
Jan Shah
@JanShah
Jul 25 2017 20:27
yep, and you can add all kinds of conditions when you have it in javascript, use props to alter anything, make customisable reusable components
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:27
you can also extend a styled component
and change a property
its nice when you want themes and maybe a dark and light modes for your website and such
Kyle Holm
@thekholm80
Jul 25 2017 20:29
https://github.com/paypal/glamorous this is what is super popular with the folks i follow on twitter
Christopher McCormack
@cmccormack
Jul 25 2017 20:29
is that template literal syntax appended to the styled.div specific to styled-components?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:29
@cmccormack yeah
@thekholm80 styled-components is more popular
@thekholm80 https://github.com/styled-components/styled-components it has almost 9k stars
Kyle Holm
@thekholm80
Jul 25 2017 20:30
yeah, but 2k stars in a month isn't that bad lol
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:31
@thekholm80 this is the same as styled-components
but
you don't write pure css
like
you have to write alignItems not align-itemse
items*
because its an object
Jan Shah
@JanShah
Jul 25 2017 20:32
they're both following the same principles, put everything into the component
Kyle Holm
@thekholm80
Jul 25 2017 20:32
I still like my plain css and scss
I must be getting old and set in my ways
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:32
@thekholm80 I still like my vue components
Kyle Holm
@thekholm80
Jul 25 2017 20:33
someday i might try vue
Jan Shah
@JanShah
Jul 25 2017 20:33
one thing they both don't have which I think should be useful is the ability to style parent components
they do but unstable
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:34
@thekholm80 here's vue templates
<template lang="pug">
    .header 
        h1 {{ name }}
</template>

<script>
    export default {
        data() {
            return {
                name: 'Ahmed Tarek'
            }
        }
    }
</script>

<style lang="stylus" scoped>
    .header
        height 100vh
        width 100vw
        display flex
        align-items center
        justify-content center
</style>
Kyle Holm
@thekholm80
Jul 25 2017 20:34
hmm, i wonder if you could put the style into a redux store so that other components could access / modify it? @JanShah
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:34
@thekholm80 if you can store that style in a varibale
variable
then you can yes
@thekholm80 vue templates use lang="" to work the magic of preprocessors
you just install the webpack loader for that preprocessor
and specify the lang
done!
Jan Shah
@JanShah
Jul 25 2017 20:35
@thekholm80 or you can store it's values and pass them as props, one component, unlimited styles
Kyle Holm
@thekholm80
Jul 25 2017 20:35
i dislike that vue and angular expect me to learn their own language
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:35
@thekholm80 vue doesn't have own language
you write html
delete that lang="pug"
you write html then
Ayush Mahajan
@ay2306
Jul 25 2017 20:36
Hey guys this is my form. Now I get 3 inputs in 3 different lines when screen is small but how to that when its not.
If i use br, it will be there when screen is small as well creating extra space between elements
<form>
    <input type='text' name='first_name' class='text_box_1 col-xs-12 col-md-4' placeholder='First name'>
    <input type='text' name='last_name' class='text_box_1 col-xs-12 col-md-4' placeholder='Last name'>
    <input type='text' name='user_name' class='text_box_1 col-xs-12 col-md-4' placeholder='Choose a username'>
</form>
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:36
I like to write pug
that's why
Kyle Holm
@thekholm80
Jul 25 2017 20:36
@ahmedtarek2134 https://vuejs.org/v2/api/#Directives this is a vue-specific language
Jan Shah
@JanShah
Jul 25 2017 20:37
@ay2306 are you using bootstrap 3 or 4?
Ayush Mahajan
@ay2306
Jul 25 2017 20:37
@JanShah bootstrap 3
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:37
@thekholm80 they are just html attributes, but you still write html
and only moustache thingies
Kyle Holm
@thekholm80
Jul 25 2017 20:38
so it will work in any html?
not just Vue?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:38
@thekholm80
<template>
    <div class="header">
        <h1>{{ name }}</h1>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                name: 'Ahmed Tarek'
            }
        }
    }
</script>

<style lang="stylus" scoped>
    .header
        height 100vh
        width 100vw
        display flex
        align-items center
        justify-content center
</style>
@thekholm80 you can include the vue cdn and write html normally
Christopher McCormack
@cmccormack
Jul 25 2017 20:38

@ay2306 can you explain this a bit?

Now I get 3 inputs in 3 different lines when screen is small but how to that when its not.

Jan Shah
@JanShah
Jul 25 2017 20:38
@ay2306 it's not putting any gaps in when I try it in codepen
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:38
you don't have to write vue in vue components
Jan Shah
@JanShah
Jul 25 2017 20:40
@ay2306 if you want three lines at full width, just remove col-md-4 or replace both cols with col-md-12 or just col
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:40
@thekholm80 have a look
Ayush Mahajan
@ay2306
Jul 25 2017 20:40
@JanShah @cmccormack I want my three different inputs to be on 3 different lines.
Now when screen is small i have assigned each input to col-xs-12, but when screen is big I want them to occupy 1/3 of width ie col-md-4 but still want them on three different lines
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:41
@ay2306 offset?
Kyle Holm
@thekholm80
Jul 25 2017 20:41
@ahmedtarek2134 it's cool, but i still like react better
Jan Shah
@JanShah
Jul 25 2017 20:41
@ay2306 wrap them in col-md-4 and tag them col-md-12
Ayush Mahajan
@ay2306
Jul 25 2017 20:42
@JanShah that makes it easy. thanks
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 20:42
@thekholm80 both are amazing in my opinion, I can't choose any of them over the other
CamperBot
@camperbot
Jul 25 2017 20:42
ay2306 sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 473 | @janshah |http://www.freecodecamp.com/janshah
Christopher McCormack
@cmccormack
Jul 25 2017 20:42
if you put col in col you may get some padding/margin issues
Aita Kane
@aita-kane
Jul 25 2017 20:44
hello do you guys think that it's possible to create a table in html and put images in it ?
Christopher McCormack
@cmccormack
Jul 25 2017 20:45
@ay2306 perhaps you want this - it basically uses form-group as a row so each field is on its own row but you can still manipulate the column width: http://getbootstrap.com/css/#forms-horizontal
Jan Shah
@JanShah
Jul 25 2017 20:45
@aita-kane might be..
Ayush Mahajan
@ay2306
Jul 25 2017 20:46
@cmccormack i solved that issue but thanks.. But please give review to my solution
<form>
    <div class='row'><input type='text' name='first_name' class='text_box_1 col-xs-12 col-md-4' placeholder='First name'></div>
    <div class='row'><input type='text' name='last_name' class='text_box_1 col-xs-12 col-md-4' placeholder='Last name'></div>
    <div class='row'><input type='text' name='user_name' class='text_box_1 col-xs-12 col-md-4' placeholder='Choose a username'></div>
</form>
CamperBot
@camperbot
Jul 25 2017 20:46
ay2306 sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1052 | @cmccormack |http://www.freecodecamp.com/cmccormack
Aita Kane
@aita-kane
Jul 25 2017 20:46
@JanShah ok that's what i want to try ... hope it will work
Jan Shah
@JanShah
Jul 25 2017 20:46
<table><tr><td class="whyyyyy!"><img src="i-prefer-divs.jpg"></td></tr></table>
Kyle Holm
@thekholm80
Jul 25 2017 20:47
wait, you can still use tables?
Jan Shah
@JanShah
Jul 25 2017 20:47
@aita-kane table has it's uses
Kyle Holm
@thekholm80
Jul 25 2017 20:47
I assumed they were removed decades ago
Aita Kane
@aita-kane
Jul 25 2017 20:48
@thekholm80 oh what are they replaced by
Kyle Holm
@thekholm80
Jul 25 2017 20:48
@aita-kane i don't follow
Aita Kane
@aita-kane
Jul 25 2017 20:49
@JanShah okk thx
CamperBot
@camperbot
Jul 25 2017 20:49
aita-kane sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 474 | @janshah |http://www.freecodecamp.com/janshah
Pagnito
@Pagnito
Jul 25 2017 20:52
svg animations help?
Christopher McCormack
@cmccormack
Jul 25 2017 20:52
@ay2306 I don't believe you need to specify col-xs-12, I think that's the only size the xs supports anyhow
Scorpi10
@Scorpi10
Jul 25 2017 21:05
Hello
Gulsvi
@gulsvi
Jul 25 2017 21:05

@ay2306

<form>
  <div class="row">
    <div class="col-xs-12 col-md-4">
      <input type='text' name='first_name' class='text_box_1' placeholder='First name'>
    </div>
    <div class="col-xs-12 col-md-4">
      <input type='text' name='last_name' class='text_box_1' placeholder='Last name'>
    </div>
    <div class="col-xs-12 col-md-4">
      <input type='text' name='user_name' class='text_box_1' placeholder='Choose a username'>
    </div>
  </div>
</form>

Unfortunately, bootstrap requires a lot of <div> elements. The above makes it so your <input> elements are 33% the width of one row (3 across) on md screens and larger. 100% wide below that.

The below puts each <input> element on its own line, 33% wide on md and larger screens:

<form>
  <div class="row">
    <div class="col-xs-12 col-md-4">
      <input type='text' name='first_name' class='text_box_1' placeholder='First name'>
    </div>
  </div>
  <div class="row">
    <div class="col-xs-12 col-md-4">
      <input type='text' name='last_name' class='text_box_1' placeholder='Last name'>
    </div>
  </div>
  <div class="row">
    <div class="col-xs-12 col-md-4">
      <input type='text' name='user_name' class='text_box_1' placeholder='Choose a username'>
    </div>
  </div>
</form>
Kyle Holm
@thekholm80
Jul 25 2017 21:06
man styled components / glamorous really adds bulk to my component code
Scorpi10
@Scorpi10
Jul 25 2017 21:06
Do you know prolog language between us ?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:06
@thekholm80 that is true and one of the things I still use stylus
but like with react native
styled-components is a must
Kyle Holm
@thekholm80
Jul 25 2017 21:07
I think i will read up on both and pick one to try in my next project
or, maybe shoe-horn in one of them in my current project, since i'm still wire-framing it
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:19
— The Travis CI build failed
How bad is this from 1 - 12?
Kyle Holm
@thekholm80
Jul 25 2017 21:20
why did it fail?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:20
coz :cat: wrote it
Kyle Holm
@thekholm80
Jul 25 2017 21:20
still working on your translation?
Joshua Waller
@Obscureether1
Jul 25 2017 21:23
hey all
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:24
@thekholm80 ummm. no. this is different. could u check it, pls kodie/moment-holiday#1
@ahmedtarek2134 do locale 4 your country: https://github.com/kodie/moment-holiday/tree/master/locale
or countries
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:26
wait whut
what is that?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:27
A Moment.js plugin for handling holidays.
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:27
I don't know all the holidays that we have :smile:
will wait for my mom to tell me :smile:
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:28
sure. make it a family project :)
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:28
hahaha
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:29
who else, who else.... thinkmoji
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:29
we have a lot of holidays in the arab world here....specially Egypt cause the pharaohs
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:29
hmmm.... I know. @ivancsicsmarkus could make 1 for Hungarian
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:29
we have special holidays since the pharaohs
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:30
so every fortnight is day off?
@thekholm80 I don't understand that. what does it want?
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:31
no :smile:
Kyle Holm
@thekholm80
Jul 25 2017 21:31
@diomed the test says
test('holidaysBetween_2', function(t){
  var w = moment('2010-10-03').holidaysBetween('2010-10-10');
  t.false(w);
});
not sure what the library does, tbh lol
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:32
@thekholm80 @diomed doesn't know what is a test
@thekholm80 one question here
I am getting downloads on npm, views on github but stars....not quite. On Initior
why is that????
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:34
can u specifically tell me what's wrong ? @thekholm80
Kyle Holm
@thekholm80
Jul 25 2017 21:34
@diomed it looks like it's this:
"Dan neovisnosti": {
 +                date: '10/8',
 +                keywords: ['neovisnosti', 'nezavisnosti', 'independence']
 +            },
they don't think you should have a holiday between oct 3 and oct 10
just guessing, though
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:35
lol
Kyle Holm
@thekholm80
Jul 25 2017 21:35
@ahmedtarek2134 no clue, i don't get stars or downloads
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:35
I got 80 npm downloads just today
415 views on github
but only 4 stars
its weird
Kyle Holm
@thekholm80
Jul 25 2017 21:36
maybe everyone's trying it but nobody likes it?
:shrug:
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:36
.
Kyle Holm
@thekholm80
Jul 25 2017 21:36
i lose twitter followers faster than i gain them, i can't help you get 'likes'
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:36
:cry:
well
at least I got 77 stars on Butns :yum:
Kyle Holm
@thekholm80
Jul 25 2017 21:37
how many stars do you need to win?
Aleksander Gębicki
@Takumar
Jul 25 2017 21:37
@diomed hide from rain somewhere
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:37
win what exactly?
there is no winning on github :smile:
Kyle Holm
@thekholm80
Jul 25 2017 21:37
i dunno? seems like the score is important
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:38
@thekholm80 u need exactly 250 :star2: to win
Kyle Holm
@thekholm80
Jul 25 2017 21:38
then that's what i'll get
by golly
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:38
then fav :star: bot retweets u and u're famous
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:39
oh gof
god
guys
React is in the CLI too :face-palm-if-there-is-one:
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:41
basically when u reach over 1000 :star2: on github u failed
Kyle Holm
@thekholm80
Jul 25 2017 21:41
fcc failed big then
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:41
coz people would pretty much pay for what u made
and u gave it away for free
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:42
maybe when you react 1000 stars
you make it paid
:smile:
Gulsvi
@gulsvi
Jul 25 2017 21:43
You guys seem to be missing the point of open source :p
it's a philosophy man :neckbeard:
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:43
@SkyC0der its @diomed stuff, dw about it :smile:
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:44
@ahmedtarek2134 make me a pagekit theme
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:44
@diomed make me pizza
guyyysss
check this artist
oml his work is amazing
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:45
u already ate :pizza:
don't be greedy
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:46
ty @ahmedtarek2134 I can indeed confirm that u hit a jackpot in finding amazing stuff
CamperBot
@camperbot
Jul 25 2017 21:46
diomed sends brownie points to @ahmedtarek2134 :sparkles: :thumbsup: :sparkles:
:cookie: 580 | @ahmedtarek2134 |http://www.freecodecamp.com/ahmedtarek2134
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:47
thx to MrSuicideSheep
Matthew White
@LordFifth
Jul 25 2017 21:49
poor sheep :(
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 21:49
by far his best artwork
Kyle Holm
@thekholm80
Jul 25 2017 21:49
@LordFifth :wave:
Matthew White
@LordFifth
Jul 25 2017 21:49
@thekholm80 :wave: I went on another vacation
Kyle Holm
@thekholm80
Jul 25 2017 21:49
lol
quit it
Matthew White
@LordFifth
Jul 25 2017 21:49
it's been a good summer :P
Kyle Holm
@thekholm80
Jul 25 2017 21:49
i ate some cake
so i'm right there with you
Matthew White
@LordFifth
Jul 25 2017 21:50
Went to cuttyhunk this time with family, tiny island off the grid
Kyle Holm
@thekholm80
Jul 25 2017 21:50
sounds cool, lots of bikinis?
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:50
@thekholm80 haha :smile:
@LordFifth so, that's it from summer? that's all there is to it?
Matthew White
@LordFifth
Jul 25 2017 21:50
lol, some. Mostly fishing and boating
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:51
here we have at least a month of it yet
Kyle Holm
@thekholm80
Jul 25 2017 21:51
i dislike summer
Matthew White
@LordFifth
Jul 25 2017 21:51
@diomed :wave: good point! I need to get back to programming though
Kyle Holm
@thekholm80
Jul 25 2017 21:51
love spring and fall though
Matthew White
@LordFifth
Jul 25 2017 21:51
Same!
I hate the heat
Kyle Holm
@thekholm80
Jul 25 2017 21:51
@LordFifth finish that data viz before it goes away
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:51
@LordFifth :wave:
Kyle Holm
@thekholm80
Jul 25 2017 21:52
lol
Matthew White
@LordFifth
Jul 25 2017 21:53
@thekholm80 shakes fist at rougelike dungeon
Kyle Holm
@thekholm80
Jul 25 2017 21:53
oh come on, it's not that bad
you're a canvas master, you can make something amazing
slap a little vue around it and you're done!
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:53
who is canvas master?
Kyle Holm
@thekholm80
Jul 25 2017 21:54
@LordFifth is a canvas master
Matthew White
@LordFifth
Jul 25 2017 21:54
@diomed I love how he is coming from outside the balcony
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:54
and yet, he still somehow....
Matthew White
@LordFifth
Jul 25 2017 21:56
oh and I just noticed the nirnroot
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:56
did u notice what happens to him in the end, btw. :yum:
Matthew White
@LordFifth
Jul 25 2017 21:57
Yup :P
May Kittens Devour Your Soul
@diomed
Jul 25 2017 21:58
@thekholm80 foul play
Kyle Holm
@thekholm80
Jul 25 2017 21:59
@diomed lol
Matthew White
@LordFifth
Jul 25 2017 22:00
I wonder what his accomplice was for?
Kyle Holm
@thekholm80
Jul 25 2017 22:00
witness
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:03
next time some1 does this :shit: doesn't matter if u have a camera, just say u do
it'll be over be4 u know it
Kyle Holm
@thekholm80
Jul 25 2017 22:04
yeah, just say "you tell the police your story and i'll show them my video, we'll let them decide what happened"
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:06
I wonder how long is record stored when u drive
Kyle Holm
@thekholm80
Jul 25 2017 22:06
i've seen some that store an hour, then start writing over the old
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:07
@ahmedtarek2134 I thought that girl was eating a goldfish, when actually it was a cigarette all along
Ahmed Tarek
@ahmedtarek2134
Jul 25 2017 22:07
😂😂😂😂
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:09
I have a regex 4 u guys
https://images.google.com/^(/d+/d+/d+).*/
this is my life now
Matthew White
@LordFifth
Jul 25 2017 22:13
I don't think repeating the /d+ does anything
also the .* does't make much sense either
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:14
well , I have no idea
that is the page it redirects me to when I visit images.gooogle.com
Matthew White
@LordFifth
Jul 25 2017 22:15
ooh
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:15
and of course, I get a 404
this happened with chrome, and now with vivaldi
Matthew White
@LordFifth
Jul 25 2017 22:16
it means "starts with any number of digits followed by any number of digits followed by any number of digits followed by none to any number of ."
I think
Brianna
@brisourceful
Jul 25 2017 22:16
one of my fav 404s ever: http://bluegg.co.uk/404
Kyle Holm
@thekholm80
Jul 25 2017 22:17
oh lord
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:20
That's the stuff!!! :goat:
Brianna
@brisourceful
Jul 25 2017 22:21
:clap:
May Kittens Devour Your Soul
@diomed
Jul 25 2017 22:23
smiley.jpg
any1 got any clue where thesesmileys come from?
i tried reverse google image search but failed so hard

oh,right, I should be sleeping. but if any1 knows or finds out feel free to mention me with info.

goodnight you all :zzz:

Matthew White
@LordFifth
Jul 25 2017 22:26
night!
Brianna
@brisourceful
Jul 25 2017 22:28
night night
Kyle Holm
@thekholm80
Jul 25 2017 22:35
i can't believe they made a movie about emojis
and i can't believe people are going to pay money to see it
Margaret
@Margaret2
Jul 25 2017 22:53
@diomed Samsung emojis
Kyle Holm
@thekholm80
Jul 25 2017 22:54
suddenly, a wild stingray appears
Margaret
@Margaret2
Jul 25 2017 22:54
:P
aRtoo
@artoodeeto
Jul 25 2017 23:06

https://wind-bow.glitch.me/twitch-api/channels/ESL_SC2

https://wind-bow.glitch.me/twitch-api/users/ESL_SC2

https://wind-bow.glitch.me/twitch-api/streams/ESL_SC2

hi guys did you use all the API link to return a value in the twitch challenge?? i feel like u can use the 3rd link.