Big Bug Ban

兴趣 践行 创新

飞信API发送接口

 

无需验证码

修改了1版不能直接用手机号码发送

新版本发布1.2[点击进入]

调用地址没有变化:

http://lab.haku.hk/f/do?phone=xxxxxx&pwd=xxx&to=xxxx&msg=xxxx

v1.1新增接口

http://lab.haku.hk/f/do?phone=xxxxxx&pwd=xxx&add=xxxx

V1.1修订记录:

1.增加了添加好友的方式,支持自定义通知姓名

http://lab.haku.hk/f/do?phone=xxxxxx&pwd=xxx&add=xxxx1,xxxx2,xxxx3&name=xxxx

2.增加了批量发送方式,请使用逗号分离

http://lab.haku.hk/f/do?phone=xxxxxx&pwd=xxx&to=xxxx1,xxxx2,xxxx3&msg=xxxx

说明:

phone 发送者手机号码 (-v1)

pwd  发送者飞信密码 (-v1)

to 接收者的标志 (可以是手机号 也可以是昵称 ,昵称如果有重复的默认发第一个的)(注意:不能给自己发送) (不和v1兼容)

msg 消息的正文(默认gbk 编码) (-v1)

(可选) u 是否使用utf8编码(默认的编码是gbk , 此参数用于一些需要对中文特殊处理的地方 比如, 如果您需要做一个在线发什么东西的东西) (-v1)

使用u的话您的调用请求应该看来像是这样的

http://lab.haku.hk/f/do?phone=xxxxxx&pwd=xxx&to=xxxx&msg=xxxx&u=1

欢迎测试..

返回的结果有如下:

success发送成功

login failed 登陆失败,请检测

send failed 发送信息失败

fid not found 没有找到fid , 可能的原因有:

1.你填写to的phone没有加为好友

2.to填写了发送方的号码,不能给自己发送的

3.登陆你的客户端飞信,点一次注销

4.尝试用昵称再发送一次..有的时候发送手机号码有问题.

Written by princehaku

11月 20th, 2010 at 11:55 下午

Posted in php

Tagged with ,

with one comment

大道至简 – 节选

 

编程的精义

“虽我之死,有子存焉;子又生孙,孙又生子;子又

有子,子又有孙。子子孙孙,无穷匮也。而山不加增,何

苦而不平?”

——《愚公移山》,《列子·汤问篇》

仅 仅就编程序来说,实在是一件很简单的事,甚至
可以说是一件劳力活。两千年前的寓言中, 已经成就
了一位工程名家: 愚公。在这位名家的身上, 浓缩了
项目组织者、团队经理、编程人员、技术分析师等众
多角色的优秀素质。他的出现, 远远早于计算机发展
的历史, 甚至早于一些西方国家的文明史。

汤 问篇中所述的愚公移山这一事件,我们看到了原
始需求的产生:
“ 惩山北之塞, 出入之迂”
我 们也看到了项目沟通的基本方式:
“ 聚室而谋曰”
然 后, 我们看到愚公确定了一个项目的目标:
“ 毕力平险, 指通豫南, 达于汉阴”
并 通过研讨,择定了一个井然有序的、可以实现的
技术方案:
“ 扣石垦壤, 箕畚运于渤海之尾”
在 这个项目中,动用了三名技术人员和一名工程管
理人员:
“ (愚公)率子孙荷担者三夫”
并 获得了一名力量较弱, 但满富工作激情的外协:
“ 邻人京城氏之孀妻, 有遗男, 始龀, 跳往助之”
基 本上,这已经描述了“ 愚公移山”整个工程的概
况。接下来, 我们应该注意到愚公作为编程人员的基
本素质。在与“ 河曲智叟” 的对答中, 他叙述了整个
工程的实现程序:
“ 虽 我 之 死 , 有 子 存 焉 ”, 这里描述了可能存在的
分支结构, 即“ IF” 条件判断。
“ 子又生孙,孙又生子;⋯ ⋯ 子子孙孙,无穷匮也”,
这里描述了完成这个工程所必须的循环结构。
作 为优秀的程序分析师,愚公论述了这个循环的可
行性:由于“ 山不加增”,所以条件“ 山平”必将成立
(“ 何苦而不平” ), 所以这不会是一个死循环。
在 愚公的论述中, 我们看到了编程的根本: 顺序、
分支和循环。

