https://medium.com/better-programming/how-to-handle-errors-of-angular-reactive-forms-with-three-lines-of-code-3caaa1eb8324
Tuesday, May 5, 2020
Saturday, May 2, 2020
DynamoDB Details
- Amazon DynamoDB has a default limit of 20 global secondary indexes per table, in practice, you can index across far more than 20 data fields
Basic of Dynamodb:
Local Secondary Index vs Global Secondary Index
- https://stackoverflow.com/questions/56265577/dynamodb-local-secondary-index-vs-global-secondary-index
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SecondaryIndexes.html ( Dynamodb official difference)
- https://stackoverflow.com/questions/55484683/dynamodb-table-index-design-gloabl-index-or-local/55485322#5548532 (***)
Differences:
- LSIs cannot be modified or deleted without deleting and recreating the whole table. GSIs can be created/removed at any time with no impact to the main table.
- LSIs cause you to have a limit of 10 GB of data per partition key. Without a LSI, there is a limit of 10 GB per partition, but you won’t notice that because DynamoDB can split your data for a single partition key across multiple partitions if necessary.
- When using a LSI, the 400kb item size limit applies to the item plus all of its LSI projections. An item in a GSI is counted separately from the item in the main table.
- Provisioned capacity of GSIs can be scaled independently of the main table, whereas LSIs share the same capacity as the base table.
- Fast retrieval
- Auto scaling to control costs
- Query and scanning allow for different use cases
- Can get very expensive very fast
- Sharding and hot spotting are hidden problems that can cause ALOT of head ache
- Not relational or transactional at all
Single-Table Design for a application:
- https://www.alexdebrie.com/posts/dynamodb-single-table/ (***************)
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-general-nosql-design.html#bp-general-nosql-design-concepts (official doc)
calculate RCU and WCU with the data
https://stackoverflow.com/questions/42494900/how-to-calculate-read-capacity-unit-and-write-capacity-unit-for-dynamodb/42520860 (***********)
What is throttling(Rejected) in DynamoDB?
AWS DynamoDB Throttling. In a DynamoDB table, items are stored across many partitions according to each item's partition key. ... When a request is made, it is routed to the correct partition for its data, and that partition's capacity is used to determine if the request is allowed, or will be throttled(Rejected)
Getting Started with Amazon Web Services | A Complete Beginner Roadmap
Friday, May 1, 2020
ExpressionChangedAfterItHasBeenCheckedError
- https://indepth.dev/everything-you-need-to-know-about-the-expressionchangedafterithasbeencheckederror-error/ (***) (clear descriptions)
- https://stackoverflow.com/questions/34364880/expression-has-changed-after-it-was-checked (**)
A running Angular application is a tree of components. During change detection Angular performs checks for each component which consists of the following operations performed in the specified order:
- update bound properties for all child components/directives
- call
ngOnInit,OnChangesandngDoChecklifecycle hooks on all child components/directives - update DOM for the current component
- run change detection for a child component
- call
ngAfterViewInitlifecycle hook for all child components/directives
fddf
Possible fixes of ExpressionChangedAfterItHasBeenCheckedError:
Asynchronous update: use setTimeout
setTimeout(() => {
this.parent.name = 'updated name';
});
Forcing change detection: use the changeDetection
constructor(private cd: ChangeDetectorRef) {
}
ngAfterViewInit() {
this.cd.detectChanges();
}
Wednesday, April 29, 2020
Sunday, April 26, 2020
AWS Lambda (serverless service)
AWS Lambda (server-less service)
- https://serverless.com/framework/docs/providers/aws/guide/quick-start (clearly describe **********)
- https://blog.cloudboost.io/how-to-create-serverless-node-js-apps-with-aws-lambda-d5ab23be0cfb (****)
- https://serverless.com/framework/docs/providers/aws/cli-reference/config-credentials/ (***********)
- https://serverless.com/framework/docs/providers/aws/ (all kind of serverless framwork information available here )
serverless config credentials --provider aws --key 1234 --secret 5678
* https://github.com/serverless/serverless/issues/2372 (********** serverless folder structure)
- https://serverless.com/blog/node-rest-api-with-serverless-lambda-and-dynamodb/ ( dynamodb, serverless framwork, ************)
Getting Started with Amazon Web Services | A Complete Beginner Roadmap
Thursday, April 16, 2020
Angular library create command
Go to the lib folder of nodejs then run these 4 command
ng new ngx-charts --create-application=false
cd ngx-charts
ng generate library ngx-charts
ng generate application ngx-charts-test
Monday, April 13, 2020
angular project publish to github page
- https://medium.com/code-sketch/how-to-deploy-an-angular-7-app-to-github-pages-9427b609645f
- https://www.youtube.com/watch?v=wElk1W1BJ2o (VVI)
- https://stackoverflow.com/questions/53698413/angular-6-build-failed-to-load-resources
command need to follow
npm install -g angular-cli-ghpages
🌹 ng build --prod --base-href https://[username].github.io/[repo]/
🌹 ngh --dir=dist/[project-name]
You need to change
<base href="/"> to <base href="./">
ng build ngx-datagrid-test --prod --base-href https://tusharghoshbd.github.io/ngx-datagrid
ngh --dir=dist/ngx-datagrid-test
some important commands use for angular
ng build [project_name] // for library ex "ng build ngx-datatable"
ng build [project_name] --prod //here project name option and only build js file in dist folder
ng serve [project_name] --prod // here project name option and run server in production mode
Can't load angular generated webpage (ng build --prod)
The problem is you're trying to run the application without a server serving the js bundles generated by Angular. Angular will load the js asynchronously.
An option run
live-server on the compiled directory// Install live-server if you haven't
npm install -g live-server
// Run live-server on you dist
cd <project-compile-dist-path>
live-server
// Note: if you don't want to install live-server globally you
// can use npx
npx live-server <path-to-directory>
https://stackoverflow.com/questions/58878123/cant-load-angular-generated-webpage-ng-build-prod
Subscribe to:
Posts (Atom)
Autoboxing and Unboxing
Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper cl...
-
A quick tip that helps me remember what they do - HostBinding('value') myValue; is exactly the same as [value]="myValue...
-
VPC endpoint enables creation of a private connection between VPC to supported AWS services and VPC endpoint services powered by Private...
-
IP address is used to communicate with the servers or to establish connection between the machines. Difference between elastic IP and publ...