现在位置: 首页 > fodder发表的所有文章
  • 11月
  • 09日
综合 ⁄ 共 2340字 评论关闭
文章目录 Problem Statement Definition Limits Constraints Examples Problem Statement   Here at [topcoder], we call a contestant a "target" if their rating is 3000 or more. In the arena, the targets have a red icon with a small target on it. Do you want to become a target as well? Sure you do. But before you get there, let's start with something easier: drawing a target. The target you need to draw consists of nested squar......
阅读全文
  • 10月
  • 11日
数据库 ⁄ 共 1597字 评论关闭
【说明】 示例脚本,完成如下功能: 1)创建表空间EAS_D_HFY121009_STANDARD和临时表空间EAS_T_HFY121009_STANDARD、用户hfy120910; 2)创建用于备份还原的目录zdir; 3)完成从源数据库hfy备份并还原到新的数据库hfy120910; 【脚本】 ------ begin 创建用户和表空间 ------------ CREATE TABLESPACE "EAS_D_HFY121009_STANDARD" DATAFILE '/oracle/oradata/dbeas/EAS_D_HFY121009_STANDARD.ORA' SIZE 2000M; ALTER DATABASE DATAFILE '/oracle/oradata/dbeas/EAS_D_HFY121009_STANDARD.ORA' AUTOEXTEND ON; CREATE TEMPORA......
阅读全文
openfire服务器              Openfire 采用Java开发,开源的实时协作(RTC)服务器基于XMPP(Jabber)协议。您可以使用它轻易的构建高效率的即时通信服务器.Openfire安装和使用都非常简单,并利用Web进行管理。单台服务器可支持上万并发用户。由于是采用开放的XMPP协议,您可以使用各种支持XMPP协议的IM客户端软件登陆服务。openfire允许集群操作,单台服务器据说可以支持10000同时在线。   openfire目录结构  openfire/     |- readme.html     |- license.html     |- conf/     |- bin/     |- jre/     |- lib/     |- plu......
阅读全文
  • 09月
  • 03日
综合 ⁄ 共 926字 评论关闭
题目链接:http://codeforces.com/contest/518/problem/A 题目讲的大意是,给出两个等长字符串s,t,求出任意一个字典序介于两者之间的任意一个等长字符串。题意很简单。但容易出错,被hacked了,最后还WA了好几次。值的记录一下。   代码及详解:   //freopen("C:\\Documents and Settings\\All Users\\桌面\\in.txt","w",stdout); #include<iostream> #include<sstream> #include<cstdio> #include<cmath>} #include<cstring> #include<algorithm> #include<string> using namespace......
阅读全文
  • 07月
  • 24日
综合 ⁄ 共 1101字 评论关闭
Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the length of 1. 思路: 用两个指针i和j遍历整个字符串。i不断向前移动,同时记录碰到的字符。如果这个字符在i和j之间已经遇到过,则将j移动到i,j之间的这个字符的下一个位置。移动i,j的同时更新字符串的长度。 ......
阅读全文
1. sudo apt-get install tftpd-hpa 2. vim etc/default/tftpd-hpa TFTP_USERNAME="tftp"#TFTP_DIRECTORY="/var/lib/tftpboot" #TFTP_DIRECTORY="/root/rt5350/RT288x_SDK/source/images"TFTP_DIRECTORY="/root/rt5350" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure --create --listen --verbose"  3. so, we can using remote tftp client sent command test it like following:          ralink is tftp-hpa client                             ubuntu is tftp-hpa server a.   put the ralinke file "test.bin" to ubunt......
阅读全文
什么时候更适用循环缓冲,而不是单缓冲? 多次写入,一次读出 在方便的时候读,而不是马上读 读写可同时进行(前提:缓冲足够大) 
阅读全文
  • 02月
  • 09日
综合 ⁄ 共 1629字 评论关闭
这两天做了几道题,跑来总结总结。 这道题到手先是读傻了。思来想去不得正解。百度了一下看到字符串Hash,立马关掉。又是一个陌生的术语。 找了些资料后先是做了poj1200,上手了字符串Hash。换句话说是BKDRHash。 简单的介绍一下。 unsigned int BKDRHash(char * str){ unsigned int base = 31; //131 1331 13331 ... unsigned int hash = 0; while (*str){ hash = hash*base + (*str++); } return hash; } 这个函数可以把一个字符串转化成一个数字。 先去感受一下吧。 当你对BKDRHash有了一定概念以后。进入正文。 ------......
阅读全文
  • 01月
  • 05日
综合 ⁄ 共 589字 评论关闭
       配置Tomcat之前必须确保Java的JDK已经配置好,因为Tomcat服务器使用纯java语言写的,在其bin目录下有startup.bat此为Windows环境下运行此服务器的批处理文件,而startup.sh为Linux环境下处理此命令,运行Tomcat       配置: 变量名:CATALINA_HOME 变量值:D:\Web开发工具\Tomcat\apache-tomcat-6.0.35 PATH路径中加入:%CATALINA_HOME%\bin CLASSPATH中添加:%CATALINA_HOME%\lib 注意:配置变量值时一定要严格,一个空格也不能多,否则,系统会找不到可执行文件的路径,而无法执行,实在不行就直接在PATH路径中直接加bi......
阅读全文
  • 05月
  • 28日
综合 ⁄ 共 1659字 评论关闭
为了分析竞品对手的定位精度,破解了竞品的SO库,调用加密,Post 到竞品服务器上。得到竞品定位效果,难题出在竞品用的是ARM,必须用手机来进行加密,想用服务器直接加密。开始使用第一种方案,嘻嘻,IDA 反编译 SO库 得到加密函数,分析反汇编代码,得到加密逻辑,重新写一下,真心写了一半了,后来发现了X86的SO库,靠~! 那就可以直接JNI调用SO库。 为了不暴漏代码用hello.so来替代解决方案如下: 首先,就假装写一个库函数是 #include <stdio.h> void hello(void) { printf("hello\n"); } 编译 gcc -shared -o hell......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 451字 评论关闭
比如一串字符串 <div><b>123</b></div> 如果只想拿到123怎么办呢? 用perl的正则表达式可以很容易的做到。 $str =~  s/<([a-zA-Z]\w*)(\s+\S+)*>(.+?)<\/\1>/$3/sg; 这种只能过滤掉左右对称的标签,如果你的字符串里的html标签不对称,或者是有缺陷,这种方式就做不了了。 如果上边的看不懂,那看个简单的: $retPromotionInfo=~s/<.*?>//g; $retPromotionInfo=~s/&lt;.*?&gt;//g; 上边的问号代表懒惰匹配,如果不加问号,会把中间的内容也过滤掉。 第二行表示对转义过的标......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 1625字 评论关闭
Problem Description Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements. Mr Wang selected a room big enough to hold the boys. The boy who are not been chosen has to leave the room immediately. There are 10000000 boys in the room numbered from 1 to 10000000 at the very beginning. After Mr Wang's selection any two of them who are still in this room should be friends (d......
阅读全文