Tutorial by Examples: cet

You can qualify a whole folder folder for a specific device type, its files will override the ones outside it on that device: / DeviceFamily-Mobile PageOfEden.xaml MainPage.xaml MainPage.xaml MainPage.xaml.cs PageOfEden.xaml PageOfEden.xaml.cs Files inside the qualifying folder won...
function calculatorService() { const service = {}; service.add = function(a,b) { return a + b } return service; } angular.module('app').factory('calculatorService', calculatorService); Testing describe('calculator service', function() { var calcula...
Azure SQL Database has different editions and performance tiers. You can find version, edition (basic, standard, or premium), and service objective (S0,S1,P4,P11, etc.) of SQL Database that is running as a service in Azure using the following statements: select @@version SELECT DATABASEPROPERTYEX...
You can scale-up or scale-down Azure SQL database using ALTER DATABASE statement: ALTER DATABASE WWI MODIFY (SERVICE_OBJECTIVE = 'P6') -- or ALTER DATABASE CURRENT MODIFY (SERVICE_OBJECTIVE = 'P2') If you try to change service level while changing service level of the current database is sti...
Breadth-first-search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a 'search key') and explores the neighbor nodes first, before moving to the next level neighbors. BFS was inve...
In some scenarios, we might want to narrow down the results being shown by PlaceAutocomplete to a specific country or maybe to show only Regions. This can be achieved by setting an AutocompleteFilter on the intent. For example, if I want to look only for places of type REGION and only belonging to I...
REPLACE ==magic-number== BY ==65535==.
Most Rx operators take an optional scheduler on which to schedule their future iterations. If not supplied they will use their default configured scheduler. Supplying a scheduler can be useful for testing purposes in which we like to talk about virtual time instead of real time for speed of test exe...
Donald Knuth is often quoted as saying this: "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered....
SELECT COALESCE(a, b, c, d, 5) FROM (SELECT NULL A, NULL b, NULL c, 4 d FROM DUAL); COALESCE(A,B,C,D,5)4 In some case, using COALESCE with two parameters can be faster than using NVL when the second parameter is not a constant. NVL will always evaluate both parameters. COALESCE will stop a...
By default, floating point operations on float and double do not strictly adhere to the rules of the IEEE 754 specification. An expression is allowed to use implementation-specific extensions to the range of these values; essentially allowing them to be more accurate than required. strictfp disable...
When you want for example enforce the use of the parameter Password if the parameter User is provided. (and vise versa) Function Do-Something { Param ( [Parameter(Mandatory=$true)] [String]$SomeThingToDo, [Parameter(ParameterSetName="Credentials", man...
Let's take this example without using generics protocol JSONDecodable { static func from(_ json: [String: Any]) -> Any? } The protocol declaration seems fine unless you actually use it. let myTestObject = TestObject.from(myJson) as? TestObject Why do you have to cast the result to T...
react-native bundle --platform android --dev false --entry-file index.android.js \ --bundle-output android/app/src/main/assets/index.android.bundle \ --assets-dest android/app/src/main/res/
Now that you have every connection ready, you have to obtain an instance of this interface and invoke its methods to obtain the object you need: VehicleComponent component = Dagger_VehicleComponent.builder().vehicleModule(new VehicleModule()).build(); vehicle = component.provideVehicle(); Toast.m...
Go to Hardware -> Touch Pressure: To simulate a normal press, use Shift-Command-1 and a deep one, Shift-Command-2. If your MacBook has a Force Touch trackpad, you could use your trackpad force to simulate 3D / Force Touch.
Reference types are comprised of both a reference to a memory area, and a value stored within that area. This is analogous to pointers in C/C++. All reference types are stored on what is known as the heap. The heap is simply a managed area of memory where objects are stored. When a new object is ...
On the machine where you'd like to make the backup, jump to the Redis CLI: redis-cli Password? If your master Redis DB (the one you want to replicate) has a password: config set masterauth <password> Start replication Run the following to begin replication: SLAVEOF <host> <...
Now open the document using OpenXML, you must add an imagePart that references the picture object to the MainDocumentPart object by using a file stream, and get the ID of the image string temp; MainDocumentPart mainPart = document.MainDocumentPart; ImagePart ima...
Methods used: .GetFolder(strPath) - Returns an object referring to the path We can set an object reference to a folder using the getFolder method and perform different operations on them. Code: Dim strFolderPath, objFso, objFolder strFolderPath = "C:\Users\GS\Desktop\LogsFolder" Se...

Page 3 of 4