手速慢...思考速度慢...是撑不到最后boss的...共勉

========================我是日常分割线===========================

1010. Radix (25)

 /*
date:2016-09-05
author:CheerM
title:Radix(25) 题目描述:
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number. Now for any pair of positive integers N1 and N2, your task is to find the radix of one number while that of the other is given. Input Specification: Each input file contains one test case. Each case occupies a line which contains 4 positive integers:
N1 N2 tag radix
Here N1 and N2 each has no more than 10 digits. A digit is less than its radix and is chosen from the set {0-9, a-z} where 0-9 represent the decimal numbers 0-9, and a-z represent the decimal numbers 10-35. The last number "radix" is the radix of N1 if "tag" is 1, or of N2 if "tag" is 2. Output Specification: For each test case, print in one line the radix of the other number so that the equation N1 = N2 is true. If the equation is impossible, print "Impossible". If the solution is not unique, output the smallest possible radix. Sample Input 1:
6 110 1 10
Sample Output 1:
2
Sample Input 2:
1 ab 1 2
Sample Output 2:
Impossible 解题思路:主要是进制转换,找出基底的上界下界,然后二分查找遍历可能的基底 1. 基底的下界:基底一定不能小于数字中出现的最大单位数
2. 基底的上届:当两个数字均不为零,且所找数字最小(==1)时,也有相等的可能,基底应该==另一个数字的10进制值
e.g. 99 1 1 10 则应该上界取99, 以99为基底时 有 99(10)== 1(99) 3. 注意超时!!!!!!(仔细看题,不超过10位的digits),不要递归 4. 注意循环边界、不重复也不要漏掉(不然会无限循环、答案错误) TAT自己挖的bug,哭着也要填完...打个草稿是多重要...
*/ #define _CRT_SECURE_NO_DEPRECATE #include <iostream>
#include <cstdio>
#include <cstring> using namespace std; char n1[], n2[]; //任意基底转10进制数
long long turnIntoRadix(const char* n, long long len, long long radix) {
long long result = , count = ;
while (count < len)
{
int temp;
if (n[count] >= '' && n[count] <= '') temp = n[count] - '';
else temp = n[count] - 'a' + ; result = result * radix + temp;
count++; if (result < ) return -;
}
return result;
} //获取基底下界,即另一整数中单位最大数
long long getMinR(const char* n, long long len) {
long long count = len, maxR = ;
while (count --)
{
int temp;
if (n[count] >= '' && n[count] <= '') temp = n[count] - '';
else temp = n[count] - 'a' + ; maxR = maxR > temp ? maxR : temp;
}
return maxR;
} //遍历基底查找
void checkRadix(long long n1, const char* n2, long long len2, long long minR, long long maxR) {
if (maxR < minR) {
printf("Impossible\n");
return;
} //取中间基底二分查找
long long medR = minR + (maxR - minR) / ;
long long result = ;
bool flag = false;
while (minR <= maxR)
{
result = turnIntoRadix(n2, len2, medR);
if (result > n1 || result == -) {
maxR = medR - ;
medR = minR + (maxR - minR) / ;
}
else if (result == n1) {
flag = true;
break;
}
else {
minR = medR + ;
medR = minR + (maxR - minR) / ;
}
} if (flag) printf("%lld\n", medR);
else printf("Impossible\n"); return;
} int main() {
long long tag, radix, len1, len2;
scanf("%s %s %lld %lld", n1, n2, &tag, &radix); len1 = strlen(n1), len2 = strlen(n2); long long first, second, maxR, minR;
if (tag == ) {
first = turnIntoRadix(n1, len1, radix);
maxR = first + ;
minR = getMinR(n2, len2) + ;
checkRadix(first, n2,len2, minR, maxR);
}
else {
second = turnIntoRadix(n2, len2, radix);
maxR = second + ;
minR = getMinR(n1, len1) + ;
checkRadix(second, n1, len1, minR, maxR);
} system("pause");
return ;
}

1026. Table Tennis (30)

