ENCTYPE="multipart/form-data"用于表单里有图片上传。
表单标签中设置enctype="multipart/form-data"来确保匿名上载文件的正确编码。 如下: ...
分类:
其他好文 时间:
2014-05-26 23:51:35
阅读次数:
375
例如:我想将String[] str = {"4","5","6"}转化为“‘4’,‘5’,‘6’”字符串。这样我就可以用sql查询:select * from tableName id in (字符串)了。
项目中实现的源码如下:
StringBuffer idsStr = new StringBuffer();
for (int i = 0; i < i...
分类:
数据库 时间:
2014-05-23 01:55:42
阅读次数:
390
题目说:Try to do this in one pass
只用一遍遍历的话,p1先走n节点,p2再走,等到p1到达链表尾的时候p2正好在倒数第n+1个上面鸟
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode...
分类:
其他好文 时间:
2014-05-23 01:52:29
阅读次数:
331
Smallest multiple
Problem 5
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly di...
分类:
其他好文 时间:
2014-05-23 01:51:13
阅读次数:
261
package com.wsy.model;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
public class ThreadScopeShareData {
static int data;
public static void main(String[] args) {
fin...
分类:
编程语言 时间:
2014-05-23 00:38:07
阅读次数:
287
LEFT JOIN 操作符
LEFT JOIN 关键字从左表(table1)返回所有的行,即使右表(table2)中没有匹配。如果右表中没有匹配,则结果为 NULL。
SQL LEFT JOIN 语法
SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name=table2.column_name;...
分类:
数据库 时间:
2014-05-23 00:10:46
阅读次数:
497
Remove Duplicates from Sorted Array...
分类:
其他好文 时间:
2014-05-22 23:06:48
阅读次数:
271
Problem 4: Largest palindrome product
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest pal...
分类:
其他好文 时间:
2014-05-22 18:48:46
阅读次数:
355
MySQL默认的数据文件存储目录为/var/lib/mysql。假如要把目录移到/home/data下需要进行下面几步:1.在home下建立目录mkdir-p/home/data/mysql2.停掉mysqld服务/etc/init.d/mysqldstop3.把/var/lib/mysql目录下面的内容迁移到/home/data/mysql下面4。修改my.cnf配置文件如果/etc..
分类:
数据库 时间:
2014-05-22 18:26:05
阅读次数:
405
import re
data = open('a.txt')
fh = open('b.txt', 'w')
"""Search the string begining with '【'"""
p = re.compile(r'\s*[\u3010]')
for each_d in data:
if re.match('\s*3\d{4}', each_d):
...
分类:
编程语言 时间:
2014-05-22 17:26:17
阅读次数:
293