庞大若“ 愚公移山” 这样的工程, 都是
可以通过这样简单的编程来实现的。这, 就是编程的
精义了。

Written by princehaku

11月 17th, 2010 at 5:12 下午

Posted in think in IT

without comments

Android挑战赛完工..

 

 

preview

感谢33~..昨晚已经提交了..希望能有个不错的成绩

Written by princehaku

11月 9th, 2010 at 9:13 上午

Posted in Android

Tagged with

with 2 comments

传说中的房车

 

image

如图所示

哈哈

可能是运往什么地方的把..

Written by princehaku

11月 7th, 2010 at 4:30 下午

Posted in things goes by

without comments

找不到写的了..

 

😕

Written by princehaku

11月 6th, 2010 at 12:36 上午

Posted in things goes by

without comments

教你在装了360的电脑上运行qq

 

昨天的这个肯定大家都看到了..

其实是可以同时使用的…

解决方法:

1. 去找到360的目录 复制 粘贴到一个新地方

2. 从控制面板删除它

3. 复制的360是可以直接使用的..over

恭喜你可以同时使用了

话说腾讯这个也太那个了吧..不是说不窥测用户隐私么?..它怎么知道我们装了360?

360也是哎…闹什么嘛..伤害的只有是中国的局联网

===========================

以上方法无效…

Written by princehaku

11月 4th, 2010 at 8:38 上午

Posted in think in IT

Tagged with

without comments

Android开发日志 MapView使用需要注意的部分

 

好像网上的都比较全了.我就只写写要注意的部分

第一. 新建AVD的时候一定要注意

需要创建一个含有Google Apis的AVD

如图所示

image

第二  在Android Manifest.xml中增加以下语句 增加map的支持

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.techest.schoolpaper">
    <application>
        <uses-library android:name="com.google.android.maps" />
         <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>

第三  你的Activity必须继承MapActivity

/*  Copyright 2010 princehaku
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *  Created on : 2010-10-18, 21:05:57
 *  Author     : princehaku
 */

package com.techest.schoolpaper;

import android.os.Bundle;
import android.view.View.OnTouchListener;
import com.google.android.maps.MapActivity;

/**
 *
 * @author princehaku
 */
public class MainActivity extends MapActivity{

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.mapview);
    }
        
    /**必须重载此方法
     *
     * @return
     */
    @Override
    protected boolean isRouteDisplayed() {
       return false;
    }


}

最后一个 就是那个XML

 
<view class = "com.google.android.maps.MapView"
    android:id = "@+id/my_map"
    android:enabled = "true"
    android:clickable = "true"
    android:longClickable= "true"
    android:apiKey="你申请到的key"
    android:layout_width="fill_parent"
    android:layout_height="380px"
    android:layout_alignTop="@+id/render_map"
    />


你申请到的key 那个地方填上你在http://code.google.com/intl/zh-CN/android/maps-api-signup.html申请到的key

这个key是更具你的证书和电脑hash一起计算出来的

使用命令行

keytool -list -keystore ~/.android/debug.keystore


可以得到一个hash 然后去上面那个网站申请就可以得到一个key

keytool这个工具可以在Java/bin目录下找到, 一般都存在于环境变量了 可以直接使用

Written by princehaku

10月 26th, 2010 at 6:35 下午

Posted in Android

Tagged with

without comments

time is not enough

 

there is no time for me to do somethings that i do really want to do…

like doing my desiring site http://techest.net

and there still comes many many problems

The android project Has been postponed for one month.now there are only two weeks left ..

in all word,

time waits for no one .

just hardworking

Written by princehaku

10月 25th, 2010 at 10:42 下午

Posted in things goes by

without comments

wordpress 控制摘要长度

 

今天在弄那个党校那个东西的时候遇到的..

网上找了很多方式 都太复杂了

其实要改动还是多简单的

本来输出文章的函数是

<?php the_content();?>

将它改为

<?php echo mb_substr(get_the_excerpt(),0,200,”utf8″).”[…]”;?>

说明一下the_excerpt()是得到摘要

get_the_excerpt()是得到摘要的string 然后再切断..再echo就可以了

Written by princehaku

10月 12th, 2010 at 8:02 上午

Posted in php

Tagged with

without comments

upgraded to windows 7 x64

 

haha   haha ~ :mrgreen:

Written by princehaku

10月 6th, 2010 at 2:19 上午

Posted in things goes by

Tagged with

without comments