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
<script lang="ts"> | |
let dialog: { | |
el: HTMLDialogElement | undefined; | |
open: () => void; | |
close: () => void; | |
loading: boolean; | |
} = $state({ | |
el: undefined, | |
open: () => dialog.el?.showModal(), | |
close: () => dialog.el?.close(), |
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
--- | |
interface Props { | |
pack?: 'heroicons' | 'fluent'; | |
name: string; | |
filled?: boolean; | |
mini?: boolean; | |
} | |
const { pack = 'fluent', name, filled, mini } = Astro.props; |
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
package main | |
import "fmt" | |
func swap(arr *[]int,in1 int,in2 int) { | |
temp := (*arr)[in2] | |
(*arr)[in2] = (*arr)[in1] | |
(*arr)[in1] = temp | |
} |
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
package main | |
import ( | |
"fmt" | |
) | |
func linearSearch(haystack []int,needle int) bool { | |
for _, i := range haystack { | |
if i == needle { | |
return true |
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
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" |