Skip to content

Instantly share code, notes, and snippets.

@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
prompt $G$S
set BAR_A=########################################
set BAR_B=%BAR_A:#=_%
set BAR_S=40
set C=500
echo.
for /L %%i in (0,1,%C%) do (
call :progress %%i %C%
@RadAd
RadAd / !CppExtras.md
Last active May 15, 2024 01:46
CppExtras

Cpp utilities.

#include <charconv>
#include <type_traits>
#include <cwctype>
// -----
// Helper alias templates
template<typename T>
using EnableIfIntegral = std::enable_if_t<std::is_integral<T>::value, bool>;
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
#include <atlwin.h>
class CMainWnd :
public CWindowImpl<CMainWnd, CWindow, CFrameWinTraits>
{
public:
static LPCTSTR GetWndCaption()
@RadAd
RadAd / radjava.xml
Created February 12, 2020 23:16
Java ant project helper
<project name="RadJava" basedir="." default="build"
xmlns:ivy="antlib:org.apache.ivy.ant" >
<property environment="env"/>
<dirname property="antfile.dir" file="${ant.file}"/>
<property name="project.displayname" value="${ant.project.name}"/>
<property name="project.vendor" value="RadSoft"/>
<condition property="install.dir" value="${env.RAD_INSTALL_DIR}">
typedef int(__stdcall *MSGBOXAAPI)(IN HWND hWnd,
IN LPCSTR lpText, IN LPCSTR lpCaption,
IN UINT uType, IN WORD wLanguageId, IN DWORD dwMilliseconds);
typedef int(__stdcall *MSGBOXWAPI)(IN HWND hWnd,
IN LPCWSTR lpText, IN LPCWSTR lpCaption,
IN UINT uType, IN WORD wLanguageId, IN DWORD dwMilliseconds);
int MessageBoxTimeoutA(IN HWND hWnd, IN LPCSTR lpText,
IN LPCSTR lpCaption, IN UINT uType,
IN WORD wLanguageId, IN DWORD dwMilliseconds);
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <windows.h>
FILE* stddbg = NULL;
FILE* wstddbg = NULL;
static DWORD WINAPI OutputDebugStringAProc(_In_ LPVOID lpParameter)
{
@RadAd
RadAd / ConsoleFontLink.reg
Created January 17, 2017 01:36
Use font linking to support more unicode ranges in the console
void DebugOut(const char* format, ...)
{
char buffer[1024];
va_list args;
va_start(args, format);
vsnprintf(buffer, 1024, format, args);
OutputDebugStringA(buffer);
va_end(args);
}
@RadAd
RadAd / iecookies.vbs
Created April 9, 2015 02:51
List all ie cookies
Set wshShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
'http://weitips.blogspot.com.au/2006/04/cookie-file-format-of-internet.html
'http://nirsoft.net/utils/internet_explorer_cookies_view.html
Name = ""
Value = ""
Host = ""