适合小白的黑群晖安装教程
有很多小伙伴听说过黑裙辉,也想用自己淘汰下来的电脑自己DIY一台属于自己的群晖系统,但是很多时候由于自己对系统安装的流程不懂,或者找不到安装需要的软件以及系统文件而苦苦无法实现自己空有想法。那么 …
有很多小伙伴听说过黑裙辉,也想用自己淘汰下来的电脑自己DIY一台属于自己的群晖系统,但是很多时候由于自己对系统安装的流程不懂,或者找不到安装需要的软件以及系统文件而苦苦无法实现自己空有想法。那么 …
从事开发工作或学习编程的同学,每天面对最多的无非就是编辑器以及代码本身了。而用于显示代码的字体好坏 (清晰、易辨认),也会直接影响着代码的可读性和眼睛的舒适度。 所以大多数人都会专门在一些热门的 …
引号通常是您文章中最难忘的部分。 它们也是任何帖子或演示文稿中最共享的部分。 这就是为什么报纸和主流媒体网站自定义其大字体引用样式以使其脱颖而出的原因。 在本文中,我们将向您展示如何在WordPress …
在上一篇《什么是网络流量劫持?》一文中,我们介绍了常见的黑客劫持网络流量的途径。然而无论用何种方式获得流量,只有加以利用才能发挥作用。 不同的劫持方式,获得的网络流量也有所差异。DNS 劫持,只能 …
流量劫持是一种古老的网络攻击手段,在沉寂了一大段时间后,最近又开始闹的沸沸扬扬。众多知名品牌的路由器相继爆出存在安全漏洞,引来国内媒体纷纷报道。只要用户没改默认密码,打开一个网页甚至帖子,路 …
很多人都想试试自己建站玩一玩 (比如博客、自建网盘、远程下载等),但家里宽带没公网 IP,特意买台服务器又显得浪费。那么有没成本小、可玩性高、又能长期稳定使用的方案呢? 其实,免费的 …
如果你入手了自己的 VPS 服务器,打算学习自己搭建网站或网络服务,那么基本都需要安装「NGINX」以及学习如何编写它的配置文件了。 尽管 Nginx 真的非常非常强大!几乎已经是所有 Web 服务器 …
群晖NAS的NFS协议作用是可以让蓝光播放机或者一些安卓盒子通过局域网访问NAS共享文件夹,像亿格瑞蓝光播放机都支持SMB或者NFS协议,一般使用SMB会更方便,电脑或者NAS的共享文件夹都可以直接访问到。但NFS …
群晖 DSM7.0 默认停用了 NTLMv1 认证,仅启用 NTLMv2,部分 SMB 客户端(WindowsXP 设备,媒体播放器,网络打印机,智能电视,IP 网络摄像机等设备)将无法正常连接群晖 NAS,更新后如需正常使用以上设备的 …
1、群晖在控制面板-终端机与SMNP,启用SSH功能; 2、在电脑的SSH工具,以root登录群晖,输入命令:
1 |
<span class="hljs-attribute">udevadm</span> <span class="hljs-literal">info</span> /dev/nvme0n1 |
我们要记住自己的nvme所在的位置,比如我的就是0000:00:1d.0,这个数 …
WordPress 用户最头疼的问题就是站点白屏打不开了,或者后台进不去了,这就是 WordPress 的致命错误,英文是 White Screen of Death(白屏错误),简称:WSoD。 同样类似的,使用 WPJAM Basic 插件的用户, …
Cam.vb 代码
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
Imports System Imports System.Runtime.InteropServices Imports System.Drawing Imports System.Drawing.Imaging Public Class Cam Private Const WM_USER As Integer = &H400 Private Const WS_CHILD As Integer = &H40000000 Private Const WS_VISIBLE As Integer = &H10000000 Private Const WM_CAP_START As Integer = WM_USER Private Const WM_CAP_STOP As Integer = WM_CAP_START + 68 Private Const WM_CAP_DRIVER_CONNECT As Integer = WM_CAP_START + 10 Private Const WM_CAP_DRIVER_DISCONNECT As Integer = WM_CAP_START + 11 Private Const WM_CAP_SAVEDIB As Integer = WM_CAP_START + 25 Private Const WM_CAP_GRAB_FRAME As Integer = WM_CAP_START + 60 Private Const WM_CAP_SEQUENCE As Integer = WM_CAP_START + 62 Private Const WM_CAP_FILE_SET_CAPTURE_FILEA As Integer = WM_CAP_START + 20 Private Const WM_CAP_SEQUENCE_NOFILE As Integer = WM_CAP_START + 63 Private Const WM_CAP_SET_OVERLAY As Integer = WM_CAP_START + 51 Private Const WM_CAP_SET_PREVIEW As Integer = WM_CAP_START + 50 Private Const WM_CAP_SET_CALLBACK_VIDEOSTREAM As Integer = WM_CAP_START + 6 Private Const WM_CAP_SET_CALLBACK_ERROR As Integer = WM_CAP_START + 2 Private Const WM_CAP_SET_CALLBACK_STATUSA As Integer = WM_CAP_START + 3 Private Const WM_CAP_SET_CALLBACK_FRAME As Integer = WM_CAP_START + 5 Private Const WM_CAP_SET_SCALE As Integer = WM_CAP_START + 53 Private Const WM_CAP_SET_PREVIEWRATE As Integer = WM_CAP_START + 52 Public Const WM_CAP_GET_CAPSTREAMPTR = WM_CAP_START + 1 Public Const WM_CAP_SET_CALLBACK_STATUS = WM_CAP_START + 3 Public Const WM_CAP_SET_CALLBACK_YIELD = WM_CAP_START + 4 Public Const WM_CAP_SET_CALLBACK_WAVESTREAM = WM_CAP_START + 7 Public Const WM_CAP_GET_USER_DATA = WM_CAP_START + 8 Public Const WM_CAP_SET_USER_DATA = WM_CAP_START + 9 Public Const WM_CAP_DRIVER_GET_NAME = WM_CAP_START + 12 Public Const WM_CAP_DRIVER_GET_VERSION = WM_CAP_START + 13 Public Const WM_CAP_DRIVER_GET_CAPS = WM_CAP_START + 14 Public Const WM_CAP_FILE_SET_CAPTURE_FILE = WM_CAP_START + 20 Public Const WM_CAP_FILE_GET_CAPTURE_FILE = WM_CAP_START + 21 Public Const WM_CAP_FILE_ALLOCATE = WM_CAP_START + 22 Public Const WM_CAP_FILE_SAVEAS = WM_CAP_START + 23 Public Const WM_CAP_FILE_SET_INFOCHUNK = WM_CAP_START + 24 Public Const WM_CAP_FILE_SAVEDIB = WM_CAP_START + 25 Public Const WM_CAP_EDIT_COPY = WM_CAP_START + 30 Public Const WM_CAP_SET_AUDIOFORMAT = WM_CAP_START + 35 Public Const WM_CAP_GET_AUDIOFORMAT = WM_CAP_START + 36 Public Const WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41 Public Const WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42 Public Const WM_CAP_DLG_VIDEODISPLAY = WM_CAP_START + 43 Public Const WM_CAP_GET_VIDEOFORMAT = WM_CAP_START + 44 Public Const WM_CAP_SET_VIDEOFORMAT = WM_CAP_START + 45 Public Const WM_CAP_DLG_VIDEOCOMPRESSION = WM_CAP_START + 46 Public Const WM_CAP_GET_STATUS = WM_CAP_START + 54 Public Const WM_CAP_SET_SCROLL = WM_CAP_START + 55 Public Const WM_CAP_GRAB_FRAME_NOSTOP = WM_CAP_START + 61 Public Const WM_CAP_SET_SEQUENCE_SETUP = WM_CAP_START + 64 Public Const WM_CAP_GET_SEQUENCE_SETUP = WM_CAP_START + 65 Public Const WM_CAP_SET_MCI_DEVICE = WM_CAP_START + 66 Public Const WM_CAP_GET_MCI_DEVICE = WM_CAP_START + 67 Public Const WM_CAP_ABORT = WM_CAP_START + 69 Public Const WM_CAP_SINGLE_FRAME_OPEN = WM_CAP_START + 70 Public Const WM_CAP_SINGLE_FRAME_CLOSE = WM_CAP_START + 71 Public Const WM_CAP_SINGLE_FRAME = WM_CAP_START + 72 Public Const WM_CAP_PAL_OPEN = WM_CAP_START + 80 Public Const WM_CAP_PAL_SAVE = WM_CAP_START + 81 Public Const WM_CAP_PAL_PASTE = WM_CAP_START + 82 Public Const WM_CAP_PAL_AUTOCREATE = WM_CAP_START + 83 Public Const WM_CAP_PAL_MANUALCREATE = WM_CAP_START + 84 '// Following added post VFW 1.1 Public Const WM_CAP_SET_CALLBACK_CAPCONTROL = WM_CAP_START + 85 '// Defines end of the message range Public Const WM_CAP_END = WM_CAP_SET_CALLBACK_CAPCONTROL Private hWndC As IntPtr Private bStat As Boolean = False Private mControlPtr As IntPtr Private mWidth As Integer Private mHeight As Integer Private mLeft As Integer Private mTop As Integer <DllImport("avicap32.dll")> _ Private Shared Function capCreateCaptureWindowA(ByVal lpszWindowName() As Byte, ByVal dwStyle As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hWndParent As IntPtr, ByVal nID As Integer) As IntPtr End Function <DllImport("avicap32.dll")> _ Private Shared Function capGetVideoFormat(ByVal hWnd As IntPtr, ByVal psVideoFormat As IntPtr, ByVal wSize As Integer) As Integer End Function <DllImport("User32.dll")> _ Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Boolean End Function Function capDlgVideoFormat() As Boolean capDlgVideoFormat = SendMessage(hWndC, WM_CAP_DLG_VIDEOFORMAT, 0, 0) End Function Function capDlgVideoSource() As Boolean capDlgVideoSource = SendMessage(hWndC, WM_CAP_DLG_VIDEOSOURCE, 0, 0) End Function Function capDlgVideoDisplay() As Boolean capDlgVideoDisplay = SendMessage(hWndC, WM_CAP_DLG_VIDEODISPLAY, 0, 0) End Function Function capDlgVideoCompression() As Boolean capDlgVideoCompression = SendMessage(hWndC, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0) End Function '接上节 '/// '/// 初始化摄像头 '/// '///控件的句柄 '///开始显示的左边距 '///开始显示的上边距 '///要显示的宽度 '///要显示的长度 Public Sub New(ByVal handle As IntPtr, ByVal left As Integer, ByVal top As Integer, ByVal width As Integer, ByVal height As Integer) mControlPtr = handle mWidth = width mHeight = height mLeft = left mTop = top End Sub '/// '/// 开始显示图像 '/// Public Sub Start() If bStat Then Return End If bStat = True Dim lpszName(99) As Byte hWndC = capCreateCaptureWindowA(lpszName, WS_CHILD Or WS_VISIBLE, mLeft, mTop, mWidth, mHeight, mControlPtr, 0) If hWndC.ToInt32() <> 0 Then SendMessage(hWndC, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0) SendMessage(hWndC, WM_CAP_SET_CALLBACK_ERROR, 0, 0) SendMessage(hWndC, WM_CAP_SET_CALLBACK_STATUSA, 0, 0) SendMessage(hWndC, WM_CAP_DRIVER_CONNECT, 0, 0) SendMessage(hWndC, WM_CAP_SET_SCALE, 1, 0) SendMessage(hWndC, WM_CAP_SET_PREVIEWRATE, 66, 0) SendMessage(hWndC, WM_CAP_SET_OVERLAY, 1, 0) SendMessage(hWndC, WM_CAP_SET_PREVIEW, 1, 0) End If Return End Sub '/// '/// 停止显示 '/// Public Sub [Stop]() SendMessage(hWndC, WM_CAP_DRIVER_DISCONNECT, 0, 0) bStat = False End Sub '/// '/// 抓图 '/// '///要保存bmp文件的路径 Public Sub GrabImage(ByVal path As String) Dim hBmp As IntPtr = Marshal.StringToHGlobalAnsi(path) SendMessage(hWndC, WM_CAP_SAVEDIB, 0, hBmp.ToInt64()) End Sub '/// '/// 录像 '/// '///要保存avi文件的路径 Public Sub Kinescope(ByVal path As String) Dim hBmp As IntPtr = Marshal.StringToHGlobalAnsi(path) SendMessage(hWndC, WM_CAP_FILE_SET_CAPTURE_FILEA, 0, hBmp.ToInt64()) SendMessage(hWndC, WM_CAP_SEQUENCE, 0, 0) End Sub '/// '/// 停止录像 '/// Public Sub StopKinescope() SendMessage(hWndC, WM_CAP_STOP, 0, 0) End Sub End Class |
窗体 Form1.vb
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
Public Class Form1 Inherits System.Windows.Forms.Form Private cccap As Cam #Region " Windows 窗体设计器生成的代码 " Public Sub New() MyBase.New() '该调用是 Windows 窗体设计器所必需的。 InitializeComponent() '在 InitializeComponent() 调用之后添加任何初始化 End Sub '窗体重写 dispose 以清理组件列表。 Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Windows 窗体设计器所必需的 Private components As System.ComponentModel.IContainer '注意: 以下过程是 Windows 窗体设计器所必需的 '可以使用 Windows 窗体设计器修改此过程。 '不要使用代码编辑器修改它。 Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents picView As System.Windows.Forms.PictureBox Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.picView = New System.Windows.Forms.PictureBox Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.Button3 = New System.Windows.Forms.Button Me.Button4 = New System.Windows.Forms.Button Me.Button5 = New System.Windows.Forms.Button Me.SuspendLayout() ' 'picView ' Me.picView.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.picView.Location = New System.Drawing.Point(16, 16) Me.picView.Name = "picView" Me.picView.Size = New System.Drawing.Size(640, 480) Me.picView.TabIndex = 0 Me.picView.TabStop = False ' 'Button1 ' Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button1.Location = New System.Drawing.Point(244, 540) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(56, 24) Me.Button1.TabIndex = 1 Me.Button1.Text = "start" ' 'Button2 ' Me.Button2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button2.Location = New System.Drawing.Point(304, 540) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(56, 24) Me.Button2.TabIndex = 1 Me.Button2.Text = "stop" ' 'Button3 ' Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button3.Location = New System.Drawing.Point(380, 540) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(56, 24) Me.Button3.TabIndex = 1 Me.Button3.Text = "cap" ' 'Button4 ' Me.Button4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button4.Location = New System.Drawing.Point(352, 508) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(124, 24) Me.Button4.TabIndex = 1 Me.Button4.Text = "色彩校正" ' 'Button5 ' Me.Button5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button5.Location = New System.Drawing.Point(164, 512) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(124, 24) Me.Button5.TabIndex = 1 Me.Button5.Text = "画面大小" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14) Me.ClientSize = New System.Drawing.Size(792, 573) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.picView) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.Button5) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region Private cccap As Cam Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load cccap = New Cam(picView.Handle, 0, 0, picView.Width, picView.Height) cccap.Start() cccap.capDlgVideoFormat() End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click cccap.GrabImage("c:\test.jpg") cccap.Stop() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click cccap.Stop() End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click cccap.capDlgVideoFormat() End Sub End Class |
注意要点:视频格式应该要设置为“YUY2”,不然可能会显示不出来。
起因 最近帮同事实现了一个小功能——复制文本到剪贴板,主要参考了前端大神阮一峰的博客,根据 navigator.clipboard 返回的 Clipboard 对象的方法 writeText() 写文 …
在这篇文章中,我们将看看如何使用Google Index API 来立即抓取您网站的页面和内容,以提升谷歌收录您的网站页面效率。 这就是为什么这真的值得付出额外的努力。 排名更快(对于时间敏感的内容尤其重要) …
群晖docker使用 网云穿,隧道配置教程请参考以往文章:使用教程如下:1.打开docker程序,注册表搜索 blichus 找到 blichus/xiaomy_net 双击下载 2.下载完成在左侧映像找到刚才下载的镜像,双击配置启动 3. …
迫于最近 NAS 拷贝复制大文件速度太慢,决定对「群晖」网卡进行升级。最初考虑全部换成 10GbE 万兆 ,但经过一番了解后,发现现阶段全链路换万兆设备的总成本实在过高。 经过综合考虑,决定将群晖 NAS 升级 …
安装方法一 一、准备工作: sudo -i #管理员切换为root用户 su – 用户名切换回其他用户 #https://www.cnblogs.com/dplearning/p/6099426.html 二、安装setuptools 1)wget –no-check-certificate https:/ …
一、搜索引擎网站收录地址大全 | Search Engine 搜索引擎 提交网址 百度搜索网址提交入口口 http://zhanzhang.baidu.com/sitesubmit/index 360搜索引擎登录入口 http://info.so.360.cn/site_submit.html 36 …
1. 打开网站根目录下的wp-config.php,在define(‘WP_DEBUG’, false);后面添加下面内容:
1 2 |
<pre class="inline:true class:language-markup decode:1 " >define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']); define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']); |
这两句的意思就是设置网站域名为当前访问的域名,也就是取消了域名的绑定。 如果 …
简述 有些用群辉NAS的朋友可能会遇到,用的群辉自带的DDNS,然后drive、Note、DSM连接到NAS,外网通过域名访问一点问题都没有,但是内网确无法通过域名访问到NAS。 这主要与NAT回流相关,下图解释了什么是N …