Tutorial by Examples: co

Unfortunately, DOSKEY macro doesn't support comment, but there's a workaround. ;= Comment ;= Comment ;= Remember to end your comment with ;= ;=
class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var firstTabNavigationController : UINavigationController! var secondTabNavigationControoller : UINavigationController! var thirdTabNavigationController : UINavigationController! var fourth...
Comparison of access controls of Java against Ruby: If method is declared private in Java, it can only be accessed by other methods within the same class. If a method is declared protected it can be accessed by other classes which exist within the same package as well as by subclasses of the class...
Spaghetti code means a code snippet that uses many, and often confusing structures. Such as GOTOs, exceptions and inconsistent code. Examples and Solutions Example A @echo off set /a counter=0 :Loop set /a counter=%counter% + 1 echo %counter% if %counter% equ 10 goto :exit goto :Loop ...
An entity represents an object of a game like a player figure or an enemy figure. Since this object does not do much without arms and legs we can add the components to this. To create this system apple has the GKEntity and GKComponent classes. Lets assume we have the following classe for the follow...
class MyClass @Inject constructor(@Named val answer: Int){ /* The nuts and bolts of your class */ }
The Rule An e-commerce have a shipping rule based on zipcodes. All shipping to California is eligible to free shipping. All other west cost are US$ 10.00 and The rest of USA is US$ 20.00 How to apply technique We all know there are lots of zipcodes by state, and we are not going to use them all. ...
The rule Another common case we usually find and where it is useful to apply this technique are progressive rates based on values. An e-commerce has an offer that is like: 10% off for orders above US$ 80.00 15% off for orders above US$ 150.00 25% off for orders above US$ 200.00 How to appl...
<!-- : Comment This works with both batch script and WSF. The closing tag(-->), only works in WSF. CodeSucessful in both batch and WSF?<!--: CommentTrue<!--: Comment -->False - The closing tag only works for WSF-->False
Suppose we have an API which allows us to get object metadata in single request (getAllPets), and other request which have full data of single resource (getSinglePet). How we can query all of them in a single chain? public class PetsFetcher { static class PetRepository { List<Integer&g...
LibGDX is designed in a way that you can write the same code and deploy it on several different platforms. Yet, there are times when you want to get access to platform specific code. For an instance, if you have leaderboards and achievements in your game, you may want to use platform-specific tools ...
In this example, user BoeNoe showed how to use the command xcopy to copy files. There is also an extra command called copy. Here is a simple example: copy foo.ext bar.ext This copies foo.ext to bar.ext, and create bar.ext when it doesn't exist. We can also specify paths to the file, but it is a...
function sum(numbers) { var total = 0; for (var i = numbers.length - 1; i >= 0; i--) { total += numbers[i]; } return total; } It's a procedural code with mutations (over total).
# Create 100 standard normals in a vector x <- rnorm(100, mean = 0, sd = 1) # Find the lenght of a vector length(x) # Compute the mean mean(x) # Compute the standard deviation sd(x) # Compute the median value median(x) # Compute the range (min, max) range(x) # Sum an itera...
Visual Studio Community 2017 Free, fully-featured IDE for students, open-source and individual developer Visual Studio Professional 2017 Professional developer tools, services, and subscription benefits for small teams Visual Studio Enterprise 2017 End-to-end solution to meet demand...
service.ts: import { Injectable } from '@angular/core'; @Injectable() export class AppState { public mylist = []; } parent.component.ts: import {Component} from '@angular/core'; import { AppState } from './shared.service'; @Component({ selector: 'parent-example', templ...
parent.component.ts: import {Component} from '@angular/core'; @Component({ selector: 'parent-example', templateUrl: 'parent.component.html', }) export class ParentComponent { mylistFromParent = []; add() { this.mylistFromParent.push({"itemName":"Something&...
Theme: A theme is required for material components to work properly within the application. Angular Material 2 provides four prebuilt themes: deeppurple-amber indigo-pink pink-bluegrey purple-green If you are using Angular CLI, you can import one of the prebuilt themes in style.css. @i...
To create a component we add @Component decorator in a class passing some parameters: providers: Resources that will be injected into the component constructor selector: The query selector that will find the element in the HTML and replace by the component styles: Inline styles. NOTE: DO NOT us...
hero.component.html <form (ngSubmit)="submit($event)" [formGroup]="form" novalidate> <input type="text" formControlName="name" /> <button type="submit">Show hero name</button> </form> hero.component.ts import...

Page 245 of 248