Tutorial by Examples: dir

public void test() { Connection conn = null; Statement stmt = null; try { Context ctx = (Context) new InitialContext().lookup("java:comp/env"); conn = ((DataSource) ctx.lookup("jdbc/SomeDataSource")).getConnection(); stmt = conn.createS...
One can describe a line in arbitrary dimensions as X = A + t*D where A and D are both vectors of suitably many dimensions. So in 2d this would be x = Ax + t*Dx y = Ay + t*Dy Now as t assumes any real value, this equation will produce all points along the line. The representation is not uniq...
just use your cmd: You can use the ng generate (or just ng g) command to generate Angular components: Component: ng g component my-new-component Directive: ng g directive my-new-directive Pipe: ng g pipe my-new-pipe Service: ng g service my-new-service Class: ng g class my-new-classt...
Format: cd/ cd/ is set to change the current directory back to the root of the current drive
First Add Storage permission to read/fetch device directory. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> Create model class //create one directory model ...
Creates a directory, status is in OS-ERROR OS-CREATE-DIR directory Create a directory called /usr/local/appData OS-CREATE-DIR VALUE("/usr/local/appData").
This example echoes the special character ! into a file. This would only work when DelayedExpansion is disabled. When delayed expansion in enabled, you will need to use three carets and an exclamation mark like this: @echo off setlocal enabledelayedexpansion echo ^^^!>file echo ^>>&...
After a while, you end up with many configuration items in your config.yml. It can make you configuration easier to read if you split your configuration across multiple files. You can easily include all files from a directory this way: config.yml: imports: - { resource: parameters.yml } ...
With a simple for loop, all zip archives in a directory can be extracted. for (i in dir(pattern=".zip$")) unzip(i) The dir function produces a character vector of the names of the files in a directory matching the regex pattern specified by pattern. This vector is looped through w...
BFS can be used to find the connected components of an undirected graph. We can also find if the given graph is connected or not. Our subsequent discussion assumes we are dealing with undirected graphs.The definition of a connected graph is: A graph is connected if there is a path between every p...
Throwable has two direct subclasses, Exception and Error. While it's possible to create a new class that extends Throwable directly, this is inadvisable as many applications assume only Exception and Error exist. More to the point there is no practical benefit to directly subclassing Throwable, as ...
Sometimes you may want to have some login to determine where the user gets redirected to after submitting a form. Form Requests give a variety of ways. By default there are 3 variables declared in the Request $redirect, $redirectRoute and $redirectAction. On top of those 3 variables you can overr...
Usually output of a command goes to the terminal. Using the concept of Output redirection, the output of a command can be redirected to a file. So insted of displaying the output to the terminal it can be send to a file. '>' character is used for output redirection. $ pwd > file1 $ cat file...
The commands normally take their input from the standard input device keyboard. Using Input redirection concept, we can have their input redirected from a file. To redirect standard input from a file instead of the keyboard, the '<' character is used. $ cat file1 monday tuesday wednsday th...
Copying files copy copies the source file in the first argument to the destination in the second argument. The resolved destination needs to be in a directory that is already created. if (copy('test.txt', 'dest.txt')) { echo 'File has been copied successfully'; } else { echo 'Failed to ...
Calling C code from Go package main /* // Everything in comments above the import "C" is C code and will be compiles with the GCC. // Make sure you have a GCC installed. int addInC(int a, int b) { return a + b; } */ import "C" import "fmt" func ma...
create or replace directory DATAPUMP_REMOTE_DIR as '/oracle/scripts/expimp';
This code will prompt you to create the directory with :w, or just do it with :w!: augroup vimrc-auto-mkdir autocmd! autocmd BufWritePre * call s:auto_mkdir(expand('<afile>:p:h'), v:cmdbang) function! s:auto_mkdir(dir, force) if !isdirectory(a:dir) \ && (a:f...
By default modules are placed on ${WILDFLY}/modules directory but you can have more directories with modules, just edit your standalone.conf (or standalone.conf.bat if you are on Microsoft Windows) and properly set the variable JBOSS_MODULEPATH For example in Unix/Linux/MacOSX: JBOSS_MODULEPATH=&q...
You can mount remote directory through ssh by using sshfs. Sshfs does not come as a default on Ubuntu, so you need to install it first by using sudo apt-get install sshfs. You can then mount the remote directory to your local machine like this sshfs [email protected]:/remotedir /localdir Not...

Page 12 of 13