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
func draw_unfilled_circle(circle_center: Vector2, radius: float, color: Color, width = 1, resolution: float = 1): | |
var draw_counter = 1.0 | |
var vec_radius = Vector2(radius, 0) | |
var line_origin = vec_radius + circle_center | |
var line_end = Vector2() | |
while draw_counter <= 360.0: | |
line_end = vec_radius.rotated(deg2rad(draw_counter)) + circle_center | |
draw_line(line_origin, line_end, color, width) | |
draw_counter += 1.0 / resolution |
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
#[allow(bad_style)] | |
struct cout; | |
impl<T: std::fmt::Display> std::ops::Shl<T> for cout { | |
type Output = cout; | |
fn shl(self, rhs: T) -> cout { | |
print!("{}", rhs); | |
cout | |
} |
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
@echo off | |
title cmd | |
:proc | |
SET /P name=> | |
%name% | |
goto :proc |
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
[package] | |
name = "keylog" | |
version = "0.1.0" | |
edition = "2018" | |
[dependencies] | |
winapi = { version = "0.3", features = ["std", "windef", "winuser"] } | |
kernel32-sys = "0.2.2" | |
user32-sys = "0.2.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
expression = additive_expr ; | |
additive_expr = multiplicative_expr, { ("+" | "-"), additive_expr } ; | |
multiplicative_expr = factor, { ("*" | "/"), multiplicative_expr } ; | |
factor = "(", additive_expr, ")" | |
| number ; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
enum Token | |
{ | |
LEFT, RIGHT, | |
PLUS, MINUS, | |
READ, WRITE, | |
LLOOP, RLOOP, |
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
RifToday at 12:21 PM | |
Hi, about that message I sent yesterday in the coding server, I know basics and some functions in c++, but I don't know how to use it on Unity and which functions are more useful, currently I wanted to learn how to structure an RPG and some tips on how to make a bullet hell work. | |
aeslToday at 12:24 PM | |
Okay, well I can give you a quit direction to follow. You will probably have trouble using C++ as your language in unity since it may not have bindings (look up "Unity C++ bindings"), so C# may be a good option instead. In order to even get your C++ code to be executed by your C# code (you have to probably call your C++ from a tiny C# script), your C++ must be compiled to a dynamic library most likely (a .dll file on windows) or possibly, if you're lucky, a static library (or .lib on windows) | |
That's the quick guide on how to do that | |
but I've never used C++ with Unity before, I know for a fact that it is possible. just either it will be tricky or easy | |
RifToday at 12:25 PM | |
What are the differe |
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
// This was actually the first implementation I wrote. I made | |
// this and decided I should try writing the same algorithm in | |
// Zig for learning the language. After I was done I found it | |
// interesting the differences in how they accomplish the same | |
// thing. I thought it'd be neat to write this algorithm in more | |
// languages just for science. | |
// | |
// The algorithm is very simple. Essentially you give it a string | |
// and it replaces every vowel with exclamation marks and returns | |
// the new one. |
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
This is a conversation between ok and yourself, aesl. | |
ok: WAT | |
aesl: minimal | |
aesl: I like it | |
aesl: whatcha doin "ok" | |
ok: did you just assume what i am doing? | |
ok: please don't do that | |
ok: >:( | |
aesl: sorryyyy | |
aesl: i did not mean to offend you |
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
package main | |
import ( | |
"github.com/nsf/termbox-go" | |
) | |
func DrawPoint(x, y int, color termbox.Attribute) { | |
termbox.SetCell(x, y, ' ', termbox.ColorDefault, color) | |
} |