- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
/* | |
The C# version of https://github.com/cloudwu/lua-snapshot on https://github.com/topameng/tolua_runtime | |
*/ | |
using System; | |
using System.Text; | |
using LuaInterface; | |
public static class Snapshot | |
{ | |
private readonly static int TABLE = 1; |
--[[ | |
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php. | |
Example: | |
ProFi = require 'ProFi' | |
ProFi:start() | |
some_function() | |
another_function() | |
coroutine.resume( some_coroutine ) | |
ProFi:stop() |
// Place your settings in this file to overwrite the default settings | |
{ | |
"editor.fontSize": 15, | |
"editor.fontFamily": "'Consolas', 'Inziu IosevkaCC SC'", | |
"editor.fontLigatures": true, | |
"editor.renderLineHighlight": "none", | |
"editor.letterSpacing": 0, | |
"editor.minimap.enabled": false, | |
"editor.occurrencesHighlight": false, | |
"editor.cursorBlinking": "smooth", |
#include <iostream> | |
#include <random> | |
#include <cstdlib> | |
#include <cstdio> | |
#include "erand48.h" | |
#ifndef M_PI | |
#define M_PI 3.14159265358979323846 | |
#endif // !M_PI |
// https://doxygen.postgresql.org/erand48_8c_source.html | |
#pragma once | |
#include <cmath> | |
#define RAND48_SEED_0 (0x330e) | |
#define RAND48_SEED_1 (0xabcd) | |
#define RAND48_SEED_2 (0x1234) | |
#define RAND48_MULT_0 (0xe66d) |
import numpy as np | |
import matplotlib.pyplot as plt | |
import time as time | |
total_random_points = int(input("\nNumber of random points for Monte Carlo estimate value of PI?\n>")) | |
start_time = time.time() | |
inside_circle = 0 |
REM https://www.emacswiki.org/emacs/EmacsMsWindowsIntegration | |
c:\path\to\emacs\bin\emacsclientw.exe -c -n -a c:\path\to\emacs\bin\runemacs.exe |
#pragma once | |
#include <memory_resource> | |
inline void* _aligned_malloc(size_t size, size_t alignment) | |
{ | |
void* res = 0; | |
void* ptr = malloc(size + alignment); | |
if (ptr != 0) | |
{ |
origins = { | |
{+1*^5 + 1, 40.8, 81.6}, | |
{-1*^5 + 99, 40.8, 81.6}, | |
{50, 40.8, 1*^5}, | |
{50, 40.8, -1*^5+170}, | |
{50, 1*^5, 81.6}, | |
{50, -1*^5 + 81.6, 81.6}, | |
{27, 16.5, 47}, | |
{73, 16.5, 48}, | |
{50, 681.6 - 0.27, 81.6} |