Tutorial by Examples

If you want to add custom.js script that is located in the js/ folder of your theme, you'll need to enqueue it. In functions.php add <?php add_action( 'after_setup_theme', 'yourtheme_theme_setup' ); if ( ! function_exists( 'yourtheme_theme_setup' ) ) { function yourtheme_theme_setup()...
Factors are one way to represent categorical variables in R. A factor is stored internally as a vector of integers. The unique elements of the supplied character vector are known as the levels of the factor. By default, if the levels are not supplied by the user, then R will generate the set of uniq...
When a column name matches a reserved keyword, standard SQL requires that you enclose it in double quotation marks: SELECT "ORDER", ID FROM ORDERS Note that it makes the column name case-sensitive. Some DBMSes have proprietary ways of quoting names. For example, SQL Serve...
asp:ListView introduced in ASP.NET WebForms framework 3.5 is the most flexible of all DataPresentation Controls in the framework. An example of Grouping using ListView (which will come handy as an image gallery) Objective: To display three images in a row using asp:ListView Markup <asp:ListVie...
Some convenience functions to manipulate data.frames are subset(), transform(), with() and within(). subset The subset() function allows you to subset a data.frame in a more convenient way (subset also works with other classes): subset(mtcars, subset = cyl == 6, select = c("mpg", "...
This will delete all rows that match the WHERE criteria. DELETE FROM Employees WHERE FName = 'John'
Omitting a WHERE clause will delete all rows from a table. DELETE FROM Employees See TRUNCATE documentation for details on how TRUNCATE performance can be better because it ignores triggers and indexes and logs to just delete the data.
In Python 2, user input is accepted using the raw_input function, Python 2.x2.3 user_input = raw_input() While in Python 3 user input is accepted using the input function. Python 3.x3.0 user_input = input() In Python 2, the input function will accept input and interpret it. While this ...
Functions can be written using several types of syntax function name() integer name name = 42 end function integer function name() name = 42 end function function name() result(res) integer res res = 42 end function Functions return values through a function result....
In the VBA Editor window, from the Tools menu select "Options": Then in the "Editor" tab, make sure that "Require Variable Declaration" is checked: Selecting this option will automatically put Option Explicit at the top of every VBA module. Small note: This is ...
When pattern matching an object whose type is a sealed trait, Scala will check at compile-time that all cases are 'exhaustively matched': sealed trait Shape case class Square(height: Int, width: Int) extends Shape case class Circle(radius: Int) extends Shape case object Point extends Shape ...
A popular form of data analysis is split-apply-combine, in which you split your data into groups, apply some sort of processing on each group, and then combine the results. Let's consider a data analysis where we want to obtain the two cars with the best miles per gallon (mpg) for each cylinder cou...
In many cases, the Razor parser is smart enough to figure out when the @ sign is meant to be used as part of code, as opposed to being part of something like an email address. In the example below, escaping the @ sign is not necessary: <p>Reach out to us at [email protected]</p> Howev...
Quite often, the reason why code has been written in a for loop is to compute values from 'nearby' ones. The function bsxfun can often be used to do this in a more succinct fashion. For example, assume that you wish to perform a columnwise operation on the matrix B, subtracting the mean of each col...
Slices have both length and capacity. The length of a slice is the number of elements currently in the slice, while the capacity is the number of elements the slice can hold before needing to be reallocated. When creating a slice using the built-in make() function, you can specify its length, and ...
Detailed instructions on getting ibm-bluemix set up or installed.
if condition: body The if statements checks the condition. If it evaluates to True, it executes the body of the if statement. If it evaluates to False, it skips the body. if True: print "It is true!" >> It is true! if False: print "This won't get printed.....
if condition: body else: body The else statement will execute it's body only if preceding conditional statements all evaluate to False. if True: print "It is true!" else: print "This won't get printed.." # Output: It is true! if False: print &...
The latest SDK can be downloaded here The latest SDK libraries are also available on NuGet under Microsoft's official crmsdk account
To catch a long click and use it you need to provide appropriate listener to button: View.OnLongClickListener listener = new View.OnLongClickListener() { public boolean onLongClick(View v) { Button clickedButton = (Button) v; String buttonText = clickedButton.getText().toStri...

Page 134 of 1336