uTank-木头
每一个你不满意的现在,都有一个你没有努力的曾经。
04 2015 档案
PAT (Basic Level) Practise:1039. 到底买不买
摘要:【题目链接】小红想买些珠子做一串自己喜欢的珠串。卖珠子的摊主有很多串五颜六色的珠串,但是不肯把任何一串拆散了卖。于是小红要你帮忙判断一下,某串珠子里是否包含了全部自己想要的珠子?如果是,那么告诉她有多少多余的珠子;如果不是,那么告诉她缺了多少珠子。为方便起见,我们用[0-9]、[a-z]、[A-Z]... 阅读全文
posted @ 2015-04-30 18:30 uTank 阅读(623) 评论(0) 推荐(0)
PAT (Basic Level) Practise:1013. 数素数
摘要:【题目连接】令Pi表示第i个素数。现任给两个正整数M 2 #include 3 4 int isPrime(unsigned int num) 5 { 6 int i, s; 7 8 s = sqrt(num); 9 for(i = 2; i 0 && m > 0)... 阅读全文
posted @ 2015-04-30 17:52 uTank 阅读(280) 评论(0) 推荐(0)
RelativeLayout相对布局
摘要:RelativeLayout相对布局常用属性:第一类:属性值为true或falseandroid:layout_centerHrizontal 水平居中android:layout_centerVertical 垂直居中android:layout_centerInparent 相对于父元素完全居中... 阅读全文
posted @ 2015-04-29 10:33 uTank 阅读(187) 评论(0) 推荐(0)
PAT (Basic Level) Practise:1036. 跟奥巴马一起编程
摘要:【题目链接】美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧!输入格式:输入在一行中给出正方形边长N(3 2 3 voi... 阅读全文
posted @ 2015-04-28 18:09 uTank 阅读(2198) 评论(0) 推荐(0)
Core Java Volume I — 4.10. Class Design Hints
摘要:4.10. Class Design HintsWithout trying to be comprehensive or tedious, we want to end this chapter with some hints that will make your classes more ac... 阅读全文
posted @ 2015-04-23 15:23 uTank 阅读(199) 评论(0) 推荐(0)
Core Java Volume I — 4.7. Packages
摘要:4.7. PackagesJava allows you to group classes in a collection called a package. Packages are convenient for organizing your work and for separating yo... 阅读全文
posted @ 2015-04-23 14:57 uTank 阅读(358) 评论(0) 推荐(0)
蓝牙(Profile)构成
摘要:蓝牙剖面(Profile)构成蓝牙剖面(Profile)及其相互关系蓝牙SIG定义13种蓝牙剖面及其相互关系如下图:一个剖面若直接或间接采用了另一个剖面的部分或全部功能则称该剖面依赖于另一剖面。如上图描述的剖面关系是:所有剖面都依赖于普通接入剖面;拨号网络、传真、耳机、局域网接入以及普通对象交换剖面... 阅读全文
posted @ 2015-04-21 10:17 uTank 阅读(3645) 评论(0) 推荐(0)
Android开发之Java必备基础
摘要:Android开发之Java必备基础Java类型系统Java语言基础数据类型有两种:对象和基本类型(Primitives)。Java通过强制使用静态类型来确保类型安全,要求每个变量在使用之前必须先声明。这种机制和非静态类型的语言有很大差别,非静态语言不要求对变量进行声明。虽然显式类型声明看起来较繁琐... 阅读全文
posted @ 2015-04-19 23:03 uTank 阅读(15307) 评论(0) 推荐(0)
主机控制器接口(HCI)
摘要:主机控制器接口(HCI)提供了一种访问蓝牙硬件能力的通用接口。HCI固件通过访问基带命令、链路管理器命令、硬件状态寄存器、控制寄存器以及事件寄存器实现对蓝牙硬件的HCI命令。HCI是通过包的方式来传送数据、命令和事件的,所有在主机和主机控制器之间的通信都以包的形式进行。包括每个命令的返回参数都通过特... 阅读全文
posted @ 2015-04-19 16:50 uTank 阅读(2846) 评论(0) 推荐(0)
蓝牙协议体系结构
摘要:蓝牙协议体系结构 整个蓝牙协议体系结构可分为底层硬件模块、中间协议层和高端应用层三大部分。 链路管理层(LMP,Link Management Protocol)、基带层(BB)和射频(RF)构成蓝牙的底层模块。RF通过2.4GHz无需授权的ISM频段,实现数据位流的过滤和传输,它主要定义了蓝牙... 阅读全文
posted @ 2015-04-19 16:27 uTank 阅读(5134) 评论(0) 推荐(0)
蓝牙SIG
摘要:蓝牙SIG 蓝牙SIG是一个国际性的非营利组织,它的目的是制定蓝牙的技术规范和推广蓝牙技术的应用。该组织由发起会员(Promoter)、合作会员(Associate Member)和接受会员(Adopter)三种会员组成。其中,发起会员共有9个,即3Com、爱立信、IBM、英特尔、朗讯、微软、摩托... 阅读全文
posted @ 2015-04-19 15:41 uTank 阅读(1411) 评论(0) 推荐(0)
Core Java Volume I — 4.6. Object Construction
摘要:4.6. Object ConstructionYou have seen how to write simple constructors that define the initial state of your objects. However, since object constructi... 阅读全文
posted @ 2015-04-17 09:51 uTank 阅读(233) 评论(0) 推荐(0)
Core Java Volume I — 4.5. Method Parameters
摘要:4.5. Method ParametersLet us review the computer science terms that describe how parameters can be passed to a method (or a function) in a programming... 阅读全文
posted @ 2015-04-16 15:40 uTank 阅读(304) 评论(0) 推荐(0)
Core Java Volume I — 4.4. Static Fields and Methods
摘要:4.4. Static Fields and MethodsIn all sample programs that you have seen, the main method is tagged with the static modifier. We are now ready to discu... 阅读全文
posted @ 2015-04-15 17:49 uTank 阅读(313) 评论(0) 推荐(0)
Core Java Volume I — 4.1. Introduction to Object-Oriented Programming
摘要:4.1. Introduction to Object-Oriented ProgrammingObject-oriented programming, or OOP for short, is the dominant programming paradigm these days, having... 阅读全文
posted @ 2015-04-15 15:10 uTank 阅读(268) 评论(0) 推荐(0)
Core Java Volume I — 3.10. Arrays
摘要:3.10. ArraysAn array is a data structure that stores a collection of values of the same type. You access each individual value through an integer inde... 阅读全文
posted @ 2015-04-14 14:24 uTank 阅读(193) 评论(0) 推荐(0)
Core Java Volume I — 3.8. Control Flow
摘要:3.8. Control FlowJava, like any programming language, supports both conditional statements and loops to determine control flow. We will start with the... 阅读全文
posted @ 2015-04-14 14:22 uTank 阅读(470) 评论(0) 推荐(0)
Core Java Volume I — 3.6. Strings
摘要:3.6. StringsConceptually, Java strings are sequences of Unicode characters(Java的字符串是一个Unicode序列). For example, the string "Java\u2122" consists of the... 阅读全文
posted @ 2015-04-14 14:20 uTank 阅读(257) 评论(0) 推荐(0)
Core Java Volume I — 3.5. Operators
摘要:3.5. OperatorsThe usual arithmetic operators +, -, *, / are used in Java for addition, subtraction, multiplication, and division. The / operator denot... 阅读全文
posted @ 2015-04-13 18:05 uTank 阅读(338) 评论(0) 推荐(0)
Core Java Volume I — 3.4. Variables
摘要:3.4. VariablesIn Java, every variable has a type. You declare a variable by placing the type first, followed by the name of the variable. Here are som... 阅读全文
posted @ 2015-04-13 18:04 uTank 阅读(255) 评论(0) 推荐(0)
Core Java Volume I — 3.3. Data Types
摘要:3.3. Data TypesJava is a strongly typedlanguage(强类型语音). This means that every variable must have a declared type(每个变量都必须声明类型). There are eight primiti... 阅读全文
posted @ 2015-04-13 17:29 uTank 阅读(265) 评论(0) 推荐(0)
Core Java Volume I — 3.1. A Simple Java Program
摘要:Let’s look more closely at one of the simplest Java programs you can have—one that simply prints a message to console:public class FirstSample{ pub... 阅读全文
posted @ 2015-04-13 10:17 uTank 阅读(185) 评论(0) 推荐(0)
Think Python - Chapter 18 - Inheritance
摘要:In this chapter I present classes to represent playing cards, decks of cards, and poker hands.If you don't play poker, you can read about it at http:/... 阅读全文
posted @ 2015-04-03 11:24 uTank 阅读(373) 评论(0) 推荐(0)