部分正确...待修改...

 /*
date: 2016-09-06
author: CheerM
title: Table Tennis (30)
待修改,部分正确(19/30) 题目描述:
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the available table with the smallest number. If all the tables are occupied, they will have to wait in a queue. It is assumed that every pair of players can play for at most 2 hours. Your job is to count for everyone in queue their waiting time, and for each table the number of players it has served for the day. One thing that makes this procedure a bit complicated is that the club reserves some tables for their VIP members. When a VIP table is open, the first VIP pair in the queue will have the priviledge to take it. However, if there is no VIP in the queue, the next pair of players can take it. On the other hand, if when it is the turn of a VIP pair, yet no VIP table is available, they can be assigned as any ordinary players. Input Specification: Each input file contains one test case. For each case, the first line contains an integer N (<=10000) - the total number of pairs of players. Then N lines follow, each contains 2 times and a VIP tag: HH:MM:SS - the arriving time, P - the playing time in minutes of a pair of players, and tag - which is 1 if they hold a VIP card, or 0 if not. It is guaranteed that the arriving time is between 08:00:00 and 21:00:00 while the club is open. It is assumed that no two customers arrives at the same time. Following the players' info, there are 2 positive integers: K (<=100) - the number of tables, and M (< K) - the number of VIP tables. The last line contains M table numbers. Output Specification: For each test case, first print the arriving time, serving time and the waiting time for each pair of players in the format shown by the sample. Then print in a line the number of players served by each table. Notice that the output must be listed in chronological order of the serving time. The waiting time must be rounded up to an integer minute(s). If one cannot get a table before the closing time, their information must NOT be printed. Sample Input:
9
20:52:00 10 0
08:00:00 20 0
08:02:00 30 0
20:51:00 10 0
08:10:00 5 0
08:12:00 10 1
20:50:00 10 0
08:01:30 15 1
20:53:00 10 1
3 1
2
Sample Output:
08:00:00 08:00:00 0
08:01:30 08:01:30 0
08:02:00 08:02:00 0
08:12:00 08:16:30 5
08:10:00 08:20:00 10
20:50:00 20:50:00 0
20:51:00 20:51:00 0
20:52:00 20:52:00 0
3 3 2 */ #include <iostream>
#include <algorithm>
#include <vector>
#include <string> using namespace std; //将数字转化为字符串时间
string turnIntoStr(int hh, int mm, int ss) {
string result = ""; result.push_back(hh / + '');
result.push_back(hh % + '');
result.push_back(':');
result.push_back(mm / + '');
result.push_back(mm % + '');
result.push_back(':');
result.push_back(ss / + '');
result.push_back(ss % + ''); return result;
} //时间变化
string addTime(const string& time, int min) {
//转成时间
int hh, mm, ss;
hh = (time[] - '') * + time[] - '';
mm = (time[] - '') * + time[] - '';
ss = (time[] - '') * + time[] - ''; hh = ((mm + min) / + hh) % ;
mm = (mm + min) % ; return turnIntoStr(hh, mm, ss);
} typedef struct Table{
Table(int sn, int st, bool v) {
serveNum = sn;
serveTime = st;
isVIP = v;
}
int serveNum;
int serveTime;
bool isVIP;
}; typedef struct Client{
Client(string& at, int ut) {
arriveTime = at;
useTime = ut;
waitTime = ;
}
//到达时间
string arriveTime;
int useTime;
//算秒数
int waitTime;
}; bool compare(const Client& A,const Client& B) {
return A.arriveTime < B.arriveTime;
} //客人的到达时间是否超出营业时间
bool isOverTime(const string& time, int min) {
if (time < "08:00:00") return true;
string result = addTime(time, min);
if (result > "21:00:00") return true;
return false;
} //四舍五入
int wtime(int waitTime) {
return (waitTime + ) / ;
} int waitForNextClient(string& now, string& next) {
int t1[] = { , , }, t2[] = {, , };
for (int i = , count = ; i < now.size(); i++) {
if (now[i] >= '' && now[i] <= '') t1[count] = t1[count] * + now[i] - '';
else count++;
}
for (int i = , count = ; i < now.size(); i++) {
if (next[i] >= '' && next[i] <= '') t2[count] = t2[count] * + next[i] - '';
else count++;
}
return (t2[] - t1[]) * + (t2[] - t1[]) * + t2[] - t1[];
} int main() {
vector<Table> table;
vector<Client> ordinary, vip; int t, ut, n, m;
string str;
bool vipflag;
cin >> t;
while (t--) {
cin >> str >> ut >> vipflag;
if (vipflag) vip.push_back(Client(str, ut * ));
else ordinary.push_back(Client(str, ut * ));
} //按到达时间把顾客排序
sort(vip.begin(), vip.end(), compare);
sort(ordinary.begin(), ordinary.end(), compare); //输入桌子数量、vip桌子数量
cin >> n >> m;
for (int i = ; i <= n; i++) table.push_back(Table(, , )); int *vipTableMark = new int[m];
//标注vip桌子号
for (int i = ; i < m; i++) {
cin >> vipTableMark[i];
//cout << vipTableMark[i] << endl;
table[vipTableMark[i] - ].isVIP = ;
} int ordinaryCount = , vipCount = ;
int nextArriveOrdinary = , nextArriveVip = ;
//优化,可以跳过循环的时间,无更替,或者无客人的时候
int jumpHour = , jumpMinute = , jumpSecond = , minServerTime = ;
//标志,记录是否下次循环无更替
bool jump = false;
for (int i = ; i <= ;) {
for (int j = ; j <= ;) {
//每秒钟,遍历一次每张桌子
for (int s = ; s <= ;) {
string nowTime = turnIntoStr(i, j, s);
//遍历之后要对于每位在等待的顾客,等待时间+1
for (int k = ordinaryCount; k < ordinary.size(); k++) {
if (ordinary[k].arriveTime < nowTime) {
ordinary[k].waitTime += jumpHour * + jumpMinute * + jumpSecond;
}
else break;
}
for (int k = vipCount; k < vip.size(); k++) {
if (vip[k].arriveTime < nowTime) {
vip[k].waitTime += jumpHour * + jumpMinute * + jumpSecond;
}
else break;
}
//优化,可以不每分钟遍历一次,每次遍历记录最小的servertime值,下次直接跳转serverTime,相应的,servertime不是自减,而是减去跳转间隔
for (int k = ; k < table.size(); k++) {
if (table[k].serveTime > ) {
table[k].serveTime -= jumpHour * + jumpMinute * + jumpSecond;
}
if (table[k].serveTime == ) {
if (table[k].isVIP == ) {
//VIP桌优先接待已经到达的VIP客户,减少排队时间
if (vipCount < vip.size() && vip[vipCount].arriveTime <= nowTime) {
cout << vip[vipCount].arriveTime << " " << nowTime << " " << wtime(vip[vipCount].waitTime) << endl;
table[k].serveNum++;
table[k].serveTime = vip[vipCount].useTime > ? : vip[vipCount].useTime;//不能超过两个小时
if (nextArriveVip == vipCount)nextArriveVip++;
vipCount++;
}
else if (ordinaryCount < ordinary.size() && ordinary[ordinaryCount].arriveTime <= nowTime) {
cout << ordinary[ordinaryCount].arriveTime << " " << nowTime << " " << wtime(ordinary[ordinaryCount].waitTime) << endl;
table[k].serveNum++;
table[k].serveTime = ordinary[ordinaryCount].useTime > ? : ordinary[ordinaryCount].useTime;
if (ordinaryCount == nextArriveOrdinary)nextArriveOrdinary++;
ordinaryCount++;
}
}
else {
//普通桌可以接受按时达到排队的VIP/非VIP客户
if (ordinaryCount < ordinary.size() && vipCount < vip.size() && vip[vipCount].arriveTime <= nowTime && ordinary[ordinaryCount].arriveTime >= vip[vipCount].arriveTime) {
cout << vip[vipCount].arriveTime << " " << nowTime << " " << wtime(vip[vipCount].waitTime) << endl;
table[k].serveNum++;
table[k].serveTime = vip[vipCount].useTime > ? : vip[vipCount].useTime;
if (nextArriveVip == vipCount)nextArriveVip++;
vipCount++;
}
else if (ordinaryCount < ordinary.size() && vipCount < vip.size() && ordinary[ordinaryCount].arriveTime <= nowTime && ordinary[ordinaryCount].arriveTime <= vip[vipCount].arriveTime) {
cout << ordinary[ordinaryCount].arriveTime << " " << nowTime << " " << wtime(ordinary[ordinaryCount].waitTime) << endl;
table[k].serveNum++;
table[k].serveTime = ordinary[ordinaryCount].useTime > ? : ordinary[ordinaryCount].useTime;
if (ordinaryCount == nextArriveOrdinary)nextArriveOrdinary++;
ordinaryCount++;
}
}
}
if (table[k].serveTime > ) minServerTime = minServerTime > table[k].serveTime ? table[k].serveTime : minServerTime;
} //即此处要等待客人
if ((nextArriveVip < vip.size() || nextArriveOrdinary < ordinary.size())) {
string nextClient;
//只剩vip客人
if (nextArriveVip < vip.size() && nextArriveOrdinary >= ordinary.size()) {
nextClient = vip[nextArriveVip].arriveTime;
if (minServerTime > waitForNextClient(nowTime, nextClient))nextArriveVip++;
}
//只剩普通客人
else if (nextArriveVip >= vip.size() && nextArriveOrdinary < ordinary.size()) {
nextClient = ordinary[nextArriveOrdinary].arriveTime;
if (minServerTime > waitForNextClient(nowTime, nextClient))nextArriveOrdinary++;
}
//队列里两种客人都还有
else if (nextArriveVip < vip.size() && nextArriveOrdinary < ordinary.size()) {
nextClient = ordinary[nextArriveOrdinary].arriveTime > vip[nextArriveVip].arriveTime ? vip[nextArriveVip].arriveTime : ordinary[nextArriveOrdinary].arriveTime;
if (minServerTime > waitForNextClient(nowTime, nextClient) && ordinary[nextArriveOrdinary].arriveTime < vip[nextArriveVip].arriveTime)nextArriveOrdinary++;
else if (minServerTime > waitForNextClient(nowTime, nextClient) && ordinary[nextArriveOrdinary].arriveTime >= vip[nextArriveVip].arriveTime)nextArriveVip++;
}
else {
jump = true;
}
minServerTime = minServerTime > waitForNextClient(nowTime, nextClient) ? waitForNextClient(nowTime, nextClient) : minServerTime;
} if (jump)break; jumpSecond = minServerTime % ;
jumpMinute = (minServerTime / ) % ;
jumpHour = minServerTime / ; minServerTime = ;
int st = s + jumpSecond;
int jt = j + jumpMinute;
int it = i + jumpHour; s = st % ;
j = (jt + st / ) % ;
i = (jt + st / ) / + it; //营业时间到,终止营业
if (turnIntoStr(i, j, s) >= "21:00:00") {
jump = true;
break;
}
}
if (jump)break;
}
if (jump)break;
} for (int k = ; k < table.size(); k++) {
if (k == ) cout << table[k].serveNum;
else cout << " " << table[k].serveNum;
}
cout << endl; system("pause");
return ;
}

