These are chat archives for FreeCodeCamp/HelpFrontEnd

12th
Apr 2017
Jorge
@OrangeKulture
Apr 12 2017 00:00
well, pretty much .. except the giant lizards and flooded hotel rooms
Gulsvi
@gulsvi
Apr 12 2017 00:00
Yeah, and our laptops with JavaScript
>> insert nerd emoji here <<
Jorge
@OrangeKulture
Apr 12 2017 00:00
lol :D yeah ! exactly
BDBradley
@bdbradley
Apr 12 2017 00:06
Anyone have an idea how to properly add an anchor tag to a navbar link?
Johnny
@jtan3
Apr 12 2017 00:11
@bdbradley what do you have so far?
BDBradley
@bdbradley
Apr 12 2017 00:13
@jtan3 One sec I'm still messing with the code...
Gulsvi
@gulsvi
Apr 12 2017 00:13
@bdbradley A navbar link is an anchor tag: https://v4-alpha.getbootstrap.com/components/navbar/#nav
Chris Cullen
@123xylem
Apr 12 2017 00:31
<//a> html closing navbar nav I keep getting this closing tag for all tags on my navbar nav class div
ANy idea why or what it means?
BDBradley
@bdbradley
Apr 12 2017 00:42
Thanks Sky, I'll take a look, I'm just trying to do it with regular html
This is the code I have: https://codepen.io/bdbradley/pen/NpmeQy
It's like the navbar I created covers the h2 text title when I click on a link to go to that section, (Home and Contact) Portfolio seems to go to approximately where Portfolio is...
Gulsvi
@gulsvi
Apr 12 2017 00:47
@bdbradley Nice work. With a fixed top navbar, it will cover up the content. This is an odd work around, but it works for avoiding that issue. For example, with your Contact section:
#contact {
  padding-top: 60px;
  margin-top: -60px;
}
Jorge
@OrangeKulture
Apr 12 2017 00:47
a few years back, you could do that with an anchor, self closing tag:
< a name = "contact"/ >
Gulsvi
@gulsvi
Apr 12 2017 00:48
The nice thing about the Bootstrap Navbar is how it collapses down to a button with a dropdown menu on mobile screens - that's always a challenge with a custom navbar.
Jorge
@OrangeKulture
Apr 12 2017 00:48
disregard that awful spacing tho
Meisha Booker
@Meisha04
Apr 12 2017 00:53
hello, I am having trouble with the local weather....my api key is not working. It's not displaying any of the information.
Jorge
@OrangeKulture
Apr 12 2017 00:54
@Meisha04 can we see the URL ?
Meisha Booker
@Meisha04
Apr 12 2017 00:57
var api= 'http://api.openweathermap.org/data/2.5/weather?lat=' +lat+ '&lon' +long+ '&appid=a9ddeeee450e56d1e0b643595855efbc';
Jorge
@OrangeKulture
Apr 12 2017 00:58
long is missing the = sign
Good eye - &lon= missing the equal sign
Jorge
@OrangeKulture
Apr 12 2017 01:00
yeah, the call does return a valid JSON if you add the =, assuming the lat and long variables are being passed in correctly ... just tested it
Meisha Booker
@Meisha04
Apr 12 2017 01:01
yea sorry i was testing it as well, thank you @OrangeKulture
CamperBot
@camperbot
Apr 12 2017 01:01
meisha04 sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 293 | @orangekulture |http://www.freecodecamp.com/orangekulture
Jorge
@OrangeKulture
Apr 12 2017 01:01
hahah nice! Las Vegas babyyy , yeaaah ! here we gooo :D :D
@Meisha04 sure, not a prob!
Meisha Booker
@Meisha04
Apr 12 2017 01:01
oh wait that's so not right i am in california....lol
how do i get the correct city?
or state?
Gulsvi
@gulsvi
Apr 12 2017 01:04
@Meisha04 I put those coordinates in manually. You will need to use a location service to get the location of people visiting your web page. Like navigator.geolocation and https://ipinfo.io/json
Your URL would be: http://api.openweathermap.org/data/2.5/weather?lat=' +lat+ '&lon=' +long+ '&appid=a9ddeeee450e56d1e0b643595855efbc
The location service/API would fill in the lat and long variables for you
Meisha Booker
@Meisha04
Apr 12 2017 01:06

i thought i did...here is my code below $(document).ready(function(){
var long;
var lat;
var fTemp;
var cTemp;
var tempSwap;

if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position){
long = position.coords.longitude;
lat = position.coords.latitude;
$("#data").html("latitude: " + lat + "<br>longitude: " + long);

});

var api= 'http://api.openweathermap.org/data/2.5/weather?lat=' +lat+ '&lon=' +long+ '&appid=a9ddeeee450e56d1e0b643595855efbc';

$.getJSON(api, function(data){

var weatherType = data.weather[0].description;
var kelvin = data.main.temp;
var windSpeed = data.wind.speed;
var city = data.name;

Moisés Man
@moigithub
Apr 12 2017 01:07
getCurrentPos is an ASYNC function
mean it gonna execute LATER
code run from top to bottom
Jorge
@OrangeKulture
Apr 12 2017 01:07
http / https thing
Gulsvi
@gulsvi
Apr 12 2017 01:08
@Meisha04 This is the first project where you run into asynchronous code. navigator.geolocation has to look up your location, so it takes time. JavaScript tries to run everything at once, so global variables don't work like that.
Jorge
@OrangeKulture
Apr 12 2017 01:09
shes calling the getjson metho inside the nav.geolocation, it should work regardless of async, the problem is the protocols, in my opinion
ooor maybe not .. that closing bracket might be in the middle, didnt realize
Gulsvi
@gulsvi
Apr 12 2017 01:09
It's a combo - lat and long aren't available outside of the navigator.geolocation callback, and on Chrome it will fail due to https requirements and mixed-content
Meisha Booker
@Meisha04
Apr 12 2017 01:10
so what's the best solution to get it to work?
@SkyCoder01
Jorge
@OrangeKulture
Apr 12 2017 01:11
yeah instead of declaring them at the top, you could just say var lat = position.coords.latitude, but then you'd have to call the API inside the if statement block
Gulsvi
@gulsvi
Apr 12 2017 01:11
@Meisha04 The best solution is to use an additional method for getting location and a Weather API that supports HTTPS. Here are some details I wrote up because lots of poeple run into this problem: http://codepen.io/skycoder/post/apisandlocation
Jorge
@OrangeKulture
Apr 12 2017 01:11
In all honesty, I should switch to Dark Sky .. but that would be re writing a lot of the code :S
Gulsvi
@gulsvi
Apr 12 2017 01:12
Regarding async, functionality, you'll need to pass the lat/long arguments to other functions or run all your code inside the same callback
There's no way you wrote all the code without a functional API URL, I'm guessing :p
BDBradley
@bdbradley
Apr 12 2017 01:13
@SkyCoder01 True, thanks for the help, the CSS fixed the issues for Home and Contact
CamperBot
@camperbot
Apr 12 2017 01:13
bdbradley sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1002 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Jorge
@OrangeKulture
Apr 12 2017 01:14
I run the API requests through Postman first ..
Bradleyss pic kinda looks like Quincy's
Gulsvi
@gulsvi
Apr 12 2017 01:16
I didn't realize you are in Costa Rica
Didn't know there was a Hooters in CR lol
Jorge
@OrangeKulture
Apr 12 2017 01:17
theres a lot of hooters
that one is literally , like a 2min ride .. hence the mini heart attack
Gulsvi
@gulsvi
Apr 12 2017 01:17
I had no idea
lol
Jorge
@OrangeKulture
Apr 12 2017 01:17
@SkyCoder01 tell the truth, are you working with the CIA ? spill !
BDBradley
@bdbradley
Apr 12 2017 01:17
@OrangeKulture Quincy?
Gulsvi
@gulsvi
Apr 12 2017 01:18
lmao, nope. just a poor college student
Jorge
@OrangeKulture
Apr 12 2017 01:18
@SkyCoder01 that;s what they all say .. ([insert Fry suspicious meme here])
Gulsvi
@gulsvi
Apr 12 2017 01:18
I want to visit CR some day - my girfriend is on corn island now in Nicaragua
Jorge
@OrangeKulture
Apr 12 2017 01:18
@bdbradley yeah Quincy .. the dude who started FCC ?
You should! it's definitely awesome around here .. really chill and slow paced
Nicaragua has some sweet spots too ...
Gulsvi
@gulsvi
Apr 12 2017 01:19
I've been to Guatemala but haven't gone further south
some day...
I've studied spanish for 6 years
Jorge
@OrangeKulture
Apr 12 2017 01:20
How about, you take me to Vegas with your free trip :D and theeen, I invite you both to CR?
Gulsvi
@gulsvi
Apr 12 2017 01:20
Deal :)
Jorge
@OrangeKulture
Apr 12 2017 01:20
oh yeah? nice .. you speak good Spanish then, im guessing
Gulsvi
@gulsvi
Apr 12 2017 01:20
I know the grammar really well - but it's hard putting it all together
kind of like front end development
Jorge
@OrangeKulture
Apr 12 2017 01:21
harder than english, ill give you that .. fckn verbs have gender and all that, u know ..
wahahah yeah.. makes sense
Gulsvi
@gulsvi
Apr 12 2017 01:22
Subjunctive can be confusing, plus my vocabulary isn't much beyond text books, so it's hard to talk about politics for example
At least the spelling is easy in Spanish and the patterns are pretty consistent with verbs
Meisha Booker
@Meisha04
Apr 12 2017 01:23
okay I'm not gonna lie....I'm still a bit lost on what to do?
BDBradley
@bdbradley
Apr 12 2017 01:23
@OrangeKulture Ok....I see what you mean, I need glasses and a more serious expression
Jorge
@OrangeKulture
Apr 12 2017 01:28
@bdbradley haha yeah, its more the style of it .. B & W with plain background
@SkyCoder01 its all about practice .. its like us and english, now everyone has my level around here for example, i also do not have an accent whatsoever .. kinda because i've been speaking english everyday for a loong time
you just need someone to practice in an everyday conversation
Chris Cullen
@123xylem
Apr 12 2017 01:55
    <ul class=" nav navbar-nav">
              <li class="dropdown-submenu">
                <a tabindex="-1" href="/home/categories">Categories</a>
                <ul class="dropdown-menu">
                  <li><a tabindex="-1" href="/home/health">Health</a></li>
                  <li><a tabindex="-1" href="/home/kitchen">Kitchen</a></li>
                  <li><a tabindex="-1" href="/home/homeware">Homeware</a></li>
                                      </ul>
                  </li>

                   <li><a href="/home/eco">Why Eco?</a></li>
    <li><a href="/home/ecoInfo">Eco Info</a></li>
    <li><a href="/home/about">Our Ethos</a></li>
    <li><a href="/home/contact">Contact Us</a></li>


<ul style="display:inline;" class=" navbar-right">

            <!--======================================================USER LOGGED IN BUTTONS?=========================================-->

<% if (currentUser){ %>


               <li ><a href="/home/profile">Hello <%=currentUser.username%>!</a></li>
                              <li><a  href="/logout">LogOut</a></li>
                              <% } %>
<%  if(!currentUser) { %>
                <li><a href="/login">Login</a></li>
                <li><a href="/signup">SignUp</a></li>
            <%    } %>
                         </ul>            

                         <!--======================================================================================================================-->
                                                  </ul>


</nav>

Can you help me style this

it wont sit on the top

Edgar Pan
@edgaryp
Apr 12 2017 02:03
Hey I am hope to find if static website (using Jekyll) can achieve "load more" feature for blog like photo attached?
Moisés Man
@moigithub
Apr 12 2017 02:04
@123xylem move ur second ul out from first ul
add nav navbar-nav classes to it too
remove style
Edgar Pan
@edgaryp
Apr 12 2017 02:04
Screen Shot 2017-04-12 at 12.00.09 pm.png
Chris Cullen
@123xylem
Apr 12 2017 02:05
@moigithub thanks :)
CamperBot
@camperbot
Apr 12 2017 02:05
123xylem sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3064 | @moigithub |http://www.freecodecamp.com/moigithub
Gulsvi
@gulsvi
Apr 12 2017 02:11
@edgaryp Seems there are ways to do it with jekyll, but that's just what Google tells me. This isn't really the right place to find out. If you need help with a Free Code Camp project, by all means, ask away. Lots of us can help with those projects
Cale Switzer
@Tennyx
Apr 12 2017 02:25
Screen Shot 2017-04-11 at 10.21.52 PM.png
Driving me crazy! Can anyone tell me why my <link> file in index html to bootstrap is not working? It's a filepath issue because I can make it work if I drop the .css file into the same directory as index.html.
Jorge
@OrangeKulture
Apr 12 2017 02:26
this roman numeral thing is not cool .. hated it back in school, hate it today :anger: :anger:
maybe the type?
@Tennyx trying removing the type .. just go <link rel="" href="">
Robert Collins
@robbiemu
Apr 12 2017 02:30
@Tennyx he means href="static/foo...." I think. remove the .. parent directory
@Tennyx could you take a look at my Game Of Life? For some reason the very first step doesn't draw, but from then on everything works :S -- game state is changing, just the canvas doesn't update
http://codepen.io/robertotomas/pen/jmNvpb
I'm not reallty solid with react
Paul
@pneu1
Apr 12 2017 02:34
I'm on my first effort of making that tribute page (118), can anyone please tell me how to get a background image to align with the bottom of the page rather than the default top of the page?
Jorge
@OrangeKulture
Apr 12 2017 02:35
@pneu1 how do you mean?
Robert Collins
@robbiemu
Apr 12 2017 02:36
@pneu1 can you show a codepen sample? there are different CSS rules you could use
Paul
@pneu1
Apr 12 2017 02:36
I have set a picture as a background (Rather than a color), but it aligns with the TOP LEFT of the webpage. I want it to align with the bottom .. https://codepen.io/pneu1/full/WjeLqQ/
Robert Collins
@robbiemu
Apr 12 2017 02:38
@pneu1 try background-position: center bottom;
Paul
@pneu1
Apr 12 2017 02:39
HA! perfect, thank you! i couldnt find the command, I was going with background-align with no joy :)
Robert Collins
@robbiemu
Apr 12 2017 02:40
np :)
looking for react help
Craig Morrison
@frogmorton
Apr 12 2017 02:44
dumb question... can you "undo" an action in codepen? How?
Paul
@pneu1
Apr 12 2017 02:44
Ctrl-Z works for me
Jorge
@OrangeKulture
Apr 12 2017 02:45
yeah just click on the code window first, then ctrl z
Robert Arifin
@renkachan
Apr 12 2017 02:45
guys, is it possible to add × into text box?
i already set it to position absolute and the texbox into relative, the × still not inside the box
Nick Danvers
@Ravenor222
Apr 12 2017 02:53
Hey guys, wondering if someone can help me with icons
this is my code, i will appreciate it a lot if someone can help me >.<
Robert Collins
@robbiemu
Apr 12 2017 02:56
@renkachan I like your animated input :)
@Ravenor222 http://fontawesome.io/icons/ here's a list of list of icons
rohitdesigner
@rohitdesigner
Apr 12 2017 03:03
heloo
anybody here?????????????????
Johnny
@jtan3
Apr 12 2017 03:05
hello @rohitdesigner
rohitdesigner
@rohitdesigner
Apr 12 2017 03:05
@jtan3 background-image not working
Johnny
@jtan3
Apr 12 2017 03:07
@rohitdesigner explain your problem and provide your codepen/code
rohitdesigner
@rohitdesigner
Apr 12 2017 03:09
do u know semnatic-ui
Johnny
@jtan3
Apr 12 2017 03:11
Nope. You can ask your question and someone might help.
Robert Arifin
@renkachan
Apr 12 2017 03:13
@robbiemu thanks lol
CamperBot
@camperbot
Apr 12 2017 03:13
:cookie: 338 | @robbiemu |http://www.freecodecamp.com/robbiemu
renkachan sends brownie points to @robbiemu :sparkles: :thumbsup: :sparkles:
Robert Collins
@robbiemu
Apr 12 2017 03:13
what'd I do?
ooh :) yea that's cool design
rohitdesigner
@rohitdesigner
Apr 12 2017 03:26
@robbiemu hello
anybody here to help
Robert Collins
@robbiemu
Apr 12 2017 03:26
what's going on/
@rohitdesigner see @jtan3 's request
@robbiemu the click event on #loginbutton not firing
scrit is below
Robert Collins
@robbiemu
Apr 12 2017 03:35
@rohitdesigner sidebar is not a function
did you forget to include path/to/jquery.sidebar.min.js
Robert Arifin
@renkachan
Apr 12 2017 03:41
@robbiemu can you help me how to put × inside textbox?
Robert Collins
@robbiemu
Apr 12 2017 03:42
@renkachan like $(textarea).val('test') ?
Robert Arifin
@renkachan
Apr 12 2017 03:43
@robbiemu want to make it as an element, so i can add clear text function to it
rohitdesigner
@rohitdesigner
Apr 12 2017 03:43
@robbiemu i am using sidebar of semantic ui
gulptech
@gulptech
Apr 12 2017 03:55
@rohitdesigner what part of the click event it not working ?
@rohitdesigner the only thing i see is that you are using the slim version of jquery which does not contain animation (no fadein)
rohitdesigner
@rohitdesigner
Apr 12 2017 04:00
ok
Robert Collins
@robbiemu
Apr 12 2017 04:05
@fortMaximus I'll trade help with you. Im having toruble with setInterval
h1tag
@h1tag
Apr 12 2017 04:09
@robbiemu what's the problem?
Robert Collins
@robbiemu
Apr 12 2017 04:09
@fortMaximus I think I just found it. I was saving interval like:
this.interval = setInterval(...
then clearing it both inside and outside of SetInterval like:
self.interval.clearInterval()
but I'm supposed to instead do clearInterval(self.interval) I think
woohoo!
h1tag
@h1tag
Apr 12 2017 04:13
@robbiemu hmm... my problem is that I want to start another setInterval after the 1st one finishes
Robert Collins
@robbiemu
Apr 12 2017 04:15
@fortMaximus that's should be like:
intervals = {}
clearFirst = () => {
  intervals.second = setInterval(second, when)
}
intervals.first = setInterval(first, when)
first = () => { //..
  //if( timeToClear)
    clearFirst
}
h1tag
@h1tag
Apr 12 2017 04:17
@robbiemu it's for the pomodoro clock so the when has to be at least after 25 minutes
and the user determines the session time
Robert Collins
@robbiemu
Apr 12 2017 04:19
@fortMaximus okay :) you're going to bind the value from the input to some variable 'whenFirst' and 'whenSecond' instead then
I'm so close :) only ahve to allow the user to customize the board now
http://codepen.io/robertotomas/pen/jmNvpb
h1tag
@h1tag
Apr 12 2017 04:23
@robbiemu I don't understand the code you gave me. And I thought that the when means when to start (my fault) but I know that it means when to repeat, so the whenwill be one second here
like how it's going to work
so you do it without clearInterval?
Robert Collins
@robbiemu
Apr 12 2017 04:34
@fortMaximus you use clearInterval, but you encapsulate it: https://jsfiddle.net/b4z6bkq8/
Mychal Simka
@msimka
Apr 12 2017 04:35
Anyone know a bit of node here?
Gots a problem
And no one seems to populate the backend forum
Robert Collins
@robbiemu
Apr 12 2017 04:37
@msimka sure, I know node
Mychal Simka
@msimka
Apr 12 2017 04:37

