These are chat archives for FreeCodeCamp/HelpFrontEnd

16th
Oct 2016
Evan W
@Dirtier
Oct 16 2016 01:11
@Robertboan22 You can also use dropbox for direct links
To host audio/image/whatever files for your page
Jack Lyons
@JackEdwardLyons
Oct 16 2016 02:47
does drop box work for mp3s?
@Dirtier i wasn't sure that would work
but havent tried yet
Evan W
@Dirtier
Oct 16 2016 02:49
@JackEdwardLyons Yea I used it for an on-hover ticking noise for a project a few days ago
You have to get the link and then convert it to a direct link though for stuff like that, which isn't hard at all. I'm pretty sure you just put 'dl' at the start of it, or use this http://www.syncwithtech.org/p/direct-download-link-generator.html
Igor Amidzic
@igoramidzic
Oct 16 2016 02:51
Someone please help me!
I try to change my global variable inside a function, but it won't change on the outside:
http://codepen.io/amidzicigor/pen/Zprbag
Evan W
@Dirtier
Oct 16 2016 02:58
@JackEdwardLyons Oh btw, with Codepen Pro you can do all that inside your codepen. You get a buncha space to host your assets
Tyler Haas
@tylerthehaas
Oct 16 2016 03:30
@amidzicigor I dont see the problem...Your variable is changed to true outside the function
what are you trying to accomplish?
Ken Haduch
@khaduch
Oct 16 2016 04:11
@amidzicigor - yes, it seems to be working?
Artur Arsalanov
@kurumkan
Oct 16 2016 04:13
@amidzicigor Yes it's not clear what you want to accomplish. But the value shoes changes.
var shoes = false;

function addItem(){
  shoes = true;
  //document.write('Inside function: ' + shoes + '<br>');
}

function test(){
  console.log(shoes)
}


$('.itemToClick').click(function(){
  console.log(shoes)
  addItem();
  test();
})
Sabe Barker
@SabeBarker
Oct 16 2016 04:18
This message was deleted
Sabe Barker
@SabeBarker
Oct 16 2016 04:23

Makes more sense to flip execution:

  test();
  addItem();

Apologise for the edits and deletes something wrong with my gitter client :/ had to swap to browser.

Tyler Haas
@tylerthehaas
Oct 16 2016 04:27
@SabeBarker I don't think you want to switch the execution because we are trying to check the value of shoes after addItem is run and if we run test before addItem we will only get what shoes is before addItem
however it might be valuable to run test before and after addItem to see what the value was before and after addItem
Sabe Barker
@SabeBarker
Oct 16 2016 04:31
addItem() is also a test technically because you are outputting shoes. So you’d want test() to output shoes before it is changed in addItem(). Splitting hairs really...
Chris Cullen
@123xylem
Oct 16 2016 04:50

@123xylem

#BR{
  overlap:hidden;
  border:2px solid black;
    position: absolute;
      border-bottom-right-radius: 110%; //  SEMI CIRCULAR BUTTON PANEL 
  background-color: blue;
  width: 50%;
  height: 50%;                                              //WHEN CLICKED IT Shows More than a semi Circle
  left: 49%;
  right: 1%;
  bottom: 0%;
  top: 55%;
}

http://codepen.io/123xylem/pen/jrAKPN?editors=1111
Can someone help me with my css... when I click my panel buttons they show weird shapes
I tried to use overlap hidden but they still pulse odd shapes

Tyler Haas
@tylerthehaas
Oct 16 2016 05:02
this has to do with the fact that the wrapper is a different shape than the buttons
NITIN RAGHAV
@nitinraghav
Oct 16 2016 05:02
can two <p> be centre-aligned side by side in CSS without bootstrap>
i am stuck with my portfolio, need help.
Tyler Haas
@tylerthehaas
Oct 16 2016 05:04
I would try to make the wrapper div a perfect circle by making the height and width of the div the same size
@nitinraghav they can be center aligned with flexbox
do you know flexbox?
NITIN RAGHAV
@nitinraghav
Oct 16 2016 05:08
sorry no flexbox, m new at this. i was thinking if maybe i can assign same class and 2 different ids to both paragraphs and then float: left
would this work?
Tyler Haas
@tylerthehaas
Oct 16 2016 05:11
that might work but it gets messy. If you want to keep it simple you could do that by doing
NITIN RAGHAV
@nitinraghav
Oct 16 2016 05:14
@haasDev here seem to be some issue
its not stacking side by side.
Tyler Haas
@tylerthehaas
Oct 16 2016 05:16
.className {
  clear: both
}

#id1 {
  float: left
}

#id2 {
  float: right
}

.wrapper {
  width: 50%;
  margin: 0 auto;
}
of course you would need a wrapper around your two elements
NITIN RAGHAV
@nitinraghav
Oct 16 2016 05:16
I am looking for "About me" paragraphs to show up side by side.
Tyler Haas
@tylerthehaas
Oct 16 2016 05:18
either that or you could just ad a margin: 0 25% to both id's
add*
Tyler Haas
@tylerthehaas
Oct 16 2016 05:25
Chris Cullen
@123xylem
Oct 16 2016 05:26
   $("#" + cSeq[i]).css("background-color", "white");
       setTimeout (function(){
          $("#" + cSeq[i]).css("background-color","");},05);
