现在位置: 首页 > embryonic发表的所有文章
  • 11月
  • 07日
综合 ⁄ 共 8604字 评论关闭
就是给了六个关于圆的算法,实现它们。 注意的是,不仅输出格式那个符号什么的要一样,坐标的顺序也要从小到大…… 基本上没考虑什么精度的问题,然后就过了。 大白鼠又骗人,或许我的方法比较好? 我的做法就是列方程+旋转+平移 我的代码: #include<iostream> #include<map> #include<string> #include<cstring> #include<cstdio> #include<cstdlib> #include<cmath> #include<queue> #include<vector> #include<algorithm> using namespace std; const double......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 1158字 评论关闭
大意不再赘述。 思路:典型的关键路径,数据结构书上面都有介绍,值得注意的是找的是事件最少的开始时间,这里的标号是活动0开始,所以入度为0的点的开始时间应该是1,而不是0,初始化的时候注意一下就行。 #include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 1010; const int MAXM = 10010; struct Edge { int v, w; int id; int next; }edge[MAXM]; int n, m; int cnt; int first[MAXN]; int ind[MAX......
阅读全文
  • 05月
  • 08日
综合 ⁄ 共 24304字 评论关闭
1. 接口定义实现wpa_drivers     wpa_drivers的定义如下: [cpp] view plaincopy struct wpa_driver_ops *wpa_drivers[] =   {   #ifdef CONFIG_DRIVER_WEXT       &wpa_driver_wext_ops,  // 我的系统使用的这个老的接口   #endif /* CONFIG_DRIVER_WEXT */   #ifdef CONFIG_DRIVER_NL80211   // 现在流行的NL80211接口       &wpa_driver_nl80211_ops,   #endif /* CONFIG_DRIVER_NL80211 */   #ifdef CONFIG_DRIVER_HOSTAP       &wpa_driver_hostap_ops,   #endif /* CONFIG_DRIVER_HOSTAP......
阅读全文
  • 04月
  • 11日
综合 ⁄ 共 18649字 评论关闭
BullseyeCoverage Kind of Tool Code Coverage Analyzer for C++/C Organization Bullseye Testing Technologyhttp://www.bullseye.com/ Software Description BullseyeCoverage is a full-featured code coverage analyzer for C++/C running on Microsoft and Unix operating systems. BullseyeCoverage quickly finds untested code and measures testing completeness. BullseyeCoverage increases testing productivity by showing you the regions of your source code that are not adequately tested. Platfo......
阅读全文
  • 02月
  • 19日
综合 ⁄ 共 1404字 评论关闭
http://topic.csdn.net/u/20081029/22/c8fe34c1-25ab-4b94-986e-4c2fd4caa664.html 1、设计一个魔方(六面)的程序。 2、有一千万条短信,有重复,以文本文件的形式保存,一行一条,有重复。请用5分钟时间,找出重复出现最多的前10条。 3、收藏了1万条url,现在给你一条url,如何找出相似的url。(面试官不解释何为相似)。 http://topic.csdn.net/u/20081101/13/4854a6b9-8adb-4813-bcba-68708dc539ef.html?24572 1、1000瓶药水,其中至多有1瓶剧毒,现在给你10只小狗在24小时内通过小狗试药的方式找出哪瓶药有毒或者全部无毒(......
阅读全文
  • 02月
  • 10日
综合 ⁄ 共 882字 评论关闭
void CCEGLViewProtocol::handleTouchesMove(int num, int ids[], float xs[], float ys[]) { CCSet set; for (int i = 0; i < num; ++i) { int id = ids[i]; float x = xs[i]; float y = ys[i]; CCInteger* pIndex = (CCInteger*)s_TouchesIntergerDict.objectForKey(id); if (pIndex == NULL) { CCLOG("if the index doesn't exist, it is an error"); continue; } CCLOGINFO("Moving touches with id: %d, x=%f, y=%f", id,......
阅读全文
  • 02月
  • 07日
综合 ⁄ 共 762字 评论关闭
在编程中,我们经常会碰到“java.lang.OutOfMemoryError: PermGen space”这样的问题,这是因为如果tomcat启动加载的.class文件比较多,那么,如何解决呢,请看下面 首先是异常截图; 接下来,我们来看解决办法: 首先,双击tomcat服务器,打开tomcat属性设置,点击Open launchconfiguration; 然后选择arguments菜单,修改VM arguments的设置;我的修改之后的设置如下: -Xms128m -Xmx512m -XX:MaxPermSize=512m -Dcatalina.base="E:\daanhealth\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="D:\software\......
阅读全文
  • 02月
  • 02日
综合 ⁄ 共 2570字 评论关闭
最近开发Xfire发布调用webservice,发现无法传递参数。 问题出在,发布的webservice接口类需要使用如下这种定义方式   package com.demo.service; import javax.jws.WebParam; public interface MyService {   String example(     @WebParam(targetNamespace = "http://com.demo.service")String agr0,//第一个参数              @WebParam(targetNamespace = "http://com.demo.service")String agr1,//第二个参数              @WebParam(targetNamespace = "http://com.demo.service")String agr2,//第三个参数              @W......
阅读全文
  • 02月
  • 01日
综合 ⁄ 共 269字 评论关闭
 源代码:  public static void exit(int status) {       Runtime.getRuntime().exit(status);} 他是System类的一个静态方法,作用是是关掉jvm,status参数是状态参数,0是正常关闭!其他非0为非正常关闭。  在异常里可传递其他非0参数关闭JVM,如:  try{    //TODO }catch(Exception e){     System.exit(1);// abnormal termination. } dispose():关闭当前程序,释放资源。而exit不释放内存资源。
阅读全文
  • 01月
  • 28日
综合 ⁄ 共 1461字 评论关闭
在页面加载性能当中,页面被阻塞是影响页面主要内容(包括图片等)及时呈现在用户面前的一个重要因素之一,所以我们需要在页面中合理处置外调CSS及JS文件。 样式表下面如果有script标签则同样会阻塞后续页面内容的加载,但我们通常希望优先加载样式表,这样才不会看到裸奔的页面,所以我们只须关注script的无阻塞加载即可。     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta ht......
阅读全文
  • 01月
  • 11日
综合 ⁄ 共 960字 评论关闭
在本例子中就算 刷新listview也不会造成获取的item的View异常 其实这里面只用自己更改下getItem的返回值就可以了  这个玩意不难  只是部分方法属性可能大家不熟悉 在这里直接上源码了: public class Badapter extends BaseAdapter{  private ListView mListview; private Context context;  @Override  public Badapter(Context mcontext,ListView Listview) { context=mcontext;this.mListview=Listview; } static List<String> mArrayS=new ArrayList<String>(); static{ for (int i = 0; i < 100; i++) { mArr......
阅读全文
  • 01月
  • 10日
综合 ⁄ 共 3985字 评论关闭
最近在研究linux高级应用,深入进去才发觉Linux真是博大精深啊,很是佩服老外及老内那些人才,不禁自问,什么时候能达到无招胜有招的境界呢?摘抄文章一篇,不敢独享。这是从IBM网站摘抄的一片文章,大家可以去它网站阅读。 -------------------------------------------------------------------------------------------------------- 现在让我们从一个比较高的高度来审视一下 GNU/Linux 操作系统的体系结构。您可以从两个层次上来考虑操作系统,如图 2 所示。 图 2. GNU/Linux 操作系统的基本体系结构 系统调用接口(SCI)的......
阅读全文