Search Results

Search found 14829 results on 594 pages for 'sharepoint api'.

Page 159/594 | < Previous Page | 155 156 157 158 159 160 161 162 163 164 165 166  | Next Page >

  • Java Http request on api.stackexchange with json response

    - by taoder
    I'm trying to use the api-stackexchange with java but when I do the request and try to parse the response with a json parser I have an error. public ArrayList<Question> readJsonStream(InputStream in) throws IOException { JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8")); reader.setLenient(true); try { System.out.println(reader.nextString()); // ? special character return readItem(reader); } finally { reader.close(); } } public ArrayList<Question> readItem(JsonReader reader) throws IOException { ArrayList<Question> questions = new ArrayList<Question>(); reader.beginObject(); while (reader.hasNext()) { System.out.println("here");//not print the error is before String name = reader.nextName(); if (name.equals("items")) { questions = readQuestionsArray(reader); } } reader.endObject(); return questions; } public final static void main(String[] args) throws Exception { URIBuilder builder = new URIBuilder(); builder.setScheme("http").setHost("api.stackexchange.com").setPath("/2.0/search") .setParameter("site", "stackoverflow") .setParameter("intitle" ,"workaround") .setParameter("tagged","javascript"); URI uri = builder.build(); String surl = fixEncoding(uri.toString()+"&filter=!)QWRa9I-CAn0PqgUwq7)DVTM"); System.out.println(surl); Test t = new Test(); try { URL url = new URL(surl); t.readJsonStream(url.openStream()); } catch (IOException e) { e.printStackTrace(); } } And the error is: com.google.gson.stream.MalformedJsonException: Expected literal value at line 1 column 19 Here is an example of the Json : { "items": [ { "question_id": 10842231, "score": 0, "title": "How to push oath token to LocalStorage or LocalSession and listen to the Storage Event? (SoundCloud Php/JS bug workaround)", "tags": [ "javascript", "javascript-events", "local-storage", "soundcloud" ], "answers": [ { "question_id": 10842231, "answer_id": 10857488, "score": 0, "is_accepted": false } ], "link": "http://stackoverflow.com/questions/10842231/how-to-push-oath-token-to-localstorage-or-localsession-and-listen-to-the-storage", "is_answered": false },... So what's the problem? Is the Json really malformed? Or did I do something not right? Thanks, Anthony

    Read the article

  • New Bluetooth API question

    - by Ralphz
    I have written a small app that puts my bluetooth in discoverable mode for a long time (G1 - API 1.6). I use that along with small program on windows to lock/unlock the computer if the phone is close by. Recently i try to port this app to my nexus one but it seems like i have to pop up the message every 300s to enable device to go to discoverable mode. does anyone know how i can suppress that? I'm ok with saying ok for the first time but not every 300s :)

    Read the article

  • Exposing APIs - third party or homegrown?

    - by amelvin
    Parts of the project I'm currently working on (I can't give details) will be exposed as an API at some point over the next few months and I was wondering whether anyone could recommend a third party API 'provider' (possibly Mashery or SO advertiser Webservius). And I mean recommend in the 'I've used these people and they are good' sense because although I can google for an answer to this question it is more difficult to get truly unbiased opinions. As an addendum is there much mileage in creating a bespoke API solution and has anyone had any joy going down that road? Thanks in anticipation.

    Read the article

  • change font in sharedbook api in php

    - by ashish
    I m using Sharedbook api to generate a memory book, although it's working perfect, but font of the memory book is unchangeable ...means i can't change the font family of that book. I tried to change the font then it display error. please suggest me how to change Font of that memory book.. Thank is advance

    Read the article

  • vim adding new function names for project's API

    - by Flavius
    Hi How can I add new function names for .c and .h files to be highlighted, similar to this http://stackoverflow.com/questions/2464593/custumizing-syntax-highlighting-in-vim but much easier? (as I don't need to color words in different colors, only in the default color for keywords as defined by my theme). I need this to add highlighting for function names in a project written in C which has a clearly defined API. Thanks

    Read the article

  • Business Objects: Refresh Data problem with .NET API

    - by jlrolin
    I'm currently using the BO API for .NET to connect to our reports database. In .NET, I'm getting the following error: Your security profile does not include permission to refresh Web Intelligence documents. (WIS 30253) Interestingly enough, I can log into BO, and I can refresh the data and grab prompts as I'm logged in. From .NET, with the same username and password, I can't seem to do so. Anybody have any thoughts on this?

    Read the article

  • Javascript and the Google Maps API

    - by Tiny Giant Studios
    Hiya coding Ninja's I'm in a spot of bother and my hairline is on the chopping block. When I integrated the maps API on this site, ritaknoetze.com, everything worked perfectly. However, copying that exact code for a different demo website, scarabpaper, the map doesn't show up at all? Could someone show me the ropes on what I'm doing wrong? Here's the code I got from Google itself that I modified for my WordPress theme/installation: JavaScript: <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> function initialize() { var myLatlng = new google.maps.LatLng(-34.009839, 22.78101); var myOptions = { zoom: 9, center: myLatlng, navigationControl: true, mapTypeControl: false, scaleControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var image = '<?php bloginfo('template_url')?>/assets/googlemaps_marker.png'; var myLatLng = new google.maps.LatLng(-34.009839, 22.78101); var beachMarker = new google.maps.Marker({ position: myLatLng, map: map, icon: image }); } </script> My HTML where the javascript goes: <div class="contact_container"> <div id="map_canvas"></div> <div class="clearfloat"></div> </div> My CSS for the affected divs #map_canvas { width: 880px; height: 300px; margin-left: 10px; margin-bottom: 30px; margin-top: 10px; float: left; border: 1px solid #dedcdc;} .contact_container { /*container for ALL the contact info*/ background-color: #fff; border: 1px solid #dedcdc; width: 900px; margin-top: 30px; padding: 20px; padding-bottom: 0;} Any Help would be greatly appreciated...

    Read the article

  • is aol has contacts api?

    - by wingoo
    in there dev sites,they said the contacts api would coming soon from the year 2008-_- but i can't find anything about it, and i find in window live add contacts site: http://cid-7b76c1c8e1ade1ea.profile.live.com/connect/?ru=http://by112w.bay112.mail.live.com/mail/ContactMainLight.aspx%3fn%3d1542572382 there has a program to port contacts from aol,is this only for microsoft? or another method to do this?

    Read the article

  • android inputMethodservice API confusion

    - by yee-chen
    I dont understand quite well about onStartInputView(), onCreateInputView(), onStartInput() and onInitializeInterface(), after i read throught inputMethodservice API. Anyone can explain it when we use function, how we use those function. Are they like life cycle in Activity? if yes, whats the sequence of them. how can they behave?

    Read the article

  • API to Rank blog articles

    - by mnml
    I would like to know if there is any easy way to rank blog articles by counting how many times they have been retweeted / digg'ed / buzz'ed and if there is an existing api for it. The idea would be to keep important 'stories' at the top of the blog timeline.

    Read the article

  • question about api functions

    - by davit-datuashvili
    i have question we have API functions in java can user create it's own function and add to his java IDE? for example i am using netbeans can i create my own function add to netbean IDE?let say create binary function or something else thanks

    Read the article

  • Error 424 from Twitter API

    - by Ted
    I'm experitmenting with the Twitter API (OAuth). I have a test bed that can tweet from my dev box, but fails in production. I get a status code of 424 returned when trying to tweet. I can't spot the difference between my live environment and my dev environment so really need to understand what a '424' is, but can find no documentation relating to it.

    Read the article

  • Does AOL have a contacts api?

    - by wingoo
    In their dev site,AOL says the contacts api would coming soon from the year 2008-_- but I can't find anything about it since then, and I find in window live add contacts site: http://cid-7b76c1c8e1ade1ea.profile.live.com/connect/ They have a program to port contacts from AOL, that is this only for Microsoft. Is there another method to do this?

    Read the article

  • GWT: stange import collision error in visualisation api

    - by parag_
    hi, I'm attempting to add two charts to a gwt page using the visualization api, but for some strange and inexplicable reason, eclipse claims that the following two imports are colliding - which makes no sense to me. In the methods where i am calling them, I have even tried using the fully qualified names, but that doesnt seem to help either. Any idea what may be going on ? import com.google.gwt.visualization.client.visualizations.Table.Options; import com.google.gwt.visualization.client.visualizations.LineChart.Options;

    Read the article

  • Similar route mapping

    - by Denis Agarev
    I need to map to create controller what must response to two urls: "http://localhost/api/controller?id=1" (where only id value can change) "http://localhost/api/controller/anotherId/someconst" (where anotherId is the only one changing part) i map it to such route: routes.MapHttpRoute("Test", "api/{controller}/{id}/{someconst}", new { controller = "Test", someconst = RouteParameter.Optional }); And have to methods in my controller: public void Get(int id) { ... } public void Get(int anotherId, string someconst ) { ... } It works...But it doesn't look nice...cause "string someconst" is not a param, it's just a const part of url. But if i remove "string someconst" param second url wouldn't work. Is it possible to map one controller to two routes to resolve this urls to make it clear without fake param which is a const in fact?

    Read the article

  • Get Token's Name with Reflection API.

    - by Mark Tomlin
    I want to find the token's name passed by augment into a function. class Norm { const STR_NORM = 0; const INT_NORM = 0; } function foo($Arg1, $Arg2 = NULL) { getConstName($Arg1); # Should Return STR_NORM; return $Arg1, $Arg2; } echo foo(Norm::STR_NORM); Is there any way to implement getConstName via the PHP Reflection API?

    Read the article

  • Facebook Login Api

    - by shyam
    I am developing a mobile application that let users post pictures to facebook in J2ME. For this within the app I am collecting user's facebook username and password. How can I use these login credentials to post pictures to facebook. I came across http://code.google.com/p/facebook-java-api/ but will this allow me to do the same? I have used nokia community software that does this. Please Help

    Read the article

  • i cant get the next page of friends using the twitter api

    - by vakas
    i am using the api twitterizer2 downloaded from http://code.google.com/p/twitterizer/downloads/list but when i try to get the friends of a user i get 100 friends but i cant get the next 100 friends thru NEXTpage function how to handle this...? Twitterizer.TwitterUserCollection userFollowing = Tw.TwitterUser.GetFriends(tokens,TwitterUrl); Twitterizer.TwitterUserCollection page2=userFollowing.NextPage when i get the next page it returns the same 100 users

    Read the article

< Previous Page | 155 156 157 158 159 160 161 162 163 164 165 166  | Next Page >