Tutorial by Examples

In angular-cli.json you can change the app configuration. If you want to add ng2-bootstrap for example: npm install ng2-bootstrap --save or yarn add ng2-bootstrap In angular-cli.json just add the path of the bootstrap at node-modules. "scripts": [ "../node_modules/jqu...
In angular-cli.json at outDir key you can define your build directory; these are equivalent ng build --target=production --environment=prod ng build --prod --env=prod ng build --prod and so are these ng build --target=development --environment=dev ng build --dev --e=dev ng build --dev ng ...
Whenever you FIND a record you can aquire a lock of it. NO-LOCK: Used for read only operations. If you do a FIND <record> NO-LOCK you cannot in any way modify the record. FIND FIRST Customer NO-LOCK NO-ERROR. EXCLUSIVE-LOCK: Used for updates and deletes. If you do this you will "own&...
This is the definition of a TEMP-TABLE named ttTempTable with three fields. NO-UNDO indicates that no undo handling is needed (this is usually what you want to do unless you really need the opposite). DEFINE TEMP-TABLE ttTempTable NO-UNDO FIELD field1 AS INTEGER FIELD field2 AS CHARACTER ...
Temp-tables can (and should) be created with indices if you plan to run queries against them. This table has one index (index1) containing of one field (field1). This index is primary and unique (meaning not two records can have the same contents of field1). DEFINE TEMP-TABLE ttTempTable NO-UNDO ...
You can define multiple indices for each temp-table. If you need them - define them. Basically an index matching your query and/or sort order will help performance! DEFINE TEMP-TABLE ttWithIndex NO-UNDO FIELD field1 AS INTEGER FIELD field2 AS CHARACTER FIELD field3 AS LOGICAL IN...
@sorted = sort @list; @sorted = sort { $a cmp $b } @list; sub compare { $a cmp $b } @sorted = sort compare @list; The three examples above do exactly the same thing. If you don't supply any comparator function or block, sort assumes you want the list on its right sorted lexically. This is ...
@sorted = sort { $a <=> $b } @list; Comparing $a and $b with the <=> operator ensures they are compared numerically and not textually as per default.
@sorted = sort { $b <=> $a } @list; @sorted = reverse sort { $a <=> $b } @list; Sorting items in descending order can simply be achieved by swapping $a and $b in the comparator block. However, some people prefer the clarity of a separate reverse even though it is slightly slower.
This is probably the most famous example of a sort optimization making use of Perl's functional programming facilities, to be used where the sort order of items depend on an expensive function. # What you would usually do @sorted = sort { slow($a) <=> slow($b) } @list; # What you do to ma...
The traditional technique to make sort ignore case is to pass strings to lc or uc for comparison: @sorted = sort { lc($a) cmp lc($b) } @list; This works on all versions of Perl 5 and is completely sufficient for English; it doesn't matter whether you use uc or lc. However, it presents a problem ...
Android tests are based on JUnit, and you can run them either as local unit tests on the JVM or as instrumented tests on an Android device. This page provides an introduction to the concepts and tools for building Android tests Local unit tests (Located at module-name/src/test/java/) Instrumente...
A Responsive Table(sap.m.Table) can be created as below XML View <mvc:View controllerName="com.sap.app.controller.Main" xmlns:mvc="sap.ui.core.mvc" xmlns:core="sap.ui.core" xmlns="sap.m"> <Page title="Table Example"> <conte...
Host: server.example.com HTTP/1.1 GET /authorize?response_type=token&client_id=[APP_KEY]&state=[OPTIONAL_STATE] &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb&scope=[OPTIONAL_SCOPES] Source
The process.stdin property returns a Readable stream equivalent to or associated with stdin. The process.stdout property returns a Writable stream equivalent to or associated with stdout. process.stdin.resume() console.log('Enter the data to be displayed '); process.stdin.on('data', function(dat...
Find VideoView in Activity and add video into it. VideoView videoView = (VideoView) .findViewById(R.id.videoView); videoView.setVideoPath(pathToVideo); Start playing video. videoView.start(); Define VideoView in XML Layout file. <VideoView android:id="@+id/videoView" ...
keytool -genkey -v -keystore my-app-key.keystore -alias my-app-alias -keyalg RSA -keysize 2048 -validity 10000 Use a password when prompted
react-native bundle --platform android --dev false --entry-file index.android.js \ --bundle-output android/app/src/main/assets/index.android.bundle \ --assets-dest android/app/src/main/res/
cd android && ./gradlew assembleRelease
Upload the APK to your phone. The -r flag will replace the existing app (if it exists) adb install -r ./app/build/outputs/apk/app-release-unsigned.apk The shareable signed APK is located at: ./app/build/outputs/apk/app-release.apk

Page 1126 of 1336