Tutorial by Examples: v

GridViews allow commands to be sent from a GridView row. This is useful for passing row-specific information into an event handler as command arguments. To subscribe to a command event: <asp:GridView ID="GridView1" ... OnRowCommand="GridView1_RowCommand"> Buttons are t...
Let's say you have a service the same as the one defined in the "First service and host" example. To create a client, define the client configuration section in the system.serviceModel section of your client configuration file. <system.serviceModel> <services> <cli...
The @ContentView annotation can be used to further alleviate development of activities and replace the setContentView statement : @ContentView(R.layout.myactivity_layout) public class MyActivity extends RoboActivity { @InjectView(R.id.text1) TextView textView; @Override protected ...
You can inject any view using the @InjectView annotation: You'll need to: Inherit from RoboActivity Set your content view Annotate your views with @InjectView Example @InjectView(R.id.textView1) TextView textView1; @InjectView(R.id.textView2) TextView textView2; @InjectView(R.id.imag...
To create a variable: variableType variableName; For example: int a; To create a variable and initialize it: variableType variableName = initialValue; For example: int a = 2;
If you have a variable declared before, you can assign some value to it: For example: int a; // declared previously a = 2; Or change the value: int a = 3; // initalized previously a = 2;
char : signed 1-byte character value byte : unsigned 8-bit integer int : signed 16-bit (on ATMEGA based boards) or 32-bit (on Arduino Due) integer unsigned int : unsigned 16-bit (on ATMEGA based boards) or 32-bit (on Arduino Due) integer long : signed 32-bit integer unsigned long : unsigned 3...
DECLARE @Employees TABLE ( EmployeeID INT NOT NULL PRIMARY KEY, FirstName NVARCHAR(50) NOT NULL, LastName NVARCHAR(50) NOT NULL, ManagerID INT NULL ) When you create a normal table, you use CREATE TABLE Name (Columns) syntax. When creating a table variable, you use DECLARE @...
DECLARE @VariableName INT SET @VariableName = 1 PRINT @VariableName 1 Using SET, you can only update one variable at a time.
Using SELECT, you can update multiple variables at once. DECLARE @Variable1 INT, @Variable2 VARCHAR(10) SELECT @Variable1 = 1, @Variable2 = 'Hello' PRINT @Variable1 PRINT @Variable2 1 Hello When using SELECT to update a variable from a table column, if there are multiple values, it wi...
DECLARE @Var1 INT = 5, @Var2 NVARCHAR(50) = N'Hello World', @Var3 DATETIME = GETDATE()
(let [v [1 2 3]] (match [v] [[1 1 1]] :a0 [[1 _ 1]] :a1 [[1 2 _]] :a2)) ;; _ is used for wildcard matching ;=> :a2
C++11 NOTE: std::auto_ptr has been deprecated in C++11 and will be removed in C++17. You should only use this if you are forced to use C++03 or earlier and are willing to be careful. It is recommended to move to unique_ptr in combination with std::move to replace std::auto_ptr behavior. Before we ...
Let's say we wish to write Euclid's gcd() as a lambda. As a function, it is: int gcd(int a, int b) { return b == 0 ? a : gcd(b, a%b); } But a lambda cannot be recursive, it has no way to invoke itself. A lambda has no name and using this within the body of a lambda refers to a captured thi...
int a = 5; // 0101b (0x05) int b = 9; // 1001b (0x09) int c = a ^ b; // 1100b (0x0C) std::cout << "a = " << a << ", b = " << b << ", c = " << c << std::endl; Output a = 5, b = 9, c = 12 Why A bit wise XOR (...
Some API calls return a single failure/success flag, without any additional information (e.g. GetObject): if ( GetObjectW( obj, 0, NULL ) == 0 ) { // Failure: no additional information available. }
HRESULTs are numeric 32-bit values, where bits or bit ranges encode well-defined information. The MSB is a failure/success flag, with the remaining bits storing additional information. Failure or success can be determined using the FAILED or SUCCEEDED macros. HRESULTs are commonly used with COM, but...
When implementing SFINAE using std::enable_if, it is often useful to have access to helper templates that determines if a given type T matches a set of criteria. To help us with that, the standard already provides two types analog to true and false which are std::true_type and std::false_type. The...
function createNewFolderInGoogleDrive(folderName) { return DriveApp.createFolder(folderName); } Use function createNewFolderInGoogleDrive to create folder named Test folder in a Google Drive root: var newFolder = createNewFolderInGoogleDrive('Test folder'); newFolder has Class Folder typ...
A HTTP 500 Internal Server Error is a general message meaning that the server encountered something unexpected. Applications (or the overarching web server) should use a 500 when there's an error processing the request - i.e. an exception is thrown, or a condition of the resource prevents the proces...

Page 67 of 296