var http = require('http');

((callback) => {

newList = [];

for (var i = 2; i < process.argv.length; i++) {

var chunks = '';

http.get(process.argv[i], (res) => {

res.setEncoding('utf8');

res.on('data', (chunk) => {

chunks += chunk.toString();

});

res.on('end', () => {

newList[i] = chunks;

});

});

}

callback();

})(() => {

for (var j = 2; j < process.argv.length; j++) {

console.log(newList[j]);

}

});
I'm returning empty strings every time
Robert Collins
@robbiemu
Apr 12 2017 04:39
when you say "returning" .. I notice that you don't actually ahve a return statement
h1tag
@h1tag
Apr 12 2017 04:43
@robbiemu wow! Thank you so much! Now I understood how. One last thing why are you calling clearInterval(intervals.first) after intervals.second = setInterval(second, when)?
CamperBot
@camperbot
Apr 12 2017 04:43
fortmaximus sends brownie points to @robbiemu :sparkles: :thumbsup: :sparkles:
:cookie: 339 | @robbiemu |http://www.freecodecamp.com/robbiemu
Mychal Simka
@msimka
Apr 12 2017 04:44
@robbiemu we do the backend challenges on C9 not inside freecodecamp
So they're programs, not functions
Robert Collins
@robbiemu
Apr 12 2017 04:45
@fortMaximus Im sorry, you're not reading that correctly. I define the call in the reverse order maybe, but the code does not run strictly sequentially :)
@msimka I think perhaps you want:
var http = require('http');

((callback) => {
  newList = [];

  for (var i = 2; i < process.argv.length; i++) {
    var chunks = '';

    http.get(process.argv[i], (res) => {
      res.setEncoding('utf8');
      res.on('data', (chunk) => {
        chunks += chunk.toString();
      });
      res.on('end', () => {
        newList[i] = chunks;
      });
    });
  }
  callback(newList);
})((newList) => {
  for (var j = 2; j < process.argv.length; j++) {
    console.log(newList[j]);
  }
});
have you added console.logs to your data and end statements?
Mychal Simka
@msimka
Apr 12 2017 04:49
No, that's a good idea though. It has to be in the data statement from the things I was tinkering with last
They both work
Cato.
@catoslife
Apr 12 2017 04:50
http://catohenshall.com/ I need help with my site who can Help me :)
Mychal Simka
@msimka
Apr 12 2017 04:50
chunks is not working
Robert Collins
@robbiemu
Apr 12 2017 04:51
so yeah, I didn't think about hoisting :)
Mychal Simka
@msimka
Apr 12 2017 04:53
what is that link
Robert Collins
@robbiemu
Apr 12 2017 04:53
var http = require('http');

((callback) => {
  newList = [];

  for (var i = 2; i < process.argv.length; i++) {
    var chunks = '';

    http.get(process.argv[i], (res) => {
      res.setEncoding('utf8');
      res.on('data', (chunk) => {
        chunks += chunk.toString();
      });
      res.on('end', () => {
        newList[i] = chunks;
      });
    });
  }
  console.log('...and done')
  callback();
})(() => {
  for (var j = 2; j < process.argv.length; j++) {
    console.log(newList[j]);
  }
});
Robert Collins
@robbiemu
Apr 12 2017 04:55
if you saw a console.log from end, then it has to be a problem after that. :)
@mikaeloduh that is the most beautiful tic-tac-toe I've seen :) :+1:
Michael Duh
@mikaeloduh
Apr 12 2017 04:55
Just finished the Tic Tac Toe Game AI, everyone give a try.
Mychal Simka
@msimka
Apr 12 2017 04:56
@robbiemu No, thr "and donr" consolelog worked too
Robert Collins
@robbiemu
Apr 12 2017 04:56
@mikaeloduh one slight .. discomfort .. if I select 2 players, and set player 1 to 'O', player 1 still goes first

@msimka

var http = require('http');

((callback) => {
  newList = [];

  for (var i = 2; i < process.argv.length; i++) {
    var chunks = '';

    http.get(process.argv[i], (res) => {
      res.setEncoding('utf8');
      res.on('data', (chunk) => {
        chunks += chunk.toString();
      });
      res.on('end', () => {
        newList[i] = chunks;
      });
    });
  }
  callback();
})(() => {
  console.log(JSON.stringify(newList));
  for (var j = 2; j < process.argv.length; j++) {
    console.log(newList[j]);
  }
});

seems like arguments in do not match http.get out

