结构体成员指针初始化
不可以正确运行的初始化方式(1):
#include
#include
#include
//#include "a.h"
//char a[100];
struct stu
{
char* name;
int num;
}*pst,st;
void init_pst()
{
pst = (struct stu *)malloc(size...
分类:
其他好文 时间:
2015-03-03 11:45:41
阅读次数:
175
Service中有四个重要函数:publicIBinderonBind(Intentarg0);//必须实现,返回接口给Service
publicvoidonCreate();//Service创建时调用
publicvoidonStart(Intentintent,intstartId);//通过startService()会调用
publicvoidonDestroy();//销毁时StopService()调用通过St..
分类:
移动开发 时间:
2015-03-03 06:25:27
阅读次数:
214
一、三个静态变量java.lang.System提供了三个静态变量System.in(默认键盘)System.out(默认显示器)System.err二、重写向方法System提供了三个重定向方法方法说明static void setErr(PrintStream errr)重定向标准错误输出流st...
分类:
编程语言 时间:
2015-03-03 06:22:44
阅读次数:
177
1 package string.demo; 2 3 /* 4 * 将数组变为字符串输出 5 */ 6 public class StringBuilderTest 7 { 8 9 /**10 * @param args11 */12 public st...
分类:
编程语言 时间:
2015-03-02 18:49:09
阅读次数:
143
#include
#include
typedef __int64 LL;
LL dp[10][1<<10];
int n, m;
int st, flag;
void dfs(int i, int s, int ns, int j, LL num)
{
if(j == m)
{
dp[i+1][ns] += num;
return;
}
if((s&(1<<j)) == 0)...
分类:
其他好文 时间:
2015-03-02 14:51:37
阅读次数:
115
Fielding将他对互联网软件的架构原则,定名为REST,即Representational State Transfer的缩写。翻译是"表现层状态转化"。如果一个架构符合REST原则,就称它为RESTful架构。要理解RESTful架构,最好的方法就是去理解Representational St...
分类:
其他好文 时间:
2015-03-02 10:46:55
阅读次数:
156
Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 36864Accepted: 17263Case Time Limit: 2000MSDescriptionFor the daily milking, F...
分类:
其他好文 时间:
2015-03-02 09:24:18
阅读次数:
203
本文基于ST官方demo板STM32F429 Discovery硬件平台,以看图说话的形式给大家讲解LTDC的主要参数配置。关于本文提到的代码部分均摘自本人另一片文章《STM32F429之LTDC代码模板》,LCD硬件为240x320,驱动IC为ili9341。本文目的意在让大家通过几张图就能掌握STM32F429 LTDC控制器的配置要领,而从干涩的文字中解脱出来,方便记忆。当然本文只是讲解了LTDC一些常用的设置,关于更多细节的操作还是得参照ST的官方datasheet。...
分类:
其他好文 时间:
2015-03-02 01:01:48
阅读次数:
1051
原理讲解:http://dongxicheng.org/structure/lca-rmq/
在线算法模板:
/**
LCA在线算法O(nlogn)
主函数调用:
init();
tot=0,dir[1]=0;
dfs(1,1);
ST(2*n-1);
int lca=LCA(u,v);
*/
#include
#include
#include
#include
#inclu...
分类:
编程语言 时间:
2015-03-01 18:33:50
阅读次数:
168
A. Vitaly and Strings题意:给出两个长度相同的字符串,问是否存在一个字符串,该串的字典序大于输入的第一个串 且 小于第二个串。分析:找出比第一个串大一的串,看看它是否小于第二个串,是的话就满足,否则不存在这样的串。 1 #include 2 using namespace st....
分类:
其他好文 时间:
2015-03-01 10:26:55
阅读次数:
184