This file contains 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
"repositories": [ | |
{ | |
"type": "path", | |
"url": "../laravel-custom-package", | |
"options": { | |
"symlink": true | |
} | |
} | |
] |
This file contains 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
uint8 : 0 to 255 | |
uint16 : 0 to 65535 | |
uint32 : 0 to 4294967295 | |
uint64 : 0 to 18446744073709551615 | |
int8 : -128 to 127 | |
int16 : -32768 to 32767 | |
int32 : -2147483648 to 2147483647 | |
int64 : -9223372036854775808 to 9223372036854775807 |
This file contains 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
(new Date()).toLocaleTimeString('fa-IR') |
This file contains 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
bool | |
string | |
int int8 int16 int32 int64 | |
uint uint8 uint16 uint32 uint64 uintptr | |
byte // alias for uint8 | |
rune // alias for int32 |
This file contains 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
type Numerics interface { | |
uint8 | uint16 | uint32 | uint64 | int8 | int16 | int32 | int64 | float32 | float64 | |
} |
This file contains 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
INSERT INTO t1 (a,b,c) VALUES (1,2,3) | |
ON DUPLICATE KEY UPDATE c=c+1; |
This file contains 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 chunkSize = 10; | |
for (let i = 0; i < array.length; i += chunkSize) { | |
let chunk = array.slice(i, i + chunkSize); | |
} |
This file contains 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
'-' | |
' ' | |
'&' | |
'^' | |
'*' | |
' or ''-' | |
' or '' ' | |
' or ''&' | |
' or ''^' | |
' or ''*' |
![github.gif](https://gist.github.com/Kamandlou/44e1d6e0c830592d2350558e6ee4a8a0/raw/cc1db2f38f7754c62df1cd9137ede55d6a0ddb42/github.gif)
This file contains 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
// It will cancel at one second | |
ctx, cancel := context.WithTimeout(context.Background(), time.Second) | |
defer cancel() | |
db.WithContext(ctx).Find(&User) |