Why is this not reverting to its original color ?
It works on my .panel code but not when its the CPU inputting the clicks?
I tried the timeout with 05 miliseconds in case it was a cpu speed thing and I tried to console.log cSeq[i] to make sure it was reverting to he correc value and it consolelogs the correct ID
Tyler Haas
@tylerthehaas
Oct 16 2016 05:29
you would have to set it to some color in the second css call. You could try
```
$('#' + cSeq[i]).css('background-color', 'initial');}, 5);
setTimeout(function() {
  $('#' + cSeq[i]).css('background-color', 'initial');}, 5);
@123xylem
Chris Cullen
@123xylem
Oct 16 2016 05:33
@haasDev Tried that...
Normally the blank string reverts to orignial
it seems to be some kind of problem where cSeq[i changes before it can change its color back
Tyler Haas
@tylerthehaas
Oct 16 2016 05:34
ok. I'm not familiar enough with jquery. I hardly use it. can you post a link to your code pen or wherever your code is held?
Chris Cullen
@123xylem
Oct 16 2016 05:34
yes
the code is in CPUSEQ()
the userInput code which is the same and works is in .panel secton
Tyler Haas
@tylerthehaas
Oct 16 2016 05:56
its because the i var is getting incremented before it enters the setTimeout. checkout http://codepen.io/haasDev/pen/amadYV?editors=1011
I just did cSeq[i-1] to fix it but thats just a quick fix and isnt the right way to fix the problem
I'll let you figure that out
JD Tadlock
@jdtdesigns
Oct 16 2016 06:09
@123xylem Here's an example of how to make it the way you want it without errors in the shapes or animations: http://jsbin.com/maxevo/edit?html,css,output
The issue with the animation is you have a border-radius set on the buttons. The browser resets the overflow hidden on animations so having a border-radius causes the button's width to be seen for a split second before the browser adds the overflow hidden back. You can use a trick that works in chrome, but has no support in other browsers called image-mask.
I added this to the board that's wrapping the buttons. Other than that, you shouldn't use animations with border-radius stuff. ;)
Chris Cullen
@123xylem
Oct 16 2016 06:18
@jdtdesigns ah so the animation momentarily stopped the overflow hidden working?
i redesigned it so that there is no animation just a quick color change
JD Tadlock
@jdtdesigns
Oct 16 2016 06:19
@123xylem correct
Chris Cullen
@123xylem
Oct 16 2016 06:19
@jdtdesigns thanks
CamperBot
@camperbot
Oct 16 2016 06:20
123xylem sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 689 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Tyler Haas
@tylerthehaas
Oct 16 2016 06:20
btw @123xylem you could do the color change in css by using an active psuedo-class
Chris Cullen
@123xylem
Oct 16 2016 06:28
@haasDev yea ive tried a few methods... got it working decent now... thanks though
CamperBot
@camperbot
Oct 16 2016 06:28
123xylem sends brownie points to @haasdev :sparkles: :thumbsup: :sparkles:
:cookie: 454 | @haasdev |http://www.freecodecamp.com/haasdev
Chris Cullen
@123xylem
Oct 16 2016 06:35
@jdtdesigns
I have pretty much my look sorted now.. Well id prefer it a bit more standard looking but im happy enough with it for the moment.. THe problem I have now is getting lastSeq() to work.. It just replays the last sequence after user gets it wrong in normal mode... At the mo its not working.
I beleive its because it cannot store cSeq[c] as a varaible so when it tries to replay it the varaible changes before it can use it for sounds.. last time this happend i just made the thing i wanted a variable that wouldnt cange so quickly but when I tried it here it didnt work so good

//used to replay lastCpuSeq

function lastSeq() {              

  for (var c = 0; c <= cSeq.length; c++) {var lastSound=cSeq[c];
  var last=  setTimeout(function(){
               if(c>=cSeq.length){ clearInterval(last);
                                 return;} audioF[lastSound.toLowerCase()].play(); }, 1000);
    console.log("tried to play", lastSound)

  }
}

I think I have the same closure problem as before... I tried to close it off with a quick var declaration like before but it doesnt seem to store the alst sequence in a variable so easily.. any ideas?

JD Tadlock
@jdtdesigns
Oct 16 2016 06:46
@123xylem Instead of creating a whole new function to replay the sequence, just make one function that plays it and have a check function that checks if the player's clicks match the sequence. If the check function returns false, then it will just throw the same sequence function again. Otherwise it will run a build function that adds a new button press to the sequence.
Chris Cullen
@123xylem
Oct 16 2016 06:47
@jdtdesigns hmm il have to see how i can use that with my code.
I see what your saying but not sure my code is setup for it
Ive only got 2 problems before this is ready now!
JD Tadlock
@jdtdesigns
Oct 16 2016 06:48
You may need to refactor, but it will be worth it. Think of the process as a neverending cycle until the winning amount is true.
This cycle has steps that repeat
play sequence, check player input, build or repeat sequence, check player input, and so on...
Chris Cullen
@123xylem
Oct 16 2016 06:49
ok brb library closing :(
if u have time or can see a way of implementing it in my .panle or cpu Seq() please feel free though! @jdtdesigns
Martialis39
@Martialis39
Oct 16 2016 07:05
Hi all! I have an issue where my glyphicon is bigger than I want and it overlaps with text. I think its because its within a h2 tag
What would be a good solution?
A_A
@Otto-AA
Oct 16 2016 07:20
@Martialis39 Can you give us a link to an example?
Makes it much easier to work with :)
Akash
@Akash1802
Oct 16 2016 08:58
Hi guys, i want to give space between image
Akash
@Akash1802
Oct 16 2016 09:06
nvm i got it by adding img-thumbnail class
Mike White
@MikeWhite-
Oct 16 2016 09:19
This message was deleted
This message was deleted
var urls = [];
var users = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];
 for (i=0;i<users.length;i++) {
  urls.push('https://api.twitch.tv/kraken/streams/'+users[i]+'?client_id=kv5dfhtphgk2mm6eagyjir3k0l9znuu')
}
console.log(urls);
for (j=0;j<urls.length;j++) {
  function {
    $.getJSON(urls[j], function(data){
if (data.stream===null){
    console.log(users[j]+ "is out to lunch");
  }
   else {
    console.log(users[j]+" is playing"+data[j].stream.game);
   } 
});
}
Taufiq Muhammadi
@waruboy
Oct 16 2016 09:22
Hey folks
Mike White
@MikeWhite-
Oct 16 2016 09:23
can someone please assist me with this loop. I am trying to loop the json url's. Not sure if I am way off or on the right track...
Taufiq Muhammadi
@waruboy
Oct 16 2016 09:23
For hosting images to be used on your portfolio project, what service do you use?
Mike White
@MikeWhite-
Oct 16 2016 09:24
Taufiq Muhammadi
@waruboy
Oct 16 2016 09:25
Thanks @MikeWhite-
CamperBot
@camperbot
Oct 16 2016 09:25
waruboy sends brownie points to @mikewhite- :sparkles: :thumbsup: :sparkles:
:cookie: 300 | @mikewhite- |http://www.freecodecamp.com/mikewhite-
Taufiq Muhammadi
@waruboy
Oct 16 2016 09:25
will try that out
Martialis39
@Martialis39
Oct 16 2016 09:59
@Otto-AA Hey! I posted earlier about my messed up icon, heres the site, how can I make the icon nice? http://www.decodingcode.com/casa_alta_2/
It works well below in the contact section
The issue is the icon is not playing nice with the h2
Mr Dao
@tikikun
Oct 16 2016 10:06
hi everyone
Martialis39
@Martialis39
Oct 16 2016 10:06
@tikikun hi!
Mr Dao
@tikikun
Oct 16 2016 10:06

```var lastNumber = 0;
function randomNumber() {

var random = Math.floor(Math.random() * 5);
if(random!= lastNumber){
lastNumber = random;
return random;
;
}else{
randomNumber();
}
};```

this code is supposed to return me a random value that 's not duplicate
i don't know why it just does not work, i try to check the logic every single step
Martialis39
@Martialis39
Oct 16 2016 10:08
Gimme 1 sec
Mr Dao
@tikikun
Oct 16 2016 10:08
tks very much :D
Martialis39
@Martialis39
Oct 16 2016 10:10
Soo, ok
I got it to work by calling the function like this
var randomNum = randomNumber();
the variable is set to whatever the function returns :) . Seems to work, what are you trying to achieve?
Mr Dao
@tikikun
Oct 16 2016 10:12
i means that
i still get something like
1 -> click -> 1
it's two 1 continously
Martialis39
@Martialis39
Oct 16 2016 10:13
Ok, so you mean that
Mr Dao
@tikikun
Oct 16 2016 10:13
i thought after checking for the last number it should avoid 1 and repeat and take another value but it didn't
Martialis39
@Martialis39
Oct 16 2016 10:13
lets say I run it once, in the way I did
you want it to return something different?
Mr Dao
@tikikun
Oct 16 2016 10:14
yeah i want it don't return two same value continously
Martialis39
@Martialis39
Oct 16 2016 10:14
so if we run 10 times, the same 2 numbers will never appear in a row?
Mr Dao
@tikikun
Oct 16 2016 10:14
yeah that right
it can be 1 2 1 or 1 5 1 only
not 1 -> 1
Martialis39
@Martialis39
Oct 16 2016 10:17
Ok sir,
try this

function randomNumber() {
  var random = Math.floor(Math.random() * 3);
  if(random !== lastNumber){
    lastNumber = random;
    return random;
  }else{
  return randomNumber();
  }
};
Note I changed it to 3 instead
it was easier to test
and then call it like this
this was my whole code

function randomNumber() {
  var random = Math.floor(Math.random() * 3);
  if(random !== lastNumber){
    lastNumber = random;
    return random;
  }else{
  return randomNumber();
  }
};

var lastNumber = randomNumber();
lastNumber = randomNumber();
lastNumber = randomNumber();
lastNumber = randomNumber();
lastNumber = randomNumber();
lastNumber = randomNumber();
Let me know if it works for you as well
Mr Dao
@tikikun
Oct 16 2016 10:39
@Martialis39 hey sr for being silent for awhile i had just go to grocery store to buy some stuff for my mom
i will check the code immediately
Martialis39
@Martialis39
Oct 16 2016 10:39
No probs mate!
Mr Dao
@tikikun
Oct 16 2016 10:42
tks so much it works like magic
i wonder why my code didn't in the first place?? +_+
random !== lastNumber and random != lastNumber
why it is different it is the same type of data
Stephen James
@sjames1958gm
Oct 16 2016 10:45
@tikikun If the values are numbers then != and !== should be the same.
The reason the changed code works is that you have to return the value from the call back to randomNumber in your else it has to be return randomNumber or you get undefined.
Mr Dao
@tikikun
Oct 16 2016 10:52
oh god i see it I thought the comparision was the one that was changed but i was wrong
tks so much @sjames1958gm
Stephen James
@sjames1958gm
Oct 16 2016 10:52
@tikikun :+1:
Mr Dao
@tikikun
Oct 16 2016 10:54
but can i ask a deeper question. I thought that if inside else should be function then it would execute the function again
why it has to be 'return' there'
Stephen James
@sjames1958gm
Oct 16 2016 10:55
@tikikun Without the return when the call to randomNumber() returns it returns the new randomNumber, without the return
the code falls to the end of the function and returns undefined
Mr Dao
@tikikun
Oct 16 2016 10:56
oh yea, i see :D
Stephen James
@sjames1958gm
Oct 16 2016 10:57
:+1:
Maksim Kulichenko
@makstheimba
Oct 16 2016 10:57
I want to assign div1 = $("#div1").html. So later I could call div1("Some text") and place "Some text" into div1. How can I do this assignment?
for now it throws error "this.empty is not a function"
Stephen James
@sjames1958gm
Oct 16 2016 10:59
@makstheimba div1 = $("#div1").html assigns the html from the div to div1.
If you want to use div1 later then you need to just do
var div1 = $("#div1");
Maksim Kulichenko
@makstheimba
Oct 16 2016 10:59
but I will have to type .html() after
I need only html() method from $("#div1")
Stephen James
@sjames1958gm
Oct 16 2016 11:00
@makstheimba If you want to get the html info out then yes, div1.html() would be needed, and you would be able to do div1.empty() as well
@makstheimba Looks like you are also using empty() if you get that error
@makstheimba It is hard to tell with only partial code
Martialis39
@Martialis39
Oct 16 2016 11:07
@sjames1958gm Hello Sir, can I ask you a bootstrap related question?
or just CSS/html related I should say
Stephen James
@sjames1958gm
Oct 16 2016 11:07
@Martialis39 Sure, not a bootstrap expert
ok
Martialis39
@Martialis39
Oct 16 2016 11:07
ok
Maksim Kulichenko
@makstheimba
Oct 16 2016 11:07
may be with fiddle it will be clearer what I want
Martialis39
@Martialis39
Oct 16 2016 11:08
@sjames1958gm Im having an issue with my glyphicon. Its working great in the contact section, but not when next to Starters and Salads
the formatting is all messed up as you can see, but I cant tell whats up with it
ive tried adding styles but to no avail
the html is this
<h2 class="menu-section"><i class="glyphicon glyphicon-plus"></i>Starters and Salads</h2>
Ive tried adding a space before Starters, but its the same
css:
.glyphicon {
  height: 14px;
  width: 14px;
  color: rgb(37, 88, 129);
}
Mike White
@MikeWhite-
Oct 16 2016 11:10
var urls = [];
var users = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];
 for (i=0;i<users.length;i++) {
  urls.push('https://api.twitch.tv/kraken/streams/'+users[i])
}
console.log(urls);

for (i=0, j=users[0];i<users.length;i++, j++)  {
$.ajax({
 type: 'GET',
 url: urls[i],
 headers: {
   'Client-ID': 'kv5dfhtphgk2mm6eagyjir3k0l9znuu'
 },
 success: function(data) {

    if (data.stream===null){
    console.log(users[j] + " is out to lunch");
  }
   else {
    console.log(users[j]+" is playing "+data.stream.game);
   } 
 }
});

}
this is a loop for the twitchtv exercise. Can anyone help me get the users[j] to not read undefined? Thanks...
Stephen James
@sjames1958gm
Oct 16 2016 11:11
@Martialis39 Add margin-right to your icon to move the text over
Martialis39
@Martialis39
Oct 16 2016 11:11
Ok 1 sec
Sigh
I couldve sworn I tried it
but now it worked :D
@sjames1958gm thank you very much!
CamperBot
@camperbot
Oct 16 2016 11:12
martialis39 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3840 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 16 2016 11:13
@MikeWhite- What is happening is the code in the callback is running after the for loop has completed when j is == user.length
http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example
This link discusses this concept. What you can do is replace the for loop with
users.forEach(function(user) {})
Put your ajax call inside this function and use user in place of users[j]
Then you can build the URL inside the function as well, no need to have urls array just put 'https://api.twitch.tv/kraken/streams/'+user in your ajax call
iDoomfull
@iDoomfull
Oct 16 2016 11:15

<img src="http://imgur.com/a/YIQ26.jpg">

How should I write the link to display an image? This link I wrote doesn't display the image

CamperBot
@camperbot
Oct 16 2016 11:15
:bulb: to format code use backticks! ``` more info
Martialis39
@Martialis39
Oct 16 2016 11:15
@iDoomfull just in case, is there any CSS affecting the img tag?
Mike White
@MikeWhite-
Oct 16 2016 11:16
thanks @sjames1958gm i will give it a shot
CamperBot
@camperbot
Oct 16 2016 11:16
mikewhite- sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3841 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 16 2016 11:16
@MikeWhite- Good luck
iDoomfull
@iDoomfull
Oct 16 2016 11:16
@Martialis39 I don't use any CSS for the image
Martialis39
@Martialis39
Oct 16 2016 11:17
@iDoomfull Then Im stumped. Maybe try adding a width and a height?
iDoomfull
@iDoomfull
Oct 16 2016 11:17
maybe the link isn't wrote correctly
Maite Alarcon
@Maitelicious
Oct 16 2016 11:20
hey guys how are you today? i have a question and i was wondering if someone could help me with that :)
Stephen James
@sjames1958gm
Oct 16 2016 11:21
@Maitelicious Sure, ask away
Maite Alarcon
@Maitelicious
Oct 16 2016 11:22
i am building my portfolio and i'm following a tutorial also n youtube, the thing is, i need the ul to move to the right, it is with the class "nav" the thing is, when i go and try to style nav, it doesn't move to the right as i told it to move, what am i doing wrong?
iDoomfull
@iDoomfull
Oct 16 2016 11:23
@Martialis39 The width and height doesn't affect the appearance of the image
Stephen James
@sjames1958gm
Oct 16 2016 11:23
@iDoomfull Are you sure that you have a valid url in your image?
iDoomfull
@iDoomfull
Oct 16 2016 11:23
I don't know. That's my problem. How should I enter the URL to be valid?
Stephen James
@sjames1958gm
Oct 16 2016 11:24
@iDoomfull Your syntax looks fine, but when I enter that url in by browser it gives an error
@Maitelicious do you want your nav inside the logo?
Maite Alarcon
@Maitelicious
Oct 16 2016 11:29
@sjames1958gm yeah, i mean, i need the ul to line up to the right, first move to the right, and then i will line them up so they are beside the logo
iDoomfull
@iDoomfull
Oct 16 2016 11:29
What website do you use to upload images and then put them on the code? I think imgur doesn't do the job
Stephen James
@sjames1958gm
Oct 16 2016 11:29
@Maitelicious If so, you may need to give it a width: 100% so it fills the width of the page
Maite Alarcon
@Maitelicious
Oct 16 2016 11:30
@sjames1958gm to the nav?
Stephen James
@sjames1958gm
Oct 16 2016 11:30
@Maitelicious To the logo if you use the inspector the logo is only about 1/4 of the page wide
Maite Alarcon
@Maitelicious
Oct 16 2016 11:31
@sjames1958gm oh ok i get you, i did it, but let me try something because the text moved to the center, i think i have something extra
Stephen James
@sjames1958gm
Oct 16 2016 11:31
@Maitelicious btw, to remove the list dots it is list-style: none not list-styles
Maite Alarcon
@Maitelicious
Oct 16 2016 11:32
@sjames1958gm YES! that was the problem, i didn't set the width, thank you so much <3 ohh okay i will do it riht away
CamperBot
@camperbot
Oct 16 2016 11:32
maitelicious sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3843 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 16 2016 11:32
@Maitelicious :+1:
Maite Alarcon
@Maitelicious
Oct 16 2016 11:33
@sjames1958gm oh and another question, to make the space even inside of the purple box...do i have to put padding?
@sjames1958gm because if you notice, the space between the beggining and "maite" is bigger than the space at the end
between contact and the end of the square
Stephen James
@sjames1958gm
Oct 16 2016 11:34
@Maitelicious Yes padding - padding is inside your background color (purple-ness)
Maite Alarcon
@Maitelicious
Oct 16 2016 11:35
@sjames1958gm ohh okay let me try, just a sec
Stephen James
@sjames1958gm
Oct 16 2016 11:36
@Maitelicious If you want the menu items horizontal - try
ul {
  display:flex;
  justify-content: flex-end;
}
li{
  list-style: none;
  padding-right: 2rem;
}
Maite Alarcon
@Maitelicious
Oct 16 2016 11:38
@sjames1958gm will do right away! and, one more thing, sorry for the stupid questions, been doing this for a week so everything is very new for me u.u uhm, i tried the padding inside of .header, but it didn't change anything, if i am correct, i should put it there, right?
Stephen James
@sjames1958gm
Oct 16 2016 11:39
@Maitelicious I think so. I have to trial an error a lot of the stuff like padding margin, etc.
Arman Vasilyan
@armvas
Oct 16 2016 11:40
Hello everyone. I'm making the Twitch.tv API project and I'm in closing stages now, the problem is - I can't get access to channel names and they display as undefined. Although there is a thing like data.stream.channel.name in twitch API it will not work with offline or not existing channels. What should I do?
http://codepen.io/799arman/pen/vXzKbW
Just fixed an error in the anchor tag in channelHTML variable. The problem with inability to access the array still ther
e
Monesul Haque
@mones-cse
Oct 16 2016 11:52
hi guys can you check this
i thinks it is more or less done
if anyone check the funtionality will be awsome tia
http://codepen.io/m1s/full/GjdLjV/
Stephen James
@sjames1958gm
Oct 16 2016 11:52
@armvas This link describes the issue http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example
Basically the value of i when the callback runs is the end of the array. Replace your for loop with forEach and you will be ok
Arman Vasilyan
@armvas
Oct 16 2016 11:59
@sjames1958gm thanks .forEach() works great in my local environment,will migrate it to codepen now.
CamperBot
@camperbot
Oct 16 2016 11:59
armvas sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3845 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 16 2016 11:59
@armvas Great!
Filippo Tarozzi
@blnt
Oct 16 2016 12:17
Hi there, I need help with regex. I would like to match last 3 characters of a string and I tried this \.{3}$ but it didn't work.
Daniel
@DanielStoica85
Oct 16 2016 12:24
Hey, guys! Does anyone know how to easily solve the following problem, preferably without JS? So I have a bootstrap row with 2 columns. One column is much higher than the other, because it has an image. So I want to do 2 things with the other column, which only has text in it: make the column have the exact same height as the first one and vertically center the text in it. Can anyone help?
Stephen James
@sjames1958gm
Oct 16 2016 12:25
@blnt can you give an example of a string and the result - what do you want to do with the resulting match?
@blnt
'12345'.match(/.{3}$/)
["345"]
Filippo Tarozzi
@blnt
Oct 16 2016 12:40
@sjames1958gm I removed \ at the beginning and it worked. Thanks!
CamperBot
@camperbot
Oct 16 2016 12:40
blnt sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3846 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 16 2016 12:40
@blnt Cool - yeah the \ caused it too look specifically for periods and not any character
Mr Dao
@tikikun
Oct 16 2016 12:56
how can i put code into a black post like that?
<a href="https://twitter.com/share" id="amount" class="twitter-share-button" data-text="">Tweet</a>
richkid20
@richkid20
Oct 16 2016 12:58
Hey campers, so I just started the basic web development project and would like a partner to help me out
Mr Dao
@tikikun
Oct 16 2016 12:58
$('#amount').data('text','anything');
$('#amount').data('text','anything');
..
<a href="https://twitter.com/share" id="amount" class="twitter-share-button" data-text="">Tweet</a>
$('#amount').data('text','anything');
yeah
why i cannot change text data to 'anything' value? is this a right way to do so
Amarillia
@Amarillia
Oct 16 2016 13:06

