These are chat archives for FreeCodeCamp/HelpFrontEnd

1st
Jun 2016
wildaces215
@wildaces215
Jun 01 2016 00:00
Hey I am currently creating the twitch app, using angular, I am trying to send an array to the twitch database and return the data that I need. The problem is that I don't how to take an array, use an api call and get the data back. Here is my penhttp://codepen.io/whatisthis/pen/WwLYOM
buiphuking
@buiphuking
Jun 01 2016 00:12
i build pomodoro clock , it works, but i stay in the other tab like youtube then i clock freeze , mean i need to stay at the tab has my pomodoro clock, then my clock counting, you guys have situation like this ?????????
Pawan
@pawan92
Jun 01 2016 00:19
can anyone give me tips on how i can print the name of the stream for my twitch stream? right now its just printing offline http://codepen.io/pawan92/pen/MyMRwo?editors=1111
Stee
@5t33
Jun 01 2016 00:22
ok yall
There's a ton of not working here.
I can't seem to get the clock element to the center of the page
block
Greg Duncan
@GregatGit
Jun 01 2016 00:28
@pawan92 $('#result').append(JSON.stringify(data.stream));
Pawan
@pawan92
Jun 01 2016 00:33
@GregatGit that gives me the full string tho. is there a way to get just the name
Greg Duncan
@GregatGit
Jun 01 2016 00:34
@pawan92 what name do you want
Pawan
@pawan92
Jun 01 2016 00:36
@GregatGit like if its freecodecamp..i just want it to say "freecodecamp is offline"
Greg Duncan
@GregatGit
Jun 01 2016 00:38
@pawan92 if you want to get it from the api you can't get it from https://api.twitch.tv/kraken/streams/ - you have to get it from https://api.twitch.tv/kraken/channels/
Ken Haduch
@khaduch
Jun 01 2016 00:40
@aryandua - I did not see an answer to your question :point_up: May 31, 2016 7:36 PM - the for loop runs through to the count from 0 through 9 and starts your timeout counter. Unfortunately, the way that this works is that all of your callback function instances are using variable i, which has the value of 10 at the end of the loop, so they would all print the value 10 to the console. You have to use a different technique to evaluate the variable immediately - I think that I found it described in this article: Understand JavaScript Closures with Ease. In particular, it is in topic 3 in that article "Closures Gone Awry" that it discusses that problem.
JD Tadlock
@jdtdesigns
Jun 01 2016 00:45
@5t33 What clock element?
buiphuking
@buiphuking
Jun 01 2016 00:55
can we beat AI tic tac toe game ?
Ken Haduch
@khaduch
Jun 01 2016 01:09
@aryandua - oh, and I see the second part of your question - there is no delay because you are setting the same timeout time for each setTimeout function call. The for loop executes as quickly as the CPU will allow it to, essentially "queuing up" all of the setTimeout functions to wait for their delay to expire. You would have to do something like add a value to your 5000 each time to delay the next timeout even more, and add to it again, etc.
Jonathan Mitchell
@Vanhealen
Jun 01 2016 01:09
var newDiv = document.createElement("div");

newDiv is the name of the element and its type is "div"

newDiv.setAttribute("Id","div1")

So the id of the element of type "div" is "div1". Is the name "newDiv" only used to refer to the html element WHEN IN JAVASCRIPT?

if "newDiv" is not actually the ID of the element.
it's kind of confusing what newDiv actually is. I think its just a variable thats used to refer to the specific "div" that I created
But yeah if anybody can provide some clarification on that it would be awesome...thanks
Bruce Young
@mutantspore
Jun 01 2016 01:21
@buiphuking not now necessary
Jonathan Mitchell
@Vanhealen
Jun 01 2016 01:35
I can't find a way to create an element to display the quotes
http://codepen.io/vanhealen/pen/beNBRe
all vanilla JS
NAVTEJ SINGH
@navtej92
Jun 01 2016 01:39
hi
Jonathan Mitchell
@Vanhealen
Jun 01 2016 01:40
yo
Bruce Young
@mutantspore
Jun 01 2016 01:42
@Vanhealen quote_par.innerHTML = arr[0].text;
Jonathan Mitchell
@Vanhealen
Jun 01 2016 01:46
There we go!
Actually this is a rather bad idea to create an element each time because I will end up with too many quotes, I am better off just modifying the existing html inside the element each time.
Bruce Young
@mutantspore
Jun 01 2016 01:47
lol just fixing what was broken.. not designing your app :)
Jonathan Mitchell
@Vanhealen
Jun 01 2016 01:48
yeah thank you!
DC
@dctor
Jun 01 2016 01:48
in codepen when write <script> do you need any link or install package for the script to work? none of mine are responsive. thanks
Bruce Young
@mutantspore
Jun 01 2016 01:49
@dctor put all your script code in the JS window
DC
@dctor
Jun 01 2016 01:49
@mutantspore mine are in html window
Bruce Young
@mutantspore
Jun 01 2016 01:49
@dctor well...
@dctor the js window is for your js
DC
@dctor
Jun 01 2016 01:51
@mutantspore here is the pen, it just has a script for button as of now.
http://codepen.io/dctor/pen/rLaWZr
Adam Urberg
@aurberg
Jun 01 2016 01:53
@dctor You can also put all the external link/scripts in the settings if you wanted to. But either way works
aschwab9009
@aschwab9009
Jun 01 2016 01:54
anyone know how to put text on top of an image? Not sure where to begin with that.
DC
@dctor
Jun 01 2016 01:54
@aurberg i moved scripts into js window...still not responding
Bruce Young
@mutantspore
Jun 01 2016 01:55
@dctor open up the actual browser dev tools and look at the error messages
DC
@dctor
Jun 01 2016 01:56
@mutantspore a msg saying unexpected token<
Bruce Young
@mutantspore
Jun 01 2016 01:56
remove all the bits in your html that drag in stuff as @aurberg said. Use the codepen preferences to do it.
move the script code to the JS tab
Adam Urberg
@aurberg
Jun 01 2016 01:56
@dctor You don't need the <script> tags in the JS window
DC
@dctor
Jun 01 2016 01:56
@aurberg ok removed it
Adam Urberg
@aurberg
Jun 01 2016 01:57
@dctor codepen is basically moving all the code you have in the JS window into a <script> tag in the HTML magically for you :smile:
Bruce Young
@mutantspore
Jun 01 2016 01:59
@dctor here is your pen with all I said done
http://codepen.io/MutantSpore/pen/VjYpar
DC
@dctor
Jun 01 2016 02:00
@mutantspore ok but i thought removing stylesheets some bootstrap styles won't work... and what do you mean by "use the codepen preferences?
Bruce Young
@mutantspore
Jun 01 2016 02:01
@dctor use the code pen preferences to quick add all the bits that you had in the stylesheets
the SETTINGS
next to each “pane” there is a cog .. click on it. or use the big button with “settings” on it in the top menu
DC
@dctor
Jun 01 2016 02:03
@mutantspore i see you can change the settings to get bootstrap bits?
Bruce Young
@mutantspore
Jun 01 2016 02:03
@dctor I though there was a leson on this
DC
@dctor
Jun 01 2016 02:04
@mutantspore i see it which HTML preprocessor do you pick?
Bruce Young
@mutantspore
Jun 01 2016 02:04
click on the CSS for teh bootstrap and you can put teh font awesome.css in there too. in the JS cog put the jquery and bootstrap.js
DC
@dctor
Jun 01 2016 02:04
@mutantspore i don't recall a lesson on this is there?
Bruce Young
@mutantspore
Jun 01 2016 02:04
@dctor no preprocessor if you are actualy writing in html
Adam Urberg
@aurberg
Jun 01 2016 02:05
step 6 briefly goes over it
Bruce Young
@mutantspore
Jun 01 2016 02:06
@aurberg @dctor it seems to have been dumbed down even more that it originally was.
DC
@dctor
Jun 01 2016 02:06
@mutantspore hmm...i think its late in the course i havn'et seen it and i've following each step
@mutantspore thanks
CamperBot
@camperbot
Jun 01 2016 02:07
:star2: 1673 | @mutantspore |http://www.freecodecamp.com/mutantspore
dctor sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
DC
@dctor
Jun 01 2016 02:07
@aurberg thank you
CamperBot
@camperbot
Jun 01 2016 02:07
dctor sends brownie points to @aurberg :sparkles: :thumbsup: :sparkles:
:cookie: 138 | @aurberg |http://www.freecodecamp.com/aurberg
Bruce Young
@mutantspore
Jun 01 2016 02:08
https://www.freecodecamp.com/challenges/get-set-for-our-front-end-development-projects as @aurberg posted. it’s before you do any front end .. before tribute. How did you do the Tribute and Portfolio sites then?
@dctor
DC
@dctor
Jun 01 2016 02:09
@mutantspore i had those tags in codepen for those projects
@mutantspore will go back to look at it again
Ryan
@ispeakcomputer
Jun 01 2016 02:16
I totally skipped the 2 algorithms i had left to hurry up to the front end projects. can't take it anymore .i have to make something ..
Bruce Young
@mutantspore
Jun 01 2016 02:18
@needsMoreCoffee no problem.. I often go back, with hopefully more knowledge, and try to make mine better.
anthonyjl92
@anthonyjl92
Jun 01 2016 02:18

