Tutorial by Examples

Sometimes Lua doesn't behave the way one would think after reading the documentation. Some of these cases are: Nil and Nothing aren't the same (COMMON PITFALL!) As expected, table.insert(my_table, 20) adds the value 20 to the table, and table.insert(my_table, 5, 20) adds the value 20 at the 5th po...
There are several ways to mark a comment block as a detailed description, so that this comment block is parsed by Doxygen and added as a description of the following code item to the documentation. The first and most common one are C style comments with an extra asterisk in the comment start sequenc...
Detailed instructions on getting split set up or installed.
import SpriteKit import UIKit class GameRoomTableView: UITableView,UITableViewDelegate,UITableViewDataSource { var items: [String] = ["Player1", "Player2", "Player3"] override init(frame: CGRect, style: UITableViewStyle) { super.init(frame: frame, s...
We create a dataset that we then fit with a straight line $f(x) = m x + c$. npoints = 20 slope = 2 offset = 3 x = np.arange(npoints) y = slope * x + offset + np.random.normal(size=npoints) p = np.polyfit(x,y,1) # Last argument is degree of polynomial To see what we've done: impor...
We use the same dataset as with polyfit: npoints = 20 slope = 2 offset = 3 x = np.arange(npoints) y = slope * x + offset + np.random.normal(size=npoints) Now, we try to find a solution by minimizing the system of linear equations A b = c by minimizing |c-A b|**2 import matplotlib.pyplot as...
dev.office.com/sharepoint is a great place to get started with the SharePoint Framework. The SharePoint Framework is a modern, client side approach to SharePoint Development initially targeted at SharePoint Online in Office 365. Web parts created with the SharePoint Framework are a new type of web ...
Using the Flyable example as a starting point, we can add a second interface, Swimmable, with the following code: Sub Swim() ' No code End Sub The Duck object can Implement both flying and swimming: Implements Flyable Implements Swimmable Public Sub Flyable_Fly() Debug.Print &quo...
Hadoop is an open-source software framework for storage and large-scale processing of data-sets in a distributed computing environment. It is sponsored by Apache Software Foundation. It is designed to scale up from single servers to thousands of machines, each offering local comput...
In tables recording events there is often a datetime field recording the time an event happened. Finding the single most recent event can be difficult because it's always possible that two events were recorded with exactly identical timestamps. You can use row_number() over (order by ...) to make su...
from sqlalchemy import create_engine cnx = create_engine('mysql+pymysql://username:password@server:3306/database').connect() sql = 'select * from mytable' df = pd.read_sql(sql, cnx)
Typically, before developing a new HERE SDK application, you need to acquire a set of credentials by registering your application on http://developer.here.com. Each application requires a unique set of credentials. When you register your app, the registered bundle identifier must match the package n...
The pygame.mixer module helps control the music used in pygame programs. As of now, there are 15 different functions for the mixer module. Initializing Similar to how you have to initialize pygame with pygame.init(), you must initialize pygame.mixer as well. By using the first option, we initiali...
While chrome browser is open to any tab (except welcome tabs) you have three options to open Chrome Dev Tools: Keyboard: Type command ⌘+option+i Browser Menu: Click 'Menu' > 'More Tools' > 'Developer Tools' Program Menu (at top of your screen): Click 'View' > 'Developer' > 'Develope...
You use the FIRST_VALUE function to determine the first value in an ordered result set, which you identify using a scalar expression. SELECT StateProvinceID, Name, TaxRate,        FIRST_VALUE(StateProvinceID)         OVER(ORDER BY TaxRate ASC) AS FirstValue FROM SalesTaxRate; In this example,...
The LAST_VALUE function provides the last value in an ordered result set, which you specify using a scalar expression. SELECT TerritoryID, StartDate, BusinessentityID,        LAST_VALUE(BusinessentityID)          OVER(ORDER BY TerritoryID) AS LastValue FROM SalesTerritoryHistory; This example...
The LAG function provides data on rows before the current row in the same result set. For example, in a SELECT statement, you can compare values in the current row with values in a previous row. You use a scalar expression to specify the values that should be compared. The offset parameter is the n...
The PERCENT_RANK function calculates the ranking of a row relative to the row set. The percentage is based on the number of rows in the group that have a lower value than the current row. The first value in the result set always has a percent rank of zero. The value for the highest-ranked – or last...
The PERCENTILE_DISC function lists the value of the first entry where the cumulative distribution is higher than the percentile that you provide using the numeric_literal parameter. The values are grouped by rowset or partition, as specified by the WITHIN GROUP clause. The PERCENTILE_CONT functi...
Lets following are the class definition class A def a; end end module B def b; end end class C < A include B def c; end end What are the instance methods of C? C.instance_methods # [:c, :b, :a, :to_json, :instance_of?...] What are the instance methods that declare...

Page 1106 of 1336