标签: api

使用Google Geocoding API(或类似)实现地址查找

我想在我的网站上添加一个功能,客户可以在其中输入邮政编码,并使用Google地理编码或开源/ Bing等效自动查找地址.

有没有人得到任何示例代码或知道一个好的指导我可以做到这一点?

如果使用jQuery完成甚至更好:)

提前谢谢了

达伦

api postal-code geocode

-2
推荐指数
1
解决办法
2万
查看次数

如何避免我的Twitter帐户被暂停?

我将通过推特推广我的产品联盟网站,我的活动是根据一些关键词得到所有推文(例如:红鞋).然后不好回复推文,如"请检查我的链接http://www.affliateexample.com/redshoe ".我有大量的推文数据,所以计划执行一个cron文件,通过我的推文应用程序(PHP)回复所有这些推文.这是一种正确的方式来完成这项工作,否则这将暂停我的推特账户.请告知这个......

php api twitter product affiliates

-2
推荐指数
1
解决办法
960
查看次数

Windows低级图形

我是编程新手.我知道C/C++和Win32的基础知识.我现在正在尝试做图形,但我想要最快的连接到屏幕.我意识到大多数人都会使用Opengl或DirectX.但是,我不想要开销.我想从头开始控制像素数据.我知道GDI位图,但我不确定这是否是对数据的最佳访问.我知道我必须通过窗口进行交谈,这就是麻烦.Opengl和DirectX是否可以编译到GDI级别,或者他们是否采用特殊方式,绕过或使用类似的代码?请不要问我为什么要这样做.也许解释如何做到这一点可能会有所帮助.就像windows结合所有窗口来创建最终图像一样.

api directx graphics winapi gdi

-2
推荐指数
1
解决办法
2593
查看次数

$ .ajax不是一个函数

您好我正在尝试使用Wunderground Weather API,但我在按钮点击请求信息时遇到麻烦.这是工作开放线提供:

jQuery(document).ready(function($) {
Run Code Online (Sandbox Code Playgroud)

以下是我将其更改为:

jQuery('#GetWeather').click(function($) {
Run Code Online (Sandbox Code Playgroud)

当我点击按钮时,我得到一个firebug错误:

TypeError: $.ajax is not a function
[Break On This Error]   

success : function(parsed_json) {
Run Code Online (Sandbox Code Playgroud)

我不知道为什么它不会工作,但这是其余的代码...希望它有所帮助:

jQuery('#GetWeather').click(function($) {
var PostCode="PL9 9UT";
$.ajax({ url : "http://api.wunderground.com/api/2508132ae0c7601a/geolookup/conditions/q/UK/"+PostCode +".json",
dataType : "jsonp",
success : function(parsed_json) {

var icon = parsed_json['current_observation']['icon'];
var temp_c = parsed_json['current_observation']['temp_c'];
var feelslike_c = parsed_json['current_observation']['feelslike_c'];
var visibility_mi = parsed_json['current_observation']['visibility_mi'];
var UV = parsed_json['current_observation']['UV'];
var relative_humidity = parsed_json['current_observation']['relative_humidity'];
var wind_mph = parsed_json['current_observation']['wind_mph'];
var pressure_mb = parsed_json['current_observation']['pressure_mb'];
var wind_string = parsed_json['current_observation']['wind_string'];
var …
Run Code Online (Sandbox Code Playgroud)

api ajax jquery typeerror

-2
推荐指数
1
解决办法
1万
查看次数

我可以在离线的ios应用程序中使用bing map api吗?

我想开发iPhone应用程序,其中我想显示在搜索栏中输入的位置的地图,它在有互联网连接时工作正常但无法显示离线地图.我正在使用bing map API.

iphone api offline bing-maps ios

-2
推荐指数
1
解决办法
542
查看次数

无法从CakePHP 2.x中的控制器到期cookie

我正在CakePHP中构建一个API.我有一个功能,作为其执行的一部分首先破坏与会话相关的cookie.我使用以下代码来执行此操作.

public function new_thing () {

    // I first call another controller to use functions from that controller
    App::import('Controller', 'Person');    
    $PersonsController = new PersonsController;

    // This function call is the problem
    // This does not throw any errors but does not destroy the cookie as requested
    $PersonsController->_kill_auth_cookie()

}


// This is from the Person controller, these are the functions used in the API

// This is the function that sets the cookies
public function _set_auth_cookie( $email ) {
    setcookie(Configure::read('auth_cookie_name'), $email); …
Run Code Online (Sandbox Code Playgroud)

php api cookies cakephp cakephp-2.0

-2
推荐指数
1
解决办法
327
查看次数

在网站上获取访客年龄

我需要编写一些代码来获取访问者在我网站上的性别和年龄,而不需要获得存储权限,就像Google Analytics一样.

我已经通过使用Facebook Graph API(性别不需要用户权限)来设法找出用户使用性别的方法.所以现在我被困在一种方式,我可以让访问者年龄,因为我不能使用Facebook Graph API,因为它需要用户的许可才能获得.

有任何想法吗?谢谢阅读.

javascript php api jquery analytics

-2
推荐指数
1
解决办法
1086
查看次数

通知图标单击C ++中的Win32 Api

我有这段代码在任务栏中设置了一个图标,但是当某人右击或左击它时却无法执行。有没有办法做到这一点?

//Notification
    NOTIFYICONDATA nid = {};
    nid.hWnd = hwnd;
    nid.cbSize = sizeof(nid);
    nid.uFlags = NIF_ICON | NIF_TIP | NIF_GUID;

    // Note: This is an example GUID only and should not be used.
    // Normally, you should use a GUID-generating tool to provide the value to
    // assign to guidItem.
    HICON hIcon = static_cast<HICON>(LoadImage(NULL,
        TEXT("gui\\sample.ico"),
        IMAGE_ICON,
        0, 0,
        LR_DEFAULTCOLOR | LR_SHARED | LR_DEFAULTSIZE | LR_LOADFROMFILE));
    static const GUID myGUID =
    { 0x23977b55, 0x10e0, 0x4041,{ 0xb8, 0x62, 0xb1, 0x95, 0x41, 0x96, 0x36, …
Run Code Online (Sandbox Code Playgroud)

c++ api winapi click notifyicon

-2
推荐指数
1
解决办法
3126
查看次数

哪个是开发RESTful API的最佳编程语言?

我将为我的应用程序编写API.所以我只想知道哪种是最好的编程语言,包括安全性,稳定性和未来目的.

api rest

-2
推荐指数
1
解决办法
8374
查看次数

C#解析JSON响应(从响应中获取特定部分)

我正在尝试从JSON响应字符串中获取特定部分。

这是JSON代码:

{
  "metadata": {
    "provider": "Oxford University Press"
  },
  "results": [
    {
      "id": "door",
      "language": "en",
      "lexicalEntries": [
        {
          "entries": [
            {
              "homographNumber": "000",
              "senses": [
                {
                  "definitions": [
                    "a hinged, sliding, or revolving barrier at the entrance to a building, room, or vehicle, or in the framework of a cupboard"
                  ],
                  "id": "m_en_gbus0290920.005",
                  "subsenses": [
                    {
                      "definitions": [
                        "a doorway"
                      ],
                      "id": "m_en_gbus0290920.008"
                    },
                    {
                      "definitions": [
                        "used to refer to the distance from one building in a …
Run Code Online (Sandbox Code Playgroud)

c# api parsing json response

-2
推荐指数
1
解决办法
1546
查看次数