- 博客(85)
- 收藏
- 关注
原创 chrome未卸载干净导致不能安装时的REG
Windows Registry Editor Version 5.00; WARNING, this file will remove Google Chrome registry entries ; from your Windows Registry. Consider backing up your registry before; using this file: ht...
2012-07-27 23:52:35 873
原创 cassandra CONNECT
<?php// Setting up nodes://// CassandraConn::add_node('192.168.1.1', 9160);// CassandraConn::add_node('192.168.1.2', 5000);//// Querying://// $users = new CassandraCF('Keyspa...
2012-02-25 12:22:50 204
原创 cgi 启动问题
/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 11016 -u nobody -C 64 /usr/local/php/bin/php-cgi 出现500 才发现是conf文件里的rewrite写错了... 备忘 !
2011-09-23 16:08:05 222
原创 freeBsd配置网络
freebsd手工配置网络FreeBSD对网卡的支持是在系统内核中实现的,要使一个网卡工作正常,就需要系统内核拥有这个网卡的驱动,并配置好它占用的硬件资源。为了保证网卡被正确的检测到,应该使用dmesg来查看系统的检测信息。 使用sysinstall可以完成最基本的网络配置,可以配置主机名、域名、IP地址、缺省网关、DNS服务器等。配置的这些内容被写入系统的配置文件rc...
2011-07-08 13:04:29 670
原创 汉字取首字母(JS版)
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }function makePy(str){ if(typeof(str) != "string"){ return str; //throw new Error(-1,"需要字符串类型参数!"); } var arrRes...
2011-06-16 22:44:16 3162
原创 php 取汉字首字母
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><?php function getfirstchar($s0){ $fchar = ord($s0{0}); if($fchar >= ord("A") and $fchar <= ord("z") )return
2011-06-14 11:05:59 299
原创 Using PDO Objects in PHP 5 - Finding insertion IDs for database rows
As I pointed out in the section you just read, the PDO extension also offers a handy method, called "lastInsertId()," which is useful in those situations where it's necessary to find out the ID of the...
2010-12-22 13:07:38 172
原创 Using PDO Objects in PHP 5 - Running queries against a specific
Naturally, after learning how to open and close a connection to a specific database system, I'm sure that you'll want to see how to execute a query against a particular database. To perform this cr...
2010-12-22 12:41:04 139
原创 Using PDO Objects in PHP 5 - Using the PDO extension
Definitely, a good point to start demonstrating the excellent functionality provided by the PDO extension is in showing how it can be used to connect to diverse database systems. Therefore, I coded...
2010-12-22 12:13:24 132
原创 ucenter API 及说明
integer uc_user_register(string username , string password , string email)函数参数参数含义string username用户名string password密码string email电子邮件返回值值含义integer大于 0:...
2010-12-10 14:35:51 736
原创 自己写的简单的jquery焦点图
首页是自动播放代码: var j=0;$.extend({ showbig:function(){$("#flashimg").show();//by dcdc723 http://dcdc723.iteye.com 指尖var ob=document.getElementById("flashimg").getElementsByTagName("img");for(i...
2010-09-30 10:23:22 157
原创 JS弹出的半透明层
<style>.mesWindow{border:#666 1px solid;background:#fff;}.mesWindowTop{border-bottom:#eee 1px solid;margin-left:4px;padding:3px;font-weight:bold;text-align:left;font-size:12px;}.mesWindowC...
2010-09-27 15:24:27 150
原创 绝对居中的层 ---备忘
<div style='position:relative; width:985px; margin:0 auto; z-index:99999'><div style='position:absolute; background:#fff; left:300px; top:300px'>这是内容</div></div>-
2010-09-26 09:00:36 106
原创 json跨域访问数据---备忘
服务端(数据源端):<?php$arr = array('name' => 'dc,'nick' => '指尖,'content' => array('email' => 'duchuan723@163.com','website' => 'http://dcdc723.iteye.com',));$callback = empty ( $_GET...
2010-09-23 14:55:09 108
原创 解决FLASH跨域问题
<param name="allowScriptAccess" value="always"> 引用FLASH时加入
2010-09-20 13:28:19 171
原创 纯JS的弹出层
<script type="text/javascript" language="javascript">function showdiv(){var str="这里是内容";//by dcdc723 http://dcdc723.iteye.com var msgw,msgh,bordercolor;msgw=400;//宽度msgh=200;//高度titl...
2010-09-16 15:52:29 333
原创 discuz7.2 二次开发---------后台添加菜单
menu.inc.php showmenu('test', array( array('menu_test', 'tests'), array('menu_ttt_merge', 'tests&operation=edit'),)); main.inc.php showheader('test', 'tests');并在JS中加入<script...
2010-09-15 15:13:36 127
原创 discuz 文件说明
文件颜色说明:红色:程序核心文件,修改这类文件时千万要注意安全!橙色:做插件几乎不会用到的文件,大概了解功能就可以了,其实我也不推荐修改这些文件绿色:函数类文件,许多功能强大的自定义函数可以调用这类文件来使用蓝色:最标准的插件制作常用文件紫色:该文件被Zend加密,请不要修改这类文件每个目录里面都有一个空的index.htm,这是为了防止列目录用的,不必理会.根目录 ./ (这里都是最基本的程序)...
2010-09-10 15:39:45 339
原创 discuz 7.2数据库表结构
discuz 7.2数据库结构表 discuz, 结构, 数据库discuz数据字典(一)cdb_access 用户版块权限表 表说明:设置某一用户对某一版块的用户权限。 字段 类型 Null 默认 注释uid mediumint(8) 否 0 关联主键,特殊用户的UIDfid smallint(6) 否 0 关联主键,版块的FIDallowview tinyint(1) 否 0 浏览版块许可...
2010-09-09 15:54:11 375
原创 smarty变量操作符
capitalize [首字母大写] count_characters [计算字符数] cat [连接字符串] count_paragraphs [计算段落数]count_sentences [计算句数]count_words [计算词数]date_format [时间格式]default [默认]escape [转码] /escape:"html" htmla...
2010-09-05 14:17:38 130
原创 WEB流程图(jquery实现)
<?//http://dcdc723.iteye.com by 指尖 dcdc723$i=100;$h=$i/3; //判断行数?><html><head><title>test</title><script src="js/jquery-1.3.2.js"></script&
2010-08-20 17:54:23 1137
原创 上传图片并生成缩略图
using System;using System.Configuration;using System.Data;using System.Drawing.Imaging;using System.Drawing;using System.Linq;using System.Web;using System.Web.Security;using System.We...
2010-07-15 14:09:42 86
原创 db2 分页查询
SELECT * FROM "ACT" a1 where (select count(*) from act a2 where a2.actno<a1.actno )>4 and (select count(*) from act a2 where a2.actno<a1.actno)<10 查询5条。。 查询前10条数据 select * fro...
2010-06-07 14:27:16 238
原创 flash环绕效果
package { //AS3 import flash.display.*; import flash.events.*; import flash.net.URLLoader; import flash.net.URLRequest; import flash.utils.Dictionary; import flash.geom.Matrix; imp...
2010-06-04 11:29:08 163
根据IP自动切换城市(腾讯网接口)
<script src="http://fw.qq.com/ipaddress" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ alert(IPData.join('\n')); alert(IPData[3]);//]]&am
2010-05-27 10:02:47 475
原创 导航定位(仿多玩)
<STYLE type=text/css>BODY { _padding: 0}#dw-site-nav * { PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: 宋体; FONT-SIZE: 12px; PADDING-TOP: 0px}#...
2010-05-14 17:56:22 159
常用类
// 过滤html代码function SpHtml2Text($str){ $str = preg_replace("/<sty(.*)\\/style>|<scr(.*)\\/script>|<!--(.*)-->/isU","",$str); $alltext = ""; $start = 1; for($i=0;$i<
2010-05-04 10:41:29 88
转码(to 16)
{ public Form1() { InitializeComponent(); } private void btnconvert_Click(object sender, EventArgs e) { rchout.Text = ""; ...
2010-04-22 15:25:05 130
用jcrop裁剪图片
<?if ($_SERVER['REQUEST_METHOD'] == 'POST'){$file="7.jpg";$imgs=imagecreatefromjpeg($file);$x=imagesx($imgs);$y=imagesy($imgs);$x1=$_POST['x1'];$x2=$_POST['x2'];$y1=$_POST['y1'];...
2010-04-16 14:42:40 101
图片加水印
$file="7.jpg";$width_th=200;$height_th=100;$imgs=imagecreatefromjpeg($file);$bgc=imagecolorallocate($imgs,255,255,90); //背景色$fontcolor=imagecolorallocate($imgs,255,255,41); //字体色imagestri...
2010-04-16 09:59:23 96
php创建验证字符图片
<?php //(1)创建背景图像。建立一幅150*100的图像 $im = @imagecreate(150,100)or die ("没有安装GD图像库"); //设置背景颜色 $background_color = imagecolorallocate ($im, 255, 255, 255); //设置字体颜色 $text_color = imagecol...
2010-04-16 09:24:11 100
php加密解密
<? define('UC_KEY','finger'); //定义密钥 $str = '杜川'; $a = authcode($str, 'ENCODE'); //加密 echo '密文:'.$a;$b = authcode($a, 'DECODE',$UC_KEY); //解密 echo '原文:'.$b; /** * 字符串解密加密...
2010-04-15 17:07:04 254
icon生成类
<?php$output = "";if($_FILES['upimage']!=''){if(isset($_FILES['upimage']['tmp_name']) && $_FILES['upimage']['tmp_name'] && is_uploaded_file($_FILES['upimage']['tmp_name'])){...
2010-04-14 17:40:11 1279
Flex数据绑定 用法
1.在对象的属性标签中,用{}将数据源直接绑定到对象的属性上(如将数组的值直接绑定到对象上)。 2.在对象的属性标签中,用{}把某个函数的返回值绑定到对象的属性上。(函数的参数要使用Bindable的绑定符号)[Bindable]Private var cs:int;<mx:textinput id='txt' fontsize='12' text='{mytest(cs...
2010-04-01 23:45:37 92
Flex自定控件---2(自定义事件)
首先自定事件: package com.event{ import flash.events.Event; public class mylogin extends Event { public var name:String=""; //存放用户名 public var pwd:String=""; //密码 public function m...
2010-03-31 22:25:26 81
Flex自定控件---1
1.new 一个Component,代码如下(用户登陆的一个面板,继承Panel):<?xml version="1.0" encoding="utf-8"?><mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300&qu
2010-03-31 22:07:00 85
FLEX 事件注册---EVENT 继承
继承类:package{ import flash.events.Event; public class eventzhuce extends Event { public static const TEST1:String="my test"; public var testdata:String; public function eventzhuce(...
2010-03-27 16:49:26 94
FLEX事件注册
import mx.controls.Alert; import flash.events.MouseEvent;button 事件注册 internal function iniAPP():void{ bt1.addEventListener(MouseEvent.CLICK,onc); bt1.addEventListener(MouseEvent.MOUSE_MO...
2010-03-25 21:18:48 98
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人