现在位置: 首页 > Metextivy发表的所有文章
  • 05月
  • 22日
综合 ⁄ 共 4519字 评论关闭
rmi连接: 1)首先在被监控的JVM的启动参数中加入如下的启动参数以启JVM代理 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8000 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JMXServiceURL url = new JMXServiceURL( "service:jmx:rmi:///jndi/rmi://127.0.0.1:8000/jmxrmi"); JMXConnector connector = JMXConnectorFactory.connect(url); RuntimeMXBean rmxb = <span style="BACKGROUND-COLOR: #00ff40; COLOR: black; " id="casearchre......
阅读全文
  • 10月
  • 11日
综合 ⁄ 共 3433字 评论关闭
二分图匹配总结 二分图匹配 1、二分图最大匹配,求两个集合内,每个元素只能用一次,两集合间存在一些匹配关系,求最大匹配多少对,利用匈牙利算法,对于每个结点不断去找增广路去匹配 有几个重要性质: 1、最小点覆盖 = 最大匹配 2、最大独立集 = 总结点 - 最大匹配 模板: bool dfs(int u) { for (int i = 0; i < g[u].size(); i++) { int v = g[u][i]; if (vis[v]) continue; vis[v] = 1; if (!left[v] || dfs(left[v])) { left[v] = u; return true; } } return false; } int hungary() { int ......
阅读全文
  • 08月
  • 05日
综合 ⁄ 共 5408字 评论关闭
C#中的XML注释  如何使用Sandcastle创建C#的帮助文档? 这需要在源文件中插入XML注释,以“///”的形式出现。C#的“///<></>”注释在编译生成xml时候被抽取出来,是用Sandcastle自动生成CHM帮助文档必不可少的来源。 ===========================================================目录一、常见标记   <summary>   <remarks>   <para>   <param>   <paramref>   <returns>   <see>   <seealso>   <example>   <c>   <code>   ......
阅读全文
  • 05月
  • 13日
综合 ⁄ 共 10960字 评论关闭
转载自:http://blog.csdn.net/pongba/archive/2007/03/09/1525446.aspx C++ 的罗浮宫 (http://blog.csdn.net/pongba )    (另参考:A Memory Model for C++: Sequential Consistency for Race-Free Programs              Sequential Consistency for Atomics )   Disclaimer : You should first (but not the least) understand the fundamentals of multithreading memory models to be able to read the following text. I personally recommend you start with the related C++0x memory model proposals i......
阅读全文
  • 04月
  • 27日
综合 ⁄ 共 8030字 评论关闭
  一、浅析 HTTP协议(http://www.w3.org/Protocols/)是“一次性单向”协议。 服务端不能主动连接客户端,只能被动等待并答复客户端请求。客户端连接服务端,发出一个HTTP Request,服务端处理请求,并且返回一个HTTP Response给客户端,本次HTTP Request-Response Cycle结束。 我们看到,HTTP协议本身并不能支持服务端保存客户端的状态信息。于是,Web Server中引入了session的概念,用来保存客户端的状态信息。 这里用一个形象的比喻来解释session的工作方式。假设Web Server是一个商场的存包处,HTTP Request是一个顾客,第一次......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 1818字 评论关闭
Description Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a node to be the size of the largest tree in the forest T created by deleting that node from T.  For example, consider the tree:  Deleting node 4 yields two trees whose member nodes are {5} and {1,2,3,6,7}. The larger of these two trees has five nodes, thus the balance of node 4 is five. Deleting no......
阅读全文
  • 12月
  • 24日
综合 ⁄ 共 124字 评论关闭
     对于自己的原则,我似乎总是在无意间妥协了           面临问题我总是失去了自己原有的思维逻辑,一忽悠就容易被牵着走了。诶。。。             以后一定不再犯这样的错误! 当然,也不是所有的原则都必须坚持,还是要视情况而定适当妥协。不过,还是要以坚持为主
阅读全文
  • 11月
  • 09日
综合 ⁄ 共 345字 评论关闭
//反射字段:public String name = "zhangsan";  public void test1() throws Exception{ Person p = new Person(); Class clazz = Class.forName("reflect.Person"); Field f = clazz.getField("name"); //获取字段值 Object value = f.get(p); //获取字段类型 Class type = f.getType(); if(type.equals(String.class)){ String s = (String)value; System.out.println(s); } //通过反射赋值 f.set(p, "ok"); System.out.println(p.name); }
阅读全文
  • 11月
  • 06日
综合 ⁄ 共 106字 评论关闭
在each代码块内不能使用break和continue,要实现break和continue的功能的话,要使用其它的方式 break----用return false; continue --用return ture; 
阅读全文
  • 11月
  • 02日
综合 ⁄ 共 1320字 评论关闭
Aim: Find oˆ such that Problem: Analytic solution of likelihood equations not always available.  Example: Censored exponentially distributed observations  Suppose that  and that the censored times   are observed. Let m be the number of uncensored observations. Then with first and second derivative Thus we obtain for the observed and expected information Thus the MLE can be obtained be the Newton-Raphson iteration Numerical example: Choose starting value in (0, 1) Implementation i......
阅读全文
  • 10月
  • 29日
综合 ⁄ 共 7900字 评论关闭
1、Android dvm的进程和Linux的进程, 应用程序的进程是否为同一个概念 DVM指dalivk的虚拟机。每一个Android应用程序都在它自己的进程中运行,都拥有一个独立的Dalvik虚拟机实例。而每一个DVM都是在Linux中的一个进程,所以说可以认为是同一个概念。 2、sim卡的EF文件有什么作用 sim卡的文件系统有自己规范,主要是为了和手机通讯,sim本身可以有自己的操作系统,EF就是作存储并和手机通讯用的。 3、嵌入式操作系统内存管理有哪几种,各有何特性 ? 页式,段式,段页,用到了MMU,虚拟空间等技术。 4、什么是嵌入式实时操作系统,......
阅读全文
  • 10月
  • 17日
综合 ⁄ 共 2424字 评论关闭
Pretty Poem Time Limit: 2 Seconds      Memory Limit: 65536 KB Poetry is a form of literature that uses aesthetic and rhythmic qualities of language. There are many famous poets in the contemporary era. It is said that a few ACM-ICPC contestants can even write poetic code. Some poems has a strict rhyme scheme like "ABABA" or "ABABCAB". For example, "niconiconi" is composed of a rhyme scheme "ABABA" with A = "ni" and B = "co". More technically, we call a poem pretty if it can be decompos......
阅读全文