Hey guys! I'm working on pulling data from an API using OAuth 2.0. In the API docs, it says I need to send data with a POST request to get access to an authorization code. I'm unsure how to do that using Angularjs $http

So far I've tried something like this but it returns a 400 status

var client_id="abc"
$http({
    method: 'POST',
    url: 'request-url',
    data: client_id,
    headers: {'Content-Type': 'application/x-www-form-urlencoded'}
});

What is the proper way to send data with a POST request?

Adam Urberg
@aurberg
Jun 01 2016 02:20
@needsMoreCoffee haha, I keep going back and forth from algorithms and projects :smile:
Ryan
@ispeakcomputer
Jun 01 2016 02:22
between freecodecamp and codecademy i have been at this for 4 months about an hour or two a day . ITS TIME . ha . good to know Im not the only one.
doesn't help I leave to play with frameworks / ruby .
i have a bunch of little pieces everywhere . Time to BUILD. looking forward to seeing your projects.
Darnell Gillead
@dgillead
Jun 01 2016 02:28
Hi guys, need help with a part of the random quote machine. I'm trying to test my tweet button simply by using window.open once it's clicked, but it's not working and I can't figure out what I'm doing wrong, any help would be greatly appreciated. Here is a link to the project - http://codepen.io/dgillead/pen/beNgMM
Adam Urberg
@aurberg
Jun 01 2016 02:31
@dgillead try adding target="_blank" in your button tag, this has something to do with codepen's security
Darnell Gillead
@dgillead
Jun 01 2016 02:34
Yeah already tried that, doesn't work. I feel like it's something simple but I've been staring at this for over an hour now and I just can't see it.
Darnell Gillead
@dgillead
Jun 01 2016 02:42
I got an answer to my problem!
Ryan
@ispeakcomputer
Jun 01 2016 02:44
nice , what was the issue ?
i think im looking at it .
Pawan
@pawan92
Jun 01 2016 02:47
@GregatGit could you explain that more maybe? i tried putting both the calls inside the for loop and using one for stream and one for channel name and it didnt work
Greg Duncan
@GregatGit
Jun 01 2016 02:50
@pawan92 if there are off line or if (data.stream === null) then do the channel lookup. If there are online you can get everything you need from streams api - but if they are not you can look up their channel api to get their logo and name
Elbert Cortez
@trip16661
Jun 01 2016 02:52
guys can i get a little help with my code?
im getting undefined from an asynchronous call that im making
but i dont know how to get away from it
i want to re use the global variable so i can navigate through the arrays without making calls over again
var a, wordObject;
function changingWords() { //< function to navigate through the array
    console.log(wordObject[a].word)
    if ($(this).hasClass("left")) {
        a--;
        if (a < 0) {
            a = 5;
        }
        return $("#display1").text(wordObject[a].word);
    }
    a--;
    if (a > 5) {
        a = 0;
    }
    $("#display1").text(wordObject[a].word);
}

$(".searching").on("submit", function(e) { //on user submit its getting an array of words with its author  and at the same moment hiding and showing element of the app 
    e.preventDefault();
    a = 0;
    $("#word").show();
    $(".searching-item").hide();
    $("#dotNav").empty(); // cleaning the dots that are used for navigating
    var userSearch = $(".author-search input").val()
    var url= api + authorQuery + userSearch;
    $.get(url, function(toStr) {
        var object = toStr;
        //<--
        object = object.results.result;
        object = object.filter(function(elem) {
            return elem.word.length < 220 
        }).splice(0,5); //filtering anything too big
        wordObject = object; //initializing the global variable
        object.length > 1? $(".nav-word").show():$(".nav-word").hide();
        $("#display1").text(object[a].word);
        $("#display2").text(object[a].author);
        for (var i = 0; i < object.length; i++) {
            $("#dotNav").append("<span id='dot0" + i + "\' class='dots'><span>" )
        }
    });
});
$(".arrow").on("click", changingWords);
Greg Duncan
@GregatGit
Jun 01 2016 03:00
@trip16661 var url= api + authorQuery + userSearch; where are api and authorQuery defined? And why don't you give 'a' a better name - it takes too long to figure it out where a simple name like index or count would help
Elbert Cortez
@trip16661
Jun 01 2016 03:01
@GregatGit oh sorry i put it a conditional name since its easier to remember on the go
and the api and author query are defined in the function but for making it less tedious to read i just tried to put it as consise as i could
Greg Duncan
@GregatGit
Jun 01 2016 03:03
which line is give you undefined?
Elbert Cortez
@trip16661
Jun 01 2016 03:03
return $("#display1").text(wordObject[a].word);
$("#display1").text(wordObject[a].word);
so seems undefined
Greg Duncan
@GregatGit
Jun 01 2016 03:06
can you paste one of the url that gets generated?
Elbert Cortez
@trip16661
Jun 01 2016 03:06
I can kinda guess that is because its an asynchronous call so thats why its undefined
im parsing the xml to json on the process aswell
Greg Duncan
@GregatGit
Jun 01 2016 03:09
var object = object.results.result;
Anshul Sanghi
@anshap1719
Jun 01 2016 03:09
Hey guys, currently I can buy only one course on Udemy and I am confused whether to go for AngularJS or Ruby on Rails... Can someone help me??
Elbert Cortez
@trip16661
Jun 01 2016 03:10
@GregatGit that's the right path greg im getting responses from both author and random generator
the thing is when i want to navigate through the array of objects that i get from the author query
@anshap1719 I think angular and react have more demand than RoR but you have to check them and if you are interested in the demands check webDev companies and check what they are looking for
Greg Duncan
@GregatGit
Jun 01 2016 03:13
What is an authors name that should work?
Anshul Sanghi
@anshap1719
Jun 01 2016 03:13
@trip16661 ok I guess I'll just go for Angular 2 then. Thanks
CamperBot
@camperbot
Jun 01 2016 03:13
anshap1719 sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
:cookie: 379 | @trip16661 |http://www.freecodecamp.com/trip16661
Elbert Cortez
@trip16661
Jun 01 2016 03:14
@GregatGit any famous one
Greg Duncan
@GregatGit
Jun 01 2016 03:14
Dickens?
Elbert Cortez
@trip16661
Jun 01 2016 03:14
i usually work with Ali and Buddha
@GregatGit Charles Dickens
it has to be full name since the api dont search for last name
Adam Urberg
@aurberg
Jun 01 2016 03:16
Hey, I am trying to call the Wikipedia api, does anyone know how to make the cross-site request?
Greg Duncan
@GregatGit
Jun 01 2016 03:16
@trip16661 can't you just stick to json for this?
Elbert Cortez
@trip16661
Jun 01 2016 03:16
what do you mean?
the api comes in xml :(
so i had to parse it first
@aurberg they have an option in their api app that says callback
Greg Duncan
@GregatGit
Jun 01 2016 03:19
@trip16661 line 65 - you should delete the var
it is already defined
Elbert Cortez
@trip16661
Jun 01 2016 03:21
i dont quite remember the syntax but it should be something like ?=callback not really sure @aurberg ( iw ont risk)
@GregatGit y i forgot to change it on codepen thanks
CamperBot
@camperbot
Jun 01 2016 03:22
trip16661 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 544 | @gregatgit |http://www.freecodecamp.com/gregatgit
Adam Urberg
@aurberg
Jun 01 2016 03:23
@trip16661 I'll look into it, thanks
CamperBot
@camperbot
Jun 01 2016 03:23
aurberg sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
:cookie: 380 | @trip16661 |http://www.freecodecamp.com/trip16661
Greg Duncan
@GregatGit
Jun 01 2016 03:26
@trip16661 your 'a' (which you should really call index) is stuck at -1 when i was playing around with it
Elbert Cortez
@trip16661
Jun 01 2016 03:28
@GregatGit can you replicate what you did?
Greg Duncan
@GregatGit
Jun 01 2016 03:33
@trip16661 replace line 25 with this console.log(a);
you'll notice that a can go right into the negatives
also it should be from 0 - 4 to give you a range of 5 quotes
Elbert Cortez
@trip16661
Jun 01 2016 03:38
y i just changed it to the length of the object
Greg Duncan
@GregatGit
Jun 01 2016 03:40
If you click the > it just keeps on going
Elbert Cortez
@trip16661
Jun 01 2016 03:45
D: now that i changed it t he whole arrow stop working xD
oh wait nvm
it works it just dont on small views
@GregatGit now it works :) thanks greg you was really helpful
CamperBot
@camperbot
Jun 01 2016 03:46
trip16661 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:warning: trip16661 already gave gregatgit points
ivan cibrian
@ivancibrian
Jun 01 2016 03:46
hello
Greg Duncan
@GregatGit
Jun 01 2016 03:47
:+1:
ivan cibrian
@ivancibrian
Jun 01 2016 03:49
This message was deleted
This message was deleted

Hello I need to use Lobster form In h2 and use Monospace form in Paragraph , can someone help me <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style> .red-text { color: red; }
p { font-size: 16px; font-family: Monospace;} </style>

