GOAGENT又一个基于GAE的穿越利器

此文章来源 http://www.lhzhang.org/
参考了https://code.google.com/p/goagent/
有一些小改动
GoAgent是 一个使用Python和Google Appengine SDK编写的代理软件。部署和使用方法非常简单,不需要安装Python或者Google Appenginge SDK ,几分钟即可搞定。
wuala的CBFS 更新文件

wuala被墙掉了,CBFS无法更新,自己翻墙下载了更新文件,给大家共享
附:wuala 注册邀请链接(需翻墙) http://www.wuala.com/referral/KF4CJ64PM5PFPBF6GBB6
LMDE Update Pack 3 is out!
这个Linux Mint Debian的更新包,如果你没有用这个版本,请跳过
有2个较大个更新:
- 全新的3.0内核
- 包括安全和多媒体库更新.
Changing your repositories
首先要修改Multimedia and Security repositories. 编辑APT源:
gksu gedit /etc/apt/sources.list
- Replace security.debian.org with debian.linuxmint.com/latest/security
- Replace debian-multimedia.org with debian.linuxmint.com/latest/multimedia
Your APT sources, should now look like this:
deb http://packages.linuxmint.com/ debian main upstream import deb http://debian.linuxmint.com/latest testing main contrib non-free deb http://debian.linuxmint.com/latest/security testing/updates main contrib non-free deb http://debian.linuxmint.com/latest/multimedia testing main non-free
Save and close the file.
Using the Update Manager
… to update itself
首先要升级Update Manager。
If you see an update for “mintupdate-debian“, accept it and wait for the Update Manager to restart itself.
![]()
如果Update Manager可以升级,在升级列表里只会显示Update Manager。
… to check your APT sources
目前最新的mintupdate-debian 版本是1.0.4,会检查你的APT源配置是否正确
- 点击 “Update Pack Info” 按钮
- 确定 “Your system configuration” 处显示的是绿色的按钮并且没有任何警告或错误信息
- 如果有警告或错误信息,按照它的提示重新配置,直到没有错误信息
![]()
检查系统配置并显示系统配置信息
请仔细阅读Update Pack Info里面的信息
… 开始升级 Update Pack 3
准备好了吧
请点击 Install Updates 按钮。
升级期间会有一些提问,有一个非常重要:the new kernel will ask you where to install Grub。Answer with the location of your current Grub menu (which on most systems is “/dev/sda“).
详情请参考:http://blog.linuxmint.com/?p=1836
linux贴纸 unixstickers.com
出售各种开源相关的贴纸(GNU/Linux, Gnome, KDE, Java, MySQL, Apache, PHP, Python, and other Linux distributions)

【pdf】Android_UI开发专题
貌似被墙了啊
is-programmer.com 只能翻墙访问了啊
Android软件汉化 APK软件汉化
来源:http://www.uugo.org/project/Android/71096.html
在Android平台下,程序文件的后缀名为“.APK”,APK是Android Package的缩写,意思是Android安装包,是类似WM系统“.CAB”和Symbian系统“.SIS”的文件格式。APK程序文件可以用WinRAR之类的解压缩软件解压,我们只需要将其中的resources.arsc文件解压出来,用汉化工具将.arsc文件内的英文资源翻译为中文,修改包含英文的图片,再替换原文件,最后将APK文件重新签名即可。
汉化APK软件需要事先下载安装好以下工具:
1.Java
2.解压缩软件:WinRAR
3.汉化工具:AndroidResEdit(需要.NET Framework 2.0支持)
4.图片汉化软件:Photoshop
5.签名程序:Auto-sign(推荐使用AndroidResEdit软件自带的签名功能)
android service 的交互
这个例子演示了activity调用本地服务,点击按钮就会显示结果

结果:

步骤如下:
1 创建服务接口
服务接口提供了可以调用的方法
IService.java
package com.demo.service;
public interface IService {
public String getName();
}
2 实现服务
myService.java
package com.demo.service;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
public class myService extends Service {
/*
* binder 起到个桥梁的作用,
*/
private MyServiceBinder myServiceBinder = new MyServiceBinder();
@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
return myServiceBinder;
}
public String getName(){
return "你好啊 返回的结果";
}
public class MyServiceBinder extends Binder implements IService{
public String getName() {
// TODO Auto-generated method stub
return myService.this.getName();
}
}
}
3 调用服务的activity
mainActivity.java
package com.demo.service;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
/*
* service 的交互
*/
public class mainActivity extends Activity {
/** Called when the activity is first created. */
private myConn conn=new myConn();
private IService serviceInstance;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = new Intent(this, myService.class);
/*
* 激活服务 会调用 myConn 返回桥梁 serviceImpl
*/
bindService(intent, conn, Context.BIND_AUTO_CREATE);
final TextView nameTextView = (TextView) findViewById(R.id.name);
this.findViewById(R.id.button).setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
//点击时调用服务中的方法
String nameString = serviceInstance.getName();
nameTextView.setText(nameString);
}
});
}
private final class myConn implements ServiceConnection{
/*
* (non-Javadoc)
* @see android.content.ServiceConnection#onServiceConnected(android.content.ComponentName, android.os.IBinder)
* 这个IBinder 是 myServece中的返回的IBinder
*/
public void onServiceConnected(ComponentName name, IBinder service) {
serviceInstance = (IService) service;
}
public void onServiceDisconnected(ComponentName name) {
serviceInstance=null;
}
}
@Override
protected void onDestroy() {
//退出时 解除绑定
unbindService(conn);
super.onDestroy();
}
}
android 进入通讯录
Intent intent = new Intent();
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.setType("vnd.android.cursor.item/phone");
startActivityForResult(intent, 2);
//在onActivityResult里面:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
if (resultCode==RESULT_OK) {
switch (requestCode) {
case 2:
Uri contactData = data.getData();
Cursor c = managedQuery(contactData, null, null, null, null);
c.moveToFirst();
//String id= c.getString(c.getColumnIndex(Contacts._ID)); //在这取到的id 和原先的id不一样,不知道是怎么回事所也下面就用name 来获得电话号码
String name = c.getString(c.getColumnIndex(Contacts.DISPLAY_NAME)); //取得通讯录中选中的名称
String phoneNum=getPhoneNum(name); // 取得所选的电话号码
System.out.println("name "+name +" number "+phoneNum);
break;
}
}
super.onActivityResult(requestCode, resultCode, data);
}
private String getPhoneNum(String name) {
Cursor phones= managedQuery(Phone.CONTENT_URI, null, Phone.DISPLAY_NAME+" = '"+name+"'", null, null);
phones.moveToFirst();
String phoneNum = phones.getString(phones.getColumnIndex(Phone.NUMBER));
return phoneNum;
}
