Tutorial by Examples

Index hints are used to force a query to use a specific index, instead of allowing SQL Server's Query Optimizer to choose what it deems the best index. In some cases you may gain benefits by specifying the index a query must use. Usually SQL Server's Query Optimizer chooses the best index suited for...
Many repetitive jobs can be performed more efficiently if you utilize more of your computer's resources (i.e. CPU's and RAM). Below is an example of running multiple jobs in parallel. Suppose you have a < list of files >, say output from ls. Also, let these files are bz2 compressed and the fo...
Now, let's imagine we have 1 large file (e.g. 30 GB) that needs to be converted, line by line. Say we have a script, convert.sh, that does this <task>. We can pipe contents of this file to stdin for parallel to take in and work with in chunks such as <stdin> | parallel --pipe --block &l...
var sourceFileName = "NonExistingFile"; try { System.IO.File.Copy(sourceFileName, "DestinationFile"); } catch (Exception e) { var stdErr = Console.Error; stdErr.WriteLine($"Failed to copy '{sourceFileName}': {e.Message}"); }
var errors = new System.Text.StringBuilder(); var process = new Process { StartInfo = new ProcessStartInfo { RedirectStandardError = true, FileName = "xcopy.exe", Arguments = "\"NonExistingFile\" \"DestinationFile\"", ...
To get the list of Elixir modules just type h Elixir.[TAB] Pressing [TAB] autocompletes modules and functions names. In this case it lists all modules. To find all functions in a module e.g. List use h List.[TAB]
For rendering multiple props or variables we can use ``. render() { let firstName = 'test'; let lastName = 'name'; return ( <View style={styles.container}> <Text>{`${firstName} ${lastName}` } </Text> </View> ); } Output: te...
php -S localhost:80 PHP 7.1.7 Development Server started at Fri Jul 14 15:11:05 2017 Listening on http://localhost:80 Document root is C:\projetos\repgeral Press Ctrl-C to quit. This is the simplest way to start a PHP server that responds to request made to localhost at the port 80. The -S...
php -S localhost:80 -t project/public router.php PHP 7.1.7 Development Server started at Fri Jul 14 15:22:25 2017 Listening on http://localhost:80 Document root is /home/project/public Press Ctrl-C to quit.
The PXDBDateAndTime attribute and the PXDateAndTime attribute are designed to work with a DAC field of the Nullable<DateTime> (DateTime?) type and store both date and time value parts inside a single field: #region UsrDateAndTime public abstract class usrDateAndTimeAttribute : IBqlField { }...
The PXDBTime attribute is designed to work with a DAC field of the Nullable<DateTime> (DateTime?) type and store only the time part without date inside a DAC field: #region UsrTime public abstract class usrTime : IBqlField { } [PXDBTime(DisplayMask = "t", InputMask = "t&qu...
The PXDBDate attribute and the PXDate attribute are designed to work with a DAC field of the Nullable<DateTime> (DateTime?) type and store date value with an optional time part inside a single field. Wheather PX(DB)DateAttribute should save time in addition to date in a DAC field is defined by...
The PXDBTimeSpan attribute is designed to work with a DAC field of the Nullable<int> (int?) type and store time value inside a DAC field as the number of minutes passed since midnight: #region UsrTimeInt public abstract class usrTimeInt : IBqlField { } [PXDBTimeSpan(DisplayMask = "t...
The PXTimeList attribute is designed to work with a DAC field of the Nullable<int> (int?) type and store time span value inside a DAC field as a number of minutes: #region UsrTimeSpan public abstract class usrTimeSpan : IBqlField { } [PXDBInt] [PXTimeList] [PXUIField(DisplayName = &quo...
This returns a map without the key-value pairs for the keys mentioned in the function argument. It can be used to remove information from existing map. (dissoc {:a 1 :b 2} :a) ;; {:b 2} It can also be used for dissocing multiple keys as: (dissoc {:a 1 :b 2 :c 3} :a :b) ;; {:c 3}
This is ANSI SQL method works in all the RDBMS. Widely used approach. CREATE TABLE AliasNameDemo (id INT,firstname VARCHAR(20),lastname VARCHAR(20)) INSERT INTO AliasNameDemo VALUES (1,'MyFirstName','MyLastName') SELECT FirstName +' '+ LastName As FullName FROM AliasNameDemo
This is my preferred approach. Nothing related to performance just a personal choice. It makes the code to look clean. You can see the resulting column names easily instead of scrolling the code if you have a big expression. CREATE TABLE AliasNameDemo (id INT,firstname VARCHAR(20),lastname VARCHAR(...
This is a weird approach most of the people don't know this even exist. CREATE TABLE AliasNameDemo(id INT,firstname VARCHAR(20),lastname VARCHAR(20)) INSERT INTO AliasNameDemo VALUES (1,'MyFirstName','MyLastName') SELECT * FROM (SELECT firstname + ' ' + lastname FROM A...
This syntax will be similar to using AS keyword. Just we don't have to use AS keyword CREATE TABLE AliasNameDemo (id INT,firstname VARCHAR(20),lastname VARCHAR(20)) INSERT INTO AliasNameDemo VALUES (1,'MyFirstName','MyLastName') SELECT FirstName +' '+ LastName FullName FROM AliasNa...
HTML <p>This is a nice </p> <p>I like </p> <ul> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> </ul> <button id="btn-1">Append text</button> <button id="btn-2&quot...

Page 1314 of 1336