连接数据库的九个步骤1、引入命名空间 using System.Data.SqlClient;2、定义连接字符串 1)SQL Server 身份认证 string conString="Data Source=服务器名; Initial Catalog=数据库名; Use...
分类:
数据库 时间:
2015-04-10 23:50:52
阅读次数:
195
C#string类方法IndexOf(字符或者字符串),返回查找字符(串)的位置,从零开始,如果没有,则返回-1;SubString(开始位置,长度),截取字符串,ToUpper()ToLower()Split():变量名.Split(char型分隔符)Join():String.Join(连接符,...
由于java中+(加号或字符串连接)的运算顺序是从左向右的,所以一下程序的输出会得到两个不同的结果1 public class Test {2 public static void main(String[] args) { 3 System.out.println("...
分类:
编程语言 时间:
2015-04-10 23:44:12
阅读次数:
155
原文同步至 当我尝试在 switch 语句使用 String 参数时(注意`ctrType`为字符串) switch (ctrType) { case "01" : exceptionType = "读FC参数数据"; break; case "03" : exceptionType = "读FC保存的当前表计数据...
分类:
编程语言 时间:
2015-04-10 22:39:35
阅读次数:
207
题目:leetcode
Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
For example,
Given:
s1 = "aabcc",
s2 = "dbbca",
When s3 = "aadbbcb...
分类:
编程语言 时间:
2015-04-10 22:34:40
阅读次数:
207
#include
#include
#include
#include
#include
using namespace std;
#define maxn 400000 + 10
int len, next[maxn], cnt = 0;
int L;
string s1, s;
void getnext()
{
int i = 0;
int j = -1;...
分类:
其他好文 时间:
2015-04-10 22:34:05
阅读次数:
122
不开心,简单的三维bfs
#include
#include
using namespace std;
string str1,str2;
int n;
int sx,sy,sz,ex,ey,ez;
char mapp[11][11][11];
int dir[6][3]={{0,0,1},{0,0,-1},{1,0,0},{-1,0,0},{0,1,0},{0,-1,0}};
int re...
分类:
其他好文 时间:
2015-04-10 22:27:57
阅读次数:
133
一、基本数据类型:1、bool:布尔类型值,只有true和false。2、byte:8位带符号整数。3、i16:16位带符号整数。4、i32:32位带符号整数。5、i64:64位带符号整数。6、double:64位浮点数。7、string:使用utf-8编码的字符串类型。二、特殊数据类型:1、bin...
分类:
其他好文 时间:
2015-04-10 22:17:45
阅读次数:
123
??
问题描述:Write a function to find the longest common prefix stringamongst an array of
strings.
问题分析:
代码:
public class Solution {
public String longestCommonPrefix(String[] strs) {
...
分类:
其他好文 时间:
2015-04-10 22:11:48
阅读次数:
106
原文同步至 http://www.waylau.com/java-switch-use-string/当我尝试在 switch 语句使用 String 参数时(注意ctrType为字符串) switch (ctrType) {
case "01" :
exceptionType = "读FC参数数据";
break;
case "03" :...
分类:
编程语言 时间:
2015-04-10 22:10:58
阅读次数:
128