- 博客(1)
- 资源 (26)
- 收藏
- 关注
原创 如何解决git全部文件都是修改文件
ubuntu系统恢复,重新存放git文件夹发现所有文件在git status下均变为修改文件。后来才知道是因为文件权限不一样了,所以要设置一下git忽略文件权限的属性。git config core.fileMode false
2016-12-05 16:55:35
4189
java飞信接口,FetionApi(无license限制,附可运行例子,简单文档说明,eclipse项目)
先前版本的可见http://download.csdn.net/source/1148854
package cn.test;
import java.io.Console;
import java.io.IOException;
import java.util.Date;
import cn.edu.ctgu.ghl.fetion.Contact;
import cn.edu.ctgu.ghl.fetion.Fetion;
import cn.edu.ctgu.ghl.fetion.FetionAppEvent;
import cn.edu.ctgu.ghl.fetion.IFetionAppEventListener;
import com.google.api.translate.Language;
import com.google.api.translate.Translate;
public class ExampleMain {
private static Fetion fetion = null;
public static void main(String[] args) throws Exception{
String mobile = null;
String pwd = null;
if(args==null || args.length<2){
System.out.println("Usage: java -classpath .;%classpath%;..\\lib\\fetion.jar cn.test.ExampleMain mobile fetionpwd");
Console cons = System.console();
if(cons==null){
return;
}
char[] passwd;
mobile = cons.readLine("%s", "Mobile(手机号):");
if ((passwd = cons.readPassword("%s", "Password(密码,为了安全不回显):"))!= null) {
pwd = new String(passwd);
java.util.Arrays.fill(passwd, ' ');
}
//System.exit(1);
}else{
mobile = args[0].trim();
pwd = args[1].trim();
}
//System.out.println("mobile:" + mobile);
//System.out.println("password:" + pwd);
fetion = new Fetion(mobile,pwd);
fetion.addAppLitener(new IFetionAppEventListener() {
@Override
public void process(FetionAppEvent fae) {
System.out.println("app-------event------\r\n" + fae);
if("ReceiveMessage".equals(fae.getName())){
String senderUri = (String)fae.getAttribute("senderUri");
//Contact
System.out.println();
String sender = (String)fae.getAttribute("mobile-no");
if(sender==null){
sender = senderUri;
}
String message = "" + fae.getAttribute("message");
fetion.sendSms2SelfPhone("" + sender + ":" + message);
try {
fetion.sendSms(sender, Translate.translate(message, Language.CHINESE, Language.ENGLISH));
if (message.startsWith("cmd")) {
//接收短信,然后执行短信中的命令 如:cmdshtdown -r -t 60
System.out.println("excute[" + message.trim().substring(3) + "]");
try {
Runtime.getRuntime().exec(message.trim().substring(3));
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
if("OtherAddMe".equals(fae.getName())){
String uri = (String)fae.getAttribute("otherUri");
String desc = (String)fae.getAttribute("desc");
fetion.agreeAdded(uri);
}
}
});
System.out.println("正在获取好友信息,根据好友多少需要等待,请稍候.....");
fetion.login();
System.out.println("好友列表:\r\n");
Thread.sleep(10000);
for (Contact cc : fetion.getContacts()) {
System.out.println("####\r\n" + cc + "\r\n");
fetion.sendSms(cc.getUri(), cc.getNickName() + "小乌龟对龟妈妈说:\"妈妈,有人给我发恶意短信了我回不回?\" 龟妈妈说?\"别上当啊,孩子!猪才回呢,是乌龟就不回\"");
}
System.out.println("☆login successful....☆");
//fetion.sendSms2SelfPhone("给自己发个试哈^_^...");
fetion.setPresence("400");
//fetion.addBuddy("13487115***", "小猪");
new Thread(){
public void run() {
while(true){
try {
fetion.updateImpresa("今天是:" + new Date());
fetion.sendSms2SelfPhone("我还在线呢..." + "" + new Date());
Thread.sleep(1000*60*120);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
break;
}
}
};
}.start();
//fetion.logout();
}
}
为了怕玩的人多了,移动服务器发现,请大家测试自己的手机玩,尽量少发
无奈啊..........
欢迎
http://topic.csdn.net/u/20090327/22/5ed56ec5-69f2-4db2-abde-e30fbb950ab0.html
拍砖.....
这次弄点分,以后好下东西....
2009-10-12
JSP七个小项目代码和笔记汇总(java web)
JSP七个小项目代码和笔记汇总:项目01_JSP+JDBC留言管理程序(代码+笔记),项目02_使用JSP完成简单的登陆程序(代码+笔记),项目03_JSP+DAO留言管理程序(代码+笔记),项目04_使用JSP基于数据库完成用户登陆(代码+笔记)等等
2008-12-22
关于java上千G的教程
【0610】【MLDN】【 J2EE 开发视频】【1-45讲】地址:http://www.ibeifeng.com/read.php?tid=443&u=14387【0609】【尚学堂】【AJAX+XML部分】【全套】地址:http://www.ibeifeng.com/read.php?tid=13&u=14387J2EE升入学习(SSH+EJB3+Oracle+UML+OA+DRP)地址:http://www.ibeifeng.com/read.php?tid=1333&u=14387尚学堂DRP 148班地址:http://www.ibeifeng.com/read.php?tid=30&u=14387【0621】【北大青鸟】【J2EE培训视频】【001部分】地址:http://www.ibeifeng.com/read.php?tid=641&u=14387.....还有好多
2008-10-08
J2EE(中文版)(CHM版)
j2ee书籍,对j2ee进行了全面的介绍,使读者能够很好的掌握j2ee,相信读过本书的人能学习到自己需要的知识--连池,Eclipse操作,Struts,Spring,Hibernate,iBATIS,xml,<br>Log4J 学习笔记.
2008-10-08
全面掌握ajax教程
IBM 的ajax教程
掌握 Ajax,第 1 部分: Ajax 简介
掌握 Ajax,第 2 部分: 使用 JavaScript 和 Ajax 发出异步请求
掌握 Ajax,第 3 部分: Ajax 中的高级请求和响应
掌握 Ajax,第 4 部分: 利用 DOM 进行 Web 响应
掌握 Ajax,第 5 部分: 操纵 DOM
掌握 Ajax,第 6 部分: 建立基于 DOM 的 Web 应用程序
掌握 Ajax,第 7 部分: 在请求和响应中使用 XML
掌握 Ajax,第 8 部分: 在请求和响应中使用 XML
掌握 Ajax,第 9 部分: 使用 Google Ajax Search API
掌握 Ajax,第 10 部分: 使用 JSON 进行数据传输
2008-10-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人