These are chat archives for FreeCodeCamp/HelpFrontEnd

17th
Nov 2017
restrepomich
@restrepomich
Nov 17 2017 00:00
That got the lunch file to load, but will it be able to toggle between the two files at the set time intervals?
Ken Haduch
@khaduch
Nov 17 2017 00:03
@restrepomich - well, you'll have to have some other method of triggering the check - I think I mentioned using setInterval() and Tom also mentioned it above. It's not going to just run automatically - you would only have to have it test every minute or so, I would imagine?
restrepomich
@restrepomich
Nov 17 2017 00:04
Hmm
var thisIs = "lunch";
    if(hours >= starthour && minutes >= startminute && thisIs != "lunch") {
location.replace('lunch-4.html');
} else if (hours >= endhour && minutes >= endminute){
    location.replace('breakfast-4.html')
}
this seem to have worked
Ken Haduch
@khaduch
Nov 17 2017 00:09
@restrepomich - then in your breakfast file, do the same thing for the breakfast time period - basically if the breakfast file is loaded, and it's breakfast time, you don't want to switch it. There are probably other clever ways to make this page - you could have it all on one HTML file, and just switch between divs with the appropriate information, for example? That way you don't have any multiple pages and replacements - just use display: none in the appropriate way to get it to show what you want.
restrepomich
@restrepomich
Nov 17 2017 00:12
Awesome! Thanks so much @khaduch and @moT01 for your help! :) Really appreciate it.
CamperBot
@camperbot
Nov 17 2017 00:12
restrepomich sends brownie points to @khaduch and @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 907 | @mot01 |http://www.freecodecamp.org/mot01
:star2: 3508 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
Nov 17 2017 00:14
@restrepomich - you're welcome... it was a good brain teaser! Let us know if you have other specific questions.
Tom
@moT01
Nov 17 2017 00:14
nice job ken
yea, i couldn't figure out what was going on there right away
Ken Haduch
@khaduch
Nov 17 2017 00:15
I've never run across a problem like that before - I think it was interesting and non-obvious...
Tom
@moT01
Nov 17 2017 00:16
what loop, i dont see a loop
i must be missing something
Ken Haduch
@khaduch
Nov 17 2017 00:58

@moT01 - if you look at this code:

var thisIs = "lunch";
if(hours >= starthour && minutes >= startminute && thisIs != "lunch") {
    location.replace('lunch-4.html');
} else if (hours >= endhour && minutes >= endminute){
    location.replace('breakfast-4.html')
}

without the extra test for thisIs != "lunch", and it was the time that passed the test condition for lunch, it would navigate to the page again, via location.replace. So it would run the same check again, navigate to the page again, and again, and again. So if you put some conditional check for which page you are on, you won't go to a page that you've already navigated to. A similar check has to be added for "breakfast", or else it will happen there.

