现在位置: 首页 > AracelisWZHM发表的所有文章
  • 10月
  • 08日
综合 ⁄ 共 1622字 评论关闭
转载自 点击打开链接 [plain] view plaincopy    想获取Facebook上的资源,要经历登录帐户、请求数据、接收数据三部分:从官方SDK所给的Demo程序,我们可以了解到,首先要创建Facebook 对象 [plain] view plaincopy static NSString *kAppId = @"450051905053297";      facebook = [[Facebook alloc] initWithAppId:kAppId andDelegate:rootVC];   其中,kAppId是注册Facebook后,到Facebook开发者平台申请的appID。(官网有视频说明如何申请:http://developers.facebook.com/docs/getti......
阅读全文
  • 09月
  • 12日
移动开发 ⁄ 共 438字 评论关闭
文章目录 处理方法 我现在有2个android线程,一个是view 线程,一个是工作线程,我现在想让 工程线程暂停,直到view线程的 onDraw方法被调用后再继续运行 如何做?如何等待信号 处理方法 在java2个线程中传递对象,让一个线程去通知另一个线程的方式如下,在工作线程中调用  stick.wait(); When the view thread finishes its onDraw work, it calls this: 当view线程调用完onDraw的时候可以调用 stick.notify(); stick.notify(); 注意,视图线程拥有该对象上的显示器......
阅读全文
  • 04月
  • 18日
综合 ⁄ 共 1773字 评论关闭
  图论作业,分支限界的旅行商算法。印象和以前写的旅行商分支限界有点不一样,记录下。  1:对边的权值排序。  2:边入栈(如果满足限界等条件)。  3:边退栈(不能再入栈时)。 #include <iostream> #include <algorithm> using namespace std;   const int maxNumber=1000000;   class Edge { public: int weight; int v1,v2; };   bool cmp(Edge e1,Edge e2) { return e1.weight<e2.weight; }   int Graph[30][30]; Edge edgeArr[900]; int countVertex[900]; int bestEdgeIndex[900]; int edgeNum; int n;......
阅读全文
  • 04月
  • 10日
综合 ⁄ 共 17580字 评论关闭
原问题位于:http://poj.org/problem?id=1015 以下为问题描述的摘录: In Frobnia, a far-away country, the verdicts in court trials are determined by a jury consisting of members of the general public. Every time a trial is set to begin, a jury has to be selected, which is done as follows. First, several people are drawn randomly from the public. For each person in this pool, defence and prosecution assign a grade from 0 to 20 indicating their preference for this person. 0 means total dislike,......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 700字 评论关闭
大意略。 思路:通过LCA/RMQ可以找到LCA(u,v),通过记录预处理前驱fa的值,可以把u->v之间的所有顶点存下来,然后排一次序找到第K大值即可,如果size < k,说明没有第K大值。 给出LCA/RMQ代码。 void DFS(int u, int dep) { vis[u] = 1; dfn[top] = dep; euler[top] = u; pos[u] = top; ++top; for(int i = 0; i < Tree[u].size(); i++) { int v = Tree[u][i]; if(vis[v]) continue; DFS(v, dep+1); dfn[top] = dep; euler[top] = u; ++top; } } void RMQ_init(int n) { for(i......
阅读全文
  • 03月
  • 11日
综合 ⁄ 共 1595字 评论关闭
文章目录 Agenda Git Characteristics Basic Workflows Git Concepts and Terms Commands in Categories Data structures References Agenda Characteristics Basic Work Flows Concepts and Terms Commands in Categories Data Structures References Git Characteristics Distributed (Decentralized) Separating Commits from Publishing Complete History and Complete Repository Integrity and Trust Merge Effectively Performance Basic Workflows Init/c......
阅读全文
  • 11月
  • 04日
综合 ⁄ 共 7729字 评论关闭
很有用的一篇文章,马上博二了,方向还不是很明确,有点着急,看看这些大神的建议,吸收一下。加油! http://www.seas.upenn.edu/~andre/general/student_research_advice.html Don't get hung up trying to understand everything at the outset The biggest challenge you face at the onset of any new project is that there is a huge (seemingly overwhelming) amount of stuff you need to know to tackle your problem properly. While this phenomenon is true in the small for the beginning researcher, ......
阅读全文
  • 05月
  • 24日
综合 ⁄ 共 923字 评论关闭
首先,下载“Grub for dos”工具,这是在开机是引导进入linux安装过程用的;   第二步,将下载好的Grub for dos解压缩到C盘根目录下;   第三步,右击“我的电脑”,选择“属性”,打开“高级”选项卡,在“启动和故障恢复”栏中单击“设置”按钮,在弹出的对话框中单击“编辑”按钮,开始编辑c:/boot.ini文件;   第四步,在文件(c:/boot.ini)(用msconfig修改boot.ini)的最后一行,添加”C:/grldr="Grub"“,保存,确定;   第五步,用winiso或winrar打开你下载linux镜像安装文件,将”isolinux“目录下的vmlinuz和initrd.img文件解压缩到FA......
阅读全文
  • 05月
  • 13日
综合 ⁄ 共 4918字 评论关闭
文章目录 安装 SDK 转载 http://snowyrock.spaces.live.com/blog/cns!B8CBEB7169880B1D!1162.entry 英文原址:http://developer.android.com/sdk/installing.html 其他参考:http://linux.chinaunix.net/bbs/viewthread.php?tid=1154495                Windows下搭建Android开发平台                   搭建Android开发环境 安装 SDK 本页内容介 绍如何安装Android SDK和设置你的开发环境。如果你还没有下载SDK,你可以点下面的连接进行开始下载,......
阅读全文
  • 05月
  • 07日
综合 ⁄ 共 4649字 评论关闭
相信很多人都听过nginx,这个小巧的东西慢慢地在吞食apache和IIS的份额。那究竟它有什么作用呢?可能很多人未必了解。 说到反向代理,可能很多人都听说,但具体什么是反向代理,很多人估计就不清楚了。摘一段百度百科上的描述: Html代码   反向代理(Reverse Proxy)方式是指以代理服务器来接受internet上的连接请求,然后将请求转发给内部网络上的服务器,并将从服务器上得到的结果返回给internet上请求连接的客户端,此时代理服务器对外就表现为一个服务器。     这里讲得很直白。反向代理方式实际上就是一台负责转发......
阅读全文
  • 04月
  • 27日
综合 ⁄ 共 8727字 评论关闭
当作者 Chuck Cavaness(著有《Programming Jakarta Struts》一书)所在的网络公司决定采用Struts框架之后,Chuck曾经花费了好几个月来研究如何用它来构建公司的应用系统。本文叙述的正是作者在运用Struts过程中来之不易的若干经验和心得。如果你是个负责通过jsp和servlet开发Web应用的Java程序员,并且也正在考虑采用基于Struts的构建方法的话,那么你会在这里发现很多颇有见地同时也很有价值的信息。   1. 只在必要的时候才考虑扩展Struts框架   一个好的framework有很多优点,首先,它必须能够满足用户的可预见的需求。为......
阅读全文
  • 04月
  • 24日
综合 ⁄ 共 715字 评论关闭
#include<bits/stdc++.h> using namespace std; int a,b,f[15][15],base[15]; inline void ini(){ base[1]=1; for(int i=2;i<=10;i++) base[i]=base[i-1]*10; for(int i=0;i<=9;i++)f[1][i]=1; for(int i=2;i<=10;i++) for(int j=0;j<=9;j++) for(int k=0;k<=9;k++) if(abs(j-k)>=2)f[i][j]+=f[i-1][k]; } inline int calc(int n){ if(!n)return 0; int res=0,len=10; while(base[len]>n)len--; for(int i=1;i<len;i++) for(int j=1;j<=9;j++) res+=f[i][j]; int cur=n......
阅读全文