Best fonts for programming.
- Jetbrains Mono
- Cascadia
import AppKit | |
class ApplicationDelegate: NSObject, NSApplicationDelegate { | |
let window: NSWindow | |
override init() { | |
window = NSWindow( | |
contentRect: NSRect(x: 0, y: 0, width: 400, height: 300), | |
styleMask: [.closable, .resizable, .miniaturizable, .titled, .fullSizeContentView], | |
backing: .buffered, defer: true) |
#include "stdafx.h" | |
LPWSTR classname = TEXT("Win32 Notepad"); | |
HINSTANCE g_hInstance; | |
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); | |
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdCommand, int nCmdShow) | |
{ | |
g_hInstance = hinstance; |
#include <iostream> | |
using std::cout; | |
using std::endl; | |
void print(size_t length) { | |
size_t i = length; | |
while (i > 0) { | |
i--; |
namespace FastRemoveList | |
{ | |
public class UObject | |
{ | |
public int GetInstanceID() { return 0; } | |
} | |
public class FastRemovalListBase<T, K> where K : notnull | |
{ | |
private List<(T, K)> _list = new List<(T, K)>(); |
// | |
// RTTI (Reflection) the LLVM Way | |
// Source: https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html | |
// | |
#include <iostream> | |
using std::cout; | |
using std::endl; |
import React from "react"; | |
import { css } from "@emotion/core"; | |
import { Ticks } from "./Tick"; | |
export interface RulerProps { | |
ticks: Ticks; | |
} | |
function Ruler(props: RulerProps): JSX.Element { | |
const { ticks } = props; |
// Assume LifeCycleManager is imported from a C header | |
struct LifeCycleManager { | |
var release: @convention (c) (_ ptr: UnsafeMutableRawPointer, _ context: UnsafeMutableRawPointer) -> Void | |
}; | |
struct ComponentLifeCycleManager { | |
var lifeCycleManager: LifeCycleManager | |
var release: (_ ptr: UnsafeMutableRawPointer) -> Void | |
init<Component>(component: Component.Type) { |