1039. Course List for Student (25)

用map思路简单,但是student人数一多,就会超时

 /*
date:2016-09-09
author:CheerM
title:1039.Course List for Student (25)
state:部分完成, 待修改
*/ #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm> using namespace std; int main() {
//学生
map<string, vector<int> > student;
//学生总人数,课程总数,某门课程的ID,选修某门课程的学生人数
int studentNum, coursesNum, courseID, enrollNum;
//
string studentName; cin >> studentNum >> coursesNum; for (int i = ; i < coursesNum; i++) {
cin >> courseID >> enrollNum;
for (int j = ; j < enrollNum; j++) {
cin >> studentName;
student[studentName].push_back(courseID);
}
} string printName;
for (int i = ; i < studentNum; i++) {
cin >> printName;
sort(student[printName].begin(), student[printName].end());
cout << printName << " " << student[printName].size();
for (int i = ; i < student[printName].size(); i++)
cout << " " << student[printName].at(i);
cout << endl;
}
system("pause");
return ;
}

1060. Are They Equal (25)

 /*
date:2016-09-10
author:CheerM
title:1060. Are They Equal (25)
state:通过 边界调节比较细,N有可能大于数字的长度
*/ #include <iostream>
#include <algorithm>
#include <cmath>
#include <string> using namespace std; string turnIntoStr(int a) {
string str = "";
if (a == ) {
str.push_back('');
return str;
}
else if (a < ) a = a + ; int temp1 = abs(a);
int temp2;
while (temp1) {
temp2 = temp1 % ;
temp1 /= ;
str.push_back('' + temp2);
}
if (a < ) str.push_back('-');
reverse(str.begin(), str.end());
return str;
} int main() {
string str1, str2;
string ss1 = "0.", ss2 = "0.";
//记录小数点下标
int dot1 = -, dot2 = -;
//记录第一个非零数字的下标
int index1 = -, index2 = -; int n;
cin >> n >> str1 >> str2; int count = ;
for (int i = ; i < str1.size() || count < n; i++) {
if (count < n && i < str1.size()) {
if (str1[i] != '.' && str1[i] != '' && index1 == -) index1 = i;
else if (str1[i] == '.' && dot1 == -) dot1 = i; if (str1[i] != '.' && index1 != -) {
ss1.push_back(str1[i]);
count++;
}
}
else if (count < n && i >= str1.size()) {
ss1.push_back('');
count++;
}
else if (count >= n && i < str1.size()) {
//继续寻找dot和index的值
if (index1 != - && dot1 != -)break; if (str1[i] != '.' && str1[i] != '' && index1 == -) index1 = i;
else if (str1[i] == '.' && dot1 == -) dot1 = i;
}
}
if (dot1 == -) dot1 = str1.size();
if (index1 == -) index1 = dot1 = str1.size(); count = ;
for (int i = ; i < str2.size() || count < n; i++) {
if (count < n && i < str2.size()) {
if (str2[i] != '.' && str2[i] != '' && index2 == -) index2 = i;
else if (str2[i] == '.' && dot2 == -) dot2 = i; if (str2[i] != '.' && index2 != -) {
ss2.push_back(str2[i]);
count++;
}
}
else if (count < n && i >= str2.size()) {
ss2.push_back('');
count++;
}
else if (count >= n && i < str2.size()) {
//继续寻找dot和index的值
if (index2 != && dot2 != )break; if (str2[i] != '.' && str2[i] != '' && index2 == -) index2 = i;
else if (str2[i] == '.' && dot2 == -) dot2 = i;
}
}
if (dot2 == -) dot2 = str2.size();
//0.0000 == 0.0 = 0
if (index2 == -) index2 = dot2 = str2.size(); ss1 = ss1 + "*10^" + turnIntoStr(dot1 - index1);
ss2 = ss2 + "*10^" + turnIntoStr(dot2 - index2); if (ss1 == ss2) {
cout << "YES";
cout << " " << ss1 << endl;
}
else {
cout << "NO";
cout << " " << ss1 << " " << ss2 << endl;
} system("pause");
return ;
}

