技术类
HTTP状态码:400\500 错误代码
一些常见的状态码为:200 – 服务器成功返回网页404 – 请求的网页不存在503 – 服务不可用详细分解:1xx(临时响应)表示临时响应并需要请求者继续执行操作的状态代码。代码 说明100 (继续) 请求者应当继 …
USB摄像头接入HomeKit
首先是USB摄像头接入HA的方法: 1.查看摄像头位置 使用命令 1 ls -l /dev/video* 2.直接在HA配置 1 2 3 4 camera: – platform: ffmpeg name: ctsxt input: /dev/video0 3.重启HA 简单爆了有 …
扔掉小米app,用hass添加网关子设备
这只是小米网关添加子设备的另外一种方式,当然了,你依然可以用小米app添加网关子设备,自己选择吧。下面是在hass里来添加网关子设备方法。一、在/config文件夹(就是那个名字为homeassistant的文件夹)的 …
中国拍猫第一人:被央视点赞,走遍全国拍猫6年,拍下4万多张“猫片”,网友:太治愈了
来源 | 益美传媒 ID | YeeMedia 01 40000张“猫片”刷屏朋友圈 网友:萌化我了 最近,一组“猫片”在朋友圈火了 这组照片全部以猫为主角 整个画面清新、温暖 充满生气 网友们在看到这组照片后 纷纷表示 自己内 …
怎么解决 win10 快捷方式不能固定到开始菜单
1、添加快捷方式到桌面 2、将快捷方式复制到C:\ProgramData\Microsoft\Windows\Start Menu\Programs里面 3、点击“开始”-》右击快捷方式-》固定到开始屏幕
如何解决Win10正式版无法输入中文汉字问题?
最近,有些用户反映自己在将电脑系统升级到Win10正式版后发现,在部分输入框中不能正常输入中文汉字。这该怎么办呢?接下来,小编就向大家分享Win10正式版无法输入中文汉字的解决方法。 具体方法: 1、当出 …
H5移动端点击input输入框弹出数字键盘
1 |
<input id="num" name="num" type="number" value="" /> |
把input输入框的格式改为number就可以弹出数字键盘 还有一种可以调用九宫格数字键盘:
1 |
<input pattern="\d*" type="number" /> |
Excel中时间的加减和间隔运算
在计算加班时间或制作派工单时,需要进行进行的加减和间隔计算。 一、时间加减计算 单元格A1为一具体时间 1、10小时后的时间 A1+Time(10,0,0) 或 A1+10:00:00 2、10个半小时后的时间 A1+Time(10,30,0) 或 A …
定义了重复的“system.web.extensions/scripting/scriptResourceHandler”节
HTTP 错误 500.19 – Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效。错误代码 0x800700b7 解决方法:在高级设置中,把这个网站的应用程序池的.NET Framework版本改为 v2.0,托管 …
php–判断当前日期是否是假日或法定休息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
//判断当前日期是否是假日或法定休息 $date = date("Ymd",time()); //dump($date);die; $url = "http://api.goseek.cn/Tools/holiday?date=".$date; $res = file_get_contents($url); $res = json_decode($res,true); if($res['data'] == 1 || $res['data'] == 2){ $data = array( "status" => "5", "info" => "当前非交易时间", ); ajaxR($data);//返回给前端信息 return false; } |
1、接口地址:http://api.goseek.cn/Tools/holiday?date=数字日期,支持https协议。 2、返回数据:正常工作日对应结果为 0, 法定节假日对应结果为 1, 节假日调休补班对应 …
php实现的DateDiff和DateAdd时间函数代码分享
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
function DateDiff($part, $begin, $end) { $diff = strtotime($end) - strtotime($begin); switch($part) { case "y": $retval = bcdiv($diff, (60 * 60 * 24 * 365)); break; case "m": $retval = bcdiv($diff, (60 * 60 * 24 * 30)); break; case "w": $retval = bcdiv($diff, (60 * 60 * 24 * 7)); break; case "d": $retval = bcdiv($diff, (60 * 60 * 24)); break; case "h": $retval = bcdiv($diff, (60 * 60)); break; case "n": $retval = bcdiv($diff, 60); break; case "s": $retval = $diff; break; } return $retval; } function DateAdd($part, $number, $date) { $date_array = getdate(strtotime($date)); $hor = $date_array["hours"]; $min = $date_array["minutes"]; $sec = $date_array["seconds"]; $mon = $date_array["mon"]; $day = $date_array["mday"]; $yar = $date_array["year"]; switch($part) { case "y": $yar += $number; break; case "q": $mon += ($number * 3); break; case "m": $mon += $number; break; case "w": $day += ($number * 7); break; case "d": $day += $number; break; case "h": $hor += $number; break; case "n": $min += $number; break; case "s": $sec += $number; break; } return date("Y-m-d H:i:s", mktime($hor, $min, $sec, $mon, $day, $yar)); } Function DateAdd($part, $n, $date) { switch($part) { case "y": $val = date("Y-m-d H:i:s", strtotime($date ." +$n year")); break; case "m": $val = date("Y-m-d H:i:s", strtotime($date ." +$n month")); break; case "w": $val = date("Y-m-d H:i:s", strtotime($date ." +$n week")); break; case "d": $val = date("Y-m-d H:i:s", strtotime($date ." +$n day")); break; case "h": $val = date("Y-m-d H:i:s", strtotime($date ." +$n hour")); break; case "n": $val = date("Y-m-d H:i:s", strtotime($date ." +$n minute")); break; case "s": $val = date("Y-m-d H:i:s", strtotime($date ." +$n second")); break; } return $val; } |
PHP时间戳转换为时分秒
时间戳转化成X天X小时X分X秒 //自定义函数(调用时输入实参$second)function time2string($second){$day = floor($second/(3600*24));$second = $second%(3600*24);$hour = floor($second/3600);$second = …
组件翻译区:【configuration.yaml】
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
homeassistant: # Name of the location where Home Assistant is running # 智能家居系统的名字,显示在主界面顶部。 name: 我的智能豪宅 # Location required to calculate the time the sun rises and sets # 下面填入纬度和经度,计算太阳升起和设定时间所需位置,越精确越好。 latitude: 36.85201 longitude: 116.225287 # Impacts weather/sunrise data (altitude above sea level in meters) # 海拔高度用于修正天气参数和日出日落时间参数 (默认单位是:米)。 elevation: 31 # metric for Metric, imperial for Imperial # 度量衡单位制式(metric)是公制,(imperial)是英制。 unit_system: metric # Pick yours from here: [url]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url] # 时区,从这里选择你的:[url]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url],默认北京时间。 time_zone: Asia/Shanghai customize: !include customize.yaml # 测试任何您更改的配置文件,在命令行中用hass --script check_config。这个脚本可以让你测试的变化而不需要重新启动家庭助理。 # Show links to resources in log and frontend # 在网页界面的首页显示简介 (那一大段英文)不想看到的话,请在前面加上#号。 #introduction: # Enables the frontend # 是否使用默认的“首页” frontend: # Enables configuration UI # 自定义配置UI config: http: # Uncomment this to add a password (recommended!) # 给系统网页的登录加上一个密码,先去掉下面这行的#号,然后把PASSWORD改成你想要的密码。 # api_password: # Uncomment this if you are using SSL/TLS, running in Docker container, etc. # base_url: example.duckdns.org:8123 # Checks for available updates # Note: This component will send some information about your system to # the developers to assist with development of Home Assistant. # For more information, please see: # [url]https://home-assistant.io/blog/2016/10/25/explaining-the-updater/[/url] updater: # Optional, allows Home Assistant developers to focus on popular components. # 升级提示,当 HomeAssitant 有新版本发布的时候,“日出日落”图标会变成(Updater)字样 # include_used_components: true # Discover some devices automatically # 系统自动发现新的设备 discovery: # Allows you to issue voice commands from the frontend in enabled browsers # 启动浏览器的语音命令 conversation: # Enables support for tracking state changes over time # 在系统数据库中保存“历史数据” history: # View all events in a logbook # 在logbook显示所有事件 logbook: # receive from broadlink开启博联日志 logger: default: critical logs: homeassistant.components.switch.broadlink: info # Track the sun # 太阳“跟踪器” 也就是“日出日落时间” #sun: panel_iframe: #添加HA侧边面板 designicons: title: 'Design Icons' icon: mdi:vector-square url: 'https://cdn.materialdesignicons.com/2.0.46/' # Text to speech # 文字转换语音 tts: - platform: google # 播放器 media_player: # - platform: # host: device_tracker: - platform: xiaomi host: 192.168.31.1 username: admin password: '**************'#这个不用我说了吧,换成自己的 track_new_devices : 1 #If new discovered devices are tracked by default #跟踪新设备的添加,默认true interval_seconds : 12 #Seconds between each scan for new devices #扫描每个设备的间隔 consider_home : 180 #Seconds to wait till marking someone as not home after not being seen. #This parameter is most useful for households with Apple iOS devices that go into sleep mode while still at home to conserve battery life. #iPhones will occasionally drop off the network and then re-appear. #It helps prevent false alarms in presence detection when using IP scanners such as Nmap. #Accepts various time representations, (E.g. the following all represents 3 minutes:180,0:03,0:03:00) #在设定秒数之后追踪不到某个设备,设置为不在家 #这个参数对于那些在家时进入睡眠模式的苹果iOS设备非常有用,以节省电池寿命。 #iPhone偶尔会脱离网络,然后重新出现。在使用IP扫描器如Nmap进行检测时有助于防止误报。 #接受各种时间表示(例如,以下代表3分钟:180,0:03,0:03:00) # 下面这个区域,用于自定义设备属性 switch: !include switchs.yaml group: !include groups.yaml automation: !include automations.yaml sensor: !include sensors.yaml |
vb.net教程之禁用窗体的关闭按钮
禁用窗体的关闭按钮
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
Public Class Form1 Private Declare Function GetSystemMenu Lib "User32" (ByVal hwnd As Integer, ByVal bRevert As Integer) As Integer Private Declare Function RemoveMenu Lib "User32" (ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer Private Declare Function DrawMenuBar Lib "User32" (ByVal hwnd As Integer) As Integer Private Declare Function GetMenuItemCount Lib "User32" (ByVal hMenu As Integer) As Integer Private Const MF_BYPOSITION = &H400& Private Const MF_DISABLED = &H2& Private Sub disableX(ByVal wnd As Form) Dim hMenu As Integer, nCount As Integer '得到系统Menu hMenu = GetSystemMenu(wnd.Handle.ToInt32, 0) '得到系统Menu的个数 nCount = GetMenuItemCount(hMenu) '去除系统Menu Call RemoveMenu(hMenu, nCount - 1, MF_BYPOSITION Or MF_DISABLED) '重画MenuBar DrawMenuBar(Me.Handle.ToInt32) End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click disableX(Me) '屏蔽关闭按钮 End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Me.MaximizeBox = False '屏蔽最大化按钮 End Sub Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click Me.MinimizeBox = False '屏蔽最小化按钮 End Sub End Class |
查询域名MX、A、DNS、txt、cname记录是否生效
对于做网站的朋友来说,经常会遇到域名解析了不知道是否生效的情况,以下就给大家介绍一下如何查询域名的MX、A、DNS、txt、cname记录是否生效 工具/原料 一台能上网的电脑 已解析的域名 方法/步骤1: 电脑中 …
各品牌网络监控摄像头RTSP地址查询
3S
1 2 |
<pre class="inline:true class:hljs less decode:1 " > <span class="hljs-attribute">rtsp</span>:<span class="hljs-comment">//IP地址/cam1/h264</span> |
4XEM
1 2 |
<pre class="inline:true class:hljs less decode:1 " > <span class="hljs-attribute">rtsp</span>:<span class="hljs-comment">//IP地址/live.sdp</span> |
A-MTK
1 2 |
<pre class="inline:true class:hljs less decode:1 " > <span class="hljs-attribute">rtsp</span>:<span class="hljs-comment">//IP地址/media/media.amp</span> |
ABS
1 2 |
<pre class="inline:true class:hljs less decode:1 " > <span class="hljs-attribute">rtsp</span>:<span class="hljs-comment">//IP地址/mpeg4/1/media.amp</span> |
Absolutron [crayon-6622735210d07855948994 …
pdf2swf+flexpaper解决pdf在线阅读(类百度文库)
1:工具准备swftools.exe 下载http://www.swftools.org/download.html 安装至D盘SWFTools提供了一系列将各种文件转成swf的工具:font2swf.exe gif2swf.exe jpeg2swf.exe pdf2swf.exe png2swf.exe wav2swf.e …
免费frp内网穿透,没有公网IP也能远程访问群晖!
首先说一下 这个方法无视内网,无视是否有公网IP这个教程很简单,有经验的大神可以路过了先说几个方案吧1.如果一分钱不想花,可以找个免费frp服务器,百度一下很多人提供现在就开始免费frp教程 这里我提供 …
微信JS SDK Demo 官方案例
微信JS-SDK是微信公众平台面向网页开发者提供的基于微信内的网页开发工具包。 通过使用微信JS-SDK,网页开发者可借助微信高效地使用拍照、选图、语音、位置等手机系统的能力,同时可以直接使用微信分享、扫 …