现在位置: 首页 > meatball发表的所有文章
  • 05月
  • 11日
综合 ⁄ 共 4184字 评论关闭
简要回顾: zWdLinux联盟   修改微软的URLRewrite能够对URL进行重写,这里要求对域名进行重写,实现http://1234.abc.com/ 到http://www.abc.com/show.aspx?id=1234的重写。 zWdLinux联盟  步骤:1、你的域名 http://www.abc.com/ 是泛解析的,并在IIS里添加了主机头为空的映射; zWdLinux联盟   2、修改微软的URLRewriter,要改两个地方 zWdLinux联盟   (1).BaseModuleRewriter.cs zWdLinux联盟  protected virtual void BaseModuleRewriter_AuthorizeRequest(object sender, EventArgs e) zWdLinux联盟   { zWdLinux联盟   HttpA......
阅读全文
  • 12月
  • 26日
综合 ⁄ 共 950字 评论关闭
题意:求出树的最长边和个数。 思路:最长边以前做过,用树形DP可以。求最长边的时候可以统计一下最长边的个数,那么以u为根节点的子树中最长边为:Len[u]+max(len[v]),个数node[u]*node[v]。 #include<stdio.h> #include<string.h> const int N=500000; const int inf=0x3fffffff; int head[N],num,Len[N],ans,node[N],k; struct edge { int ed,w,next; }e[N*2]; void addedge(int x,int y,int w) { e[num].ed=y;e[num].w=w;e[num].next=head[x];head[x]=num++; e[num].ed=x;e[num].w=w;e[num].next=head[y]......
阅读全文
  • 10月
  • 21日
综合 ⁄ 共 7281字 评论关闭
******(1) USE K-MEANS CLUSTERING TO FIND NEAREAST NEIGHBORS****************; proc modeclus data = sashelp.iris m = 1 k = 4 out = _test1 neighbor; var petallength petalwidth sepallength sepalwidth; ods output neighbor = _test2; run; ods html style = harvest image_dpi = 400; proc sgplot data=_test1; scatter y = density x = species / datalabel = cluster; run; data _test3; set _test2; retain _tmpid; if missing(id) = 0 then _tmpid = id; else id = _tmpid; run; data _......
阅读全文
  • 05月
  • 20日
综合 ⁄ 共 4357字 评论关闭
1.客户端网页代码 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GB18030"> <title>检测用户名是否唯一</title> <script language="javascript"> function createRequest(url) { http_request = false; if (window.XMLHttpRequest) { // 非IE浏览器 http_request = new XMLHttpRequest(); //创建XMLHttpRequest对象 } else if (win......
阅读全文
  • 05月
  • 19日
综合 ⁄ 共 31884字 评论关闭
一:准备知识: 前面我们分析过了大内存分配的实现机制,事实上,若为小块内存而请求整个页面,这样对于内存来说是一种极度的浪费。因此linux采用了slab来管理小块内存的分配与释放。Slab最早是由sun的工程师提出。它的提出是基于以下因素考虑的: 1:内核函数经常倾向于反复请求相同的数据类型。比如:创建进程时,会请求一块内存来存放mm结构。 2:不同的结构使用不同的分配方法可以提高效率。同样,如果进程在撤消的时候,内核不把mm结构释放掉,而是存放到一个缓冲区里,以后若有请求mm存储空间的行为就可以直接从缓冲区中取得......
阅读全文
  • 05月
  • 14日
综合 ⁄ 共 8482字 评论关闭
当前光栅位置:     当前光栅位置就是开始绘制下一幅位图/图像的屏幕位置。  //左下角 glRasterPos2f(GLfloat x, GLfloat y); glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);     1、4版本中,glWindowsPos*()作为glRasterPos*()的替代品,它用窗口坐标指定当前光栅位置,不必把它的x和y坐标通过 模型视图和投影矩阵进行变换,也不会被裁剪出视口区域。更容易混合使用2D文本和3D图形,而不必再各种变换状态之间反复切换。 glGetFloatv(GLenum pname, GLfloat *params); //使用GL_CURRENT_RASTER_POSITION为pname获取当前光栅位......
阅读全文
  • 05月
  • 01日
综合 ⁄ 共 764字 评论关闭
超棒的设计素材,尤其图标 URL:http://graphicdesignjunction.com/ Emoji           URL:http://populi.co/emoji/   URL:http://www.emoji-cheat-sheet.com/ 借鉴下别人超棒的设计与体验           URL:http://huaban.com/boards/1091038/   URL:https://dribbble.com/ 充分的利用github,可以教你的设计师来用,找不同so easy  URL:https://github.com/cameronmcefee/Image-Diff-View-Modes/commit/8e95f70c9c47168305970e91021072673d7cdad8 Android Material Design 统一设计语言规范  URL:http:/......
阅读全文
  • 04月
  • 20日
综合 ⁄ 共 0字 评论关闭
  • 04月
  • 12日
综合 ⁄ 共 9412字 评论关闭
Problem C The Problem Needs 3D Arrays Description A permutation is a sequence of integers p1 , p2 , . . . , pn , consisting of n distinct positive integers and each of them does not exceed n. Assume that r(S) of sequence S denotes the number of inversions in sequence S (if i < j and Si > Sj , then the pair of (i, j) is called an inversion of S), l(S) of sequence S denotes the length of sequence S. Given a permutation P of length n, it’s your task to find a subsequence S of P with ma......
阅读全文
  • 04月
  • 02日
综合 ⁄ 共 1121字 评论关闭
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1253 //这个题我MLE了好几次,就意识到剪枝的必要性 //改进后的代码 #include <iostream> #include <queue> using namespace std; int dir[6][3] = {{0,0,1},{0,1,0},{0,0,-1},{0,-1,0},{1,0,0},{-1,0,0}}; bool Map[50][50][50];//保存地图 struct Pos { int x, y, z, t; }; int main() { int k, a, b, c, time, wall; int x, y, z, i, j, p; bool flag; queue<Pos> q; Pos v, temp; scanf("%d", &k); while(k--) { flag = false; wall =......
阅读全文
  • 01月
  • 24日
综合 ⁄ 共 1431字 评论关闭
2.1 普通查询日志(The General Query Log)   普通查询日志记录mysqld所做的操作,比如当客户端连接或断开连接时,服务器都会向该文件中写入相关信息,客户端发出的SQL语句也会被记录到普通查询日志中。通过该日志文件可以查询客户端都提交了什么,这点对DBA会很有帮助,举例来说DBA怀疑客户端执行的操作有问题,就可以通过普通查询日志确定客户端究竟执行的是什么。   Mysqld将接收到的语句按照接收的顺序(注意不是执行顺序)写到查询日志文件中。   控制普通查询日志文件的输出主要有下列几点:    在5.1.6版本之前,......
阅读全文
  • 01月
  • 11日
综合 ⁄ 共 207字 评论关闭
  Facade外观模式:为子系统中的一组接口功能封装一个更上层的便捷的接口。使复杂的存在很多子系统的模块使用方便。   这个模式并不难理解,我做过的Libpng库到Symbian移植就应用了该设计模式。   定义一组Symbian的.h和.cpp文件,定义导出接口。C库图片解码的调用序列,封装到相应的接口中,编译成DLL。这样Symbian中使用时不必关心C库实现步骤如何,只需要按正确方式调用我的导出接口就好了。
阅读全文