1055. The World's Richest (25)

 /*
date:2016-09-10
author:CheerM
title:1055. The World's Richest (25)
state:通过 内存限制不大,但是VS编译爆栈(默认栈空间为1M,开100000结构体数组约4M,肯定要爆栈了),要手动调整设置
空间换时间,并且要稍微剪枝(每次查询,最多输出100位,即每个年龄段只保留前100位有效即可)
*/ #include <iostream>
#include <string>
#include <algorithm> using namespace std; struct Person{
string name;
int age;
int worth;
}; bool compare(Person A, Person B) {
return (A.worth > B.worth) || (A.worth == B.worth && A.age < B.age) || (A.worth == B.worth && A.age == B.age && A.name < B.name);
} int main() { int personNum, questionNum;
Person richestMan[];
int ageRecord[], filter[], count = ;
for (int i = ; i < ; i++) ageRecord[i] = ; cin >> personNum >> questionNum; //记录人物信息
string name_;
int age_, worth_;
for (int i = ; i < personNum; i++) {
cin >> name_ >> age_ >> worth_;
richestMan[i].name = name_;
richestMan[i].age = age_;
richestMan[i].worth = worth_;
} //排序
sort(richestMan, richestMan + personNum, compare); //剪枝,每个age都只取前100位richer,就可以满足查询需求
for (int i = ; i < personNum; i++) {
if (ageRecord[richestMan[i].age] < ) {
ageRecord[richestMan[i].age] ++;
//记录有效的person的index
filter[count++] = i;
}
} //查询richest persons
int richerNum, ageMin, ageMax;
int index = ;
for (int i = ; i < questionNum; i++) {
cin >> richerNum >> ageMin >> ageMax;
cout << "Case #" << i + << ":\n";
for (int j = ; j < count; j++) {
int temp = filter[j];
if (richestMan[temp].age >= ageMin && richestMan[temp].age <= ageMax && index < richerNum) {
cout << richestMan[temp].name << " " << richestMan[temp].age << " " << richestMan[temp].worth << endl;
index++;
}
else{
continue;
} if (index == )break;
}
if (index == )
cout << "None" << endl;
else
index = ;
} system("pause");
return ;
}

