mysql 查看表的創(chuàng)建時(shí)間的語(yǔ)句
posted @ 2018-07-25 17:36 有機(jī)肥 閱讀(300) | 評(píng)論 (0) | 編輯 收藏
綠色
posted @ 2018-07-25 17:36 有機(jī)肥 閱讀(300) | 評(píng)論 (0) | 編輯 收藏
posted @ 2018-07-17 11:09 有機(jī)肥 閱讀(148) | 評(píng)論 (0) | 編輯 收藏
直接使用命令:
mysqldump -u root -p abc >abc.sql
然后回車輸入密碼就可以了;
mysqldump -u 數(shù)據(jù)庫(kù)鏈接用戶名 -p 目標(biāo)數(shù)據(jù)庫(kù) > 存儲(chǔ)的文件名
文件會(huì)導(dǎo)出到當(dāng)前目錄下
mysql -u 用戶名 -p 數(shù)據(jù)庫(kù)名 < 數(shù)據(jù)庫(kù)名.sql
mysql -u abc -p abc < abc.sql
注意sql文件必須在當(dāng)前目錄下,如果不在當(dāng)前目錄下需要在< 之后加上具體sql文件路徑
GBK: create database test2 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci;
UTF8: CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
posted @ 2018-06-25 22:45 有機(jī)肥 閱讀(163) | 評(píng)論 (0) | 編輯 收藏
posted @ 2018-06-08 11:04 有機(jī)肥 閱讀(165) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-10-30 16:47 有機(jī)肥 閱讀(140) | 評(píng)論 (0) | 編輯 收藏
桑葚采
摘
好去處
芳橋
1、綠大地果桑種植基地 13063669929
2、碧園春生態(tài)園 13771359607
3、張慕果園 13812203223
4、金沙灘蔬果園 13585035093
建議采摘路線:市區(qū)→東氿大道→百合大道→芳塍路往北(詳見(jiàn)地圖指示)
西渚
◆【1】甲有農(nóng)林生態(tài)園
地址:宜興市西渚鎮(zhèn)張戴公路白塔村部旁(近振元南路)
◆【2】白塔云芯林果專業(yè)合作社桑葚采摘園
地址:白塔村委入口斜對(duì)面張戴公路邊
◆【3】小杭采摘園
自駕線路: 宜興——橫山水庫(kù)
◆【4】白塔瓜果基地
自駕線路:導(dǎo)航即到
徐舍
◆ 蘇合農(nóng)產(chǎn)品銷售專業(yè)合作聯(lián)社
自駕線路:麥德龍——G104(行駛16.6公里)——徐舍鎮(zhèn)潘東村
湖?
◆【1】籬笆園農(nóng)家樂(lè)
地址:宜興市湖?鎮(zhèn)洑西村
◆【2】金沙灣農(nóng)莊
地址:宜興市湖?鎮(zhèn)東興村
posted @ 2017-10-30 16:45 有機(jī)肥 閱讀(138) | 評(píng)論 (0) | 編輯 收藏
![]() |
![]() |
![]() |
![]() |
![]() |
posted @ 2017-10-27 17:08 有機(jī)肥 閱讀(126) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-10-04 01:06 有機(jī)肥 閱讀(126) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-09-12 15:35 有機(jī)肥 閱讀(209) | 評(píng)論 (0) | 編輯 收藏
在Freemarker中,如果要判斷序列中是否包含某個(gè)指定的元素,可以使用freemarker的內(nèi)建函數(shù)seq_contains。
注:seq_contains這個(gè)內(nèi)建函數(shù)從FreeMarker 2.3.1 版本開始可用。而在2.3 版本中不存在。
使用示例:
輸出結(jié)果:
附:seq_前綴在這個(gè)內(nèi)建函數(shù)中是需要的,用來(lái)和contains 區(qū)分開。contains函數(shù)用來(lái)在字符串中查找子串(因?yàn)樽兞靠梢酝瑫r(shí)當(dāng)作字符串和序列)。
posted @ 2017-09-10 10:39 有機(jī)肥 閱讀(529) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-09-04 09:38 有機(jī)肥 閱讀(221) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-08-08 17:28 有機(jī)肥 閱讀(138) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-08-02 14:41 有機(jī)肥 閱讀(119) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-07-10 17:50 有機(jī)肥| 編輯 收藏
public
class
ClientFormLogin {
public
static
void
main(String[] args)
throws
Exception {
BasicCookieStore cookieStore =
new
BasicCookieStore();
CloseableHttpClient httpclient = HttpClients.custom()
.setDefaultCookieStore(cookieStore)
.build();
try
{
HttpGet httpget =
new
HttpGet(
"http://..."
);
CloseableHttpResponse response1 = httpclient.execute(httpget);
try
{
HttpEntity entity = response1.getEntity();
System.out.println(
"Login form get: "
+ response1.getStatusLine());
System.out.println(
"Initial set of cookies:"
);
List<Cookie> cookies = cookieStore.getCookies();
if
(cookies.isEmpty()) {
System.out.println(
"None"
);
}
else
{
for
(
int
i =
0
; i < cookies.size(); i++) {
System.out.println(
"- "
+ cookies.get(i).toString());
}
}
//輸出網(wǎng)頁(yè)源碼
String result = EntityUtils.toString(response1.getEntity(),
"utf-8"
);
System.out.println(result); EntityUtils.consume(entity);
}
finally
{
response1.close();
}
}
}
posted @ 2017-07-10 17:39 有機(jī)肥 閱讀(2075) | 評(píng)論 (0) | 編輯 收藏
posted @ 2017-07-10 17:27 有機(jī)肥| 編輯 收藏
yum update升級(jí)以后的系統(tǒng)版本為
[root@yl-web yl]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core)
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server
安裝成功后重啟mysql服務(wù)。
# service mysqld restart
初次安裝mysql,root賬戶沒(méi)有密碼。
[root@yl-web yl]# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.6.26 MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.01 sec) mysql>
設(shè)置密碼
mysql> set password for 'root'@'localhost' =password('password'); Query OK, 0 rows affected (0.00 sec) mysql>
不需要重啟數(shù)據(jù)庫(kù)即可生效。
mysql配置文件為/etc/my.cnf
最后加上編碼配置
[mysql] default-character-set =utf8
這里的字符編碼必須和/usr/share/mysql/charsets/Index.xml中一致。
把在所有數(shù)據(jù)庫(kù)的所有表的所有權(quán)限賦值給位于所有IP地址的root用戶。
mysql> grant all privileges on *.* to root@'%'identified by 'password';
如果是新用戶而不是root,則要先新建用戶
mysql>create user 'username'@'%' identified by 'password';
此時(shí)就可以進(jìn)行遠(yuǎn)程連接了。
posted @ 2017-03-01 10:20 有機(jī)肥 閱讀(164) | 評(píng)論 (0) | 編輯 收藏
linux zip命令
zip -r myfile.zip ./*
將當(dāng)前目錄下的所有文件和文件夾全部壓縮成myfile.zip文件,-r表示遞歸壓縮子目錄下所有文件.
2.unzip
unzip -o -d /home/sunny myfile.zip
把myfile.zip文件解壓到 /home/sunny/
-o:不提示的情況下覆蓋文件;
-d:-d /home/sunny 指明將文件解壓縮到/home/sunny目錄下;
3.其他
zip -d myfile.zip smart.txt
刪除壓縮文件中smart.txt文件
zip -m myfile.zip ./rpm_info.txt
向壓縮文件中myfile.zip中添加rpm_info.txt文件
-------------------------------------------------------------------------------
要使用 zip 來(lái)壓縮文件,在 shell 提示下鍵入下面的命令:
zip -r filename.zip filesdir
在這個(gè)例子里,filename.zip 代表你創(chuàng)建的文件,filesdir 代表你想放置新 zip 文件的目錄。-r 選項(xiàng)指定你想遞歸地(recursively)包括所有包括在 filesdir 目錄中的文件。
要抽取 zip 文件的內(nèi)容,鍵入以下命令:
unzip filename.zip
你可以使用 zip 命令同時(shí)處理多個(gè)文件和目錄,方法是將它們逐一列出,并用空格間隔:
zip -r filename.zip file1 file2 file3 /usr/work/school
上面的命令把 file1、file2、 file3、以及 /usr/work/school 目錄的內(nèi)容(假設(shè)這個(gè)目錄存在)壓縮起來(lái),然后放入 filename.zip 文件中。
posted @ 2016-12-07 14:39 有機(jī)肥 閱讀(116) | 評(píng)論 (0) | 編輯 收藏
JSON(javascript Object Notation) 是一種輕量級(jí)的數(shù)據(jù)交換格式,采用完全獨(dú)立于語(yǔ)言的文本格式,是理想的數(shù)據(jù)交換格式。同時(shí),JSON是 JavaScript 原生格式,這意味著在 JavaScript 中處理 JSON數(shù)據(jù)不須要任何特殊的 API 或工具包。
via在JSON中,有兩種結(jié)構(gòu):對(duì)象和數(shù)組。原文來(lái)自:http://caibaojian.com/jquery-each-json.html
1.對(duì)象
一個(gè)對(duì)象以“{”開始,“}”結(jié)束。每個(gè)“key”后跟一“:”,“‘key/value’ 對(duì)”之間運(yùn)用 “,”分隔。
packJson = {"name":"caibaojian.com", "password":"111"}
2.數(shù)組
packJson = [{"name":"caibaojian.com", "password":"111"}, {"name":"tony", "password":"111"}];
數(shù)組是值的有序集合。一個(gè)數(shù)組以“[”開始,“]”結(jié)束。值之間運(yùn)用 “,”分隔。
在數(shù)據(jù)傳輸流程中,json是以文本,即字符串的形式傳遞的,而JS操作的是JSON對(duì)象,所以,JSON對(duì)象和JSON字符串之間的相互轉(zhuǎn)換是關(guān)鍵。例如:
JSON字符串:
var jsonStr = '{"name":"caibaojian", "password":"1111"}';
JSON對(duì)象:
var jsonObj = {"name":"caibaojian.com", "password":"1111"};
1、String轉(zhuǎn)換為Json對(duì)象
var jsonObj = eval('(' + jsonStr + ')');
2.Json對(duì)象轉(zhuǎn)換為String字符串
var jsonStr = jsonObj.toJSONString();
grep
<script type='text/javascript' src="/jquery.js"></script> <script type="text/javascript"> $().ready( function(){ var array = [1,2,3,4,5,6,7,8,9]; var filterarray = $.grep(array,function(value){ return value > 5;//篩選出大于5的 }); for(var i=0;i<filterarray.length;i++){ alert(filterarray[i]); } for (key in filterarray){ alert(filterarray[key]); } } ); </script>
each
<script type='text/javascript' src="/jquery.js"></script> <script type="text/javascript"> $().ready( function(){ var anObject = {one:1,two:2,three:3};//對(duì)json數(shù)組each $.each(anObject,function(name,value) { alert(name); alert(value); }); var anArray = ['one','two','three']; $.each(anArray,function(n,value){ alert(n); alert(value); } ); } ); </script>
inArray
<script type='text/javascript' src="/jquery.js"></script> <script type="text/javascript"> $().ready( function(){ var anArray = ['one','two','three']; var index = $.inArray('two',anArray); alert(index);//返回該值在數(shù)組中的鍵值,返回1 alert(anArray[index]);//value is two } ); </script>
map
<script type='text/javascript' src="/jquery.js"></script> <script type="text/javascript"> $().ready( function(){ var strings = ['0','1','2','3','4','S','6']; var values = $.map(strings,function(value){ var result = new Number(value); return isNaN(result) ? null:result;//isNaN:is Not a Number的縮寫 } ); for (key in values) { alert(values[key]); } } ); </script>
遍歷json對(duì)象:
無(wú)規(guī)律:
<script> var json = [{dd:'SB',AA:'東東',re1:123},{cccc:'dd',lk:'1qw'}]; for(var i=0,l=json.length;i<l;i++){ for(var key in json[i]){ alert(key+':'+json[i][key]); } } </script>
有規(guī)律:
packJson = [ {"name":"nikita", "password":"1111"}, {"name":"tony", "password":"2222"} ]; for(var p in packJson){//遍歷json數(shù)組時(shí),這么寫p為索引,0,1 alert(packJson[p].name + " " + packJson[p].password); }
也可以用這個(gè):
for(var i = 0; i < packJson.length; i++){ alert(packJson[i].name + " " + packJson[i].password); }
遍歷json對(duì)象
myJson = {"name":"caibaojian", "password":"1111"}; for(var p in myJson){//遍歷json對(duì)象的每個(gè)key/value對(duì),p為key alert(p + " " + myJson[p]); }
//code from http://caibaojian.com/jquery-each-json.html 有如下 json對(duì)象: var obj ={"name":"馮娟","password":"123456","department":"技術(shù)部","sex":"女","old":30}; 遍歷方法: for(var p in obj){ str = str+obj[p]+’,'; return str; }
posted @ 2016-09-26 15:04 有機(jī)肥| 編輯 收藏