- 博客(24)
- 资源 (4)
- 收藏
- 关注
原创 Android学习笔记---ImageButton
ImageButton用图片显示一个可以被用户按下和单击的按钮。默认情况下,ImageButton看起来和一般的Button没有什么区别。标准的Button将会在状态变化的时候,显示不同的背景颜色。ImageButton表面显示的图片通过XML属性 "android:sr
2011-09-30 21:18:49 885
原创 Android学习笔记--播放MP3
今天继续Android课程的学习。主要学习了在Android平台下面播放MP3音乐的技巧。通过今天的学习,为后面开发应用过程中为应用程序添加背景音乐,以及开发音乐播放器打下基础。以下是我们从MediaPlayer类中得到的MediaPlayer对象的一个状态图:首
2011-09-30 20:09:46 863
转载 从PC中向Android模拟器中复制文件
首先打开一个DOS命令窗口,最好定位到你的音乐文件存放的目录(等下添加文件时可以少输几个字符)。所有安装程序和添加的文件都是放在模拟器的 sdcard目录下,如果直接添加文件,以后文件多了会显得乱,所以最好在模拟器上分门别类的建好文件夹,再把对应的文件添加进去。 1 在
2011-09-30 18:18:50 7396
转载 Android中Relativelayout属性
// 相对于给定ID控件android:layout_above 将该控件的底部置于给定ID的控件之上;android:layout_below 将该控件的底部置于给定ID的控件之下;android:layout_toLeftOf 将该控件的右边缘与
2011-09-29 11:00:48 543
转载 求字符串排列
题目:输入一个字符串,打印出该字符串中字符的所有排列。例如输入字符串abc,则输出由字符a、b、c所能排列出来的所有字符串abc、acb、bac、bca、cab和cba。分析:这是一道很好的考查对递归理解的编程题,因此在过去一年中频繁出现在各大公司的面试、笔试题中。
2011-09-28 22:10:30 374
原创 单链表反转
这个过程比较简单,就写了一个main函数链表反转#include using namespace std;struct Node{ int data; Node* next;};int main(){ Node *phead = NULL; //构建
2011-09-26 21:28:02 337
原创 strcpy 和 strcat
这两个函数在面试中,经常会让大家写,今天随手写了一下,也没考虑太多细节,有问题的,后面再修改。#include using namespace std;//不能使用引用,因为src以及dest变量在程序中的值都会改变bool _strcpy(char *dest,co
2011-09-26 21:26:39 400
转载 常量折叠
首先来看一个例子:int main(int argc, char* argv[]){const int i=0;int *j = (int *) &i;*j=1;coutcoutcoutreturn 0;}结果是0012ff7c
2011-09-24 22:51:00 1112
原创 android学习笔记---SQLite数据库的使用
Android平台为用户提供了轻量级的数据库 SQLite,可供用户存储相关数据。在使用SQLite开发时候,主要用到以下三个类:SQLiteOpenHelper:A helper class to manage database creation and version
2011-09-24 15:46:13 1668 1
原创 android学习笔记---控制台访问SQLite
Android系统为用户提供了一个轻量级的数据 SQLite,可供用户存储数据;我们可以通过adb工具来在控制台下访问数据库,查看数据库相关信息。在控制台输入:adb shell 可以进入模拟器的控制台管理界面# lslssqlite_stmt_journalsco
2011-09-24 15:28:41 1667 1
原创 Android下定位开发
首先来看一段Android开发文档中提供的有关定位开发的介绍:Location and maps-based applications are compelling for mobile device users. You can build these capabiliti
2011-09-15 17:42:37 1629
原创 STL Maps -- Associative Arrays
Suppose that you're working with some data that has values associated with strings -- for instance, you might have student usernames and you
2011-09-11 17:09:03 422
转载 STL Iterators
The concept of an iterator is fundamental to understanding the C++ Standard Template Library (STL) because iterators provide a means for acc
2011-09-11 17:03:30 392
转载 The STL Vector Class
One of the basic classes implemented by the Standard Template Library is thevector class. A vector is, essentially, aresizable array; th
2011-09-11 15:45:56 357
原创 What's the meaning of EOF ?
The use and meaning of EOF seems to cause a lot of confusion with some new coders, hopefully this explanation will help you understand bet
2011-09-08 21:44:49 640
原创 What's difference between main() / void main() / int main() / int main(void) ......?
A very common question is "What's the difference between void main and int main?". This particular FAQ tries to answer that and more, cove
2011-09-08 21:23:47 563
原创 How to determine the size of an object of class?
There are many factors that decide the size of an object of a class in C++. These factors are:Size of all non-static data membersOrder o
2011-09-08 20:20:05 510
转载 What's the difference between declaring and defining something in C and C++?(C和C++中,声明和定义的区别)
原文地址:http://www.cprogramming.com/declare_vs_define.htmlIn C and C++, there is a subtle(细微的) but important distinction between the meaning
2011-09-06 21:30:15 716
转载 Work with dates and times(C和C++程序设计中使用日期和时间)
原文链接:http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048383636&id=1043284392&utm_source=newletter&utm_medium=email&utm_campaign=fif
2011-09-06 11:46:41 618
转载 C++0x: The future of C++
原文链接http://www.cprogramming.com/c++11/what-is-c++0x.htmlWhat is C++0x?C++0x is the working name for the new standard for C++, adding m
2011-09-05 21:48:31 466
转载 Improved Type Inference in C++11: auto, decltype, and the new function declaration syntax
原文链接地址:http://www.cprogramming.com/c++11/c++11-auto-decltype-return-value-after-function.htmlNote: C++11 is the now offical name for the
2011-09-05 21:45:49 696
原创 C++编程对缓冲区的理解
原文链接:http://www.vckbase.com/document/viewdoc/?id=1897C++编程对缓冲区的理解韩耀旭什么是缓冲区缓冲区又称为缓存,它是内存空间的一部分。也就是说,在内存空间中预留了一定的存储空间,这些存储空间用来缓冲输入或输出的
2011-09-05 17:08:51 327
转载 Programs as Data: Function Pointers(函数指针)
原文链接:http://www.cprogramming.com/tutorial/function-pointers.htmlA function pointer is a variable that stores the address of a function tha
2011-09-04 16:27:06 464
原创 How Does Shell Script Looping Work?(shell程序设计中的循环)
Shell scripts written in Bash can implementlooping, or iteration, with thewhile,until, andforconstructs. In each case, a block of code is ex
2011-09-04 12:04:06 557
哈弗曼树(C++语言实现,文件操作发送方和接收方)
2008-12-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人