Skip to content

Instantly share code, notes, and snippets.

DECLARE SUB RotateXZ (p AS ANY, mcos!, msin!)
DECLARE SUB ToScreen (p AS ANY)
DECLARE SUB TranslateZ (p AS ANY, dz!)
DECLARE SUB DrawLine (p1 AS ANY, p2 AS ANY)
DECLARE SUB Project (p AS ANY)
DECLARE SUB SleepMS (ms!)
CONST W% = 320
CONST H% = 200
' Turbo Basic (Borland 1987) version of rotating cube
' ESC to quit
W% = 320
H% = 200
NBPOINTS% = 8
SCREEN 1
CLS
class Profiler : CorProfilerCallback3Base
{
// The default base implementation would just check that iCorProfilerInfoVersion matches the expected version for CorProfilerCallback3Base,
// and otherwise return an error code
public override HResult ValidateTargetRuntime(int iCorProfilerInfoVersion)
{
return HResult.S_OK; // I want to ignore the validation logic performed by Silhouette
}
public override HResult Initialize() // No more iCorProfilerInfoVersion here
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
namespace InspectClipboard;
internal class Program
{
[STAThread]
static void Main(string[] args)
using JetBrains.Rd.Reflection;
namespace ParseHashMap;
public class Program
{
private static int _counter;
static void Main(string[] args)
{
namespace ConsoleApp1;
internal unsafe class Program
{
private struct StructWithFixedBuffer
{
public StructWithFixedBuffer()
{
}
using System.Runtime.CompilerServices;
using Silhouette;
using System.Runtime.InteropServices;
using System.Xml.Linq;
namespace JitProfiler;
internal unsafe class CorProfiler : CorProfilerCallback4Base
{
private const string FileName = @"G:\JetBrains\jit_profiler.txt";
var MODULES = new ActiveXObject("Scripting.Dictionary");
var n; // undefined
MODULES.Add(n, "Test value");
var keys = new VBArray(MODULES.Keys()).toArray();
WScript.Echo("Array length: " + keys.length);
WScript.Echo("Key at index 0: " + (keys[0] === undefined ? "undefined" : keys[0]));
WScript.Echo("Is index 0 enumerable? " + (keys.hasOwnProperty(0) ? "Yes" : "No"));
#include <iostream>
#include <windows.h>
#include <processsnapshot.h>
int main()
{
auto processHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, 40092);
if (processHandle == nullptr)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
<IlcDisableReflection>true</IlcDisableReflection>
</PropertyGroup>