现在位置: 首页 > adulthood发表的所有文章
  • 09月
  • 06日
综合 ⁄ 共 330字 评论关闭
Tiled  http://www.mapeditor.org/ Tiled的使用 http://www.joynb.net/blog/archives/427 Tiled png素材 http://www.2gei.com/rpg-marker/map/pn6/ Tiled使用 http://bubuko.com/infodetail_8064.html cocos2d-x 3.0 win32项目移植到android平台  http://blog.csdn.net/decajes/article/details/38085795 cocos2d-x 3.0 vs2013搭建  http://www.cocoachina.com/bbs/read.php?tid=164132
阅读全文
  • 04月
  • 25日
综合 ⁄ 共 3993字 评论关闭
一.概述    在windows下寻找远端蓝牙设备,从最开始的inquiry寻找设备,到连接设备,到最后配对完成,整个HCI层所发的command和event以及Data包可以反应整个蓝牙的inquiry,pair等原理和过程。这篇笔记就是分析这个过程,结合Spec的具体描述,以此熟悉蓝牙的配对流程。 二.Inquiry流程    这个流程主要是inquiry远端的蓝牙设备,不进行连接,只进行发现。 1.Write_Inquiry_Transmit_Power_Level command 01011001 00001100 00000001 00000000 可以看出首先是设置inquiry的发射功率。 OpCode为0x0c59 total_lenrth为0x01......
阅读全文
  • 04月
  • 04日
综合 ⁄ 共 1197字 评论关闭
#include <cstdio> #include <cstring> #include <iostream> #include <map> #include <vector> #include <algorithm> using namespace std; const int maxn = 25; char str[111111]; int a[maxn*3],b[maxn*3],n; map<int,int> vis; struct RES{ int num; int s1,s2; RES(int x,int y,int z):num(x),s1(y),s2(z){} }; int bitcount(int x) {return x==0 ? 0:bitcount(x>>1)+(x&1);} int main() { while(scanf("%d",&n)==1){ for(int i=0;i<n;i++){ ......
阅读全文
  • 05月
  • 14日
综合 ⁄ 共 39字 评论关闭
http://univasity.iteye.com/blog/1067127
阅读全文
  • 05月
  • 12日
综合 ⁄ 共 2024字 评论关闭
Android应用开发框架是 Application Framework. 其系统架构由5部分组成,分别是:Linux Kernel、Android Runtime、Libraries、Application Framework、Applications。第二部分将详细介绍这5个部分。下面自底向上分析各层。  Android架构1、Linux Kernel Android基于Linux 2.6提供核心系统服务,例如:安全、内存管理、进程管理、网络堆栈、驱动模型。Linux Kernel也作为硬件和软件之间的抽象层,它隐藏具体硬件细节而为上层提供统一的服务。 如果你学过计算机网络知道OSI/RM,就会知道分层的好处就是使用下层提供的服务而为上层......
阅读全文
  • 04月
  • 05日
综合 ⁄ 共 768字 评论关闭
题目意思很清楚,,理解也很清晰。就是被数据范围坑了,一种OLE,后来改的代码过了面目全非,勿喷   #include"stdio.h" #include"string.h" #include"stdlib.h" #define MAX_LEN 10 int com(const void * a,const void * b) { return (int)(*((char *)a) - *((char *)b)); } int com1(const void * a,const void * b) { return (int)(*((char *)b) - *((char *)a)); } int main(void) { char num[MAX_LEN],t[MAX_LEN]; int times,n,f,x; while((scanf("%d",&x)) == 1 && x != -1) { t......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 517字 评论关闭
{ name:"inEndDate", id:"inEndDateT", fieldLabel:"终止时间", xtype:"datefield", format:"Y-m-d H:i:s.g", typeAhead : true, //editable:false, value:new Date(), readOnly:true, allowBlank:false, menu:new DatetimeMenu(), blankText:"公告终止时间不能为空" } 一开始我的datefield如下: 后台获取的数据都为  xxxx-xx-xx xx:xx:xx.0形势,datefield控件里总是显示不了获取的值,后来改成: { name:"inEndDate", id:"inEndDateT", fiel......
阅读全文
  • 02月
  • 01日
综合 ⁄ 共 573字 评论关闭
在VMWAREWORKSTATION8.0下安装REDHATENTERPRISES5.5,解决中文和输入法问题 环境:      Red Hat Enterprises5.5 VMware Workstation 8.0  上网浏览的网页也全都是方块乱码,中文乱码是没有安装中文字体,所以我使用了原来的安装镜像的光盘(也就是ISO),在我的光盘里面的server目录下找到"fonts-chinese-3.02-12.e15.noarch.rpm"就是它了,双击安装,安装完毕后后重启好了,OK,已经成中文了!! 经过上面的,中文是解决了,可是新建一个txt文件,发现,没有中文输入法~~~~~·汗 研究一下,搞定了,哇哈。。。方法如下 安装中......
阅读全文
  • 01月
  • 14日
综合 ⁄ 共 980字 评论关闭
题目:http://pat.zju.edu.cn/contests/pat-a-practise/1068 题解: 背包。 代码: #include<cstdio> #include<cstring> #include<cmath> #include<string> #include<vector> #include<map> #include<set> #include<stack> #include<queue> #include<algorithm> using namespace std; #define INF 0x6fffffff int dp[10005][105]; //dp[i][j]=max(dp[i-1][j],dp[i-1][j-num[i]]+num[i]) //dp[i][j]表示不超过j且从前i个硬币中挑选出的最大和 int num[10005]; bool f......
阅读全文
  • 01月
  • 10日
综合 ⁄ 共 1082字 评论关闭
定义协议: #import <UIKit/UIKit.h> @protocol myViewDelegate -(void) CallBackFun; @end 调用协议: #import <Foundation/Foundation.h> #import "myViewDelegate.h" @interface Test : NSObject{ id<myViewDelegate> delegate; } @property(nonatomic,retain) id<myViewDelegate> delegate; -(void)callback; @end #import "Test.h" @implementation Test @synthesize delegate; -(id)init{ NSLog(@"init!"); return [super init]; } -(void)callback { NSLog(@"call......
阅读全文
  • 11月
  • 23日
综合 ⁄ 共 3483字 评论关闭
SPOJ Problem Set (classical) 375. Query on a tree Problem code: QTREE You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1. We will ask you to perfrom some instructions of the following form: CHANGE i ti : change the cost of the i-th edge to ti or QUERY a b : ask for the maximum edge cost on the path from node a to node b Input The first line of input contains an integer t, the number of test cases (t <= 20). t test ca......
阅读全文
  • 11月
  • 11日
综合 ⁄ 共 11613字 评论关闭
上一篇写了使用MediaPlayer播放音乐,http://blog.csdn.net/huweigoodboy/article/details/39861539,现在来将一下加载本地歌词。好了,还是用那张图。 一,从内存卡上匹配歌词 将会从以下路径匹配 1)  SweetMusicPlayer/Lyrics/ 2)  歌曲同级目录下 3)  歌曲父级目录/lryics(Lryic加不加s,首字母大小与否又分情况) LrcContent package com.huwei.sweetmusicplayer.models; public class LrcContent { private String lrcStr; //歌词内容 private int lrcTime; //当前歌词时间 public String getLrcStr() { return lrcSt......
阅读全文