上一页 1 2 3 4 5 6 ··· 16 下一页
  2013年1月5日
摘要: /** * @file index.php * @author * @date * @version $Revision$ * @brief */$a = 1;xdebug_debug_zval('a');//refcount=1, is_ref=0$b = $a;xdebug_debug_zval('a');//refcount=2, is_ref=0xdebug_debug_zval('b');//refcount=2, is_ref=0$c= &$b;xdebug_debug_zval('a');//refcount 阅读全文
posted @ 2013-01-05 21:35 yangyh 阅读(154) 评论(0) 推荐(0) 编辑
  2012年7月25日
摘要: BDT目前仅支持3.7(Eclipse update site: http://bs.baidu.com/cloud-develop-toolkits/)在4.2中安装时会出现找不到org.mortbay.jetty.server 6.1.23(Miss requirement: Baidu app engine tools for java com.baidu.bdt.bae.java.feature.feature.group requires org.mortbay.jetty.server):原因是Eclipse3.7升级到4.2后Jetty从6.1升级到8.0了,Plugin Bun 阅读全文
posted @ 2012-07-25 15:30 yangyh 阅读(802) 评论(0) 推荐(0) 编辑
  2012年7月20日
摘要: <?php$host = getenv('HTTP_BAE_ENV_ADDR_SQL_IP');$port = getenv('HTTP_BAE_ENV_ADDR_SQL_PORT');$user = getenv('HTTP_BAE_ENV_AK');$pwd = getenv('HTTP_BAE_ENV_SK');$dsn = "mysql:host=$host;port=$port;dbname=test";$link = new PDO($dsn, $user,$pwd);$link->ex 阅读全文
posted @ 2012-07-20 19:36 yangyh 阅读(249) 评论(0) 推荐(0) 编辑
  2012年4月23日
摘要: 执行顺序:1. setDefault设置configuration初始值,传入的是一个workingcopy,可以get set只执行一次2.initialFrom根据传入的configuration参数进行界面绘制,只能get3.performApply传入workingcopy当界面点击或Textbox值更改时触发,如果该函数里不更改workingcopy的值则Apply按钮不会使能每次进入该tab时也会触发performAppay后执行isValid4.applyLaunchDelegateConfiguration最后设置delegate类当workingcopy.getOrigina 阅读全文
posted @ 2012-04-23 01:19 yangyh 阅读(293) 评论(0) 推荐(0) 编辑
  2011年12月10日
摘要: To : xx 注:本机IP为118.229.139.68 1.安装以下包 bind-libs-9.3.6-4.P1.el5bind-9.3.6-4.P1.el5bind-utils-9.3.6-4.P1.el5bind-chroot-9.3.6-4.P1.el5caching-nameserver-9.3.6-4.P1.el5使用rpm -qa|grep bind-命令查询 [r... 阅读全文
posted @ 2011-12-10 15:44 yangyh 阅读(3181) 评论(0) 推荐(0) 编辑
  2011年11月12日
摘要: args.txt#! /bin/bash if [ -z $1 ] || [ ! -e $1 ] then echo "Usage: cmd.sh input " exitfiecho $0for num in $*;do echo "$num"done for i in $(seq -3 $#); do echo $i done for i in {0..5} do echo $i done echo $@ for((i=4;i<7;i++));do echo $i done echo "all:$$" trimReg=&qu 阅读全文
posted @ 2011-11-12 17:02 yangyh 阅读(3433) 评论(0) 推荐(0) 编辑
  2011年10月30日
摘要: 假设下标从0开始,0,1,2 .. m-1共m个人,从1开始报数,报到k则此人从环出退出,问最后剩下的一个人的编号是多少?现在假设m=100 1 2 3 4 5 6 7 8 9 k=3第一个人出列后的序列为:0 1 3 4 5 6 7 8 9即:3 4 5 6 7 8 9 0 1(*)我们把该式转化为:0 1 2 3 4 5 6 7 8 (**)则你会发现: ((**)+3)%10则转化为(*)式了也就是说,我们求出9个人中第9次出环的编号,最后进行上面的转换就能得到10个人第10次出环的编号了设f(m,k,i)为m个人的环,报数为k,第i个人出环的编号,则f(10,3,10)是我们要的结果. 阅读全文
posted @ 2011-10-30 20:44 yangyh 阅读(28159) 评论(1) 推荐(5) 编辑
  2011年10月13日
摘要: 1,一个环形公路,给出相邻两点的距离(一个数组),让你求任意两点的最短距离,要求空间复杂度不超过O(N) 2,去掉一个字符串中多余的空格,并反转单词,比如 “abc def ghi” -> “cba def ihg” 3,有100,50,20,10,5 ,2,1面值的钞票,给一个N(N<1000000),张数不限,求组合的总数 阅读全文
posted @ 2011-10-13 22:59 yangyh 阅读(565) 评论(0) 推荐(0) 编辑
  2011年10月8日
摘要: // TSP.cpp : Defines the entry point for the console application.//#include "stdafx.h"typedef struct _node_st{ bool inPath ; int nextIndex; _node_st():inPath(false),nextIndex(-1){ }}Node,*NodePtr;#define MAX 6int dis[MAX][MAX]={ 0, 10, 20, 30, 40, 50, 12, 0 ,18, 30, 25, 21, 2... 阅读全文
posted @ 2011-10-08 21:02 yangyh 阅读(5466) 评论(2) 推荐(0) 编辑
  2011年10月7日
摘要: 1.key.attachment为空? sc.register(selector, SelectionKey.OP_WRITE|SelectionKey.OP_READ,bb); 使用这种方法注册事件时,需要添加第三个参数:attachment对象;或者使用 key.interestOps(SelectionKey.OP_WRITE | SelectionKey.OP_READ)方法; 2.如何捕捉到客户端断开事件?断开时会触发readable key,所以在isreadable中判断read的返回值是否为-13.如果不注册写事件则写操作无疑和同步方式一样了,如果注册了写事件则需要在写完时取消 阅读全文
posted @ 2011-10-07 12:01 yangyh 阅读(2224) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 ··· 16 下一页