Tutorial by Examples: dire

add the following function into .bash_profile, save and exit function wekaflstart() { export R_HOME=/Library/Frameworks/R.framework/Resources java -Xss10M -Xmx4096M -cp :weka.jar weka.gui.knowledgeflow.KnowledgeFlow "$1" } inside a directory with a weka.jar file, open its termin...
ll | grep ^- | awk -F"." '{print $2 "." $3}' | awk -F":" '{print $2}' | awk '{$1=""; print $0}' | cut -c2- | awk -F"." '{print "mkdir ""$1"";mv ""$1"."$2"" ""$1"""}' >...
Some times you see a signal is emitted in sender thread but connected slot doesn't called (in other words it doesn't receive signal), you have asked about it and finaly got that the connection type Qt::DirectConnection would fix it, so the problem found and everything is ok. But generaly this is ba...
For simple cases, you can filter data directly. a = np.random.normal(size=10) print(a) #[-1.19423121 1.10481873 0.26332982 -0.53300387 -0.04809928 1.77107775 # 1.16741359 0.17699948 -0.06342169 -1.74213078] b = a[a>0] print(b) #[ 1.10481873 0.26332982 1.77107775 1.16741359 0.176999...
Redirect without query params: RewriteRule ^route$ /new_route_without_query [L,R=301,QSD] Redirect with query params: RewriteCond %{QUERY_STRING} ^$ RewriteRule ^/?route$ %{REQUEST_URI}?query=param1&query2=param2 [NC,L,R=301]
mkdir -p toplevel/sublevel_{01..09}/{child1,child2,child3} This will create a top level folder called toplevel, nine folders inside of toplevel named sublevel_01, sublevel_02, etc. Then inside of those sublevels: child1, child2, child3 folders, giving you: toplevel/sublevel_01/child1 toplevel/s...
@Parameter(defaultValue = "${project.build.directory}") private File buildDirectory;
Along with other more advanced text editors, Atom allows developers to open a single file or a directory. Opening Files To open files with Atom, either use File > Open File... in the menu as show below: or use the faster keyboard shortcut: Ctrl+O (For Mac OS: ⌘+O). This will open a file expl...
SELECT E.LAST_NAME|| ' reports to ' || PRIOR E.LAST_NAME "Walk Top Down" FROM HR.EMPLOYEES E START WITH E.MANAGER_ID IS NULL CONNECT BY PRIOR E.EMPLOYEE_ID = E.MANAGER_ID;
Inside of your {CATALINA_HOME}/conf/ folder exists a server.xml and context.xml file. Each one of these contains similar code, but references different parts of Tomcat to complete the same task. server.xml is server-wide configuration. This is where you can set up HTTPS, HTTP2, JNDI Resources, etc....
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 ...
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 ...

Page 11 of 13