摘要: // 栈.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "malloc.h" #define maxSize 100 typedef struct { int data[maxSize]; int top; }SqStack; void push(SqStack &st,int x) { if(st.top==maxSize-1) return; st.top++; st.data[st.top]=x; } void pop(SqStack &st,int &x) { i 阅读全文
posted @ 2013-09-26 23:32 小竹zz 阅读(159) 评论(0) 推荐(0) 编辑
摘要: // 栈.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "malloc.h" #define maxSize 100 typedef struct { int data[maxSize]; int top; }SqStack; void push(SqStack &st,int x) { if(st.top==maxSize-1) return; st.top++; st.data[st.top]=x; } void pop(SqStack &st,int &x) { i 阅读全文
posted @ 2013-09-26 23:32 小竹zz 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 数据库帮助类package com.cwnu.uitl; import java.sql.*; /** * 数据库基础操作实现类 * * @author BlackWinter * * @date 2009-9-7 上午01:16:19 * * @file com.ebook.dao.DbHelper.java * * @version 3.0 */ public class DbHelper { // 数据库名 final static String database = "boaidb"; // 数据库连接方法 final static ConnectionType m 阅读全文
posted @ 2013-09-24 14:35 小竹zz 阅读(385) 评论(0) 推荐(0) 编辑
摘要: install.php只要填写数据库就可以把数据插入到数据库中,实现安装文件不可写"; exit(); } if($_POST['install']){ //获取用户提交的数据。 $host=$_POST['host']; $user=$_POST['user']; $password=$_POST['password']; $dbname=$_POST['dbname']; $config="'mysql',"; $config.="\n"; $c 阅读全文
posted @ 2013-09-24 14:27 小竹zz 阅读(605) 评论(0) 推荐(0) 编辑
摘要: addFile($fileValue, "$filename"); }else{ $this->dirTree($dir,$dir); } $zipfilenametemp = time().$zipfilename; $out = $this -> filezip(); $fp = fopen($zipfilenametemp, "w"); fwrite($fp, $out, strlen($out)); fclose($fp); $filesize = filesize($zipfilenametemp); if ($filesize f 阅读全文
posted @ 2013-09-24 14:24 小竹zz 阅读(232) 评论(0) 推荐(0) 编辑
摘要: =0x80) { if( (ord($sInBuf{$i})>=0x81 && ord($sInBuf{$i})=0x40 && ord($sInBuf{$i+1}) 0x7E && ord($sInBuf{$i+1})0xA0 && ord($sInBuf{$i}) 63 || strlen($aDomain[0]) 返回"; return false; } $im = ImageCreateFromGIF($srcFile); break; case 2: if(!function_exists("i 阅读全文
posted @ 2013-09-24 14:23 小竹zz 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 废话不多说!上代码class tree { /** * 生成树型结构所需要的2维数组 * @var array */ var $arr = array(); /** * 生成树型结构所需修饰符号,可以换成图片 * @var array */ var $icon = array('│','├','└'); /** * @access private */ var $ret = ''; /** * 构造函数,初始化类 * @param array 2维数组,例如: * array( * 1 => arra... 阅读全文
posted @ 2013-09-24 14:21 小竹zz 阅读(531) 评论(0) 推荐(0) 编辑
摘要: 数据结构中的双链表的实现// 双链表.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "malloc.h" #define maxSize 100 //双链表结构 typedef struct DLNode { int data; struct DLNode *prior; struct DLNode *next; }DLNode; //尾插法创建链表 void CreateDLNodeR(DLNode *&L,int a[],int n) { DLNode *p,*s; L=(DLNod 阅读全文
posted @ 2013-09-24 14:07 小竹zz 阅读(197) 评论(0) 推荐(0) 编辑
摘要: // 链表.cpp : 定义控制台应用程序的入口点。 //#include "stdafx.h" #include "malloc.h" #define maxSize 10 //单链表节点定义 typedef struct LNode { char data; struct LNode *next; }LNode; //插入数据 在第locate个节点位置插入 void Listinsert(LNode *&L,int locate,int x) { LNode *p,*s; p=L; int j=0; while(p!=NULL&&a 阅读全文
posted @ 2013-09-24 01:05 小竹zz 阅读(191) 评论(0) 推荐(0) 编辑
摘要: TCP中首先要在服务端开启监听,这样才可以从客户端链接using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net.Sockets; using System.Collections; using System.Net; namespace Server { class Program { static UdpClient server; static ArrayList mblist; ... 阅读全文
posted @ 2013-09-23 12:46 小竹zz 阅读(187) 评论(0) 推荐(0) 编辑