Tutorial by Examples: ecto

NIO appeared in Java 1.4 and introduced the concept of "Channels", which are supposed to be faster than regular I/O. Network-wise, the SelectableChannel is the most interesting as it allows to monitor different states of the Channel. It works in a similar manner as the C select() system ca...
[Header( "My variables" )] public string MyString; [HideInInspector] public string MyHiddenString; [Multiline( 5 )] public string MyMultilineString; [TextArea( 2, 8 )] public string MyTextArea; [Space( 15 )] public int MyInt; [Range( 2.5f, 12.5f )] public float MyFlo...
#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...
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...
Using core debugger Node.js provides a build in non graphical debugging utility. To start the build in the debugger, start the application with this command: node debug filename.js Consider the following simple Node.js application contained in the debugDemo.js 'use strict'; function addTwoN...
[root@localhost ~]# docker run -it -v /etc:/etc1 8251da35e7a7 /bin/bash Here: /etc is host machine directory and /etc1 is the target inside container
After installing Tomcat with apt-get on Ubuntu xx.xx, Tomcat creates and uses these directories: $cd /etc/tomcat6/ ├── Catalina │   └── localhost │   ├── ROOT.xml │   └── solr.xml -> ../../../solr/solr-tomcat.xml ├── catalina.properties ├── context.xml ├── logging.properties ├── ...
Given the following project structure include\ myHeader.h src\ main.cpp CMakeLists.txt the following line in the CMakeLists.txt file include_directories(${PROJECT_SOURCE_DIR}/include) adds the include directory to the include search path of the compiler for all targets defined in thi...
<?php get_template_part( 'dir/foo' ); ?> Includes ../wp-content/themes/your-theme-slug/dir/foo.php
<?php get_template_part( 'dir/foo', 'bar' ); ?> Includes ../wp-content/themes/your-theme-slug/dir/foo-bar.php
Using a Virtual Directory or Nested Application in IIS is a common scenario and most likely one that you'll want to take advantage of when using IISNode. IISNode doesn't provide direct support for Virtual Directories or Nested Applications via configuration so to achieve this we'll need to take adv...
The per-directory context is a part of the static configuration file between <Directory> and </Directory> tags. The entire content of dynamic configuration files is within the per-directory context of the folder in which the .htaccess resides. RewriteRule's in per-directory context matc...
A common question among new Angular programmers - "What should be the structure of the project?". A good structure helps toward a scalable application development. When we start a project we have two choices, Sort By Type (left) and Sort By Feature (right). The second is better, especially...
Numpy provides a cross function for computing vector cross products. The cross product of vectors [1, 0, 0] and [0, 1, 0] is [0, 0, 1]. Numpy tells us: >>> a = np.array([1, 0, 0]) >>> b = np.array([0, 1, 0]) >>> np.cross(a, b) array([0, 0, 1]) as expected. While cr...
<PropertyGroup> <DirectoryToCreate>NewDirectory</DirectoryToCreate> </PropertyGroup> <MakeDir Directories="$(DirectoryToCreate)" />
<PropertyGroup> <DirectoryToRemove>TempData</DirectoryToRemove> </PropertyGroup> <RemoveDir Directories="$(DirectoryToRemove)" />
QVector<T> provides dynamic array template class. It provides better performance in most cases than QList<T> so it should be first choice. It can be initialized in various ways: QVector<int> vect; vect << 1 << 2 << 3; QVector<int> v {1, 2, 3, 4}; Th...
michael@who-cares:~$ The symbol ~ after the who-cares: is the current directory. ~ actually means the person's home directory. In this case, that's /home/michael. michael@who-cares:~$ cd Downloads michael@who-cares:~/Downloads$ Looks for Downloads in the current directory, then makes that th...

Page 9 of 13