现在位置: 首页 > tabi发表的所有文章
  • 11月
  • 21日
综合 ⁄ 共 1203字 评论关闭
HDOJ 1010解题 : http://acm.hdu.edu.cn/showproblem.php?pid=1010 在回顾搜索算法,DFS、BFS、回溯等。以HDOJ 1010题练习,虽然题目非常简单,但还是花了较长时间才AC。一开始没有剪枝,果断超时。进行了奇偶剪枝后ac。 //奇偶剪枝:如果起点横纵坐标和与终点坐标和奇偶性不同,则说明要走奇数步,如果要求走t步, //t为偶数,则肯定不可能有答案;反之亦然。 #include <iostream> #include <cstdlib> using namespace std; int n,m,t; char map[8][8]; int visited[8][8]; int stepx[] = {-1, 0, 1, 0}; i......
阅读全文
  • 10月
  • 06日
综合 ⁄ 共 887字 评论关闭
关于托管应用程序不能正常退出的一些调试技巧: 论坛上常有人提起关于程序要退出的时候报一些类似"code c0020001 "这样的错误: MS的工程师给出了一下的一些调试方法: “If you application is a .NET 2.0 application and you are running it on a machine with .NET 2.0 installed, then the Watson report might be of interest. “Something in the shutdown path is throwing the exception, which is going unhandled.  FWIW, c0020001 is defined in NtStatus.h as RPC_NT_INVALID_STRING_BINDING. Look at the callst......
阅读全文
  • 06月
  • 10日
综合 ⁄ 共 366字 评论关闭
org 07c00h   ; 程序会被加载到7c00处,所以需要这一句 mov ax, cs mov ds, ax mov es, ax Call DispStr   ; 调用显示字符串例程 jmp $   ; 无限循环DispStr: mov ax, BootMessage mov bp, ax   ; ES:BP = 串地址 mov cx, 16   ; CX = 串长度 mov ax, 01301h  ; AH = 13h,  AL = 01h mov bx, 000ch  ; 页号为0(BH = 0) 黑底红字(BL = 0Ch,高亮) mov dl, 0 int 10h   ; int 10h retBootMessage:   db    " Hello, OS world!" times 510-($-$$) db   0 ;填充剩下的空间,使生成的二进制代码恰好为512字节 dw  0aa55h   ; 引导扇区需......
阅读全文
  • 05月
  • 13日
综合 ⁄ 共 3615字 评论关闭
zz Changing PDF Margins With The pdfpages Package pdfpages 文档 Sometimes I am given a PDF and I wish I could change its margins. For example, when I print out a conference version of a paper to study in detail, usually there isn’t much space on the sides to write my own ideas. I heard Fermat had a solution for this type of issue , but in the modern days, I use sticky notes. The same situation surprisingly arises even if you use PDF annotating softwares. Free or not free (no link f......
阅读全文
  • 05月
  • 11日
综合 ⁄ 共 4520字 评论关闭
文章目录 安装准备 安装与配置 转载自 三片云的天空 (http://www.cnblogs.com/espie/)   本人因为单位需要上一套项目管理软件,就选择了Redmine,主要是看中他的开源、插件丰富、具有中文支持的特点。因为之前接触ROR和Mysql不多,我参考了网上大量文章,同时安装时又遇到诸多曲折。因此把我的安装过程细化至每一个步骤,形成图文安装指南,希望对大家有用。 这篇博文主要参考了如下文章: http://www.redmine.org/projects/redmine/wiki/RedmineInstall http://xinlan......
阅读全文
  • 04月
  • 09日
综合 ⁄ 共 13259字 评论关闭
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Only one letter can be changed at a time Each intermediate word must exist in the dictionary For example, Given:start = "hit"end = "cog"dict = ["hot","dot","dog","lot","log"] Return [ ["hit","hot","dot","dog","cog"], ["hit","hot","lot","log","cog"] ] Note: All words have the same length. All words contain only lowercase alphabetic characters.......
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 7035字 评论关闭
原文:http://jiajun.iteye.com/blog/899632 一、 简介 history started by chad walters and jim 2006.11 G release paper on BigTable 2007.2 inital HBase prototype created as Hadoop contrib 2007.10 First useable Hbase 2008.1 Hadoop become Apache top-level project and Hbase becomes subproject 2008.10 Hbase 0.18,0.19 released   hbase是bigtable的开源山寨版本。是建立的hdfs之上,提供高可靠性、高性能、列存储、可伸缩、实时读写的数据库系统。 它介于nosql和RDBMS之间,仅能通过主键(row key)和主......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 1432字 评论关闭
实现简单的整数的相加减,不支持括号。 支持各种大数。 Task_0.0 import java.io.*; import java.util.*; import java.math.*; import java.applet.*; import java.awt.*; import java.awt.List; public class yyj extends Applet { private Font f; private String letter; private boolean first; private boolean second; private char preOp; private int xpos, ypos, cnt; public void init() { f = new Font("Courier", Font.BOLD, 72); first = true; second = false; preOp = '+'; letter = ""; } ......
阅读全文
  • 02月
  • 13日
综合 ⁄ 共 3321字 评论关闭
1 随机数的使用        头文件的引用         #import <time.h>         #import <mach/mach_time.h>         srandom()的使用         srandom((unsigned)(mach_absolute_time() & 0xFFFFFFFF));         直接使用 random() 来调用随机数2 在UIImageView 中旋转图像        float rotateAngle = M_PI;         CGAffineTransform transform =CGAffineTransformMakeRotation(rotateAngle);         imageView.transform = transform;                 以上代码旋转imageView, 角度为rotateAngle, 方向可以自己测......
阅读全文
当在XML文件中的非根节点下插入新节点时,必须先查找到其父节点,然后在该父节点下插入新节点, 否则会出现 未指定错误。   更多技术文章请参看施昌权的个人网站: http://www.joyvc.cn  
阅读全文
  • 02月
  • 08日
综合 ⁄ 共 2801字 评论关闭
上一篇我们提到PagerAdapter,但是PagerAdapter比较繁琐,我们可以使用另外一个适配器FragmentPagerAdapter,这个适配器更多时候用于少量界面的ViewPager,比如Tab。它的特定是划过的界面会保存早内存中,尽管已经划过,也是这样。 MainActivity.java代码: public class MainActivity extends FragmentActivity { private ViewPager viewPager; private MyAdapter adapter; // 显示数据 // static final int NUM_ITEMS = 10; private FragmentManager manager; private List<Fragment> list = null; // private Fr......
阅读全文
  • 01月
  • 19日
综合 ⁄ 共 3754字 评论关闭
在移植了qte到mini2440上之后,发现其字体显示有很大的问题。这是网上说的解决方案,证明能解决问题,摘录如下: 来源:http://www.cnblogs.com/kenter/archive/2010/07/13/1776461.html qt4.5.3不能显示中文字体,无论是qvfb中还是arm系统中,后来在网上查了一些方法 终于弄好了 1,下载文泉驿正黑字体qpf字体库 在http://kenter1643.download.csdn.net/可以找到下载 2,把下载好的字体库解压后的qpf文件放入lib/fonts中(qtX86和arm版本以及移植的文件系统中都放入此子体) (这个地方我照着做了放在lib/fonts中,不可以......
阅读全文