现在位置: 首页 > kobold发表的所有文章
  • 10月
  • 14日
综合 ⁄ 共 1900字 评论关闭
(如要转载请带上本页链接 http://blog.csdn.net/jiyiqinlovexx/article/details/14648501, 谢谢!) 1 部署前准备: 下载JDK(jdk-7u45-windows-x64.exe): http://www.oracle.com/technetwork/java/javase/downloads/index.html 下载Solr4.5.1(solr-4.5.1.zip): http://lucene.apache.org/solr/  下载Tomcat7(apache-tomcat-7.0.47-windows-x64.zip):http://tomcat.apache.org/download-70.cgi 2 安装JDK: 安装JDK,配置JAVA_HOME,path,classpath的“系统环境变量”,学过java的都知道怎么做了,网站也很容易搜到,这......
阅读全文
  • 08月
  • 30日
综合 ⁄ 共 1642字 评论关闭
题意:N(2 ≤ N ≤ 55)个点,M(0 ≤ M ≤ N*N)条无向边,删除一个点会把与其相邻的点一起删掉,问最少删几次可以删掉所有点。 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3498 ——>>N个点看成 N 个要被覆盖的列,每个点作为一行,与其相邻的点的位置在这一行中标为 1,还有它自已的位置也标记为 1。。 这就是经典的重复覆盖问题了。。于是,DLX上场。。 #include <cstdio> #include <cstring> const int MAXR = 55 + 10; const int MAXC = 55 + 10; const int MAXNODE = MAXR * MAXC; const int INF = 0......
阅读全文
  • 08月
  • 16日
综合 ⁄ 共 527字 评论关闭
题目链接:ural 1020. Rope 题目大意:按照顺序给定N个点,每个点有半径R,问说用线环绕N个点所需要的长度。 解题思路:因为需要围成一个圈,所以旋转角度一定是一周,板径又都相同,所以直接就是两两点之间的距离加上一个周长。 #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const int maxn = 105; const double pi = 4 * atan(1.0); int N; double R, x[maxn], y[maxn]; double dis (double x, double y) { return sqrt(x * x + y * y)......
阅读全文
  • 06月
  • 07日
数据库 ⁄ 共 8213字 评论关闭
关于 MySQL 调优 有 3 种方法可以加快 MySQL 服务器的运行速度,效率从低到高依次为: 替换有问题的硬件。 对 MySQL 进程的设置进行调优。 对查询进行优化。 第二种方法是对 MySQL 服务器(也称为 mysqld)进行调优。对这个进程进行调优意味着适当地分配内存,并让 mysqld 了解将会承受何种类型的负载。加快磁盘运行速度不如减少所需的磁盘访问次数。类似地,确保 MySQL 进程正确操作就意味着它花费在服务查询上的时间要多于花费在处理后台任务(如处理临时磁盘表或打开和关闭文件)上的时间。对 mysqld进行调优是本文的......
阅读全文
  • 05月
  • 17日
综合 ⁄ 共 4659字 评论关闭
实验四 扬声器程序设计 实验目的: 1.掌握8253的工作原理及其应用编程。 2.掌握8255的工作原理及其应用编程。 实验步骤: 1. 扬声器控制原理 8255的地址为:60H~63H;PB端口地址为61H,控制口为63H; 8253的地址为:40H~43H;通道2地址42H,控制口地址43H。 PC的扬声器以计数器2为核心。计数器8255的CLK2的输入频率为1.193182 MHz,工作于方式3,改变计数器初值可以由得到不同频率的方波输出。 fCLK2频率:1.1931816*1000000=12 34DE H 若要使扬声器输出600Hz频率信号,则8253计数初值为1983。 对于600 Hz,N=计数初值=11931816/60......
阅读全文
  • 04月
  • 02日
综合 ⁄ 共 1321字 评论关闭
第一道自己写的线段树的题,虽然很简单但也留个记念吧 #include <stdio.h> #define M 200005 struct data{     int l,r,max; }line[3*M]; int num[M]; int max(int a,int b) {     return a > b?a:b; } void buildtree(int left,int right,int u)   //建树 {     line[u].l = left;     line[u].r = right;     if (left == right)         line[u].max = num[left];     else     {         buildtree(left,(left+right)/2,2*u);         buildtree((left+right)/2+1,right,2*u+1);         line[u].max = max(line[......
阅读全文
  • 02月
  • 12日
综合 ⁄ 共 1528字 评论关闭
计算几何终于开搞,热烈庆祝!!撒花~*★,°*:.☆\( ̄▽ ̄)/$:*.°★* 抄了梁平君基础板子,相信他不会介意的~ AC代码: #include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <string> #include <cmath> #include <assert.h> #include <algorithm> using namespace std; #define MAX 1234567890 #define MIN -1234567890 #define eps 1e-8 const int maxn = 5010; ///返还1表示大于0,返回-1表示小于0,返回0表示等于0 int sig(double x) { retu......
阅读全文
  • 12月
  • 30日
综合 ⁄ 共 513字 评论关闭
拓扑排序水题     #include<stdio.h> #include<string.h> int map[502][502],n,m,ans[502],link[502]; void tuopusort() { int i,j; for(i=1;i<=n;i++) for(j=1;j<=n;j++) if(map[i][j]==1) link[j]++; for(i=1;i<=n;i++) { j=1; while(link[j]!=0)j++; ans[i]=j; link[j]--; for(int k=1;k<=n;k++) if(map[j][k]==1) ......
阅读全文
  • 05月
  • 27日
综合 ⁄ 共 19196字 评论关闭
探究Delphi的图形处理 之七 -- 柔化和锐化处理      第三章           基本图像处理算法 3.1柔化和锐化处理 柔化处理的原理是将图片中每一个像素都由与其相邻的n*n个像素的平均值来代替。N的取值决定了其模糊程度。下面是柔化处理的程序。 程序3.1 unit Unit1; {柔化处理} Interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, GraphicProcess, StdCtrls, ExtCtrls; type   TForm1 = class(TForm)     PaintBox1: TPaintBox;     btnExe: TButton;     txtN:......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 2900字 评论关闭
Monkey and Banana Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5841    Accepted Submission(s): 2966 Problem Description A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monkey is clever enough, it shall be able to reach the banana by placing one block on the top another to build a to......
阅读全文
  • 04月
  • 22日
综合 ⁄ 共 1088字 评论关闭
1、下载并安装。 http://wingide.com/ 2、找到wingide5.0/bin/2.7下的src.zip包,把这个zip文件里面的 process/wingctl.pyo 删掉。放上附件的wingctl.pyc。 就可以了。 直接启动就能用。连试用版的license都不用了。 附件在64位的通用版linux测试通过。对于爱学习的同学。说明下方法,方便其他操作系统下的用户: 下载个python2.7的饭编译工具(比如uncompyle2).反编译这个文件.找到下面这个方法。把最后的return False 改成return True。再编译成pyc的文件放回src.zip,会发现不管有没有license,一样的用了。---原理也很简单。本......
阅读全文
  • 04月
  • 14日
综合 ⁄ 共 153字 评论关闭
insert into fnbl_client_mapping (principal, sync_source, guid, luid, last_anchor) select ?,?,?,?,? from dual on duplicate key update principal=? and sync_source=? and guid=?
阅读全文