版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、以cc2530芯片為平臺(tái)的智能家居模型somke.c煙霧傳感sun.c光傳感uart.c串口通信DHT11.C溫濕傳感Java坦克大戰(zhàn),難度不小.單人模式使用上下左右鍵移動(dòng),F鍵開火.雙人模式左方使用WASD移動(dòng),F開火,右方使用上下左右鍵移動(dòng),逗號(hào)鍵開火.文件TankWar.java 8KBpackage com.yuanhonglong.newTankWar;import java.io.BufferedReader;import java.io.File;import java.io.FileReader;import java.io.IOException;import java.ut
2、il.Timer;import java.util.TimerTask;import java.util.Vector;OSCHINA代碼分享代碼語言代碼分類JavaCC+C#JavaScriptPHPPerlPythonRuRailsHTMLXMLCSSASPBasicDelphiPascalScalaGroo vyLuaSQLGoogle GoFlashActionScriptFlexWPFSliverLightShell批處理其他 Objective-C 排序?yàn)g覽評(píng)論按代碼列表(33247)月上纖陌aliwxn Java 月上纖陌擅長語言Top3: Java601import javax
3、.swing.ImageIcon;import javax.swing.SwingUtilities;/*程序流程控制和程序靜態(tài)變量控制類*author YuanhonglongQQ:1948281915Date:2014-3-9*/public class TankWar /*從游戲開始到坦克運(yùn)動(dòng)的延遲時(shí)間*/protected static final int TANK_DELAY_TIME = 0 x3E8;/*固定刷新時(shí)間*/protected static final int REFRESH_TIME = 0 x83;/*為玩家和電腦坦克添加炸彈的固定間隔時(shí)間*/protected
4、static final int ADD_BOMB_TIME = 0 x3E8;/*炸彈圖片*/protected static final Imageicon BOMB_ICON = new ImageIcon(./src/com/yuanhonglong/newTankWar/map/shoot.png);/*記錄所有地圖的文件*/protected static final File MAP_FILE = new File(./src/com/yuanhonglong/newTankWar/map/map.data);/*地圖路徑*/代碼Google Go代碼 package main
5、import ( io/ioutil net/http net/ fmt encoding/json ) /黃金數(shù)據(jù)調(diào)用示例代碼一聚合數(shù)據(jù) /在線接口文檔:www/docs/29 /global:System.ComponentModel.EditorBrowsableAttribute(global:System.Componen tModel.EditorBrowsableState.Advanced)internal static global:System.Globalization.CultureInfo Culture get return resourceCulture;setr
6、esourceCulture = value; 文件Settings.Designer.cs 1KB This code was generated a tool.Runtime Version:4.0.30319.296Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. namespace ExcelToDB_Form.Propertiesglobal:System.Runtime.CompilerServices.CompilerGeneratedAtt
7、ribute()global:System.CodeDom.Compiler.GeneratedCodeAttribute(Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator”, )internal sealed partial class Settings : global:System.Configuration.ApplicationSettingsBaseprivate static Settings defaultInstance =(Settings)(global:System.C
8、onfiguration.ApplicationSettingsBase.Synchronized(n ew Settings();public static Settings Defaultgetreturn defaultInstance;const APPKEY = * /您申請(qǐng)的 APPKEYfunc main()/1.上海黃金交易所Request1()/2.上海期貨交易所Request2()/3.銀行賬戶黃金Request3() /1.上海黃金交易所func Request1()/請(qǐng)求地址juhe :=web:8080/finance/gold/shgold”/初始化參數(shù)param:
9、=.Values/配置請(qǐng)求參數(shù),方法內(nèi)部已處理encode問題,中文參數(shù)可以直接傳參param.Set(key”,APPKEY) /APP Keyparam.Set(v”,) /JSON 格式版本(0 或 1)默認(rèn)為 049C# 新建 entityframework 2 周前 colin_z發(fā)送請(qǐng)求data,err:=Get(juhe,param)if err!=nilfmt.Errorf(請(qǐng)求失敗,錯(cuò)誤信息:rn%v”,err)elsevar netReturn mapstringinterfacejson.Unmarshal(data,&netReturn)if netReturnerro
10、r_code.(float64)=0fmt.Printf(接口返回 result 字段是:rn%v”,netReturnresult) 113C#基于C#的航班動(dòng)態(tài)接口調(diào)用代碼實(shí)例3周前api-jiekou/2.上海期貨交易所func Request2()/請(qǐng)求地址juhe :=web:8080/finance/gold/shfuture/初始化參數(shù)param:=.Values/配置請(qǐng)求參數(shù),方法內(nèi)部已處理encode問題,中文參數(shù)可以直接傳參param.Set(key”,APPKEY) /APP Keyparam.Set(v”,) /JSON 格式版本(0 或 1)默認(rèn)為 086C#基于C#
11、的網(wǎng)站安全檢測接口調(diào)用代碼實(shí)例3周前php接口開發(fā)/發(fā)送請(qǐng)求data,err:=Get(juhe,param)if err!=nilfmt.Errorf(請(qǐng)求失敗,錯(cuò)誤信息:rn%v”,err)elsevar netReturn mapstringinterfacejson.Unmarshal(data,&netReturn)if netReturnerror_code.(float64)=0fmt.Printf(接口返回 result 字段是:rn%v”,netReturnresult) 62C#面向?qū)ο?靜態(tài)構(gòu)造函數(shù)&const 1個(gè)月前HJCui/3.銀行賬戶黃金func Request
12、3()/請(qǐng)求地址juhe :=web:8080/finance/gold/bankgold/初始化參數(shù)param:=.Values/配置請(qǐng)求參數(shù),方法內(nèi)部已處理encode問題,中文參數(shù)可以直接傳參param.Set(key”,APPKEY) /APP Key發(fā)送請(qǐng)求data,err:=Get(juhe,param)if err!=nilfmt.Errorf(請(qǐng)求失敗,錯(cuò)誤信息:rn%v”,err)elsevar netReturn mapstringinterfacejson.Unmarshal(data,&netReturn)if netReturnerror_code.(float64)
13、=0fmt.Printf(接口返回 result 字段是:rn%v”,netReturnresult) / get網(wǎng)絡(luò)請(qǐng)求func Get(api string,params .Values)(rsbyte ,err error)var *.,err=.Parse(api)if err!=nilfmt.Printf(解析錯(cuò)誤:rn%v”,err)return nil,err如果參數(shù)中有中文參數(shù),這個(gè)方法會(huì)進(jìn)行Encode.RawQuery=params.Encode()resp,err:=http.Get(.String()if err!=nilfmt.Println(err:,err)ret
14、urn nil,errdefer resp.Body.Close()return ioutil.ReadAll(resp.Body)/ post網(wǎng)絡(luò)請(qǐng)求,params是.Values類型func Post(api string, params .Values)(rsbyte,err error)resp,err:=http.PostForm(api, params)if err!=nilreturn nil ,errdefer resp.Body.Close()return ioutil.ReadAll(resp.Body)代碼描述:基于GO的黃金數(shù)據(jù)接口調(diào)用代碼實(shí)例關(guān)聯(lián)數(shù)據(jù):黃金數(shù)據(jù)代碼C#
15、代碼using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.IO;using Xfrog.Net;using System.Diagnostics;using System.Web;/黃金數(shù)據(jù)調(diào)用示例代碼一聚合數(shù)據(jù)/在線接口文檔:www/docs/29/ 代碼中 JsonObject 類下載地址:/download/gcm3206021155665/7458439/namespace ConsoleAPIclass Progra
16、mstatic void Main(string args) string appkey = *; /配置您申請(qǐng)的 appkey/1.上海黃金交易所string 1 = web:8080/finance/gold/shgold;var parameters】=new Dictionary();parameters1.Add(key,appkey);/你申請(qǐng)的 key parameters1.Add(v,”); /JSON格式版本(0 或 1)默認(rèn)為 0string result1 = sendPost(1, parameters, get);JsonObject newObj1 = new J
17、sonObject(result1);String errorCode1 = newObj1error_code.Value;if (errorCode1 = 0)Debug.WriteLine(成 功”);Debug.WriteLine(newObj1);else/Debug.WriteLine(失 敗”);Debug.WriteLine(newObj1error_code.Value+:+newObj1reason.Value);/2.上海期貨交易所string 2 = web:8080/finance/gold/shfuture;var parameters2 = new Diction
18、ary();parameters2.Add(key”, appkey);/你申請(qǐng)的 key parameters2.Add(v” , ); /JSON格式版本(0 或 1)默認(rèn)為 0string result2 = sendPost(2, parameters?, get);JsonObject newObj2 = new JsonObject(result2);String errorCode2 = newObj2error_code.Value;if (errorCode2 = 0) Debug.WriteLine(成 功”);Debug.WriteLine(newObj2);else/D
19、ebug.WriteLine(失 敗”);Debug.WriteLine(newObj2error_code.Value+:+newObj2reason.Value);/3.銀行賬戶黃金string 3 = web:8080/finance/gold/bankgold;var parameters3 = new Dictionary();parameters3.Add(key”, appkey);/你申請(qǐng)的 keystring result3 = sendPost(3, parameters3, get);JsonObject newObj3 = new JsonObject(result3)
20、;String errorCode3 = newObj3error_code.Value;if (errorCode3 = 0)Debug.WriteLine(成 功”);Debug.WriteLine(newObj3);else/Debug.WriteLine(失 敗”);Debug.WriteLine(newObj3error_code.Value+:+newObj3reason.Value);/ / Http (GET/POST)/ / 求/ 求參數(shù) / 求方法 / 響應(yīng)內(nèi)容 static string sendPost(string , IDictionary parameters,
21、string method)if (method.ToLower() = post)HttpWebRequest req = null;HttpWebResponse rsp = null;System.IO.Stream reqStream = null;tryreq = (HttpWebRequest)WebRequest.Create();req.Method = method;req.KeepAlive = false;req.ProtocolVersion = HttpVersion.Version10;req.Timeout = 5000;req.ContentType =appl
22、ication/x-www-form-encoded;charset=utf-8;byte postData =Encoding.UTF8.GetBytes(BuildQuery(parameters, utf8);reqStream = req.GetRequestStream();reqStream.Write(postData, 0, postData.Length);rsp = (HttpWebResponse)req.GetResponse();Encoding encoding = Encoding.GetEncoding(rsp.CharacterSet);return GetR
23、esponseAsString(rsp, encoding);catch (Exception ex)return ex.Message;finallyif (reqStream != null) reqStream.Close();if (rsp != null) rsp.Close();else/創(chuàng)建請(qǐng)求HttpWebRequest request = (HttpWebRequest)WebRequest.Create(+ ? + BuildQuery(parameters, utf8);/GET請(qǐng)求request.Method = GET;request.ReadWriteTimeout
24、 = 5000;request.ContentType = text/html;charset=UTF-8;HttpWebResponse response = (HttpWebResponse)request.GetResponse();Stream myResponseStream = response.GetResponseStream();StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding(utf-8”);返回內(nèi)容string retString = myStream
25、Reader.ReadToEnd();return retString;/ /組裝普通文本請(qǐng)求參數(shù)。/ / Key-Value 形式請(qǐng)求參數(shù)字典 / 編碼后的請(qǐng)求數(shù)據(jù)static string BuildQuery(IDictionary parameters, string encode)StringBuilder postData = new StringBuilder();bool hasParam = false;IEnumeratorKeyValuePair dem = parameters.GetEnumerator();while (dem.MoveNext()string na
26、me = dem.Current.Key;string value = dem.Current.Value;忽略參數(shù)名或參數(shù)值為空的參數(shù)if(!string.IsNullOrEmpty(name)/& !string.IsNullOrEmpty(value)if (hasParam)postData.Append(&);postData.Append(name);postData.Append(=); if (encode = gb2312) postData.Append(HttpUtility.Encode(value,Encoding.GetEncoding(gb2312);else i
27、f (encode = utf8”)postData.Append(HttpUtility.Encode(value,Encoding.UTF8);elsepostData.Append(value);hasParam = true;return postData.ToString();/ /把響應(yīng)流轉(zhuǎn)換為文本。/ / 應(yīng)流對(duì)象 / 碼方式 / 響應(yīng)文本 static string GetResponseAsString(HttpWebResponse rsp, Encoding encoding) System.IO.Stream stream = null;StreamReader rea
28、der = null;try/以字符流的方式讀取HTTP響應(yīng)stream = rsp.GetResponseStream();reader = new StreamReader(stream, encoding);return reader.ReadToEnd();finally/釋放資源if (reader != null) reader.Close();if (stream != null) stream.Close();if (rsp != null) rsp.Close();代碼PHP 代碼/* c遠(yuǎn)程傳輸工具*/public function post_c($,$body,$head
29、er,$type=POST)$ch = c_init();c_setopt($ch,COPT_,$);c_setopt($ch,COPT_HEADER,0);/0 只要正文c_setopt($ch,COPT_TIMEOUT,5);/設(shè)置超時(shí)時(shí)間c_setopt($ch,COPT_CONNECTTIMEOUT,5);/將c_exec()獲取的信息以文件流的形式返回,而不是直接輸出。c_setopt($ch,COPT_RETURNTRANSFER,1);/增加header頭信息/ array_push($header,Accept:application/json);/ array_push($h
30、eader,Content-Type:application/json);/ array_push($header,http:multipart/form-data);if(count($body)0)c_setopt($ch,COPT_POSTFIELDS,$body);if(count($header)0)c_setopt($ch,COPT_HTTPHEADER,$header);設(shè)置上傳文件相關(guān)c_setopt($ch,COPT_FOLLOWLOCATION,true);c_setopt($ch,COPT_MAXREDIRS,3);/遞歸c_setopt($ch,COPT_SSL_VER
31、IFYPEER,false);/ 對(duì)認(rèn)證證書來源的檢查c_setopt($ch,COPT_SSL_VERIFYHOST,0);/ 從證書中檢查 SSL 加密算法 switch ($type) case GET:c_setopt($ch,COPT_HTTPGET,1);break;case POST:c_setopt($ch,COPT_POST,1);break;case PUT:c_setopt($ch,COPT_CUSTOMREQUEST,PUT);break;case DELETE:c_setopt($ch,COPT_CUSTOMREQUEST,DELETE);break;/上傳文件相關(guān)設(shè)
32、置c_setopt($ch,COPT_ENCODING,gzip);c_setopt($ch,COPT_USERAGENT,SSTS Browser/1.0);c_setopt($ch,COPT_USERAGENT,Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0;Trident/4.0);/模擬用戶使用的瀏覽器if(c_errno($ch)return c_error($ch);$content = c_exec($ch);c_close($ch);/關(guān)閉c資源,并且釋放系統(tǒng)資源$result = json_decode($content,t
33、rue);if(!empty($result)return $result;elsereturn $content;代碼C/C+代碼/* HYPERLINK 小型臭氧發(fā)生器俚俚侃編譯指令$ /opt/sybase/OCS-16_0/bin/cpre64 -m teststu.cp$ cc -m64 -g -DSYB_LP64 -I. -I/opt/sybase/OCS-16_0/include teststu.c/opt/sybase/OCS-16_0/include/sybesql.c -L/opt/sybase/OCS-16_0/lib -lsybct64 -lsybtcl64 -lsyb
34、cs64 -lsybcomn64 -lsybintl64 -lsybunic64 -rdynamic -ldl -lnsl -lm -o teststu*/#include /*建立通訊區(qū)域*/EXEC SQL INCLUDE SQLCA;/* These tokens must be declared in a declare section* because they are used in declare sections below.*/EXEC SQL BEGIN DECLARE SECTION;#define TYPESIZE13#define TIDSIZE6EXEC SQL E
35、ND DECLARE SECTION;#define EOLN 0/* Forward declarations of the error and message handlers and* other subroutines called from main().*/void error_handler();void warning_handler();int main(int argc, char *argv)/*聲明宿主變量*/EXEC SQL BEGIN DECLARE SECTION;/* storage for login name and password. */charuser
36、name30;charsname30;charpassword30;charserver30;EXEC SQL END DECLARE SECTION;/*錯(cuò)誤處理*/EXEC SQL WHENEVER SQLERROR CALL error_handler();EXEC SQL WHENEVER SQLWARNING CALL warning_handler();EXEC SQL WHENEVER NOT FOUND CONTINUE;/*連接到SQL SERVER服務(wù)器*/* Copy the user name and password defined in sybsqlex.h to*
37、 the variables declared for them in the declare section.*/strcpy(username, mymotif);strcpy(password, wxwpxh);strcpy(server, MYMOTIFVOSTRO145480);EXEC SQL CONNECT :username IDENTIFIED BY :password using :server;EXEC SQL USE testdb;EXEC SQL DECLARE c1 CURSOR FORSELECT SNAME FROM STUDENT;EXEC SQL OPEN
38、c1;printf(name in table studentn);do EXEC SQL FETCH c1 INTO :sname;if (sqlca.sqlcode != 0) break;printf( student name = %sn”, sname ); while ( 1 );EXEC SQL CLOSE c1;return(0);/*錯(cuò)誤處理程序*/* void error_handler()* * Displays error codes and numbers from the SQLCA and exits with * an ERREXIT status.*/void
39、error_handler(void)fprintf(stderr, n* SQLCODE=(%ld)”, sqlca.sqlcode);if (sqlca.sqlerrm.sqlerrml)fprintf(stderr, n* ASE Error );fprintf(stderr, n* %s, sqlca.sqlerrm.sqlerrmc);fprintf(stderr, nn);exit(-1);/* void warning_handler()* Displays warning messages.*/voidwarning_handler(void)if (sqlca.sqlwarn
40、1 = W)fprintf(stderr,n* Data truncated.n);if (sqlca.sqlwarn3 = W)fprintf(stderr,n* Insufficient host variables to store results.n);return;代碼Log4j配置! 日志jar org.slf4jslf4j-log4j12導(dǎo)入這個(gè)包,會(huì)引入下面兩個(gè)jarorg.springframeworkspring-context-supportcommons-loggingcommons-logging-api1.1org.springframeworkspring-orm
41、!當(dāng) spring-config.xml 文件中配置需要加入此包一org.aspectjaspectjweaverorg.springframeworkspring-webmvc文件無縫滾動(dòng).html 1KB*margin: 0;padding: 0;#wrap ul liwidth: 380px;height: 230px;float: left;list-style: none;#wrap ulposition: absolute;left: 0;top: 0;#wrapwidth: 1520px;height: 230px;margin: 100px 50px;position: rel
42、ative;background: red;overflow: hidden;window.onload=function()var oDiv=document.getElementById(wrap);var oUl=oDiv.getElementsByTagName(ul)0;var oLi=oUl.getElementsByTagName(li);oUl.innerHTML=oUl.innerHTML+oUl.innerHTML;oUl.style.width=oLi0.offsetWidth*oLi.length+px;setInterval(function()if(oUl.offs
43、etLeft-oUl.offsetWidth/2)oUl.style.left=0oUl.style.left=oUl.offsetLeft-2+px;,30)代碼獲取的參數(shù)獲取的參數(shù)function getParam(paramKey)獲取當(dāng)前var = location.href;/獲取要取得的get參數(shù)位置var get = .indexOf(paramKey +=);if(get = -1)return false;/截取字符串var getParamStr = .slice(paramKey.length + get + 1);/判斷截取后的字符串是否還有其他get參數(shù)var nex
44、tparam = getParamStr.indexOf(&);if(nextparam != -1)getParamStr = getParamStr.slice(0, nextparam);return decodeURIComponent(getParamStr);代碼添加參數(shù)/添加參數(shù)function addParam(,paramKey,paramVal)var andStr = ?;var beforeparam = .indexOf(?”);if(beforeparam != -1)andStr = &”;return + andStr + paramKey + =+ encod
45、eURIComponent(paramVal);代碼刪除參數(shù)刪除參數(shù)function delParam(,paramKey)var Param = .substr(.indexOf(?”)+1);var before = .substr(0,.indexOf(?”); var next =;var arr = new Array();if(Param!=)var ParamArr = Param.split(&);for(var i=0;i0)next = ?+arr.join(&);=before+next;return ;代碼C#代碼#region防止sql注入式攻擊(可用于UI層控制)/
46、判斷字符串中是否有SQL攻擊代碼/傳入用戶提交數(shù)據(jù)/ true-安全;false-有注入攻擊現(xiàn)有;public bool ProcessSqlStr(string inputString)string SqlStr =礦and|or|exec|execute|insert|select|delete|update|alter|create|drop|count|*|chr|char|asc|mid|substring|master|truncate|declare|xp_cmdshell|restore|backup|net+user|net +localgroup +administrato
47、rs”;tryif (inputString != null) & (inputString != String.Empty)string str_Regex = b( + SqlStr + )b;Regex Regex = new Regex(str_Regex, RegexOptions.IgnoreCase);/string s = Regex.Match(inputString).Value;if (true = Regex.IsMatch(inputString) return false;catchreturn false;return true;/處理用戶提交的請(qǐng)求,校驗(yàn)sql注
48、入式攻擊,在頁面裝置時(shí)候運(yùn)行/System.Configuration.ConfigurationSettings.AppSettingsErrorPage.ToString(); 為用戶自定義錯(cuò)誤頁面提示地址,/在Web.Config文件時(shí)里面添加一個(gè)ErrorPage即可/public void ProcessRequest() trystring getkeys =;string sqlErrorPage =System.Configuration.ConfigurationSettings.AppSettingsErrorPage.ToString(); if (System.Web.
49、HttpContext.Current.Request.QueryString != null) for (int i = 0; i System.Web.HttpContext.Current.Request.QueryString.Count; i+) getkeys =System.Web.HttpContext.Current.Request.QueryString.Keysi;if (!ProcessSqlStr(System.Web.HttpContext.Current.Request.QueryStringgetkeys) System.Web.HttpContext.Curr
50、ent.Response.Redirect(sqlErrorPage + ?errmsg= + getkeys + 有 SQL 攻擊嫌疑!);System.Web.HttpContext.Current.Response.End();if (System.Web.HttpContext.Current.Request.Form != null)for (int i = 0; i maxLength)inputString = inputString.Substring(0, maxLength);return inputString;/將輸入字符串中的sql敏感字,替換成敏感字,要求輸出時(shí),替
51、換回來/public string MyEncodeInputString(string inputString)/要替換的敏感字string SqlStr =礦and|or|exec|execute|insert|select|delete|update|alter|create|drop|count|*|ch r|char|asc|mid|substring|master|truncate|declare|xp_cmdshell|restore|backup|net+user|net +localgroup +administrators”;tryif (inputString != nu
52、ll) & (inputString != String.Empty)string str_Regex = b( + SqlStr + )b;Regex Regex = new Regex(str_Regex, RegexOptions.IgnoreCase);/string s = Regex.Match(inputString).Value;MatchCollection matches = Regex.Matches(inputString);for (int i = 0; i matches.Count; i+)inputString = inputString.Replace(mat
53、chesi.Value, + matchesi.Value + );catch return ;return inputString;/將已經(jīng)替換成的敏感字,轉(zhuǎn)換回來為敏感字/public string MyDecodeOutputString(string outputstring)要替換的敏感字string SqlStr =and|or|exec|execute|insert|select|delete|update|alter|create|drop|count|*|chr|char|asc|mid|substring|master|truncate|declare|xp_cmdshel
54、l|restore|backup|net+user|net +localgroup +administrators;tryif (outputstring != null) & (outputstring != String.Empty)string str_Regex = b( + SqlStr + )b;Regex Regex = new Regex(str_Regex, RegexOptions.IgnoreCase);MatchCollection matches = Regex.Matches(outputstring);for (int i = 0; i matches.Count
55、; i+) outputstring = outputstring.Replace(matchesi.Value, matchesi.Value.Substring(1, matchesi.Value.Length - 2);catch return ;return outputstring;#endregionprotected static Vector allMapPaths;/*記錄地圖*/protected static int map;/*電腦坦克的向量*/protected static Vector tanks;/*游戲等級(jí)*/protected static int leve
56、l = 0 x0;/*玩家坦克和電腦坦克的生命*/protected static int tankLife = 0 x1;/*玩家坦克所守衛(wèi)的王*/protected static Tank kingTank;/*文件MySqlSetPanel.java 9KB 下載(0) package com.yisin.cf.form;import java.awt.Dimension;import java.awt.Toolkit;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sq
57、l.Connection;import java.sql.DriverManager;import java.util.HashMap;import javax.swing.JButton;import javax.swing.JCheckBox;import javax.swing.JComboBox;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPasswordField;import javax.swing.JTextField;import com.yisin.cf.util.C
58、ommonUtils;import com.yisin.cf.util.IniReader;SuppressWarnings(serial)public class MySqlSetPanel extends BasePanel private String = jdbc:mysql:/0:1/2”; private JTextField hostText = null;private JTextField userNameText = null;private JPasswordField pwdText = null;private JTextField portText = null;p
59、rivate JTextField dbText = null;private JCheckBox useBox = null;private JComboBox codeCombo = null;public static String sections = mysql_conn_info;public MySqlSetPanel(int width, int height) setPreferredSize(new Dimension(width, height); setLayout(null);initComponent();public void initComponent() in
60、t labelWidth = 150, labelTextHeight = 25, textWidth = 200;JLabel hostLabel = new JLabel(MySql 主機(jī)地址); hostLabel.setBounds(10, 10, labelWidth, labelTextHeight);hostText = new JTextField(); hostText.setBounds(labelWidth, 10, textWidth, labelTextHeight);/JLabel userNameLabel = new JLabel(用 戶名);userNameL
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 洗手護(hù)士保持手部清潔
- 2025-2030全球游戲QA和測試服務(wù)行業(yè)調(diào)研及趨勢分析報(bào)告
- 2025年全球及中國三維木質(zhì)墻板行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報(bào)告
- 2025年全球及中國電儲(chǔ)水熱水器行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報(bào)告
- 2025-2030全球加厚防爆高壓鍋行業(yè)調(diào)研及趨勢分析報(bào)告
- 2025年全球及中國鋁箔膠囊行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報(bào)告
- 2025年全球及中國工作站用橋式起重機(jī)行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報(bào)告
- 2025-2030全球法務(wù)技術(shù)服務(wù)行業(yè)調(diào)研及趨勢分析報(bào)告
- 2025合同模板房地產(chǎn)收購合同昆山某國際廣場整體購買協(xié)議
- 借款合同擔(dān)保書范本
- 2025年個(gè)人合法二手車買賣合同(4篇)
- 2025年山西國際能源集團(tuán)限公司所屬企業(yè)招聘43人高頻重點(diǎn)提升(共500題)附帶答案詳解
- 《小英雄雨來》讀書分享會(huì)
- 中央導(dǎo)管相關(guān)血流感染防控
- 農(nóng)業(yè)行政執(zhí)法現(xiàn)狀及相關(guān)法律法規(guī)課件
- 產(chǎn)時(shí)子癇應(yīng)急演練文檔
- 小學(xué)美術(shù)-《神奇的肥皂粉》教學(xué)設(shè)計(jì)學(xué)情分析教材分析課后反思
- 測量管理體系內(nèi)審檢查表
- 班組月度考核評(píng)分表
- 部編版一年級(jí)下冊(cè)《道德與法治》教學(xué)工作計(jì)劃及全冊(cè)教案
- 三重一大事項(xiàng)決策流程
評(píng)論
0/150
提交評(píng)論