首页
友链
壁纸
留言
今日热榜
更多
关于
时光
推荐
精品流量卡
Search
1
都二十多年了,你的梦为什么还没碎!
57,099 阅读
2
2022年5个好用的 BT/ 磁力链接下载工具推荐 |Windows 、安卓系统
37,445 阅读
3
nps内网穿透实现外网访问树莓派
32,437 阅读
4
实践利用宝塔建emlog个人博客-超详细【原创】
26,139 阅读
5
Typecho-Joe-Theme主题帮助文档
24,664 阅读
闲杂乱码
Python
网站源码
微信小程序
娱乐分享
Is相册
软件工具
登录
Search
标签搜索
PHP
HTML
API
Javascript
源码
JS
Vue
Github
CloudFlare
接口
函数
SQL
ASP.NET
MVC
EF
T4模板
后台管理
CDN
微信小程序
MAC
韩小韩
累计撰写
262
篇文章
累计收到
1,310
条评论
首页
栏目
闲杂乱码
Python
网站源码
微信小程序
娱乐分享
Is相册
软件工具
页面
友链
壁纸
留言
今日热榜
关于
时光
推荐
精品流量卡
搜索到
261
篇与
韩小韩
的结果
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,626 阅读
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,644 阅读
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 点赞
2019-03-07
手机号归属地查询API源码
返回值演示:{ "code": "200", "tel": "15029050105", "local": "归属地:陕西省西安市", "duan": "号码段:1502905", "type": "卡类型:陕西移动全球通卡", "yys": "运营商:中国移动", "bz": "通信标准:GSM (全球移动通信系统)" }接口源码:<?php $num = $_GET['num']; $result = file_get_contents("https://api.vvhan.com/api/phone?tel=" . $num); header("Content-Type:text/html;charset=UTF-8"); print_r($result); if ($arr['code'] == 1) { } ?>
2019年03月07日
4,613 阅读
4 评论
1 点赞
2019-03-07
ICP备案查询API源码
返回值演示:{ "code": "200", "主办名称": "厦门享联科技股份有限公司", "主办类型": "企业", "备案号码": "闽ICP备08105208号-1", "网站名称": "站长之家", "网站首页": "www.chinaz.com bbs.chinaz.com s.chinaz.com", "审核时间": "2019/1/30 0:00:00" }接口源码:<?php header("Content-Type:text/html;charset=UTF-8"); date_default_timezone_set("PRC"); $url = "www.han8.net"; $result = file_get_contents("https://api.vvhan.com/api/icp?url=" . $url); echo $result; ?>
2019年03月07日
5,354 阅读
2 评论
1 点赞
2019-03-07
城市天气查询API源码
返回值演示:{ "data": { "yesterday": { "date": "6日星期三", "high": "高温 16℃", "fx": "北风", "low": "低温 0℃", "fl": "<![CDATA[<3级]]>", "type": "晴" }, "city": "徐州", "forecast": [ { "date": "7日星期四", "high": "高温 11℃", "fengli": "<![CDATA[<3级]]>", "low": "低温 1℃", "fengxiang": "东北风", "type": "多云" }, { "date": "8日星期五", "high": "高温 13℃", "fengli": "<![CDATA[<3级]]>", "low": "低温 4℃", "fengxiang": "东南风", "type": "多云" }, { "date": "9日星期六", "high": "高温 14℃", "fengli": "<![CDATA[<3级]]>", "low": "低温 3℃", "fengxiang": "东北风", "type": "阴" }, { "date": "10日星期天", "high": "高温 13℃", "fengli": "<![CDATA[<3级]]>", "low": "低温 4℃", "fengxiang": "西北风", "type": "晴" }, { "date": "11日星期一", "high": "高温 14℃", "fengli": "<![CDATA[<3级]]>", "low": "低温 4℃", "fengxiang": "西北风", "type": "多云" } ], "ganmao": "将有一次强降温过程,天气寒冷,且空气湿度较大,极易发生感冒,请特别注意增加衣服保暖防寒。", "wendu": "11" }, "status": 1000, "desc": "OK" }接口源码:<?php header("Content-Type:text/html;charset=UTF-8"); $city = $_GET['city']; $result = file_get_contents("https://api.han8.net/api/weather?city=" . $city); echo $result; ?>
2019年03月07日
3,312 阅读
7 评论
3 点赞
2019-03-07
免IDKEY加QQ群
返回值演示:{ "code": 200, "msg": "url": "http://shang.qq.com/wpa/qunwpa? idkey=a77400bf74e499dd53e64a96e64450a0c6a834515c44ab0680074d83bc7d2b16" }API接口源码:<?php header('Location:https://api.vvhan.com/api/qun?id=237909152'); ?>
2019年03月07日
3,509 阅读
0 评论
0 点赞
1
...
31
32
33