08 2013 档案

摘要:递归1.阶乘f(n) = n!2.公式f(0) = 1;f(n) = f(n-1)*n (n>=1)3.代码对应的程序为#include #include#includeint f(int n){ return n == 0?1:f(n-1)*n;}int main(){ printf("%d\n",f(3)); getch(); return 0;}自己调用自己就是递归,但是要有一个出口,让程序走出递归。在C语言中,调用自己和调用其他函数并没有任何本质区别,都是建立新栈帧。4.比喻皇帝(拥有main函数的栈帧):大臣,你给我算一下f(3)。大臣(拥有f(3)的栈帧) 阅读全文
posted @ 2013-08-31 16:41 TBHacker 阅读(256) 评论(0) 推荐(1) 编辑
摘要:效果css文件delcss.css代码如下:*{ margin:0; padding:0;}#div1{ width:300px; height:100px; border-radius:10px; background:#f60; box-shadow:5px 5px 10px #ccc; position:absolute; left:50%; margin-left:-150px; z-index:2; opacity:0; filter:alpha(opacity:0); display:none;}#div1 h3{ height:20px; background:#60f;}#ov 阅读全文
posted @ 2013-08-26 10:36 TBHacker 阅读(1798) 评论(0) 推荐(0) 编辑
摘要:一幅图,了解CPU 阅读全文
posted @ 2013-08-23 17:24 TBHacker 阅读(507) 评论(0) 推荐(0) 编辑
摘要:网站搭建完成了,进入登录界面就是访问不了。原因大概是没有开启Apache mod_rewrite模块,或者没有配置完全。步骤1:启用mod_rewrite模块在conf目录的httpd.conf文件中找到LoadModule rewrite_module modules/mod_rewrite.so将这一行前面的#去掉。步骤2:## Possible values for the Options directive are "None", "All",# or any combination of:# Indexes Includes FollowSym 阅读全文
posted @ 2013-08-23 13:58 TBHacker 阅读(1357) 评论(0) 推荐(0) 编辑
摘要:用linux自己来访问web是可以的比如192.168.2.20就可以访问本机的相关页面用192.168.2.20/phpmyadmin就可以访问数据库相关内容可是,当别的局域网的电脑想访问时,却访问不了。什么原因呢?通过ping命令,发现是ping的通的,可是就是访问不了。后来发现,是服务器的防火墙的问题,解决方法,关掉防火墙,service iptables status 查看iptables状态service iptables restart iptables服务重启service iptables stop iptables服务禁用禁用了之后,发现可以访问了,不论是页面还是数据库,都可 阅读全文
posted @ 2013-08-23 13:20 TBHacker 阅读(296) 评论(0) 推荐(0) 编辑
摘要:step 1 DocumentRoot "D:/xampp/htdocs/ebookbag_demo2/webroot" ServerName 192.168.2.95上面是apache配置文件中的虚拟域名配置内容,httpd.conf配置虚拟域名在这里,就可以了或者在httpd-vhosts.conf然后引入其中效果是一样的~配置完了,记得重启apachestep 2到hosts文件中,127.0.0.1 192.168.2.95ip地址主机名/域名前面的是ip地址,后面的是域名。通过这样设置,当在浏览器中输入192.168.2.95的时候,就会关联到本地的ip了。或者当 阅读全文
posted @ 2013-08-23 11:19 TBHacker 阅读(882) 评论(0) 推荐(0) 编辑
摘要:有两种途径一、service httpd stop(停止)service httpd start(开始)service httpd restart(重启)这种方法,是系统自带的二、或者到apache的启动目录sbin下执行默认的执行目录是/usr/sbin/apachectl执行/usr/sbin/apachectl stop(停止)/usr/sbin/apachectl start(开始)/usr/sbin/apachectl restart(重启)效果是一样的~ 阅读全文
posted @ 2013-08-23 09:55 TBHacker 阅读(442) 评论(0) 推荐(0) 编辑
摘要:apache:如果采用RPM包安装,安装路径应在 /etc/httpd目录下apache配置文件:/etc/httpd/conf/httpd.confApache模块路径:/usr/sbin/apachectlweb目录:/var/www/html如果采用源代码安装,一般默认安装在/usr/local/apache2目录下 php:如果采用RPM包安装,安装路径应在 /etc/目录下php的配置文件:/etc/php.ini如果采用源代码安装,一般默认安装在/usr/local/lib目录下php配置文件: /usr/local/lib/php.ini或/usr/local/php/etc/p 阅读全文
posted @ 2013-08-22 15:50 TBHacker 阅读(422) 评论(0) 推荐(0) 编辑
摘要:About LAMPLAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the server is already running CentOS, the linux part is taken care of. Here is how to install the rest. Set UpThe steps in this tutorial requir. 阅读全文
posted @ 2013-08-22 14:14 TBHacker 阅读(335) 评论(0) 推荐(0) 编辑
摘要:这样,可以在多处应用。更好一些。缺点是不够灵活。优点是,一处修改,多处应用。函数这东西,一般都是先加载的,之后就可以随便调用了。function delquestion(obj){ //confirm('确认要删除吗'); $(obj).parent().parent().remove(); } function addquestions(obj){ var str = question_id = ''; //str = (obj).parent().prev().html();str=(obj).parent().prev().fi... 阅读全文
posted @ 2013-08-22 10:27 TBHacker 阅读(699) 评论(0) 推荐(0) 编辑
摘要:main函数var grade = ""; //var grade = 0; var lesson_id = ""; //var lesson_id = 0; if(grade!=""&&lesson_id!=""){ getBookByGradeAndLesson(grade,lesson_id); } var book_id = ""; var chapter_id = ""; var section_id = ""; if(b... 阅读全文
posted @ 2013-08-21 13:46 TBHacker 阅读(411) 评论(0) 推荐(0) 编辑
摘要:根据book_id,class_id确定老师uidselect user_idfrom lessonsleft join book on lessons.lesson_id = book.lesson_idwhere lessons.class_id = 2and book.id = 1group by user_id;根据book_id,class_id,semester_id确定老师uidselect user_idfrom lessonsleft join book on lessons.lesson_id = book.lesson_idwhere lessons.class_id = 阅读全文
posted @ 2013-08-20 10:13 TBHacker 阅读(247) 评论(0) 推荐(0) 编辑
摘要:写在前面:案例、常用、归类、解释说明。(By Jim)创建菜单#!/bin/bash# testing the scriptclearechoecho -e "\t\t\tSys Admin Menu\n"echo -e "\t1.Display disk space"echo -e "\t2.Display logged on users"echo -e "\t3.Display memory usage"echo -e "\t0.Exit menu\n\n"echo -en "\t 阅读全文
posted @ 2013-08-15 13:03 TBHacker 阅读(1441) 评论(0) 推荐(0) 编辑
摘要:写在前面:案例、常用、归类、解释说明。(By Jim)使用函数#!/bin/bash# testing the scriptfunction myfun { echo "This is an example of a function"}count=1while [ countle5]domyfuncount=[ $count +1 ]doneecho "This is the end of the loop"myfunecho "Now this is the end of the script"(记得空格,函数一定 阅读全文
posted @ 2013-08-12 16:55 TBHacker 阅读(20490) 评论(0) 推荐(3) 编辑
摘要:PHP的isset()函数 一般用来检测变量是否设置 格式:bool isset ( mixed var [, mixed var [, ...]] ) 功能:检测变量是否设置 返回值: 若变量不存在则返回 FALSE若变量存在且其值为NULL,也返回 FALSE 若变量存在且值不为NULL,则返回 TURE 同时检查多个变量时,每个单项都符合上一条要求时才返回 TRUE,否则结果为 FALSE 版本:PHP 3, PHP 4, PHP 5 更多说明: 使用 unset() 释放变量之后,它将不再是 isset()。 PHP函数isset()只能用于变量,传递任何其它参数都将造成解析错误。 检 阅读全文
posted @ 2013-08-07 20:25 TBHacker 阅读(347) 评论(0) 推荐(0) 编辑
摘要:mo文件是被编译了的文件,一般在汉化的时候会用到。比如我想修改phpmyadmin 的界面信息,就需要修改phpmyadmin.mo的文件内容。可是用编辑器editplus或者Sublime 2打开它,都是乱码。原来,这个文件不能直接打开。搜索了一下,网上的信息。发现通过poedit软件,可以先将mo转化为po格式的文件,然后poedit就可以打开它了。可以修改它了。安装好poedit之后,话说我真的不知道该怎么怎么用!Step1.下载poedit并安装Step2.复制poedit的bin文件夹所以内容到c:\windows\system32下Step3.开始 ->运行->cmd打 阅读全文
posted @ 2013-08-07 19:38 TBHacker 阅读(18870) 评论(0) 推荐(0) 编辑
摘要:写在前面:案例、常用、归类、解释说明。(By Jim)Ctrl+C组合键可以生产SIGINT信号Ctrl+Z组合键生产SIGTSTP信号,停止进程后程序仍然留在内存中,能够从停止的地方继续运行。捕获信号#!/bin/bash# testing output in a background jobtrap "echo Haha" SIGINT SIGTERMecho "This is a test program"count=1while [ count -le 10 ]do echo "Loop #count" sleep 10 阅读全文
posted @ 2013-08-06 09:51 TBHacker 阅读(755) 评论(0) 推荐(0) 编辑
摘要:写在前面:案例、常用、归类、解释说明。(By Jim)2>将STDEER输入到一个文件1>将STDOUT输入到一个文件&>将STDEER和STDOUT输入到同一个文件在脚本中重定向输入#!/bin/bash# redirecting file inputexec 0testoutecho "This should display on the monitor"echo "This should be stored in the file">&3echo "Then this should be back 阅读全文
posted @ 2013-08-05 10:45 TBHacker 阅读(572) 评论(0) 推荐(0) 编辑
摘要:写在前面:案例、常用、归类、解释说明。(By Jim)命令行参数12为第二个参数,依次类推...示例:#!/bin/bash# using one command line parameterfactorial=1for((number = 1;number<=1;number++))dofactorial=[ factorialnumber ]doneecho The factorial of 1isfactorial调用./test1 5(这样就把参数传递进去了)结果:The factorial of 5 is 120#!/bin/bash# t 阅读全文
posted @ 2013-08-02 10:58 TBHacker 阅读(7644) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示