现在位置: 首页 > Ypxbpelh发表的所有文章
  • 06月
  • 09日
综合 ⁄ 共 49字 评论关闭
cJSON介绍 http://xuh5156.github.io/2014/04/22/cjson/
阅读全文
  • 04月
  • 17日
综合 ⁄ 共 14389字 评论关闭
  转载自http://blog.csdn.net/hguisu/article/details/7237395,不确定这个是不是原作,但是anyway感谢原作者。。 1 先决条件 确保在你集群中的每个节点上都安装了所有必需软件:sun-JDK  ,ssh,Hadoop JavaTM1.5.x,必须安装,建议选择Sun公司发行的Java版本。 ssh 必须安装并且保证 sshd一直运行,以便用Hadoop 脚本管理远端Hadoop守护进程。 2 实验环境搭建    2.1  准备工作      操作系统:Ubuntu      部署:Vmvare      在vmvare安装好一台Ubuntu虚拟机后,可以导出或者克隆出另外两台虚拟机。      说明......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 2402字 评论关闭
Problem Description   IP lookup is one of the key functions of routers for packets forwarding and classifying. Generally, IP lookup can be simplified as a Longest Prefix Matching (LPM) problem. That's to find the longest prefix in the Forwarding Information Base (FIB) that matches the input packet's destination address, and then output the corresponding Next Hop information.   Trie-based solution is the most wildly used one to solve LPM. As shown in Fig.1(b), an uni-bit trie is just......
阅读全文
在进行UI布局的时候,可能经常会用到 android:gravity  和 android:layout_Gravity 这两个属性。   关于这两个属性的区别,网上已经有很多人进行了说明,这边再简单说一下。 (资料来自网络)         LinearLayout有两个非常相似的属性: android:gravity与android:layout_gravity。   他们的区别在于:   android:gravity 属性是对该view中内容的限定.比如一个button 上面的text. 你可以设置该text 相对于view的靠左,靠右等位置. android:layout_gravity是用来设置该view相对与父view 的位置.比如一个button 在......
阅读全文
  • 05月
  • 03日
综合 ⁄ 共 1105字 评论关闭
Ordered Subsequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 53    Accepted Submission(s): 29 Problem Description A numeric sequence of ai is ordered if a1<a2<……<aN. Let the subsequence of the given numeric sequence (a1, a2,……, aN) be any sequence (ai1, ai2,……, aiK), where 1<=i1<i2 <……<iK<=N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, eg. (1, 7), (3, 4, 8) and many others. Y......
阅读全文
  • 05月
  • 01日
综合 ⁄ 共 5325字 评论关闭
   前文Linux/Android——Input系统之InputReader (七)介绍到了inputreader的运作流程,如何获取events到初步的分发,依次分析到InputMapper做第一步的处理. 前文有解析Mapper类型的依赖规则,不做重述.,这里单以触摸屏input_device 对应的SingleTouchInputMapper 为例。                                                              撰写不易,转载需注明出处:http://blog.csdn.net/jscese/article/details/43561773本博文来自【 jscese 】的博客! SingleTouchInputMapper:  原型定义在InputReader.h 中: class SingleT......
阅读全文
  • 04月
  • 29日
综合 ⁄ 共 1140字 评论关闭
A. Vanya and Cubes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya got n cubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of the pyramid must consist of 1 cube, the second level must consist of 1 + 2 = 3cubes, the third level must have 1 + 2 + 3 = 6 cubes, and so on. Thus, the i-th level of the pyramid must have 1 + 2 + ... + (i - 1) + i cubes. ......
阅读全文
  • 04月
  • 24日
综合 ⁄ 共 3807字 评论关闭
链接:http://poj.org/problem?id=1679 题意:告诉你有n个点,m条边,以及m条边的信息(起点、终点、权值),判断最小生成树是否唯一 之前是用第二种方法做的,复杂度最高可达O(n^3),后来用次小生成树又做了一次,复杂度O(n^2+m)。 先说次小生成树的方法。 次小生成树:求出最小生成树,把用到的边做标记,此时添加额外的边进去必然形成环,删除环中第二大的边(即这个环里在生成树上的最大边),加上额外边的权值,枚举每个额外边,取最小值,就是次小生成树的值。用相同的方法可以求第K小生成树以及判断第K小生成树是否唯一。 ......
阅读全文
  • 03月
  • 23日
综合 ⁄ 共 3284字 评论关闭
首先,我想申明的是,这里的ACM竞赛是我们学院自己组织的,题目不是很难,不过只有几题,现在把另外两题补上!此外,我还附上了自己写的答案。有兴趣的朋友不妨也写下,或者帮我更正一下!题目见下:     Problem B Casesar 密码 (Time Limit :1 Seconds ,Memory limit :32768K ,input file:casesar.in) Julius Casesar生活在战争年代,为了生存,他发明了Casesar密码。用于军队消息传送,作为Casesar军团的一名军官,你需要将Casesar密码破译出来给你的Boss,消息的加密方式是:对于消息原文中的每个字母,分别用该字母之......
阅读全文
  • 03月
  • 22日
综合 ⁄ 共 5232字 评论关闭
文章目录 最终目的 Activity文件 XML布局文件 ApplicationDemo 服务器端 加入权限 最终效果 最终目的 以JSON的形式,将数据存入服务器端。 在Android中,以Handler加载显示大批量文字。 在此以加载金庸小说《天龙八部(新修版)》为例(2580480 字节)。 以tomcat为服务器,在jsp中以I/O读取本机上的txt文件,写入JSON数据。 在加载过程中,以进度条的形式提示用户需要等待。 加载完成后,进度条消失,并显示加载内容。 Activity文件 package com.app.test02; import j......
阅读全文
  • 02月
  • 17日
综合 ⁄ 共 722字 评论关闭
实际体验,与官方的模拟器相比,完全无法与Genymotion相提并论。无论是从关机时间,开机时间还是从流畅度来看。 安装教程: 一、注册账号 https://cloud.genymotion.com/page/customer/login/?next=/ 在Sign Up域中填写相关信息,然后去指定的邮箱激活,便可拥有了账号。 二、下载Genymotion安装包以及Eclipse插件 https://cloud.genymotion.com/page/launchpad/download/ 按照自己的平台下载,安装,本人是windous平台装完后,自动安装了VirtualBox。 插件选第二个,下载完成后复制到eclipse目录下的Plugin目录下便完成了安装......
阅读全文
  • 02月
  • 12日
综合 ⁄ 共 421字 评论关闭
#include "stdafx.h" #include "iostream" #include <string> using namespace std; #include <ctype.h> int _tmain(int argc, _TCHAR* argv[]) { //std::cout<<"come here"<<std::endl; //char s1[30] = "I love"; //char *s2 = "C++"; //stringcat(s1,s2); //std::cout<<s1<<std::endl; string a = "www."; a.append("baidu"); cout<<a<<endl; string b = "."; b += "com"; cout<<b<<endl; cout<<a.append(b)<<endl; syste......
阅读全文