Tutorial by Examples: am

follow these step to creating Custom Framework in Swift-IOS: Create a new project. In Xcode Choose iOS/Framework & Library/Cocoa Touch Framework to create a new framework click next and set the productName click next and choose directory to create Project there add code and resources to c...
A basic implementation for singly-linked-list in java - that can add integer values to the end of the list, remove the first value encountered value from list, return an array of values at a given instant and determine whether a given value is present in the list. Node.java package com.example.so....
You may want to read a DataFrame from a CSV (Comma separated values) file or maybe even from a TSV or WSV (tabs and whitespace separated files). If your file has the right extension, you can use the readtable function to read in the dataframe: readtable("dataset.CSV") But what if your ...
public class AmazonRootobject { public Itemsearchresponse ItemSearchResponse { get; set; } } public class Itemsearchresponse { public string xmlns { get; set; } public Operationrequest OperationRequest { get; set; } public Items Items { g...
Objective-C and Xib Add a target to an existing XCode project In the Add Target select Custom KeyBoard Add the target like this: Your project file directory should look something like this Here myKeyBoard is the name of the added Target Add new Cocoatouch file of type of type UIView and ...
To do anything with an IMAP account you need to connect to it first. To do this you need to specify some required parameters: The server name or IP address of the mail server The port you wish to connect on IMAP is 143 or 993 (secure) POP is 110 or 995 (secure) SMTP is 25 or 465 (secure) N...
roslaunch is an important tool that manages the start and stop of ROS nodes. It takes one or more "*.launch" files as arguments. For this example, I will refer to the following (as asked in this question), so how can we execute those commands consecutively & automatically : roscd ste...
Objective-C //Checking for 3-D Touch availability if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)] && (self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable)) { [self registerForPreviewingWithDelegate:self sourceVie...
The module keyword can be used to begin a module, which allows code to be organized and namespaced. Modules can define an external interface, typically consisting of exported symbols. To support this external interface, modules can have unexported internal functions and types not intended for public...
It is important to read the error response that is returned by the Google Analytics API server. In a lot of cases they can tell you exactly what is wrong. 400 invalidParameter { "error": { "errors": [ { "domain": "global", "reason&...
Public Function TblExists(sTable As String) As Boolean On Error Resume Next Dim tdf As TableDef Set tdf = CurrentDb.TableDefs(sTable) If Err.Number = 0 Then TblExists = True Else TblExists = False End If End Function
Akka Streams allows you to easily create a stream leveraging the power of the Akka framework without explicitly defining actor behaviors and messages. Every stream will have at least one Source (origin of the data) and at least one Sink (destination of the data). import akka.actor.ActorSystem impo...
An example of a constraint as expressed in the C standard is having two variables of the same name declared in a scope1), for example: void foo(int bar) { int var; double var; } This code breaches the constraint and must produce a diagnostic message at compile time. This is very usef...
// initialize library $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required|max_length[20]'); // Add validation rules for require and max $this->form_validation->set_rules('password', 'Password', 'required|matches[passw...
Aggregation is used to perform complex data search operations in the mongo query which can't be done in normal "find" query. Create some dummy data: db.employees.insert({"name":"Adma","dept":"Admin","languages":["german","f...
This is an example code to create and execute the aggregate query in MongoDB using Spring Data. try { MongoClient mongo = new MongoClient(); DB db = mongo.getDB("so"); DBCollection coll = db.getCollection("employees"); //Equivalent to $m...
import pygame file = 'some.mp3' pygame.init() pygame.mixer.init() pygame.mixer.music.load(file) pygame.mixer.music.play(-1) # If the loops is -1 then the music will repeat indefinitely.
import pygame import time pygame.mixer.init() pygame.display.init() screen = pygame.display.set_mode ( ( 420 , 240 ) ) playlist = list() playlist.append ( "music3.mp3" ) playlist.append ( "music2.mp3" ) playlist.append ( "music1.mp3" ) pygame.mixer.musi...
Preparing data: create table wf_example(i int, t text,ts timestamptz,b boolean); insert into wf_example select 1,'a','1970.01.01',true; insert into wf_example select 1,'a','1970.01.01',false; insert into wf_example select 1,'b','1970.01.01',false; insert into wf_example select 2,'b','1970.01.01...
/** * @param $client ClientInterface */ public function onAuthSuccess($client) { //Get user info /** @var array $attributes */ $attributes = $client->getUserAttributes(); $email = ArrayHelper::getValue($attributes, 'email'); //email info $id = ArrayHelper::getValue(...

Page 87 of 129