现在位置: 首页 > calliope发表的所有文章
  • 07月
  • 29日
综合 ⁄ 共 2153字 评论关闭
软件领域中的设计模式为开发人员提供了一种使用专家设计经验的有效途径。设计模式中运用了面向对象编程语言的重要特性:封装、继承、多态,真正领悟设计模式的精髓是可能一个漫长的过程,需要大量实践经验的积累。最学习设计模式,对于每个模式,用C++写了个小例子,加深一下理解。主要参考《大话设计模式》和《设计模式:可复用面向对象软件的基础》(DP)两本书。本文介绍单例模式的实现。 单例模式也称为单件模式、单子模式,可能是使用最广泛的设计模式。其意图是保证一个类仅有一个实例,并提供一个访问它的全局访问点,该实例......
阅读全文
  看起来像它——图像搜索其实也不难 http://blog.csdn.net/luoweifu/article/details/8220992   看起来像它——图像搜索其实也不难 相像图片搜索的三种算法 http://www.myexception.cn/program/1438835.html http://www.phash.org/download/ 感知哈希算法(Perceptual hash algorithm)的OpenCV实现 http://www.cfanz.cn/index.php?c=article&a=read&id=67739 感知哈希算法——找出相似的图片 http://www.cnblogs.com/technology/archive/2012/07/12/2588022.html 原理讲解         参考Neal ......
阅读全文
        5天学会jaxws-webservice编程第三天              目录(?)[+] 前言 一编写Server端 制作JAVA BEAN-Person对象 制作Service端 编译 一编写Client端 编译前的准备 书写Test客户端调用Webservice的Server端 三结束第三天 前言: 在第二天的学习中,我们了解了jaxws如何返回一个List<String>类型的相对复杂的java数据类型给客户端,在今天,我们将更深入一步做一个真正的Java复杂类型的Webservice的传输调用。 目标: 1. 用Webservice调用和返回Java的复杂类型(比如说:List<Student>这样的数据) ......
阅读全文
  • 05月
  • 15日
综合 ⁄ 共 5465字 评论关闭
先看这下面的例子(鼠标移上去):  Link 1 Link 2 Link 3 ... Link N 菜单实例    类似这样的仿Windows下拉菜单,在网上是比较常见的,最初出现在微软网站上,之后被大量效仿。 事实上制作这样一个模拟菜单也并不是一件很困难的事,比如上面的例子代码如下: -------------------------------------------<div onmouseover="myMenu.style.display='block'"onmouseout="myMenu.style.display='none'">            &nbsp;Link 1<br>      &nbsp;Link 2<br>      &nbsp;Link 3<br>      &......
阅读全文
  • 05月
  • 09日
综合 ⁄ 共 2585字 评论关闭
/* ============================================================================ Name        : shownum.c Author      : liky Version     : Copyright   : Your copyright notice Description : Hello World in C, Ansi-style ============================================================================ */ #include <stdio.h>   struct date {      // 定义一个日期结构 int year;  // 年 int month;  // 月 int day;  // 日}; struct student {    //定义一个学生结构,其中birthday生日为一个日期结构,也就是......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 1192字 评论关闭
Computer Transformation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6045    Accepted Submission(s): 2208 Problem Description A sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the computer simultaneously tranforms each digit 0 into the sequence 1 0 and each digit 1 into the sequence 0 1. So, after the first time step, the sequence 0 1 is obtained; after the secon......
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 918字 评论关闭
 实现两个整数交换总结(面试中很可能会问到的问题)    怎样把两个整数交换,听起来觉得是很简答的事情,会认为是菜鸟级问题,因为这算是学习任何一门语言中最常见的Code。 你很可能不到一分钟就把Code完成,方法当然是借助中间变量(最常见,普通的方法)。可是当面试官问你能否不借助中间变量实现两个数字的交换的时候,是不是脑子嗡的一下,不知道该如何下手了呢?(嘿嘿.......没得关系,这里已经帮你总结好了) 下面我们就简单的总结一下,常用的几种方法,包含不借助中间变量的,直接实现两个数字的交换 (1)最基本的方法......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 895字 评论关闭
B. 沙漠之旅 Time Limit: 1000ms Case Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld      Java class name: Main Submit Status PID: 29376 Font Size:  +   - “小胖要穿越一片沙漠,小胖开着一辆大吉普,小胖的吉普油耗高,吉普能放四桶油。” 这就是人人会唱的沙漠之歌~~体现了小胖拔群的聪明才智。 小胖的问题是这样的:现在需要驾车穿越一片沙漠,总的行驶路程为L。小胖的吉普装满油能行驶X距离,同时其后备箱最多能放下四桶油。在起点有N种汽油,每种汽油都有无限桶,一桶能行驶距......
阅读全文
  • 02月
  • 19日
综合 ⁄ 共 5385字 评论关闭
文章目录 2. VirtualProtect 3. VirtualProtectEx 4. ReadProcessMemory 5. WriteProcessMemory 6. GetCurrentProcess windows 下实现函数打桩:拦截API方式            最近因为工作需要,开始研究函数打桩的方法。由于不想对工程做过多的修改,于是放弃了使用Google gmock的想法。但是也足足困扰另外我一天一宿。经过奋战,终于有所收获。闲话少说,开始看看有什么方法。 一、基础准备 1. 函数调用的原理:通过函数名(函数的入口地址)对函数进行访问,假设我们能够改......
阅读全文
  • 02月
  • 13日
综合 ⁄ 共 412字 评论关闭
在MyEclipse里面配置了maven后,打开MyEclipse弹出警告代码,代码信息: The Maven Integration requires that Eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK. Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s are also using JDK installs. 我在eclipse.ini里面配置了JDK还是会报这个警告,请问大家一下怎么解决这个问题??? 这个问题的解决方法:右键点击MyEclipse快捷键,选择属性在目标栏里面将-vm   的MyEcli......
阅读全文
  • 01月
  • 12日
综合 ⁄ 共 1915字 评论关闭
B. Random Teams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output n participants of the competition were split into m teams in some manner so that each team has at least one participant. After the competition each pair of participants from the same team became friends. Your task is to write a program that will find the minimum and the maximum number of pairs of friends that could have formed by the end of the compet......
阅读全文
  • 01月
  • 12日
综合 ⁄ 共 1093字 评论关闭
题意:从起始点经过t步能到达哪些格子,求出所有格子的个数: 思路:1、一步都不能走的时候,为1 2、第n步到达某个格子,则第n+2步也可以到达这里,标记一下,把奇数次偶数次分开就ok了。 #include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std; const int N = 109; char mp[N][N]; int n; bool oor(int x,int y){ if(x<0||x>=n) return false; if(y<0||y>=n) return false; if(mp[x][y]=='#') return ......
阅读全文