Tutorial by Examples: dir

console.dir(object) displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects. var myObject = { "foo":{ "bar":"d...
When localizing different types of resources are required, each of which has its own home in the android project structure. Following are the different directories that we can place under the \res directory. The resource types placed in each of these directories are explained in the table below: D...
Each resource directory under the res folder (listed in the example above) can have different variations of the contained resources in similarly named directory suffixed with different qualifier-values for each configuration-type. Example of variations of `` directory with different qualifier value...
If you use Linux (or Windows with Cygwin), you can run: adb shell screencap -p | sed 's/\r$//' > screenshot.png
If you like to organize your project by keeping source files in different subdirectories, you should know that during a build qmake will not preserve this directory structure and it will keep all the ".o" files in a single build directory. This can be a problem if you had conflicting file ...
module.exports.routes = { '/foo': '/bar', 'GET /google': 'http://www.google.com' };
System.IO.Compression.ZipFile.CreateFromDirectory("myfolder", "archive.zip") Create archive.zip file containing files which are in myfolder. In example paths are relative to program working directory. You can specify absolute paths.
System.IO.Compression.ZipFile.ExtractToDirectory("archive.zip", "myfolder") Extracts archive.zip to myfolder directory. In example paths are relative to program working directory. You can specify absolute paths.
If you wish to make a complete backup of a large MySql installation and do not have sufficient local storage, you can dump and compress it directly to an Amazon S3 bucket. It's also a good practice to do this without having the DB password as part of the command: mysqldump -u root -p --host=localho...
The SUBDIRS ability of qmake can be used to compile a set of libraries, each of which depend on another. The example below is slightly convoluted to show variations with the SUBDIRS ability. Directory Structure Some of the following files will be omitted in the interest of brevity. They can be a...
#Region directive can now be placed inside methods and can even span over methods, classes and modules. #Region "A Region Spanning A Class and Ending Inside Of A Method In A Module" Public Class FakeClass 'Nothing to see here, just a fake class. End Class Module Extensi...
Get all files in Directory var FileSearchRes = Directory.GetFiles(@Path, "*.*", SearchOption.AllDirectories); Returns an array of FileInfo, representing all the files in the specified directory. Get Files with specific extension var FileSearchRes = Directory.GetFiles(@Path, "*...
# Deny access to a directory from the IP 255.0.0.0 <Directory /path/to/directory> order allow,deny deny from 255.0.0.0 allow from all </Directory> # Deny access to a file from the IP 255.0.0.0 <FilesMatch "^\.ht"> order allow,deny deny fro...
import tensorflow as tf dims, layers = 32, 2 # Creating the forward and backwards cells lstm_fw_cell = tf.nn.rnn_cell.BasicLSTMCell(dims, forget_bias=1.0) lstm_bw_cell = tf.nn.rnn_cell.BasicLSTMCell(dims, forget_bias=1.0) # Pass lstm_fw_cell / lstm_bw_cell directly to tf.nn.bidrectional_rnn ...
In this example we are going to create a directive to copy a text into the clipboard by clicking on an element copy-text.directive.ts import { Directive, Input, HostListener } from "@angular/core"; @Directive({ selector: '[text-copy]' }) export class TextCopyDir...
The igraph package for R is a wonderful tool that can be used to model networks, both real and virtual, with simplicity. This example is meant to demonstrate how to create two simple network graphs using the igraph package within R v.3.2.3. Non-Directed Network The network is created with this pie...
Our first element directive will not do much: it will just calculate 2+2 and will be called in html like this: <my-calculator></my-calculator> Notice the name of the directive is myCalculator (in CamelCase), but in html it's used as my-calculator (in lisp-case). Since we want our di...
$ pwd /home/bob/somedir1/somedir2/somedir3 $ pushd /home/bob/otherdir1/otherdir2 /home/bob/otherdir1/otherdir2 /home/bob/somedir1/somedir2/somedir3 $ popd /home/bob/somedir1/somedir2/somedir3 $ pushd /usr /usr /home/bob/somedir1/somedir2/somedir3 $ pushd /var /var /usr /home/bob/som...
$ mkdir backup_download_directory && cd !#:1 mkdir backup_download_directory && cd backup_download_directory This will substitute the Nth argument of the current command. In the example !#:1 is replaced with the first argument, i.e. backup_download_directory.
When you are in a controllerAction And have a POST request coming in, but want to redirect it, to a different route, while still maintaining the POST method and the request object, you can use the following: return $this->redirectToRoute('route', array( 'request' => $request, ), 307); ...

Page 7 of 13