This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//聯繫SQL 處理多筆SQL查詢 | |
private void getmutiquery() | |
{ | |
string cmdtext = "select top 10 * from Orders; select top 11 * from Products"; | |
using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString)) | |
{ | |
SqlCommand cmd = new SqlCommand(cmdtext, conn); | |
SqlDataReader dr = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum Order | |
{ | |
Ascending, | |
Descending | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum Order | |
{ | |
Ascending, | |
Descending | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
angular.module('app') | |
.controller('MainCtrl', MainCtrl); | |
//明確相依性注入 | |
MainCtrl.$inject = ['$scope', '$cookies', 'version', '$rootScope', 'Ipad1' , 'Ipad2', 'Ipad3', 'Ipad4']; | |
//如未加上面那段,此為隱含相依注入 | |
function MainCtrl($scope, $cookies, version, $rootScope, Ipad1, Ipad2, Ipad3, Ipad4) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"ID": "df046c2a-0347-4d3d-ba35-65d2aa351edb", | |
"Name": "問題faq2", | |
"Language": "中文", | |
"Category": "TEST Faq", | |
"Sort": 2, | |
"CreateTime": "2015-09-23T16:57:24.763", | |
"UpdateTime": "2015-09-23T16:57:24.763", | |
"TotalNum": 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--CSS--> | |
<link href="~/Content/fullcalendar.min.css" rel="stylesheet" /> | |
<link href="~/Content/bootstrap.css" rel="stylesheet" /> | |
<!--JS--> | |
<script src="~/Scripts/jquery-1.11.3.js"></script> | |
<script src="~/Scripts/moment.js"></script> | |
<script src="~/Scripts/fullcalendar.js"></script> | |
<script src="~/Scripts/bootstrap.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"lom": { | |
"general": { | |
"identifier": { | |
"catalog": "appgo", | |
"entry": "980" | |
}, | |
"title": { | |
"string": "拯救地球" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// String arrays 三種宣告方式: | |
string[] arr1 = new string[] { "1", "2", "3" }; | |
string[] arr2 = { "1", "2", "3" }; //匿名 | |
var arr3 = new string[] { "1", "2", "3" }; | |
string[] arr4 = new string[3]; | |
arr4[0] = "1"; | |
arr4[1] = "2"; | |
arr4[2] = "3"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NetWorkHelper | |
{ | |
public static string GetPublicIP() | |
{ | |
String direction = ""; | |
WebRequest request = WebRequest.Create("http://checkip.dyndns.org/"); | |
using (WebResponse response = request.GetResponse()) | |
using (StreamReader stream = new StreamReader(response.GetResponseStream())) | |
{ | |
direction = stream.ReadToEnd(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log" | |
layout=" | |
==================================================================================================== | |
${newline} | |
發生時間:${longdate} ${newline} | |
Logger:${logger} ${newline} | |
Log等級:${level:uppercase=true} ${newline} | |
request:${aspnet-request:serverVariable=url} ${newline} | |
sessionid:${aspnet-sessionid} ${newline} | |
ip:${aspnet-request:serverVariable=remote_host} ${newline} |
OlderNewer