//Add a List validation to the C column
var val3 = worksheet.DataValidations.AddIntegerValidation("E:E");
//For Integer Validation, you have to set error message to true
val3.ShowErrorMessage = true;
val3.Error = "The value must be an integer between 0 and 10";
//Minimum a...
//Add a DateTime Validation to column F
var val4 = worksheet.DataValidations.AddDateTimeValidation("F:F");
//For DateTime Validation, you have to set error message to true
val4.ShowErrorMessage = true;
//Minimum allowed date
val4.Formula.Value = new DateTime(2017,03,15, 01, 0,0);
/...
//Add a TextLength Validation to column G
var val5 = worksheet.DataValidations.AddTextLengthValidation("G:G");
//For TextLenght Validation, you have to set error message to true
val5.ShowErrorMessage = true;
//Minimum allowed text lenght
val5.Formula.Value = 3;
//Maximum allowed te...
For Getting updated or to do something before app goes live to user you can use below method.
AppDidFinishLaunching
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Write your code before app launch
return YES;
}
While ...
Web deployment offers the option to automatically backup target Web site (not target Web application!) on deployment. This is recommended to allow web application rollback.
In order to configure automatic backups, the following steps must be followed:
1) Enable backups
Open %programfiles%\IIS\Mic...
Moshi has built-in support for reading and writing Java’s core data types:
Primitives (int, float, char...) and their boxed counterparts
(Integer, Float, Character...).
Arrays
Collections
Lists
Sets
Maps Strings Enums
It supports your model classes by writing them out field-by-field. In ...
In order to access or alter an index on a table, you need to somehow place the table into the stack.
Let's assume, for this examples that your table is a global variable named tbl.
Getting the content at a particular index:
int getkey_index(lua_State *L)
{
lua_getglobal(L, "tbl"); ...
using Newtonsoft.Json;
var obj = new Person
{
Name = "Joe Smith",
Age = 21
};
var serializedJson = JsonConvert.SerializeObject(obj);
This results in this JSON: {"Name":"Joe Smith","Age":21}
This assumes you have installed both Eclipse and SBT.
Install the SBT plugin for Eclipse from the Eclipse marketplace.
In the command line switch directory to the root directory of the project.
$ cd ~/home/sample/project
Execute sbt, which will load the project.
$ sbt
Compile t...
Let A and B be two matrices of same dimension. The operators +,-,/,*,^ when used with matrices of same dimension perform the required operations on the corresponding elements of the matrices and return a new matrix of the same dimension. These operations are usually referred to as element-wise opera...
Sometimes one would like to pass names of columns from a data frame to a function. They may be provided as strings and used in a function using [[. Let's take a look at the following example, which prints to R console basic stats of selected variables:
basic.stats <- function(dset, vars){
f...
Preamble
TL;TR: For illustration-purposes the lines of this document beginning with
'TL;TR:' are followed by commandline refering to Plone-helper-scripts of the
egg 'adi.devgen'. If you execute the command given after 'TL;TR:', it will
create all the files explained of the following chapter.
Th...
An example of a parametric parameter of a type function:
data List a = Nil | Cons a (List a)
type family DoNotInspect x
type instance DoNotInspect x = List x
Here x is parametric because to determine the outcome of applying DoNotInspect to a type argument, the type function do not need to in...
The example I'm going to discuss assumes you have a Docker installation that works in your system and a basic understanding of how to work with Node.js . If you are aware of how you must work with Docker , it should be evident that Node.js framework need not be installed on your system, rather we wo...
SET @searchTerm= 'Date Database Programming';
SELECT MATCH (Title, Author) AGAINST (@searchTerm IN NATURAL LANGUAGE MODE) Score,
ISBN, Author, Title
FROM book
WHERE MATCH (Title, Author) AGAINST (@searchTerm IN NATURAL LANGUAGE MODE)
ORDER BY MATCH (Title, Author) AGAINST (...
There is no way to protect the delimiter. Spreadsheets and similar CSV-handling software usually can recognize a text-quoting character which makes it possible to define strings containing a delimiter. With cut you cannot.
$ cut -d, -f3 <<<'John,Smith,"1, Main Street"'
"1
...
You can only extract portions of lines, not reorder or repeat fields.
$ cut -d, -f2,1 <<<'John,Smith,USA' ## Just like -f1,2
John,Smith
$ cut -d, -f2,2 <<<'John,Smith,USA' ## Just like -f2
Smith