【OJ】PAT-A解题报告的更多相关文章

  1. 2014-03-01 春季PAT 1073-1076解题报告

    今天下午的PAT考试状态不理想,回来怒刷了一遍,解题报告如下: 1073. Scientific Notation (20) 基本模拟题,将一长串的科学计数转换为普通的数字表示方式.思路是是数组存储输 ...

  2. 【CometOJ】Comet OJ - Contest #8 解题报告

    点此进入比赛 \(A\):杀手皇后(点此看题面) 大致题意: 求字典序最小的字符串. 一场比赛总有送分题... #include<bits/stdc++.h> #define Tp tem ...

  3. 【九度OJ】题目1026:又一版 A+B 解题报告

    [九度OJ]题目1026:又一版 A+B 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1026 题目描述: 输入两个不超过 ...

  4. 【九度OJ】题目1124:Digital Roots 解题报告

    [九度OJ]题目1124:Digital Roots 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1124 题目描述: T ...

  5. 【九度OJ】题目1074:对称平方数 解题报告

    [九度OJ]题目1074:对称平方数 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1074 题目描述: 打印所有不超过n( ...

  6. 【九度OJ】题目1064:反序数 解题报告

    [九度OJ]题目1064:反序数 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1064 题目描述: 设N是一个四位数,它的 ...

  7. 【九度OJ】题目1083:特殊乘法 解题报告

    [九度OJ]题目1083:特殊乘法 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1083 题目描述: 写个算法,对2个小于 ...

  8. 【九度OJ】题目1183:守形数 解题报告

    [九度OJ]题目1183:守形数 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1183 题目描述: 守形数是这样一种整数, ...

  9. 【九度OJ】题目1015:还是A+B 解题报告

    [九度OJ]题目1015:还是A+B 解题报告 标签(空格分隔): 九度OJ http://ac.jobdu.com/problem.php?pid=1015 题目描述: 读入两个小于10000的正整 ...

随机推荐

  1. Python 学习笔记1

    1.Python2.x与3​​.x版本区别 2.常量与变量 3.if  elif  else 4.注释 5.用户交互 6.字符串拼接 7.文件扩展名 8.缩进 9.运算符 10.while循环 Pyt ...

  2. zeromq 学习和python实战

    参考文档: 官网 http://zeromq.org/ http://www.cnblogs.com/rainbowzc/p/3357594.html   原理解读 zeromq只是一层针对socke ...

  3. Windows工作集内存

    Windows任务管理器默认情况下,“内存(私人工作集)”列处于选中状态. 私人工作集是工作集的一个子集,它是描述每个进程所使用的内存数量的技术术语.私人工作集专门描述了某个进程正在使用的且无法与其他 ...

  4. Ajax的实现

    一.JavaScript的ajax //Ajax var xhr; if(window.XMLHttpRequest){ //除IE外的浏览器 xhr = new XMLHttpRequest() } ...

  5. 【读书笔记】iOS-Xcode-模拟器操作的一些快捷键

    Cmd+1/2/3       可以切换模拟器的显示比例. Option+Shift     可以在模拟器中调出双指拖动效果. Option      可以在模拟器中调出双指放大缩小效果. Comma ...

  6. CSS 相邻选择器(七)

    一.相邻选择器 相邻选择器前后部分之间用一个加号(+)隔开,前后两部分选择反符在结构上属于同级关系,如 相邻选择器,是根据左侧选择符指定相邻元素,然后在该相邻元素后面寻找匹配匹配右侧选择符的相信元素 ...

  7. 可折叠的ToolBar+抽屉菜单NavigationView+浮动按钮FloatButton

    使用Material Design风格的ToolBar和抽屉导航 先看个简单的运行效果 主要记录下布局的写法 1 用到的Google Design依赖和V7包依赖 compile 'com.andro ...

  8. Windows7下Blend for Visual Studio 2012使用问题

    目前开发的系统里很多控件样式和动画比较复杂,应该是之前同事用Blend做的,这种神器不用太浪费了,自己也准备试试. 系统环境Windows7+Visual Studio 2012 1.Windows7 ...

  9. iOS开发之网络编程--4、NSURLSessionDataTask实现文件下载(离线断点续传下载) <进度值显示优化>

    前言:根据前篇<iOS开发之网络编程--2.NSURLSessionDownloadTask文件下载>或者<iOS开发之网络编程--3.NSURLSessionDataTask实现文 ...

  10. 做一些Spring AOP做过的事,封装 jdk动态代理成为一个黑盒子

      怎么使用eclise 抽取方法,请看  利用eclipse 抽取代码片段为方法   抽取完成之后,还需要 ① 将Collection.class换成  target.getClass(),targ ...