摘要: <body> <form id="form1" runat="server"> <div id="div1" class="a1" name="aaa"> <input type="text" class="a3" name="name" value="3" /> <input type="text 阅读全文
posted @ 2024-03-25 10:30 過朢 阅读(221) 评论(0) 推荐(0)
摘要: <script type="text/javascript" src="/js/jquery-3.2.0.min.js"></script> <script type="text/javascript"> //$(document).ready(function () { // $("#showPw 阅读全文
posted @ 2024-03-22 13:23 過朢 阅读(47) 评论(0) 推荐(0)
摘要: string msg = " hello word,你 好 世界 ! "; msg = msg.Trim(); string[] w = msg.Split(new char[]{' '},StringSplitOptions.RemoveEmptyEntries); string full = s 阅读全文
posted @ 2024-03-22 13:20 過朢 阅读(20) 评论(0) 推荐(0)
摘要: #region 使用匿名类插入数据 //IDbConnection connection = new SqlConnection("Data Source=PC20171312\\SQLEXPRESS;Initial Catalog=Users;uid=sa;pwd=sql123;MultipleA 阅读全文
posted @ 2024-03-17 11:18 過朢 阅读(27) 评论(0) 推荐(0)
摘要: //前台 账号:<asp:TextBox ID="txtName" runat="server"></asp:TextBox><br /> 密码:<asp:TextBox ID="txtPwd" runat="server"></asp:TextBox><br /> <asp:Button ID=" 阅读全文
posted @ 2024-03-16 20:18 過朢 阅读(19) 评论(0) 推荐(0)
摘要: (1)去重 int[] arr = { 1, 4, 3, 1, 6, 5, 6 };int[] arr2 = arr.Distinct().ToArray(); for (int i = 0; i < arr2.Length; i++) { Console.WriteLine(arr2[i]); } 阅读全文
posted @ 2024-03-16 20:16 過朢 阅读(194) 评论(0) 推荐(0)
摘要: string str = "两只老虎,两只老虎,跑得快,跑得快。一只没有耳朵,一只没有尾巴,真奇怪,真奇怪。"; Dictionary<char, int> dic = new Dictionary<char, int>(); for (int i = 0; i < str.Length; i++) 阅读全文
posted @ 2024-03-16 19:56 過朢 阅读(13) 评论(0) 推荐(0)
摘要: SqlDataAdapter sda = new SqlDataAdapter(); //DataSet //查询调用存储过程 需要先准备一个命令对象 SqlCommand cmd=new SqlCommand("PR_selectNew",conn); cmd.CommandType = Comm 阅读全文
posted @ 2024-03-16 19:50 過朢 阅读(35) 评论(0) 推荐(0)
摘要: 行转列 SELECT * FROM studentPIVOT ( SUM(score) FOR subject IN (语文, 数学, 英语)) AS PivotedData; 列转行 SELECT *FROM student1UNPIVOT ( score FOR subject IN ("语文" 阅读全文
posted @ 2024-03-13 11:14 過朢 阅读(225) 评论(0) 推荐(0)
摘要: //将123-4567 8910 4改为123-4567-8910-4 string msg1 = "123-4567 8910 4"; string[] parts = msg1.Split(new char[] {'-'},StringSplitOptions.RemoveEmptyEntrie 阅读全文
posted @ 2024-03-13 10:06 過朢 阅读(136) 评论(0) 推荐(0)