好吧,我承认我怂了.
今天在在用laravel框架写一个文件上传的部分.发现路径始终配不对.但是最终还是解决了.
下面我分享一下自己的学习体会吧.
客户端
提交到服务器端.
$file = Input::file('myfile');
if($file -> isValid()){
//检验一下上传的文件是否有效.
$clientNa...
分类:
Web程序 时间:
2014-06-05 03:38:39
阅读次数:
489
Once an algorithm is given for a problem and
decided to be correct, an important step is to determine how much in the way of resources,such as time or space, the algorithm will require.
...
分类:
其他好文 时间:
2014-06-05 02:14:29
阅读次数:
306
第一次使用session,需要:
$this->load->library('session');
的同时,还需要修改配置文件:config.php 找到 $config['encryption_key'] = ‘’
将$config['encryption_key'] 的内容随便设置,就可以用了。
附录:
1.添加session内容:
$this->session->set_us...
分类:
其他好文 时间:
2014-06-05 01:18:12
阅读次数:
201
【题目】
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before imple...
分类:
其他好文 时间:
2014-06-04 23:45:09
阅读次数:
388
下面是基于KWIC 的关键字匹配算法(管道+过滤器模式下实现)
关键部分的管道+过滤器 软件体系下的实现, 在很多的关键字搜索平台都使用了这一 循环移位+排序输出的 关键字匹配算法:
具体需求如下:
1、使用管道-过滤器风格:
每个过滤器处理数据,然后将结果送至下一个过滤器,。要有数据传入,过滤器即开始工作。过滤器之间的数据共享被严格限制在管道传输
四个过滤器:
输入(Input fi...
分类:
其他好文 时间:
2014-06-04 22:35:16
阅读次数:
572
题目描述 Description
一个大小为N(N
输入描述 Input Description
只有一个数N,表示需求的质数环的大小。如:
输出描述 Output Description
每一行描述一个数环,如果有多组解,按照字典序从小到大输出。如:
样例输入 Sample Input
6
...
分类:
其他好文 时间:
2014-06-04 21:44:09
阅读次数:
328
1.判断一个数是都是回文数
#include
int main(void)
{
int a[100] = {0};
int n;
printf("input n:");
scanf("%d", &n);
int i, k, j;
k = 0;
j = 0;
while(n != 0)
{
a[k++] = n % 10;
n = n / 10;
j+...
分类:
编程语言 时间:
2014-06-03 03:26:18
阅读次数:
255
三分查找:
#include
#define M 10
int main(void)
{
int front, near, mid1, mid2;
int n;
int found;
int a[M] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
front = 0;
near = M - 1;
found = 0;
printf("input n:");...
分类:
编程语言 时间:
2014-06-03 01:38:47
阅读次数:
399
/*****************************************************************jQuery
Validate扩展验证方法 ********************************************************...
分类:
编程语言 时间:
2014-05-31 18:29:44
阅读次数:
269
yum命令升级的时候,报出这个错误。There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides t...
分类:
编程语言 时间:
2014-05-31 17:42:52
阅读次数:
453