Tutorial by Examples

Core Graphics context A Core Graphics context is a canvas which we can draw in it and set some properties like the line thickness. Making a context To make a context, we use the UIGraphicsBeginImageContextWithOptions() C function. Then, when we are done with drawing, we just call UIGraphicsEn...
Swift let image = UIGraphicsGetImageFromCurrentImageContext() imageView.image = image //assuming imageView is a valid UIImageView object Objective-C UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); imageView.image = image; //assuming imageView is a valid UIImageView object
ASP.NET validation controls validate the user input data to ensure that useless, unauthenticated, or contradictory data don't get stored. ASP.NET provides the following validation controls: RequiredFieldValidator RangeValidator CompareValidator RegularExpressionValidator CustomValidator Val...
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 =&...
The RangeValidator control verifies that the input value falls within a predetermined range. It has three specific properties: PropertiesDescriptionTypeIt defines the type of the data. The available values are: Currency, Date,MinimumValueIt specifies the minimum value of the range.MaximumValueIt s...
The CompareValidator control compares a value in one control with a fixed value or a value in another control. It has the following specific properties: PropertiesDescriptionTypeIt specifies the data type.ControlToCompareIt specifies the value of the input control to compare with.ValueToCompareIt ...
The RegularExpressionValidator allows validating the input text by matching against a pattern of a regular expression. The regular expression is set in the ValidationExpression property. The following table summarizes the commonly used syntax constructs for regular expressions: Character EscapesDe...
The ValidationSummary control does not perform any validation but shows a summary of all errors in the page. The summary displays the values of the ErrorMessage property of all validation controls that failed validation. The following two mutually inclusive properties list out the error message: S...
Complex pages have different groups of information provided in different panels. In such situation, a need might arise for performing validation separately for separate group. This kind of situation is handled using validation groups. To create a validation group, you should put the input controls ...
You may wish to update your custom setting's during the execution of your code, to switch off validation or workflow rules. In the below code, I have created a Schedulable Apex Class which will update the Close Date of any Opportunities whose Close Date is less than or equal to 6 days from the curr...
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...
For the purpose of sending push notifications to cordova apps. The first step is to obtain a device token. A "device token" is specific to each device and each project. Pre-requisite: Google Cloud Messaging Project Number For this go to Google Developer Console and create a new ...
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'
The Bridge pattern is one of the most basic Inversion of Control design patterns. For Xamarin, this pattern is used to reference platform-dependent code from a platform-independent context. For example: using Android's AlertDialog from a Portable Class Library or Xamarin Forms. Neither of those cont...
The Service Locator design pattern is very nearly dependency injection. Like the Bridge Pattern, this pattern can be used to reference platform-dependent code from a platform-independent context. Most interestingly, this pattern relies on the singleton pattern -- everything you put into the service ...
PSR-5 proposes a form of Generics-style notation for collections. Generics Syntax Type[] Type<Type> Type<Type[, Type]...> Type<Type[|Type]...> Values in a Collection MAY even be another array and even another Collection. Type<Type<Type>> Type<Type<Type[,...
To create a tooltip, we only need to add data-toggle="tooltip" attribute and a title to the HTML element that will have the tooltip. Title attribute is used to specify the text that is displayed inside the tooltip. <span data-toggle="tooltip" title="Hello world!"&gt...
Mediator pattern defines an object (Mediator) that encapsulates how a set of objects interact. It enables many-to-many communication. UML diagram: Key components: Mediator: Defines an interface for communication between Colleagues. Colleague: Is an abstract class, which defines the events to b...
The Monostate pattern is usually referred to as syntactic sugar over the Singleton pattern or as a conceptual Singleton. It avoids all the complications of having a single instance of a class, but all the instances use the same data. This is accomplished mostly by using static data members. One o...

Page 851 of 1336