Skip to content

Instantly share code, notes, and snippets.

Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged]
::下载后请把编码改成ANSI。
@echo off
::设定收藏图片的位置
set fav_dir=D:\Yueyu\图片\收藏
if "%~1"=="" (
call :alert 未指定文件。
goto :eof
)
if not exist "%~1" (
#coding=utf-8
#Python 3.7
#运行时将此文件放在Bilibili下载目录中
#对目录中所有文件夹,若发现文件夹含有同名的.dvi文件且没有cover图片,则下载文件中CoverURL的图片到cover.[CoverURL的扩展名]
import os
import json
from urllib import request
def downloadFromURL(src_url,save_name):
--Lua 协程测试
require "alien"
alien.kernel32.Sleep:types{ret="void","ulong",abi="stdcall"}
function sleep(milliseconds)
alien.kernel32.Sleep(milliseconds)
end
#encoding=utf-8
#Python 生成器的应用
#把普通的遍历完后产生返回的集合对象过程(整体返回)改为一边遍历一边返回集合中对象的过程(交错返回)
def GetSomeNumbers(stopTag):
if stopTag==0:
print("遍历所有数值")
if stopTag==1:
return
yield 213
@lxfly2000
lxfly2000 / test_bili.py
Last active August 4, 2018 09:21
B站下架了哪些番?
#coding:utf-8
#Python 3.6, 3.7
#该脚本目前需要配合AnimeSchedule一起使用。(https://github.com/lxfly2000/AnimeSchedule)
import json
import urllib.request
#测试有效性,成功返回1,失败返回0,非B站网页返回2
def testBilibiliURL(title,src_url):
@lxfly2000
lxfly2000 / factorial.cpp
Created July 22, 2018 10:18
大数阶乘
#include<Windows.h>
#include<iostream>
#include<string>
unsigned short c[22167];
void testmain(std::string&param)
{
bool enable_cout = true;
if (param[0] == '@')
{
enable_cout = false;
@lxfly2000
lxfly2000 / mfencode.cpp
Last active October 17, 2018 17:22
用MF转换音频文件到MP3
//用Windows Media Foundation将任何Windows支持的音频文件转换成MP3格式文件,仅限Windows 8(NT6.2)及以上操作系统。
#include<new>
#include<iostream>
#include<string>
#include<locale.h>
#include<Windows.h>
#include<mfapi.h>
#include<mfidl.h>
#include<Shlwapi.h>
#pragma comment(lib,"mfplat.lib")
@lxfly2000
lxfly2000 / tktest.pyw
Last active June 1, 2018 03:34
测试Python Tkinter的功能
#coding=utf-8
import tkinter
import tkinter.ttk
import tkinter.messagebox
tkMain=tkinter.Tk()
def canvas_on_resize(event):
tkMain.title("Canvas size: %dx%d"%(event.width,event.height))
#具有每个图形的元数据信息,因此不能重复创建,只能修改图形属性
//pmd参考:https://github.com/mistydemeo/pmdmini
#pragma comment(lib,"PMDWin\\PMDWin.lib")
#pragma comment(lib,"mfreadwrite.lib")
#pragma comment(lib,"mfplat.lib")
#pragma comment(lib,"mfuuid.lib")
#include<Windows.h>
#include<mfidl.h>
#include<mfapi.h>
#include<mfreadwrite.h>
#define _WINDOWS