首页
友链
壁纸
留言
今日热榜
更多
关于
时光
推荐
精品流量卡
Search
1
都二十多年了,你的梦为什么还没碎!
57,100 阅读
2
2022年5个好用的 BT/ 磁力链接下载工具推荐 |Windows 、安卓系统
37,447 阅读
3
nps内网穿透实现外网访问树莓派
32,437 阅读
4
实践利用宝塔建emlog个人博客-超详细【原创】
26,139 阅读
5
Typecho-Joe-Theme主题帮助文档
24,665 阅读
闲杂乱码
Python
网站源码
微信小程序
娱乐分享
Is相册
软件工具
登录
Search
标签搜索
PHP
HTML
API
Javascript
源码
JS
Vue
Github
CloudFlare
接口
函数
SQL
ASP.NET
MVC
EF
T4模板
后台管理
CDN
微信小程序
MAC
韩小韩
累计撰写
262
篇文章
累计收到
1,310
条评论
首页
栏目
闲杂乱码
Python
网站源码
微信小程序
娱乐分享
Is相册
软件工具
页面
友链
壁纸
留言
今日热榜
关于
时光
推荐
精品流量卡
搜索到
151
篇与
闲杂乱码
的结果
2019-05-10
ASP.NET结合MVC+EF T4模板写后台管理系统框架(2)- 微软生成Bootstrap框架首页
首先建立空白解决方案,我们命名为BYCMS然后添加新项目BYCMS我习惯用解决方案名称.项目名选择MVC创建完后的效果图这个时候,按F5就可以直接运行看效果了最好自己按照自己的审美修改我们想要的样式
2019年05月10日
5,337 阅读
0 评论
0 点赞
2019-05-10
ASP.NET结合MVC+EF T4模板写后台管理系统框架(1)
开发工具:Visual Studio 2017数据库:SQL Server 2014涉及到的技术:EF DBFrist模式 控制反转(IOC) T4模板 AOP思想,基于角色组的权限控制
2019年05月10日
4,609 阅读
0 评论
0 点赞
2019-05-10
安卓Android按钮Button点击和复选框CheckBox选中的监控触发事件
CheckBox复选框和按钮Button的定义,main.xml内容如下:<CheckBox android:id="@+id/checkbox1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="复选框1" /> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/textView1" android:layout_marginTop="20dp" android:text="按钮1" />JAVA代码如下:btn1 =(Button)findViewById(R.id.button1); btn1.setOnClickListener(new Button.OnClickListener(){public void onClick(View arg0) {这里输入点击Button按钮触发的事件}}); CheckBox被选中或取消选中触发事件: checkbox1=(CheckBox)findViewById(R.id.checkbox1); b5.setOnCheckedChangeListener(new OnCheckedChangeListener(){if(checkbox1.isChecked()){这里输入CheckBox复选框选中时触发的事件}else{这里输入CheckBox复选框取消选中时触发的事件}});附:Button超简单监控点击事件按钮Button的定义,main.xml内容如下:<Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/textView1" android:layout_marginTop="20dp" android:text="按钮1" android:onClick="btnOnClick" />JAVA代码如下:public void btnOnClick(){ 这里输入 点击Button按钮触发的事件 }
2019年05月10日
2,348 阅读
0 评论
0 点赞
2019-05-10
安卓Android自定义dialog对话框确认取消按钮
实例为2个按钮 - 按需求自行添加按钮示例图片:示例代码:public void isHan() { AlertDialog.Builder builder=new AlertDialog.Builder(this); builder.setTitle("小韩提示"); builder.setIcon(android.R.drawable.ic_dialog_info); builder.setPositiveButton("确定", new DialogInterface.OnClickListener(){ //点击确定执行 @Override public void onClick(DialogInterface arg0, int arg1) { }}); builder.setNegativeButton("返回", new DialogInterface.OnClickListener(){ //点击取消执行 @Override public void onClick(DialogInterface arg0, int arg1) { }}); AlertDialog b = builder.create(); b.show();//显示对话框 }
2019年05月10日
1,578 阅读
0 评论
0 点赞
2019-03-26
JS实现HTML动态渐变纯色背景+CSS动态渐变字
CSS代码:<style> #ishanColor { animation: change 10s infinite; } @keyframes change { 0% { color: #66e616; } 25% { color: #556bd8; } 50% { color: #e40707; } 75% { color: #5cb85c; } 100% { color: #e7e97d; } } </style>JS实现HTML动态渐变纯色背景效果图:JS代码:<script> $(function () { var sec = 5; var sz = new Array('rgba(255,20,147,0.6)', 'rgba(152,251,152,0.6)', 'rgba(135,206,250)', 'rgba(0,255,255,0.6)', 'rgba(255,165,0,0.6)', 'rgba(186,85,211,0.6)'); timestar = setInterval(function () { if (sec >= 0) { document.body.style.background = sz[sec]; sec--; } else { sec = 5; } }, 1000); }) </script>CSS代码:body{ color: black background:white; transition: 3s; }
2019年03月26日
2,627 阅读
0 评论
0 点赞
2019-03-21
原生JS简易计算器
图片演示:代码演示:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>简单计算器 - NiceHan</title> <style type="text/css"> * { border: 0; } body { background-color: rgba(100, 149, 237, 0.8); } h1 { color: white; text-align: center; font-family: 'Microsoft YaHei'; font-size: 56px; font-weight: bold; text-shadow: 0px 0px 0 rgb(148, 148, 148), 1px 1px 0 rgb(125, 125, 125), 2px 2px 0 rgb(103, 103, 103), 3px 3px 0 rgb(80, 80, 80), 4px 4px 0 rgb(57, 57, 57), 5px 5px 0 rgb(34, 34, 34), 6px 6px 0 rgb(11, 11, 11), 7px 7px 6px rgba(0, 0, 0, 0.75), 7px 7px 1px rgba(0, 0, 0, 0.5), 0px 0px 6px rgba(0, 0, 0, .2); } input { margin: 6px; background-color: white; } .btnstyle { background-color: orange; } input:hover { background-color: #C0C0C0; } input[type=button] { height: 36px; width: 36px; } input[type=text] { height: 36px; width: 190px; } </style> <script type="text/javascript"> function num(val) { switch (val) { case "=": document.getElementById('texton').value = eval(document.getElementById('texton').value); break; case "AC": document.getElementById('texton').value = ""; break; default: document.getElementById('texton').value = document.getElementById('texton').value + val; document.getElementById('texton').value = document.getElementById('texton').value; } } </script> </head> <body> <h1>简单计算器 - NiceHan</h1> <div style="width: 208px;margin: auto;background-color: black;"> <input type="text" name="texton" id="texton" value="" style="text-align: center;font-size: 16px;background-color: lightyellow;" /> <br /> <input type="button" name="btn1" id="btnac" value="AC" onclick="num(this.value)" style="width: 141px;" /> <input type="button" name="btn1" id="btn+" value="+" onclick="num(this.value)" class="btnstyle" /> <br /> <input type="button" name="btn1" id="btn1" value="1" onclick="num(this.value)" /> <input type="button" name="btn1" id="btn2" value="2" onclick="num(this.value)" /> <input type="button" name="btn1" id="btn3" value="3" onclick="num(this.value)" /> <input type="button" name="btn1" id="btn-" value="-" onclick="num(this.value)" class="btnstyle" /> <br /> <input type="button" name="btn1" id="btn4" value="4" onclick="num(this.value)" /> <input type="button" name="btn1" id="btn5" value="5" onclick="num(this.value)" /> <input type="button" name="btn1" id="btn6" value="6" onclick="num(this.value)" /> <input type="button" name="btn1" id="*" value="×" onclick="num(this.id)" class="btnstyle" /> <br /> <input type="button" name="btn1" id="btn7" value="7" onclick="num(this.value)" /> <input type="button" name="btn1" id="btn8" value="8" onclick="num(this.value)" /> <input type="button" name="btn1" id="btn9" value="9" onclick="num(this.value)" /> <input type="button" name="btn1" id="/" value="÷" onclick="num(this.id)" class="btnstyle" /> <br /> <input type="button" name="btn0" id="btn0" value="0" onclick="num(this.value)" style="width: 90px;" /> <input type="button" name="btn1" id="btn." value="." onclick="num(this.value)" /> <input type="button" name="btn1" id="btn=" value="=" onclick="num(this.value)" class="btnstyle" /> </div> </body> </html>
2019年03月21日
1,942 阅读
4 评论
0 点赞
2019-03-17
QQ群卡屏撤回大表情代码
先看下效果:下面是代码———复制粘贴发送即可此处添加表情 sticker_start_tag_for_text{ "originMsgType": 0, "x": 0.07037036865949631, "y": 0.97685185223817825, "width": 0.96805555522441864, "height": 0.96805555522441864, "rotate": 0, "hostMsgSeq": 177238, "hostMsgUid": 72057594853690144, "hostMsgTime": 1521988367, "isDisplayed": false, "isShown": false, "msg": "" }sticker_end_tag_for_text
2019年03月17日
1,645 阅读
3 评论
1 点赞
2019-03-07
C#三层架构实现WinForm连接Mysql显示数据库数据实例
首先创建数据库丨 学号 姓名 班级 QQ 微信 丨5列三层架构,即包含 BLL,DAL,Model,DBHelper,Winform必须 Mysql 包using MySql.Data.MySqlClient;请依照下列文件规范命名首先配置WinForm下 App.config 文件(Mysql数据库连接为例)<?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionStrings> <add name ="NiceHanMySql" connectionString="server=数据库地址;port=端口号;user=数据库用户名;password=密码; database=数据库名;"/> </connectionStrings> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> </startup> </configuration>BLL 下 NiceBLL.cs文件代码using DAL; using Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BLL { public class NiceBLL { NiceDAL tableDal = new NiceDAL(); public List<NiceModel> GetTableList() { return tableDal.GetTablelist(); } public String NiceFormText() { return "NiceHan Mysql TextDate"; } public String SystemonLock() { return "NiceHanWinForm"; } } }DAL 下 NiceDAL.cs文件代码using Models; using SqlDbHelper; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Reflection.Emit; using System.Text; using System.Threading.Tasks; namespace DAL { public class NiceDAL { public List<NiceModel> GetTablelist() { string sqlStr = "select * from PZ "; DataTable sTable = NiceDB.GetDataTable(sqlStr, null); List<NiceModel> tableList = new List<NiceModel>(); foreach (DataRow dr in sTable.Rows) { NiceModel tb = new NiceModel(); tb.学号 = (dr["Num"].ToString()); tb.姓名 = (dr["Name"].ToString()); tb.班级 = (dr["Class"].ToString()); tb.QQ = (dr["QQ"].ToString()); tb.微信 = (dr["Wx"].ToString()); tableList.Add(tb); } return tableList; } } }Model 下 NiceModel.cs文件代码using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Models { public class NiceModel { public string 姓名 { set; get; } public string 学号 { set; get; } public string 班级 { set; get; } public string QQ { set; get; } public string 微信 { set; get; } } }DBhelper 下 NiceDB.cs文件代码using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Configuration; using System.Data; using MySql.Data.MySqlClient; namespace SqlDbHelper { public static class NiceDB { private static readonly string connStr = ConfigurationManager.ConnectionStrings["NiceHanMySql"].ConnectionString; public static int ExecuteNoneQuery(string sqlStr, params System.Data.SqlClient.SqlParameter[] pms) { using (MySqlConnection conn = new MySqlConnection(connStr)) { using (MySqlCommand cmd = new MySqlCommand(sqlStr, conn)) { if (pms != null) { cmd.Parameters.AddRange(pms); } conn.Open(); return cmd.ExecuteNonQuery(); } } } public static object ExecuteScalar(string sqlStr, params MySqlParameter[] pms) { using (MySqlConnection conn = new MySqlConnection(connStr)) { using (MySqlCommand cmd = new MySqlCommand(sqlStr, conn)) { if (pms != null) { cmd.Parameters.AddRange(pms); } conn.Open(); return cmd.ExecuteScalar(); } } } public static MySqlDataReader ExecuteReader(string sqlStr, params MySqlParameter[] pms) { using (MySqlConnection conn = new MySqlConnection(connStr)) { using (MySqlCommand cmd = new MySqlCommand(sqlStr, conn)) { if (pms != null) { cmd.Parameters.AddRange(pms); } try { conn.Open(); return cmd.ExecuteReader(); } catch { conn.Close(); conn.Dispose(); throw; } } } } public static DataTable GetDataTable(string sqlStr, params MySqlParameter[] pms) { using (MySqlDataAdapter adapter = new MySqlDataAdapter(sqlStr, connStr)) { DataTable dt = new DataTable(); if (pms != null) { adapter.SelectCommand.Parameters.AddRange(pms); } adapter.Fill(dt); return dt; } } } }Winform 下 NiceHanForm.cs文件代码using BLL; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace NiceHanForm { public partial class NiceHanForm : Form { public NiceHanForm() { InitializeComponent(); } private void Form2_Load(object sender, EventArgs e) { NiceBLL tb = new NiceBLL(); this.Text = tb.SystemonLock(); this.WinForm.Text = tb.NiceFormText(); this.dataGridView1.DataSource = tb.GetTableList(); } } }恭喜你完成 运行调试即可
2019年03月07日
3,147 阅读
0 评论
0 点赞
1
...
17
18
19