安装好Ubuntu之后设置了静态IP地址,再重启后就无法解析域名。想重新设置一下DNS,打开/etc/resolv.conf cat /etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by re ...
分类:
系统相关 时间:
2016-09-16 11:18:33
阅读次数:
129
判断一个字符是不是汉字通常有三种方法,第一种用 ASCII 码判断,第二种用汉字的 UNICODE 编码范围判 断,第三种用正则表达式判断,以下是具体方法。 1、用ASCII码判断 在 ASCII码表中,英文的范围是0-127,而汉字则是大于127,具体代码如下: string text = "是不 ...
Python之路,Day8 - Socket网络编程 本节内容 Socket介绍 Socket参数介绍 基本Socket实例 Socket实现多连接处理 通过Socket实现简单SSH 通过Socket实现文件传送 作业:开发一个支持多用户在线的FTP程序 1. Socket介绍 概念 A netw ...
分类:
编程语言 时间:
2016-09-16 10:15:53
阅读次数:
258
http://uoj.ac/problem/29 cdq四次处理出一直向左, 一直向右, 向左后回到起点, 向右后回到起点的dp数组,最后统计答案。 举例:$f_i$表示一直向右走i天能参观的最多景点数。 其中有一个很重要的条件$f_i≤f_{i+1}$,这个条件是分治的前提。 关于这个条件的证明, ...
分类:
其他好文 时间:
2016-09-16 10:14:53
阅读次数:
157
just run this command: sudo rm /var/lib/apt/lists/* -vfR it will remove all the software package with the state of 'apt-get install' and no use to lea ...
分类:
系统相关 时间:
2016-09-16 10:14:45
阅读次数:
236
http://netsecurity.51cto.com/art/201408/448305_all.htm ...
分类:
其他好文 时间:
2016-09-16 10:14:56
阅读次数:
148
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho ...
分类:
其他好文 时间:
2016-09-16 10:12:49
阅读次数:
141
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u ...
1、 动态导入模块 第一种方法(python解释器自己内部用的): 上图是我程序的目录结构 下面代码是动态导入模块3.py的源码: lib包目录下aa.py的源码如下: 这个时候运行动态导入模块.py程序,运行结果如下: 对上述动态导入模块3.py代码进行分析: lib_dir = __import ...
分类:
其他好文 时间:
2016-09-16 10:13:28
阅读次数:
266
经常遇到一些刚接触Linux的新手会问内存占用怎么那么多? 在Linux中经常发现空闲内存很少,似乎所有的内存都被系统占用了,表面感觉是内存不够用了,其实不然。这是Linux内存管理的一个优秀特性,在这方 面,区别于Windows的内存管理。主要特点是,无论物理内存有多大,Linux 都将其充份利用 ...
分类:
系统相关 时间:
2016-09-16 10:12:41
阅读次数:
210
public abstract class PartBase : Space { #region 基本属性 /// <summary> /// 是否复合板 /// </summary> public bool IsCladPart { get; set; } /// <summary> /// 基层 ...
分类:
其他好文 时间:
2016-09-16 10:12:41
阅读次数:
172
Introduction Microsoft .NET 4.5 introduced new "async and await" methods to provide an easy way of implementing asynchronisity using .NET "Task" objec ...
分类:
数据库 时间:
2016-09-16 10:14:36
阅读次数:
285
问题描述 Mysql 服务可以启动,输入mysql –u root –p 打回车后提示ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES)。 错误原因 Mysql初始化命令有错 解 ...
分类:
数据库 时间:
2016-09-16 10:14:00
阅读次数:
190
第1题作业题目:参照 http://www.cnblogs.com/xinz/p/3803109.html 的第一题,每人建立一个GitHub账号,组长建立一个Project,将本组成员纳入此Porject中的Collaborators,并添加zhangyk@tju.edu.cn 为Collabor ...
分类:
其他好文 时间:
2016-09-16 10:12:38
阅读次数:
221