Posts Tagged ‘LBS’

LBS到WP的转换程序(成功完成)

This item was filled under [ 技术相关 ]

这篇东西是从voidpage上转过来的,这是我所找到的最新的转换方法,其他的我没有试过,但这个转换程序却实很不错,转换很快,很方便,准确性方面粗看没有发现问题.
推荐一下,以下是原文转载:

11月20日更新:加入了时间格式处理,保证在各种环境中获取的数据文本中的时间格式皆为 WP 的时间格式,以不至于转换数据造成时间丢失。
—————————————————————-
挤时间做了个不同于以前那个的新版转换程序,这次采用的是 WordPress 自有备份格式做为媒介,并且这次将两个博客的转换代码整合在一起,通过对应的按钮分别导出。
使用方法如下:

将 LBS 或 PJBlog 的数据库改名为 blog.mdb
将 asp2wp.asp 以及 blog.mdb 上传到同一 ASP 空间目录下
运行程序根据需求点击相应的按钮获取 xml 格式的导出数据
进入已安装好的 WordPress 后台依次打开“管理”->“导入”->“WordPress”,根据提示导入之前获取的 xml 格式数据文件

提示:如果数据文件比较大,可以使用压缩包内所提供的 XML 分割软件分割成多个小尺寸数据文件依次导入。
OK,废话完了,给下载。如果有什么问题或者建议请反馈给我,谢谢。

Continue reading...

Tagged with: [ , ]

验证码定时自动刷新

This item was filled under [ 建站笔记 ]

文件如下: 其中image.jsp用来产生验证码,请参考下面代码。
一、code.jsp
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”gb2312″ >
<head>
<meta http-equiv=”content-type” content=”text/html; charset=gb2312″ />
<meta name=”robots” content=”all” />
<title>Dolphin Document</title>
</head>
<body>
<img id=”acimg” src=”image.jsp” />
<script language=”javascript” type=”text/javascript”>
setInterval(’document.getElementById(”acimg”).src=document.getElementById(”acimg”).src’,1000);
</script>
</body>
</html>
二、image.jsp
<%@ page contentType=”image/jpeg” import=”java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*” %>
<%!
Color getRandColor(int fc,int bc){//给定范围获得随机颜色
Random random = new Random();
if(fc>255) fc=255;
if(bc>255) bc=255;
int r=fc+random.nextInt(bc-fc);
int g=fc+random.nextInt(bc-fc);
int b=fc+random.nextInt(bc-fc);
return new Color(r,g,b);
}
%>
<%
//设置页面不缓存
response.setHeader(”Pragma”,”No-cache”);
response.setHeader(”Cache-Control”,”no-cache”);
response.setDateHeader(”Expires”, 0);
// 在内存中创建图象
int width=60, height=20;
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// 获取图形上下文
Graphics g = [...]

Continue reading...

Tagged with: [ ]
第 1 页,共 7 页12345»Nothing最后一页 »