Tutorial by Examples: ect

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...
The object-fit property will defines how an element will fit into a box with an established height and width. Usually applied to an image or video, Object-fit accepts the following five values: FILL object-fit:fill; Fill stretches the image to fit the content box without regard to the image...
This class enables a programmer to create an object and protect its confidentiality with a cryptographic algorithm. Given any Serializable object, one can create a SealedObject that encapsulates the original object, in serialized format (i.e., a "deep copy"), and seals (encrypts) its seri...
SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected. More specifically, a SignedObject contains another Serializable object, the (to-be-)signed object and its signature. //Create a key KeyPairGenerator keyGen...
[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...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Draw two rectangles on the canvas</title> <style> canvas{ border:1px solid gray; } </style> <script async...
project('projectA') { task A(dependsOn: ':projectB:B') << { println 'Hello from A' } } project('projectB') { task B << { println 'Hello from B' } } To refer to a task in another project, you prefix the name of the task with the path of the pr...
task A << { println 'Hello from A' } task B << { println 'Hello from B' } B.dependsOn A It is an alternative way to define the dependency instead of using the task name. And the output is the same: > gradle -q B Hello from A Hello from B
There are many reasons a write operation may fail. A frequent one is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user). You can see these security rule violations in the logcat output....
You can take a look at the full code in this working Plunker. In this example I use a shared service to handle the communication between the pages inside the tab (child pages) and the tab container (the component that holds the tabs). Even though you probably could do it with Events I like the shar...
If the administrator creates your database for you when setting up your permissions, you can begin using it. Otherwise, you need to create it yourself: mysql> CREATE DATABASE menagerie; Under Unix, database names are case sensitive (unlike SQL keywords), so you must always refer to your datab...
https://godzillai5.wordpress.com/2016/08/20/db2-for-i-in-the-cloud-connecting-to-pub400-via-jdbc-in-netbeans/
https://godzillai5.wordpress.com/2016/08/21/jdbc-jt400-setting-to-get-crud-and-show-sql-features-added-in-netbeans-with-ibm-db2-for-i/
#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...
Tags make it particularly easy to locate specific game objects. We can look for a single game object, or look for multiple. Finding a Single GameObject We can use the static function GameObject.FindGameObjectWithTag(string tag) to look for individual game objects. It is important to note that, i...
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...
You can organize the execution of your instrumented unit tests defining a Suite. /** * Runs all unit tests. */ @RunWith(Suite.class) @Suite.SuiteClasses({MyTest1.class , MyTest2.class, MyTest3.class}) public class AndroidTestSuite {} Then in AndroidStudio you can run...
This code uses the top level Application object to minimize the main Excel window. Sub MinimizeExcel() Application.WindowState = xlMinimized End Sub
os.path.abspath(os.path.join(PATH_TO_GET_THE_PARENT, os.pardir))
The Java Collections Framework provides two related methods for all Collection objects: size() returns the number of entries in a Collection, and isEmpty() method returns true if (and only if) the Collection is empty. Both methods can be used to test for collection emptiness. For example: C...

Page 58 of 99