Mychal Simka
@msimka
Apr 12 2017 04:59
arguments are process.argv
Robert Collins
@robbiemu
Apr 12 2017 04:59
@msimka yes
did you run that last one?
Michael Duh
@mikaeloduh
Apr 12 2017 04:59
@robbiemu player 1 start first at the begining of the game, and the next game looser will go first, thats my rule
Robert Collins
@robbiemu
Apr 12 2017 05:00
@mikaeloduh whoever plays 'X' should start first. If they should change which plays first, their letter should change to match... anyway, I wouldn't fault you on it one bit! its fantastic
Michael Duh
@mikaeloduh
Apr 12 2017 05:00
@robbiemu playing with AI, player always go first
Robert Collins
@robbiemu
Apr 12 2017 05:01
@mikaeloduh yes. I said 'two player game' :)
Michael Duh
@mikaeloduh
Apr 12 2017 05:01
@robbiemu oh, ok, a little misunderstad the rule
AK
@akcode47
Apr 12 2017 05:02
Anyone know about bycrt in spring security?
bcrypt*
Moisés Man
@moigithub
Apr 12 2017 05:02
@robbiemu @msimka http is async.. probably u wanna call ur callback AFTER/ON end event
Robert Collins
@robbiemu
Apr 12 2017 05:03
@moigithub he did it there, he has data
Mychal Simka
@msimka
Apr 12 2017 05:04
@moigithub Yes but I have to get from 3 urls
and console.log in specific order
Moisés Man
@moigithub
Apr 12 2017 05:04
then add a IF condition.. to only call the callback after u get 3 urls/results @msimka
but.. only way to know the http.get finished its work.. is on the end event
Robert Arifin
@renkachan
Apr 12 2017 05:05
i gave up guys
can anyone help me
why my x is not in line with the text box?
Mychal Simka
@msimka
Apr 12 2017 05:06
hmm
Moisés Man
@moigithub
Apr 12 2017 05:06
if (j === process.argv.length-1) callback()
Mychal Simka
@msimka
Apr 12 2017 05:06
I get it
@moigithub thanks
CamperBot
@camperbot
Apr 12 2017 05:06
msimka sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3065 | @moigithub |http://www.freecodecamp.com/moigithub
rohitdesigner
@rohitdesigner
Apr 12 2017 05:07
anybody here
??
Mychal Simka
@msimka
Apr 12 2017 05:13
@rohitdesigner waddup
rohitdesigner
@rohitdesigner
Apr 12 2017 05:16
@msimka i have problem with background-image
Mychal Simka
@msimka
Apr 12 2017 05:17
@moigithub On second thought that won't work because how do we know if the previous http requests have finished?
@moigithub we only that the current one finished
@rohitdesigner whats the prob
rohitdesigner
@rohitdesigner
Apr 12 2017 05:18
@rohitdesigner
see i have given the background-image :url but its not working
when i give comlete url includig c:///... that stuff it works
whats the best way to give url
@msimka
Jorge
@OrangeKulture
Apr 12 2017 05:19
@rohitdesigner can we see your code?
rohitdesigner
@rohitdesigner
Apr 12 2017 05:19
i have used semantic ui
its not possible to post all code
Mychal Simka
@msimka
Apr 12 2017 05:20
@rohitdesigner If it works with the full path, then your problem is in how you're writing the URL
Jorge
@OrangeKulture
Apr 12 2017 05:20
i just meant for the path of the url .. are you passing the data with jquery, or css .. or?
rohitdesigner
@rohitdesigner
Apr 12 2017 05:20
background: url("assets/img/login_note.jpg");
@msimka @OrangeKulture whats the way to write tell freinds
Mychal Simka
@msimka
Apr 12 2017 05:21
@rohitdesigner Is assets in your cd?
Jorge
@OrangeKulture
Apr 12 2017 05:21
are you working locally, on codepen, or where?
rohitdesigner
@rohitdesigner
Apr 12 2017 05:21
locally
@msimka in the folder itself
Mychal Simka
@msimka
Apr 12 2017 05:22
which folder?
same folder as the file you're writing the URL call?
Jorge
@OrangeKulture
Apr 12 2017 05:22
also you calling with CSS ? where is the css file located? etc
Mychal Simka
@msimka
Apr 12 2017 05:22
Have you tried ./assets etc.?
rohitdesigner
@rohitdesigner
Apr 12 2017 05:23
@msimka yea
Nothing
RakeshNerkar
@Rakesh18754
Apr 12 2017 05:35
which is the best code editor for angular with java ...apart from Webstorm...as its not free....pls suggest free editors or IDE....
Mychal Simka
@msimka
Apr 12 2017 05:37
@Rakesh18754 emacs :)
Darth Skywalker
@adityaparab
Apr 12 2017 05:38
@Rakesh18754 Visual Studio Code
and no doubt, eclipse for Java
RakeshNerkar
@Rakesh18754
Apr 12 2017 05:40
@adityaparab actuly my project has backend in java and angular in front end so any 1 editor?
Darth Skywalker
@adityaparab
Apr 12 2017 05:41
Is it like RESTful API project or do you render your html on the backend using things like JSP or thymeleaf?
@Rakesh18754
devpaaji
@devpaaji
Apr 12 2017 05:41
@adityaparab
can you explain this

factoring can get difficult when you deal with very large semi-prime numbers.

Take the number 270,577,760,933,153,369,932,754,159.

This number has exactly two prime number factors.

How do I know this?

RakeshNerkar
@Rakesh18754
Apr 12 2017 05:42
@adityaparab.. it is resfull
devpaaji
@devpaaji
Apr 12 2017 05:42
577 is prime number
rest all are divisible
Darth Skywalker
@adityaparab
Apr 12 2017 05:43
@devpaaji Out of touch with all the math stuff mate... Can't tell you the exact logic.
RakeshNerkar
@Rakesh18754
Apr 12 2017 05:44
@adityaparab ?
Mychal Simka
@msimka
Apr 12 2017 05:44
Can anyone tell me how to write a callback that executes after more than 1 http requests have finished?
Darth Skywalker
@adityaparab
Apr 12 2017 05:45
@Rakesh18754 : Yes. So just open your java project in eclipse
and open the folder in your project that has all the UI code in VS Code
you can still find some Angular JS addons for eclipse as well (if at all you want to use same editor for both thing - eclipse)
@msimka Do you have example code that you're using to trigger http request?
RakeshNerkar
@Rakesh18754
Apr 12 2017 05:46
@adityaparab VS Code this wont work on ubuntu ...thats my propbelem
Darth Skywalker
@adityaparab
Apr 12 2017 05:47
I use VS code on Ubuntu (and sometime fedora) regularly
Don't know why it won't work on Ubuntu
Mychal Simka
@msimka
Apr 12 2017 05:48
@devpaaji Goldbach's theorem states that all even numbers can be expressed as the sum of two prime numbers.

@adityaparab Well if you write http.get(res) etc

then do some stuff with data

then put your callback in the 'end' statement

this works for one http request. But what if I have 20 and they all must finish before the callback

Darth Skywalker
@adityaparab
Apr 12 2017 05:50
If Goldbach was born in India he'd be shamed by society for his love for flirting around with math and not getting married and producing grandchildren for the entertainment of his parents
Mychal Simka
@msimka
Apr 12 2017 05:51
@adityaparab Sounds pleasant
@adityaparab So the Annotated Turing is not on the bestseller list there I take it?
shivam gupta
@shivamg11000
Apr 12 2017 05:53
hey campers I am trying to make the bullets to the top .
Darth Skywalker
@adityaparab
Apr 12 2017 05:54

@msimka

Use Promise .all in that case

Let's say you have a function called makeRequest which in turn makes http.get call


function makeRequest(someParams){
  return http.get(url+someParams);
}

var promises = [];

for(var i=0;i<20li++){
  promises.push(makeRequest(i+1));
}

Promise.all(promises).then(function(arrayOfAllResponses){
  console.log('This will be called AFTER all the http.get are resolved');
  console.log('And responses from each request will be clubbed in to an array which is passed as a parameter to this function');
  console.log(arrayOfAllResponses);
});
Mychal Simka
@msimka
Apr 12 2017 05:54
@shivamg11000 You can't put bullets over items, they always go to the left
as far as I know
Darth Skywalker
@adityaparab
Apr 12 2017 05:54

@msimka

So the Annotated Turing is not on the bestseller list there I take it?

Correct.

shivam gupta
@shivamg11000
Apr 12 2017 05:55
@msimka I a trying to align it to the top of its box
which i have just put for seeing
the boxes
Mychal Simka
@msimka
Apr 12 2017 05:58
@adityaparab Nice! Thanks
CamperBot
@camperbot
Apr 12 2017 05:58
:cookie: 981 | @adityaparab |http://www.freecodecamp.com/adityaparab
msimka sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
Mychal Simka
@msimka
Apr 12 2017 05:58
@shivamg11000 So you want them to be aligned across the top, similar to tabs?
shivam gupta
@shivamg11000
Apr 12 2017 05:59
I want them aligned to their bullet boxes, which i tried with verticla-align: top;
but it doesnt work
Mychal Simka
@msimka
Apr 12 2017 05:59
@shivamg11000 research CSS values flex column and flex row
shivam gupta
@shivamg11000
Apr 12 2017 06:03
@shivamg11000
trying to make the bullets in the blue section align to the top of their individual boxes.
https://codepen.io/shivamg11000/pen/evwwmq
any help
kirbyedy
@kirbyedy
Apr 12 2017 06:04
@shivamg11000 well the quick fix could be: margin-top: -10px;
on the .services ul li:before
shivam gupta
@shivamg11000
Apr 12 2017 06:05
thnx it worked
Ujjwal Gusain
@ujjwal51
Apr 12 2017 06:12
hello i!!
is there any remote jobs for front end developer ?
Robert Collins
@robbiemu
Apr 12 2017 06:29
check out my Game of Life: http://codepen.io/robertotomas/pen/jmNvpb
jmariomejiap
@jmariomejiap
Apr 12 2017 06:38
hey guys. can i please get some help. I am working on my weather project. but I'm having a problem with $.get() method. If I use the concatenated string in lets say postman, I do get a response. probably Im doing something wrong. help please. https://codepen.io/jmariomejia/pen/BRBoPP?editors=1111
RakeshNerkar
@Rakesh18754
Apr 12 2017 06:40
var i = 0; //declared using var
and
j = 3; // without using var
whats the difference?
jmariomejiap
@jmariomejiap
Apr 12 2017 06:41
@Rakesh18754 the difference is the scope of the variable.
Tanushree Samanta
@TSamanta
Apr 12 2017 06:41
could you please tell me what is the mistake in this
jmariomejiap
@jmariomejiap
Apr 12 2017 06:43
@Rakesh18754 when a variable is declare javascript needs to alocate that variable into a context.... lets say a variable could belong to a function or inside an object. and because of this context, that variable is available or private to other parts of the script.
@Rakesh18754 if a variable is declare like (j=3). it will go to a global context but if you have a function and you create a variable inside that function ex. var j = 3. then everthing inside that function will have access to that variable Functions or variables outside wont be able to access it becouse if is not inside the scope.
jmariomejiap
@jmariomejiap
Apr 12 2017 06:49
@kirbyedy hi kirbyedy. you gave me a hand yesterday. could you please take a look of my code. Im stuck again.... :(
Bas
@Aliaselias
Apr 12 2017 06:49
What do you need
$.get() is not working. i dont know why.
vatsal28
@vatsal28
Apr 12 2017 06:55
I want to put 4 social media buttons in a single row with responsive spacing and size (based on the screen size).
What is the best way to do this ?
Using bootstrap if possible
I could not find a satisfactory answer on Google
Bas
@Aliaselias
Apr 12 2017 06:56
You can just use the columns
Tanushree Samanta
@TSamanta
Apr 12 2017 07:04
you can use col-(screensize-4)
@vatsal28
Sam Griffen
@ssgriffen
Apr 12 2017 07:20
Anyone know why my console.log doesn't show the value on the first keypress but then does on the 2nd and everytime after?
depo.addEventListener('keydown', function(e) {
    var depoAddOn = document.getElementById('depositDisplay');
    var inputVal = document.getElementById('deposit').value;
    console.log(inputVal);
    depoAddOn.innerHTML = "&#36;" +  inputVal;
});
Philipp Scholz
@philipp32
Apr 12 2017 07:29
@vatsal28 You could also use float: left;
Sean McCarron
@seanjpmccarron
Apr 12 2017 07:30

Hi all, I am a beginner and looking for some advice.

Please can someone look at: http://codepen.io/seanjpmccarron/pen/VbZoEB

I have copied a snippet of my code in to this codepen for you to review.

I am stuck with the portfolio and resources sections, where the resources section is inheriting the portfolio sections style.

I want the resources section to have the background image declared in the body

devpaaji
@devpaaji
Apr 12 2017 07:30
@Aliaselias
Our PHP login system uses the future-proof BCRYPT hashing algorithm
what you mean by sing the wrong type of password hashing(MD5)
def
@defregga
Apr 12 2017 07:32
Morning campers
Sonja
@sonjaSch
Apr 12 2017 07:35
good morning everybody have a nice day :smiley:
Alexander Domikov
@AlexanderDom
Apr 12 2017 07:37
Good morning to you too :)
Spyrantis Theodoros
@thodorisanta
Apr 12 2017 07:55
anyone to guide me through my tic tac toe? :P
what should i do next?
http://codepen.io/oshikurou/pen/dvEOOX?editors=1111
NewGismo
@NewGismo
Apr 12 2017 08:08

@thodorisanta try programming the algorithm of your computer
you can directly start by programming an optimal computer by using the minimax or you can make your game more enjoyable but just giving your computer some intelligence like counter or trying to win.

For the second possibility you might start by just randomly put an X. If he knows how to do this you can improve it by giving him some extra tests

