Tutorial by Examples: v

Describes a dependency relationship between actors, the parent and child releationship. Parent is unique because it has created the child actor, so the parent is responsible for reacting when failures happens in his child. And parent decides which choice needs to be selected. When a parent receives...
There are two type of supervision strategies that we follow to supervise any actor: One-For-One Strategy One-For-All Strategy case object ResumeException extends Exception case object StopException extends Exception case object RestartException extends Exception override v...
Move to the SQL Server Management Studio menu bar (ALT) Activate the menu for a tool component (ALT+ HYPHEN) Display the context menu (SHIFT+F) Display the New File dialog box to create a file (CTRL+N) Display the Open Project dialog box to open an existing project (CTRL+SHIFT+0) Display the ...
In spark-shell: sc.version Generally in a program: SparkContext.version Using spark-submit: spark-submit --version
In your Maven project, add the following to your pom.xml file. The following versions are for Cassandra 3.x. <dependency> <groupId>com.datastax.cassandra</groupId> <artifactId>cassandra-driver-core</artifactId> <version>3.1.0</ve...
Connecting to Cassandra is very similar to connecting to other datasources. With Cassandra, credentials are not required. String cassandraIPAddress = "127.0.0.1"; String cassandraKeyspace = "myKeyspace"; String username = "foo"; String password = "bar"; ...
public enum Cassandra { DB; private Session session; private Cluster cluster; private static final Logger LOGGER = LoggerFactory.getLogger(Cassandra.class); /** * Connect to the cassandra database based on the connection configuration provided. * Multiple c...
This fetches the value of NOW() in local time, in India Standard Time, and then again in UTC. SELECT NOW(); SET time_zone='Asia/Kolkata'; SELECT NOW(); SET time_zone='UTC'; SELECT NOW();
If you have a stored DATE or DATETIME (in a column somewhere) it was stored with respect to some time zone, but in MySQL the time zone is not stored with the value. So, if you want to convert it to another time zone, you can, but you must know the original time zone. Using CONVERT_TZ() does the con...
This is really easy. All TIMESTAMP values are stored in universal time, and always converted to the present time_zone setting whenever they are rendered. SET SESSION time_zone='America/Los_Angeles'; SELECT timestamp_sold FROM sales WHERE state_sold = 'CA' Why is this? TIMESTAMP values are...
Each server has a default global time_zone setting, configured by the owner of the server machine. You can find out the current time zone setting this way: SELECT @@time_zone Unfortunately, that usually yields the value SYSTEM, meaning the MySQL time is governed by the server OS's time zone sett...
To get a list of possible time_zone values in your MySQL server instance, use this command. SELECT mysql.time_zone_name.name Ordinarily, this shows the ZoneInfo list of time zones maintained by Paul Eggert at the Internet Assigned Numbers Authority. Worldwide there are appproximately 600 time z...
Javascript timestamps are based on the venerable UNIX time_t data type, and show the number of milliseconds since 1970-01-01 00:00:00 UTC. This expression gets the current time as a Javascript timestamp integer. (It does so correctly regardless of the current time_zone setting.) ROUND(UNIX_TIMEST...
%f is the fractional precision format specifier for the DATE_FORMAT() function. SELECT DATE_FORMAT(NOW(3), '%Y-%m-%d %H:%i:%s.%f') displays a value like 2016-11-19 09:52:53.248000 with fractional microseconds. Because we used NOW(3), the final three digits in the fraction are 0.
If you have a Javascript timestamp value, for example 1478960868932, you can convert that to a MySQL fractional time value like this: FROM_UNIXTIME(1478960868932 * 0.001) It's simple to use that kind of expression to store your Javascript timestamp into a MySQL table. Do this: INSERT INTO table...
RelativePanel has been introduced in Windows 10 and is used mainly to support adaptive layouts, where the child elements of the panel are laid out differently depending on available space. RelativePanel is typically used with visual states, which are used to switch the layout configuration, adaptin...
Here's an example of a React component with a "managed" input field. Whenever the value of the input field changes, an event handler is called which updates the state of the component with the new value of the input field. The call to setState in the event handler will trigger a call to ...
grant all privileges on schema_name.* to 'new_user_name'@'%' identified by 'newpassword'; Attention: This can be used to create new root user
Given an m times n matrix A with n larger than m. The singular value decomposition [U,S,V] = svd(A); computes the matrices U,S,V. The matrix U consists of the left singular eigenvectors which are the eigenvectors of A*A.' while V consists of the right singular eigenvalues which are the eigenvec...
You might receive from your peer private key in PPK format, which seems it does not work in OpenSSH (command-line ssh). The client will be asking for the passphrase, because of OpenSSH bug. $ ssh -i mykey.ppk example.com Enter passphrase for mykey.ppk: You need to convert the key to OpenSSH for...

Page 227 of 296