| Method | Advantages | Disadvantages |
|---|---|---|
| Offset-based pagination | - Easy to implement and understand. - Straightforward to enable “jump to page X” functionality. |
- Performance decreases as offsets grow. - Large offsets in frequent queries can increase CPU usage and impact system performance. |
| Keyset pagination | - Always processes a fixed number of documents or index nodes. - Consistent performance without additional CPU overhead. |
- Direct navigation to a specific page isn’t possible without iterating through previous pages. - The keyset must provide unique sorting. |
| Pre-generated p |
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
| gcloud services enable run.googleapis.com | |
| gcloud services enable cloudbuild.googleapis.com | |
| # Server | |
| # Create container | |
| gcloud builds submit \ | |
| --tag gcr.io/${GOOGLE_CLOUD_PROJECT}/employees-api:1.0.0 . | |
| # Deploy service | |
| gcloud run deploy employees-api \ |
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
| [ | |
| { | |
| "id": "english_vocabulary_basic", | |
| "name":"English Vocabulary (Basic)", | |
| "secondsForAnswer":"5", | |
| "questions":[ | |
| { | |
| "question":"куче", | |
| "answer":"dog" | |
| }, |
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
| <Button | |
| android:id="@+id/button_send" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:text="@string/button_send" | |
| android:onClick="sendMessage" | |
| android:background="@drawable/button_custom" /> |
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
| ERROR in TypeError: Cannot read property 'version' of null | |
| at readMetadataFile (/home/[email protected]/newng5/node_modules/@angular/compiler-cli/src/transformers/metadata_reader.js:66:28) | |
| at Object.readMetadata (/home/[email protected]/newng5/node_modules/@angular/compiler-cli/src/transformers/metadata_reader.js:35:25) | |
| at TsCompilerAotCompilerTypeCheckHostAdapter.getMetadataFor (/home/[email protected]/newng5/node_modules/@angular/compiler-cli/src/transformers/compiler_host.js:413:34) | |
| at StaticSymbolResolver.getModuleMetadata (/home/[email protected]/newng5/node_modules/@angular/compiler/bundles/compiler.umd.js:31787:62) | |
| at StaticSymbolResolver.hasDecorators (/home/[email protected]/newng5/node_modules/@angular/compiler/bundles/compiler.umd.js:31514:46) | |
| at analyzeFile (/home/[email protected]/newng5/node_modules/@angular/compiler/bundles/compiler.umd.js:30061:63) | |
| at AotCompiler._analyzeFile (/home/[email protected] |
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 { NativeScriptRouterModule } from "nativescript-angular/router"; | |
| import { routes as homeRoutes } from "./home/home.routes"; | |
| export const routes = [ | |
| ...homeRoutes, | |
| { | |
| path: "ninjas", | |
| loadChildren: "./ninjas/ninjas.module#NinjasModule", | |
| } |
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 { NgModuleFactoryLoader } from "@angular/core"; | |
| import { NSModuleFactoryLoader } from "nativescript-angular/router"; | |
| @NgModule({ | |
| providers: [ | |
| { provide: NgModuleFactoryLoader, useClass: NSModuleFactoryLoader } | |
| ] | |
| // ... | |
| }) | |
| export class AppModule { } |
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
| #!/bin/bash | |
| set -e | |
| # release defaults to patch (last number in semver) | |
| RELEASE="patch" && [ -n "$1" ] && RELEASE=$1 | |
| # cut the release | |
| VERSION=$(npm --no-git-tag-version version $RELEASE | sed 's/v//') | |
| git add package.json | |
| git commit -m "release: cut the $VERSION release" |
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 { NgModule, APP_INITIALIZER } from "@angular/core"; | |
| import { NativeScriptModule } from "nativescript-angular/nativescript.module"; | |
| import { | |
| on as applicationOn, | |
| suspendEvent, | |
| ApplicationEventData, | |
| } from "application"; | |
| import { AppComponent } from "./app.component"; |
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 { NgModule, NgModuleFactoryLoader } from "@angular/core"; | |
| ... | |
| import { NinjaModuleLoader } from "./ninja-module-loader"; | |
| @NgModule({ | |
| ... | |
| providers: [ | |
| { provide: NgModuleFactoryLoader, useClass: NinjaModuleLoader } | |
| ] | |
| }) |
NewerOlder