Tutorial by Examples: er

You can use the ng generate or ng g command to generate Angular building blocks (components, services, pipes, etc.). You can find all possible blueprints in the table below: ScaffoldUsageShortenedComponentng generate component component-nameng g c component-nameDirectiveng generate directive direc...
AppDelegate contains your app’s startup code. It responds to key changes in the state of your app. Specifically, it responds to both temporary interruptions and to changes in the execution state of your app, such as when your app transitions from the foreground to the background. It responds to ...
Modern Objective C provides ways to reduce amount of code you need to initialize some common types. This new way is very similar to how NSString objects are initialized with constant strings. NSNumber Old way: NSNumber *number = [NSNumber numberWithInt:25]; Modern way: NSNumber *number = @25;...
In modern Objective C syntax you can get values from NSArray and NSDictionary containers using container subscripting. Old way: NSObject *object1 = [array objectAtIndex:1]; NSObject *object2 = [dictionary objectForKey:@"Value"]; Modern way: NSObject *object1 = array[1]; NSObject *o...
For this example I have a controlled room with a single BLE device enable. Your class should extend CBCentralManagerDelegate. Implement the method: centralManagerDidUpdateState(_ central: CBCentralManager). Use global queue to not freeze the screen while searching for a device. Instantiate CBC...
To Get context: NSManagedObjectContext *context = ((AppDelegate*)[[UIApplication sharedApplication] delegate]).persistentContainer.viewContext; To fetch data: NSFetchRequest<EntityName *> *fetchRequest = [EntityName fetchRequest]; NSError *error ; NSArray *resultArray= [context executeF...
Just use default DividerItemDecoration class : NavigationView navigationView = (NavigationView) findViewById(R.id.navigation); NavigationMenuView navMenuView = (NavigationMenuView) navigationView.getChildAt(0); navMenuView.addItemDecoration(new DividerItemDecoration(context,DividerItemDecoration....
HTML : <li class="item" ng-repeat="schedule in Schedules | filter:scheduleSearch | limitTo:numberOfItemsToDisplay"> Display some data </li> <ion-infinite-scroll on-infinite="addMoreItem()" ng-if="Schedules.length > numberOfItemsToDisplay&...
The function takes the argument of the current node index, adjacency list (stored in vector of vectors in this example), and vector of boolean to keep track of which node has been visited. void dfs(int node, vector<vector<int>>* graph, vector<bool>* visited) { // check whethe...
http://ibm.com/systems/z/os/zos/library/bkserv/
Adapters are used to convert the interface of a given class, known as an Adaptee, into another interface, called the Target. Operations on the Target are called by a Client, and those operations are adapted by the Adapter and passed on to the Adaptee. In Swift, Adapters can often be formed through ...
Right click in MAIN folder > New > Folder > Assets Folder. Assets folder will be under MAIN folder with the same symbol as RES folder. In this example I put a font file.
Assuming we have a working laravel application running in, say, "mylaravel.com",we want our application to show a "Hello World" message when we hit the URL http://mylaravel.com/helloworld . It involves the creation of two files (the view and the controller) and the modification o...
Controller Function Controller function is nothing but just a JavaScript constructor function. Hence, when a view loads the function context(this) is set to the controller object. Case 1 : this.constFunction = function() { ... } It is created in the controller object, not on $scope. views can ...
You can use cell references without row numbers. For instance, the formula =sum(C:C) will add up all the values in column C of the active sheet. This is helpful when you are adding and removing rows but don't want to update your formulas each time. There are some instances when using this whole co...
Pack your com.stackoverflow.${whatever} clases on a jar called stackoverflow.jar Create folder com/stackoverflow/main on ${WILDFLY_HOME}/modules Put the jar on the last dir Create a file called module.xml with the following content: <?xml version="1.0" encoding="UTF-8"...
For some reason you develop a new version of com.stackoverflow (say version 1.1), then you should: Create folder com/stackoverflow/1.1 on ${WILDFLY_HOME}/modules Put the new jar on last dir Create file module.xml on last dir with the following content <?xml version="1.0" encodin...
Redis provides the SCAN command to iterate over the keys in the database matching a particular pattern. Redis supports glob style pattern matching in the SCAN command. The SCAN command provides a cursor-based iterator over the Redis keyspace. The iterative call sequence to SCAN starts with the us...
ICalculator.aidl // Declare any non-default types here with import statements interface ICalculator { int add(int x,int y); int sub(int x,int y); } AidlService.java public class AidlService extends Service { private static final String TAG = "AI...
Generic type parameters are commonly defined at the class or interface level, but methods and (rarely) constructors also support declaring type parameters bound to the scope of a single method call. class Utility // no generics at the class level { @SafeVarargs public static <T> T ...

Page 373 of 417