server2003默认关机时的图片
在运行中输入“gpedit.msc”
计算机配置->管理模板->系统->“显示关闭事件跟踪程序”属性->已禁用就可以了。
修改后:
via:http://blog.csdn.net/gaofang2009/article/details/5163062
ZOJ Problem Set – 1002
原题:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1002
试水ZOJ的第一题,果然ACM的难度比PAT大一些,入门题目都那么长…
思路其实不难,弄个二维数组来搞,有点回溯的味道,刚巧最近看书看到了分而治之还要动态规划什么的
某一步的结果= max{当前位置放置1个+后面位置放置个数, 当前位置放置0个+后面位置放置个数}
然后就能做啦~
#include#include #include #include // std::max using namespace std; enum state{ READY, BLOCK, DISABLED, USED }; /** 从i,j 开始找下一个可用的位置 **/ void findNextPossiblePos(int &i, int &j, int **inData, int N) { for(int m=i; m =0; row--) { if(s1Data[row][j] == BLOCK) break; s1Data[row][j]= DISABLED; } //↓ for(int row = i+1; row =0; col--) { if(s1Data[i][col] == BLOCK) break; s1Data[i][col] = DISABLED; } //→ for(int col = j+1; col s2Result)? s1Result:s2Result; //mmax[i][j] = retVal; return retVal; } int main() { int n; while(cin >> n) { if(n == 0) break; //create data int **data = new int*[n]; for(int i=0; i > c; if(c == '.') data[i][j] = READY; else if(c == 'X') data[i][j] = BLOCK; else data[i][j] = DISABLED; } } /////Start! int result = startJob(data, n, 0, 0); cout << result << endl; } return 0; }
1053. Path of Equal Weight (30)
原题链接:http://pat.zju.edu.cn/contests/pat-a-practise/1053
这道题目就是个树的遍历,反正树嘛可以好多方法构造的…我这边就给了个map实现,其实用数组也是完全可以的嘛:)
然后不管用DFS,BFS还是神马遍历一下整棵树就出来了…
能继续使用的在working里面,有结果的在result里面
一开始working集合放一个根节点的Path
注意特殊情况:只有根节点一个节点的时候….
其他没啥特别的,原以为10ms时间很短,做出来才发现其实都是0ms搞定的:)
另外另外,//掉的结构内的运算符重载,VS2013可以运行,但是PAT出现编译错误,貌似是linux下严格一些的吧,省事儿就改成了外面自定义比较函数了。据查,结构体内搞个友元函数然后结构体外面写实现也是可以的…不过这样好麻烦
#include#include #include
L720 官方ROM彩信功能
/system/framework/telephony-common.jar
现在三棒把通讯相关的东西从frameworks.jar抽出来放到了这里,其实没多大变化。
参考了一篇两年前的文章:http://www.miui.com/thread-378600-1-1.html
受益匪浅!基本就是照着这个来的…
comandroidinternaltelephonycdmaCdmaSMSDispatcher.smali文件
1.找到所有 0x1004的地方,从const/16改成const,数值改成0xfeda
2.找到调用方法processCdmaWapPdu的上面几行,####中间的为添加的内容
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/telephony/SMSDispatcher;->mWapPush:Lcom/android/internal/telephony/WapPushOverSms;
invoke-virtual/range {p1 .. p1}, Lcom/android/internal/telephony/SmsMessageBase;->getOriginatingAddress()Ljava/lang/String;
move-result-object v4
invoke-virtual/range {p1 .. p1}, Lcom/android/internal/telephony/SmsMessageBase;->getTimestampMillis()J
move-result-wide v5
invoke-virtual {v3, v4, v5, v6}, Lcom/android/internal/telephony/WapPushOverSms;->setWpaPushAddressTimeStamp(Ljava/lang/String;J)V
.line 344
invoke-virtual/range {v20 .. v20}, Lcom/android/internal/telephony/cdma/SmsMessage;->getUserData()[B
move-result-object v3
###########################
move-object/from16 v11, v3 #v20: userData
array-length v11, v11 #v11 userData.length
new-instance v12, Lcom/android/internal/util/BitwiseInputStream;
invoke-direct {v12, v3}, Lcom/android/internal/util/BitwiseInputStream;->([B)V # v12: bis
const/16 v8, 0x45
invoke-virtual {v12, v8}, Lcom/android/internal/util/BitwiseInputStream;->skip(I)V
mul-int/lit8 v11, v11, 0x8
add-int/lit8 v11, v11, -0x48 # userData.length*8 - 72
invoke-virtual {v12, v11}, Lcom/android/internal/util/BitwiseInputStream;->readByteArray(I)[B
move-result-object v3
###########################
move-object/from16 v0, v20
iget v4, v0, Lcom/android/internal/telephony/SmsMessageBase;->messageRef:I
invoke-virtual/range {v20 .. v20}, Lcom/android/internal/telephony/cdma/SmsMessage;->getOriginatingAddress()Ljava/lang/String;
move-result-object v5
move-object/from16 v0, p0
invoke-virtual {v0, v3, v4, v5}, Lcom/android/internal/telephony/cdma/CdmaSMSDispatcher;->processCdmaWapPdu([BILjava/lang/String;)I
move-result v3
3.用海卓APN什么的软件改彩信APN
PAT所有题目的解答
PAT所有题目的解答参见:http://biaobiaoqi.me/tags/pat/
【转帖+备用】戴尔OUTLET海淘经验
想爱Thinkpad不容易,主要TP已经面目全非的感觉了…下一台电脑备用吧:)
本文转载自:http://forum.51nb.com/viewthread.php?tid=1355197&extra=page%3D1%26amp%3Bfilter%3Dtype%26amp%3Btypeid%3D89
楼主好人一生平安!
=============================================================
1)进入OUELET
购买家用机点击下面链接
http://www.dell.com/learn/us/en/22/campaigns/dell_outlet_clearance_dfh?c=us&l=en&s=dfh&cs=22&dgc=IR&cid=63473&lid=2025246&delphi:gr=true
选购:XPS(七五折)和Alienware(7折)
购买商务机或者移动工作站点击下面链接
http://www.dell.com/learn/us/en/22/campaigns/dell_outlet_clearance_dfh?c=us&l=en&s=dfh&cs=22&dgc=IR&cid=63473&lid=2025246&delphi:gr=true
选购:E系列或者M系列工作台(7折优惠哦)
复制Coupon code然后点击check prices进入
=============================================
继续点击你看中型号下方的check prices
成色:一般选择:OUTLET NEW 或者 REF
按价格高低排序后,看具体型号选择你想要的
点击continue,然后进入结算界面(之前可能要输入验证码)
进入结算界面后,在优惠码框粘贴之前复制的Coupon code,点击apply
过会会显示新的价格,此时点击checkout.
过会会显示新的价格,此时点击checkout.
一段时间后跳出输入收货人信息
第一行收货人姓名 自己的名和姓(注意使用转运地址的名和姓,其中姓的识别码就是转运给的那个几个字母的后缀也写上,不放心的,直接复制转运的名和姓)
第二行收货人地址 注意使用转运分配的地址,建议用CLU的DE
第一排是小地址,第二排是具体街道什么的
第三排是城市和所属州
第四排是邮编 邮编后的4-digit Ext一般你提交后会提醒你使用它的,就按它的填
联系电话:填转运的电话(一定要填对哦。3+3+4的格式)其他不带星号的可以不填。点击continue前不要忘记勾选“AGREE to Dell’s Terms of Sale”
注意:收货人信息和账单信息一定要一致(一般均为转运的信息)
=================
然后就是付款方式了,一般选择 pay with one credit card
进入信用卡信息
第一行 “VISA”
第二行 信用卡卡号
第三行 信用卡有效日期 月 年
第四行 信用卡持有者姓名 必须用信用卡上的姓名的顺序,无需调换顺序以及添加后缀
第五行 安全码 一般卡背面的“后三位”
第六行 每日交易最大限额(这个一般默认)
最后一行 很重要,非常重要 发卡行的境外联系电话 一般是 86XXXXXXXXXX(戴尔会通知发卡行授权)
[Java]计算组合
基本功不扎实,写了半天写出来。
输入:一个长度n数组,比如{0,1,3,5},以及m
输出:组合CNM
===============
/**
* 计算组合的
* @param input 输入的序号,如{0,1,2,3,5}
*
* @param m 抽取数量
* @return 输出为组合,比如{{0,1},{0,2},{1,2}}
*/
public static List ComputeCombines(int[] input, int m){
List result = new ArrayList();
for(int i=0; i prev_result = ComputeCombines(rest, m-1); //更细分的结果
for(int[] results: prev_result){
int[] temp = new int[results.length +1];
System.arraycopy(results, 0, temp, 0, results.length);
temp[temp.length-1] = currNumber;
result.add(temp);
}
}
return result;
}
/**
* 从输入序列中取出从index开始(不含)到末尾的元素
* @param input
* @param index
* @return 如果没得搞了返回null
*/
private static int[] getRest(int[] input, int index) {
int result_size = input.length - index - 1;
if(result_size <= 0)
return null;
int[] rest_array = new int[result_size];
System.arraycopy(input, index +1, rest_array, 0, result_size);
return rest_array;
}
public static void main(String[] args){
///////////////
//测试用
int[] input = {0,1,2,3};
List result = ComputeCombines(input, 2);
for(int[] r : result){
for(int entry : r){
System.out.print(entry);
}
System.out.print("n");
}
///////////////
}
1006. Sign In and Sign Out (25)
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in’s and out’s, you are supposed to find the ones who have unlocked and locked the door on that day.
Input Specification:
Each input file contains one test case. Each case contains the records for one day. The case starts with a positive integer M, which is the total number of records, followed by M lines, each in the format:
ID_number Sign_in_time Sign_out_time
where times are given in the format HH:MM:SS, and ID number is a string with no more than 15 characters.
Output Specification:
For each test case, output in one line the ID numbers of the persons who have unlocked and locked the door on that day. The two ID numbers must be separated by one space.
Note: It is guaranteed that the records are consistent. That is, the sign in time must be earlier than the sign out time for each person, and there are no two persons sign in or out at the same moment.
Sample Input:
3 CS301111 15:30:28 17:00:10 SC3021234 08:00:00 11:25:25 CS301133 21:45:00 21:58:40
Sample Output:
SC3021234 CS301133
========================
没什么技术含量,直接贴代码~!
========================
#include#include #include
自己做的一些东西,明天的会上要分享。
其中有两篇论文是拿来参考的。
Aspect and Sentiment Unification Model for Online Review Analysis
Aspect and Sentiment Unification Model for Online Review Analysis
outline
论文讲了啥
文本情感分析
Java中HashMap遍历的两种方式
原文地址: http://www.javaweb.cc/language/java/032291.shtml
第一种:
Map map = new HashMap();
Iterator iter = map.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
Object key = entry.getKey();
Object val = entry.getValue();
}
效率高,以后一定要使用此种方式!
第二种:
Map map = new HashMap();
Iterator iter = map.keySet().iterator();
while (iter.hasNext()) {
Object key = iter.next();
Object val = map.get(key);
}
效率低,以后尽量少使用!
HashMap的遍历有两种常用的方法,那就是使用keyset及entryset来进行遍历,但两者的遍历速度是有差别的,下面请看实例:
public class HashMapTest {
public static void main(String[] args) …{
HashMap hashmap = new HashMap();
for (int i = 0; i < 1000; i ) …{
hashmap.put(“” i, “thanks”);
}
long bs = Calendar.getInstance().getTimeInMillis();
Iterator iterator = hashmap.keySet().iterator();
while (iterator.hasNext()) …{
System.out.print(hashmap.get(iterator.next()));
}
System.out.println();
System.out.println(Calendar.getInstance().getTimeInMillis() – bs);
listHashMap();
}
public static void listHashMap() …{
java.util.HashMap hashmap = new java.util.HashMap();
for (int i = 0; i < 1000; i ) …{
hashmap.put(“” i, “thanks”);
}
long bs = Calendar.getInstance().getTimeInMillis();
java.util.Iterator it = hashmap.entrySet().iterator();
while (it.hasNext()) …{
java.util.Map.Entry entry = (java.util.Map.Entry) it.next();
// entry.getKey() 返回与此项对应的键
// entry.getValue() 返回与此项对应的值
System.out.print(entry.getValue());
}
System.out.println();
System.out.println(Calendar.getInstance().getTimeInMillis() – bs);
}
}
对于keySet其实是遍历了2次,一次是转为iterator,一次就从hashmap中取出key所对于的value。而entryset只是遍历了第一次,他把key和value都放到了entry中,所以就快了。
Java中HashMap遍历的两种方式(本教程仅供研究和学习,不代表JAVA中文网观点)
本篇文章链接地址:http://www.javaweb.cc/language/java/032291.shtml
如需转载请注明出自JAVA中文网:http://www.javaweb.cc/