- Type or namespace could not be found even after AddReference: There are a few potential causes - 1) Dynamic assembly won't work e.g. Single Executable option in publish; 2) Be careful you are actually passing the assembly reference to AddReferences() not as the third "global" object to CSharpScript.RunAsync(); 3) During publishing, might want to "Delete existing files" because old assemblies can mess up with assembly references.
- By the way the differences between "Add" and "With" is the latter replaces everything, while the former adds to the list; And "Imports" is equivalent to "using" in code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/ | |
// Note this implementation does not support different block types or block normals | |
// The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/ | |
const int CHUNK_SIZE = 32; | |
// These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Self-elevate the script - put this at beginning of file | |
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process pwsh.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; Exit } | |
# Example of a command that requires admin priviledge | |
[Environment]::SetEnvironmentVariable("MY_ENV_PATH", "$PSScriptRoot", "Machine") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dotnet add package SFML.Net --version 2.5.0 | |
// dotnet add package OpenTK --version 4.0.0-pre9.1 | |
using OpenTK.Graphics.OpenGL; | |
using OpenTK.Windowing.Desktop; | |
using SFML.Graphics; | |
using SFML.Window; | |
namespace CSharpSFMLWithOpenTK | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
# Put the following into user settings JSON file to change the sick annoying default bright red preformatted code text foreground color for Monokai Dimmed color theme | |
"editor.tokenColorCustomizations": { | |
"[Monokai Dimmed]": { | |
"textMateRules": [ | |
{ | |
"scope": "markup.inline.raw", | |
"settings": { | |
"foreground": "#675b5b", | |
} |
(List is up-to-date per 20220322)
All prices negotiable; LIST PRICE MAY CHANGE (and become higher); Most of my books are either new or almost new because I always keep my books in very good conditions. Some even have insightful notes.
Most books are purchased within the past 4 years.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Enter Title Here</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<meta name="description" content="Starter Template"> | |
<meta name="author" content="Charles Zhang"> | |
<link href="style.css" rel="stylesheet" /> |
- Convert images to video:
ffmpeg -framerate 4 -start_number 51 -i _DSC12%d.jpg -c:v libx264 -r 4 output.mp4
(Recommendataion) Use Screen2Gif's editor instead. - Convert video into gif
- Convert video into image sequence:
- Crop video:
ffmpeg -i in.mp4 -vf crop=w:h:x:y out.mp4
- Change video frame rate:
- Scale video resolution:
ffmpeg -i input.avi -vf scale=320:240 output.avi
- Scaleing while keeping aspect ratio:
ffmpeg -i input.jpg -vf scale=320:-1 output_320.png
- Scale images:
ffmpeg -i input.jpg -vf scale=320:240 output_320x240.png
- Multiple filters (separate using comma):
ffmpeg -i 1.mp4 -vf "crop=720:720:264:0, scale=320:-1" 1.gif
- Trim/Cut video:
ffmpeg -i input.mp4 -ss 00:05:20 -t 00:10:00 -c:v copy -c:a copy output1.mp4
VirtualBox: https://www.virtualbox.org/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
int a = 5; | |
int* b = &a; | |
int c[] = {1, 2, 3, 4, 5}; | |
return 0; | |
} |