Tutorial by Examples: c

Trees are a sub-type of the more general node-edge graph data structure. To be a tree, a graph must satisfy two requirements: It is acyclic. It contains no cycles (or "loops"). It is connected. For any given node in the graph, every node is reachable. All nodes are reachable throug...
After installing Julia, to launch the read-eval-print-loop (REPL): On Unix Systems Open a terminal window, then type julia at the prompt, then hit Return. You should see something like this come up: On Windows Find the Julia program in your start menu, and click it. The REPL should be launched...
The Julia REPL is an excellent calculator. We can start with some simple operations: julia> 1 + 1 2 julia> 8 * 8 64 julia> 9 ^ 2 81 The ans variable contains the result of the last calculation: julia> 4 + 9 13 julia> ans + 9 22 We can define our own variables usi...
Code First infer the relationship between the two entities using navigation property. This navigation property can be a simple reference type or collection type. For example, we defined Standard navigation property in Student class and ICollection navigation property in Standard class. So, Code Firs...
We have a tree data type like this: data Tree a = Tree a [Tree a] deriving Show And we wish to write a function that assigns a number to each node of the tree, from an incrementing counter: tag :: Tree a -> Tree (a, Int) The long way First we'll do it the long way around, since it illust...
HTML 3.2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> HTML 3.2 is well supported by most browsers in use. However, HTML 3.2 has limited support for style sheets and no support for HTML 4 features such as frames and internationalization. HTML 2.0 <!DOCTYPE HTML P...
To easily convert all tables in one database, use the following: SET @DB_NAME = DATABASE(); SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements FROM information_schema.tables WHERE table_schema = @DB_NAME AND `ENGINE` = 'MyISAM' AND `TABLE_TYPE` = '...
Manage Roles Global Roles- Create roles with selected set of Jenkins features e.g. Usually for a development project, 2 roles can be created. Developer- Global role can be set to only Overall : Read ProjectOwner- Global role can be set to Overall : Read This restricts developer and project ...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany(mappedBy = "bar") private List<FooBar> bars; } @Entity @Table(name="BAR") public class Bar { private UUID barId; @OneToMany(mappedBy = "f...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany @JoinTable(name="FOO_BAR", joinColumns = @JoinColumn(name="fooId"), inverseJoinColumns = @JoinColumn(name="barId")) private List<Bar&g...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany(mappedBy = "bar") private List<Bar> bars; } @Entity @Table(name="BAR") public class Bar { private UUID barId; @ManyToOne @JoinColumn(nam...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "barId") private Bar bar; } @Entity @Table(name="BAR") public class Bar { private UUID barId; ...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany @JoinTable(name="FOO_BAR", joinColumns = @JoinColumn(name="fooId"), inverseJoinColumns = @JoinColumn(name="barId", unique=true)) private ...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToOne private Bar bar; } @Entity @Table(name="BAR") public class Bar { private UUID barId; //No corresponding mapping to Foo.class } Specifies a one-way relationship b...
TestSchedulers allows you to control time and execution of Observables instead of having to do busy waits, joining threads or anything to manipulate system time. This is VERY important if you want to write unit tests that are predictable, consistent and fast. Because you are manipulating time, the...
Generic redirect to https: # Enable Rewrite engine RewriteEngine on # Check if URL does not contain https RewriteCond %{HTTPS} off [NC] # If condition is true, redirect to https RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L] Generic redirect to http: # Enable Rewrite engine Rewr...
import org.bukkit.event.Listener; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerQuitEvent; public class MyEventListener implements Listener { /** * Constructor ...
Add the following directive before using any other mod_rewrite directive (RewriteRule, RewriteCond, RewriteBase or RewriteMap). RewriteEngine on By default the engine is turned off. mod_rewrite directives found while the engine is turned off are ignored. Enable it from within the virtual host co...
Important: Using the dynamic configuration files (.htaccess) is a big performance hit. When you have access to the static configuration file (httpd.conf or something similar) you should use that instead. In the static configuration file, allow dynamic configuration files to override "Filei...
import serial #Serial takes these two parameters: serial device and baudrate ser = serial.Serial('/dev/ttyUSB0', 9600)

Page 494 of 826