Chris Cullen
@123xylem
Apr 12 2017 08:08
https://webdevlearning-clayton901.c9users.io/home/eco
Can you tell me how to make my last div Image stay in the div?
its on pull-right which makes it float which means it doesnt stay in a div
def
@defregga
Apr 12 2017 08:18
@123xylem Got a codepen for that?
Cengiz Gonen
@cgonen
Apr 12 2017 08:20
@123xylem add the class "clearfix" to textdisplayblock
@123xylem floats mess things up.
def
@defregga
Apr 12 2017 08:29
Is there an easy way to define a maximum width for a container/jumbotron and still keep it centered if the viewport exceeds the maximum width?
Johnny
@JohnnyBizzel
Apr 12 2017 08:29
@123xylem I would say apply clearfix to the parent container. I had the same problem.
@defregga Width:100%
def
@defregga
Apr 12 2017 08:31
As a property of which class?
Johnny
@JohnnyBizzel
Apr 12 2017 08:31
@defregga The jumbotron
def
@defregga
Apr 12 2017 08:32
Doesn't do anything. I set max-width: 800px; as well.
Johnny
@JohnnyBizzel
Apr 12 2017 08:32
@defregga That's not what I said.
@defregga You could use flexbox to control the centering
def
@defregga
Apr 12 2017 08:33
I know, my intention is to limit how wide the jumbotron can get. With width: 100%; I have the exact behavior I want to avoid, namely the jumbotron being to wide on large viewports.
*too wide
vatsal28
@vatsal28
Apr 12 2017 08:35
@TSamanta Thanks! Now that didn't work as I expected it to, gonna tweak it more :D
CamperBot
@camperbot
Apr 12 2017 08:35
vatsal28 sends brownie points to @tsamanta :sparkles: :thumbsup: :sparkles:
:cookie: 128 | @tsamanta |http://www.freecodecamp.com/tsamanta
vatsal28
@vatsal28
Apr 12 2017 08:36
@philipp32 Thanks. Will try that :)
def
@defregga
Apr 12 2017 08:36
Thank you anyway @JohnnyBizzel
CamperBot
@camperbot
Apr 12 2017 08:36
defregga sends brownie points to @johnnybizzel :sparkles: :thumbsup: :sparkles:
:star2: 1635 | @johnnybizzel |http://www.freecodecamp.com/johnnybizzel
kirbyedy
@kirbyedy
Apr 12 2017 08:37
@defregga you can use media queries and tweak the layout for large viewports
Johnny
@JohnnyBizzel
Apr 12 2017 08:37
@defregga Use @media queries to change CSS at different viewports
You can have completely different layouts using media queries. (BootStrap can do some of this too)
Bas
@Aliaselias
Apr 12 2017 08:39
@devpaaji MD5 hashed password really fast, this means that a attacker can try millions of password per second. By using a slower hashing like BCRYPT that reduces this.
def
@defregga
Apr 12 2017 08:42
Okay will do, though when the rest of the functionality is done. First Intermediate project, so I guess getting the JS part right is more important for now. @kirbyedy @JohnnyBizzel
Bogdan
@oblanao
Apr 12 2017 08:58
Hello, guys! Does anyone know a workaround for the fact that Chrome 50+ doesn't support GeoLocation from non-secure origins? (i.e. CodePen.io)
Johnny
@JohnnyBizzel
Apr 12 2017 09:08
@oblanao Use a ip address API which gives location
Bogdan
@oblanao
Apr 12 2017 09:10
@JohnnyBizzel thank you !
CamperBot
@camperbot
Apr 12 2017 09:10
oblanao sends brownie points to @johnnybizzel :sparkles: :thumbsup: :sparkles:
:star2: 1636 | @johnnybizzel |http://www.freecodecamp.com/johnnybizzel
Muhammad Hasham
@MohammadHasham
Apr 12 2017 09:20
can anyone help me to make its design better?
http://codepen.io/Mohammad_Hasham/pen/GmRKrK
Willy
@metheanalyst
Apr 12 2017 09:36
Great to be Here .. Woow - This is Willy
Chris Cullen
@123xylem
Apr 12 2017 09:41
@cgonen @JohnnyBizzel thanks
CamperBot
@camperbot
Apr 12 2017 09:41
123xylem sends brownie points to @cgonen and @johnnybizzel :sparkles: :thumbsup: :sparkles:
:star2: 1637 | @johnnybizzel |http://www.freecodecamp.com/johnnybizzel
:cookie: 275 | @cgonen |http://www.freecodecamp.com/cgonen
Chris Cullen
@123xylem
Apr 12 2017 09:48
@MohammadHasham THe colors could be crisper..
thinkC
@thinkC
Apr 12 2017 09:51
guys..to submit project work can one use github to upload instead of codepen ?
Bogdan
@oblanao
Apr 12 2017 09:55
Hello, can you please take a look at my Weather App ? any feedback welcome ! Thanks http://codepen.io/oblanao/full/wdvwdM/
Muhammad Hasham
@MohammadHasham
Apr 12 2017 09:56
Anyone else please give me some feedback!
@123xylem thanks.Can you define what do you mean by crisper here?
CamperBot
@camperbot
Apr 12 2017 09:56
mohammadhasham sends brownie points to @123xylem :sparkles: :thumbsup: :sparkles:
:cookie: 340 | @123xylem |http://www.freecodecamp.com/123xylem
kirbyedy
@kirbyedy
Apr 12 2017 10:20
@oblanao you might want to change this: Temperature: 22.488888888888894°C
round it down
Bogdan
@oblanao
Apr 12 2017 10:22
@kirbyedy oh, sorry, totally forgot
@kirbyedy can you please check again ?
kirbyedy
@kirbyedy
Apr 12 2017 10:23
:thumbsup:
Bogdan
@oblanao
Apr 12 2017 10:24
@kirbyedy thank you! other than that, everything OK ?
CamperBot
@camperbot
Apr 12 2017 10:24
oblanao sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 2011 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
Apr 12 2017 10:26
@oblanao yep, pretty much ok
@oblanao I mean unless you want to play a bit with the look, here is how mine looks
Screen Shot 2017-04-12 at 13.28.01.png
Bogdan
@oblanao
Apr 12 2017 10:29
which icons did you use? I used the one I got from the API request
looks awesome, btw!
MoriJon
@MoriJon
Apr 12 2017 10:38
Hi, Id like to ask for a little help because javascript/jquery is really confusing me.
All the javascript is being run on page load even though I haven't specifed it to do that. Also,
and i can;t seem to do binding in javascript corretly
Ilona
@ilonchik
Apr 12 2017 10:48
Hi all, do you know why my whether app looks ok in debug mode but there are problems in full page mode
?
here are the links
kirbyedy
@kirbyedy
Apr 12 2017 10:49
@ilonchik check your console for errors, you are running into a mixed content error
Amit Patel
@AmitP88
Apr 12 2017 10:50
hey guys, I was reading an article here: http://www.authormedia.com/when-should-launch-author-website/ on when is the best time to launch a website and I wanted some more opinions on it. I've been working on my client site for months trying to get it better (both code-wise and visually). https://amitp88.github.io/Khmer-Family-Cafe/ I was thinking, should I just launch it under a custom domain name so that it's officially launched for the business and just keep working on it? or should I hold off until it's a lot better from now?
heroiczero
@heroiczero
Apr 12 2017 10:52
@ilonchik http://codepen.io/ilonavardanyan/full/KmKpxX/ this looks fine to me
Ilona
@ilonchik
Apr 12 2017 10:52
@kirbyedy thank you
CamperBot
@camperbot
Apr 12 2017 10:52
ilonchik sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 2012 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
Apr 12 2017 10:53
@ilonchik keep in mind that codepen will soon force all connections to be served over secured connections, so your app will fail
Ilona
@ilonchik
Apr 12 2017 10:58
@kirbyedy yes there is problem with https, but as far as I know the free version of openweatherapi does not allow https, either I have to change my API or just leave like his. btw it seems to me that it works fine all browsers except chrome
kirbyedy
@kirbyedy
Apr 12 2017 11:00
yep
Gerard Dawson
@gerarddawson
Apr 12 2017 11:01
Hey everyone, looking for some help using $getJSON. I'm working on the weather app, and trying to use getJSON, but i'm getting an error that says "Failed to load resource: net::ERR_CONNECTION_REFUSED" every time I try to get the data from the URL
Ilona
@ilonchik
Apr 12 2017 11:01
@heroiczero it doesn't look in if you open it in chrome.)
Gerard Dawson
@gerarddawson
Apr 12 2017 11:02
here is my code:
$(document).ready(function(){
  $.getJSON("https://api.openweathermap.org/data/2.5/forecast?id=524901&APPID=a933028a7c641ac28d1c6670d2af33c2", function(data){
    console.log(data);
  });
});
heroiczero
@heroiczero
Apr 12 2017 11:02
@ilonchik oh i was using firefox and opera. hmmm wierd.
kirbyedy
@kirbyedy
Apr 12 2017 11:03
@gerarddawson your api link is wrong
unless you have a payed openweather api your link can not start with https://
only http://
Gerard Dawson
@gerarddawson
Apr 12 2017 11:04
@kirbyedy yes, that is what i initially noticed, and thank you for your comment. However, when I use http, I receive this error: "jquery.min.js:4 Mixed Content: The page at 'https://codepen.io/GerardDawson/pen/OXMBVE' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/forecast?id=524901&APPID=a933028a7c641ac28d1c6670d2af33c2'. This request has been blocked; the content must be served over HTTPS."
CamperBot
@camperbot
Apr 12 2017 11:04
gerarddawson sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 2014 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Gerard Dawson
@gerarddawson
Apr 12 2017 11:06
@kirbyedy I can't find a way to get around this, but it seems like other campers have done so. Even some of the examples I've found, which I'm trying to avoid looking at, seem to use http
kirbyedy
@kirbyedy
Apr 12 2017 11:08
@gerarddawson the only way to go around it is not to use geolocation, because it requires secure https:// connection
if you want o use geolocation then you should switch to another weather api which supports https://
like darksky for example
or wunderground, or apixu or... I dont know...
Gerard Dawson
@gerarddawson
Apr 12 2017 11:09
@kirbyedy ok, gotcha. I think I had messed around with one called Dark Sky or something like that. I will give that a look. Thank you again
CamperBot
@camperbot
Apr 12 2017 11:09
gerarddawson sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:warning: gerarddawson already gave kirbyedy points
Nicola Padoan
@divan0
Apr 12 2017 12:59
Hello everyone!
Im doing my first portfolio page and i was wondering if, grabbing code from sources like w3school is a bad thing or not.. For example, noone explained how to do a top navbar, so i used the ReadSearchAsk method and i made one myself by copying/adapting some code here and there... Is that a bad way to face this challenge? Or not?
Roxroy
@roxroy
Apr 12 2017 12:59
@gerarddawson , You can also remove the protocol from the url, to address the mixed content message,
$.getJSON("//api.openweathermap.org/data/2.5/forecast?id=524901&APPID=a933028a7c641ac28d1c6670d2af33c2", this way it will using either http or https depending on the address you are navigating with.
Kiera
@kieraclarke
Apr 12 2017 13:02
hi guys how can i do this-navigate to different sections of the webpage by clicking buttons in the navigation.
h1tag
@h1tag
Apr 12 2017 13:04
@divan0 yes (by all means) if you didn't figure out how to do it (some part of the project, not the whole project) yourself and after doing some reading, you then have to search for a solution
@kieraclarke if you search, you'll find many ways to do it
Nicola Padoan
@divan0
Apr 12 2017 13:06
@fortMaximus you mean that is ALLOWED or is Bad/Forbidden to do this way? :)
h1tag
@h1tag
Apr 12 2017 13:06
yes (by all means)
so it's not bad
Nicola Padoan
@divan0
Apr 12 2017 13:07
Oh ok :D thanks! I felt like it was cheating...
Roxroy
@roxroy
Apr 12 2017 13:16
@divan0, it ok to look at code from w3school and other similar sites. Use the information as a guide to design your own page. Try to understand why it works and incorporate it into your own design. Remember to use Read-Search-Ask if you get stuck. Good luck.
Sorin Ruse
@sorinr
Apr 12 2017 13:20
@kieraclarke yes. its called in page navigation
h1tag
@h1tag
Apr 12 2017 13:23
@sorinr hey, are you familiar with setTimeout, setInterval?
Sorin Ruse
@sorinr
Apr 12 2017 13:24
@fortMaximus setInterval ass the name says sets a repetitive interval at witch a function is called. the counter part is clearInterval
@fortMaximus setTimeout sets the time interval after a function is called but only once. if you want to stop the setTimeout during the waiting period think there is the clearTimeout
h1tag
@h1tag
Apr 12 2017 13:28
@sorinr yea, I know what it does. But I wanted to ask you a question about it: I'm working on the pomodoro clock, and wanted to know if you know how to start another setInterval() after the first setInterval() is completed (i.e. after doing clearInterval() for the first setInterval() the second setInterval() starts). Note: I already got this solution earlier today, but wanted to see if you have another one
Sorin Ruse
@sorinr
Apr 12 2017 13:37
@fortMaximus don't see where you are calling function second()
h1tag
@h1tag
Apr 12 2017 13:38
@sorinr line 16
Kiera
@kieraclarke
Apr 12 2017 13:39
I'm stuck on where to start with the personal portfolio webpage
Sorin Ruse
@sorinr
Apr 12 2017 13:40
@fortMaximus yep. too tired to see it :) btw why not clearInterval(intervals.first) before calling second()?
h1tag
@h1tag
Apr 12 2017 13:41
@sorinr I didn't write it, I got it from a fellow camper here. He told me that it doesn't execute sequentially
@kieraclarke did you search for how to create a navigation bar
Kiera
@kieraclarke
Apr 12 2017 13:42
yes do i start with that
h1tag
@h1tag
Apr 12 2017 13:42
yes, you can
Kiera
@kieraclarke
Apr 12 2017 13:42
@fortMaximus okay thank you
CamperBot
@camperbot
Apr 12 2017 13:42
kieraclarke sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 719 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
Ilona
@ilonchik
Apr 12 2017 13:47
@heroiczero thanks anyway)
CamperBot
@camperbot
Apr 12 2017 13:47
ilonchik sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1127 | @heroiczero |http://www.freecodecamp.com/heroiczero
Neil
@NNeil1
Apr 12 2017 13:47
Can anyone help me. I have multiple P elements and they only appear on hover. I need them all to be in the same position upon hover. http://codepen.io/RPIE3/pen/XRrodd?editors=1000
Mohamed Derhalli
@derhallim
Apr 12 2017 13:48
@TSamanta i have just seen that message :O thanks :)
CamperBot
@camperbot
Apr 12 2017 13:48
derhallim sends brownie points to @tsamanta :sparkles: :thumbsup: :sparkles:
:cookie: 129 | @tsamanta |http://www.freecodecamp.com/tsamanta
Prince Sodhi
@princesodhi
Apr 12 2017 13:51
@NMC96 . please use display: none instead of visibility: hidden;
Neil
@NNeil1
Apr 12 2017 13:52
@princesodhi that messes with SEO in future I was told
sorry for the likn
link*

