const Counter: ComponentType<{ title: string, count: number }> = (props) => {
const [count, setCount] = createSignal(props.count);
return (
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
// the database entity | |
public sealed class Person | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public DateOnly Birthday { get; set; } | |
public int ShoeSize { get; set; } | |
public string Password { get; set; } | |
public string Email { get; set; } | |
} |
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
{ | |
"name": "Writing", | |
"icon": "book", | |
"extensions": "[{\"identifier\":{\"id\":\"akhail.save-typing\",\"uuid\":\"658b5664-4b80-4bba-9fb9-6e212e6d223d\"},\"displayName\":\"Save Typing\",\"disabled\":true,\"applicationScoped\":false},{\"identifier\":{\"id\":\"alefragnani.project-manager\",\"uuid\":\"1b747f06-3789-4ebd-ac99-f1fe430c3347\"},\"displayName\":\"Project Manager\",\"applicationScoped\":false},{\"identifier\":{\"id\":\"andyhuzhill.typewriterscrollmode\",\"uuid\":\"4ef68ff4-831f-41da-856d-d6f6ac5549da\"},\"displayName\":\"Typewriter Scroll Mode\",\"applicationScoped\":false},{\"identifier\":{\"id\":\"bierner.markdown-footnotes\",\"uuid\":\"8c379296-feca-4544-853d-f085a1fc638f\"},\"displayName\":\"Markdown Footnotes\",\"applicationScoped\":false},{\"identifier\":{\"id\":\"bierner.markdown-mermaid\",\"uuid\":\"f8d0ffc4-66bb-4a9c-8149-ef8f043691a1\"},\"displayName\":\"Markdown Preview Mermaid Support\",\"applicationScoped\":false},{\"identifier\":{\"id\":\"davidanson.vscode-markdownlint\",\"uuid\ |
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
import { dirname, join } from "node:path"; | |
import { Glob } from "bun"; | |
import { ReturningHtmlRewriter } from "./helpers/ReturningHtmlRewriter"; | |
const ROOT = dirname(Bun.main); | |
const OUTFILE = join(ROOT, "..", "..", "wwwroot", "LICENSES.txt"); | |
const PROJECT_ROOT = join(ROOT, "..", "..", ".."); | |
interface Source { | |
name: string; |
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
[HttpGet("things/{id:int}")] | |
public async Task<IActionResult> GetThing(int id) | |
{ | |
var thing = await _context.Things | |
.Where(t => t.Id == id) | |
.Select(t => new ThingDto { | |
Name = t.Name, | |
Count = t.Count, | |
Score = t.Upvotes - t.Downvotes, | |
}) |
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
@typeparam TItem | |
<div> | |
@((TaskStatus, item: _item) switch { | |
(Status.Loading, null) => LoadingTemplate, | |
(Status.Done, not null) => ItemTemplate.Invoke(_item), | |
(_, _) => ErrorTemplate.Invoke(_error), | |
}) | |
</div> |
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
type Props = "FullYear"| "Month"| "Date"| "Hours"| "Minutes"| "Seconds"| "Milliseconds"; | |
type Getter = `get${Props}`; | |
type Setter = `set${Props}`; | |
type DeltaDate = Partial<Record<Lowercase<Props>, number | undefined>>; | |
const getProp = (obj: DeltaDate, prop: Props) => obj[prop.toLowerCase() as Lowercase<Props>] ?? 0 | |
export const mutateDate = (date: Date, delta: DeltaDate) => { | |
for (const p of Object.keys(delta) as Props[]) { |
// any method with a `constrain` needs to return a `Result`
public Result<string> Foo(int num, string text) constrain {
num is > 0 and < 100,
text is { Length: < 200 } and ['A', ..]
} {
return $"Text is '{text}' and number is {num}";
}
var text = Foo() switch {
JSON schemas for tierlist-stars (gh)
Batch converter for Windows using Inkscape with the command line
InkscapeBatchConvert is an easy to use solution to quickly convert all files of a folder to another type without the need to open Inkscape. The program uses Windows Batch scripting and will only work on Windows.
Tested with Inkscape 1.0.x - 1.3.x ✅ (The last version that supports Inkscape 0.9.x can be found here)
- Download
_InkscapeBatchConvert.bat
- Put it in the folder where you have files you wish to convert (will also scan on all subfolders for files of input type).
- Then double click the file to start it.
NewerOlder