<h2 {font-family: lobster} class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Stee
@5t33
Jun 01 2016 03:53
can someone tell me why <div class="row"> isnt working for my p elements? http://codepen.io/5t33/pen/BzaZeG?editors=1100
Stee
@5t33
Jun 01 2016 03:59
jk I got it
Greg Duncan
@GregatGit
Jun 01 2016 04:17
@5t33 a row div should be inside a conatiner div plus you have to add jQuery.js and bootstrap.js (in that order) that can be done in the settings unders javascript
Connor Hastey-Palindat
@cpalindat
Jun 01 2016 05:07
Hi guys! I was just about to start the wikipedia project. I was wondering if anyone could direct to me resources that I can use to figure out how they did the animation for the search bar on the example project?
bscyrpt
@bscyrpt
Jun 01 2016 05:12
@GregatGit for the search for the click functions are done in jquery , so jquery animations, other part is done with css animations and keyframes
Connor Hastey-Palindat
@cpalindat
Jun 01 2016 05:13
Are there any good sites for figuring out css animations and keyframes? I'm at a loss when it comes to figuring those out
bscyrpt
@bscyrpt
Jun 01 2016 05:14
http://www.w3schools.com/css/css3_animations.asp and others just google css animations
Connor Hastey-Palindat
@cpalindat
Jun 01 2016 05:15
okay thank you @bscyrpt !
CamperBot
@camperbot
Jun 01 2016 05:15
:cookie: 126 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
connhurr sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
uday
@udaychauhan
Jun 01 2016 05:16
Hi Everyone
bscyrpt
@bscyrpt
Jun 01 2016 05:17
@udaychauhan hiya
uday
@udaychauhan
Jun 01 2016 05:17
I'm unable to resize images for my tribute project
need help
Should I paste the code here
@bscyrpt should I?

<style>
body{
background-color:grey;
}

.container{
float : left;
width = 450px;
height = 100%;
}

.info{
width=100%;
height=100%;
}

.image-and-heading{
width=200px;
height=auto;
}

.smaller-image{
width=100px;
height=110px;
border-color:green;
border-width=10px;
border-style=solid;
}
</style>

<div class="contaner-fluid">
<div class="page-header bg-primary">
<h3 class="text-center" class>A TRIBUTE TO</h3>
<h1 class="text-center"> Dr. APJ ABDUL KALAM <h1>
<h3 class="text-center">(1931 - 2015)</h3>
</div>
<div class="container">
<a href="http://images.indianexpress.com/2015/07/abdul-kalam-l.jpg">
<img class = "img-responsive img-thumbnail smaller-image" src = "http://images.indianexpress.com/2015/07/abdul-kalam-l.jpg" alt = "A Image Of Dr.APJ Abdul Kalam" ></a>
</div>
</div>

bscyrpt
@bscyrpt
Jun 01 2016 05:19
you can do <img src="" width="somenumberr" height="somenumber"> to scale image, may not look good but will function the same , else you have find photo of different size
uday
@udaychauhan
Jun 01 2016 05:19
can tell me why is this not happening
also sorry for the mess above
bscyrpt
@bscyrpt
Jun 01 2016 05:20
can you link the codepen so i can look
Bruce Young
@mutantspore
Jun 01 2016 05:20
@udaychauhan don’t use = width=100px; should be width: 100px; right through your CSS is like that
@udaychauhan go through your CSS and change all the things with = to :
bscyrpt
@bscyrpt
Jun 01 2016 05:22
like Bruce said all your css should be cssProperty : value ;
uday
@udaychauhan
Jun 01 2016 05:23
okay let me try
that did it
thanks bruce and @bscyrpt
CamperBot
@camperbot
Jun 01 2016 05:24
udaychauhan sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 127 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
Adetunji Iyaniwura
@Iadetunji
Jun 01 2016 05:30
hello everyone please i need feedbacks on this project :
page:http://codepen.io/Iadetunji/pen/QELEPW
Jowze
@Jowze
Jun 01 2016 05:50
hey guys! I'm working on the wikipedia viewer at the moment. I manage to make API calls from the javascript editor in codepen, but I don't manage to make my search form modify the $ajax request to make an actual search.
I've been looking around but don't manage to make progress
maybe you have some advice?
Harshit Anand
@nerocool996
Jun 01 2016 06:19
This message was deleted
This message was deleted
Hey guys I need some help. I am doing the random quote generator and trying to replace a placeholder text. id of the button is getQuote and class of container is quoteB. But the isn't working for some reason.
this is my script:
$(document).ready(function() {
$("#getQuote").on("click", function(){
$(".quoteB").html("Here is the message");
});
});
http://codepen.io/nerocool996/pen/Wxbjrw
kirbyedy
@kirbyedy
Jun 01 2016 07:00
@nerocool996 you have to embedd the jquery in your codepen settings in order to work
Harshit Anand
@nerocool996
Jun 01 2016 07:01
@kirbyedy Thanks. It worked, I didn't realize that I to embed jquery
CamperBot
@camperbot
Jun 01 2016 07:01
nerocool996 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1046 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Jowze
@Jowze
Jun 01 2016 07:08
hello people! @Jowze
hey guys! I'm working on the wikipedia viewer at the moment. I manage to make API calls from the javascript editor in codepen, but I don't manage to make my HTML search form input modify the $ajax request to make a search from search box of the form
http://codepen.io/jowze/pen/vKEEWa?editors=1010
Maybe someone has come across this issue and has some input?
thanks :)
Jowze
@Jowze
Jun 01 2016 07:19
[ok guys - ignore the above message, it seemed to be a scopes issue]
Chris Cullen
@123xylem
Jun 01 2016 07:49
function myReplace(str, before, after) {

var arr= str.split(" ");
 var target="";
  for (i=0;i<arr.length;i++){ // Find before in the str
    if (arr[i] == before){   // Give it a variable
      target = arr[i];
      target.join("");
    }
   str= arr.join(" "); //rejoin string for operation purposes
  }
  function capitalizeFirstLetter(string) {
    return string.charAt(0).toUpperCase() + string.slice(1);} 
  //function for capialising and adding rest of word
function FirstLetter(string) {
    return string.charAt(0).toLowerCase() + string.slice(1);}
  //function for lowecasing+adding rest of word


  if(target.charAt(0) ==/^[A-Z]/){ //If target word
     capitalizeFirstLetter(after); {
    }
  }

  else if (target.charAt(0) == /^[a-z]/){
    FirstLetter(after);
}
  var newstr = str.replace(before, after);

  return target;
}
myReplace("A quick brown fox jumped over the lazy dog", "jumped", "Leaped");
Is my regexp wrong?
Andrew Pritchard
@andymac-2
Jun 01 2016 08:17
What challenge is this?
Andrew Pritchard
@andymac-2
Jun 01 2016 08:36
Why don't you try seeing if the "before" string is capitalised, and if so, captalise the "after" variable. Seeing if each instance of the word is capitalised or not is not what the question asks for.
Bhavik
@BhavikSheth
Jun 01 2016 10:10
This message was deleted
Hi guys, I have just started the Random Quote Machine challenge but I don't know whether I should create my own JSON of random quotes or look for an api
uday
@udaychauhan
Jun 01 2016 10:28
Hey guys can you tell me how can I get fonts via url. Also can you suggest fonts.
@123xylem are you using an ide
David
@Nachlawi
Jun 01 2016 10:31
Hey guys, does anyone know why my navbar isn't working when on a small screen?
http://codepen.io/Nachlawi/pen/JKoEEj/
buiphuking
@buiphuking
Jun 01 2016 10:34

in js