Hi! Can somebody help me with Bootstrap, please?
I have the following project on Codepen but for some reason the scrolling is not working. I am trying to use Boostrap to highlight the appropriate section in the nav but probably I am missing something. I tried to do it without JS/jQuery but I don't know if that is possible.

http://codepen.io/Amarillia/pen/akZaPv

Filippo Tarozzi
@blnt
Oct 16 2016 13:13
@Amarillia what's wrong with scrolling?
iDoomfull
@iDoomfull
Oct 16 2016 13:14
Can someone give an opinion on my tribute page I've made? https://codepen.io/iDoomfull/full/jrvAkX
Amarillia
@Amarillia
Oct 16 2016 13:14
@blnt It is jumping to the appropriate part but not highlighted in the nav. I am not sure how to change the active button in the nav.
iDoomfull
@iDoomfull
Oct 16 2016 13:14
What!? Why is my page all white?
Filippo Tarozzi
@blnt
Oct 16 2016 13:15
@tikikun ctrl + shift + m
Walid Ashri
@walidashri
Oct 16 2016 13:18
@iDoomfull scroll to right u'll find it u have position issues
iDoomfull
@iDoomfull
Oct 16 2016 13:20
oh
Filippo Tarozzi
@blnt
Oct 16 2016 13:20
@Amarillia I think you need JS
Amarillia
@Amarillia
Oct 16 2016 13:21
@iDoomfull There are couple of issues with your webpage. The column with the value 3 is quite narrow. col-md-8 would look better and the positioning of your image is not in the right place. It will look better if you experiment little bit with margin and padding. You don't really need JavaScript for this project
Filippo Tarozzi
@blnt
Oct 16 2016 13:21
@Amarillia try this:
This message was deleted
This message was deleted
   $(".navbar li").click(function(){
       $(".active").removeClass("active");
       $(this).addClass("active");
   });
});
iDoomfull
@iDoomfull
Oct 16 2016 13:23
I am still trying to learn how to make the page compatible with mobile so I am sticking with padding and margin for now
Mr Dao
@tikikun
Oct 16 2016 13:27
hi , could anyone help me?
Amarillia
@Amarillia
Oct 16 2016 13:28

