关闭

Building Your First App

This works fine for the button, but not as well for the text field, because the user might type something longer. It would be nice to fill the unused screen width with the text field. You can do this ...
阅读(201) 评论(0)

Android Studio 设置内存大小及原理,优化运行速度

Android studio 1.0.2默认最大内存是750M,这样跑起来非常的卡,难以忍受,机器又不是固态硬盘,最后发现,这个默认值是可以修改的,在android studio目录下找到:studio64.exe.vmoptions文件,绿色部分为修改的参数(-Xmx1050m),将默认参数修改为1050MB,这样跑起来就非常流畅了,如果觉得还是不够流畅,可以改得更高: -Xms128...
阅读(2345) 评论(0)

URAL 1684 Jack's Last Word

#include #define MAX_LONG 75001 char T[MAX_LONG << 1]; char S[MAX_LONG]; int next[MAX_LONG << 1]; int flag[MAX_LONG]; int getLen(char *string){ char *p = string; while (*p != '\0'){ p++; } re...
阅读(183) 评论(0)

URAL 1684 Jack's Last Word

#include #define MAX_LONG 75001 char S[MAX_LONG]; char T[MAX_LONG]; int next[MAX_LONG]; int subStrLen[MAX_LONG]; int numOfSubStrs; int getLen(char *string){ char *p = string; while (*p != '\0'){ ...
阅读(163) 评论(0)

URAL 1423 String Tale

#include #define MAX_LONG 250001 int N; char S[MAX_LONG * 2]; char T[MAX_LONG]; int next[MAX_LONG]; int main(){ scanf("%d %s %s", &N, S, T); int len = N * 2; int i; for (i = 0; i < N; i++){ ...
阅读(164) 评论(0)

URAL 1354 Palindrome. Again Palindrome (回文 + KMP)

#include char string[10001]; char reverseString[10001]; int next[10001]; int main(){ scanf("%s", string); int len = 0; int index; for (index = 0; string[index] != '\0'; index++){ len++; } ...
阅读(173) 评论(0)

URAL 1297 Palindrome (回文+中心扩展)

#include char string[1001]; int main(){ scanf("%s", string); int len = 0; int i; for (i = 0; string[i] != '\0'; i++) len++; int maxLen = 0; int start; int mid, left, right; for (mid = ...
阅读(139) 评论(0)

URAL 1723 Sandro's Book

#include char string[51]; int letterCount[26]; int main(){ scanf("%s\n", string); int i; for (i = 0; string[i] != '\0'; i++) letterCount[string[i] - 'a']++; int maxCount = -1; int spell; ...
阅读(325) 评论(0)

URAL 1279 Warehouse

#include #define MAX_HIGHT 1000 int numOfRows, numOfColumns, numOfNewContainers; int sections[MAX_HIGHT + 1]; int result; int main(){ scanf("%d%d%d", &numOfRows, &numOfColumns, &numOfNe...
阅读(239) 评论(0)

URAL 1534 Football in Gondor

#include long long scoredBalls, missedBalls; long long numOfMatches; long long max, min; int main(){ scanf("%lld%lld%lld", &scoredBalls, &missedBalls, &numOfMatches); long long leftScoredBa...
阅读(293) 评论(0)

POJ 3687 Labeling Balls (反向拓扑排序)

#include #define MAX_LABEL 200 #define MAX_WEIGHT 200 #define MAX_CONSTAINS 40000 int numOfBalls, numOfConstrains; int maxLabel, maxWeight; int lighter, heavier; int fail; int label, weight; int wei...
阅读(512) 评论(0)

HDU 1688 Sightseeing

#include #define MAX_CITIES 1000 #define MAX_ROADS 10000 #define INF 1000000 int numOfCities, numOfRoads; typedef struct Road{ int to; int len; int next; }Road; Road RoadArray[MAX_RO...
阅读(428) 评论(0)

Binder进程间通信机制的Client进程和Server进程的通信过程

读书笔记——Binder进程间通信机制的Client进程和Server进程的一次进程间通信过程...
阅读(363) 评论(0)

Handler消息处理机制

public void dispatchMessage(Message msg) { if (msg.callback != null) { //通过post(Runable r)发送消息,会把Runable 封装成 Message,最后调用handlerCallback来处理消息 handleCallback(msg); } e...
阅读(266) 评论(1)

Zygote进程启动System Server进程的过程

Android系统启动时,Init进程会把Zygote进程启动起来,而Zygote进程会把System Server进程启动起来。...
阅读(239) 评论(0)
189条 共13页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:40179次
    • 积分:2196
    • 等级:
    • 排名:第18925名
    • 原创:187篇
    • 转载:2篇
    • 译文:0篇
    • 评论:4条
    最新评论