Visitors hit counter dreamweaver

12 2011 档案

摘要:Aptana作为一款新兴的,简单易用的JavaScript调试工具,目前尚有一些小问题。某日在学校用DW写好的html带回家,用Aptana打开,中文全部变成小格子- -!经过多方寻求,仍然没找到答案。网上的帖子,普遍是教你把Window->Preferences->ContentTypes->Text的DefaultEncoding改为UTF-8,然后UPDATE一下。这样做只是保证你新建的文件和编码没有问题,但不能解决打开文件时是乱码的问题。如果把DefaultEncoding改为GBK,GB2312等,按说可以正常打开文件了,可是偏偏此软件不支持此编码,报错后经过半天折 阅读全文
posted @ 2011-12-16 21:46 Jason Damon 阅读(590) 评论(0) 推荐(0) 编辑
摘要:POJ 1611学了并查集后 这个就很easy啦~#include <iostream>using namespace std;int m,n,first;int father[30005],num[30005];void makeSet(int n){ for(int i=0;i<n;i++){ father[i]=i; num[i]=1; }}int findSet(int x){ if(father[x]!=x){ father[x]=findSet(father[x]); } return father[x];}void U... 阅读全文
posted @ 2011-12-16 00:50 Jason Damon 阅读(243) 评论(0) 推荐(1) 编辑
摘要:POJ1308并查集的学习#include <iostream>#include <memory.h>using namespace std;int father[5000];bool has_point[5000];int case_number;void Ini_Set(int y){ father[y]=y; has_point[y]=true;}int Find_Set(int x){ if(father[x]!=x){ //不是单独的节点 father[x]=Find_Set(father[x]); } return father[x]... 阅读全文
posted @ 2011-12-14 10:28 Jason Damon 阅读(334) 评论(0) 推荐(0) 编辑
摘要:直接上代码:#include <stdio.h>#include <stdlib.h>#include <string.h>#include <memory.h>#include <iostream>#include <queue>using namespace std;//图的数组(邻接矩阵)存储#define INFINITY INT_MAX //用整型最大值#define MAX_VERTEX_NUM 20 //最大顶点个数 //顶点关系,对无权图,用1(是)或0(否)表示相邻否bool visited[20];ty 阅读全文
posted @ 2011-12-08 11:37 Jason Damon 阅读(1861) 评论(0) 推荐(0) 编辑
摘要:为了不直接以标志位的方式去处理流的状态, c++标准库提供了标准的操作符函数专门操控这些状态。 这组函数不属于任何类成员,定义在iomanip头文件中。 将它们用在提取运算符“>>”或插入运算符“<<”后面来设定输入/输出格式,即在读写对象之间插入一个修改状态的操作。 其中有些函数没有参数,所以又叫操作符。#include <iostream>#include <iomanip>using namespace std;int main(){ char *p="12345",*q="678"; char f[ 阅读全文
posted @ 2011-12-07 10:36 Jason Damon 阅读(794) 评论(0) 推荐(0) 编辑
摘要:最近心有点浮躁。刚考完一科计算机网络,新手机到,玩新手机,刷手机系统,重装电脑系统,费了好多的时间。也有好几点不敲代码了。不行啊!这样没前途的哦,亲~赶紧的调整状态。马上!必须要inner peace。什么是inner peace呢?Inner peace (or peace of mind) refers to a state of being mentally and spiritually at peace, with enough knowledge and understanding to keep oneself strong in the face of discord or . 阅读全文
posted @ 2011-12-05 00:38 Jason Damon 阅读(340) 评论(0) 推荐(0) 编辑
摘要:N个人排成一圈,按顺时针从1到N编号。从1开始顺时针数到第k个人,让其出圈,接着数到第k个人,让他站在出圈者的位置上。然后从出圈者的后继位置开始数,重复上述过程直到环中只剩1个人。当N=5,k=2时,出环者的顺序为:2,5,3,1;最后留下4。 输入:N,k 输出:I,使得从第I个人开始数,最后能留下第1人。分析: n当N=5,k=2时 从1开始数,留下4; 从2开始数,留下5; 从3开始数,留下1; 因此,输入5、2时,按照要求,应输出3 n一般的情况: 从1开始数,留下i; 从2开始数,留下i+1; … 从n-i+1开始数,留下i+ (n-i+1) -1 = n; 从n-i+2开始数,留. 阅读全文
posted @ 2011-12-05 00:31 Jason Damon 阅读(546) 评论(0) 推荐(0) 编辑
摘要:创建一个空的XML文档:var XML={};XML.newDocument=function(rootTagname,namespaceURL){ if(!rootTagname) rootTagname=""; if(!namespaceURL) namespaceURL=""; if(document.implementation && document.implementation.createDocument){ //This is the W3C standard way to do it return document.im 阅读全文
posted @ 2011-12-01 12:49 Jason Damon 阅读(247) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示