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
Lekulino
@kuleCRO
tnx, i've tried, but then image goes all to the left side :/
Sorin Ruse
@sorinr
@kuleCRO nope. see the example
Lekulino
@kuleCRO
yep, and then you have on the right of the image some background space. i dont know is this because of image itself,or?
Lydia Larae
@nevaIsDreaming
I am trying to come up with a specific question. I am a little lost on trying to figure out get the URL written so that I am getting a list of search results. I've been reading through the documentation but I don't see this addressed specifically anywhere I look. Where does the user's input go in the URL? I think I'm supposed to be using query and list, but what parameter does the actual search term entered by the user go in the URL?
Perhaps what is more troubling than the fact that I don't know the parameter I am supposed to use is that I can't figure out how to find it in the documentation when I look for it?
Callum Ward
@callumquick
@sorinr Well really its an issue with any API, that we're not really told how to handle (it's quite difficult)
@nevaIsDreaming It is confusing in the documentation, especially because they don't have a page on how to search, but what you want is "?method=opensearch" in the URL, this searches wikipedia... then you need another "search=" parameter for the users input
@kuleCRO I think it is very good!
Sorin Ruse
@sorinr
@callumquick to proper use any api you just need to read their docs.
Lekulino
@kuleCRO
tnx Callum :)
Callum Ward
@callumquick
@sorinr What about when you run into a CORS issue as a beginner? Do you need to sift through pages and pages of forums to find that sometimes using JSONP works but sometimes it doesn't and sometimes you need to include CrossDomain:true; in your ajax object and sometimes you don't, and sometimes neither works? It's not constructive as a beginner to run into these issues when the challenge is supposed to be testing your knowledge of API calls, not cross-origin headers and security...
Sorin Ruse
@sorinr
@callumquick the early u learn about issues u may encounter the better is for you as a future developer
alpox
@alpox
@callumquick there are 2 points to take into account: using JSONP, and if this doesnt work out, use crossorigin.me
but youre right, its no fun to run into these issues
Callum Ward
@callumquick
@alpox What is crossorigin.me, I haven't seen that one? Could you explain, it might help me fix some of the buggy API calls I've made on codepen
alpox
@alpox
But as programmer you will always have to deal with such problems
Callum Ward
@callumquick
It is true that we will have to deal with them, but the help online is actually quite vague because the issue is often different
alpox
@alpox
@callumquick you just put that url (with https://crossorigin.me/) in front of the real url you want to access and in almost all cases it will work
Lydia Larae
@nevaIsDreaming
@callumquick Thank you! That is very helpful. Can I ask how you know that/where did you find that? I had no problem using the API for the weather app that we made, but this one is confusing.
CamperBot
@camperbot
:cookie: 289 | @callumquick |http://www.freecodecamp.com/callumquick
nevaisdreaming sends brownie points to @callumquick :sparkles: :thumbsup: :sparkles:
Robert Purcea
@RobertPurcea
is there any way to style numbers?
Callum Ward
@callumquick
@nevaIsDreaming Surprisingly I had a lot of issues with the weather API, it works on my laptop but not my desktop, very weird! I found that just by trial and error, but there is a wikimedia page about opensearch and how to use it, you just need to know that it is the one that does the "search" functionality... I had to look through wikipedias docs for a while to find that
@nevaIsDreaming Essentially there is a lot of stuff you don't need in the docs! But also note that it is helpful to the wiki api to include a "format=json" parameter as well
Łukasz Sobek
@lukaszsobek
Help pls, this throws an 'Access-Control-Allow-Origin' error even though there is a callback used
function clickThis() {

  var searchText = document.getElementById("searchText").value;
  var encSearchText = encodeURI(searchText);
  var apiLink = "http://en.wikipedia.org/w/api.php?action=opensearch&search=" + encSearchText + "&limit=10&namespace=0&format=json&callback=?";


 $.get(apiLink, function(data) {
      console.log(data);
 });


  // construct output
  // display output


 }
CamperBot
@camperbot
no wiki entry for: pls this throws an access-control-allow-origin error even though there is a callback used function clickthis var searchtext documentgetelementbyidsearchtextvalue var encsearchtext encodeurisearchtext var apilink httpenwikipediaorgwapiphpactionopensearchsearch encsearchtext limit10namespace0formatjsoncallback getapilink functiondata consolelogdata construct output display output
Melissa
@mmarieg7
i am about to build a tribute page and am confused as to what user stories is and what i am supposed to be writing... can someone help me please
Łukasz Sobek
@lukaszsobek
@mmarieg7 user stories tell you what the person using the page expects to experience
@mmarieg7 they are guidelines to how your code should work from the perspective of a user of the application
Callum Ward
@callumquick
@lukaszsobek As suggested earlier try appending https://crossorigin.me/ to the front of your apiLink and see if that works otherwise get back to me
@remdata Please link your codepen/send your code
@remdata Actually your issue might be that src needs to point to the actual image, not to a page where the image is displayed
@remdata Try src="https://thumbs.dreamstime.com/x/las-vegas-nv-dec-closeup-profile-dr-ben-carson-retired-neurosurgeon-republican-presidential-candidate-s-speaks-spin-66214063.jpg" instead
Łukasz Sobek
@lukaszsobek
@callumquick works <3 have been struggling with this thing throughout all projects
@callumquick thank you
CamperBot
@camperbot
lukaszsobek sends brownie points to @callumquick :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @callumquick |http://www.freecodecamp.com/callumquick
Callum Ward
@callumquick
@lukaszsobek I also struggled, fortunately this means that I know most of the potential fixes :)
Icah Banton
@remdata
@callumquick I will try that. thanks
CamperBot
@camperbot
remdata sends brownie points to @callumquick :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @callumquick |http://www.freecodecamp.com/callumquick
Jonathan Marx Domah
@marxcom
@remdata you are missing a quote after the src=. Should be src="
Fabio Di Pane
@saylos
guys, I don't get why it's not working...
http://codepen.io/saylos/pen/BQGNYd?editors=1010
Callum Ward
@callumquick
Geolocation by navigator doesn't work on codepen atm because it's not secure
@saylos Also as a side note your longitude and latitude are the wrong way round in their definitions :smile:
@saylos Try http://ip-api.com/json to get the geolocation information
Łukasz Sobek
@lukaszsobek
lol, "api.openweathermap.org refused to connect."
there are a lot of options