Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

huihut huihut

I may be slow to respond.
Block or report user

Report or block huihut

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dx_util.cpp
#include "precomp.h"
#include "util.h"
using namespace Microsoft::WRL;
using namespace WEX::TestExecution;
PCWSTR StringFromFeatureLevel (D3D_FEATURE_LEVEL FeatureLevel)
switch (FeatureLevel) {
case D3D_FEATURE_LEVEL_12_1: return L"12.1";
huihut / HideQDialog.cpp
Created Aug 21, 2019
Qt Dialog 点击窗口外隐藏
View HideQDialog.cpp
// 重写事件
bool event(QEvent *event)
if (event->type() == QEvent::ActivationChange)
if (QApplication::activeWindow() != this)
huihut / program_running_time.cpp
Created Aug 13, 2019
Statistical program running time
View program_running_time.cpp
using namespace std;
int main()
clock_t startTime,endTime;
startTime = clock();
for (int i = 0; i < 1000000; i++)
huihut / Screenshot.cs
Created Mar 23, 2019
Unity TakeScreenshot
View Screenshot.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Screenshot : MonoBehaviour
private int index = 0;
// Start is called before the first frame update
void Start()
huihut / Screenshot.cs
Created Mar 23, 2019
Unity TakeScreenshot
View Screenshot.cs
// <>
// ****** Notice : It doesn't works in Wep Player environment. ******
// ****** It works in PC environment. ******
// Default method have some problem, when you take a Screen shot for your game.
// So add this script.
// CF Page :
// made by Jerry ( )
using UnityEngine;
huihut / TakeScreenshot.cs
Created Mar 23, 2019
Unity TakeScreenshot
View TakeScreenshot.cs
// <>
// TODO:
// By default, screenshot files are placed next to the executable bundle -- we don't want this in a
// shipping game, as it will fail if the user doesn't have write access to the Applications folder.
// Instead we should place the screenshots on the user's desktop. However, the ~/ notation doesn't
// work, and Unity doesn't have a mechanism to return special paths. Therefore, the correct way to
// solve this is probably with a plug-in to return OS specific special paths.
// Mono/.NET has functions to get special paths... see discussion page. --Aarku
huihut / SQLiteHelper.cs
Created Mar 18, 2019
C# SQLiteHelper 数据库操作类
View SQLiteHelper.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SQLite;
/// <summary>
/// 数据库操作类
/// </summary>
public sealed class SQLiteHelper
huihut /
Last active Jan 13, 2019
Unity Platform dependent compilation
huihut / deb_mirror_sources.list
Created Dec 28, 2018
Ubuntu deb mirror sources
View deb_mirror_sources.list
## update sources
#sudo apt-get update
#sudo apt-get upgrade
## a good mirror based on your location
deb mirror:// precise main restricted universe multiverse
deb mirror:// precise-updates main restricted universe multiverse
deb mirror:// precise-backports main restricted universe multiverse
deb mirror:// precise-security main restricted universe multiverse
huihut / MainWindow.xaml.cs
Last active Nov 23, 2018
WPF Create Dump
View MainWindow.xaml.cs
* [MiniDumpWriteDump function](
* [_MINIDUMP_TYPE Enumeration](
* [Programmatically Generating a Dump File](
* [Create your own crash dumps](
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections.Generic;
You can’t perform that action at this time.