Tutorial by Examples: al

@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...
import serial #Serial takes these two parameters: serial device and baudrate ser = serial.Serial('/dev/ttyUSB0', 9600)
Initialize serial device import serial #Serial takes two parameters: serial device and baudrate ser = serial.Serial('/dev/ttyUSB0', 9600) to read single byte from serial device data = ser.read() to read given number of bytes from the serial device data = ser.read(size=5) to read one li...
This is an example on how to control PHP error logging in a virtual host site for development and debugging. Assumptions The PHP module has been installed. Development environment is not for production. <VirtualHost *:80> ServerName example.com DocumentRoot /var/www/domains/e...
Debian/Ubuntu # apt-get update & apt-get -y upgrade # apt-get install cron Fedora/CentOS # yum -y update # yum install vixie-cron Arch # pacman --noconfirm -Syu # pacman -S cronie
To get a list of available serial ports use python -m serial.tools.list_ports at a command prompt or from serial.tools import list_ports list_ports.comports() # Outputs list of available serial ports from the Python shell.
Detailed instructions on getting axapta set up or installed.
Download the latest stable version from Activiti's website or you can check out the code from github and unzip to a directory of choice and then check out the readme.html that includes pointers to the docs and the release notes. The userguide ( docs/userguide/index.html ) includes instructions on ho...
Consider this example: public class ThreadTest implements Runnable { private boolean stop = false; public void run() { long counter = 0; while (!stop) { counter = counter + 1; } System.out.println("Counted " + counter);...
Suppose you have a long list of elements and you are only interested in every other element of the list. Perhaps you only want to examine the first or last elements, or a specific range of entries in your list. Python has strong indexing built-in capabilities. Here are some examples of how to achie...
What are local and global scope? All Python variabes which are accessible at some point in code are either in local scope or in global scope. The explanation is that local scope includes all variables defined in the current function and global scope includes variabled defined outside of the curren...
Detailed instructions on getting shopify set up or installed.
Erlang on OpenBSD is currently broken on alpha, sparc and hppa architectures. Method 1 - Pre-built Binary Package OpenBSD let you choose desired version you want to install on your system: ###################################################################### # free-choice: ####################...
Consider the following partial example: import com.example.somelib.*; import com.acme.otherlib.*; public class Test { private Context x = new Context(); // from com.example.somelib ... } Suppose that when when you first developed the code against version 1.0 of somelib and versi...
$ sudo apt-get update $ sudo apt-get install -y build-essential git curl wget $ wget https://storage.googleapis.com/golang/go<versions>.gz You can find the version lists here. # To install go1.7 use $ wget https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz # Untar the ...
Detailed instructions on getting teradata set up or installed.
In this iText 5 example, we will create a Hello World example in different languages, using different fonts: public void createPdf(String dest) throws DocumentException, IOException { Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream(dest)); ...

Page 158 of 269