现在位置: 首页 > zander发表的所有文章
  • 09月
  • 07日
综合 ⁄ 共 107字 评论关闭
                   MyIterface.aidl文件中接口的定义 Person.java和Person.aidl   服务器端Service的实现    对service的配置 客户端对远程方法的调用 done
阅读全文
  • 01月
  • 08日
综合 ⁄ 共 3042字 评论关闭
Description You are a butler in a large mansion. This mansion has so many rooms that they are merely referred to by number (room 0, 1, 2, 3, etc...). Your master is a particularly absent-minded lout and continually leaves doors open throughout a particular floor of the house. Over the years, you have mastered the art of traveling in a single path through the sloppy rooms and closing the doors behind you. Your biggest problem is determining whether it is possible to find a path through t......
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 3321字 评论关闭
intel hex文件格式浅析        最近学习EZ-USB FX2LP CY7C68013A固件和上位机程序的开发,通过Keil uVision2开发的固件烧写程序有两种,一种为hex文件格式,可以烧写到USB芯片内部RAM中;另一种为iic文件,可以烧写到CY7C68013A(128脚)外配的eeprom中。这两种固件文件可以通过cypress公司提供的专业下载工具下载到usb芯片或eeprom中。为了调试方便,想把下载程序集成到自己编写的vc界面中,首先编写了hex文件的烧写程序,(接下来有时间会试着编写一下icc文件的下载程序)再此过程中,学习了hex文件的格式,下面跟进网上查找的资料......
阅读全文
  • 05月
  • 28日
综合 ⁄ 共 8472字 评论关闭
引言         最近在阅读笔者的文章时,对java类的生命周期问题有一些疑惑,笔者打开百度搜了一下相关的问题,看到网上的资料很少有把这个问题讲明白的,主要是因为目前国内java方面的教材大多只是告诉你“怎样做”,但至于“为什么这样做”却不多说,所以造成在基础和原理方面的知识比较匮乏。         首先来了解一下jvm(java虚拟机)中的几个比较重要的内存区域,这几个区域在java类的生命周期中扮演着比较重要的角色: 方法区:在java的虚拟机中有一块专门用来存放已经加载的类信息、常量、静态变量以及方法代码的内存区域,叫......
阅读全文
 1、cvNamedWindow   该函数为开放计算机视觉(OpenCV)库库函数,用来创建指定的窗口。   定义:   int cvNamedWindow( const char* name, int flags=CV_WINDOW_AUTOSIZE );   参数:   name 窗口的名字,它被用来区分不同的窗口,并被显示为窗口标题。   flags 窗口属性标志。可以选择CV_WINDOW_AUTOSIZE(1)和0两种值。CV_WINDOW_AUTOSIZE这个标志被设置后1,表示以固定的窗口尺寸显示图像,用户不能手动改变窗口大小。如果设置为0,则窗口的大小可以手动改变,会自动调整以适合被显示图像(参考cvShowImage)。 ......
阅读全文
  • 05月
  • 10日
综合 ⁄ 共 1033字 评论关闭
在iframe子页面获取父页面元素  代码如下: $.('#objld', parent.document); 在父页面获取iframe子页面的元素  代码如下: $("#objid", document.iframes('iframe').document) 或  代码如下: $(document.getElementById('iframeId').contentWindow.document.body).html() $(document.getElementById('iframeId').contentWindow.document.body).html() 显示iframe中body元素的内容  代码如下: $("#testId", document.frames("iframename").document).html()   (1)父页面获取iframe中的元素值: Js代码  1.//根据iframe的i......
阅读全文
  • 04月
  • 26日
综合 ⁄ 共 1146字 评论关闭
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; struct Man { int id; int virtue; int talent; int total; int type; }; vector<Man> man; bool cmp(const Man &a, const Man &b) { if (a.type != b.type) return a.type < b.type; else { if (a.total != b.total) return a.total > b.total; else { if (a.virtue != b.virtue) return a.virtue > b.v......
阅读全文
  • 02月
  • 08日
综合 ⁄ 共 2880字 评论关闭
#pragma once #include <string> #ifndef __FUNCTION__ #define __FUNCTION__ "Global" #endif #pragma warning (disable : 4290) ///< 屏蔽 4290 警告 因为微软的c++ 编译器没有支持 这个规范 #define ThrowException(Descript,code) throw Exception_CH(Descript,code,__FILE__, __FUNCTION__ ,__LINE__) #define ThrowException0(Descript) throw Exception_CH(Descript,Exception_CH::NON,__FILE__, __FUNCTION__ ,__LINE__) #define ThrowException1(code) throw Exception_CH("",code,__FILE__, __FUN......
阅读全文
  • 01月
  • 26日
综合 ⁄ 共 1555字 评论关闭
这篇文章转自laan的博客,估计他也是转的,源头在哪就不得而知了。这个是一个缺失梦想的浮躁的年代,我们可以改变的只有我们自己。这篇文章,至少让我在看完之后内心能平静一些,能反思下自己,能计划一下未来,我想,这样的文章就称得上好文了。子曰:朝闻道,夕死可矣 。有时候越学习,越能感受到自己的无知,就越有学习的动力,我想这才是一个良性过程。下面是转来的内容:   这里有一些让你养成终身学习习惯的小提示: 1)总带一本书无论你花一年或者一周去读一本书,这都无所谓。随身带着它,当你有时间的时候就努力去阅读,通......
阅读全文
  • 01月
  • 21日
综合 ⁄ 共 1178字 评论关闭
Rabbit and Grass Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2251    Accepted Submission(s): 1703 Problem Description 大学时光是浪漫的,女生是浪漫的,圣诞更是浪漫的,但是Rabbit和Grass这两个大学女生在今年的圣诞节却表现得一点都不浪漫:不去逛商场,不去逛公园,不去和AC男约会,两个人竟然猫在寝食下棋…… 说是下棋,其实只是一个简单的小游戏而已,游戏的规则是这样的: 1、  棋盘包含1*n个方格,方格从左到右分别编号为0,1,2,…,n-1; 2、  m......
阅读全文
  • 01月
  • 15日
综合 ⁄ 共 3470字 评论关闭
来源:eNet硅谷动力   仅仅一行 JavaScript 代码就能给现今的许多网络日志[1]技术提供动力 -- JavaScript 小应用[2]、共享工具、访问者跟踪、广告客户。在很多时候,一个网志作者所需要的仅仅是一行 JavaScript 代码,用来给自己的网志增加一个新的技术。现在的问题是,假如许多这样的代码累积起来,事情会变成怎样的呢?   物理学上有一个著名 的现象叫做“非线性”:大量不同的个体相互作用将产生难以预知的结果。在这一点上,软件也一样 -- 当许多组件被放在一起,就无法知道接下来会发生什么。这是因为,各个组件工作时都当......
阅读全文
  • 01月
  • 14日
综合 ⁄ 共 2892字 评论关闭
TOYS http://poj.org/problem?id=2318 Description Calculate the number of toys that land in each bin of a partitioned toy box.  Mom and dad have a problem - their child John never puts his toys away when he is finished playing with them. They gave John a rectangular box to put his toys in, but John is rebellious and obeys his parents by simply throwing his toys into the box. All the toys get mixed up, and it is impossible for John to find his favorite toys.  John's parents came up with......
阅读全文