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
<!DOCTYPE html> | |
<html lang="id"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Go Memory Access Visualization</title> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; |
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 ( | |
"context" | |
"fmt" | |
"log" | |
"time" | |
) | |
// Define a generic CommandHandler interface with a Handle method |
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
<template> | |
<div> | |
<div v-for="(todo, index) in todos" :key="index" class="todo"> | |
{{ todo.title }} | |
</div> | |
<div v-if="loading" class="loading">Loading...</div> | |
</div> | |
</template> | |
<script setup> |
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
<style scoped> | |
@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap'); | |
div#main { | |
font-family: 'Indie Flower', cursive; | |
} | |
</style> | |
<template> | |
<div id="main" class="p-5 flex-col mx-auto border-slate-700 max-w-xl w-full flex h-screen"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Search Instructor</title> | |
<link rel="preconnect" href="https://fonts.googleapis.com"> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
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 ( | |
"context" | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"github.com/go-chi/chi/v5" | |
"github.com/google/uuid" | |
"github.com/jackc/pgx/v5/pgxpool" |
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 ( | |
"context" | |
"errors" | |
"fmt" | |
"github.com/google/uuid" | |
"github.com/jackc/pgx/v5" | |
"net/mail" | |
"strings" |
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
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |
CREATE TABLE instructors | |
( | |
id UUID PRIMARY KEY, | |
name VARCHAR NOT NULL, | |
occupation VARCHAR NOT NULL, | |
email VARCHAR NOT NULL, | |
name_tsvector TSVECTOR GENERATED ALWAYS AS (TO_TSVECTOR('indonesian', name)) STORED, | |
occupation_tsvector TSVECTOR GENERATED ALWAYS AS (TO_TSVECTOR('indonesian', occupation)) STORED, |
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
version: "3.9" | |
services: | |
postgres: | |
image: postgres:14-alpine | |
environment: | |
- POSTGRES_USER=root | |
- POSTGRES_PASSWORD=secret | |
- POSTGRES_DB=fts | |
ports: | |
- "5432:5432" |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>URL Shortener</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> |
NewerOlder