Tutorial by Examples: a

One to Many mapping is generally simply a bidirectional relationship of Many to One mapping. We will take same example that we took for Many to one mapping. Employee.java @Entity public class Employee { @TableGenerator(name = "employee_gen", table = "id_gen", pkColumnNa...
Exporting data from employees table to /tmp/ca_employees INSERT OVERWRITE LOCAL DIRECTORY '/tmp/ca_employees' SELECT name, salary, address FROM employees WHERE se.state = 'CA'; Exporting data from employees table to multiple local directories based on specific condition The below query shows how ...
Employee Entity @Entity public class Employee { @TableGenerator(name = "employee_gen", table = "id_gen", pkColumnName = "gen_name", valueColumnName = "gen_val", allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.TABLE, generat...
Employee entity. package com.thejavageek.jpa.entities; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Joi...
The following configuration can be used as a base config for bundling up your project as a library. Notice how the module config contains a list of preLoaders and loaders. // webpack.config.js var path = require('path'); module.exports = { entry: path.join(__dirname, '..', 'src/index.js...
Example code : In main.html <template name="test"> <input type="checkbox" id="checkbox1" name="name" value="data">Check Me {{showData}} </template> In Main.js var check_status=''; //Reactive Var Initialization...
Here's how to create an Express server and serve index.html by default (empty path /), and page1.html for /page1 path. Folder structure project root | server.js |____views | index.html | page1.html server.js var express = require('express'); var path = require('path')...
To use an Asset Catalog, you need to do the following: Double-click the Info.plist file in the Solution Explorer to open it for editing. Scroll down to the App Icons section. From the Source dropdown list, ensure AppIcons is selected. From the Solution Explorer, double-click the Assets.xcasset...
If you have a moment object you can use add and substract to manipulate it or set any property of the time directly moment("2016-01-01").add(1, 'year').format('YYYY-MM-DD') // -> "2017-01-01" Or use .day(), .month(), .year(), .seconds(), .milliseconds() to set those val...
You can use moment to parse date strings. By default moment tries to parse the date as an ISO-8601 string and if that does not work falls back to the browsers new Date(). Since the way that browsers construct dates varies it is best to try not to fall back to this. moment('2016-02-04').format('YYY...
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. //Declare the search bar and add it to the header of the table searchBar = new UISearchBar(); searchBar.SizeToFit(); ...
For multiple databases, you have the database.php file where you can set as many databases as you need. If you want to "switch" a database for a specific model on the fly, use the setDataSource() method. For example, if you have two databases, you can define them in the database.php file...
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <WebView x:Name="MyWebView" /> </Grid>
MyWebView.Navigate(new Uri("http://www.url.com"));
MyWebView.Navigate(new Uri("ms-appdata:///local/Downloads/index.html"));
// resize the image to be contained within a maximum width and height, keeping aspect ratio public static UIImage MaxResizeImage(this UIImage sourceImage, float maxWidth, float maxHeight) { var sourceSize = sourceImage.Size; var maxResizeFactor = Math.Min(maxWidth / sourceSize.Width, max...
// resize the image (without trying to maintain aspect ratio) public static UIImage ResizeImage(this UIImage sourceImage, float width, float height) { UIGraphics.BeginImageContext(new SizeF(width, height)); sourceImage.Draw(new RectangleF(0, 0, width, height)); var resultImage = UIG...
// crop the image, without resizing public static UIImage CropImage(this UIImage sourceImage, int crop_x, int crop_y, int width, int height) { var imgSize = sourceImage.Size; UIGraphics.BeginImageContext(new SizeF(width, height)); var context = UIGraphics.GetCurrentContext(); ...
It is suggested that you define groups based on purpose of the host (roles) and also geography or datacenter location (if applicable): File inventory/production [rogue-server] 192.168.1.1 [atlanta-webservers] www-atl-1.example.com www-atl-2.example.com [boston-webservers] www-bos-1.examp...
Each table view must have a delegate and a data source. Delegate Methods None of the delegate methods are actually required, however you'll need to implement tableView:didSelectRowAtIndexPath: to handle touches on a table cell: And other methods are... // Display customization - (void)tableVi...

Page 729 of 1099