我写的python代码中遇到编码问题:SyntaxError: Non-ASCII character '\xd3' in file crawler.py
原因:代码中有需要输出中文的部分,但是运行时出现了这个错误;
错误中提示看这个链接:http://www.python.org/peps/pep-0263.html
解决问题的方法:
如果在python中出现了非ASCII...
分类:
编程语言 时间:
2014-07-22 23:00:14
阅读次数:
270
出现下列异常:
/usr/bin/install -c -m 644 jconfig.h /usr/local/jpeg6/include/jconfig.h
/usr/bin/install: cannot create regular file `/usr/local/jpeg6/include/jconfig.h': No such file or directory
...
分类:
其他好文 时间:
2014-07-22 22:59:55
阅读次数:
893
sed‘s/^/\//g‘4行首增加指定字符提取网页中的播放地址:#!/bin/bash
printf"enteryourdir:"
readdir
echo"$dirisxx"
cd$dir
echo`pwd`
forfilein`ls.`
do
if[-d$file];then
echo$file
cd$file
echo`pwd`
tree`pwd`|grepplay|sed‘s/.*//g‘>11
tree`pwd`|grepplay|sed‘s/.*//g..
分类:
其他好文 时间:
2014-05-03 00:53:15
阅读次数:
336
package ioTest.io1;
import java.io.File;
import java.io.FileWriter;
/*
* IO技术,按照操作数据的方式分类如下:
* 字节流和字符流
* 字节流的两个基类:
* InputStream,OutputStream
* 字节流的两个基类:
* Reader,Writer
* 思考一个问题:为什么有了字节流还要出现...
分类:
编程语言 时间:
2014-05-02 21:55:37
阅读次数:
372
1. 自定义验证--成功提示
1) 添加选项
errorClass: "unchecked",
validClass: "checked",
errorElement: "span",
errorPlacement: function (error, element) {
if (element.parent().find("span[for=""" + element.attr("id...
分类:
Web程序 时间:
2014-05-02 18:38:21
阅读次数:
467
前段时间做了几个关于图片、文件上传的Demo,使用客户端Query-File-Upload插件和服务端Badkload组件实现多文件异步上传,比如"MVC文件上传04-使用客户端jQuery-File-Upload插件和服务端Backload组件实现多文件异步上传",就Demo而言,效果还算不错,但...
分类:
Web程序 时间:
2014-05-02 12:49:41
阅读次数:
565
这道题,采用动态规划算法。from top to
down,把到每个节点的最小路径和都求出来。下面是AC代码: 1 /** 2 * Given a triangle, find the minimum path
sum from top to bottom. 3 * Each ...
分类:
其他好文 时间:
2014-05-02 12:19:23
阅读次数:
382
调试了好久,在MFC内居然不能够解析“Mat”总是显示"Mat"未定义,修改include、lib、依赖库,不断地修改:#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "cv.h"还是不能显示,最后想起来是需要:using namespace cv;
using names...
分类:
其他好文 时间:
2014-05-02 04:55:10
阅读次数:
271
1,按照vmware,导入系统(注意td提供的版本是64位的)
2,linux系统:root/root
3,配置ip:
Enter a cop entry in the linux hosts file (/etc/hosts accessible from the linux command line in the VMware console, ie. c:>vi /etc/host...
分类:
其他好文 时间:
2014-04-30 22:13:39
阅读次数:
503