Tutorial by Examples: ti

This is an example of how you would do a one to many mapping using XML. We will use Author and Book as our example and assume an author may have written many books, but each book will only have one author. Author class: public class Author { private int id; private String firstName; ...
hql = "From EntityName";
You can include HTML comments in JSPs as well. You use the basic html comment syntax: <!--Comment goes here--> The difference between using JSP style comments and HTML style comments is the JSP ones will not be included when the HTML is generated and the HTML style comments will be. So it ...
QtCreator is, at the moment, the best tool to create a Qt application. In this example, we will see how to create a simple Qt application which manage a button and write text. To create a new application click on File->New File or Project: Then choose the Projects->Application->Qt Widge...
Once you have SCons running, create a file named SConstruct: print('..Building World') Now run scons: $ scons scons: Reading SConscript files ... ..Building World scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. scons: done building targets. S...
Go will throw an error when there is a variable that is unused, in order to encourage you to write better code. However, there are some situations when you really don't need to use a value stored in a variable. In those cases, you use a "blank identifier" _ to assign and discard the assign...
This workaround helped us so much at my job (Tech Support), we made a simple batch file we could run from anywhere (We didnt have the permissions to install the actual exe). This workaround will run OpenSSL and open up the bin folder for you (cause this is where any files you create or modify will b...
public function house() { $config['base_url'] = site_url().'/user/house/'; $config['total_rows'] = $this->houses->select_row_house_design(); $config['per_page'] = 12; $config['cur_tag_open'] = '<li><a><b>'; $config['cur_tag_close'] = '&...
First, I will place my date into a Macro Variable. NOTE: I find that date9. works great with IBM® Netezza® SQL and Transact-SQL. Use whichever format that works for the type of SQL you're executing. data _null_; call symput('testDate',COMPRESS(put(today(),date9.))); ;RUN; %PUT ...
There will be times where you only want to import a specific sheet from an excel file with multiple sheets. To do that, we'll use "SHEET=". PROC IMPORT OUT= YourNewTable DATAFILE= "myfolder/excelfilename.xlsx" DBMS=xlsx REPLACE; SHEET="Sheet1&quo...
Detailed instructions on getting teechart set up or installed.
A frequent question about StackViews inside Scrollviews comes from ambiguous with/heigh alerts on interface builder. As this answer explained, it is necessary to: Add in the UIScrollView a UIView (the contentScrollView); In this contentScrollView, set top, bottom, left and right margins to 0 Se...
The big gotcha about scrolling is to determine the offset necessary to present (for instance) a Textfield inside a StackView with is inside the ScrollView. If you try to get the position of Textfield.frame.minY can be 0, because the minY frame is only considering the distance between the element an...
For example, imagine a screen with 3 sections, laid out like this: The blue box might be given a margin of 4,4,0,0. The green box might be given a margin of 4,4,4,0. The purple box margin would be 4,4,4,4. Here's the XAML: (I'm using a grid to achieve the layout; but this design principle applies...
// This is a MiDI clk generator. This takes a #defined BPM and // makes the appropriate clk rate. The queue is used to let other messages // through, but allows a clock to go immediately to reduce clock jitter #define QUEUE_DEPTH 128 #define BPM 121 #define MIDI_SYSRT_CLK 0xF8 // clock...
In the last example, you can see that EF figures out which column is the foreign key and where should it point to. How? By using conventions. Having a property of type Person that is named Person with a PersonId property leads EF to conclude that PersonId is a foreign key, and it points to the prima...
I have to admit, I'm not really a fan of letting EF infer the join table wihtout a join entity. You cannot track extra information to a person-car association (let's say the date from which it is valid), because you can't modify the table. Also, the CarId in the join table is part of the primary ke...
As an example we want to set all string properties of a sample class class TestClass { val readOnlyProperty: String get() = "Read only!" var readWriteString = "asd" var readWriteInt = 23 var readWriteBackedStringProperty: String = "" ...
Let's define a grammar enabling us to perform additions, multiplications with the usage of parenthesis. To add more value to this example, we are going to compute the result of the arithmetic expression. Summary of the grammar: expression → times expression → times '+' expression times → elemen...
Suppose we want to know how many users have the same name. Let us create table users as follows: create table users( id int primary key auto_increment, name varchar(8), count int, unique key name(name) ); Now, we just discovered a new user named Joe and would like to take hi...

Page 444 of 505