Jump to content

Search the Community

Showing results for tags 'api'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 16 results

  1. Hi everyone, I have a file of html which contains code that fetches data from spotify api and renders it in iframes on the page. The issue is that on searching first time, it displays data in a very slow speed. Afterward that it works fine and fast. I need to make it search fast on the initial time also. fiverr.html
  2. Hey guys, I know that this is quite a longshot but I hope that there is someone here that can help me. We've had problems with our Store Locator on our homepage for quite a long time since it was missing an API Code (which we got today). The site I'm talking about is this: http://www.melon-helmets.com/en/stores The Problem is: I don't know where to put the API. There is this line of code <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> My guess was that I'd have to enter the API key after js?, by adding key=ourkey. It does display the map without an error afterwards, unfortunately it always asks me to enter a zip code or adress, even though I did so. (Tried City/Adress/ZIP Code) Can anyone help me? (I'm fairly poor at html/css/js) Thank you!
  3. I am trying to build a basic tool to display someones congress representative via zipcode. The API that I am trying to use is offered for free via: https://whoismyrepresentative.com The link to get the data via zipcode is: https://whoismyrepresentative.com/getall_mems.php?zip=31023 It can also be formatted for json like this: https://whoismyrepresentative.com/getall_mems.php?zip=31023&output=json I have read a ton of articles on how to display this data but the trouble I am having is getting the data to show up at all. My first attempt was based off w3schools example. When the button is clicked it should display the result in the empty div but when I replace the URL, it does not display. When you visit the URL directly the data is there. My JavaScript knowledge is fairly low so I will go line by line and maybe I am just misunderstanding something. $(document).ready(function(){ Gets the document ready for some jquery $("button").click(function(){ Sets up click function on `<button>` $.getJSON("https://whoismyrepresentative.com/getall_mems.php?zip=31023&output=json", function(results){ I hope this is what gets the data from the API URL $.each(results, function(i, field){ I'm not sure what this does but I am thinking this displays the field for 'results' $("div").append(field + " "); This will display the data in the empty `<div>` Full index.php code <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Find Your Representative</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $.getJSON("https://whoismyrepresentative.com/getall_mems.php?zip=31023&output=json", function(results){ $.each(results, function(i, field){ $("div").append(field + " "); }); }); }); }); </script> </head> <body> <button>Get JSON data</button> <div></div> </body> </html>
  4. I got the code below from W3Schools tutorial on Google maps. I also received an API code from google. When I try to put this on my site I get an error message in what looks like an iframe. I think I am suppose to do something additional with my api code. Google had me set a project name and then just generated a code. I don't know if I am suppose to do something besides generate that code in order for it to work for the specific map I want on my site. Can anyone tell me something obivous I am doing wrong or something that I still need to do on google? <script> function myMap() { var mapProp= { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); } </script> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyARr9stC0XnoFmg2DEqjj5U8sTC_nkvg0A&q&callback=myMap"></script> <iframe width="450" height="250" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/search?AIzaSyARr9stC0XnoFmg2DEqjj5U8sTC_nkvg0A&q=Wayne+State+University" allowfullscreen> </iframe>
  5. Hi all, I would like to understand how JS/jQuery can interact with PHP to upload a status and a picture from the HTML5 canvas to Twitter. I set up a similar thing for FB and it works. I don't get how to do it for Twitter and I haven't found much about it. Could you explain to me how it works? I currently have this JS/jQuery code as a starting point: var formData = new FormData(), mimetype = canvas.toDataURL().substring(canvas.toDataURL().lastIndexOf(":") + 1, canvas.toDataURL().lastIndexOf(";")), blob = dataURItoBlob(canvas.toDataURL().split(',')[1], mimetype); formData.append('source', blob); $('#twitter').click( function() { $.ajax({ url: '', type: 'POST', data: formData, processData: false, contentType: false, cache: false, success: function() { $('#twitter').addClass('twitter-success'); setTimeout( function() { $('#twitter').removeClass('twitter-success'); }, 3000); } }); } ); Thank you!
  6. Hi, I am currently trying to implement the posting of a canvas image to a Twitter wall.Below, first you see the JS I came up with.What I can't figure out is how am I supposed to get the keys and tokens provided in the PHP function below that code. Such PHP function is contained in the uploadFile.php file.JS: var base64img = canvas.toDataURL().split(',')[1]; $.ajax({ url: "uploadFile.php", type: "POST", data: base64img, processData: false, contentType: "application/octet-stream", }).done(function(respond) { alert(respond); }); PHP: function _microsite_last_tweets($search) {define('CONSUMER_KEY', 'my key');define('CONSUMER_SECRET', 'my key');define('ACCESS_TOKEN', 'my key');define('ACCESS_TOKEN_SECRET', 'my key');$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);$content = $connection->get("account/verify_credentials");if ($search[0] == '@' && strpos($search,' ') == false) {$user = substr($search, 1);$tweets = $connection->get("statuses/user_timeline", array("screen_name" => $user, "count" => "4"));}else {$search = urlencode($search);$tweets = $connection->get("search/tweets", array("q" => $search . '+exclude:retweets', "result_type" => "recent","count" => "4"));}return $tweets;}
  7. First of all, sorry if this is an inappropriate place to post this thread but I don't really know a better place to post it. This isn't any full time job, more of a partnership. I'm sure for a skilled programmer this would be rather easy.. But I am not one, which is why I'm looking for help.I want someone who can program games, such as a coin flipping game, slot machine game and games like blackjack (although, I have a coin flipping and slot machine game coded, just not by me) and integrate them with the Steam/CS:GO API, allowing users to log in, send CS:GO skins/knives (which can be very valuable) to a bot and then play these games for the chance of winning a lot more skins/knives.If you aren't fully accustomed to the Steam/CS:GO API then there are official Steam API guides. I have a couple more things I would like added which I will discuss if you contact me.Email: csgoroulettebusiness@gmail.comPay: All profits 50/50, a payment at the end could be arranged but I am spending a lot of money on other things important for the website (advertising although it's rather low-key, domains since I'm thinking about switching to a different one, creating a stockpile of skins/knives so that I can actually have the games functioning and not have people spending skins on games with no chance of winning anything and there's more I need to pay for but I hope you understand I'm not just BSing or something). Some of the more popular websites out there already make a lot of money from doing this, so if we improve upon what they've done, add more features, games etc and add a better monetary system, then the pay should be quite a lot, that is if all games/elements are implemented.Why bother helping?: First of all, the domain is already paid for, but like I said, I might buy a new off someone who's selling it. Quite a lot of the website is finished but there's still quite a bit more to do. You get to sleep soundly tonight knowing that you've helped a fellow programmer create something he loves. And, well, all you have to do is do some programming and sit back and watch the money roll in. Might sound too good to be true and although there's quite a bit of programming involved, it really is as simple as that. The websites out there are either basic, scams or just very poor and I hope to change that. I have plenty of new and fresh ideas which would entice a lot of CS:GO gamers and possibly even streamers to my website. I also have a different way for the site to earn money which greatly benefits both the creators and the users.Thanks for reading,Joe
  8. Good day everyone, Do you have a Google Translate script, as much as possible a URL, that returns a JSON format? For example I pass this URL using an AJAX request: https://google-translate-api-domain.com/q=large〈=english&to=afrikaans maybe it will return: {"translation":"groot"} Thanks in advance! - Regicide Del Feroz
  9. Hi guys I have been experimenting with Google Maps API and I have been able to create 2 different Maps that do what I want 1 map to do. I have a map with pins that I retrieved from a SQL database and another map that has weather layers using KML. Whenever I try to merge these two maps together both the weather layer and the pins fail to load. I think it has something to do with the function that initializes the maps. In lm.html I always used the initialize function to load the body but in the index.html the template uses a load body function. I think this is what causes the errors I am getting. The file index.html has my pins. You will need the config and xml files . It really just uses the tutorial file here https://developers.google.com/maps/articles/phpsqlajax_v3. This file lm.html is just a maps with my KML weather layers. How can I add weather layers to index.html? config.php index.html lm.html maps_xml.php
  10. I want to do a chess program that record the move and make sure no check was forgotten (it recently happened and we had to restart the game ). I think ECMAScript would be a good option. Each pieces would be assigned its color and type and when moved verify if an attack pattern arrived to the opposite color king. Instead of making function for all of this, I wonder if there would be some grid library or perhaps simply bitmaps that could do the trick.There would be a group A with 3 grids, past pieces positions for each color and new positions, right away the display would show the new positions; then there would group B with the grids for each move, like + for rook and × for bishop.Then the grid for the new move would be put on top of its opposing color past positions then going from its center would check if it reaches/touches something, either the border or a non-king piece and if so stop verifying further that path ; but if the king is reached, right away it the display would highlight the king and stop the verification process. Along with the missed check eye-candy/visuals, there would an alert asking to revert the previous move, and if yes the corresponding grids would be replaced then the highlight dropped.So... do I need to do all of this programmatically, or are there grid function with verification from its center? By programmatically I mean for knight go from new move position 2 positions up then right, is it outside the board limits then is it a king then 2 positions left, etc. By grid function I mean for the same move to be fed for knight possible attacks along with the new position of the knight along the grid of the opposite positions along with a filter options so it only consider kings (although there should only be 1), so it will start from the "x" and check for what's under all the "O"s ; implying its placed over the filtered kings from the opposite positions. Although for the sliding pieces after finding a king, the non-king would then be replaced to see if there was another piece (non-king) between it (king) and the center ("x"). One can also think of those punch-cards test verifiers or teachers use to assign score on an exam. Although in this case its more like students had to use a different color for a single answer and the verifier was--mainly--looking for that color ; I was going to put only instead of mainly but although only would be the case of pieces that doesn't slide from its center, like pawns & knights, for pieces that slide, like queens & rooks, the sliding would stop as soon as a non-king piece would be reached (and the board limit of course) ; so even if the different color (king) was in the punched-through overlay (piece attacks for the moved piece), if the regular color (non-king) was between it and the overlay center, the search wouldn't be successful, actually it could save processing by returning a fail right away (instead of continuing the search).I hope I'm being clear but please let me know which section need clarification (please be precise) and I'll be glad to oblige. Please consider the title. :)Thank you kindly for your help
  11. I was guided toward svg when I found out about vector resizable feature... now that I went through the svg guide on w3school(which was just a guise of it). I come to wonder if I can use that over canvas api?What do you guys think?Gaming propose, which one would be efficient in formatting games?
  12. Does Anybody knows how to do the following,API's and Indexes etc?CREATE TABLE ¿tUSER¿ ( ¿id¿ bigint(20) NOT NULL AUTO§INCREMENT, ¿id§number¿ varchar(20) NOT NULL, ¿first§names¿ varchar(100) NOT NULL, ¿last§name¿ varchar(100) NOT NULL PRIMARY KEY (¿id¿), <<INDEXES>>)CREATE TABLE ¿tPROFILE¿ ( ¿id¿ bigint(20) NOT NULL AUTO§INCREMENT, ¿tUSER§id¿ bigint(20) DEFAULT NULL, ¿tTYPES§id¿ bigint(20) DEFAULT NULL, ¿value¿ varchar(100) NOT NULL, PRIMARY KEY (¿id¿), <<INDEXES>>)CREATE TABLE ¿tTYPES¿ ( ¿id¿ bigint(20) NOT NULL AUTO§INCREMENT, ¿type¿ varchar(100) NOT NULL DEFAULT '', ¿description¿ varchar(255) NOT NULL, ¿deleted¿ tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (¿id¿), <<INDEXES>>) Apply indexes to the above tables, and design a SINGLE query to retrieve a full list of user information based on: 2.A) an ID number 2. a cellphone number (¿Cellphone¿ is a record in the ¿tTYPES¿ table)3. Write a re-usable script for importing information into the above 3 tables, from the example dsv file below: - NB - All data of the same type MUST be stored in the same format - NB2- You may assume that if a column doesn't seem to exist for a piece of data, that data type is listed in the tTYPES table<<BOF>>record§numberöid§numberöfirst nameölast nameömsisdnönetworköpointsöcard numberögender312ö9101011234011öTest JunioröSmithö071 123 4321öMTNö73ö1241551413214444öM313ö9012023213011öBoböSmithö27743334321öVodacomö3ö1231233232323244öM314ö8706055678011öFranköFrankinsonö2771 156 1567ö8taö0ö1231123453214444öM315ö9102078765011öMaryöVan Niekerkö+27(0)711236677öCellCö2ö1278933213214444öF316ö9005074545011öSusanöWilsonö0821121124öCellCö705ö1231233216544444öF317ö9101013232011öKatherineöJeevesö+271233214ö8taö112ö1231233678214444öF318ö9101011234011öMatthewöMatthiasö0711111111öMTNöö1231555213214444öM319ö9103126666011öMichaelöBayö085-6122-161ö8taö63ö1231244413214444öM320ö7506023232300öTyroneöOlivierö711234322öCellCö89ö1234563213214444öM321ö8901020304055öBurtöJacksonö071 4566544öVodacomö1ö4567233213214444öM<<EOF>>4. After the data has been imported, Write a basic API to wrap the Database. Include the following function points: - Add a new User - Update a User's details - Delete a User - Search users5. Describe what the following bash statement does: grep ¿date +%Y-%m-%d --date='1 day ago'¿ /path/to/file/FILE§PREFIX§Ö¿date +%Y%m%d --date='1 day ago'¿.dsv ö grep -v 'ERROR' ö cut -d "ö" -f 2 ö sed 's/Ü0/27/'------------------------------------------------PART II: Interesting Stuff------------------------------------------------1. If a resturaunt serves: - 3 types of starters - 5 types of main - N types of drinks - 3 types of desserts + How many different meals are available, if you can order 1 item of each type? + How many different meals are available, if you can order 1 item of each type, BUT you can order 2 drinks as long as you do not order the same drink twice? + How many different meals are available, if you can only order a dessert OR a starter?2. If you need to profile 1000 users, each with 3 different attributes, and each attribute has 4 possible values - before parsing any of the date: + What can we guarantee about the resultset?3. A wild director appears. He uses "I want to profile my user database using an additional attribute!" - Describe a ¿super-effective¿ method which we can implement, which will allow us to handle an indeterminate number of this type of request.4. If we have two seperate tables, the first detailing a list of registered club members, and the second detailing a list of competition entrants (assuming we have a key we can join on), what do/could the following resultsets represent: - The INTERSECT of the tables - The MINUS of the tables - The UNION of the tables
  13. I am using chrome. why the geolocation wont showing getLocation i checked on my advance setting there is no necessarily checkbox "Send a "Do Not Track" request with your browsing traffic" I am not sure what excalty the file will go through from the document.getElementById("demo"). I checked at http://www.w3schools.com/html/html5_geolocation.asp it does not help me please help me to success what did i wrong anyone who have experienced this problem before thanks! btw, I am using IDE note++ here the code is <!DOCTYPE html> <html> <body> <p>Click below to get your coordinates:</p> <button onclick="showLocation()">Click</button> <script> var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML = "Geolocation is not supported by this browser.";} } function showPosition(position) { x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } </script> </body> </html>
  14. can anyone explain how to use fpdf to coonvert fetched html format into pdf
  15. Hello all, I have tried so many things to get this to work but to no avail, can someon eplease help me out here with a simple script for n XML steam feed. http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?gameid=221380&format=xml OK NOW THE ISSUE IS: I have a blank webpage which I have placed the above link into, I simply want the contents of the XML feed from the link to appear in my page....... How do I make the contents of that url appear on the same page?? SO I NEED THE SMALL SCRIPT OR HTML CODE TO DO THIS Also I would like to have the background a certain colour and use a certain font like 12point arial with bold headings and lower case text. Can someone please provide me with the html to allow this XML feed to appear on my webpage with a different colour background, arial 12pt font in bold and lowercase Could someone pleasde please help me.......... With regards Mathew
  16. Hey everyone! i am trying to enter data in additional attribute through API in magento shop.I have tried this code but it is not working the data is not entering.. 'additional_attributes' => array ( array( 'key' => 'user', 'value' => 'aneeb')) Please tell me what i am doing wrong or tell me how can i enter data in additional attributes through API in magento shop....
×
×
  • Create New...