现在位置: 首页 > watergate发表的所有文章
  • 04月
  • 28日
综合 ⁄ 共 895字 评论关闭
原题:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1002 #include<stdio.h> #include<string.h> char maps[5][5]; int n,ans; int judge(int x,int y) { int temp; if(maps[x][y] == 'X' || maps[x][y] == 'C')return 0; for(temp=y-1;temp>=1;temp--) { if(maps[x][temp] == 'X')break; else if(maps[x][temp] == 'C')return 0; } for(temp=y+1;temp<=n;temp++) { if(maps[x][temp] == 'X')break; else if(maps[x][temp] == 'C')return 0; } for(temp=x-1;temp>=......
阅读全文
  • 04月
  • 26日
综合 ⁄ 共 4809字 评论关闭
一、LINIX下关于文件权限的表示方法和解析 SUID 是 Set User ID, SGID 是 Set Group ID的意思。 Linux下可以用ls -l 命令来看到文件的权限。用ls命令所得到的表示法的格式是类似这样的:-rwxr-xr-x 。下面解析一下格式所表示的意思。这种表示方法一共有十位: 9 8 7 6 5 4 3 2 1 0 - r w x r - x r - x 第9位表示文件类型,可以为p、d、l、s、c、b和-: p表示命名管道文件 d表示目录文件 l表示符号连接文件 -表示普通文件 s表示socket文件 c表示字符设备文件 b表示块设备文件 第8-6位、5-3位、2-0位分别表示......
阅读全文
  • 04月
  • 15日
综合 ⁄ 共 2459字 评论关闭
最近苹果发布了IOS7.1。话说苹果每次发布都牵动开发者的心哈,这次让我们又小纠结了一阵。 废话不多说,说下AdHoc在ios7.1不能下载的原因,就是ios7.1不接受未经ssl验证的manifest了,就意味着plist文件的路径需要从http换为https: itms-services://?action=download-manifest&url=http://domain.com/app.plist ==> //更换为 itms-services://?action=download-manifest&url=https://domain.com/app.plist 看起来貌似简单一点改动啊,但是如果你和我一样在局域网里面搭了个apache,写了一些php代码,可以自动上传包上......
阅读全文
  • 04月
  • 15日
综合 ⁄ 共 1341字 评论关闭
小P的故事——神奇的Dota Time Limit: 1000MS Memory limit: 65536K 题目描述 小P非常喜欢玩dota,不分昼夜的玩 ,结果他连做梦也都是里面的画面,一天晚上小P刚躺下就做了一个神奇的梦。。。 不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前. 死亡骑士:"我要买道具!" 地精商人:"我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水350块一个." 死亡骑士:"好的,给我一个血瓶." 说完他掏出那张N元的大钞递给地精......
阅读全文
  • 04月
  • 10日
综合 ⁄ 共 321字 评论关闭
http://ishare.iask.sina.com.cn/f/21289181.html http://qt.nokia.com/learning http://doc.qt.nokia.com/ http://doc.qt.nokia.com/4.7/index.html 富文本处理:http://doc.qt.nokia.com/4.7/richtext.html http://doc.qt.nokia.com/4.7/qt-basic-concepts.html 教材例子: http://www.informit.com/content/images/9780132354165/examples里的qt-book-examples.zip
阅读全文
From: http://blog.csdn.net/ashuai81/article/details/8032952 原文出处:http://bbs.pcbeta.com/viewthread-863656-1-1.html 谢谢大神, 看了这个才弄出了黑苹果。  在可安装的主版硬件上,安装Mac不该是个大问题,声卡、显卡、网卡驱动,才该是个问题 这边收集 常见[五国][-v 图]错误之解决方式,提供新手无痛安装参考   持续更新,个人所知有限,欢迎提供补充...各种相关问题之解决说明,本文如有错误,欢迎指正按本文仍无解的,先替换10.6.4~10.6.8原版mach_kernel,再换legacy_kernel,一个一个试试看吧本文不予回帖.......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 1168字 评论关闭
文章目录 Problem Description Input Output Sample Input Sample Output Problem Description Jack and Jill have decided to sell some of their Compact Discs, while they still have some value. They have decided to sell one of each of the CD titles that they both own. How many CDs can Jack and Jill sell? Neither Jack nor Jill owns more than one copy of each CD. Input The input consists of a sequence of test cases. The first line of each test ......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 1796字 评论关闭
首先看login.jsp 可以看出页面中的表单提交时,发出的action请求是login,并且form中定义了两个隐含域action和tourl,但是其中action这个隐含域并没有赋值。 看请求的处理类在struts.xml中的注册: 从中可看出login这个action中除了默认的拦截栈外,还另外设置了三个拦截器(Interceptor),我一开始以为登录的表单验证是在拦截器中完成的,这三个拦截器的实现类均在com.laoer.bbscs.web.interceptor包中,查看这三个实现类的源码可知,这三个拦截器与表单验证无关,而似乎是用来设置用户IP,用户cookie和请求路径的。 上面acti......
阅读全文
  • 02月
  • 15日
综合 ⁄ 共 2408字 评论关闭
#include "../my.h" /*功能说明:这个函数用来调用外部程序(任何程序都可以,包括各种脚本),并且将外部程序的标准输出结果保存到一块内存中(内存可写),函数返回 这块内存的指针,调用者可以直接printf这个指针,!!!!!!!!!!!!!!!!最后一定要记得free!!!!!!!!!!!! 两种使用方法:lazy("ls -al /root"),lazy("ls",{"ls", "-al", "/root", (char *)0}) 思路简述:用了两个进程一个管道,子进程调用system或者exec执行shell,并且把输出重定向到管道,父进程则从管道将数据读出,根据读出数据的数量自动扩展缓冲区大小 两个地方值得回味:1,关闭文......
阅读全文
  • 12月
  • 26日
综合 ⁄ 共 2018字 评论关闭
spring 监听器: 监听容器事件: package com.sharp.mvc.listener; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextClosedEvent; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.ContextStartedEvent; import org.springframework.context.event.ContextStoppedEvent; public class ContextStartListener implements ApplicationListener<A......
阅读全文
转自:http://www.cnitblog.com/zouzheng/archive/2007/08/31/32691.html     先看下简单的初始代码:注意其编译运行后的结果。 root@xuanfei-desktop:~/cpropram/2# cat global.h //头文件#ifndef CLOBAL_H        #define GLOBAL_H        #include <stdio.h>        int funca(void);        int funcb(void);#endifroot@xuanfei-desktop:~/cpropram/2# cat funca.c //函数a#include "global.h"int funca(void){printf ("this is function/n");return 0;}root@xuanfei-desktop:~/cpropram/2# cat funcb.c //函数b#include......
阅读全文
  • 10月
  • 18日
综合 ⁄ 共 1262字 评论关闭
题解:根据字符个数制表如下: 3:1, 2 ,6 ,10 4:0, 4,  5 , 9 5:3, 7, 8, 40 ,50 ,60 6:11,12, 20, 30, 80 ,90 7:15 ,16 ,70 8:13, 14 ,18, 19 ,41 ,42 ,46 ,51 ,52 ,56 ,61 ,62 ,66 9:17 ,21 ,22 ,26 ,31 ,32 ,36 ,44 ,45 ,49 ,54 ,55 ,59 ,64 ,65 ,69 ,81 ,82 ,86 ,91 ,92 ,96   googol 级别特殊处理。OK!   代码: #include <iostream> #include <string.h> #include <stdio.h> #include <map> #include <string> using namespace std; #define MAXV 100010 #define MAX......
阅读全文