Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
CamperBot
@camperbot
:star: 517 | @jondcoleman | http://www.freecodecamp.com/jondcoleman
Jonathan Coleman
@jondcoleman
be back in a bit
Sam Reeves
@smreeves
(Note, only regular operations, parentheses, the period, changing from + to - work right now).
Herman Fassett
@HermanFassett
Woah looks nice @sreeves89
Sam Reeves
@smreeves
Thanks @HermanFassett ! My goal was to use this project to show that I think I've got design figured out, (even if I have to use a "specification," i.e. the real TI-30XA calculator to follow), and to also show I can do some of the more advance stuff. In the end I probably wont' implement everything on there, but the goal is to get most of it running, then I'll remove what I won't end up implementing.
CamperBot
@camperbot
sreeves89 sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 1559 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Sam Reeves
@smreeves
So does anyone have any ideas so I can have it spill off the left-side rather than doing a hard-stop on the left side?
Robert Uivarosi
@URobert
@sreeves89 hi. I just took a look, you basically want to be able to use more characters than what can be displayed at one time on the screen ?
Sam Reeves
@smreeves
Yes. Since I am going to put in support for things like sin, cos and what-not, I'd want to be able to let the user keep going, but I think it would be more design friendly if they could see the most recent things they entered, and let the "old" (i.e. stuff on the left) flow out of the display.
The only thing I can think of is to truncate when we hit a certain string length, but not sure how design friendly that will be with different screen sizes. And not only that but since each character takes up slightly different sizes, getting it to truncate exactly may or may not be a nightmare.
Robert Uivarosi
@URobert
@sreeves89 to be honest I'm not sure how you can do that, look into overflow:hidden and overflow:scroll
@sreeves89 that might help. Sorry I can't give you much else
@sreeves89 I haven't tried to use it with inputs so I'm not sure how the two will interact
Sam Reeves
@smreeves
Thanks @URobert, I'm looking into it. overflow seems like a good idea but still struggling to make the overflow go to the left side and not the right.
CamperBot
@camperbot
sreeves89 sends brownie points to @urobert :sparkles: :thumbsup: :sparkles:
:star: 566 | @urobert | http://www.freecodecamp.com/urobert
Robert Uivarosi
@URobert
@sreeves89 yw, keep googling around and asking here, you should get it going somehow in the end :)
;)
Andrew Charlebois
@andrewchar
Quote machine finished product :)
http://codepen.io/andrewchar/pen/BjqXJV
Mark Lawrence
@ninja-ml
@mutantspore sorry, I just logged back again... forcecast.io uses Skycons which they say are based on Climacons... I'm also looking into using these since they don't use the canvas tag and just use font awesome https://erikflowers.github.io/weather-icons/
Sam Reeves
@smreeves
Yeah, looks like to do it I'm probably going to have to rewrite the "display screen" so it isn't an input field... :worried:
Robert Uivarosi
@URobert
@andrewchar nice work. Cool approach. But i didn't see the twitter button that allows you to tweet the quote
Mark Lawrence
@ninja-ml
hi guys... I understand the scope of variables (I think) but I cant seem to get the latiitude and longitude to go into my api string... any suggestions? thanks
$(document).ready(function() {
    var latitude = "";
    var longitude = "";
    getLocation();
    var forecastAPI = "https://api.forecast.io/forecast/c1302682e0b647408be17c8d4316e468/";
    // var latitude = "39.2833";
    // var longitude = "-76.6167";
    var darkSky = forecastAPI + latitude + "," + longitude;
    var openCageAPI = "https://api.opencagedata.com/geocode/v1/json?q=";
    var openCage = openCageAPI + latitude + "+" + longitude + "&key=c9807bef51c405ef59c91a4c7124088e";

    function getLocation(){
          if (navigator.geolocation){
            navigator.geolocation.getCurrentPosition(bindPosition);
          }
          else {
            // x.innerHTML = "Geolocation is not supported by this browser.";
          }
    }
    function bindPosition(position) {
        latitude = position.coords.latitude;
        longitude = position.coords.longitude;
          console.log(latitude);
        }
});
Robert Uivarosi
@URobert
@ninja-ml it might be because you are loading the page before you get your reply from the api
Andrew Charlebois
@andrewchar
@URobert yeah i will come back to that later. got frustrated with in. i need to remake my array to do it aswell.
Robert Uivarosi
@URobert
@andrewchar just wanted to point it out. Other than that you might want to add some quotation marks to your quotes... and overall it looks very nice
Mark Lawrence
@ninja-ml
@URobert i modify my code to this before document.ready but it still doesn't populate the strings
var latitude = "";
var longitude = "";

    if (navigator.geolocation) {
       navigator.geolocation.getCurrentPosition(function(position) {
       latitude = position.coords.latitude;
       longitude = position.coords.longitude;
       console.log(latitude);
       console.log(longitude);
      });
    }

    var forecastAPI = "https://api.forecast.io/forecast/c1302682e0b647408be17c8d4316e468/";
    // var latitude = "39.2833";
    // var longitude = "-76.6167";
    var darkSky = forecastAPI + latitude + "," + longitude;
    var openCageAPI = "https://api.opencagedata.com/geocode/v1/json?q=";
    var openCage = openCageAPI + latitude + "+" + longitude + "&key=c9807bef51c405ef59c91a4c7124088e";
