Tutorial by Examples

The common error using ssh is to see the error like @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone c...
The pause() method is one of the easiest solution Protractor provides you to debug the code, in order to use it you have to add it in your code where you want to pause the execution.Once the execution is in paused state: You can use C (type C) to move forward. Be careful while using it, you hav...
Class Car Private wheels_ Private distances_ ' Property getter Public Property Get Wheels() Wheels = wheels_ End Property ' Property setter Public Property Let Wheels(v) wheels_ = v End Property ' Parameterless Constructo...
' Initialize the object Dim myCar Set myCar = new Car ' Setting a property myCar.Wheels = 4 ' Getting a property value wscript.echo myCar.Wheels ' Using a subroutine in a class myCar.Drive 10 myCar.Drive 12 ' Using a function in a class wscript.echo myCar.GetTotalDistance() ' r...
' Making a factory with parameter to the class Public Function new_Car(wheels) Set new_Car = New Car new_Car.Wheels = wheels End Function ' Creating a car through a factory Dim semiTrailer Set semiTrailer = new_Car(18)
Conversion SpecifierType of ArgumentDescriptioni, dintprints decimaluunsigned intprints decimalounsigned intprints octalxunsigned intprints hexadecimal, lower-caseXunsigned intprints hexadecimal, upper-casefdoubleprints float with a default precision of 6, if no precision is given (lower-case used f...
Web views are useful to load locally generated HTML strings. NSString *html = @"<!DOCTYPE html><html><body>Hello World</body></html>"; [webView loadHTMLString:html baseURL:nil]; Swift let htmlString = "<h1>My First Heading</h1><p&gt...
// long form String sayHello(String name){ "Hello, ${name ? name : 'stranger'}." } // elvis String sayHello(String name){ "Hello, ${name ?: 'stranger'}." } Notice that the "elvis" format omits the "true" term because the original comparison...
The magrittr package contains a compound assignment infix-operator, %<>%, that updates a value by first piping it into one or more rhs expressions and then assigning the result. This eliminates the need to type an object name twice (once on each side of the assignment operator <-). %<&gt...
You might wish to install RStudio after you have installed R. RStudio is a development environment for R that simplifies many programming tasks. Windows only: Visual Studio (starting from version 2015 Update 3) now features a development environment for R called R Tools, that includes a live inter...
This example shows the process from designing the shape you want to drawing it on a view. A specific shap is used but the concepts you learn can be applied to any shape. How to draw a Bézier path in a custom view These are the main steps: Design the outline of the shape you want. Divide the ou...
Useful information The very beginning of the text field text: let startPosition: UITextPosition = textView.beginningOfDocument The very end of the text field text: let endPosition: UITextPosition = textView.endOfDocument The currently selected range: let selectedRange: UITextRange? = textV...
The example below shows how to add a navigation bar button (called a UIBarButtonItem) in the Interface Builder. Add a Navigation Controller to your Storyboard Select your View Controller and then in the Xcode menu choose Editor > Embed In > Navigation Controller. Alternatively, you could ...
Test methods often need data to be tested with. To test some methods completely you need to provide different data sets for every possible test condition. Of course, you can do it manually using loops, like this: ... public function testSomething() { $data = [...]; foreach($data as $dat...
Below is an example of a pure Xamarin Forms custom control. No custom rendering is being done for this but could easily be implemented, in fact, in my own code, I use this very same control along with a custom renderer for both the Label and Entry. The custom control is a ContentView with a Label, ...
There are a couple of default recognizers available in Xamarin.Forms, one of them is the TapGestureRecognizer. You can add them to virtually any visual element. Have a look at a simple implementation which binds to an Image. Here is how to do it in code. var tappedCommand = new Command(() => {...
In order to make an Image (or any other visual element) zoomable we have to add a PinchGestureRecognizer to it. Here is how to do it in code: var pinchGesture = new PinchGestureRecognizer(); pinchGesture.PinchUpdated += (s, e) => { // Handle the pinch }; image.GestureRecognizers.Add(pi...
When you have a zoomed Image (or other content) you may want to drag around the Image to show all of its content in the zoomed in state. This can be achieved by implementing the PanGestureRecognizer. From code this looks like so: var panGesture = new PanGestureRecognizer(); panGesture.PanUpdated...
EntryPage.xaml: <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:vm="clr-namespace:MyAssembly.ViewModel;a...
Redis keys are binary-safe, so literally anything can be used as a key. The only limitations are that they must be less than 512MB. Examples of valid keys: 7 ++++ `~!@#$%^&*()-_=+ user:10134 search/9947372/?query=this%20is%20a%28test%29%20query <div id="div64"> Any othe...

Page 525 of 1336