This file contains hidden or 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
module float32_splitter | |
( | |
input [31:0] in, | |
output sgn, | |
output [8:0] exp, | |
output [23:0] man | |
); | |
assign sgn = in[31]; | |
assign exp[8] = 0; | |
assign exp[7:1] = in[30:24]; |
This file contains hidden or 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 <iostream> | |
struct String | |
{ | |
const char* str; | |
constexpr String(const char* str) : str { str } {} | |
constexpr operator const char*() const | |
{ | |
return str; | |
} |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
public record Foo | |
{ | |
public int Data { get; init; } | |
public int Data2 { get; init; } | |
public int Data3 { get; init; } | |
public int Data4 { get; init; } |
This file contains hidden or 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 <iostream> | |
#include <typeindex> | |
template <typename T> | |
class Function; | |
template <typename T, typename... Args> | |
class Function<T(Args...)> | |
{ | |
private: |
This file contains hidden or 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
#[wasm_bindgen] | |
pub fn sleep(ms: i32) -> js_sys::Promise { | |
js_sys::Promise::new(&mut |resolve, _| { | |
web_sys::window() | |
.unwrap() | |
.set_timeout_with_callback_and_timeout_and_arguments_0(&resolve, ms) | |
.unwrap(); | |
}) | |
} |
This file contains hidden or 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
use rusty_v8 as v8; | |
static MODULE_CODE_1: &'static str = r#" | |
import { foo, bar } from "module_2"; | |
let input = foo(3); | |
bar(...input); | |
console.log('foo'); | |
"#; | |
fn foo( |
This file contains hidden or 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 <coroutine> | |
#include <iostream> | |
#include <optional> | |
size_t buffer[22]; | |
struct my_generator | |
{ | |
struct promise_type | |
{ |
This file contains hidden or 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
; Copyright (c) 2020 Chanjung Kim. All rights reserved. | |
.data | |
text db "Hello, world!", 0 | |
caption db "My title", 0 | |
.code | |
extern GetStdHandle: proc |
This file contains hidden or 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 <iostream> | |
class Base | |
{ | |
private: | |
int _value; | |
public: | |
int GetValue() const | |
{ |
This file contains hidden or 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
# Copyright (c) 2020-2022 Chanjung Kim (paxbun). All rights reserved. | |
# Licensed under the MIT License. | |
# See Clang 10 documentation for more information. | |
BasedOnStyle: LLVM | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: true | |
AlignConsecutiveDeclarations: true |