wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.13_amd64.deb
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<!-- FONTS --> | |
<link rel="preconnect" href="https://fonts.googleapis.com"> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
package main | |
import "fmt" | |
func solution (seconds int) string { | |
if seconds == 0 { | |
return "now" | |
} |
package main | |
import "fmt" | |
func solution (n int, ratings [][]int) int { | |
dishRatings := make(map[int][2]int) | |
for i := 0; i < n; i++ { | |
dishID, rating := ratings[i][0], ratings[i][1] |
package main | |
import ( | |
"context" | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/go-redis/redis/v8" | |
"github.com/labstack/echo/v4" |
package main | |
import ( | |
"fmt" | |
"aidanwoods.dev/go-paseto" | |
) | |
func main() { |
Go provides file-opening flags represented by constants defined in the os
package. These flags determine the behavior of file operations, such as opening, creating, and truncating files. The following is a list of the flags and what they do.
-
os.O_RDONLY
: Opens the file as read-only. The file must exist. -
os.O_WRONLY
: Opens the file as write-only. If the file exists, its contents are truncated. If it doesn't exist, a new file is created. -
os.O_RDWR
: Opens the file for reading and writing. If the file exists, its contents are truncated. If it doesn't exist, a new file is created.
CREATE OR REPLACE FUNCTION public.show_create_table( | |
in_schema_name varchar, | |
in_table_name varchar | |
) | |
RETURNS text | |
LANGUAGE plpgsql VOLATILE | |
AS | |
$$ | |
DECLARE | |
-- the ddl we're building |
BINARY_NAMES="golang-migrate|migrate" | |
DATABASE="mysql://root:password@tcp(localhost:3306)/test" | |
.PHONY: checkdeps help | |
help: ## Displays the help for each command. | |
@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
dbu: ## Migrates the database to the latest version. | |
migrate -database="$(DATABASE)" -path=migrations -lock-timeout=20 -verbose up |
October 20, 2021 7 min read2011
Templates are files that define a specific pattern and give room for automation, be it a simple text file or an HTML file for a webpage. If it provides space for customization, it is a template.
You can write programming logic to parse simple templates, but as the level of customization in your template increases, the programming logic you need to customize increases, making it less feasible to write template parsing logic.