function phoneticLookup(val) {
var result = "";

// Only change code below this line
var check ={
"aplha":"Adams",
"bravo":"Boston",
"charlie":"Chicago",
"delta":"Denver",
"echo":"Easy",
"foxtrot":"Frank"
};

var value=val;
return result=check.[value];
// Only change code above this line
}

// Change this value to test
phoneticLookup("aplha");

h1tag
@h1tag
Apr 12 2017 13:53
you can use a url shortner next time
ibrahim laiq
@ibrahimlaiq10
Apr 12 2017 13:54
result = check is not a function
Bogdan
@oblanao
Apr 12 2017 13:54
Hello, I just updated the looks on my Weather App project. Check it out http://codepen.io/oblanao/full/JNjYbP/ Any feedback welcome!
Robert Collins
@robbiemu
Apr 12 2017 13:57
@oblanao thats good :) is the background gradient proceedural or static?
Bogdan
@oblanao
Apr 12 2017 13:57
I'm not sure what those terms mean, sorry. This is my code
background: linear-gradient(to right,#002156, #0d7da5);
Sorin Ruse
@sorinr
Apr 12 2017 13:58
@oblanao :+1:
Muhammad Hasham
@MohammadHasham
Apr 12 2017 13:59
http://codepen.io/Mohammad_Hasham/pen/GmRKrK
Can anyone help to make the design part more better?
h1tag
@h1tag
Apr 12 2017 13:59
@robbiemu hey, I didn't understand how lines 16 and 17 here don't execute sequentially
Robert Collins
@robbiemu
Apr 12 2017 13:59
@ibrahimlaiq10 close. you need to return check[value] (no dot) ..and .. result is not necessary. finally, there's a typo
Roxroy
@roxroy
Apr 12 2017 13:59
@oblanao, nice clean layout. Got correct location and temperate. I don;t have a issue with the gradient.
Bogdan
@oblanao
Apr 12 2017 13:59
@roxroy thanks
CamperBot
@camperbot
Apr 12 2017 13:59
oblanao sends brownie points to @roxroy :sparkles: :thumbsup: :sparkles:
:cookie: 638 | @roxroy |http://www.freecodecamp.com/roxroy
Bogdan
@oblanao
Apr 12 2017 14:00
@sorinr thanks
CamperBot
@camperbot
Apr 12 2017 14:00
oblanao sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1247 | @sorinr |http://www.freecodecamp.com/sorinr
Bogdan
@oblanao
Apr 12 2017 14:00
@robbiemu thanks
Robert Collins
@robbiemu
Apr 12 2017 14:00
@oblanao I was just going to suggest you could dark/lighten it depending on the weather (and possibly local time of day))
Sorin Ruse
@sorinr
Apr 12 2017 14:00
@oblanao cp
Bogdan
@oblanao
Apr 12 2017 14:00
that's a good idea, @robbiemu . Thanks all for the feedback !
CamperBot
@camperbot
Apr 12 2017 14:00
oblanao sends brownie points to @robbiemu :sparkles: :thumbsup: :sparkles:
:cookie: 341 | @robbiemu |http://www.freecodecamp.com/robbiemu
Robert Collins
@robbiemu
Apr 12 2017 14:00
@fortMaximus hey, I remmeber wriitng that! :)
@fortMaximus they do execute sequentially, they are in the same function
Muhammad Hasham
@MohammadHasham
Apr 12 2017 14:01
@sorinr can you help me out?
Robert Collins
@robbiemu
Apr 12 2017 14:01
btw, looking for random praise for my Conway Game Of Life simulation.. its fast!
http://codepen.io/robertotomas/pen/jmNvpb
h1tag
@h1tag
Apr 12 2017 14:02
@robbiemu yea, you gave it me earlier. But why you clearInterval for the first one after starting the second one?
Robert Collins
@robbiemu
Apr 12 2017 14:03
@fortMaximus because.. the first one is done. it's time to stop doing that and start the second :)
kinda like a pomodoro clock, ne?
Roxroy
@roxroy
Apr 12 2017 14:03
@MohammadHasham, I know that you are still working on the layout. But I am not drawn to it. Perhaps look a different concept and color scheme. Google for youtube template to get some ideas. Ping me to take another look when updated.
h1tag
@h1tag
Apr 12 2017 14:03
yes, for the pomodoro
ibrahim laiq
@ibrahimlaiq10
Apr 12 2017 14:04
@robbiemu thanks it works now
CamperBot
@camperbot
Apr 12 2017 14:04
ibrahimlaiq10 sends brownie points to @robbiemu :sparkles: :thumbsup: :sparkles:
:cookie: 342 | @robbiemu |http://www.freecodecamp.com/robbiemu
h1tag
@h1tag
Apr 12 2017 14:04
why not clear it before starting the second one? @robbiemu
thinkC
@thinkC
Apr 12 2017 14:04
hello All...pls I'm getting error with this..
var weather = "http://api.wunderground.com/api/”+ 0a881e1a3e9ec2c4 +”/forecast/geolookup/conditions/q/" + Geo.lat + "," + Geo.lng + ".json
Robert Collins
@robbiemu
Apr 12 2017 14:04
@fortMaximus it doesn't matter.. the interval is 100ms, and the time between one line of execution to the next is measured in nanoseconds
Muhammad Hasham
@MohammadHasham
Apr 12 2017 14:04
@roxroy okay i'll check that
thinkC
@thinkC
Apr 12 2017 14:05
nore sure what is wrong
h1tag
@h1tag
Apr 12 2017 14:05
@robbiemu I see. Thank you taking the time again
CamperBot
@camperbot
Apr 12 2017 14:05
fortmaximus sends brownie points to @robbiemu :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @robbiemu |http://www.freecodecamp.com/robbiemu
Robert Collins
@robbiemu
Apr 12 2017 14:05
glad to help :)
I'm getting reading to tackle the roguelike starting today: https://codepen.io/freeCodeCamp/full/PNJRyd
h1tag
@h1tag
Apr 12 2017 14:06
@sorinr also, thank you for taking the time
CamperBot
@camperbot
Apr 12 2017 14:06
fortmaximus sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1248 | @sorinr |http://www.freecodecamp.com/sorinr
thinkC
@thinkC
Apr 12 2017 14:06
says invalid or unexpected token
h1tag
@h1tag
Apr 12 2017 14:06
@robbiemu I thought you finished it
Muhammad Hasham
@MohammadHasham
Apr 12 2017 14:07
@roxroy check pm.
Robert Collins
@robbiemu
Apr 12 2017 14:07
@fortMaximus that was game of life
h1tag
@h1tag
Apr 12 2017 14:07
they're different!
Tabogo
@Tabogo
Apr 12 2017 14:07
hello guys I am trying to set the background image on the page I am building using css on codepen can someone see what is wrong with this code which is not working
Robert Collins
@robbiemu
Apr 12 2017 14:07
@fortMaximus very. GOL is a cel-automata simulation
Tabogo
@Tabogo
Apr 12 2017 14:07
image.png
Robert Collins
@robbiemu
Apr 12 2017 14:07
roguelike is an interactive game
Tabogo
@Tabogo
Apr 12 2017 14:08
image.png
Sorin Ruse
@sorinr
Apr 12 2017 14:08
@robbiemu @fortMaximus the idea is u r using only one selector to display the counter. by the the you call the clear interval for first the second its sstarted running.try switching lines 16 and 17. you'l get different result
h1tag
@h1tag
Apr 12 2017 14:09
@sorinr I got the same result
Robert Collins
@robbiemu
Apr 12 2017 14:10
@sorinr umm, thats not correct
Muhammad Hasham
@MohammadHasham
Apr 12 2017 14:10
@sorinr can you look my pen as well?
Robert Collins
@robbiemu
Apr 12 2017 14:10
see my response above to fort.. you'll see the scale of timing is different
Sorin Ruse
@sorinr
Apr 12 2017 14:14
@robbiemu witch counter is displayed and when? both first and second use counter = document.querySelector('.counter')
Robert Collins
@robbiemu
Apr 12 2017 14:15
counter is the display counter. it is the view, not the model. that comes from sofar
thinkC
@thinkC
Apr 12 2017 14:16
@thinkC
hello All...pls I'm getting error with this..
var weather = "http://api.wunderground.com/api/”+ 0a881e1a3e9ec2c4 +”/forecast/geolookup/conditions/q/" + Geo.lat + "," + Geo.lng + ".json
it says invalid or unexpected token
pls help
Javier
@Reykjabik
Apr 12 2017 14:17
any idea why a $.getJSON wouldn't run?
Vivekanand Padala
@VivekanandPadala
Apr 12 2017 14:17
Jumbotron class is not showing up in code pen. Any ideas?
h1tag
@h1tag
Apr 12 2017 14:18
@Reykjabik could be more than one reason
@VivekanandPadala did u add Bootstrap from the css settings?
thinkC
@thinkC
Apr 12 2017 14:18
@VivekanandPadala have u imported bootstrap ?
Vivekanand Padala
@VivekanandPadala
Apr 12 2017 14:18
@thinkC ya imported
Javier
@Reykjabik
Apr 12 2017 14:18
@fortMaximus it's weird because yesterday it worked perfectly. now I open codepen and it doesn't
h1tag
@h1tag
Apr 12 2017 14:18
@Reykjabik for the weather app?
Vivekanand Padala
@VivekanandPadala
Apr 12 2017 14:18
Javier
@Reykjabik
Apr 12 2017 14:19
@fortMaximus yup
i was actually here yesterday looking for some help, and it worked. but suddenly I open codepen and it doesn't now
h1tag
@h1tag
Apr 12 2017 14:20
did you edit anything?
if not, maybe it's a temporary issue
Vivekanand Padala
@VivekanandPadala
Apr 12 2017 14:21
@thinkC have you checked it?
Javier
@Reykjabik
Apr 12 2017 14:21
no, I didn't, that's the funny thing
thinkC
@thinkC
Apr 12 2017 14:22
@VivekanandPadala yes..looks ok to me
Vivekanand Padala
@VivekanandPadala
Apr 12 2017 14:22
@thinkC i think its a temporary issue of code pen??
Javier
@Reykjabik
Apr 12 2017 14:22
yesterday I didn't really get to understand how it ended up working. they were explaining to me something about callback. I added some code; didn't work. I removed it, and worked...
thinkC
@thinkC
Apr 12 2017 14:23
@VivekanandPadala try it on ur editor and see
if it works then it's codepen issue
Vivekanand Padala
@VivekanandPadala
Apr 12 2017 14:23
@thinkC its working on notepad++
thinkC
@thinkC
Apr 12 2017 14:24
ok then
Vivekanand Padala
@VivekanandPadala
Apr 12 2017 14:24
@thinkC ok thank you so much!
CamperBot
@camperbot
Apr 12 2017 14:24
vivekanandpadala sends brownie points to @thinkc :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @thinkc |http://www.freecodecamp.com/thinkc
thinkC
@thinkC
Apr 12 2017 14:24
np
Javier
@Reykjabik
Apr 12 2017 14:26
any ideas then why the getJSON wouldn't work? https://codepen.io/reykjabik/pen/MpdpNP
Alvin Odhiambo
@Alvin2410
Apr 12 2017 14:26
guys help,my buttons in html are not displaying for my local weather as it should,check out my code
heres my code
thinkC
@thinkC
Apr 12 2017 14:28
@Alvin2410 type a text in between your li
@Alvin2410 you can also type btn-primary so that u see the button
Alvin Odhiambo
@Alvin2410
Apr 12 2017 14:31
@thinkC its suppose to show automatically the city,temp and weather
thinkC
@thinkC
Apr 12 2017 14:32
sure...when u console log the api ...do u see any result ?
Alvin Odhiambo
@Alvin2410
Apr 12 2017 14:38
@thinkC i only see the result of console.log(api) after putting this in my html code: <p id="data"></p>
Neil
@NNeil1
Apr 12 2017 14:40
any help with making my P tags appear in same position when hover? - http://codepen.io/RPIE3/pen/XRrodd?editors=0100
help guys
Sorin Ruse
@sorinr
Apr 12 2017 14:47
@Alvin2410 openweather does not work on http on the free plan. geolocation insstead needs https. change location by ip or change weather api to one that supports https
Jan Peters
@JanPeters
Apr 12 2017 14:47
Hey guys, what do you think so far. I still have to sort out the thumbnails of the My Projects section tho
And add some scroll effects..
Any tips or remarks?
Anjali
@purplefries
Apr 12 2017 14:49
Hi guys, I am stuck in the portfolio creation challenge.. Not able to add the navigation bar at all.. :(
Ken Haduch
@khaduch
Apr 12 2017 14:50
@anjalimen1 - if you are using bootstrap (?) you should just copy the template from their site - make sure you have the correct version to correspond with the Bootstrap version that you are loading. Then modify it as you need for your page's requirements.
Roxroy
@roxroy
Apr 12 2017 14:50
@JanPeters The contact section is nicely centerd, but the about me and my projects, seems a bit off centered or the padding needs to be adjusted. Other than that its all good.
Anjali
@purplefries
Apr 12 2017 14:51
@khaduch Thanks so much.. I'll try that out . It didnt cross my mind at all.
CamperBot
@camperbot
Apr 12 2017 14:51
anjalimen1 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2725 | @khaduch |http://www.freecodecamp.com/khaduch
Robert Collins
@robbiemu
Apr 12 2017 14:52
@NMC96 try adding a common class to each of them, and a showing class to just the actively showing one. div.has-p-text:not(.showing) { display: none }
Sorin Ruse
@sorinr
Apr 12 2017 14:52
@khaduch hi Ken. how u doing?
Ken Haduch
@khaduch
Apr 12 2017 14:54
@JanPeters - looks pretty good, the centering aside as @roxroy mentioned. I notice that you have a typo in your container-fluid class for the navbar.
@sorinr - hey Sorin - doing okay, thanks for asking... how about you?
CamperBot
@camperbot
Apr 12 2017 14:54
khaduch sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1249 | @sorinr |http://www.freecodecamp.com/sorinr
Jan Peters
@JanPeters
Apr 12 2017 14:55
Yeah, I am still working on the My projects section, thanks @khaduch @roxroy
CamperBot
@camperbot
Apr 12 2017 14:55
janpeters sends brownie points to @khaduch and @roxroy :sparkles: :thumbsup: :sparkles:
:cookie: 639 | @roxroy |http://www.freecodecamp.com/roxroy
:star2: 2727 | @khaduch |http://www.freecodecamp.com/khaduch
Javier
@Reykjabik
Apr 12 2017 14:55
getJSON still doesn't work :/ https://codepen.io/reykjabik/pen/MpdpNP
Jan Peters
@JanPeters
Apr 12 2017 14:56
Thanks on that typo @khaduch
CamperBot
@camperbot
Apr 12 2017 14:56
janpeters sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: janpeters already gave khaduch points
Javier
@Reykjabik
Apr 12 2017 14:56
I've chenged OpenWeather for DarkSky API
and still doesn't work
Ken Haduch
@khaduch
Apr 12 2017 14:57
@JanPeters :+1:
Jan Peters
@JanPeters
Apr 12 2017 14:57
Oh, does anyone know how I can change the text color inside my navbar?
I've been looking like crazy but I can't get it to work
Sorin Ruse
@sorinr
Apr 12 2017 14:58
@khaduch not too bad. been bizzi with some projects and haven't been around for awhile
h1tag
@h1tag
Apr 12 2017 15:00
@khaduch Hey
@sorinr do you work in web dev?
Gulsvi
@gulsvi
Apr 12 2017 15:00
@Reykjabik Dark Sky requires you to use JSONP, add ?callback=? to the end of your API URL
h1tag
@h1tag
Apr 12 2017 15:01
@SkyCoder01 hey
Gulsvi
@gulsvi
Apr 12 2017 15:01
Hello, by the way :wave:
Ken Haduch
@khaduch
Apr 12 2017 15:01
@JanPeters - the text color can be changed by using a similar selection string to what causes the Bootstrap class to be applied, and just adding it to your CSS panel. You can use the devtools to find it.
Gulsvi
@gulsvi
Apr 12 2017 15:01
:coffee: TIme
Jan Peters
@JanPeters
Apr 12 2017 15:01
Huh? I'll try
Ken Haduch
@khaduch
Apr 12 2017 15:02

@JanPeters - it will be something like this:

.navbar-default .navbar-nav > li > a {
    color: #777;
}

sometimes a shorter selection string will work.

Javier
@Reykjabik
Apr 12 2017 15:03
@SkyCoder01 thousand thanks!!!
CamperBot
@camperbot
Apr 12 2017 15:03
reykjabik sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1008 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Sorin Ruse
@sorinr
Apr 12 2017 15:03
@fortMaximus not quite. i'm developing some financial modules for a company that still uses foxpro. i bet u don't even know what foxpro was :)
Gulsvi
@gulsvi
Apr 12 2017 15:03
image.png
Javier
@Reykjabik
Apr 12 2017 15:03
@SkyCoder01 I've been struggling with this for two days! =D
Gulsvi
@gulsvi
Apr 12 2017 15:03
@JanPeters Right-click to inspect the navbar, you'll see something similar to that image
Ken Haduch
@khaduch
Apr 12 2017 15:03
@fortMaximus - howdy!
Gulsvi
@gulsvi
Apr 12 2017 15:04
@Reykjabik Welcome to API Calls :)
It took me 2-1/2 days glad to save you some time :p
Javier
@Reykjabik
Apr 12 2017 15:05
jesus christ, such a pain it is, haha
h1tag
@h1tag
Apr 12 2017 15:07
@sorinr yea, that's my game (foxpro) :p ... why you don't work in web dev (you're quite talented)?
Jan Peters
@JanPeters
Apr 12 2017 15:08
Oh thanks guys. Is the "highlighted" code also there?
Got it, thanks
Sorin Ruse
@sorinr
Apr 12 2017 15:13
@fortMaximus as the base profession, i'm into the accounting. web dev and programming its more a hobby
Neil
@NNeil1
Apr 12 2017 15:13
@robbiemu that isn't going to solve my positioning problem
h1tag
@h1tag
Apr 12 2017 15:14
@sorinr but you can switch if you wanted to, right?
Sorin Ruse
@sorinr
Apr 12 2017 15:18
@fortMaximus not that ease. software companies usually looks for younger people. i'm 52
h1tag
@h1tag
Apr 12 2017 15:19
I see
Robert Collins
@robbiemu
Apr 12 2017 15:22
h1tag
@h1tag
Apr 12 2017 15:23
@sorinr You can try working as a freelancer
Sorin Ruse
@sorinr
Apr 12 2017 15:23
@fortMaximus yep. they will probably want to hire you even at 52 but on a senior position. they expect you to already have enough experience by that time
Gulsvi
@gulsvi
Apr 12 2017 15:23
Or sue the hell out of anyone who discriminates you based on age. You're in a protected class.
Robert Collins
@robbiemu
Apr 12 2017 15:23
let me know when I can delete that so it won't pollute my pens page :)
h1tag
@h1tag
Apr 12 2017 15:24
@SkyCoder01 :+1:
Sorin Ruse
@sorinr
Apr 12 2017 15:24
@fortMaximus i already have a job in the accounting
Alvin Odhiambo
@Alvin2410
Apr 12 2017 15:24
@sorinr how do i change weather api that suports https?
Neil
@NNeil1
Apr 12 2017 15:24
@robbiemu wow so simply having display: none; solved that?
h1tag
@h1tag
Apr 12 2017 15:25
@Alvin2410 use darksky API
Robert Collins
@robbiemu
Apr 12 2017 15:25
@NMC96 you already did the work... I just basically switched from visibility to display :)
Sorin Ruse
@sorinr
Apr 12 2017 15:26
@Alvin2410 if you choosed an https free available weather api just load your pen using https not http :)
Alvin Odhiambo
@Alvin2410
Apr 12 2017 15:40
@fortMaximus darksky API is not bearing any fruit
Moisés Man
@moigithub
Apr 12 2017 15:44
@Alvin2410 open ur devtools.. check on console
u need to do JSONP request to bypass xorigin
Jorge
@OrangeKulture
Apr 12 2017 15:54
hey guys
Robert Collins
@robbiemu
Apr 12 2017 16:03
anyone know how to get a CDN of an npm module?
found it :) unpkg
Peter Kay
@deuscode
Apr 12 2017 16:15
Hey friends, check out my completed random quote generator project, what do you guys think? http://kaypeter.com/rqg/
Jorge
@OrangeKulture
Apr 12 2017 16:27
@deuscode looks really good! great work
khorram bin salim khondkar
@khorramk
Apr 12 2017 16:38
hi everybody!
khorram bin salim khondkar
@khorramk
Apr 12 2017 16:44
how do you make a portfolio?
what is portfolio?
h1tag
@h1tag
Apr 12 2017 16:49
@khorramk google: what is a personal portfolio
Ken Haduch
@khaduch
Apr 12 2017 16:54
@deuscode - the quote generator looks nice, although I found some of the button animations to be a little unintuitive. The shaking of the "Get Quote" button almost makes it look like the click was refused. Not sure what you did for responsive behavior, but one thing that I see is that if you narrow the window, the "Get Quote" and "Share Quote" buttons stack up right on top of each other. Not bad, but doesn't look as nice as if it had some margin between them? All in all a nice project - well done!
Sorin Ruse
@sorinr
Apr 12 2017 16:57
@khorramk its like a CV only designed for web. a presentation page of yourself. thats it
Nene M
@ZetaRuby
Apr 12 2017 16:59
Is this where I can ask questions about the tribute page project?
Mohamed Derhalli
@derhallim
Apr 12 2017 16:59
yea
Nene M
@ZetaRuby
Apr 12 2017 17:00
It's not that I am having trouble with code, I just don't know how to design my page or what to put in it so I can code it. Can I find examples here?
Mohamed Derhalli
@derhallim
Apr 12 2017 17:01
u know how to use bootstrap?
Nene M
@ZetaRuby
Apr 12 2017 17:02
not too well
Mohamed Derhalli
@derhallim
Apr 12 2017 17:03
u should learn it well first
;)
watch youtube tutorial about it
u need it to build the tribute page
Sorin Ruse
@sorinr
Apr 12 2017 17:03
@deuscode yes as @khaduch told u about the shaking effect on getquote btn, i had the same feeling that something went wrong. usually shaking in UX is associated with an error, just to catch your attention that something went wrong in that part of page
Nene M
@ZetaRuby
Apr 12 2017 17:06
I will! I went through the lessons on fcc once. But I need an idea of what kind of content I am putting in my page. I can't learn bootstrap then not know what to do with that knowledge.
I just want to see example pages, not the code
I hope I am making sense
h1tag
@h1tag
Apr 12 2017 17:07
@ZetaRuby the example on the project instructions page wasn't enough?
Peter Kay
@deuscode
Apr 12 2017 17:09
@khaduch @sorinr thanks for the response! Good to hear some feedback on this and a third-party opinion. I will look into adding the responsive meta data on there. I knew i was forgetting something!
CamperBot
@camperbot
Apr 12 2017 17:09
deuscode sends brownie points to @khaduch and @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1250 | @sorinr |http://www.freecodecamp.com/sorinr
:star2: 2728 | @khaduch |http://www.freecodecamp.com/khaduch
Nene M
@ZetaRuby
Apr 12 2017 17:09
Am I supposed to copy it exactly? This was the example: https://codepen.io/freeCodeCamp/full/NNvBQW
Gulsvi
@gulsvi
Apr 12 2017 17:09
@ZetaRuby There are lots of examples on Codepen - Here's a link to look at them, sorted by popularity: http://codepen.io/search/pens/?q=Tribute+Page&limit=all&type=type-pens
You can design it however you like - but maybe seeing other examples will give some inspiration to see how others have done it
h1tag
@h1tag
Apr 12 2017 17:10
@ZetaRuby no, you're not supposed to. Just use it as an inspiration or a template
Sorin Ruse
@sorinr
Apr 12 2017 17:11
@ZetaRuby nope. its just an example. you can choose whatever subject you want and you are free to design it as u want
Nene M
@ZetaRuby
Apr 12 2017 17:11
@fortMaximus It wasn't enough to inspire me, that was my issue.
h1tag
@h1tag
Apr 12 2017 17:11
haha
check Sky's list
Nene M
@ZetaRuby
Apr 12 2017 17:11
@SkyCoder01 Thanks for the list, its exactly what I was looking for
CamperBot
@camperbot
Apr 12 2017 17:11
zetaruby sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1009 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 12 2017 17:13
Have fun with it :)
h1tag
@h1tag
Apr 12 2017 17:13
@SkyCoder01 congrats on the 1000
1k*
Gulsvi
@gulsvi
Apr 12 2017 17:13
Thanks @fortMaximus :star2:
CamperBot
@camperbot
Apr 12 2017 17:13
skycoder01 sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 720 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
Gulsvi
@gulsvi
Apr 12 2017 17:14
No more cookies now
h1tag
@h1tag
Apr 12 2017 17:15
I don't know how :cookie: turn into :star2: though
@SkyCoder01 Thank you!
CamperBot
@camperbot
Apr 12 2017 17:15
fortmaximus sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1010 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Sorin Ruse
@sorinr
Apr 12 2017 17:16
@SkyCoder01 yep @fortMaximus will get diabetic from too much cookies :)
Gulsvi
@gulsvi
Apr 12 2017 17:16
I remember it was one of the first questions I asked when I joined... something to manish about why he got stars when everyone else got cookies :)
h1tag
@h1tag
Apr 12 2017 17:16
:cry:
:cake:
@SkyCoder01 Back then, I though that the cookies number was just a random number, a reference or something
Gulsvi
@gulsvi
Apr 12 2017 17:22
lol, I found my comment: :point_up: January 30, 2017 5:59 AM
h1tag
@h1tag
Apr 12 2017 17:22
I was shy to ask about it :worried:
Gulsvi
@gulsvi
Apr 12 2017 17:22
It was diomed...lol, thought it was manish
Love the time machine
Kiera
@kieraclarke
Apr 12 2017 17:24
What must i do if my HTML element is appearing under my navigation bar?
h1tag
@h1tag
Apr 12 2017 17:24
@SkyCoder01 I didn't know you started back in Jan, you're fast
Gulsvi
@gulsvi
Apr 12 2017 17:24
@kieraclarke If it's a fixed navbar, you have to add padding to your element
@fortMaximus I've studied maybe 20-30hrs a week and gone to a weekly javascript meetup. Kind of a bootcamp I guess :)
Kiera
@kieraclarke
Apr 12 2017 17:25
@SkyCoder01 okay thank you
CamperBot
@camperbot
Apr 12 2017 17:25
kieraclarke sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1011 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 12 2017 17:26
@kieraclarke You could also use JavaScript to adjust the offset - they talk about the bootstrap navbar covering up content here and give some options: twbs/bootstrap#1768
Jorge
@OrangeKulture
Apr 12 2017 17:26
what comes after the star tho?
Gulsvi
@gulsvi
Apr 12 2017 17:26
I still suck at algorithms though :/ maybe not built for coding
I think that's it @OrangeKulture
h1tag
@h1tag
Apr 12 2017 17:27
there's a blackhole
Jorge
@OrangeKulture
Apr 12 2017 17:27
you doing intermediate or advanced? @SkyCoder01 maybe we could partner up sometime .. im doing intermediate
@SkyCoder01 well maybe ill have to catch up if youre on advanced
Gulsvi
@gulsvi
Apr 12 2017 17:28
I'm on the advanced ones right now - exact change
Kiera
@kieraclarke
Apr 12 2017 17:28
And why would my text not be centring <h1 class="text-centre">This Word</h1>
Gulsvi
@gulsvi
Apr 12 2017 17:28
@kieraclarke because bootstrap is american english :( they use text-center
h1tag
@h1tag
Apr 12 2017 17:28
typo detected :warning:
Gulsvi
@gulsvi
Apr 12 2017 17:29
must be a real pain for the commonwealth :) colour/color centre/center
Jorge
@OrangeKulture
Apr 12 2017 17:29
we should demand from gitter that they come up with something after the star
Nick Danvers
@Ravenor222
Apr 12 2017 17:29
Same for canadians =P
Kiera
@kieraclarke
Apr 12 2017 17:29
@SkyCoder01 i retyped it with center and it is still not working
Gulsvi
@gulsvi
Apr 12 2017 17:30
@kieraclarke Maybe your resources aren't set up correctly? I'd have to see your codepen
Canada is in the commonwealth :)
Jorge
@OrangeKulture
Apr 12 2017 17:31
that's for the thanks module only, right? maybe we can come up with some kick ass algorithms for camper bot
Gulsvi
@gulsvi
Apr 12 2017 17:31
@kieraclarke You have to add Bootstrap to your project
Kiera
@kieraclarke
Apr 12 2017 17:32
@SkyCoder01 thank you so much :-)
CamperBot
@camperbot
Apr 12 2017 17:32
kieraclarke sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: kieraclarke already gave skycoder01 points
Jorge
@OrangeKulture
Apr 12 2017 17:32
have him announce sport events outcomes, change brownie for cookie :D stuff like that
...predict the future :smile: :smile:
Gulsvi
@gulsvi
Apr 12 2017 17:33
@kieraclarke Remove your h1 CSS settings from your CSS and add this to body:
body {
  margin-top: 70px;
}
Then change "Beginner" to "Advanced Beginner" :)
Nick Danvers
@Ravenor222
Apr 12 2017 17:33
Hey sky! I have a question for you! I've been looking at your codepen for the portfolio, im still working on icons/buttons to use to link to social media, however at some point lost your page, any chance you could link it to me again?
Kiera
@kieraclarke
Apr 12 2017 17:33
@SkyCoder01 thank you
CamperBot
@camperbot
Apr 12 2017 17:33
:warning: kieraclarke already gave skycoder01 points
kieraclarke sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
Gulsvi
@gulsvi
Apr 12 2017 17:33
@Ravenor222 Sure, it's here: http://s.codepen.io/skycoder/pen/jBagwR
@OrangeKulture It seems cbot had lots of other features in the past, we need to improve it I agree!
h1tag
@h1tag
Apr 12 2017 17:34
rollem
:cry:
Nick Danvers
@Ravenor222
Apr 12 2017 17:34
Thanks, i've been fiddling around, I'd like to see how youre able to make the buttons show their background when hovered upon
Gulsvi
@gulsvi
Apr 12 2017 17:35
@Ravenor222 That's this CSS:
.social a:hover {
  background-color: rgba(52,131,181,0.3);
}
Jorge
@OrangeKulture
Apr 12 2017 17:36
yeah, it would be really something .. i guess a lot of ppl code AI in python nowadays, C++ too .. id never played around with stuff like that in JS .. looks fun for sure
Gulsvi
@gulsvi
Apr 12 2017 17:36
I think node.js has some AI solutions too, at least it can be done in JS I think
Nick Danvers
@Ravenor222
Apr 12 2017 17:37
Okay, so the .social is your row class, and for a:hover does that indicate that it will appear on hovering over it?
Jorge
@OrangeKulture
Apr 12 2017 17:38
yeah, we need to improve cbot .. later, we could come up with another bot and have them both in here until they go crazy and decide to battle it out to death haha
Gulsvi
@gulsvi
Apr 12 2017 17:39
@Ravenor222 Yes, that's correct
Nick Danvers
@Ravenor222
Apr 12 2017 17:39
@SkyCoder01 Thanks again sky, I'm having a hard time with this stuff >.<
Gulsvi
@gulsvi
Apr 12 2017 17:40
If you need some help, just ask - :hover can be really useful
The animations though are all done with JavaScript - that took me a couple of hours to figure out
Nick Danvers
@Ravenor222
Apr 12 2017 17:40
Okay, thank you =) I've started on free code camp so to this point i have not seen a lick of javascript, I guess ill figure it out very soon to be able to use it >.<
also one more, when you write .social a, is the a referring to only the anchor links?
h1tag
@h1tag
Apr 12 2017 17:41
@SkyCoder01 know this one
allyourbase
CamperBot
@camperbot
Apr 12 2017 17:41
all your base
Gulsvi
@gulsvi
Apr 12 2017 17:42
Yes, it refers to all the <a> elements inside elements with the class "social" @Ravenor222
Nick Danvers
@Ravenor222
Apr 12 2017 17:42
ah okay thank you =)_
Gulsvi
@gulsvi
Apr 12 2017 17:42
what you say @fortMaximus ?
:p
h1tag
@h1tag
Apr 12 2017 17:42
?
Gulsvi
@gulsvi
Apr 12 2017 17:42
#ancientmemes
drowningpool5
@drowningpool5
Apr 12 2017 17:42
hi guys, any clues on how to start building tic tac toe game?
Gulsvi
@gulsvi
Apr 12 2017 17:43
@fortMaximus 20 seconds in: https://www.youtube.com/watch?v=8fvTxv46ano
h1tag
@h1tag
Apr 12 2017 17:44
HA HA HA HA...
Jorge
@OrangeKulture
Apr 12 2017 17:44
waahaha
Gulsvi
@gulsvi
Apr 12 2017 17:46
cbot knows their memes
CamperBot
@camperbot
Apr 12 2017 17:46
you called?
Nick Danvers
@Ravenor222
Apr 12 2017 17:47
lol what is that!
was that a real video? lol so surreal
Gulsvi
@gulsvi
Apr 12 2017 17:47
allyourbase
CamperBot
@camperbot
Apr 12 2017 17:47
all your base
Jorge
@OrangeKulture
Apr 12 2017 17:47
niceee
h1tag
@h1tag
Apr 12 2017 17:47
eightball was that a real video
CamperBot
@camperbot
Apr 12 2017 17:47
@fortMaximus :8ball: my reply is no :sparkles:
Jorge
@OrangeKulture
Apr 12 2017 17:48
what else has he got in store for us? the entertain campers should be a robust, well layed out method
:smile: :smile:
Gulsvi
@gulsvi
Apr 12 2017 17:48
Time to dig for some more :)
holler
CamperBot
@camperbot
Apr 12 2017 17:51
holler back!
drowningpool5
@drowningpool5
Apr 12 2017 17:51
How long have you guys been learning to programme? just out of curiousity
h1tag
@h1tag
Apr 12 2017 17:51
that's it + find , the others are boring
h1tag @fortMaximus not much
Gulsvi
@gulsvi
Apr 12 2017 17:52
@drowningpool5 I started in January, sorry I didn't respond to your Tic Tac Toe question earlier, but I haven't started it yet. I have some ideas though about how I would make it
Chuck Hoffman
@rhoffman219
Apr 12 2017 17:53
I need help getting my image to pull through. IT is DRIVING ME NUTS!!!
Gulsvi
@gulsvi
Apr 12 2017 17:53
@rhoffman219 What's the code?
drowningpool5
@drowningpool5
Apr 12 2017 17:54
no problem man :) i got some aswell
@SkyCoder01
Chuck Hoffman
@rhoffman219
Apr 12 2017 17:54
How do i get the photo to pull through using Bootstrap? i have searched google and used sample code but i don't understand why my photo is not pulling through
Nick Danvers
@Ravenor222
Apr 12 2017 17:54
do you mean the broken image symbol?
drowningpool5
@drowningpool5
Apr 12 2017 17:54
@SkyCoder01 3 months of learning? nice
@SkyCoder01 4*
Gulsvi
@gulsvi
Apr 12 2017 17:55
Yeah, complete noob with JavaScript, but getting good at front end at least
Nick Danvers
@Ravenor222
Apr 12 2017 17:55
@rhoffman219 if you're using something like codepen and trying to use a picture from google or somewhere I believe it wont work
Chuck Hoffman
@rhoffman219
Apr 12 2017 17:55
<div class="thumbnail"><img src="https://www.facebook.com/photo.php?fbid=10154069707546728&set=t.715291727&type=3&theater" class="rounded">
drowningpool5
@drowningpool5
Apr 12 2017 17:55
@SkyCoder01 me 2 xD i will need to learn ES6 asap and ES7 lol
Chuck Hoffman
@rhoffman219
Apr 12 2017 17:55
im trying to use a picture from facebook
Gulsvi
@gulsvi
Apr 12 2017 17:56
That picture may be privacy protected through facebook. You can upload it to a service like https://postimage.io
Nick Danvers
@Ravenor222
Apr 12 2017 17:56
@SkyCoder01 When did you get around to finishing the portfolio project if you started in january? Just wondering =P
Chuck Hoffman
@rhoffman219
Apr 12 2017 17:56
how else would i pull the picture in if its not on google or facebook? is there a way to map it from a saved file to fomr my computer?
Gulsvi
@gulsvi
Apr 12 2017 17:56
@Ravenor222 Still not done lol, maybe a couple weeks ago I made it like it is today, but I still change colors around a lot
@rhoffman219 https://postimage.io/
Any chance someone could let me know why the :hover is covering half?
Gulsvi
@gulsvi
Apr 12 2017 17:59
@Ravenor222 I don't see any :hover in your CSS
sry i guess i need to save it first
hehe
Gulsvi
@gulsvi
Apr 12 2017 18:00
Usually a <button> is for submitting data, by the way. That's why I used links <a>
nvm :)
Nick Danvers
@Ravenor222
Apr 12 2017 18:01
yea sorry, im testing many many things, so im just using a blank sheet
Gulsvi
@gulsvi
Apr 12 2017 18:01
I think it only covers half because of how font awesome works with their font sizing - but the way to fix it is to give your a elements a height and width
Nick Danvers
@Ravenor222
Apr 12 2017 18:02
Okay, and after that the hover will simply follow with that?
so just add .a {
Jakub Konik
@jakonn
Apr 12 2017 18:02
Hello everyone :)
Gulsvi
@gulsvi
Apr 12 2017 18:03
@Ravenor222 Just change your current .social a to:
.social a {
  display: inline-block;
  color: inherit;
  height: 30px;
  width: 40px;
}
Hello @jakonn
(30px looks better, edited the code above)
Jakub Konik
@jakonn
Apr 12 2017 18:04
I have to say that finally thanks to you all i got first certificate ;)
Gulsvi
@gulsvi
Apr 12 2017 18:04
Congrats! :)
Jakub Konik
@jakonn
Apr 12 2017 18:04
Thank You all!!
Chuck Hoffman
@rhoffman219
Apr 12 2017 18:04
that worked. Thanks guys!
Nick Danvers
@Ravenor222
Apr 12 2017 18:04
Hey! Congrats buddy!
@SkyCoder01 Nice, thank you, hope i dont need to ask you another question so soon =P
CamperBot
@camperbot
Apr 12 2017 18:05
ravenor222 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1012 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Rostotski
@Rostotski
Apr 12 2017 18:06
Hey I'm new to this and just got to build a personal portfolio webpage, and am a bit intimated. I don't think I'm retaining as much as I should be, is there a good place to review what I've learned so far?
Gulsvi
@gulsvi
Apr 12 2017 18:06
@Ravenor222 not sure if that made sense :) but now you add padding and border-radius or other styling to the CSS to shape the background color
It sometimes helps to add border: 1px solid black; to see the shape/outline of the element as your are modifying its CSS
Nick Danvers
@Ravenor222
Apr 12 2017 18:07
Oh yea that helps a bit thanks
Gulsvi
@gulsvi
Apr 12 2017 18:08
@Rostotski You aren't alone, the portfolio is a big step up in difficulty. It's supposed to take 50 hours, or like two weeks if you spend 3+ hours a day on it. At this point, read the bootstrap documentation, take the sample code, play around with it, and get familiar with how it works. After some time doing that, you should have a better idea of how to put all the pieces together.
Jakub Konik
@jakonn
Apr 12 2017 18:09
@Rostotski first of all you can walk again through all erlier exercises. FCC won't give you 100% of knowlendge that you need.
Gulsvi
@gulsvi
Apr 12 2017 18:09
You can also go to your freecodecamp profile page and redo any of the challenges you've already done
Jakub Konik
@jakonn
Apr 12 2017 18:09
exactly :D
Nick Danvers
@Ravenor222
Apr 12 2017 18:09
@Rostotski Im in the exact same boat as you =) its a little rough of a drop off after the previous assignment
exactly what these guys are saying, the old challenges have little aspects of various things you can learn from
Jakub Konik
@jakonn
Apr 12 2017 18:10
It is normal that you get stuck, or next task is much much harder than previous one , especialy project which should take you more time than before ones :)
Rostotski
@Rostotski
Apr 12 2017 18:10
Thanks guys! @Ravenor222 it really is, I was boosting with confidence until i see the sample of this step
CamperBot
@camperbot
Apr 12 2017 18:10
rostotski sends brownie points to @ravenor222 :sparkles: :thumbsup: :sparkles:
:cookie: 118 | @ravenor222 |http://www.freecodecamp.com/ravenor222
Jakub Konik
@jakonn
Apr 12 2017 18:10
Can we promote here other courses?
Gulsvi
@gulsvi
Apr 12 2017 18:11
FCC is nonprofit I think, so I'm sure its fine
Jakub Konik
@jakonn
Apr 12 2017 18:11
That can help
xD
Gulsvi
@gulsvi
Apr 12 2017 18:11
Just no spamming :p
Jakub Konik
@jakonn
Apr 12 2017 18:12
xD I think good for newbie is https://classroom.udacity.com/loading this one
w8 a sec wrong link ...
Rostotski
@Rostotski
Apr 12 2017 18:14
checking it out! thanks @jakonn
CamperBot
@camperbot
Apr 12 2017 18:14
rostotski sends brownie points to @jakonn :sparkles: :thumbsup: :sparkles:
Jakub Konik
@jakonn
Apr 12 2017 18:14
this one
Sorry about previous ones
CamperBot
@camperbot
Apr 12 2017 18:14
:cookie: 302 | @jakonn |http://www.freecodecamp.com/jakonn
Jakub Konik
@jakonn
Apr 12 2017 18:14
It is okey to walk through it and get some basic info to create whole page. Anything other u can google out :D
It is good to first look for on your own and then ask somewhere
because most of questions you want to ask someone else might have asked before you ;)
Rostotski
@Rostotski
Apr 12 2017 18:17
sounds good, definitely will be googling a lot of things XD
Jakub Konik
@jakonn
Apr 12 2017 18:19
It is easier than you think :D. You need to ask simple question
:D
Rostotski
@Rostotski
Apr 12 2017 18:19
thanks man! I got this .. eventually haha
Jakub Konik
@jakonn
Apr 12 2017 18:21
Or ask a bit more specific question ;)
here
I have these icons, im trying to reproduce them in my codepen, however I'm not able to see them anywhere on the page, whether I copy paste, or re write it
dont mind the cage
Jakub Konik
@jakonn
Apr 12 2017 18:27
did you add additional link to head? @Ravenor222 ?
if want to use these
<a href="#"><i class='fa fa-github fa-fw fa-2x' aria-hidden="true"></i></a> <a href="#"><i class='fa fa-facebook fa-fw fa-2x' aria-hidden="true"></i></a> <a href="#"><i class='fa fa-linkedin-square fa-fw fa-2x' aria-hidden="true"></i></a> <a href="#"><i class='fa fa-free-code-camp fa-fw fa-2x'></i></a> </div>
Nick Danvers
@Ravenor222
Apr 12 2017 18:28
Yea ive got the link for FA in the settings of codepen
Jakub Konik
@jakonn
Apr 12 2017 18:28
in the settings?
Nick Danvers
@Ravenor222
Apr 12 2017 18:28
oh
Jakub Konik
@jakonn
Apr 12 2017 18:28
hmm okey
Nick Danvers
@Ravenor222
Apr 12 2017 18:28
that one is different
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
Jakub Konik
@jakonn
Apr 12 2017 18:28
yep
Nick Danvers
@Ravenor222
Apr 12 2017 18:29
aha lo and behold
thank you
@jakonn thanks
CamperBot
@camperbot
Apr 12 2017 18:29
ravenor222 sends brownie points to @jakonn :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @jakonn |http://www.freecodecamp.com/jakonn
Nick Danvers
@Ravenor222
Apr 12 2017 18:29
codepen has a space for /head incase you didnt know
in the settings wheel beside HTML
Jakub Konik
@jakonn
Apr 12 2017 18:29
I think 90% our problem is something really easy and stupid mistake :P @Ravenor222
yep i know
Nick Danvers
@Ravenor222
Apr 12 2017 18:29
Ohhh yea, atleast thats from my experience hehe
Chris
@bestintown23
Apr 12 2017 18:30
how can i make my nav options be in the center of the page? http://codepen.io/bestintown23/pen/gWORyo
Nick Danvers
@Ravenor222
Apr 12 2017 18:34
What do you mean?
jmariomejiap
@jmariomejiap
Apr 12 2017 18:36
hi guys. I have been stuck since last night on my weather project. It seems I have a problem "No 'Access-Control-Allow-Origin" . $.get() it is not working. can I please get a hand. thanks in advance. https://codepen.io/jmariomejia/pen/BRBoPP?editors=1011
Gulsvi
@gulsvi
Apr 12 2017 18:39
@jmariomejiap use $.getJSON and add ?callback=? to the end of your dark sky API URL
Will Foster
@Will5592
Apr 12 2017 18:39
Anyone able to tell me why when I try and run this in my codepen, I am getting the word undefined in the console (chrome) instead of the lat long values?
$(document).ready(function() {

  var lat;
  var long;

  function getWeather() {
    $.ajax({
      url:"http://ip-api.com/json",
      success: function(location) {
        lat = location.lat;
        long = location.lon;
        console.log(lat);
        console.log(long);
      }
    });





    $.ajax({
      url:"http://api.openweathermap.org/data/2.5/weather?lat="+lat+"&lon="+long+"&appid=e91b75d6711253d5f3135cb9347defdc",
      success: function(response) {
        console.log(response);
        console.log(lat);
        console.log(long);
      }
    });
  }
  getWeather();
});
jmariomejiap
@jmariomejiap
Apr 12 2017 18:40
@SkyCoder01 allright. Ill get to it right away. Ill let you you in a bit.
Will Foster
@Will5592
Apr 12 2017 18:40
In the second ajax call that is
Gulsvi
@gulsvi
Apr 12 2017 18:41
@Will5592 both of those ajax calls run at the same time, so lat and lon are not defined yet when the second ajax call tries to use those variables in the URL
put the second ajax call inside the success function of the first
Will Foster
@Will5592
Apr 12 2017 18:41
@SkyCoder01 Oh really!
Adam Simonini
@adamsimonini
Apr 12 2017 18:41

