Skip to content

Instantly share code, notes, and snippets.

View luojunyuan's full-sized avatar
🏠
have a good day

k1mlka luojunyuan

🏠
have a good day
  • BeyondDimension
  • Guizhou,China
View GitHub Profile
@luojunyuan
luojunyuan / tfrecord.py
Last active April 15, 2019 17:08
tfrecord.py
import os
import tensorflow as tf
import numpy as np
import time
os.environ["TF_CPP_MIN_LOG_LEVEL"]='2' # 只显示 warning 和 Error
def _int64_feature(value):
@luojunyuan
luojunyuan / delete_arrow(Run in Admin).bat
Created October 1, 2020 15:57
Delete windows shortcut arrow icon
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "%systemroot%\system32\imageres.dll,197" /t reg_sz /f
taskkill /f /im explorer.exe
attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db"
del "%userprofile%\AppData\Local\iconcache.db" /f /q
start explorer
pause
@luojunyuan
luojunyuan / deduplicate.cs
Created October 12, 2020 15:18
CSharp AABB deduplicate
case "AABB":
patten = $@"([^\\]){{{gameInfo.RepeatTime}}}";
regex = new Regex(patten);
matches = regex.Matches(hp.Text);
if (matches.Count != 0)
{
string tmp = "";
foreach (Match match in matches)
{
@luojunyuan
luojunyuan / regexp
Created January 12, 2021 15:55
Count your xaml and csharp file line in Visual Studio
^b*[^:b#/]+.*$
@luojunyuan
luojunyuan / toast.cs
Last active May 18, 2021 15:44
toast
// Fine System.Runtime.InteropServices.COMException when toast first time
//using Windows.UI.Notifications;
new ToastContentBuilder()
.AddText("ErogeHelper is running!")
.Show(toast =>
{
toast.Group = "eh";
toast.Tag = "eh";
// TODO: Add Kill ErogeHelper immediately
炙雪@严禁任何形式的转载
yhsxsx10月
白灵凛音
yuppi4672
sakura1313
acghmoe.com
百元君
ZODGAME
@luojunyuan
luojunyuan / bash
Created September 14, 2021 08:48
Rename branch github tips
git branch -m reactiveUI main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
@luojunyuan
luojunyuan / brightness.cpp
Last active September 18, 2021 05:50
adjust laptop brightness
// From https://blog.csdn.net/ONE_SIX_MIX/article/details/80286421
#include <iostream>
#include <string>
#include <windows.h>
#include <objbase.h>
#include <wbemidl.h>
#include <comdef.h>
#include <mutex>
@luojunyuan
luojunyuan / events.cs
Created November 12, 2021 07:33
WinEventObjects
class events
{
internal const int EventObjectCreate = 0x8000;
private const uint EventObjectDestroy = 0x8001;
private const uint EventObjectShow = 0x8002;
private const uint EventObjectHide = 0x8003;
private const uint EventObjectReorder = 0x8004;
private const uint EventObjectFocus = 0x8005;
internal const int EventObjectSelection = 0x8006;
internal const int EventObjectSelectionAdd = 0x8007;
@luojunyuan
luojunyuan / example.xaml
Created January 2, 2022 11:27
ModernWpf Button FlyoutService
<ui:FlyoutService.Flyout>
<ui:CommandBarFlyout x:Name="AssistiveTouchFlyout" ShowMode="Standard">
<ui:AppBarButton Click="VolumeDownOnClick" ToolTip="{x:Static resx:Strings.GameView_VolumeDecreaseTip}">
<ui:AppBarButton.Icon>
<ui:FontIcon Glyph="{x:Static contract:CommonGlyphs.Volume1}" />
</ui:AppBarButton.Icon>
</ui:AppBarButton>
<ui:AppBarButton Click="VolumeUpOnClick" Icon="Volume" ToolTip="{x:Static resx:Strings.GameView_VolumeIncreaseTip}" />
<ui:AppBarButton x:Name="FullScreenSwitcher" Click="FullScreenSwitcherOnClick" />
<ui:AppBarToggleButton x:Name="LoseFocusToggle" Icon="Trim" ToolTip="{x:Static resx:Strings.GameView_FocusTip}" />