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
using System.Data.Common; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using Npgsql; | |
GetCatalogItemsSql(null, null, null, 10); | |
void GetCatalogItemsSql(int? catalogBrandId, int? before, int? after, int pageSize) | |
{ | |
// This looks like it would be susceptible to SQL injection, but it's not. |
This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
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
export default async function tryCatch<Data>( | |
promise: Promise<Data>, | |
): Promise<{ error: Error } | { data: Data }> { | |
try { | |
return { data: await promise }; | |
} catch (error) { | |
return { error }; | |
} | |
} |
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
##Parameters | |
#Number of backups to keep - oldest backup will be deleted | |
$threshold = 5 | |
#Where to backup [must be exclusive dir] | |
$dbDumpPath = 'C:\path\for\dump' | |
#pgdump binary path | |
$pgdumpPath = 'C:\path\to\pgdump\binary\PostgreSQL\10\bin\pg_dump.exe' | |
#database params | |
$dbName = 'db_name' |
- By default all new buckets are private
- You can have bucket policies and ACLs (ACL can go down to individual objects)
- Read after write consistency for puts of new objects
- Eventual consistency for overwrite PUTs and DELETEs
- Storage classes
- S3 standard (99.99 availability, 11 9s durability) can sustain loss of 2 facilities concurrently
- S3-IA lower fee than S3 but you are charged a retrieval fee (99.9% availability)
- S3 One Zone - IA lower cost option if you don't need multi AZ data resilience (99.5% availability)
- S3 Intelligent Tiering
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
[ | |
{ | |
"name": "Adana", | |
"districts": [ | |
{ | |
"name": "Aladağ" | |
}, | |
{ | |
"name": "Ceyhan" | |
}, |
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
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
// Remove any duplicates from an array of primitives. | |
const unique = [...new Set(arr)] | |
// Sleep in async functions. Use: await sleep(2000). | |
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
// or | |
const sleep = util.promisify(setTimeout); |
See also:
Service | Type | Storage | Limitations |
---|---|---|---|
Amazon DynamoDB | 25 GB | ||
Amazon RDS | |||
Azure SQL Database | MS SQL Server | ||
👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
- nodejs Download and install
- JDK Download and install
- Android Studio download and install
then you should add Environment variables a new path for SDK and JDK;
JAVA_HOME: C:\path\to\JavaSDK
NewerOlder