Tom
@moT01
Nov 17 2017 01:00
yes, i figured that out after you guys started talking - i was quoting what was going through my head earlier
so i guess it was sort of looping
CamperBot
@camperbot
Nov 17 2017 02:02
:bulb: to format code use backticks! ``` more info
Yolanda
@teknotik
Nov 17 2017 02:08
Can I get help with R programming here?
Kaz Baig
@kbaig
Nov 17 2017 02:27
@teknotik err this is front end
Ken Haduch
@khaduch
Nov 17 2017 02:28
@teknotik - it might be a long shot, because freeCodeCamp doesn't cover that. But - someone might be proficient in it, or we could just take a stab at it if it's not too advanced (always could take a peek at the docs and apply some experienced eyes...)
or you could try the backend room - but the same restrictions about freeCodeCamp still apply, I think? :)
juni
@junipberry
Nov 17 2017 02:30
@ev3rlord, oh ty ~ hmm I’ve created a repository and made a simple comit to it before. But this time, after reviewing some beginner guidelines, I tried to download Git for mac. My computer however, is telling me “no mountable file systems”. Can I just forgo using Git, should I do this?
CamperBot
@camperbot
Nov 17 2017 02:30
junipberry sends brownie points to @ev3rlord :sparkles: :thumbsup: :sparkles:
:cookie: 13 | @ev3rlord |http://www.freecodecamp.org/ev3rlord
juni
@junipberry
Nov 17 2017 02:34
ah I remember, yes ty @Asjas , cool I’ll check it out!
CamperBot
@camperbot
Nov 17 2017 02:34
junipberry sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @asjas |http://www.freecodecamp.org/asjas
juni
@junipberry
Nov 17 2017 02:43
I’m on my github desktop right now, trying to commit the video as a file to master. But it’s not working bc it says I didnt make any changes to master. Could someone point out what Im doing wrong pls?
github newbie here trying to upload a short video on github
Tom
@moT01
Nov 17 2017 02:46
@junipberry cant you go to the repo, in the browser and find the upload files button - and just like drag and drop or something?
i think you can
but im not sure
juni
@junipberry
Nov 17 2017 02:48
hey tom, Im in the <code> tab of the new repository and I’m sort of stuck on the page with the “quick setup"
I don’t know what my next step is
Tom
@moT01
Nov 17 2017 02:49
in your browser?
juni
@junipberry
Nov 17 2017 02:50
yes
I dont have Git installed
Tom
@moT01
Nov 17 2017 02:51
upload files button - top right sort of - near the green button
silver537
@silver537
Nov 17 2017 03:02
You can upload videos on github? O.o
Tom
@moT01
Nov 17 2017 03:04
im not sure
i feel like you should be able to
she'll find out
Ever Lord
@ev3rlord
Nov 17 2017 03:04
i've never uploaded a video on github so :)
Moisés Man
@moigithub
Nov 17 2017 03:06
IF u think as just a file... then it should
silver537
@silver537
Nov 17 2017 03:06
Right. Not something that can be played.
juni
@junipberry
Nov 17 2017 03:13
ah okay, I started a new repository with the readme initialized. I can do it now, thank you all ty @moT01
CamperBot
@camperbot
Nov 17 2017 03:13
junipberry sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 908 | @mot01 |http://www.freecodecamp.org/mot01
Tom
@moT01
Nov 17 2017 03:21
she doesn't want github to play it - she wants to use it on her project i think, so i think that would work
Daniel
@DanJP2016
Nov 17 2017 03:22
not a freecodecamp project, but remade an old arcade game called Sea Wolf in phaser.js. https://github.com/DanJP2016/Sea-Wolf
Tom
@moT01
Nov 17 2017 03:23
@DanJP2016 what is this
how do i play it
Daniel
@DanJP2016
Nov 17 2017 03:24
download it and upzip it, use the left and right arrow keys to move the target box at the top, and space button to fire the torps
run it in firefox though or the sounds won't play
Daniel
@DanJP2016
Nov 17 2017 03:34
@moT01 where you able to get it to work?
Tom
@moT01
Nov 17 2017 03:37
i didnt try
download and unzip
thats work
maybe ill give it a try in a bit - ive got some food here - sorry man
Daniel
@DanJP2016
Nov 17 2017 03:40
no problem. if you do check it out let me know what you think. tried to make all the images and sounds from scratch
primuscovenant
@primuscovenant
Nov 17 2017 05:10
@heroiczero thx
CamperBot
@camperbot
Nov 17 2017 05:10
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2063 | @heroiczero |http://www.freecodecamp.org/heroiczero
Zachary
@Bazill03
Nov 17 2017 05:54

Hey guys, I'm trying to create a series of images separated by arrows. Something like this:

https://conceptdraw.com/a2022c3/p1/preview/640/pict--arrow-loop-cycle-diagram-innovation-life-cycle---arrow-loop-diagram.png--diagram-flowchart-example.png

Except instead of orange bubbles of text I'd like images. Is there a JS library that can help with this? Thanks.

Kaz Baig
@kbaig
Nov 17 2017 06:15
@Bazill03 d3 prob an option
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Nov 17 2017 09:26
@Bazill03 What about using javascript to calculate the positions of the images? I have done this here, but I would suggest you to do it yourself, as it is a good exercise on javascript, css and algebra :)
A-J Roos
@Asjas
Nov 17 2017 10:00
@junipberry Just something to be aware of. I noticed last night trying to upload a video myself to test that github has a 25MB file upload limit. So the video that you are trying to upload would need to be less than that. If it's larger I would then suggest using a free vimeo account (250mb limit) to then upload
AllenFeng3
@AllenFeng3
Nov 17 2017 10:02
how to do this:Escape Sequences in Strings anyone help?
A-J Roos
@Asjas
Nov 17 2017 10:05
@AllenFeng3 Can you explain better?
AllenFeng3
@AllenFeng3
Nov 17 2017 10:06
myStr should have encoded text with the proper escape sequences and no spacing.
myStr should have one newline character \n
myStr should have one carriage return character \r
myStr should have two correctly escaped backslash characters \
what i wrote:var myStr= "\rFirstLine\n\SecondLine\\nThirdLine";
A-J Roos
@Asjas
Nov 17 2017 10:09
Try this var myStr= "\rFirstLine\n\\SecondLine\\\nThirdLine";
It outputs
FirstLine
\SecondLine\
ThirdLine
Basically two backslashes were needed around SecondLine to escape the backslashes you had
Quantomistro3178
@Quantomistro3178
Nov 17 2017 10:15
so .slice() and .substr() and .substring() are basically the same?
AllenFeng3
@AllenFeng3
Nov 17 2017 10:16
@Asjas I tried but it do not work The result does't match:myStr should have encoded text with the proper escape sequences and no spacing.
myStr should have one newline character \n
A-J Roos
@Asjas
Nov 17 2017 10:17
are you doing a some challenge?
AllenFeng3
@AllenFeng3
Nov 17 2017 10:18
yes
A-J Roos
@Asjas
Nov 17 2017 10:26
Okay well without access to the challenge I really can't say anymore. Most of what information you need is on google. I'll suggest reading up on using escaped characters
@AllenFeng3 ^
AllenFeng3
@AllenFeng3
Nov 17 2017 10:26
thankyou
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Nov 17 2017 10:35
@Quantomistro3178 Not quite. substring takes the start and the end as parameters, substr start and length. slice and substring are pretty much the same (a few differences here), but slice also works for arrays.
'Hello World'.substr(2, 3);    // llo
'Hello World'.substring(2, 3); // l
'Hello World'.slice(2, 3);     // l
@Quantomistro3178 but you can do the same stuff with them. str.substr(start, length) = str.substring(start, start + length) = str.slice(start, start + length):
var str = 'hello World';
var start = 1;
var length = 2;
str.substr(start, length) === str.substring(start, start + length) && str.substr(start, length) === str.slice(start, start + length);  // true
Harsh Chandra
@HarshHC
Nov 17 2017 11:03
hello can anyone help me center something using bootstrap 4 both vertically and horizontally
A-J Roos
@Asjas
Nov 17 2017 11:04
@HarshHC You can post a codepen link and someone will look at it if they have a chance
Radu Matees
@RaduMatees
Nov 17 2017 12:31
hello guys
can someone enlighten me please?
$(document).ready(function() {

  var weapon
  var gameStarted = false

  // if a have choosen a weapon, I can no longer switch it, and I can start the game
  if (!gameStarted){chooseWeapon(startGame)}

  function startGame() {
    $('.board .squares').on('click', function() {
      $(this).children('.X0').html(weapon)
    })
  }

  function chooseWeapon(callback) {
    gameStarted = true
    $('.weapons .squares').on('click', function() {
      weapon = $(this).children('.X0').html()
    })
    callback()
  }

})
I will post the codepen also
I want to only start the game if I choose either X or 0... which I amanaged with the callback
but I want after I have choosen, to can't choose again during the game.... so deactivate the buttons somehow, or put an if conditional... I tried with the gameStarted variable, but it's not working, I think I don;t understand the variable scope or something
Stephen James
@sjames1958gm
Nov 17 2017 12:52
@RaduMatees Seems to me that you don't want to call the callback until the weapon is chosen (inside the click handler for choose weapon)
In side that same click handler you could hide the choose weapons buttons.
BTW, you only check game started once at the page load so that is why it is not having any affect.
Radu Matees
@RaduMatees
Nov 17 2017 13:26
@sjames1958gm thanks for your answer, but I still don;t understand... I understand that I should move the callback after the click event, and hide the buttons after the click, but I don;t understand how should I have done so it not only load at the page load
CamperBot
@camperbot
Nov 17 2017 13:26
radumatees sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8693 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Radu Matees
@RaduMatees
Nov 17 2017 13:32
  $('.weapons .squares').on('click', function(){
    var weapon = $(this).children('.X0').html()
    $('.weapons').hide()
    startGame(weapon)
  })


  function startGame(weapon) {
    $('.board .squares').on('click', function() {
      $(this).children('.X0').html(weapon)
    })
  }
I rewrote the code like this, but it still bugs me that I don't know what was the good way to do it. The other projects went well, but this one seems really hard. I feel like I am missing a lot of JS concepts
Stephen James
@sjames1958gm
Nov 17 2017 13:35
@RaduMatees It takes a little practice to get your head around the async nature of js and UI. Mapping out when things will/should happen.
Quantomistro3178
@Quantomistro3178
Nov 17 2017 14:04
guys, if i wanna add an array to the FRONT of my multi-dimensional array, then i need to use .shift() right?
Stephen James
@sjames1958gm
Nov 17 2017 14:05
@Quantomistro3178 unshift
Quantomistro3178
@Quantomistro3178
Nov 17 2017 14:07
@sjames1958gm then what does shift do? i used it in my code and it returned a number
wait
```

