链接数据库的语句:$conn = @ mysql_connect("localhost", "root", "") or die("数据库链接错误");mysql_select_db("laok", $conn);mysql_query("set names 'GBK'"); //使用GBK中文编码...
分类:
数据库 时间:
2015-06-15 14:26:27
阅读次数:
119
使用live绑定的事件,用die()解除绑定 使用bind绑定的事件,用unbind解除绑定 使用delegate绑定的事件,用undelegate解除绑定 使用on绑定的事件,用off解除绑定
分类:
Web程序 时间:
2015-06-12 15:22:17
阅读次数:
127
connect('localhost', 11211) or die("Could not connect");if (!$memcache->get('counter')) $memcache->add('counter', 1);else $memcache->set('counte...
分类:
Web程序 时间:
2015-06-04 11:24:22
阅读次数:
156
#!perl
use warnings;
#use strict;
use threads;
use Thread::Semaphore;
use File::Basename qw(basename);
die "perl $0 \n" if @ARGV != 2;
my $semaphore = Thread::Semaphore->new($ARGV[1]);
my $id = bas...
分类:
编程语言 时间:
2015-06-01 16:45:13
阅读次数:
856
#!perl
use warnings;
use strict;
die "perl $0 \n" if @ARGV != 2;
my %hash;
open BAM, "samtools view $ARGV[0] |" or die $!;
while()
{
chomp;
my @tmp = split;
push @{$hash{$tmp[0]}}, "$tmp[1]\t$tm...
分类:
其他好文 时间:
2015-05-31 20:15:55
阅读次数:
136
PHPMySQL 插入多条数据使用 MySQLi 和 PDO 向 MySQL 插入多条数据mysqli_multi_query() 函数可用来执行多条SQL语句。以下实例向 "MyGuests" 表添加了三条新的记录:实例 (MySQLi - 面向对象)connect_error){ die("Co...
分类:
数据库 时间:
2015-05-31 06:43:00
阅读次数:
196
以前一直使用mysql进行数据库连接,但是随着php的发展逐步由放弃mysql系列函数的趋势,改用mysqli系列函数,下面是一个使用mysqli进行数据库的demo:$conn = mysqli_connect('localhost', 'root', '', 'addressBook') or die('Connect error!'); $sql = "insert into "...
分类:
数据库 时间:
2015-05-22 13:32:52
阅读次数:
192
写一个cli的入口文件 cli.php <?php
define(‘MODE_NAME‘,?‘cli‘);
//?检测PHP环境
if(version_compare(PHP_VERSION,‘5.3.0‘,‘<‘))??die(‘require?PHP?>?5.3.0?!‘);
define(‘APP_DEBUG‘,?true);
//?定...
分类:
Web程序 时间:
2015-05-19 13:16:33
阅读次数:
356
1、在控制器页面:<?php
//本类由系统自动生成,仅供测试用途
namespaceHome\Controller;
useThink\Controller\RestController;
classIndexControllerextendsRestController{
//显示页面
publicfunctionindex(){
//print_r($this->_method);die;
$Name=$_GET[‘data‘];
if..
人物模型采用的是Unity官方的一个人物模型,至于其他的npc模型目前正在寻找中,整个人物模型中包含了许多动作,但是这个游戏只需要闲置状态(Idle),走路状态(Walk),奔跑状态(Run)和死亡状态(Die),先将任务模型拖入Hierarchy中然后创建AnimatorController,命名...
分类:
其他好文 时间:
2015-05-07 11:48:23
阅读次数:
149