Tutorial by Examples: and

Registration in AppDelegate import UserNotifications in didFinishLaunchingWithOptions method, UNUserNotificationCenter.current().requestAuthorization(options: [.alert,.sound,.badge]) { (granted, error) in // Here you can check Request is Granted or not. } Create and Schedule notificat...
This is an example of Viz-Charts with line-chart with filters. There are a lot of techniques this is one to solve the filtering issue. Point to be noted is that you need to bind the Dataset of VizFrame by its ID and then apply the filtering on the FlattenedDataset   In the controller: // defining...
Save and run a test pull request and your should no longer have any further problems with having Jenkins use SSH on your Windows build machine.
Even when sockets are in "blocking" mode, the read and write operations on them do not necessarily read and write all the data available to be read or written. In order to write an entire buffer into a socket, or read a known quantity of data from a socket, they must be called in a loop. ...
Sub DisplayExcelVersions() MsgBox "The version of Excel is " & Application.Version MsgBox "The version of the VBE is " & Application.VBE.Version End Sub The use of the Application.Version property is useful for ensuring code only operates on a compatible...
To encrypt data with a public key: final Cipher rsa = Cipher.getInstance("RSA"); rsa.init(Cipher.ENCRYPT_MODE, keyPair.getPublic()); rsa.update(message.getBytes()); final byte[] result = rsa.doFinal(); System.out.println("Message: " + message); System.out.println("...
There are basically two operators for date, datetime values. + and - are overloaded (probably a C term) to do date/datetime math: OperatorDescription+Adds days (date) or seconds (datetime) to a date/datetime value.-Gets the difference of two date/datetime values. Subtracts days (date) or seconds (d...
Sources and sinks are objects that know how to open streams. BytesCharsReadingByteSourceCharSourceWritingByteSinkCharSink Creating sources and sinks Note: for all examples, consider UTF_8 as if the following import is set: import static java.nio.charset.StandardCharsets.UTF_8; Reading from a ...
set var1=123456789 set var2=abcdef call :specialvars echo %var1%, %var2% rem More code... :specialvars setlocal set var1=987654321 set var2=fedcba endlocal goto :eof When inside the section setlocal , endlocal section, variables are seperate from the caller's variables, hence why %var...
When a Component is resolved from the Windsor container it must have a definition of the scope it is in. By scope meaning if and how it is reused and when to release the object for the Garbage Collector to destroy. This is the LifeStlye of the Component. The way to specify a LifeStyle is by registe...
The idea is to have one or more control machines from where you can issue ad-hoc commands to remote machines (via ansible tool) or run a sequenced instruction set via playbooks (via ansible-playbook tool). Basically, we use Ansible control machine, this will typically be your desktop, laptop or s...
The try...catch...finally statement combines exception handling with clean-up code. The finally block contains code that will be executed in all circumstances. This makes them suitable for resource management, and other kinds of cleanup. Try-finally Here is an example of the simpler (try...finally...
Maya commands come in a very small range of forms. Recognizing the form that a command takes is useful for working with new commands. Simple commands The most basic form is simply <command>(<object>) where is the function you're calling and is the string name of an object you are ...
public async Task SetProductInactiveAsync(int productId) { using (IDbConnection con = new SqlConnection("myConnectionString")) { await con.ExecuteAsync("SetProductInactive", new { id = productId }, commandType: CommandType.StoredProcedure); ...
This will be a relatively comprehensive tutorial of how to write a command line tool to print the weather from the zip code provided to the command line tool. The first step is to write the program in ruby to do this action. Let's start by writing a method weather(zip_code) (This method requires the...
What is Dagger 2 ? The website describes itself as: Dagger is a fully static, compile-time dependency injection framework The library makes it easy to model dependency graphs as well as to reuse objects. Since reflection is only used at compile time as part of the annotation processing Dagger...
Switches can switch on tuples: public typealias mdyTuple = (month: Int, day: Int, year: Int) let fredsBirthday = (month: 4, day: 3, year: 1973) switch theMDY { //You can match on a literal tuple: case (fredsBirthday): message = "\(date) \(prefix) the day Fred was born"...
Create a simple servlet: package web.example; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse...
First, you need to install pry-byebug gem. Run this command: $ gem install pry-byebug Add this line at the top of your .rb file: require 'pry-byebug' Then insert this line wherever you want a breakpoint: binding.pry A hello.rb example: require 'pry-byebug' def hello_world puts &qu...
If you are tired of using long commands in bash you can create your own command alias. The best way to do this is to modify (or create if it does not exist) a file called .bash_aliases in your home folder. The general syntax is: alias command_alias='actual_command' where actual_command is the c...

Page 113 of 153