function chunkArrayInGroups(arr, size) {
  // Break it up.
  var a = arr.slice(0, size);
  var b = [];
  for (var x=1; x<arr.length/size ;x++) {
    b.push(arr.slice(size*x, size*x+size));
  }
  var final=b.unshift(a);
  return final;
}

chunkArrayInGroups(["a", "b", "c", "d", "e", "f", "g", "h"], 2);
Stephen James
@sjames1958gm
Nov 17 2017 14:39
@Quantomistro3178 shift removes from the front - unshift ADDs to the front
unshift returns the new length which is likely not what you want
Quantomistro3178
@Quantomistro3178
Nov 17 2017 14:43
@sjames1958gm yeah. but i just tweaked the code a bit and it worked.
@sjames1958gm thanks!
CamperBot
@camperbot
Nov 17 2017 14:43
quantomistro3178 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8695 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Nov 17 2017 14:43
@Quantomistro3178 if you start your loop at x = 0 then you don't even need a
Quantomistro3178
@Quantomistro3178
Nov 17 2017 14:44
yeah, i did that and removed the separate a variable
i just assigned its value to b
Harsh Chandra
@HarshHC
Nov 17 2017 14:55
Hello 👋 anyone who
Could help me center vertically and horizontally using bootstrap 4 https://codepen.io/HarshHC/pen/vWyzOY
Ken Haduch
@khaduch
Nov 17 2017 15:17
@HarshHC - you might not need to use Bootstrap - check out this centering guide from the css-tricks website: https://css-tricks.com/centering-css-complete-guide/
Ruben Abraham
@BuBBRBbr1
Nov 17 2017 15:46
I need help with bootstrap. It is saying I need a closing elements somewhere. I cannot find it.
blob
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 15:48
@BuBBRBbr1 if you can make a pen with the content
Ruben Abraham
@BuBBRBbr1
Nov 17 2017 15:50
Lining up form elements responsibly with Bootstrap.
I put <div> and closing </div> everywhere I could think of.
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 15:53
copy and paste your code here
hensn5250
@hensn5250
Nov 17 2017 16:08
hello
any one here? @tiagocorreiaalmeida @BuBBRBbr1 @Am3ra
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:10
y
hensn5250
@hensn5250
Nov 17 2017 16:10
hey, would like some frontend help
available?
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:12
the rooms are somehow made for that, just post your qeuestion and if somneone can help!
hensn5250
@hensn5250
Nov 17 2017 16:13
just wanted to know if the room was active don't want to wait and look at the screen for minutes
its more code review than a question.
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:14
go ahead
hensn5250
@hensn5250
Nov 17 2017 16:14
I'm about done with the WikiViewer would like someone to review code / help with setting media quries
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:16
one way is using 100% and not px to widths
hensn5250
@hensn5250
Nov 17 2017 16:16
right
Never really got the hand of setting up media queries
I just use viewport units
was trying to set the widths for a mobile(iphone 400px ) but it looked worse without the viewport units
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:22
you should started reduce your screen unthil things break then you write a media querie and reduce unthil breaks again you can use aswell some defiend withds 1200 900 600 and below aswell
how are you writing the media queries?
hensn5250
@hensn5250
Nov 17 2017 16:23
using chrome dev tools
where you can view the app on different mobile device
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:33
second button
image.png
hensn5250
@hensn5250
Nov 17 2017 16:35
right. that's what I've been using. The app looks tiny on mobile
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:36
change to 100%
hensn5250
@hensn5250
Nov 17 2017 16:36
body or container?
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:37
no the option on the top of the dev tool
there's a thing thatsays the width and heigh
and right after %
set you to 100%
to see how it reallyl ooks on those sizes
hensn5250
@hensn5250
Nov 17 2017 16:37
oh ok
yea its look in landscape but tiny in portrait view
dut to the viewport units
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:39
show me a print of what you mean
hensn5250
@hensn5250
Nov 17 2017 16:40
ok hold on
can't find a picture of it online. but Landscape mode is when the phone is viewed wide like a TV. Portrait is when it look like a calculator.
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:44
I do know
I asked you to send me a print of what you are saying on the dev tools :D
hensn5250
@hensn5250
Nov 17 2017 16:45
oh ok. lol
don't know how to do that. I can printscreen but dont know how to put the image in the chat
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 16:47
ctrl + v
Roge
@RogeMateos
Nov 17 2017 16:51
Can anyone help me with this
Go to: https://register.ft.com/
Give the code that, once pasted into the browser’s console, will merge the first name and last name
fields into one field called "Name" and still allows the form to validate correctly.
I have this approach but not sure how to target the dom, Thank you
$('#firstNameField').remove();
$('#lastNameField').remove();
$( ".su-field" ).append( '<p> HELLO <p>' );
})();
hensn5250
@hensn5250
Nov 17 2017 16:52
This message was deleted
A-J Roos
@Asjas
Nov 17 2017 16:53
Lol.
juni
@junipberry
Nov 17 2017 16:53
@Asjas , ahh I noticed that too! I actually uploaded a few diff tries, but it wont give me access to the raw link bc it is too big. I can only download it. But its nice to know that the limit is 25mb. thanks again @Asjas
CamperBot
@camperbot
Nov 17 2017 16:53
junipberry sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 292 | @asjas |http://www.freecodecamp.org/asjas
hensn5250
@hensn5250
Nov 17 2017 16:53
how exactly do you post local images
A-J Roos
@Asjas
Nov 17 2017 16:56
You can drag and drop it onto gitter which will upload it
hensn5250
@hensn5250
Nov 17 2017 16:56
oh ok
chromeMobileView2.png
juni
@junipberry
Nov 17 2017 17:00
actually, I just double checked and my file is only 7.89 mb, but github is telling me they cant show files that big..
where would I go to get the raw link to that video? @Asjas
A-J Roos
@Asjas
Nov 17 2017 17:00
Can you post the link to the github repo that has the video in it?
I want to check if it allows me to get the raw link
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 17:09
@hensn5250 change widths to 100%
and in big sizes set margins around in smaller sizes let the input be 100% of te screen and just give some padding like 10px each side
hensn5250
@hensn5250
Nov 17 2017 17:16
@tiagocorreiaalmeida ok. thanks. Will have to revamp most the fixed and viewport sizes.
CamperBot
@camperbot
Nov 17 2017 17:16
hensn5250 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 444 | @tiagocorreiaalmeida |http://www.freecodecamp.org/tiagocorreiaalmeida
hensn5250
@hensn5250
Nov 17 2017 17:17
I was trying to avoid that but no shortcuts
A-J Roos
@Asjas
Nov 17 2017 17:18
@junipberry The raw link to that video is https://raw.githubusercontent.com/junipberry/vids/master/RainierFlowers.mp4but it seems to not like playing it. I am using it in this codepen but it's not playing. Seems github is a bad idea. I'll suggest then using Vimeo or Youtube to host the video. They are the two best known video hosting platforms
hensn5250
@hensn5250
Nov 17 2017 17:19
@tiagocorreiaalmeida a template for the media queries is in the css . If you have the time could you show some of your suggestions
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 17:20
its ok you can keep what you have allready if you wont even tough I dont recomend it
at what width does it starts to look bad ?
hensn5250
@hensn5250
Nov 17 2017 17:22
550px
its more a height issue then a width issue. it ok until the search results get displayed and thing start collapsing
juni
@junipberry
Nov 17 2017 17:27
@Asjas oh alright, darn. Im wondering why its not working for me though, your video on codepen worked just fine!
hensn5250
@hensn5250
Nov 17 2017 17:27
appreciate the feedback. will do as suggested
later
A-J Roos
@Asjas
Nov 17 2017 17:29
@junipberry I had to use firefox to be able to get that link. Chrome constantly tried to download the video instead of displaying the link
ExpressyCode
@ExpressyCode
Nov 17 2017 17:30
Hey Im doing "Seek and Destroy" Basic Algorithm Scripting challenge. But im stuck. Anyone know why 2 isn't being removed from the array, only 3? https://codepen.io/TKZS/pen/gXXqoE?editors=0012
A-J Roos
@Asjas
Nov 17 2017 17:30
@junipberry The problem I see with hosting on github is the delay for the video to start playing. It basically has to download before starting. Which is why hosting on a video site might be faster as it plays directly from there
juni
@junipberry
Nov 17 2017 17:32
hmm I see
alrighty, vimeo it is! :)
Isaiah Trembley
@IsaiahCT
Nov 17 2017 17:32
hmmm.
it has cetanly been a while since I have had gitter openeed(like 4 days hhaha) How are we all
Kaz Baig
@kbaig
Nov 17 2017 17:37
@TKZS in your loop, you are calling filter on firstParameter but storing it in result
juni
@junipberry
Nov 17 2017 17:38
@Asjas , I’ve uploaded it onto vimeo https://vimeo.com/243339405 , do I just use this link as src?
Kaz Baig
@kbaig
Nov 17 2017 17:38
@TKZS So when you call it the second time in the loop, it's not using the filtered array from the first iteration
ExpressyCode
@ExpressyCode
Nov 17 2017 17:39
@kbaig Your a life saver thanks so much! :)
CamperBot
@camperbot
Nov 17 2017 17:39
tkzs sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 426 | @kbaig |http://www.freecodecamp.org/kbaig
ExpressyCode
@ExpressyCode
Nov 17 2017 17:41
@kbaig So if im understanding it right. You can't save the return in a new variable?
Kaz Baig
@kbaig
Nov 17 2017 17:42
@TKZS just replace result with firstParameter in result = firstParameter.filter.... in your loop and return firstParameter
You probably wanna rename things but ye
ExpressyCode
@ExpressyCode
Nov 17 2017 17:43
@kbaig Ok I understand
Kaz Baig
@kbaig
Nov 17 2017 17:48
@TKZS in case you're interested, this is a similar approach to solve it.
function destroyer(arr) {
  // Remove all the values
  return arguments.length === 1 ?
    arr :
    destroyer(arr.filter(n => n !== arguments[1]), ...Array.apply(null, arguments).slice(2));
}
A-J Roos
@Asjas
Nov 17 2017 17:48
@junipberry You embed the video. How you get the link is at the bottom of the video there is a share button. If you click on that you will get HTML code that will allow you to embed the video in a website
juni
@junipberry
Nov 17 2017 18:05
@Asjas, I’m not sure that would work for what I want to do . I want to use the video as a full screen background for my project.
I tried embedding it, and has many limitations on the video’s look and use
Does this help
A-J Roos
@Asjas
Nov 17 2017 18:09
@junipberry Here is a full screen vimeo video that loops https://codepen.io/mattgrosswork/pen/jrdwK
You just need to change the src to your video and you'll be set.
juni
@junipberry
Nov 17 2017 18:14
that helps a lot, ty @Asjas ty @kbaig , I’ll compare those with what I have and figure out what I did wrong. Thank you again guys!
CamperBot
@camperbot
Nov 17 2017 18:14
junipberry sends brownie points to @asjas and @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 293 | @asjas |http://www.freecodecamp.org/asjas
:cookie: 427 | @kbaig |http://www.freecodecamp.org/kbaig
A-J Roos
@Asjas
Nov 17 2017 18:24
That was the link the guy used. It's not my codepen. It seems he's using an oauth token to get the video directly from video and not using the normal player. I'm not really sure how he got that link for his video
juni
@junipberry
Nov 17 2017 18:24
esp this part: s=8e8741dbee251d5c35a759718d4b0976fbf38b6f&profile_id=119&oauth2token
A-J Roos
@Asjas
Nov 17 2017 18:24
Yes that seems to be a token of sorts
It might be that he is paying for Vimeo and not using the free part. If you check the plans you'll see Vimeo Plus has Customized Video Players. That could then be what he is doing.
juni
@junipberry
Nov 17 2017 18:26
both the sites you guys showed me are in effect, what I would like to do. But how can I do so, in a simpler way I can recreate wo using tokens?
since Im not familiar w creating tokens just yet
i see
A-J Roos
@Asjas
Nov 17 2017 18:27
I know you said the other day you can't use Youtube but it might be one of the few ways left to create a fullpage background without having to pay for services or hosting fees
Henry
@GitHub-Henry
Nov 17 2017 18:29
@junipberry perhaps something like this might help
A-J Roos
@Asjas
Nov 17 2017 18:30
@GitHub-Henry That doesn't work with Vimeo. They use their own player
And that code works if you host the video on a hosting platform and pay for it. It seems she wants to host it online without paying.
I might be wrong but she can clarify. I think youtube might be the best "free" option available that works every time
Callia Bast
@CalliaBast
Nov 17 2017 18:40
First time using this. But I do not know how to do "Line up Form Elements Responsively with Bootstrap"
A-J Roos
@Asjas
Nov 17 2017 18:44
@CalliaBast Which part are you having a problem with? The row or the two col sizes?
Leela Pavan
@leepk29
Nov 17 2017 18:52
Hi every one
Kaz Baig
@kbaig
Nov 17 2017 18:56
@leepk29 :wave:
Leela Pavan
@leepk29
Nov 17 2017 18:56
May I know the alternative solution for "Use hardware acceleration when available" in chrome due to that videos are stocks after few seconds.
@kbaig hi
Renan Cunha
@sarkioja
Nov 17 2017 18:57