can someone take a peak at this and tell me why my channels load differently each time I press refresh? Is it that the JSON requests are loading asyncronysly?

http://codepen.io/AJSIM/pen/KWLbGy

not having them load in the same order each time makes it tricky for me to add classes to them later on in my code

Will Foster
@Will5592
Apr 12 2017 18:42
@SkyCoder01 Haha thanks dude, that makes sense. Also, if I were to put them in their own functions, then write in the code
run func1
run func2
in that order, would it work correctly?
CamperBot
@camperbot
Apr 12 2017 18:42
will5592 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1013 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Apr 12 2017 18:43
@Will5592 You would have to put run func2 inside the success function of the firs ajax call, still. Basically, you need to wait for the lat/lon to come back from that API before you can call the weather API.
The weather project is the first introduction to asynchronous code in JavaScript - it's where the fun really begins :p
Will Foster
@Will5592
Apr 12 2017 18:44
@SkyCoder01 Right, but is there no way to make them separate functions, and just have one run first?
and yeah, it's been... interesting... haha. I thought we started doing Asynchronous code in The Quote machine though?
Gulsvi
@gulsvi
Apr 12 2017 18:45
@Will5592 By calling the second function inside of the first, that is what you're doing. the First function runs first, then gets the location data. That's when it runs the success portion of the ajax call - and when you call the second function.
And yes, the quote machine, if you use an API, it is also asynchronous, but only one API involved. With Weather, there are two APIs
Will Foster
@Will5592
Apr 12 2017 18:46
@SkyCoder01 Yes that makes sense, but there is no way to keep the ajax calls in separate functions? My thinking is the code will be much easier to read/manage that way?
Gulsvi
@gulsvi
Apr 12 2017 18:47
@collabitron Yes, they come back differently every time because that's the order the server gives them to you - it's all asynchronous
Will Foster
@Will5592
Apr 12 2017 18:47
Yeah I used an API for the quote machine, but yeah obvs just one
Darshan
@Dave1089
Apr 12 2017 18:47
what if you put in seperate function and call it in first ajax success
Rudy Hernandez
@rudolphh
Apr 12 2017 18:47
It blows up
Gulsvi
@gulsvi
Apr 12 2017 18:48
@Will5592 You can use something called a Promise Object, but I'm just learning those myself. They help make the code a little cleaner and manageable if you want to spend some time learning them.
jmariomejiap
@jmariomejiap
Apr 12 2017 18:48
@SkyCoder01 still not working........... :( can you please check the browser console?
Gulsvi
@gulsvi
Apr 12 2017 18:48
@jmariomejiap I don't see the callback at the end of your URL
Anthony
@jawaka72
Apr 12 2017 18:48
Does anyone know how to take the value from a variable inside of a function's local scope and put that value into a variable in the global scope?
Adam Simonini
@adamsimonini
Apr 12