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
| def NormalizeBase(n, base): | |
| total = 0 | |
| n_str = str(n) | |
| for i in range(len(n_str)): | |
| digit = int(n_str[i]) | |
| power = len(n_str) - i - 1 | |
| total += digit * base**power | |
| return total |
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 React, { useState } from 'react'; | |
| const FormComponent = () => { | |
| const [formData, setFormData] = useState({ | |
| field1: '', | |
| field2: '', | |
| field3: '', | |
| field4: '', | |
| field5: '', | |
| field6: '', |
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" | |
| "math/rand" | |
| "github.com/go-playground/validator" | |
| ) | |
| type RespSpec struct { |
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
| var ( | |
| TableName = "transaction" | |
| ) | |
| type Input struct { | |
| TrxID string `validate:"-"` | |
| ReferenceID string `validate:"-"` | |
| UserID string `validate:"-"` | |
| Status string `validate:"-"` | |
| Limit int `validate:"required"` |
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 numstore | |
| import ( | |
| "context" | |
| "fmt" | |
| ) | |
| var ( | |
| ErrNotImplemented = fmt.Errorf("feature not implemented") | |
| ErrNotFound = fmt.Errorf("not found") |
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" | |
| "math" | |
| "math/rand" | |
| "strings" | |
| "time" | |
| ) |
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
| const vocal_list = ["i", "u", "e", "o"]; | |
| const ignore_list = [" ", "-", "+", "-", "=", "(", ")"]; | |
| const mapper = { | |
| ng: "ع", | |
| ny: "ۑ", | |
| 0: "٠", | |
| 1: "١", | |
| 2: "٢", | |
| 3: "٣", | |
| 4: "٤", |
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 govalidatorhumanizer // you can change this | |
| import ( | |
| "fmt" | |
| "strings" | |
| ut "github.com/go-playground/universal-translator" | |
| en_translations "gopkg.in/go-playground/validator.v9/translations/en" | |
| "github.com/go-playground/locales/en" |
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> | |
| <head> | |
| <meta charset='utf-8'> | |
| <meta http-equiv='X-UA-Compatible' content='IE=edge'> | |
| <title>Coordinates from Line - results shown in log</title> | |
| <meta name='viewport' content='width=device-width, initial-scale=1'> | |
| <script src='./index.js'></script> | |
| </head> |
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" | |
| "regexp" | |
| "time" | |
| ) | |
| const ParamsRegexPattern = "(:[\\w_]+)" |
NewerOlder