@iDoomfull I understand but when you using col-md-3 e.g. it is Bootstrap. It is very easy learn it but you have to make sure you use it to the right way. Please have a look at about this, this will help you why am I mentioned it.

https://getbootstrap.com/examples/grid/
https://v4-alpha.getbootstrap.com/layout/grid/

Mr Dao
@tikikun
Oct 16 2016 13:28

```
<a href="https://twitter.com/share" id="amount" class="twitter-share-button" data-text="">Tweet</a>

document.getElementsByClassName('twitter-share-button')[0].setAttribute("data-text",'something')

<a href="https://twitter.com/share" id="amount" class="twitter-share-button" data-text="">Tweet</a>

document.getElementsByClassName('twitter-share-button')[0].setAttribute("data-text",'something')
when i let's the code run itself it can change the data-text to 'anything'
but when i put the code into an on("click....) it just does not work at all
Amarillia
@Amarillia
Oct 16 2016 13:53

@iDoomfull I forked little bit your project, I hope it will help. It will also help if you read the following links

https://codepen.io/Amarillia/pen/BLOLba

http://www.w3schools.com/css/css_boxmodel.asp
http://www.w3schools.com/css/css_margin.asp
http://www.w3schools.com/css/css_padding.asp

Basically the margin didn't worked properly because you added more than 600px for few ids and that pushed your content to the left side of the browser
Amarillia
@Amarillia
Oct 16 2016 14:00
thanks @blnt The function should be okay but for some reason it is still not working :( Maybe something wrong with the HTML or I miss some CSS...I am not sure
CamperBot
@camperbot
Oct 16 2016 14:00
amarillia sends brownie points to @blnt :sparkles: :thumbsup: :sparkles:
:cookie: 252 | @blnt |http://www.freecodecamp.com/blnt
Filippo Tarozzi
@blnt
Oct 16 2016 14:14
@Amarillia I applied that js on codepen and verified, try to save it and re-paste the link
Ivo Tsolov
@ivoTsolov
Oct 16 2016 14:26
okey guys here is the deal, i am trying to make a 3d rotating gallery and i am looking for parthner to help me with it if anyone is interested i would like to discuss it
tcar
@tcar
Oct 16 2016 14:55
i have a question about wikipedia viewer... why my search box wont extend for 150px when i click on it... here is my codepen http://codepen.io/Tcar/pen/VKAvyL?editors=1010
U-ways
@U-ways
Oct 16 2016 15:14

@tcar Hello! You need to use focus css pseudo-class to achieve such effects. Example:

#upis:focus { 
    width: 300px;
}

Of course you can also add transitions or animations to make it look better :D

Hèlen Grives
@mesmoiron
Oct 16 2016 15:14
Can anyone explain to me why github pages doesn't update when I pushed the changes to the repository. http://mesmoiron.github.io ? I'm testing out jekyll. However I started with editing the page from the github page.
Adam Jacks
@AdamHJ123
Oct 16 2016 15:15
Hey guys, anyone here particularly skilled with CSS animations?
Keyframes rather haha
tcar
@tcar
Oct 16 2016 15:16
@U-ways ok thanks, i'm gonna google it
CamperBot
@camperbot
Oct 16 2016 15:16
tcar sends brownie points to @u-ways :sparkles: :thumbsup: :sparkles:
:cookie: 488 | @u-ways |http://www.freecodecamp.com/u-ways
trapmonk
@trapmonk
Oct 16 2016 15:24
how do you host pictures on codepen for project 1!?
crwne1
@crwne1
Oct 16 2016 15:27
what API do i use for random quotes?
JD Tadlock
@jdtdesigns
Oct 16 2016 15:28
@crwne1 there's a ton out there
just google quote api
crwne1
@crwne1
Oct 16 2016 15:28
@jdtdesigns how do i find them?
trapmonk
@trapmonk
Oct 16 2016 15:28
@jdtdesigns any thoughts
JD Tadlock
@jdtdesigns
Oct 16 2016 15:29
go to google.com
and type 'quote api'
trapmonk
@trapmonk
Oct 16 2016 15:39
is there somewhere on freecodecamp to host assets
JD Tadlock
@jdtdesigns
Oct 16 2016 15:39
@trapmonk no
what are you needing to host?
trapmonk
@trapmonk
Oct 16 2016 15:43
img
for project 1
@jdtdesigns
A_A
@Otto-AA
Oct 16 2016 15:43
@trapmonk well, you could change your profile pic and then use the link to it... °,;,°
JD Tadlock
@jdtdesigns
Oct 16 2016 15:43
trapmonk
@trapmonk
Oct 16 2016 15:46
@jdtdesigns @Otto-AA THANK YOU!!!
CamperBot
@camperbot
Oct 16 2016 15:46
trapmonk sends brownie points to @jdtdesigns and @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 310 | @otto-aa |http://www.freecodecamp.com/otto-aa
:cookie: 690 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
elioku27
@elioku27
Oct 16 2016 15:53
guys am i trying
A_A
@Otto-AA
Oct 16 2016 15:54
@elioku27 Sorry, what's the problem?
elioku27
@elioku27
Oct 16 2016 15:54
i dont know how to add images in portfolio i have no portfolio am a starter
what should i put there
Vincent Endrahadi
@vincentendrahadi
Oct 16 2016 15:55
img src (?)
elioku27
@elioku27
Oct 16 2016 15:55
and my image is not uploading
A_A
@Otto-AA
Oct 16 2016 15:56
elioku27
@elioku27
Oct 16 2016 15:56
i wanna put d image in d header its not letting me
ok i didnt put png
A_A
@Otto-AA
Oct 16 2016 15:56
you need a picuture as src and not a website
elioku27
@elioku27
Oct 16 2016 15:56
thanks
Vincent Endrahadi
@vincentendrahadi
Oct 16 2016 15:57

<p data-height="265" data-theme-id="0" data-slug-hash="yaqpLY" data-default-tab="html,result" data-user="Axelinate" data-embed-version="2" class="codepen">See the Pen <a href="https://codepen.io/Axelinate/pen/yaqpLY/">Tribute Page</a> by Vincent Endrahadi (<a href="http://codepen.io/Axelinate">@Axelinate</a>) on <a href="http://codepen.io">CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

not this lol, sorry for spamming
elioku27
@elioku27
Oct 16 2016 15:57
ok
Vincent Endrahadi
@vincentendrahadi
Oct 16 2016 15:58
elioku27
@elioku27
Oct 16 2016 15:59
still not uploading
Vincent Endrahadi
@vincentendrahadi
Oct 16 2016 15:59
guys how to change the width of the caption
A_A
@Otto-AA
Oct 16 2016 15:59
@elioku27 http://i.imgur.com/SKWeThT.png that's the correct link
This message was deleted
Vincent Endrahadi
@vincentendrahadi
Oct 16 2016 16:01
https://codepen.io/Axelinate/pen/yaqpLY
how to adjust the width of caption width with img width?? if i put in on full screen the white border will expand beyond the image?
elioku27
@elioku27
Oct 16 2016 16:04
thanks guys
but how did u get my link bro
ManBearPigg
@ManBearPigg
Oct 16 2016 16:05
@vincentendrahadi maybe caption width 100% instead of auto?
Vincent Endrahadi
@vincentendrahadi
Oct 16 2016 16:06
@ManBearPigg not changing though
elioku27
@elioku27
Oct 16 2016 16:08
use 200px width
200px height
SlimxaQ
@SlimxaQ
Oct 16 2016 16:18
Someone know about Python programming?
elioku27
@elioku27
Oct 16 2016 16:19
yes
but not much
SlimxaQ
@SlimxaQ
Oct 16 2016 16:19
Can we type on private?
elioku27
@elioku27
Oct 16 2016 16:20
i dont know how to type private
and am busy
SlimxaQ
@SlimxaQ
Oct 16 2016 16:20
ok
Amarillia
@Amarillia
Oct 16 2016 16:24

@blnt Thanks but this is not working however I understand why you sent and certainly useful.

I still need help and advice why the scrollspy is not working on my page. Can somebody advice please?
http://www.w3schools.com/bootstrap/bootstrap_scrollspy.asp
http://codepen.io/Amarillia/pen/akZaPv

CamperBot
@camperbot
Oct 16 2016 16:24
amarillia sends brownie points to @blnt :sparkles: :thumbsup: :sparkles:
:cookie: 254 | @blnt |http://www.freecodecamp.com/blnt
Amarillia
@Amarillia
Oct 16 2016 16:26
@SlimxaQ Better to try this: https://gitter.im/FreeCodeCamp/python
SlimxaQ
@SlimxaQ
Oct 16 2016 16:27
I'm already in :D
Amarillia
@Amarillia
Oct 16 2016 16:27
Excellent :)
Peder Kjellen
@PeZaK
Oct 16 2016 16:28
I'm really struggling with importing api's
why is this not producing anything?
$(document).ready(function() {
  $("#getQuote").on("click", function() {
    $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en", function(json) {
      var html = json.quoteText;
      $(".message").html(html);
      });
  });
});
<div class="message well">This is where the quote will go </div>
{"quoteText":"In the sky}
Amarillia
@Amarillia
Oct 16 2016 16:40
blob
This message was deleted
@elioku27 if you pull your mouse with somebody's image you will have a pop-up. And if you click on it you can chat privately.
A_A
@Otto-AA
Oct 16 2016 16:58
@elioku27 Well, you linked to the page with the picture and I made right-click -> show picture =D
Annu Nirmal
@annunirmal
Oct 16 2016 17:00
i wan to change opacity of my background image. please help me out
https://codepen.io/nirmalannu/pen/GjBzbW
xSnowpeltx
@xSnowpeltx
Oct 16 2016 17:24
Ok im not quite sure how to explain this in just words. I have a div thats the border that will sometimes have content at the top of it, and a div that is inside the border div. I either want the top of the border to stay the same size regardless of if the content is in it, or make the outer div stretch to fit all the content when its added, so the bottom of the middle div doesnt get out of the box. Also overflow: none doesnt seem to be working and I'd like to get the top margin and/or padding for the stuff at the top of the border to be less
here it is without the top content
hey can someone help me with my twitch app
i put the client id in
xSnowpeltx
@xSnowpeltx
Oct 16 2016 17:25
i mean with it
max77p
@max77p
Oct 16 2016 17:25
but for whatever reason, its not outputting the "offline" streams for me
xSnowpeltx
@xSnowpeltx
Oct 16 2016 17:25
A_A
@Otto-AA
Oct 16 2016 17:28
@xSnowpeltx Not quite sure if I understood you, but well. What about removing the height: 390px part from the .border and maybe adding some padding-bottom to it? Then it fits automatically to the content
xSnowpeltx
@xSnowpeltx
Oct 16 2016 17:28
actually never mind figured it out
tho actually @Otto-AA thanks thats a good fix too
CamperBot
@camperbot
Oct 16 2016 17:29
xsnowpeltx sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 311 | @otto-aa |http://www.freecodecamp.com/otto-aa
A_A
@Otto-AA
Oct 16 2016 17:29
@xSnowpeltx :)
Peder Kjellen
@PeZaK
Oct 16 2016 17:30
@Otto-AA Doesn't make a difference
A_A
@Otto-AA
Oct 16 2016 17:30
@PeZaK Can you link the pen?
@Otto-AA
A_A
@Otto-AA
Oct 16 2016 17:35
@PeZaK Hmmm, it worked for me just 5min back and now it doesn't :/
Artur Arsalanov
@kurumkan
Oct 16 2016 17:36
@PeZaK probably use http:// not https:// ?
if I use https the console outputs:Blocked loading mixed active content “http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=jQuery31006757435936313034_1476639534396&_=1476639534402”
A_A
@Otto-AA
Oct 16 2016 17:42
@kurumkan :+1:
Peder Kjellen
@PeZaK
Oct 16 2016 17:43
@kurumkan I am doesn't make a difference
Artur Arsalanov
@kurumkan
Oct 16 2016 17:43
@PeZaK what is ur client?
A_A
@Otto-AA
Oct 16 2016 17:43
@PeZaK just make sure it is "http://codepen.io/..."
Peder Kjellen
@PeZaK
Oct 16 2016 17:44
aha
Artur Arsalanov
@kurumkan
Oct 16 2016 17:44
it must make the difference=)
Peder Kjellen
@PeZaK
Oct 16 2016 17:45
That works OMFG the time I've spent on this
Thank you so much @kurumkan @Otto-AA
CamperBot
@camperbot
Oct 16 2016 17:45
pezak sends brownie points to @kurumkan and @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @otto-aa |http://www.freecodecamp.com/otto-aa
:cookie: 337 | @kurumkan |http://www.freecodecamp.com/kurumkan
Diego
@disofu234
Oct 16 2016 17:50

Hey guys can you look at this project really quickly? I have 4 divs inside of a bigger one and im trying to make it 2 columns of 2 but it only comes out as a column of 4. How can I fix this?

https://codepen.io/dacuban/pen/BLOpgq

Artur Arsalanov
@kurumkan
Oct 16 2016 17:51
@PeZaK welcome. There also might be problems with other resources like images audio etc - and sometimes it happens because you request them on https but the response is on http so to avoid that you can use just //
can't figure out where i am going wrong still in my code
that i get the 400 error
can anyone help
Artur Arsalanov
@kurumkan
Oct 16 2016 17:53

@disofu234

  border: 1px black solid;
  height: 92.5px;
  width: 120px;
  margin: 5px;
  float: left;
}

something like that

Diego
@disofu234
Oct 16 2016 17:59
i tried the float thing but it doesnt really work
Artur Arsalanov
@kurumkan
Oct 16 2016 18:02
@disofu234 it's the simplest solution. Make the inner divs float to the same side, and make them fit in the outer div(change width)
Diego
@disofu234
Oct 16 2016 18:05
i fixed it! thank you @kurumkan
CamperBot
@camperbot
Oct 16 2016 18:05
disofu234 sends brownie points to @kurumkan :sparkles: :thumbsup: :sparkles:
:cookie: 338 | @kurumkan |http://www.freecodecamp.com/kurumkan
Annu Nirmal
@annunirmal
Oct 16 2016 18:24
Hansi2468
@Hansi2468
Oct 16 2016 19:11
Can any one tell me why text[i].fromCharCode is not a function?
function rot13(str) { // LBH QVQ VG!
var text = ""; // text returns 78 79 80 81
var finishedText= "";
for (i = 0; i < str.length; i++) {
text += str[i].charCodeAt() + 13 + " ";
}
for (i = 0; i < text.length; i++) {
finishedText += text[i].fromCharCode();
}
return finishedText;
}
// Change the inputs below to test
rot13("ABCD");
Waqas Abbasi
@Waqas909
Oct 16 2016 19:31
Artur Arsalanov
@kurumkan
Oct 16 2016 19:33
@Waqas909 nice. Then try to make it responsive
Waqas Abbasi
@Waqas909
Oct 16 2016 19:33
but doesnt that involve JS?
@kurumkan
Artur Arsalanov
@kurumkan
Oct 16 2016 19:34
for now not. Wrap all with container or container-fluid

@Waqas909


<div class="container">
  <div class="row">
    <div class="col-*-*"></div>
  </div>
  <div class="row">
    <div class="col-*-*"></div>
    <div class="col-*-*"></div>
    <div class="col-*-*"></div>
  </div>
  <div class="row">
    ...
  </div>
</div>

something like that

Waqas Abbasi
@Waqas909
Oct 16 2016 19:35
kk Thanks @kurumkan, how can that be helpful
CamperBot
@camperbot
Oct 16 2016 19:35
waqas909 sends brownie points to @kurumkan :sparkles: :thumbsup: :sparkles:
:cookie: 340 | @kurumkan |http://www.freecodecamp.com/kurumkan
Artur Arsalanov
@kurumkan
Oct 16 2016 19:36
@Waqas909 don't use align center <div align=center id="Firstpart" class="row">
there is bootstrap built in: .text-center class
center, width etc. tags are deprecated now=)
you are welcome
Waqas Abbasi
@Waqas909
Oct 16 2016 19:37
@kurumkan Thanks
CamperBot
@camperbot
Oct 16 2016 19:37
waqas909 sends brownie points to @kurumkan :sparkles: :thumbsup: :sparkles:
:warning: waqas909 already gave kurumkan points
Artur Arsalanov
@kurumkan
Oct 16 2016 19:38
@Waqas909 there are plenty tutorials on bootstrap. I don't know which is better. Try one if you feel too frustrated now. It's normal=)
Waqas Abbasi
@Waqas909
Oct 16 2016 19:39
@kurumkan Yea I'm searching them :-)
(y)
Joran de Haan
@LeCoquille
Oct 16 2016 19:40
Hey guys, hope everybody's doing well
I'm trying to get a geolocation in javascript
Joran de Haan
@LeCoquille
Oct 16 2016 19:40
it's not working though. should be very simple this, but don't know what's wrong
anybody any ideas?
Waqas Abbasi
@Waqas909
Oct 16 2016 19:42
Ok I shall check them out now! @kurumkan
Simon Cordova
@gbsimon87
Oct 16 2016 19:51
Hey guys, after about a good week's worth, I didn't give up, and just finished my weather ap...I had initially finished the one that just used the current IP to show your own location's weather, but I went a tad further so that the user could type in a location and it'd show the respective weather.
Let me know what you guys think :grinning:
http://codepen.io/gbsimon87/pen/kkpagW
Hansi2468
@Hansi2468
Oct 16 2016 20:12

can any one tell me what i am doing wrong???

function rot13(str) { // LBH QVQ VG!
var codedArr = str.split("");
var decodedStr=[];
var alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","A","B","C","D","E","F","G","H","I","J","K","L","M"];
for (var i =0; i<codedArr.length; i++){
if (alphabet.indexOf(codedArr[i])===-1)
return decodedStr.push(codedArr[i]);
else {
for (var j=0; j<alphabet.length; j++){
if (codedArr[i]===alphabet[j])
decodedStr.push(alphabet[j+13]);
}
}
}

return decodedStr.join("");
}
// Change the inputs below to test
rot13("SERR PBQR PNZC");

Ivo Tsolov
@ivoTsolov
Oct 16 2016 20:52
can someone give me a link to the course room
__mifflin__
@cdrainxv
Oct 16 2016 21:12
@Hansi2468: return decodedStr.push(codedArr[i]); remove return.
Brendon Freston
@bfrest
Oct 16 2016 21:17
@Waqas909 I like it. Im no expert but I think the contact me would look really good centered under the heading, also your social media could look a little more uniform. but overall :+1:
Waqas Abbasi
@Waqas909
Oct 16 2016 21:17
Thanks for the feedback @bfrest What do you mean more uniform? Could you elaborate a bit more?
CamperBot
@camperbot
Oct 16 2016 21:17
waqas909 sends brownie points to @bfrest :sparkles: :thumbsup: :sparkles:
:cookie: 77 | @bfrest |http://www.freecodecamp.com/bfrest
snickerz
@snickerz
Oct 16 2016 21:18
can we have only one external link on the tribute page?
Brendon Freston
@bfrest
Oct 16 2016 21:21
@Waqas909 umm, maybe you could take away the text "social media" and just have the two links at the bottom of the page. after the submit button maybe in a darker shade sort of like a footer? idk i'm just tossing you ideas :wink:
Waqas Abbasi
@Waqas909
Oct 16 2016 21:21
@bfrest Yea i was thinking that too
@bfrest Thanks again for feedback
CamperBot
@camperbot
Oct 16 2016 21:21
waqas909 sends brownie points to @bfrest :sparkles: :thumbsup: :sparkles:
:warning: waqas909 already gave bfrest points
Marina
@joyinthenow
Oct 16 2016 21:33
I am working on my portfolio and I feel completely lost. I dont have a background in HTML outside this program but I feel like having a bit of a deeper grasp is expected to finish this task. Am I wrong?
Rimi.
@Codevotee
Oct 16 2016 21:38
@joyinthenow Hey Marina, you may want to refer to W3Schools while doing it but what FCC taught so far should be enough, you just have to research the stuff taught a bit more. You can do it out of pure HTML with CSS or you can use Bootstrap and some CSS
john94
@lpy1994
Oct 16 2016 21:38
@jacobus-brogly this thing looks deep!
jacobus-brogly
@jacobus-brogly
Oct 16 2016 21:39
what is your framerate? @lpy1994
john94
@lpy1994
Oct 16 2016 21:39
30-40
it changes from range 30 - 50
jacobus-brogly
@jacobus-brogly
Oct 16 2016 21:42
ok, , it cannot go faster then 60, (refresh rate screen)
Rimi.
@Codevotee
Oct 16 2016 21:43

@joyinthenow you can create a <div></div> for each section then add code to each section, e.g.

<div class="about">
<h1> About </h1> 
<p> Hello I am... and...</p>
<!-- Then more code -->
</div>

Then style each div

Marina
@joyinthenow
Oct 16 2016 22:11
Thank you @APRim05 I was looking at the W3School and thinking that might be helpful.I'm slowly getting there I think it's just taking a while to figure out what I'm wanting to look up. :)
CamperBot
@camperbot
Oct 16 2016 22:11
joyinthenow sends brownie points to @aprim05 :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @aprim05 |http://www.freecodecamp.com/aprim05
Dylan Noble
@drnoble88
Oct 16 2016 22:16
Hey guys, I'm having difficulty lining up my picture in my portfolio. Any advice?http://codepen.io/drnoble88/pen/gwzkYN
Allan Pooley
@AllanPooley
Oct 16 2016 22:18
@drnoble88 Hey Dylan, you mean your portrait? or the project placeholders?
Dylan Noble
@drnoble88
Oct 16 2016 22:19
@AllanPooley All 4 of them. I can't seem to get them lined up.
I attempted to do it with col-xs-6 but that didn't seem to work.
Walid Ashri
@walidashri
Oct 16 2016 22:20
@drnoble88 try put all in row then every two in separate row
Dylan Noble
@drnoble88
Oct 16 2016 22:21
@walidashri Ok I'll give it a try!
Allan Pooley
@AllanPooley
Oct 16 2016 22:21
@drnoble88 I would also try specifying your grid for multiple different screen sizes:
eg. <div class="col-md-6 col-sm-12 col-xs-12>
So for a desktop computer that div will take up half the horizontal width of the screen, but for a phone the whole horizontal width
Dylan Noble
@drnoble88
Oct 16 2016 22:24
@AllanPooley Oh cool, I didn't know I could do that.
I still coudn't get it to work putting them all under one row and every two in a separate row :/
Allan Pooley
@AllanPooley
Oct 16 2016 22:27
I recommend putting two projects in the same row
Each project having a nested <div class="col-md-6 col-sm-12 col-xs-12>
Walid Ashri
@walidashri
Oct 16 2016 22:28
@drnoble88 check this
Allan Pooley
@AllanPooley
Oct 16 2016 22:30
I also think its worth while playing with your margins and padding, I noticed while building my portfolio sometimes they would result in strange behaviour
Dylan Noble
@drnoble88
Oct 16 2016 22:37
Well I'll keep fiddling after I take a food break. Thanks for all the help!
DRAEIN
@DRAEIN
Oct 16 2016 22:46
can someone help me, i cant connect my css with html
<!Doctype html>
<html>
<head>
<title>Mark Billes - Back End Ruby on Rails Developer</title>
<link rel="stylesheet" href="css/application.css" type="text/css">
</head>

<body>
    <header id="main_navigation class" class="clearfix">
        <a href="#" class="name">MB</a>
        <nav>
            <a href="#">Articles</a>
            <a href="#">Projects</a>
            <a href="#">Contact</a>


        </nav>

    </header>


</body>

</html>
#main_navigation {
    padding: 2.5em 5%;

}
i converted sccs into css
Allan Pooley
@AllanPooley
Oct 16 2016 22:47
@drnoble88 To .portfolio-blank and .portfolio-picture, I added:
float: center;
margin: 3% 5% 0% 0%;
It looks better, but there is something offset with your .portfolio-picture... I don't know where this is in your code though
DRAEIN
@DRAEIN
Oct 16 2016 22:48
my css folder is here: blog\css\application.css
my html is in blog too
Allan Pooley
@AllanPooley
Oct 16 2016 22:49
@DRAEIN It looks like you might have to get rid of " class" from your header's id
DRAEIN
@DRAEIN
Oct 16 2016 22:50
@AllanPooley ...
how could i miss on taht?
thanks mate
Allan Pooley
@AllanPooley
Oct 16 2016 22:51
@DRAEIN It happens to the best of us :grin:
DRAEIN
@DRAEIN
Oct 16 2016 22:52
@AllanPooley :)
Slavoljub Popovic
@slavo7
Oct 16 2016 22:55
i dont understand where is a problem , is anyone can help me

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

// Only change code below this line;

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

Diego
@disofu234
Oct 16 2016 22:58
For the simon game how did you guys manage to listen to the user input asynchronously?
Hristijan Gjorgjievski
@hristijankiko
Oct 16 2016 23:08
Just got my pomodoro timer finished. What do you guys think?
http://codepen.io/hristijankiko/full/RGYRqj/
DRAEIN
@DRAEIN
Oct 16 2016 23:11
@AllanPooley got another sec?
<a href="#" class="name">MB</a>
#main_navigation {
    padding: 2.5em 5%;
    .name {
        font-weight: 700;
        font-size: .7em;
        text-transform: uppercase;
        border: 2px solid;
    }

}
why is my .name not a class?
does anyone know?
kat-mag
@kat-mag
Oct 16 2016 23:16
@DRAEIN are you coding sass?
DRAEIN
@DRAEIN
Oct 16 2016 23:16
yea
Hristijan Gjorgjievski
@hristijankiko
Oct 16 2016 23:17
I think that is SCSS not SASS
SASS does not use brackets
Allan Pooley
@AllanPooley
Oct 16 2016 23:17
@hristijankiko Cool colouring and stylisation :smile:
DRAEIN
@DRAEIN
Oct 16 2016 23:17
oh im not familiar, so yeah i thinks its scss
Hristijan Gjorgjievski
@hristijankiko
Oct 16 2016 23:17
@AllanPooley Thanks :)
CamperBot
@camperbot
Oct 16 2016 23:17
hristijankiko sends brownie points to @allanpooley :sparkles: :thumbsup: :sparkles:
:cookie: 230 | @allanpooley |http://www.freecodecamp.com/allanpooley
kat-mag
@kat-mag
Oct 16 2016 23:18
different syntax, but it's still Sass ;D
DRAEIN
@DRAEIN
Oct 16 2016 23:18
any ideas?
Hristijan Gjorgjievski
@hristijankiko
Oct 16 2016 23:20
@DRAEIN You can't use SCSS without compiling it first
DRAEIN
@DRAEIN
Oct 16 2016 23:20
i did compile it into css if u mean that
Hristijan Gjorgjievski
@hristijankiko
Oct 16 2016 23:20
I don't know then xD
DRAEIN
@DRAEIN
Oct 16 2016 23:21
its really strange
kat-mag
@kat-mag
Oct 16 2016 23:22
syntax is all right, I suppose. Maybe your element with name class isn't inside the element with that particular id?
DRAEIN
@DRAEIN
Oct 16 2016 23:23

@kat-mag ```

