指尖
dcdc723 · 共 86 篇文章
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: http://support.microsoft.com/kb/322756 ; To run this file, save it as 'remove.reg' on your desktop and doubl…
2012-07-27 23:52 · 开发 · 评论(0)
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('Keyspace1', 'Users'); // $users->insert('1', array('email' => 'hoan.tonthat@gmail.com', 'password' => 'test')); // $users->…
2012-02-25 12:22 · PHP · 评论(0)
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写错了... 备忘 !
freeBsd配置网络
freebsd手工配置网络 FreeBSD对网卡的支持是在系统内核中实现的,要使一个网卡工作正常,就需要系统内核拥有这个网卡的驱动,并配置好它占用的硬件资源。为了保证网卡被正确的检测到,应该使用dmesg来查看系统的检测信息。 使用sysinstall可以完成最基本的网络配置,可以配置主机名、域名、IP地址、缺省网关、DNS服务器等。配置的这些内容被写入系统的配置文件rc.conf中保留下来。当系统安装完成之后,在sysinstall的网络配置界面下试图重新配置网络时,由于网络正在运行, sysinstall将提示 “Running multi- user, assume that the …
2011-07-08 13:04 · 开发 · 评论(0)
汉字取首字母(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 arrResult = new Array(); for(var i=0,len=str.length;i<len;i++){ var ch = str.charAt(i); arrResult.push(checkCh(c…
2011-06-16 22:44 · jquery 相关 · 评论(0)
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 strtoupper($s0{0}); $s1 = iconv("UTF-8","gb2312", $s0); $s2 = iconv("gb2312","UTF-8", $s1); if($s2 == $s0){$s = $s1;}els…
2011-06-14 11:05 · 评论(0)
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 last-inserted database row. The implementation of the method is very straightforward, as you can s…
2010-12-22 13:07 · PHP · 评论(0)
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 crucial task, the PDO extension comes equipped with two primary methods, not surprisingly called "query(…
2010-12-22 12:41 · PHP · 评论(0)
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 a simple script that establishes a new connection to MySQL, using the pertinent PDO constructor. The …
2010-12-22 12:13 · PHP · 评论(0)
ucenter API 及说明
integer uc_user_register( string username , string password , string email) 函数参数 参数 含义 string username 用户名 string password 密码 string email 电子邮件 返回值 值 含义 integer *大于 0:*返回用户 ID,表示用户注册成功 *-1:*用户名不合法 *-2:*包含不允许注册的词语 *-3:*用户名已经存在 *-4:*Email 格式有误 *-5:*Email 不允许注册 *-6:*该 Email 已经被注册 本接口函数用于新用户的注册。用户名、密码、…
2010-12-10 14:35 · 开发 · 评论(0)
自己写的简单的jquery焦点图
首页是自动播放代码: var j=0;$.extend({ showbig:function(){ $("#flashimg").show();//by dcdc723 http://dcdc723.iteye.com 指尖 var ob=document.getElementById("flashimg").getElementsByTagName("img"); for(i=0;i<ob.length;i++){ob.item(i).className="pics";} ob.item(j).className="pics1"; j++; if(j>=ob.length){j=0;} }…
2010-09-30 10:23 · jquery 相关 · 评论(0)
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;} .mesWindowContent{margin:4px;font-size:12px;} .mesWindow .close{height:15px;width:28px;border:none;cursor:pointer;text-…
2010-09-27 15:24 · jquery 相关 · 评论(0)
绝对居中的层 ---备忘
<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 · jquery 相关 · 评论(0)
json跨域访问数据---备忘
服务端(数据源端): <?php $arr = array('name' => 'dc,'nick' => '指尖,'content' => array('email' => 'duchuan723@163.com','website' => 'http://dcdc723.iteye.com',)); $callback = empty ( $_GET ['jsoncallback'] ) ? empty ( $_POST ['jsoncallback'] ) ? '' : addslashes ( $_POST ['jsoncallbacklback'] ) : addslashes (…
2010-09-23 14:55 · jquery 相关 · 评论(0)
解决FLASH跨域问题
<param name="allowScriptAccess" value="always"> 引用FLASH时加入
2010-09-20 13:28 · 开发 · 评论(0)