Andrew Charlebois
@andrewchar
@URobert i was debaiting including the quotations
@URobert people know its a quote, do ireally need to include the quotations
Robert Uivarosi
@URobert
@andrewchar it's a matter of taste I guess.
Andrew Charlebois
@andrewchar
@URobert i had them to begin with but took them out
@URobert and included a blockquote
Robert Uivarosi
@URobert
@ninja-ml what I did was create a function that gets the geolocation and at the end of its execution calls the function that makes the API call with long/lat values
@andrewchar again, it depends whenever you like them or not. I do , so I added them
Mark Lawrence
@ninja-ml
@URobert thanks... I don't actually have the API calls in a function I dont think... I'll try that
CamperBot
@camperbot
ninja-ml sends brownie points to @urobert :sparkles: :thumbsup: :sparkles:
:star: 567 | @urobert | http://www.freecodecamp.com/urobert
Joseph Morse
@jnmorse
@ninja-ml part of the issues is the geolocation is a async operation, so latitude and longitude don't equal anything till bindPosition is run, which is sometime after your url is being created.
Robert Uivarosi
@URobert
@ninja-ml yw, and you will need a the id at the end to get the response. Did you test your api call with a console log? does get you what you need ?
@ninja-ml here is an example of how the URL have to look like:
  weatherApiUrl = 'http://api.openweathermap.org/data/2.5/weather?lat=' + currentLat + '&lon=' +    currentLong  + "&units=" + units + "&APPID=" + appId;
Mark Lawrence
@ninja-ml
@jnmorse @URobert the API calls get me what I need and everything else worked before actually asking for the latitude, longitude... i originally hardcoded my location to get started
Robert Uivarosi
@URobert
@ninja-ml ok, so it is not the api call
@ninja-ml try what I mentioned above, that's all I did and it worked for me
Joseph Morse
@jnmorse
@ninja-ml yeah, hard coding would work cause then they values are not "" which is what you set them to at the start of your script, but the actuall call for the location is happening at some point in the future
Joseph Morse
@jnmorse
This message was deleted
Mark Lawrence
@ninja-ml
@URobert @jnmorse thanks guys... it's populating the location now but this is my first time working with JSON and now my functions aren't working... I'm not calling them somewhere, but I'm not sure where I should call them... if you get a chance could someone look at my code? http://codepen.io/ninja-ml/pen/PZyYwL/
CamperBot
@camperbot
ninja-ml sends brownie points to @urobert and @jnmorse :sparkles: :thumbsup: :sparkles: