摘要: $numbers = array(2,3,4,5,1,8,11,0); $count = count($numbers); for($i=1;$i<$count;$i++){ $j=$i-1; $key = $numbers[$i]; while($j>=0 && $numbers[$j] > $key){ $numbers[$j+1] = $numbers[$j]; $numbers[$j]= $key; $j= $j-1; } } print_r($numbers);
阅读全文
posted @ 2011-12-23 14:32 南通SEO 阅读(11) 评论(0)
编辑
摘要: BeanFactory是Spring的核心,我们可以把它理解成一个黑匣子,把相关的乱七八糟的bean配置信息传给它,它通过努力的分析,最终传给我们可以直接使用的Java对象。它的处理过程分为两大步骤: 1,容器的启动,主要完成的是Bean信息的搜集,用于以后实例化Bean。 2,Bean对象的实例化。 Bean信息最常用的配置文件便是XML文件,XML文件的优点不必多言。 01<?xml version="1.0" encoding="UTF-8"?>02<!DOCTYPE beans PUBLIC "-//SPRING//D
阅读全文
posted @ 2011-12-23 14:31 南通SEO 阅读(12) 评论(0)
编辑
摘要: 大家都知道,测试的原则的首条原则就是“所有的软件测试都应追溯到用户需求”。那么如何了解需求呢?测试人员常常要面对不同的系统进行测试,快速学习了解需求每个人都有自己的办法,这里分享一下我的方法。第一步:查看待测试项目的功能点。从功能点的多少上我们可以直接了解项目的规模,推测需测试需要的大体时间。对项目的需求量有了一个大体的了解。(第二步:了解待测试项目的业务规则。简单说,最基本的需求住住就是客户购买这软件的原因,或都是说客户购买这软件的最终目的。整个项目的全部业务规则都是为了这个目的实现的。有的业务规则与这个需求矛盾的也就是错误,开发人员有时会忽视这一点。第三步:分析业务实体。那实体是什么呢?业
阅读全文
posted @ 2011-12-23 14:31 南通SEO 阅读(12) 评论(0)
编辑
摘要: Target hardware is not ready until late in the project, delaying software testing.Target hardware is expensive and scarce. This makes developers wait and build up mounds of unverified work.When target hardware is finally available, it may have bugs of itsown. The mound of untested software has b...
阅读全文
posted @ 2011-12-23 14:25 南通SEO 阅读(6) 评论(0)
编辑
摘要: <FilesMatch "\.(?i:doc|odf|pdf|rtf|txt)$"> Header set Content-Disposition attachment </FilesMatch>
阅读全文
posted @ 2011-12-23 14:25 南通SEO 阅读(6) 评论(0)
编辑
摘要: 1.编译时: 加入 -fprofile-arcs -ftest-coverage 选项 2.Link时: 加入 -fprofile-arcs 3.生成的文件: gcda后缀名的文件 (GNU Compiler arc data) gcno后缀名的文件。
阅读全文
posted @ 2011-12-23 14:15 南通SEO 阅读(4) 评论(0)
编辑
摘要: 可能这应该算得上一个很古老的问题,解决的也有多种多样,不过Internet上比较多的是Excel的保存的范例,所以写一篇如何读取Excel,可能对大家有所帮助。 使用COM接口调用,把Excel应用程序作为一个Server,PHP间接使用Excel来读取文件。使用PHPExcel的程序包。它的优点不单单读取资料而且可以保存资料为Excel文件,同时还支持Excel 2007的格式。方法就是把Excel看作一个普通的Excel文件读取。还有一种是PHP Excel Reader,它把Excel文件看作一个二进制文件读取,不过不支持新版本Excel文件。 方法2可能看起来不错,不过当你在读取资料大
阅读全文
posted @ 2011-12-23 14:14 南通SEO 阅读(5) 评论(0)
编辑
摘要: Drupal supports translation is largely through the t() function. The function takes an optional second argument。 1 2 $values = array('@user' => $username); print t('Welcome, @user', $values); If the placeholder begins with at sign @, then before it inserts the value, Drupal saniti
阅读全文
posted @ 2011-12-23 14:14 南通SEO 阅读(11) 评论(0)
编辑
摘要: Drupal7 的文件系统使用了3种自定义的URI,操作起来和访问http、ftp协议类似,比较直观。 public://private://temp:// 用户还可以自己定义stream wrapper,来实现自己的URI。具体内容参见:DrupalStreamWrapperInterface。 当调用file_save_data时,有三种模式可以选择: FILE_EXISTS_REPLACE:覆盖原有的文件FILE_EXISTS_RENAME:对文件名从新命名,自动添加_1,_2等后缀。FILE_EXISTS_ERROR:什么事情都不做,直接返回错误。 默认为FILE_EXISTS_...
阅读全文
posted @ 2011-12-23 14:13 南通SEO 阅读(7) 评论(0)
编辑
摘要: >>> import django >>> django.VERSION
阅读全文
posted @ 2011-12-23 14:11 南通SEO 阅读(4) 评论(0)
编辑
摘要: 很多对于此问题的解答是编写一些批处理脚本来实现。其实最方便的方法就是使用unzip,在命令行输入unzip ‘*.zip’,由于在Linux环境下*具有特殊意义,所以记得必须在*.zip外添加引号。
阅读全文
posted @ 2011-12-23 14:11 南通SEO 阅读(6) 评论(0)
编辑
摘要: getParent(): Finds the parent widget or container. findViewById(): Finds a child widget with a certain ID. getRootView(): Gets the root of the tree (e.g., what you provided to the activity via setContentView()).
阅读全文
posted @ 2011-12-23 14:10 南通SEO 阅读(3) 评论(0)
编辑
摘要: Get the base url 1 2 3 4 5 Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); // default Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); Mage::getBaseUrl(Mage_Core_Model_Stor.
阅读全文
posted @ 2011-12-23 14:04 南通SEO 阅读(5) 评论(0)
编辑
摘要: 删除Paypal Partner <remove name=”paypal.partner.right.logo” /> <!–paypal logo–> 删除Community Poll <remove name=”right.poll”/> <remove name=”left.poll”/> 删除Tags <remove name=”tags_popular”/> 删除Compare Products <remove name=”catalog.compare.sidebar” /> <!–product co
阅读全文
posted @ 2011-12-23 14:03 南通SEO 阅读(10) 评论(0)
编辑