Hey guys!
Someone could give an honest opinion on my personal portfolio project? (2nd challenge on freecodecamp)

https://codepen.io/sarkioja/full/NwvNpR

Thanks in advance

juni
@junipberry
Nov 17 2017 18:58
ty @GitHub-Henry , that is what I want to do. My problem right now is correctly linking a mp4 link from a host server. I’ve been having problems w github and the other image upload sites don’t seem to have the right format (i.e.: mp4, webm, ogg)
Renan Cunha
@sarkioja
Nov 17 2017 18:59
Also, could someone explain me why the 'container-fluid' (Bootstrap property) renders properly on the notebook and on the phone, but not properly on ipad?
Kaz Baig
@kbaig
Nov 17 2017 19:01
@sarkioja Are you using diff browsers on each device
or did u just use devtools
Renan Cunha
@sarkioja
Nov 17 2017 19:03
@kbaig I tested on Chrome, in a 14' notebook, a iPhone 5s and on a iPad.
Also on devtools, the same behaviour
Kaz Baig
@kbaig
Nov 17 2017 19:03
@sarkioja Do you mean that the grid isn't behaving appropriately?
Because that's happening as a result of your first project description being too long
I think...
Just kidding, not sure why that's happening. idk bootstrap lol
Hmm I think that is it, because if you inspect the first project at <~990px width, its margin is below where you would want it to be
Henry
@GitHub-Henry
Nov 17 2017 19:09
@junipberry perhaps one of these free video hosting sites will work
Renan Cunha
@sarkioja
Nov 17 2017 19:10
@kbaig Could be.. I think that must be a problem with padding on the grid. I will inspect again. Thanks for the heads up, anyway
CamperBot
@camperbot
Nov 17 2017 19:10
sarkioja sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 429 | @kbaig |http://www.freecodecamp.org/kbaig
shannon guimaraes
@shannonguimaraes
Nov 17 2017 19:24
can anyone help me understand why the blue-text class isn't overriding the pink-text class?

