Files
2026-08-04 21:23:11 -07:00

2.3 KiB

title, published, featured, author, date, snippet, categories, skills
title published featured author date snippet categories skills
String Interpolation true true eac Oct 25, 2024 String interpolation embeds variables directly in strings for dynamic, readable text. For example, Python's f-strings use {} to include variables or expressions seamlessly, simplifying output formatting.
python
premium
print "Hello World"
blizzard
silver
attention
svelte
typescript
javascript
nim
rust
golang
github-actions
bash
apple

Header

Headers

Headerss

<script>
	import Link from '#/Link.svelte';
</script>

<nav>
	<link href="/" title="Home" />
	<link href="/blog" title="Blog" />
	<link href="/projects" title="Projects" />
	<link href="/about-me" title="About Me" />
</nav>
const materials = ["Hydrogen", "Helium", "Lithium", "Beryllium"];

console.log(materials.map((material) => material.length));
// Expected output: Array [8, 6, 7, 9]

(function (a) {
  return a + 100;
});

const a = async (x) => {
  return x++;
};
import macros, strutils

macro toLookupTable(data: static[string]): untyped =
  result = newTree(nnkBracket)
  for w in data.split(';'):
    result.add newLit(w)

const
  data = "mov;btc;cli;xor"
  opcodes = toLookupTable(data)

for o in opcodes:
  echo o
BufferedWriter out = null;
try {
    out = new BufferedWriter(new FileWriter("filename", true));
    out.write("aString");
} catch (IOException e) {
    // error processing code
} finally {
    if (out != null) {
        out.close();
    }
}
$font-stack: Helvetica, sans-serif;
$primary-color: #333;

body {
  font: 100% $font-stack;
  color: $primary-color;
}
fn main() {
    let user = ("Adrian", 38);
    println!("User {} is {} years old", user.0, user.1);

    // tuples within tuples
    let employee = (("Adrian", 38), "die Mobiliar");
    println!("User {} is {} years old and works for {}", employee.0.1, employee.0.1, employee.1);
}
func Example() {
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusOK)
		w.Write([]byte("hello world"))
	}))
	defer ts.Close()

	resp, err := http.Get(ts.URL)
	if err != nil {
		fmt.Println(err)
	}
	defer resp.Body.Close()

	fmt.Printf("%s\n", resp.Status)
	fmt.Printf("%d\n", resp.StatusCode)
}