摘要: 转载自:http://www.jb51.net/css/67658.html在CSS文件中,我们常看到有些字体名称变成了乱码,这是由于编写者将中文字体的名字直接写成了中文,并且再上传或者拷贝复制的时候无意间变成了乱码。 为了避免这种状况出现,在CSS文件中使用中文字体时,最好使用中文字体的英文名称,... 阅读全文
posted @ 2014-06-10 11:15 piaomiao1314 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 坦白讲之前我没注意过Ctrl Z和Ctrl C之间的差别,因为当我按下的时候发现当前运行中的命令都停止了,它们的功能貌似是一样的。但是最近在写socket程序的时候发现服务器短使用Ctrl C用来结束一切正常,下次启动也是正常的。而使用Ctrl Z来结束时,发现再次启动时提示说地址已经被占用了,就是... 阅读全文
posted @ 2014-06-01 12:44 piaomiao1314 阅读(2735) 评论(0) 推荐(0) 编辑
摘要: 首先先说一下iptables是什么东西,可以简单把它理解成一个软件防火墙,一个访问控制列表,规定好哪个端口可以进来东西,哪个端口可以送出东西。那如果不配置iptables或者iptables配置出错会出现什么呢?其实在软件开发阶段貌似不会遇到什么问题,如果你是在单机上做开发的话,因为在单机开发网络应... 阅读全文
posted @ 2014-05-24 18:01 piaomiao1314 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 最近在校园网中使用一个centos的主机,链接网络是需要代理的,如果是windows主机在Internet选项里设置一下就可以,可是在linux这个任何配置都要更改配置文件的系统里我还真是纠结了好大一下的。现在把配置的方式总结在下面,一方面留给自己做备忘,另外别人看到也可以少走点弯路嘛。1.全局http代理 所有用户(最简单最直接的配置方式,如果你按照这个配置了,后面的就不用看了) 编辑/etc/profile添加http_proxy="http://username:password@proxy_ip:port"export http_proxyhttps_proxy=& 阅读全文
posted @ 2014-03-22 17:58 piaomiao1314 阅读(4477) 评论(1) 推荐(0) 编辑
摘要: 前两天装了Wireshark,这次安装遇到了之前没遇到的问题,所以就写出来大家参考下安装Wireshark时需要安装集成在安装包中的winpcap[winpcap(windows packet capture)是windows平台下一个免费,公共的网络访问系统。开发winpcap这个项目的目的在于为win32应用程序提供访问网络底层的能力],如果系统已经有了winpcap的其他版本的话就不能正常安装,会弹出如下的窗口可以通过删除下面几个文件来保证winpcap可以安装c:\windows\system32\Packet.dllc:\windows\system32\drivers/npf.sy 阅读全文
posted @ 2013-10-16 00:04 piaomiao1314 阅读(741) 评论(0) 推荐(0) 编辑
摘要: import java.math.BigDecimal;import java.util.Scanner;public class Main { public static void main(String[] args) { int n; BigDecimal a; Scanner in = new Scanner(System.in); while(in.hasNext()) { a = new BigDecimal(in.next()); n = in.nextInt(... 阅读全文
posted @ 2013-06-22 01:04 piaomiao1314 阅读(162) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ //freopen("in","r",stdin); int n,a,t,i; scanf("%d",&n);getchar(); while(n--) { char c,s[35]; for(int j=1;j<=4;j++){ for(i=0,t=128,a=0;i<8;i++) { while(scanf("%c",&c)==1) if(c=='0'||c=='1') break; 阅读全文
posted @ 2013-06-21 00:26 piaomiao1314 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<string.h>int main(){ char str[15]; int a; scanf("%s",str);getchar(); while(1) { fgets(str,sizeof(str),stdin); if(str[0]=='_') { break; } a=0; if(str[9]=='o') a+=1; if(str[8]=='o') a+=2; if(str... 阅读全文
posted @ 2013-05-28 00:21 piaomiao1314 阅读(106) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio>#include<queue>using namespace std;queue<int> q;int main(){ int n; scanf("%d",&n); while(n--) { int m,a[20],t; scanf("%d",&m); for(int i = 0; i < m; i++) { q.push(m-i); for(int j = 0; j < m-i; j++) { ... 阅读全文
posted @ 2013-05-25 10:18 piaomiao1314 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int a,b,i,max=0,n,x=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d%d",&a,&b); x-=a; x+=b; if(x>max) max=x; } printf("%d\n",max); return 0;} 阅读全文
posted @ 2013-05-23 00:28 piaomiao1314 阅读(277) 评论(0) 推荐(0) 编辑