Tutorial by Examples: bi

SRXMPPDemo Download the example and all the classes here - https://github.com/SahebRoy92/SRXMPPDemo A demo on XMPP in Objective C, with various simple and complex features implemented in it. All the features of XMPP is done by "in band" xmpp functions. Few features this project contains...
You can compare BigIntegers same as you compare String or other objects in Java. For example: BigInteger one = BigInteger.valueOf(1); BigInteger two = BigInteger.valueOf(2); if(one.equals(two)){ System.out.println("Equal"); } else{ System.out.println("Not Equal"...
WITH CTE (StudentId, Fname, LName, DOB, RowCnt) as ( SELECT StudentId, FirstName, LastName, DateOfBirth as DOB, SUM(1) OVER (Partition By FirstName, LastName, DateOfBirth) as RowCnt FROM tblStudent ) SELECT * from CTE where RowCnt > 1 ORDER BY DOB, LName This example uses a Common Table ...
A namespace is a URI, but to avoid verbosity, prefixes are used as a proxy. In the following example, the prefix my-prefix is bound to the namespace http://www.example.com/my-namespace by using the special attribute xmlns:my-prefix (my-prefix can be replaced with any other prefix): <?xml versio...
One (or two) of the coolest new features in recent Xcode releases are the IBInspectable properties and IBDesignable UIViews. These have nothing to do with the functionality of your application but instead impact the developer experience in Xcode. The goal is to be able to visually inspect custom v...
C# has several operators that can be combined with an = sign to evaluate the result of the operator and then assign the result to the original variable. Example: x += y is the same as x = x + y Assignment operators: += -= *= /= %= &= |= ^= <<= >>=
def numberOrCharacterSwitch(toggleNumber: Boolean)(number: Int)(character: Char): String = if (toggleNumber) number.toString else character.toString // need to explicitly specify the type of the parameter to be curried // resulting function signature Boolean => String val switchBetween3A...
If you want to calculate with BigDecimal you have to use the returned value because BigDecimal objects are immutable: BigDecimal a = new BigDecimal("42.23"); BigDecimal b = new BigDecimal("10.001"); a.add(b); // a will still be 42.23 BigDecimal c = a.add(b); // c will be ...
There are two ways you can bind a GridView. You can either manually do it by setting the DataSource property and calling DataBind(), or you can use a DataSourceControl such as a SqlDataSource. Manual Binding Create your GridView: <asp:GridView ID="gvColors" runat="server"&g...
In PHP 5.3+ and above you can utilize late static binding to control which class a static property or method is called from. It was added to overcome the problem inherent with the self:: scope resolutor. Take the following code class Horse { public static function whatToSay() { echo ...
The combined assignment operators are a shortcut for an operation on some variable and subsequently assigning this new value to that variable. Arithmetic: $a = 1; // basic assignment $a += 2; // read as '$a = $a + 2'; $a now is (1 + 2) => 3 $a -= 1; // $a now is (3 - 1) => 2 $a *= 2; //...
The FlagsAttribute should be used whenever the enumerable represents a collection of flags, rather than a single value. The numeric value assigned to each enum value helps when manipulating enums using bitwise operators. Example 1 : With [Flags] [Flags] enum Colors { Red=1, Blue=2, ...
Using subprocess.Popen give more fine-grained control over launched processes than subprocess.call. Launching a subprocess process = subprocess.Popen([r'C:\path\to\app.exe', 'arg1', '--flag', 'arg']) The signature for Popen is very similar to the call function; however, Popen will return immedi...
Git is pretty good at identifying binary files, but you can explicitly specify which files are binary. Create a .gitattributes file in the project root containing: *.png binary binary is a built-in macro attribute equivalent to -diff -merge -text.
Bitwise operators perform operations on bit values of data. These operators convert operands to signed 32-bit integers in two's complement. Conversion to 32-bit integers Numbers with more than 32 bits discard their most significant bits. For example, the following integer with more than 32 bits i...
BigInteger is in an immutable object, so you need to assign the results of any mathematical operation, to a new BigInteger instance. Addition: 10 + 10 = 20 BigInteger value1 = new BigInteger("10"); BigInteger value2 = new BigInteger("10"); BigInteger sum = value1.add(value...
Data Model public class Item { private String name; public String getName() { return name; } public void setName(String name){ this.name = name; } } Layout XML <?xml version="1.0" encoding="utf-8"?> <layout xmlns:an...
Immutable types are types that when changed create a new version of the object in memory, rather than changing the existing object in memory. The simplest example of this is the built-in string type. Taking the following code, that appends " world" onto the word "Hello" string ...
Detailed instructions on getting openerp set up or installed in Debian/Ubuntu. To install from source code, we need Python 2.7, Git and a PostgreSQL database: $ sudo apt-get install git python-pip python2.7-dev -y $ sudo apt-get install postgresql -y $ sudo su -c "createuser -s $(whoami)&qu...
In a Service Provider register method we can bind an interface to an implementation: public function register() { App::bind( UserRepositoryInterface::class, EloquentUserRepository::class ); } From now on, everytime the app will need an instance of UserRepositoryInterface, Larave...

Page 4 of 29