原创 利用BAT批處理安裝/卸載服務程序
@echo off @title 安裝windows服務 path %SystemRoot%\Microsoft.NET\Framework\v4.0.30319 echo=================================
原创 Winfrom 播放MP3音樂文件
using System; using System.Runtime.InteropServices; namespace AESCRTool { /// <summary> /// 播放MP3文件 /// </s
原创 WinForm 關閉登陸窗體,打開主窗體的實現
首先在解決方案管理器(Program.cs)裏的代碼 static void Main() { Application.EnableVisualStyles(); Application.SetCompatibl
原创 .netcore 日誌記錄實現
using System.IO; using log4net; using log4net.Config; using log4net.Repository; using Microsoft.AspNetCore.Builder; usi
原创 Vue-router實現客戶端路由
1 創建一個項目 vue create test-vue 2 安裝vue-router npm install vue-router --save 3 引入vue-router [main.js] import VueRouter fro
原创 C# 操作MongoDB
1 安裝MongoDB.Driver2 建立數據庫連接 #mongodb://127.0.0.1:27017 MongoClient client = new MongoClient(“連接字符串”); 3 獲取數據庫 var data
原创 調試 windows服務
1.在OnStart方法內添加如下代碼 System.Diagnostics.Debugger.Launch(); 注意:因爲權限的問題,可能會選不到你所打開的Visual Studio,並且會打開一個新的Visual Studio,這
原创 Android9 原生系統網絡感嘆號消除
# 如要使用http,需要先寫入關閉https驗證的配置,再填寫http服務器。然後開啓飛行模式,再打開感嘆號即可消失。 adb shell settings put global captive_portal_use_https 0 ad
原创 debian 9 安裝後常用環境配置
1 修改鏡像源(使用https源,則需要執行apt-get install apt-transport-https) vim /etc/apt/sources.list deb https://mirrors.ustc.edu.cn/de
原创 Linux環境下製作啓動U盤
1.查看U盤對應的設備名稱 fdisk -l 2.卸載U盤 umount /dev/sdb 3.格式化U盤 mkfs.ext4 /dev/sdb 4.將ISO鏡像文件寫入到U盤 dd if=xxx.iso of=/dev/sdb
原创 隨機User-Agent請求頭構造
pip3 install fake-useragent
原创 通過selenium實現的京東商品爬取
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import We
原创 認識PyQt5-Hello World
from PyQt5.Qt import * import sys class Window(QWidget): def __init__(self, title): self.title = title
原创 winform 在開始菜單添加快捷方式實現開機自啓動
public static void SetAutoBootup(bool isAuto) { string fileName = ConfigCode.CLIENT_PROC_NAME; string filePath =
原创 基於Jquery 拖動div 實現彈窗拖動
$.fn.jDrag=function(options){ var default_options={ drag:true, moveObject:this }; var statu