if ($(this).is(':empty')) {
    $(this).append(human).addClass('human');

what is that mean , guys ?

cwomersley
@cwomersley
Jun 01 2016 10:35
Im on the portfolio task , whats the best way to make the main section of the site take up like the middle 70% of the page space and the rest is just the background ?
Connor Murphy
@papasmurph
Jun 01 2016 10:38
Hey has anypone had any trouble with ipinfo?
./could someone recommend me an alternative? I'm just writting up a fallback for the weather zip and ipinfo doesn't seem to like me
Renuka Prasad A
@renx777
Jun 01 2016 11:11
hey everyone,please have a look at my simon game
Bruce Young
@mutantspore
Jun 01 2016 11:31
@papasmurph http://ip-api.com
huupoke12
@huupoke12
Jun 01 2016 11:33
where can I get quote for "Build a Random Quote Machine" challenge?
APURV SINGH
@apurvvv
Jun 01 2016 11:58
i am on portfolio task. I don't know how to start with it. It's like a one shot burden that came to me. Please help me in creating portfolio page from the scratch
Adam
@AdamTheWizard
Jun 01 2016 12:11
@apurvvv https://codepen.io/AdamTheWizard/full/KMPGdX/ have a look at mine apruv
Stephen James
@sjames1958gm
Jun 01 2016 12:15
@huupoke12 Many people hard code the quotes in a array in their app. Plenty of chances for API use in the next couple of projects.
APURV SINGH
@apurvvv
Jun 01 2016 12:19
@AdamTheWizard wow !! You made it look so easy
Steven Gallegos
@webdev1990
Jun 01 2016 12:24
http://spanishlearnit.com/index.html does anybody know why there is so much scrolling on this page even though there is no content? Thanks!
Mikail Bayram
@mikail1998
Jun 01 2016 12:43
http://codepen.io/mikail1998/pen/rLNxPY Guys im doing the wikipedia viewer challenge and im stuck. For now im just trying to see if i could get data from the api,so far im not doing well. i would be glad with any kind of help :smile:
Bruce Young
@mutantspore
Jun 01 2016 12:47
@mikail1998 this will show you results in the console .. I’ll let you sort the next click thing you have
      $.getJSON("https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=" + value + "&callback=?", function(d) {
        console.log(d);
Adetunji Iyaniwura
@Iadetunji
Jun 01 2016 12:55
i need feedbacks on this portfolio page project:http://codepen.io/Iadetunji/pen/QELEPW
Mikail Bayram
@mikail1998
Jun 01 2016 13:05
@mutantspore thank you
CamperBot
@camperbot
Jun 01 2016 13:05
:star2: 1674 | @mutantspore |http://www.freecodecamp.com/mutantspore
mikail1998 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
Evan Davis
@davisec52
Jun 01 2016 13:06

Good morning (or evening)! I'm working on the Zipline, Simon
and running into some issues I need help with.

What it is--the function that controls sound production
when the player clicks the color panels throws a DOM Exception:

"Uncaught (in promise) DOMException: The play() request
was interrupted by a new load request."

The function kind of works in that it produces sounds but
not without the DOMException.

if you run the app with dev tools open, the errors will
display.

The playerColorSeq() function is starts on line 166.

The link to pen is: http://codepen.io/davisec52/full/QyGOXG/

faraz
@silentarrowz
Jun 01 2016 13:16
http client
Adetunji Iyaniwura
@Iadetunji
Jun 01 2016 13:31
pls i need to add a functional social media icon to this page , can anyone help out?:http://codepen.io/Iadetunji/pen/QELEPW
Mikail Bayram
@mikail1998
Jun 01 2016 13:38
$("#searchbox").keypress(function() {
var value = $("#searchbox").val(); Im using this function for getting the value in my searchbox, but together with the click function var value is the string - the last character, why is that happening?
Enrique Sayago
@esayago
Jun 01 2016 13:44
Good morning to all
I'm currently working on "Show the Local Weather" project
And I realized we could no longer make use of the browser geoLocation api in codepen because now it only works under HTTPS
I was told to use ip.api but that's going to have my IP hard coded.
can anybody recommend an API to make my project more dynamic?
pzoladkiewicz
@pzoladkiewicz
Jun 01 2016 13:53
@esayago https://api.wunderground.com/api works great fo me with 'jsonp'
Sorin Ruse
@sorinr
Jun 01 2016 13:57
@esayago try http://ipinfo.io or http://ip-api.com/json for geolocation and then use the wunderground api to retrive the local weather
Dima
@obzenner
Jun 01 2016 14:06
@mikail1998 could you try to post your code using the markdown? It will look like this => code
PedroCSilva
@PedroCSilva
Jun 01 2016 14:25
Hey!
Im trying to figure out why my html isnt showing
Creative Shin
@CreativeShin
Jun 01 2016 14:28
Its showing @PedroCSSilva
whatever you typed atleast
Chase
@Belax8
Jun 01 2016 14:29
@PedroCSSilva Ya, I see it too
PedroCSilva
@PedroCSilva
Jun 01 2016 14:29
yeah because i reverted to my working code
wait a sec
and refresh
:(
Chase
@Belax8
Jun 01 2016 14:32
@PedroCSSilva I can still see it, sorry
PedroCSilva
@PedroCSilva
Jun 01 2016 14:32
guys im talking about the HTML that I want to append
check JS
not the actual HTML code
Lisa
@aGirlWhoCodes
Jun 01 2016 14:33
@PedroCSSilva I am in the same project I will take a look. I have the same problem but half. Only half of the code wants to append..
Enrique Sayago
@esayago
Jun 01 2016 14:33
Thanks guys
PedroCSilva
@PedroCSilva
Jun 01 2016 14:33
Ok Lisa, please take a look at it if you have a moment
Lisa
@aGirlWhoCodes
Jun 01 2016 14:37
The html where you put the code results in is supposed to be a variable right?
@PedroCSSilva
PedroCSilva
@PedroCSilva
Jun 01 2016 14:37
yes
i did it this way on this project
and it worked
Lisa
@aGirlWhoCodes
Jun 01 2016 14:39
Oh i see then that can't be the issue
Steven Gallegos
@webdev1990
Jun 01 2016 14:39
http://spanishlearnit.com/ why does the page allow scrolling when there is no content?
Lisa
@aGirlWhoCodes
Jun 01 2016 14:43
@PedroCSSilva html = '<a href="https://www.twitch.tv/esl_sc2' + data.name + '"target="_blank"><h3>' + data.display_name + '</h3></a><p>' + data.stream.game + '</p></div>' Every outcome is going to get the information of esl_sc2 I think you should change 'esl-sc2' for a variable which is naming the channels one by one..
@PedroCSSilva which is not solving your problem..
PedroCSilva
@PedroCSilva
Jun 01 2016 14:44
oh yes that was a mistake
Thanks @aGirlWhoCodes
CamperBot
@camperbot
Jun 01 2016 14:44
pedrocssilva sends brownie points to @agirlwhocodes :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @agirlwhocodes |http://www.freecodecamp.com/agirlwhocodes
PedroCSilva
@PedroCSilva
Jun 01 2016 14:44
yeah it doesnt make it work
im trying to fix it
Chase
@Belax8
Jun 01 2016 14:46
@webdev1990 the footer address has a margin-bottom: 21px; When i turn that off in my Chrome Dev Tools the scrolling goes away
Lisa
@aGirlWhoCodes
Jun 01 2016 14:49
@PedroCSSilva anyway you can take a look at my code. Part of the html is working is appending.. http://codepen.io/Didi987/pen/BzBpwq?editors=1010
@PedroCSSilva I think you also still need to check if the channel is online of offline.. When it's offline data.stream is going to return to you null. and data.stream.game won't work for you anyway.
Chase
@Belax8
Jun 01 2016 14:51
@webdev1990 Maybe try adding a line in your main.css file that says footer address {margin-bottom: 0;}
PedroCSilva
@PedroCSilva
Jun 01 2016 14:52
looks like i managed to fix half of it
check it out @aGirlWhoCodes
i just saw your code and seems like we have the same problem now lol
Steven Gallegos
@webdev1990
Jun 01 2016 14:56
@Belax8 nice, I'll chekc that out!
@Belax8 thanks!
sapatel93
@sapatel93
Jun 01 2016 14:56
Can anyone please help me To find current location's latitude and longitude?
CamperBot
@camperbot
Jun 01 2016 14:56
webdev1990 sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 377 | @belax8 |http://www.freecodecamp.com/belax8
sapatel93
@sapatel93
Jun 01 2016 14:56
It is Show the Local Weather Challenge.
Chase
@Belax8
Jun 01 2016 14:57
@sapatel93 checkout http://ip-api.com/
PedroCSilva
@PedroCSilva
Jun 01 2016 14:57
yeah check the IP API
sapatel93
@sapatel93
Jun 01 2016 14:58
I want to get that using geolocation API.
using jquery or javascript code.
Chase
@Belax8
Jun 01 2016 15:00
@sapatel93 you can send a request to http://ip-api.com/json/?fields=lat,lon and it will send you the lat and lon in a JSON
Lisa
@aGirlWhoCodes
Jun 01 2016 15:02
@PedroCSSilva Good anyone want's to help to people with the same problem?
*two people
Lisa
@aGirlWhoCodes
Jun 01 2016 15:18
@PedroCSSilva I am trying to figure it out. Let me know if you know it! I will let you know..
Renuka Prasad A
@renx777
Jun 01 2016 15:27
guys check out my simon game.....any feedback is appreciatedhttp://codepen.io/renx777/pen/wWvaQq
Lisa
@aGirlWhoCodes
Jun 01 2016 15:38
@renx777 Looks nice! what's it doing? what am i supposed to do?
@PedroCSSilva The problem with my code is the variables other then the channels are not being updated.
evandocarmo
@evandocarmo
Jun 01 2016 15:41
hey guys
how can I change the font-size of <p> with bootstrap?
sapatel93
@sapatel93
Jun 01 2016 15:44
I am trying to get weather data from latitude and longitude, I am getting latitude and logitude successfully, but for the weather api , when i am requesting for getting weather information to the OpenWeathermap API, it shows Object
{code:"404", Message:"Error:City could not find"}, And I check by this link in browser, it prints data in json format,
Chase
@Belax8
Jun 01 2016 15:44
@evandocarmo It should just be like anything else. p {font-size: 20px;}
sapatel93
@sapatel93
Jun 01 2016 15:44
this is my code
$(document).ready(function(){
var latitude;
var longitude;
$.getJSON("http://ip-api.com/json/?fields=lat,lon",function(data){
console.log(data)
latitude=data.lat;
console.log(latitude);
longitude=data.lon;
console.log(longitude);
});
$.getJSON("http://api.openweathermap.org/data/2.5/weather?lat="+latitude+"&lon="+longitude+"&appid=2ac3ad7d79c01b32f9145dde36767a33",function(data_weather){
console.log(data_weather);
});
});
Chase
@Belax8
Jun 01 2016 15:45
@evandocarmo you will need to put that css after the bootstrap css
sapatel93
@sapatel93
Jun 01 2016 15:48
Can anyone help me for this Plz??
evandocarmo
@evandocarmo
Jun 01 2016 15:48
@Belax8 Hi! Thanks for helping. So, I tried something like: p { font-size:10px;} but it doesn't work
CamperBot
@camperbot
Jun 01 2016 15:48
evandocarmo sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 378 | @belax8 |http://www.freecodecamp.com/belax8
Chase
@Belax8
Jun 01 2016 15:49
@evandocarmo are you working on this in codepen? or a local file?
evandocarmo
@evandocarmo
Jun 01 2016 15:49
codePen
sapatel93
@sapatel93
Jun 01 2016 15:49
@evandocarmo you can try this: p {
font-size:10px !important;
}
evandocarmo
@evandocarmo
Jun 01 2016 15:50
@sapatel93 it worked like a charm. I'd forgotten about that. Thanks!
CamperBot
@camperbot
Jun 01 2016 15:50
evandocarmo sends brownie points to @sapatel93 :sparkles: :thumbsup: :sparkles:
:cookie: 277 | @sapatel93 |http://www.freecodecamp.com/sapatel93
Chase
@Belax8
Jun 01 2016 15:51
@sapatel93 its because your variables aren't saving outside of your $.getJSON
Mark Howard
@iheartkode
Jun 01 2016 15:59
learn scope :)
Martin Hesko
@martinhesko
Jun 01 2016 16:08
how to make the json var accessable outside the function? when i want to print it when the function ends it doesn't work http://codepen.io/Sorbo/pen/yJyBMo?editors=1111
Kevin Holmes
@codersc
Jun 01 2016 16:18
@martinhesko declare it outside of the function
evandocarmo
@evandocarmo
Jun 01 2016 16:18
@martinhesko declare it first, outside any function
PedroCSilva
@PedroCSilva
Jun 01 2016 16:26
guys
why isnt the order of the channels always the same?
there's something wrong
Denys Stepanov
@stepdenserg
Jun 01 2016 16:26
Hey guys! Had someone problems with appending API to codepen?
J Player
@Heyjp
Jun 01 2016 16:29
@PedroCSSilva well it depends on the api calls return information, it's done on the response times rather than when they are called.
Martin Hesko
@martinhesko
Jun 01 2016 16:30
@codersc @evandocarmo still no idea what to do with it, i just want the JSON to store inside the json variable so i can access it outside, any advice? http://codepen.io/Sorbo/pen/yJyBMo?editors=0011
PedroCSilva
@PedroCSilva
Jun 01 2016 16:31
@Heyjp oh I see so it's not an issue on my end, right? But that messes up with my 2nd json call, no?
Dylan
@dhcodes
Jun 01 2016 16:32
@PedroCSSilva you can order them using callbacks
or if you are of es6 persuasion you can use promises
PedroCSilva
@PedroCSilva
Jun 01 2016 16:33
hmm Im not aware of those concepts tbh
Dylan
@dhcodes
Jun 01 2016 16:33
@PedroCSSilva have a gander at this... http://callbackhell.com/
PedroCSilva
@PedroCSilva
Jun 01 2016 16:33
making these frontend projects has been a big challenge for me
Dylan
@dhcodes
Jun 01 2016 16:33
it's technically "your issue" because js runs asynchronously
@PedroCSSilva yeah, each one took me weeks
you've made it this far
J Player
@Heyjp
Jun 01 2016 16:34
@PedroCSSilva I had a similar thing, im fairly sure this is what I used to get round it https://api.jquery.com/jquery.when/
PedroCSilva
@PedroCSilva
Jun 01 2016 16:34
i've found it hard to understand API usage
Dylan
@dhcodes
Jun 01 2016 16:35
@PedroCSSilva i hear you. It gets easier
this practice is good. It will really help you understand what code is doing, especially when you start learning something like node or mongo
J Player
@Heyjp
Jun 01 2016 16:35
Sounds like me but replace API with practically anything new.
Dylan
@dhcodes
Jun 01 2016 16:35
because you can then be like "oh hey, i've seen methods before"
PedroCSilva
@PedroCSilva
Jun 01 2016 16:36
Im a CS student and really like JS so even though i find this hard Im always trying to figure it out
the same cant be said about CSS though :P
Dylan
@dhcodes
Jun 01 2016 16:36
@PedroCSSilva for your particular project, suffice it to say that if you put one json call within the other, they should run in order
PedroCSilva
@PedroCSilva
Jun 01 2016 16:37
dhcode can you check my code? im appending the link to the channel
Dylan
@dhcodes
Jun 01 2016 16:37
oh css has its pitfalls (cough transitions/keyframes cough)
PedroCSilva
@PedroCSilva
Jun 01 2016 16:37
but the 2nd appending isnt working
Dylan
@dhcodes
Jun 01 2016 16:37
i'll take a looksee. one sec
PedroCSilva
@PedroCSilva
Jun 01 2016 16:37
Thanks @Heyjp @dhcodes
CamperBot
@camperbot
Jun 01 2016 16:37
pedrocssilva sends brownie points to @heyjp and @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 389 | @heyjp |http://www.freecodecamp.com/heyjp
:cookie: 926 | @dhcodes |http://www.freecodecamp.com/dhcodes
Dylan
@dhcodes
Jun 01 2016 16:38
@PedroCSSilva nice style. I like your footer
PedroCSilva
@PedroCSilva
Jun 01 2016 16:38
really? thanks man
I should put more effort on my project's design though
Dylan
@dhcodes
Jun 01 2016 16:39
seems to be working for me, what's the issue?
PedroCSilva
@PedroCSilva
Jun 01 2016 16:39
im using the same CSS for all of them
when I make the 2nd api call
html = '<p>' + data.stream.game + '</p>';
games arent showing
Dylan
@dhcodes
Jun 01 2016 16:39
ah, ok
un momento
Andrew Charlebois
@andrewchar
Jun 01 2016 16:42
js resource
javascript resource
help resource
CamperBot
@camperbot
Jun 01 2016 16:43

:point_right: angular resources [wiki]

Angular Resources

A collection of helpful Angular resources

:pencil: read more about angular resources on the FCC Wiki

Daniel Cartín
@Danielcv93
Jun 01 2016 16:53
Hello, does anyone can help me please, i'm starting to buil my portfolio project, an i want to learn how to make a navigation bar, i don't kwon if i passes it over.. i just dont remember they teach me how to do it, but i want to ...
Al Cruz
@charlsagente
Jun 01 2016 16:54
@Danielcv93 you can see the examples in bootstrap page https://getbootstrap.com/examples/navbar/
J Player
@Heyjp
Jun 01 2016 16:55
make a div, add a unordered list, float it and then style
Dylan
@dhcodes
Jun 01 2016 16:55
@PedroCSSilva i've gotten this far
as you can see though, it still won't output your stuff in order
maybe if you make some global variables and then do both json calls and then append the different information using the global variables
Daniel Cartín
@Danielcv93
Jun 01 2016 16:57
thanks @charlsagente
CamperBot
@camperbot
Jun 01 2016 16:57
danielcv93 sends brownie points to @charlsagente :sparkles: :thumbsup: :sparkles:
:cookie: 277 | @charlsagente |http://www.freecodecamp.com/charlsagente
Dylan
@dhcodes
Jun 01 2016 16:57
your original issue was that since you were using a for loop, it was exhausted (i<8) after the first json call
@PedroCSSilva
Daniel Cartín
@Danielcv93
Jun 01 2016 16:57
how do i float it ?@Heyjp
PedroCSilva
@PedroCSilva
Jun 01 2016 17:00
Thanks @dhcodes
CamperBot
@camperbot
Jun 01 2016 17:00
pedrocssilva sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: pedrocssilva already gave dhcodes points
J Player
@Heyjp
Jun 01 2016 17:00
@Danielcv93 <ul class="nav"></ul> .nav { float: right}
PedroCSilva
@PedroCSilva
Jun 01 2016 17:00
I gotta leave now but I'll try to check what you did and hopefully make it work
cya and thanks everyone
J Player
@Heyjp
Jun 01 2016 17:00
the list goes in the html, and the .nav bit in the css file
dickorydock
@dickorydock
Jun 01 2016 17:26
Hi - for the Weather App, I seem to be having permissions issues with getting user's locations. Problems between HTTP and HTTPS. It works on my laptop but not on my phone. Any suggestions? https://codepen.io/dickorydock/pen/GqRObG
Chase
@Belax8
Jun 01 2016 17:28
@dickorydock I used http://ip-api.com/ to get my Lat and Lon to avoid that problem
@dickorydock you can send the request to http://ip-api.com/json/?fields=lat,lon
Sorin Ruse
@sorinr
Jun 01 2016 17:29
@Danielcv93 best way to learn it is just think what is composed of a nav bar. so u have a bunch of simple list of links. So think: you will need a list tag with some items in the list. if you click an item then it should link to somewhere else. after that you should find out how to style (using css) to make your list items align horizontally like in a navbar. The first you learn the basics of html and what can do css to html tags the better. Then you will get how a framework like bootstrap or any other framework its working.
Mikail Bayram
@mikail1998
Jun 01 2016 17:31
http://codepen.io/mikail1998/pen/rLNxPY Why cant i assign var value to the input value. When i edit the url by myself everything works, but when i try to use var value Im not succesfull. Does anyone know what might be the problem?
Chase
@Belax8
Jun 01 2016 17:33
@mikail1998 You should get the value after the button has been pressed, not when the page loads
Mikail Bayram
@mikail1998
Jun 01 2016 17:34
Chase
@Belax8
Jun 01 2016 17:39
@mikail1998 Sort of like this http://codepen.io/Belax8/pen/OXPvGv?editors=1011
you can see that it gets that value in the console
dickorydock
@dickorydock
Jun 01 2016 17:47
@Belax8 i'm trying ip-api.com but it says it's blocked by the client?
Chase
@Belax8
Jun 01 2016 17:51
@dickorydock Honestly, I'm not sure what that means. Is your computer blocking your location? What happens when you click this link? http://ip-api.com/json/?fields=lat,lon Do you see your lat and lon?
Daniel Cartín
@Danielcv93
Jun 01 2016 17:51
ok, thanks to everyone! @sorinr @Heyjp @charlsagente
CamperBot
@camperbot
Jun 01 2016 17:51
danielcv93 sends brownie points to @sorinr and @heyjp and @charlsagente :sparkles: :thumbsup: :sparkles:
:warning: danielcv93 already gave charlsagente points
:cookie: 390 | @heyjp |http://www.freecodecamp.com/heyjp
:cookie: 310 | @sorinr |http://www.freecodecamp.com/sorinr
dickorydock
@dickorydock
Jun 01 2016 17:51
@Belax8 yeah i see it then, so i'm not sure why it isn't working
Chase
@Belax8
Jun 01 2016 17:52
@dickorydock Mmm, interesting. Are you building it in CodePen? Could you share the link, so I can check it out?
dickorydock
@dickorydock
Jun 01 2016 17:54
In my console there is the following message:
pen.js:7 GET http://ip-api.com/json/?fields=lat,lon net::ERR_BLOCKED_BY_CLIENT
Tulio Natale
@tuliodnw
Jun 01 2016 17:58
can someone check for errors, also if someone can tell me how to fix when i click minus multiple times, http://codepen.io/tuliodnw/pen/vKYPEK?editors=1010
Chase
@Belax8
Jun 01 2016 17:58
I don't have that error in my console. . . sorry @dickorydock
dickorydock
@dickorydock
Jun 01 2016 18:00
Thanks @Belax8 ! I think it's probably because I'm on library wifi right now
CamperBot
@camperbot
Jun 01 2016 18:00
dickorydock sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 379 | @belax8 |http://www.freecodecamp.com/belax8
dickorydock
@dickorydock
Jun 01 2016 18:02
I'll try it again when I get to different Wifi. Thanks for trying.
Chase
@Belax8
Jun 01 2016 18:02
@dickorydock anytime
@tuliodnw I think it looks good
Sorin Ruse
@sorinr
Jun 01 2016 18:03
@dickorydock if you have blocked your browser to reveal any info about your postion the error is quite justified
Casey
@w9lp
Jun 01 2016 18:06
Laying down the foundation for the Simon Game and can’t get buttons to work inside the div elements that make up the game board. A test button outside the game board worked fine. What should I be looking at inside my game board div to enable buttons? Pen is here: http://codepen.io/w9lp/pen/YqoEQj
Sorin Ruse
@sorinr
Jun 01 2016 18:06
@tuliodnw just check you computing function. there is the error
Tulio Natale
@tuliodnw
Jun 01 2016 18:11
@sorinr i know im on it
Matthew Boland
@mattboland
Jun 01 2016 18:15
@w9lp your strict and start and on/off all seem to work
Tulio Natale
@tuliodnw
Jun 01 2016 18:15
@sorinr can you check again now, i think i fix it
Casey
@w9lp
Jun 01 2016 18:17
@mattboland Huh. Not in my browser… I’m on Chrome… what are you using?
Matthew Boland
@mattboland
Jun 01 2016 18:17
im on chrome as well. i am looking at developer tools console and it logs out each time those are clicked
Casey
@w9lp
Jun 01 2016 18:19
OK. Weird. Thanks @mattboland for checking. I’ll check for environment problem on my end.
CamperBot
@camperbot
Jun 01 2016 18:19
w9lp sends brownie points to @mattboland :sparkles: :thumbsup: :sparkles:
:cookie: 381 | @mattboland |http://www.freecodecamp.com/mattboland
chetanmahore
@chetanmahore
Jun 01 2016 18:23
Sup fellas
Matthew Boland
@mattboland
Jun 01 2016 18:23
@w9lp one thing i noticed is that you are using document.getElementById with jquery. you can shorten that to $('#id') which is the jquey syntax
Sorin Ruse
@sorinr
Jun 01 2016 18:24
@tuliodnw it seems its working now. just you have to show your math operations also on your input "text" type like : when i press 4 then + then 4 i want to see 4+4 and when i press "=" i would like to see the result there
Casey
@w9lp
Jun 01 2016 18:27
@mattboland … understood… it’s a deliberate choice at this stage in my progression. ;-)
Matthew Boland
@mattboland
Jun 01 2016 18:28
@w9lp 10-4 i didn't have any ideas how to fix your problem so i just noted what i saw. good luck.
Richard-Bowen
@Richard-Bowen
Jun 01 2016 18:34
Has anyone tried to get JSON calls to work outside of codepen, I've been trying to recreate my projects in codepen in a webpage and am having mixed results. Is there any trick aside from adding the relevant libraries ?
Kim Ward
@wardy484
Jun 01 2016 18:37
Did anyone else have a hard time with the algorithm to convert numbers to numerals?
Richard-Bowen
@Richard-Bowen
Jun 01 2016 18:37
Seems IE doesn't work but Chrome and Firefox does not. I am aware that there are browser differences, is this covered by freecodecamp at some point ?
CrispyCB
@CrispyCB
Jun 01 2016 18:38
Hey guys, quick front-end question: how do I get a button to link to my email? I'm using Bootstrap, for reference.
Mikail Bayram
@mikail1998
Jun 01 2016 18:40
@Belax8 no not working
Ravi Kumar
@ravi923615
Jun 01 2016 18:41
Refused to display 'https://twitter.com/intent/tweet?hashtags=quotes,freecodecamp&text=%22%20A%…ges%20above%20its%20principles%20soon%20loses%20both.%20%22&via=twitterdev' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
Bruce Young
@mutantspore
Jun 01 2016 18:41
@Richard-Bowen go to your codepen site of the project you are interested in.. down the bottom right you’ll see “Export” .. click on it then click on Export .zip. Do that and open the zip file it downloads ..
Ravi Kumar
@ravi923615
Jun 01 2016 18:41
why I am getting this error any idea??
Refused to display 'https://twitter.com/intent/tweet?hashtags=quotes,freecodecamp&text=%22%20A%…ges%20above%20its%20principles%20soon%20loses%20both.%20%22&via=twitterdev' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
MikeBeers
@MikeBeers
Jun 01 2016 18:41
Can someone help me figure out why my result is not adding after the first time around. It is in my check for winner function
Richard-Bowen
@Richard-Bowen
Jun 01 2016 18:42
@mutantspore thanks !
CamperBot
@camperbot
Jun 01 2016 18:42
richard-bowen sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1675 | @mutantspore |http://www.freecodecamp.com/mutantspore
Chase
@Belax8
Jun 01 2016 18:42
@mikail1998 Will you post your link again and I'll take a look at it?
CrispyCB
@CrispyCB
Jun 01 2016 18:43
How do I get a bootstrap button to link to an email?
Mikail Bayram
@mikail1998
Jun 01 2016 18:44
@CrispyCB https://lipis.github.io/bootstrap-social/ check this link \
Chase
@Belax8
Jun 01 2016 18:45
@mikail1998 Look at line 1 of your JS. You need to wrap that in an .on("click", function() { }); because you are trying to get the value of your text box as soon as it loads, you need to wait till the search button has been pressed.
Bruce Young
@mutantspore
Jun 01 2016 18:46
@mikail1998 here is what you posted earlier .. working pretty much but I’m not sure whay you’d want to print out “#results” but have a look anyway.
http://codepen.io/MutantSpore/pen/JKoLgK
CrispyCB
@CrispyCB
Jun 01 2016 18:46
@mikail1998 There's not one for email, though.
Mikail Bayram
@mikail1998
Jun 01 2016 18:48
http://getbootstrap.com/components/ there are variety of glyphicons here @CrispyCB
@mutantspore Thanks to you I sorted that out, but now I have another problem when I search once I cant search again, how can i fix that?
CamperBot
@camperbot
Jun 01 2016 18:49
mikail1998 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1676 | @mutantspore |http://www.freecodecamp.com/mutantspore
Mikail Bayram
@mikail1998
Jun 01 2016 18:50
@CrispyCB you have the envelope icon there use that one
CrispyCB
@CrispyCB
Jun 01 2016 18:52
@mikail1998 Okay.
CrispyCB
@CrispyCB
Jun 01 2016 19:01
So I have my bootstrap button up and working, it just doesn't seem to open up an actual email.
Mikail Bayram
@mikail1998
Jun 01 2016 19:03
its ok mine is the same way @CrispyCB
Bruce Young
@mutantspore
Jun 01 2016 19:07
@mikail1998 http://codepen.io/MutantSpore/pen/dXPexj
2 things.. you need to clear the results area to allow fresh ones. AND you had .one instead of .on in your click
Mikail Bayram
@mikail1998
Jun 01 2016 19:09
@mutantspore Thank youu soo soo much
CamperBot
@camperbot
Jun 01 2016 19:09
mikail1998 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: mikail1998 already gave mutantspore points
Kevin Holmes
@codersc
Jun 01 2016 19:30
var game = {

  count: 1,
  turn: 0,
  compSeq: ['1', '2', '3'],
  userSeq: [],
  mode: 'normal',

  genCompSeq: function() {

    var pads = ['1', '2', '3', '4'];

    for (var i = 0; i < this.count; i++) {

      this.compSeq.push( pads[Math.floor(Math.random() * pads.length)] );
    }
  },

  flash: function(elem) {

    elem.stop().animate({opacity: '1'}, {

      duration: 50,

      complete: function() {

        elem.stop().animate({opacity: '0.6'}, 200);
      }
    });               
  },

  displayCompSeq: function() {

    $.each(this.compSeq, function(index, val) {

      setTimeout(function() {

        this.flash($('.shape' + val)); // console says 'this.flash is not a function'

      }, 700);
    });
  }
};
why does the console print out "this.flash is not a function"?
i called it through the display function like this:
game.displayCompSeq();
Islam Ibakaev
@dagman
Jun 01 2016 19:32
Kevin Holmes
@codersc
Jun 01 2016 19:38
nvm
Ryan
@ispeakcomputer
Jun 01 2016 19:40
@dagman I little over the top for my tastes but cool .It shows that you can do stuffs at least .
all and all looks good .
Devesh Shetty
@devesh-shetty
Jun 01 2016 19:41
hello folks, checkout my tribute page : http://codepen.io/devesh-shetty/full/GZBGbd/
Islam Ibakaev
@dagman
Jun 01 2016 19:41
@needsMoreCoffee thx man :smile:
CamperBot
@camperbot
Jun 01 2016 19:41
dagman sends brownie points to @needsmorecoffee :sparkles: :thumbsup: :sparkles:
:cookie: 307 | @needsmorecoffee |http://www.freecodecamp.com/needsmorecoffee
Ryan
@ispeakcomputer
Jun 01 2016 19:43
@dagman could I suggest giving a phone number on the page so recuriters can easily call you ? i find they like to call people quickly to get position more then emailing . The fastest way they can fill a job something seems like what they are doing .
Islam Ibakaev
@dagman
Jun 01 2016 19:44
@needsMoreCoffee yep surely i will add number ::
:smile:
Ryan
@ispeakcomputer
Jun 01 2016 19:44
i get calls all day and few emails about jobs from technical recruiters.
awesome .
Vadali Soumitri
@svadali2
Jun 01 2016 19:54
hello all i have some issues making my wikipedia viewer work with regards to the final part of the javvascript,
could someone help me with this?
the data shows up on console but not on the screen, and the data only shows up sometimes, and doesn't show up othre times,
why is this happening?
bscyrpt
@bscyrpt
Jun 01 2016 21:02
@svadali2 it works for me, maybe try clearing cache on your browser if not you need to put in some console.log statements to debug each piece
Vadali Soumitri
@svadali2
Jun 01 2016 21:14
@bscyrpt yeah i figured something buggy was happening
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:33
Hello all
Somebody can help me in Random Quotes Machine exercise
?
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:35
@carlospulido What is the problem?
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:36
hi @KoniKodes
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:36
@carlospulido Hi Carlos
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:36
Before all perfect run but now i cant see quotes from forsmatic api
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:38
@carlospulido I don't know why, but the Chrome Inspector returns Failed to load resource: the server responded with a status of 404 (Not Found). Maybe double check the linking url? I put mine into an array and called it from there...
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:40
is a mistery
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:41
@carlospulido Yes, Coding usually is, isn't it? But at least you know where to look for it now.
Kevin Holmes
@codersc
Jun 01 2016 21:41
var game = {

  count: 1,
  turn: 0,
  compSeq: [],
  userSeq: [],
  mode: 'normal',

  genCompSeq: function() {

    var pads = ['1', '2', '3', '4'];

    for (var i = 0; i < this.count; i++) {

      this.compSeq.push( pads[Math.floor(Math.random() * pads.length)] ); // why is this.compSeq undefined?
    }
  },

  flash: function(elem) {
    console.log('entered');

    elem.stop().animate({opacity: '1'}, {

      duration: 50,

      complete: function() {

        elem.stop().animate({opacity: '0.6'}, 200);
      }
    });               
  },

  displayCompSeq: function() {   

    for (var i = 0; i < this.compSeq.length; i++) { // compSeq is not defined here why?

      setTimeout(function() {

        this.flash($('.shape' + compSeq[i])); 

      }, 2000);
    }
  }
};

console.log(game.genCompSeq()); // console says undefined
why is the property compSeq not accesible via the "this" keyword inside the genCompSeq function?
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:42
@KoniKodes can see a security problem on codepen?
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:43
@codersc Do you need to make this once you've looped?
@KoniKodes Mixed Content: The page at 'https://codepen.io/solrak101/pen/wWBxPp' was loaded over HTTPS, but requested an insecure image 'http://www.gifandgif.es/gifs_animados/Engranajes/Gifs%20Animados%20Engranajes%20(17).gif'. This content should also be served over HTTPS.
Frank
@Frankbono
Jun 01 2016 21:44
Hi can someone help me with my portfolio page?
PedroCSilva
@PedroCSilva
Jun 01 2016 21:44
We can try :D
Kevin Holmes
@codersc
Jun 01 2016 21:44
i dont understand @KoniKodes i thought this just referenced the game object?
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:46
@carlospulido $.getJSON("http//api. - I think you need : befor the //. See if that helps first.
Frank
@Frankbono
Jun 01 2016 21:46
I don't understand why there is a border around the picture I updoaded
PedroCSilva
@PedroCSilva
Jun 01 2016 21:47
Pic isnt showing here
Frank
@Frankbono
Jun 01 2016 21:47
try now
martowow
@martowow
Jun 01 2016 21:48
Hey guys can I have some advice
Frank
@Frankbono
Jun 01 2016 21:48
refresh the page because the image url is different now
PedroCSilva
@PedroCSilva
Jun 01 2016 21:49
@Frankbono you have the img inside a div with the class container fluid
martowow
@martowow
Jun 01 2016 21:49
I'm trying to make a portfolio and I tried adding a picture and in Css added "backgground-size:cover;"
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:49
@martowow Maybe attach it to the body?
Frank
@Frankbono
Jun 01 2016 21:50
@PedroCSSilva thanks for helping me out
CamperBot
@camperbot
Jun 01 2016 21:50
frankbono sends brownie points to @pedrocssilva :sparkles: :thumbsup: :sparkles:
:cookie: 294 | @pedrocssilva |http://www.freecodecamp.com/pedrocssilva
PedroCSilva
@PedroCSilva
Jun 01 2016 21:50
try setting it to just container and youll see the image stretches
the background is black because you set the nav as "inverse"
martowow
@martowow
Jun 01 2016 21:50

<header>
<link href='https://fonts.googleapis.com/css?family=PT+Mono' rel='stylesheet' type='text/css'>
</header>

<ul class="nav nav-pills">
<li> <a href="#">Martin Kolev</a></li>
<li class="pull-right"><a href="#">Contact</a></li>
<li class="pull-right"><a href="#">Portfolio</a></li>

<li class="pull-right"><a href="#">About me</a></li>
</ul>

<div class="PageOne">
<hi>hi</h1>

</div>

no class container here
PedroCSilva
@PedroCSilva
Jun 01 2016 21:51
im talking to Frank
let me check your code
martowow
@martowow
Jun 01 2016 21:51
Oooh sorry
@KoniKodes Can't attach to body cause i need to have muplitple images like that across the page... May be wrong but I dont see how that will happen if i attach it to the body
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:52
@KoniKodes not run :(
Frank
@Frankbono
Jun 01 2016 21:52
@PedroCSSilva I put it to just container and my pic shrunk
PedroCSilva
@PedroCSilva
Jun 01 2016 21:52
yes
Frank check this thread
to understand the differences
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:52
@carlospulido did you make it http://api...?
PedroCSilva
@PedroCSilva
Jun 01 2016 21:53
and what it means to use that class
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:53
yes
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:53
I'll look again.
PedroCSilva
@PedroCSilva
Jun 01 2016 21:53
@martowow whats wrong with your code? be more specific pls
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:54
@KoniKodes worked days ago this has happened suddenly
martowow
@martowow
Jun 01 2016 21:54
@PedroCSSilva I'm trying to get the img i attatched to the PageOne class to appear properly and i tried doing it with backgground-size:cover;
But it appears pixelated and cut out
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:55
@KoniKodes i see error
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:56
@PedroCSSilva That is strange. It is now having an insecure response.
@carlospulido Great! Where was it?
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:56
its a proble with codepen it duplicate my project automatic
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:56
@PedroCSSilva Ignore please, I was typing too fast.
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:57
i don't know why i delete one of these two projects and one run
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:57
@carlospulido Execellent! I was able to tweet and get a new quote.
Carlos Pulido
@carlosfrontend
Jun 01 2016 21:58
is something of codepen
thanks for you help @KoniKodes and u dedicated time
CamperBot
@camperbot
Jun 01 2016 21:58
carlospulido sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @konikodes |http://www.freecodecamp.com/konikodes
Toni Shortsleeve
@KoniKodes
Jun 01 2016 21:59
@carlospulido I'm glad you caught it. I wish that was my problem.... Thank you for the brownie! :-)
CamperBot
@camperbot
Jun 01 2016 21:59
konikodes sends brownie points to @carlospulido :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @carlospulido |http://www.freecodecamp.com/carlospulido
Frank
@Frankbono
Jun 01 2016 21:59
@PedroCSSilva problem fixed. Thanks for your help. I appreciate it
CamperBot
@camperbot
Jun 01 2016 21:59
frankbono sends brownie points to @pedrocssilva :sparkles: :thumbsup: :sparkles:
:warning: frankbono already gave pedrocssilva points
martowow
@martowow
Jun 01 2016 22:04
@PedroCSSilva I didn't understand how to fix the problem
PedroCSilva
@PedroCSilva
Jun 01 2016 22:12
@martowow is this what you want
martowow
@martowow
Jun 01 2016 22:14
Pretty much but it doesnt seem to work when i add my own image
PedroCSilva
@PedroCSilva
Jun 01 2016 22:15
1st of all your image is insanely big
7k x 4k
or something
martowow
@martowow
Jun 01 2016 22:16
Oh so that's the problem? Thought i could make it fit
PedroCSilva
@PedroCSilva
Jun 01 2016 22:17
not a problem i'd say
martowow
@martowow
Jun 01 2016 22:17
Im trying to creаte a portfolio with a couple of images in the same page
PedroCSilva
@PedroCSilva
Jun 01 2016 22:17
but might be part of the problem
martowow
@martowow
Jun 01 2016 22:17
So I can't have it be insanely large
PedroCSilva
@PedroCSilva
Jun 01 2016 22:17
why dont you download the picture
shrink it
upload to imgur
and use that link instead
martowow
@martowow
Jun 01 2016 22:18
Hmm good idea im going to do that. Thanks
Kevin Holmes
@codersc
Jun 01 2016 22:25
var game = {

  count: 1,
  turn: 0,
  compSeq: [],
  userSeq: [],
  mode: 'normal',

  genCompSeq: function() {
    //console.log(this);
    var pads = ['1', '2', '3', '4'];

    for (var i = 0; i < this.count; i++) {

      this.compSeq.push( pads[Math.floor(Math.random() * pads.length)] ); // why is this.compSeq undefined?
    }    
  },

  flash: function(elem) {

    elem.stop().animate({opacity: '1'}, {

      duration: 50,

      complete: function() {

        elem.stop().animate({opacity: '0.6'}, 200);
      }
    });               
  },

  displayCompSeq: function() {   

    console.log(this.compSeq.length); // defined here

    for (var i = 0; i < this.compSeq.length; i++) { 

      console.log(this.compSeq.length); // does not seem to be defined here

      setTimeout(function() {

        this.flash($('.shape' + compSeq[i])); 

      }, 2000);
    }
  }
};

game.displayCompSeq();
why is the this keyword defined outside of the for loop but not inside? Please help.
Jimmy
@Nerdherdx
Jun 01 2016 22:25
ey, I was wondering if someone can help me with a small error
When appending, text just stacks over the old appened text
ex, clicking it for the first time works, appened text is there. but clicking it another time the new text and old text are together
PedroCSilva
@PedroCSilva
Jun 01 2016 22:27
post code pls
Kevin Holmes
@codersc
Jun 01 2016 22:27
@Nerdherdx r u floating elements?
Jimmy
@Nerdherdx
Jun 01 2016 22:28
            $(".quote").append(quote);
and the other is just an on click
which grabs the data from an api
Kevin Holmes
@codersc
Jun 01 2016 22:28
@Nerdherdx show the css related to it
Jimmy
@Nerdherdx
Jun 01 2016 22:28
position: relative;
padding: 10% 50px;
margin-left: auto;
margin-right: auto;
width:30%;
height:30%;
color:black;
font-family: monospace;
}
its not much.
Kevin Holmes
@codersc
Jun 01 2016 22:29
im on the last frontend project but will never finish. smh :worried:
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:29
@martowow @PedroCSSilva Imgur blocks requests from codepen. Try flickr or postimage instead.
Jimmy
@Nerdherdx
Jun 01 2016 22:29
@TylerMoeller imgur also has a paid api
Kevin Holmes
@codersc
Jun 01 2016 22:29
i cant get any help, but its probly karma because i havent really helped anyone else just foucsing on getting it done m slef
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:30
@Nerdherdx You may want to use $(".quote").text(quote); instead of .append()
@Nerdherdx Ahhh, I didn't know that. Seems they want to charge to use it with codepen...
.append() is meant to just attach itself to previous text. You could also do a $(".quote").empty() to clear it out first.
PedroCSilva
@PedroCSilva
Jun 01 2016 22:31
@TylerMoeller can you take a moment pls to help me with my twitch project?
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:32
Sure @PedroCSSilva
Jimmy
@Nerdherdx
Jun 01 2016 22:32
@TylerMoeller brownie
PedroCSilva
@PedroCSilva
Jun 01 2016 22:32
im probably doing something wrong with the 2nd API call there
and also, my game information is not showing up
Jimmy
@Nerdherdx
Jun 01 2016 22:32
@TylerMoeller how do i give u brownie points>?
Jeff
@adzam5
Jun 01 2016 22:32
Anyone have any experience with the Facebook API?
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:33
@Nerdherdx Just say "thanks" lol
PedroCSilva
@PedroCSilva
Jun 01 2016 22:33
Jimmy type Thanks @ username
Jimmy
@Nerdherdx
Jun 01 2016 22:33
@TylerMoeller thanks
CamperBot
@camperbot
Jun 01 2016 22:33
nerdherdx sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 564 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Jimmy
@Nerdherdx
Jun 01 2016 22:33
@PedroCSSilva thanks
CamperBot
@camperbot
Jun 01 2016 22:33
nerdherdx sends brownie points to @pedrocssilva :sparkles: :thumbsup: :sparkles:
:cookie: 295 | @pedrocssilva |http://www.freecodecamp.com/pedrocssilva
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:33
@PedroCSSilva I think it's your for loop - that runs through to completion before finishing the API calls
You can use the .done() functionality to wait until the .getJSON completes:
$.getJSON( "example.json", function() {
  console.log( "success" );
})
  .done(function() {
    console.log( "second success" );
  })
  .fail(function() {
    console.log( "error" );
  })
  .always(function() {
    console.log( "complete" );
  });
PedroCSilva
@PedroCSilva
Jun 01 2016 22:34
wow
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:35
@PedroCSSilva I'd recommend a forEach with a callback instead of a for loop.
streams.forEach(function(streamer) {
Updated ^^ to use your array name
PedroCSilva
@PedroCSilva
Jun 01 2016 22:36
im gonna read about it and try to implement it
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:36
It's very useful with javascript trying to run everything at once
PedroCSilva
@PedroCSilva
Jun 01 2016 22:36
that will probably fix the issue Im having with the order of the streams not being always the same
right?
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:37
Definitely using a forEach combined with the .done() will make sure you get all the data you need
It's a promise() implementation - very useful to learn for when you get to the Simon project if you want to avoid using setTimeout.
http://api.jquery.com/jquery.getjson/
PedroCSilva
@PedroCSilva
Jun 01 2016 22:38
@TylerMoeller I really like JS and using APIs but ive been having some trouble with these projects
I try finding good tutorials but its hard and I see that you know a lot about it
can you suggest any book or website to find out more?
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:39
@PedroCSSilva It's normal :) Lots of challenges they don't teach us, like CORS issues.
PedroCSilva
@PedroCSilva
Jun 01 2016 22:39
yeah i've been using jsonp in some projects because of that
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:39
@PedroCSSilva I like Eloquent Javascript: http://eloquentjavascript.net/. There's a free online version. Lots of details.
PedroCSilva
@PedroCSilva
Jun 01 2016 22:40
Thanks @TylerMoeller
CamperBot
@camperbot
Jun 01 2016 22:40
pedrocssilva sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 565 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
PedroCSilva
@PedroCSilva
Jun 01 2016 22:40
again :P
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:40
They even have a portuguese version :) https://github.com/braziljs/eloquente-javascript
PedroCSilva
@PedroCSilva
Jun 01 2016 22:40
probably the 3rd time i thank you
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:40
Happy to help
PedroCSilva
@PedroCSilva
Jun 01 2016 22:41
if you have a few minutes to spare and take a look at my other projects
to see if there's something i can improve or implement
its a big favor and I understand if you cant do it
thanks either way
im trying to aplly for summer internships so im really focusing on these projects
Tyler Moeller
@TylerMoeller
Jun 01 2016 22:43
Sure Pedro - I can take a look later. Just taking a break from react.js for now :) I'll tag you here if I have any feedback.
PedroCSilva
@PedroCSilva
Jun 01 2016 22:43
awesome! Thank you :D
Islam Ibakaev
@dagman
Jun 01 2016 23:01
take a look at my portfolio guys http://codepen.io/dagman/pen/VjwGLy?editors=0010
PedroCSilva
@PedroCSilva
Jun 01 2016 23:08
something wrong with it
i think
Juwdohr
@Juwdohr
Jun 01 2016 23:10
@dagman hey the works page is super blurry. Not sure if that was supposed to be like that or not?
Bruce Young
@mutantspore
Jun 01 2016 23:13
they focus on hover .. but there is no hover on mobile ..(didnt check what happens there)
Islam Ibakaev
@dagman
Jun 01 2016 23:15
@Juwdohr it is filter: blur(3px) on projects images :smile:
Alex Myers
@qckpckt
Jun 01 2016 23:30
Can anyone tell me why my div with the class font appears to be offset from the div with the background image by approximately 15-20px? I cant see whats causing it in my code. https://codepen.io/qckpckt/pen/JXVZLy
sogotownpn
@sogotownpn
Jun 01 2016 23:35