<style>
body {
background-color: black;
font-family: Monospace;
color: green;
}
.pink-text {
color: pink;}

.blue-text {
color: blue;}

</style>

<h1 class="pink-text" "blue-text">Hello World!</h1>

Renan Cunha
@sarkioja
Nov 17 2017 19:25
@shannonguimaraes Try <h1 class="pink-text blue-text">
There's 2 class in the same h1 element
*classes
shannon guimaraes
@shannonguimaraes
Nov 17 2017 19:26
thanks!!
@sarkioja *
Thoughts, comments, issues, questions, critiques, and concerns?
CHALLENGE: Portfolio Project
Kris Baillargeon
@krisb1220
Nov 17 2017 20:13
Just the design pretty much, links are broken :P also not mobile optimized yet
Niloy513
@Niloy513
Nov 17 2017 20:34
I need some help got an interview soon and i'm using an old code I did a while back for my example. is anyone here willing to give it a shot?
https://codepen.io/Niloy513/pen/KyyLjN?editors=0010
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 20:40
just ask what you need @Niloy513
Niloy513
@Niloy513
Nov 17 2017 20:42
on line 10 what does the .t notation on this.t do?
also anyway to make weatherUs, and weatherSi shorter? mainly the part with the $.getJSON? i'm trouble figuring those two out, it's been months since I finished this program, so I'm trying to get a good refresher
don't want them to ask a question I don't know.
Stephen James
@sjames1958gm
Nov 17 2017 20:45
this.t = !this.t this is just changing the value from falsy to truthy which causes the ternary to switch between the two choices.
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 20:46
@sjames1958gm got 2minutes to help me catch a mistake im doing on a kata?:D
Stephen James
@sjames1958gm
Nov 17 2017 20:46
Is it that doubling one?
Niloy513
@Niloy513
Nov 17 2017 20:46
@sjames1958gm
Oh yes correct, but why is the .t notation needed? that's the odd part i'm not getting
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 20:47
im a bit confused by the enlgish atually
does it doubles the last input or doubles the ammount of persons like lsat time there was 2 shleodns do I double the 2 sheldons or do I double the existent 3 on the list?
Stephen James
@sjames1958gm
Nov 17 2017 20:47
It is odd, but it is just setting a property t - not sure why that was chosen
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 20:47
and yes it is
Stephen James
@sjames1958gm
Nov 17 2017 20:47
@tiagocorreiaalmeida Each time a person gets a soda, two of that person are added to the end of the list.
Niloy513
@Niloy513
Nov 17 2017 20:48
yah it's weird lol. if you change the property to some other property name to another it works fine, It just doesn't work without a property name.
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 20:48
after running the second time does it adds 4 persons of the same to the lsit?I got confused there or just 2 more once again?
Stephen James
@sjames1958gm
Nov 17 2017 20:49
@tiagocorreiaalmeida
S L P R H after one pass S S L L P P R R H H -> next pass S S S S L L L L P P P P R R R R H H H H
@Niloy513 Because is uses the fact that the first time any random property is undefined the !undefined makes it truthy and then it is set
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 20:49
uh,got my issue :D
was doubling the thing everything
like 2 goes to 4, 4 goes to 8
Stephen James
@sjames1958gm
Nov 17 2017 20:49
@tiagocorreiaalmeida :+1:
Tiago Correia
@tiagocorreiaalmeida
Nov 17 2017 20:49
16*
:D
thanks @sjames1958gm
CamperBot
@camperbot
Nov 17 2017 20:49
tiagocorreiaalmeida sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8696 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Nov 17 2017 20:51
@Niloy513 Maybe the t stands for 'toggle' ? the value gets assigned to the button object.
var obj = {}
undefined
obj.t
undefined
obj.t = !obj.t
true
Niloy513
@Niloy513
Nov 17 2017 20:53
you mean the property is toggle? that's weird, didn't know you can do that with jquery, name a toggle function like that.
@sjames1958gm Thank you for trying, my interview is less than an hour from now, so I'll need to head out soonish.
CamperBot
@camperbot
Nov 17 2017 20:57
niloy513 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8697 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Tom
@moT01
Nov 17 2017 21:54
@krisb1220 looks real good - i like the landing area and the section below it, the projects area could maybe use a title or something - it might not be obvious to some that those are links to projects of yours - the bottom might be a little too monotone, maybe try a different shade on the outside, and i feel like that character image could be updated or something, feels a little too serious or something, make it more cartooney
thats me being as critical as i can be - looks good
Shiran
@shiranag
Nov 17 2017 22:14
hi guys i need help i worked on my website and i made form that some people can write user name and pass,email
how to get this elements to my mail ?
javascript
rscales02
@rscales02
Nov 17 2017 22:21
Does anyone have any idea how to reduce the effective edge of my buttons? https://codepen.io/rscales02/pen/VMrMBb
the color buttons stick out into the container past their rounded borders
The center div also pokes into the effective area of the colored buttons...
Kris Baillargeon
@krisb1220
Nov 17 2017 23:03
@moT01 sorry just saw your feedback, thank you! Wanna see the final product I have(w/o your suggestions)? Could use some more suggestions on that ;)
CamperBot
@camperbot
Nov 17 2017 23:03
krisb1220 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 909 | @mot01 |http://www.freecodecamp.org/mot01
Tom
@moT01
Nov 17 2017 23:20
@krisb1220 the buttons look better
same concerns on the stuff that didnt change
center the form at the bottom
like this...
        name: [               ]
    business: [               ]
so the colons are in the center
or maybe a hair left of center - i think something like that would look good
Shiran
@shiranag
Nov 17 2017 23:22
how to sent ekments from form to my email ?
Tom
@moT01
Nov 17 2017 23:23
i would give your links to codepen and github and fcc down there a little something to let the user know they're links
maybe a color - or a hover effect
something a little more distinctive
looks great though - those are minor details that might improve it a little bit
oh - and the smooth scroll
Shiran
@shiranag
Nov 17 2017 23:25
thanks
Tom
@moT01
Nov 17 2017 23:27
i used the smooth scroll https://s.codepen.io/moT01/pen/vgOaoJ?editors=1010 - copy the code if you want