Tutorial by Examples: dir

HTML template files are always loaded before everything else Files beginning with main. are loaded last Files inside any lib/ directory are loaded next Files with deeper paths are loaded next Files are then loaded in alphabetical order of the entire path Reference Link Reference page: Mete...
This is the image of project structure in Android studio: This is the image of project structure of nativescript project: As you see they are same. so we can write java code in nativescript as we write in android studio. We want to Add Toast to the default app of nativescript. after creating...
We want to add Toast to nativescript default app. import {Component} from "@angular/core"; let application = require("application"); declare var android:any; @Component({ selector: "my-app", templateUrl: "app.component.html", }) export clas...
Sometimes a poorly designed 3rd-party library will write unwanted diagnostics to System.out or System.err streams. The recommended solutions to this would be to either find a better library or (in the case of open source) fix the problem and contribute a patch to the developers. If the above solu...
ngfor.component.html <StackLayout> <Label *ngFor="let item of items" [text]="item"></Label> </StackLayout> ngfor.component.ts import { Component } from "@angular/core"; var dataItems = ["data-item 1", "data-item 2&quo...
To use SQL syntax with model, that would transfer result to proper instantions, you should use directly one of Phalcon\Mvc\Model\Resultset classes: $users = new \Application\Models\Users(); // bitwise operation on `flag` field $sql = 'SELECT * FROM phorum.users WHERE (15 & (1 <&...
Dirty reads (or uncommitted reads) are reads of rows which are being modified by an open transaction. This behavior can be replicated by using 2 separate queries: one to open a transaction and write some data to a table without committing, the other to select the data to be written (but not yet com...
A for loop iterates from the starting value down to the ending value inclusive, as a "count-down" example. program CountDown; {$APPTYPE CONSOLE} var i : Integer; begin for i := 10 downto 0 do WriteLn(i); end. Output: 10 9 8 7 6 5 4 3 2 1 0
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <dirent.h> #include <ctype.h> int main(int argc, char **argv) { const char *dname = (argc > 1 ? argv[1] : "."); DI...
Sometimes your webpage needs a automatic redirect. For example, to redirect to example.com after 5 seconds: <meta http-equiv="refresh" content="5;url=https://www.example.com/" /> This is line will send you to the designated website (in this case example.com after 5 sec...
os.path.abspath(os.path.join(PATH_TO_GET_THE_PARENT, os.pardir))
to check if the given path is a directory dirname = '/home/john/python' os.path.isdir(dirname) to check if the given path is a file filename = dirname + 'main.py' os.path.isfile(filename) to check if the given path is symbolic link symlink = dirname + 'some_sym_link' os.path.islink(symli...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany(mappedBy = "bar") private List<FooBar> bars; } @Entity @Table(name="BAR") public class Bar { private UUID barId; @OneToMany(mappedBy = "f...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany @JoinTable(name="FOO_BAR", joinColumns = @JoinColumn(name="fooId"), inverseJoinColumns = @JoinColumn(name="barId")) private List<Bar&g...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany(mappedBy = "bar") private List<Bar> bars; } @Entity @Table(name="BAR") public class Bar { private UUID barId; @ManyToOne @JoinColumn(nam...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "barId") private Bar bar; } @Entity @Table(name="BAR") public class Bar { private UUID barId; ...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany @JoinTable(name="FOO_BAR", joinColumns = @JoinColumn(name="fooId"), inverseJoinColumns = @JoinColumn(name="barId", unique=true)) private ...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToOne private Bar bar; } @Entity @Table(name="BAR") public class Bar { private UUID barId; //No corresponding mapping to Foo.class } Specifies a one-way relationship b...
Generic redirect to https: # Enable Rewrite engine RewriteEngine on # Check if URL does not contain https RewriteCond %{HTTPS} off [NC] # If condition is true, redirect to https RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L] Generic redirect to http: # Enable Rewrite engine Rewr...

Page 8 of 13