<header id="main_navigation" class="clearfix">
<a href="#" class="name">MB</a>
<nav>
<a href="#">Articles</a>
<a href="#">Projects</a>
<a href="#">Contact</a>

    </nav>

</header>

```

its like that
eah
wtf
<header id="main_navigation" class="clearfix">
        <a href="#" class="name">MB</a>
        <nav>
            <a href="#">Articles</a>
            <a href="#">Projects</a>
            <a href="#">Contact</a>


        </nav>

    </header>
kat-mag
@kat-mag
Oct 16 2016 23:25
Can't see any errors. Codepen doesn't scream at anything as well. http://codepen.io/type_kate/pen/LRJjNj it's nested properly. Maybe you're expecting different results? :D
fadyboy
@fadyboy
Oct 16 2016 23:26
Hi all, I've just completed my wikipedia viewer app please see link here http://codepen.io/aofadero/full/ALPoEK/
DRAEIN
@DRAEIN
Oct 16 2016 23:26
@kat-mag thats exactly what im expecting
but its just not working
can anyone help me turn my menu to a button as the size gets smaller
kat-mag
@kat-mag
Oct 16 2016 23:28
@DRAEIN all right. then it's weird as f ;d hmmm
DRAEIN
@DRAEIN
Oct 16 2016 23:33
@kat-mag i fiexed it by using } after the padding arguments
weird
Adam Jacks
@AdamHJ123
Oct 16 2016 23:35
Can I get some opinions on my website please? http://codepen.io/AdamHJacks/pen/NAmkzr
kat-mag
@kat-mag
Oct 16 2016 23:36
emm... so how does it look right now? just curious ;d @DRAEIN
@AdamHJ123 Font is too small on smaller devices... content overflows. In another words: make it responsive
DRAEIN
@DRAEIN
Oct 16 2016 23:39
#main_navigation {
    padding: 2.5em 5% }
    .name {
        font-weight: 700;
        font-size: .7em;
        text-transform: uppercase;


    }
like this
with the expected result ;)
Adam Jacks
@AdamHJ123
Oct 16 2016 23:40
@kat-mag I'm not too worried about phones and so on as of yet
kat-mag
@kat-mag
Oct 16 2016 23:40
@DRAEIN but that's not even correct syntax, wtf is wrong with this transpiler of yours :D
Adam Jacks
@AdamHJ123
Oct 16 2016 23:40
I really struggle making things responsive haha
DRAEIN
@DRAEIN
Oct 16 2016 23:40
@kat-mag i really dont know, at least its working haha
Aaron Bell
@awb715
Oct 16 2016 23:40
@DRAEIN can you assit me in making a menu button on a mobilesize
DRAEIN
@DRAEIN
Oct 16 2016 23:41
@awb715 sorry im a beginner myself :(
kat-mag
@kat-mag
Oct 16 2016 23:41
@AdamHJ123 phones whatever, but I'm making my window smaller quite often and it looks duuuh ;D
@AdamHJ123 and hamburger menu has oh-so-big font... You could make it smaller. So again -responsive. And I can't scroll up. That's not a good decision UX-wise
Adam Jacks
@AdamHJ123
Oct 16 2016 23:43
@kat-mag Haven't decided if I want the overflow or not to allow scrolling
Ye though I think I will make the menu text smaller
Any idea what kind of design I should use to show my projects?
I've changed the size of the menu text, looks better
kat-mag
@kat-mag
Oct 16 2016 23:46
don't overdo it, really. just display them in a grid
your website is already too flashy with those colors ;D
and if you don't allow your users to scroll freely they will just go away
Adam Jacks
@AdamHJ123
Oct 16 2016 23:47
I think it could look too boring and just odd if it's just a grid
kat-mag
@kat-mag
Oct 16 2016 23:47
@DRAEIN if it works that way - you're writing css... because it'd ignore the double }} at the end and take one.
@DRAEIN so maybe double check what's going on xD
@AdamHJ123 so make a basic carousel
Adam Jacks
@AdamHJ123
Oct 16 2016 23:50
Was thinking about a carousel
Did that on my first portfolio
Just realised, when I'm in the top section I can't click on the menu text because the original logo which shows on the loader is in the way
kat-mag
@kat-mag
Oct 16 2016 23:57
@AdamHJ123 I'd work some more on design & UX if I were you. Because your animations are cool and all, but it just doesn't look right. Unless you want to be a backend dev - then it's totally fine what you're doing ;D
Adam Jacks
@AdamHJ123
Oct 16 2016 23:59
Which animations?
The skills section one?