现在位置: 首页 > yflzug8p发表的所有文章
  • 07月
  • 29日
综合 ⁄ 共 3011字 评论关闭
生成和运行apk文件相关的组件:   apk文件的编译流程图如下: 下面逐一说明: 项目的源文件结构如下: [html] view plaincopy E:\Example\   │  AndroidManifest.xml   │     ├─assets   ├─res   │  ├─drawable-hdpi   │  │      icon.png   │  │         │  ├─drawable-ldpi   │  │      icon.png   │  │         │  ├─drawable-mdpi   │  │      icon.png   │  │         │  ├─layout   │  │      main.xml   │  │         │  └─values   │          strings.xml   │             └─src ......
阅读全文
  • 05月
  • 31日
数据库 ⁄ 共 1015字 评论关闭
tinyint , smallint ,mediumint,int,bigint   取值范围 类型 字节 最小值 最大值     (带符号的/无符号的) (带符号的/无符号的) TINYINT 1 -128 127     0 255 SMALLINT 2 -32768 32767     0 65535 MEDIUMINT 3 -8388608 8388607     0 16777215 INT 4 -2147483648 2147483647     0 4294967295 BIGINT 8 -9223372036854775808 9223372036854775807     0 18446744073709551615 1,char与varcha......
阅读全文
  • 12月
  • 19日
综合 ⁄ 共 681字 评论关闭
题意: 输入一个字典,字典格式为“英语à外语”的一一映射关系 然后输入若干个外语单词,输出他们的 英语翻译单词,如果字典中不存在这个单词,则输出“eh” cin、cout 加速 ios::sync_with_stdio(false) 取消IO同步,加快执行效率。 注意这样以后就一定不要cin\cout和scanf\printf混用了。 #include <map> #include <cstdio> #include <string> #include <iostream> using namespace std; map<string,string> mp; int main() { #ifndef ONLINE_JUDGE freopen("in.cpp","r",stdin); freo......
阅读全文
  • 12月
  • 19日
综合 ⁄ 共 762字 评论关闭
http://poj.org/problem?id=2965 跟POJ1753相似,暴力枚举。我这里用了迭代加深。 #include <stdio.h> #include <string.h> int chess; int step, flag; int row[20], col[20]; inline void flip(int pos) { chess = chess^(1<<pos); for(int i=0; i<4; ++i) chess=chess^(1<<(pos/4*4 + i)); for(int i=0; i<4; ++i) chess=chess^(1<<(pos%4 + i*4)); } void dfs(int pos,int k) { if(k==step) { flag = (chess==0xFFFF); return ; ......
阅读全文
  • 06月
  • 09日
综合 ⁄ 共 2228字 评论关闭
jQuery核心中, 有一组队列控制方法, 这组方法由queue()/dequeue()/clearQueue()三个方法组成, 它对需要连续按序执行的函数的控制可以说是简明自如, 主要应用于animate ()方法, ajax以及其他要按时间顺序执行的事件中. 先解释一下这组方法各自的含义. queue(name,[callback]): 当只传入一个参数时, 它返回并指向第一个匹配元素的队列(将是一个函数数组,队列名默认是fx); 当有两个参数传入时, 第一个参数还是默认为fx的的队列名, 第二个参数又分两种情况, 当第二个参数是一个函数时, 它将在匹配的元素的队列最后添加一个函数. 当第......
阅读全文
  • 04月
  • 16日
综合 ⁄ 共 10598字 评论关闭
Marvell-Linux研究—mfp.c/.h源代码分析   转载时请注明出处和作者联系方式:http://blog.csdn.net/absurd 作者联系方式:李先静 <xianjimli at hotmail dot com> 更新时间:2007-7-9   Multi-Function Pin是PXA3xx中的一个新概念,它可以让一个Pin具有多个功能,达到复用的效果,从而减少PIN的个数。比如说,一个Pin可以作为GPIO,可以作为时钟信号,也可以作为地址线或者数据线,完全根据软件配置决定它的实际用途。   虽然同一个Pin可以用作多种不同的用途,但在任意时刻只有一种用途,这是很容易理解的,否则就会......
阅读全文
  • 04月
  • 13日
综合 ⁄ 共 628字 评论关闭
今天偶然间发现一个属性,让我兴奋很久,跟大家分享一下(知道的不要见笑哈,呵呵): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:drawableLeft="@drawable/icon" androi......
阅读全文
  • 04月
  • 12日
综合 ⁄ 共 1155字 评论关闭
绝世大坑: list.insert(it,xx)是在it前面插入。如果想在it后面插入最好用list.insert(++(tmp=it),xx)。  list.insert(it,x)一般返回it下一个元素。 感受下: #include <iostream> #include <list> #include <vector> using namespace std; typedef list<char>::iterator It; void display(list<char>& lst){//for debug for(It it=lst.begin();it!=lst.end();it++){ cout<<*it<<" "; }cout<<endl; } int calc(list<char>&_lst) { int size0=_lst.size(......
阅读全文
  • 03月
  • 20日
综合 ⁄ 共 827字 评论关闭
http://blog.csdn.net/xyz_lmn/article/details/14222939 作为移动应用开发者,我们总希望发布的apk文件越小越好,不希望资源文件没有用到的图片资源也被打包进apk,不希望应用中使用了高于minSdk的api,也不希望AndroidManifest文件存在异常,lint就能解决我们的这些问题。Android lint是在ADT 16提供的新工具,它是一个代码扫描工具,能够帮助我们识别代码结构存在的问题,主要包括: 1)布局性能(以前是 layoutopt工具,可以解决无用布局、嵌套太多、布局太多) 2)未使用到资源 3)不一致的数组大小 4)国际化问题......
阅读全文
  • 03月
  • 20日
综合 ⁄ 共 7004字 评论关闭
包括邻接链表、有向无向图、带权图、增删顶点和边、查找、连通、DFS和BFS等。这只是一个最初版本,有些复杂的算法还没有实现。 package structure; //图的邻接链表的节点 public class GraphListNode { private int vertex;//图的顶点 private int weight;//边的权重 private boolean visited;//是否访问过 //带权重图的节点 public GraphListNode(int vertex,int weight){ this.vertex = vertex; this.weight = weight; this.visited = false;//默认为未访问 } public boolean isVisited() { return visi......
阅读全文
  • 03月
  • 16日
综合 ⁄ 共 954字 评论关闭
1通过awk脚本运行awk程序:awk-f program_file_name input_files #!/bin/awk -f BEGIN { print "What is your name,sir?"; while(getline>0) print "Hi",$1,"Nice to meet you!" } 2 FILENAME, FNR awk '{print FILENAME, FNR;}' student-marks bookdetails student-marks 1student-marks 2student-marks 3student-marks 4student-marks 5bookdetails 1bookdetails 2bookdetails 3bookdetails 4bookdetails 5 3 倒序输出文本  awk '{line[NR]=$0} END{i=NR;while(i>0) {print line[i];i=i-1}} ' rea......
阅读全文
  • 01月
  • 29日
综合 ⁄ 共 108字 评论关闭
1. 以下写法不对: type="text/javascript" src="jquery.js"/>  得这么写:<script type="text/javascript" src="jquery.js"></script>
阅读全文