Tutorial by Examples: ti

public class PascalsTriangle { static void PascalTriangle(int n) { for (int line = 1; line <= n; line++) { int c = 1; for (int i = 1; i <= line; i++) { Console.WriteLine(c); c = c * (line - i)...
Routes in Laravel are case-sensitive. It means that a route like Route::get('login', ...); will match a GET request to /login but will not match a GET request to /Login. In order to make your routes case-insensitive, you need to create a new validator class that will match requested URLs agains...
Here's how to translate objects in P3D: size(200, 200, P3D); //Starting P3D renderer fill(255, 0, 0, 150); //transparent red rect(10, 10, 100, 100); //first rectangle fill(0, 0, 255, 150); //transparent blue translate(50, 50, 50); //translate x, y and z by 50 pixels rect(0, 0, 100, 100); //sec...
For full documentation, run the command: godoc -http=:<port-number> For a tour of Go (highly recommended for beginners in the language): go tool tour The two commands above will start web-servers with documentation similar to what is found online here and here respectively. For quick ...
There are three functions for 3D rotation: rotateX(angle), rotateY(angle) and rotateZ(angle) for rotation in their respective axes where angle is in radians. size(200, 200, P3D); //Starting P3D renderer fill(255, 0, 0, 150); //transparent red translate(width/2, height/2);//translate to centre, ie...
A DataGridView is a control in .NET UI design, which consists of rows and columns used to arrange data. Often there is need to depict data either from a spreadsheet or database on a UI design in an application. When this data is to be shown grouped by its properties, we choose a DataGridView. In C...
In above examples you understand how to localize resources of application. Following example explain how to change the application locale within application, not from device. In order to change Application locale only, you can use below locale util. import android.app.Application; import android.c...
Here is the default flow of registering a user in Web API. All of these routes can be found in the AccountController: The user requests a list of the login providers using the GetExternalLogins route, passing a return URL as a parameter. This returns an array of provider objects, containing t...
I have found that the Web API template is broken - the default implementation relies on cookies in the final step, which you probably don't want to be using in a Rest API. Without a cookie, GetExternalLoginInfoAsync in RegisterExternal always returns null. I removed RegisterExternal entirely, inste...
The Shortest Common Super Sequence is a problem closely related to the longest common subsequence, which you can use as an external function for this task. The shortest common super sequence problem is a problem closely related to the longest common subsequence problem. A shortest common superseque...
public class ShortestCommonSupersequence { private static int Max(int a, int b) { return a > b ? a : b; } private static int Lcs(string x, string y, int m, int n) { var l = new int[m + 1, n + 1]; for (var i = 0; i <= m; i++) {...
Detailed instructions on getting systemjs set up or installed.
By default, pandoc will use a Chicago author-date format for citations and references. To use another style, you will need to specify a CSL 1.0 style file in the csl metadata field. In the following a often used citation style, the elsevier style, is presented (download at https://github.com/citatio...
app.module.ts Add these into your app.module.ts file to use reactive forms import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AppComponent } from './app.comp...
Detailed instructions on getting swig set up or installed.
The WMI Framework Windows Management Instrumentation (WMI) is included in all modern versions of Windows and Windows Server. Windows Management Instrumentation (WMI) CORE 1.5 was once available from Microsoft to install WMI on computers running Windows 95/98 or Windows NT 4.0. Even though all Wind...
This example will list the preferred resolution for all the connected monitors. The Code: On Error Resume Next strComputer = "." strQuery = "SELECT PreferredMonitorSourceModeIndex, MonitorSourceModes " & _ "FROM WmiMonitorListedSupportedSourceModes" ...
Strings can be compared with the == operator in Julia, but this is sensitive to differences in case. For instance, "Hello" and "hello" are considered different strings. julia> "Hello" == "Hello" true julia> "Hello" == "hello" fa...
Sometimes, one wants strings like "resume" and "résumé" to compare equal. That is, graphemes that share a basic glyph, but possibly differ because of additions to those basic glyphs. Such comparison can be accomplished by stripping diacritical marks. equals_ignore_mark(s, t) =...
Strings can be made from functions that work with IO objects by using the sprint function. For instance, the code_llvm function accepts an IO object as the first argument. Typically, it is used like julia> code_llvm(STDOUT, *, (Int, Int)) define i64 @"jlsys_*_46115"(i64, i64) #0 { ...

Page 377 of 505