会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
過朢
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2024年3月25日
JS添加input text、input button
摘要: <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)
2024年3月22日
JQuery 点击不同Button进不同方法
摘要: <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)
2024年3月17日
Dapper CURD
摘要: #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)
2024年3月16日
MySQL登录
摘要: //前台 账号:<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)
C#数组去重
摘要: (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)
Dictionary计算字符出现的次数
摘要: 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)
2024年3月13日
MSSQL行转列、列转行
摘要: 行转列 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)
C#中split的用法,在一串字符串中去除多余的符号
摘要: //将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)
上一页
1
2
3
4
5
6
下一页
公告