Tutorial by Examples: f

Float data type The float data type is a single-precision 32-bit IEEE 754 floating point. Float overflow Maximum possible value is 3.4028235e+38 , When it exceeds this value it produces Infinity float f = 3.4e38f; float result = f*2; System.out.println(result); //Infinity Float Und...
We may forget to apply the Antiforgery attribute for each POST request so we should make it by default. This sample will make sure Antiforgery filter will always be applied to every POST request. Firstly create new AntiForgeryTokenFilter filter: //This will add ValidateAntiForgeryToken Attribute t...
The self axis only contains the context node itself. The expression . is a shortcut for self::node() and always matches the context node. The . shortcut is useful for enumerating descendants of the context node. The following expressions are equivalent: .//span self::node()/descendant-or-self::nod...
The following-sibling and preceding-sibling axes contain the siblings before or after the context node, and the following and preceding axes contain all nodes in the document before or after the context node, but: None of these axes contain attribute or namespace nodes. The following axis doesn'...
Why do we need this? The current way to do unit testing in Xamarin.Forms is via a platform runner, so your test will have to run within an ios, android, windows or mac UI environment : Running Tests in the IDE Xamarin also provides awesome UI testing with the Xamarin.TestCloud offering, but when ...
To add to the first example, in order to test navigation statements that occurs within the application, we need to provide the ViewModel with a hook to the Navigation. To achieve this: Add the package SpecFlow.Xamarin.Forms.IViewModel from nuget to your PCL Xamarin.Forms project Implement the IV...
First you need to implement Realm at the start of your class using Realms; Then to print the location to the console : Console.WriteLine( RealmConfiguration.PathToRealm() ); Or if you're using DefaultConfiguration, you can use : Console.WriteLine( RealmConfiguration.DefaultConfiguration.Dat...
Memoizing is basically a way to cache method results. This can be useful when a method is often called with the same arguments and the calculation of the result takes time, therefore increasing performance. Starting from Groovy 2.2, methods can be annoted with the @Memoized annotation. Imagine the...
Step 1: Create a bluemix account Create an account at https://console.ng.bluemix.net/registration/ This will set you up with a 30 day trial. You don't have to pay anything for the free resources and you don't have to set up billing until the end of your trial (though not all services will be avail...
Microsoft Command Prompt is a command-line interpreter (CLI) for the Windows operating systems. A CLI is program intended primarily to read operating system instructions typed on a keyboard by the user. It is therefore addressed also as a command-line interface, to contrast it with graphical inter...
The RequiredFieldValidator control ensures that the required field is not empty. It is generally tied to a text box to force input into the text box. The syntax of the control is as given: <asp:RequiredFieldValidator ID="rfvcandidate" runat="server" ControlToValidate =&...
To turn a Javascript Date object into a moment (moment object) just call moment and pass the Date as a argument moment(new Date()); // Moment {_isAMomentObject: true, _i: Sun Jul 31 2016 11:08:02 GMT+0300 (Jerusalem Daylight Time), _isUTC: false, _pf: Object, _locale: Locale…} To turn the momen...
Xamarin sturio opens Xib file and Storyboards by default in the Xamarin Designer. User can right click on the file and Open With -> `Xcode Interface Builder'
When only a single argument is supplied to numpy's where function it returns the indices of the input array (the condition) that evaluate as true (same behaviour as numpy.nonzero). This can be used to extract the indices of an array that satisfy a given condition. import numpy as np a = np.arang...
Installation npm install forever -g cd /node/project/directory Usages forever start app.js
SOAP is an acronym for Simple Object Access Protocol which defines a protocol that is used to exchange data via a Remote Procedure Call (RPC) with other SOAP services or clients. It is available in two version: SOAP 1.1 [IETF] SOAP 1.2 [IETF] SOAP 1.2 obsoletes SOAP 1.1 it is therefore recomm...
1. Logs: By default, Heroku allows only 1500 lines of consolidated logs. When more than 1500 lines of logs are required, one has to use addons provided Heroku. 2. Router: HTTP request have 30s timeout for initial response and 55s timeout thereafter. Maximum of 1MB buffer allowed for response. 3....
To use the value stored in a variable, use the dollar sign followed by the variable name enclosed by parentheses or curly braces. x = hello y = $(x) # y now contains the value "hello" y = ${x} # parentheses and curly braces are treated exactly the same If a variable's name is only ...
The below example widget demonstrates how to format individual cells of a TreeView column conditionally, depending on value of the field in the particular cell. If value of field is negative, then it'll be displayed in red color and minus symbol will be hidden, otherwise it'll be displayed in normal...

Page 287 of 457