Tutorial by Examples: f

To install the Cucumber for Java plugin for IntelliJ on a Mac, Start IntelliJ IDEA. Click on the "IntelliJ IDEA" tab in the top bar. Click on "Preferences". In Preferences/Settings, click "Plugins" in the left-hand pane. Click the "Browse Repositories&quot...
A floating point type is characterised by its (decimal) digits which state the minimal precision requested. type Distance is digits 8; Earth : Distance := 40_075.017;
A fixed point type definition specifies a delta, and a range. Together, they describe how precisely real values should be approximated as they are represented by powers of two, not using floating point hardware. Shoe_Ounce : constant := 2.54 / 64.0; type Thickness is delta Shoe_Ounce range 0.00 .....
Decimal fixed point types are typically used in accounting. They are characterised by both a delta and a number of decimal digits. Their arithmetical operations reflect the rules of accounting. type Money is delta 0.001 digits 10; Oil_Price : Money := 56.402; Loss : Money := 0.002 / 3; -- ...
If you're accepting user input for folder paths, you might need to check for trailing backslashes (\) before building a file path. The FSO.BuildPath method makes this simpler: Const sourceFilePath As String = "C:\Temp" '<-- Without trailing backslash Const targetFilePath As Strin...
If you add controls from third party libraries in a C# WPF project, the XAML file will normally have lines like this one. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" This will perhaps not work with FsXaml. The designer and the compiler accepts that line, but there will prob...
Let's assume you have a ListView wich is supposed to display every User object listed under the Users Property of the ViewModel where Properties of the User object can get updated programatically. <ListView ItemsSource="{Binding Path=Users}" > <ListView.ItemTemplate> ...
Once using is used to introduce the name cout from the namespace std into the scope of the main function, the std::cout object can be referred to as cout alone. #include <iostream> int main() { using std::cout; cout << "Hello, world!\n"; }
If a using-declaration occurs at class scope, it is only allowed to redeclare a member of a base class. For example, using std::cout is not allowed at class scope. Often, the name redeclared is one that would otherwise be hidden. For example, in the below code, d1.foo only refers to Derived1::foo(c...
public abstract class BaseActivity extends AppCompatActivity { private Map<Integer, PermissionCallback> permissionCallbackMap = new HashMap<>(); @Override protected void onStart() { super.onStart(); ... } @Override public void setConten...
var fs = require("fs"); fs.readFileSync(‘abc.txt’,function(err,data){ //Reading File Synchronously if(!err) { console.log(data); } //else //console.log(err); }); console.log("something else"); Here, the program wa...
Sometimes you may want to have some login to determine where the user gets redirected to after submitting a form. Form Requests give a variety of ways. By default there are 3 variables declared in the Request $redirect, $redirectRoute and $redirectAction. On top of those 3 variables you can overr...
The minimum required files and folders for the phonegap-build project are: ─ www ├─ res │ ├─ icon │ │ ├─ android │ │ ├─ ios │ │ ├─ windows-phone │ │ &...
I hope this example will help everyone to understand how awk internal variables like NR, FNR etc change when awk is processing two files. awk '{print "NR:",NR,"FNR:",FNR,"fname:",FILENAME,"Field1:",$1}' file1 file2 NR: 1 FNR: 1 fname: file1 Field1: f1d1 NR:...
Block will capture variables that appeared in the same lexical scope. Normally these variables are captured as "const" value: int val = 10; void (^blk)(void) = ^{ val = 20; // Error! val is a constant value and cannot be modified! }; In order to modify the variable, you need to ...
Each FluentWait instance defines the maximum amount of time to wait for a condition, as well as the frequency with which to check the condition. Furthermore, the user may configure the wait to ignore specific types of exceptions whilst waiting, such as NoSuchElementExceptions when searching for an e...
from bs4 import BeautifulSoup import requests main_url = "https://fr.wikipedia.org/wiki/Hello_world" req = requests.get(main_url) soup = BeautifulSoup(req.text, "html.parser") # Finding the main title tag. title = soup.find("h1", class_ = "firstHeading&qu...
import time def timer(func): def inner(*args, **kwargs): t1 = time.time() f = func(*args, **kwargs) t2 = time.time() print 'Runtime took {0} seconds'.format(t2-t1) return f return inner @timer def example_function(): #do stuff exa...
Hiding Softkeyboard is a basic requirement usually when working with EditText. The softkeyboard by default can only be closed by pressing back button and so most developers use InputMethodManager to force Android to hide the virtual keyboard calling hideSoftInputFromWindow and passing in the token o...
Touch event handler for surfaces (e.g. SurfaceView, GLSurfaceView, and others): import android.app.Activity; import android.os.Bundle; import android.view.MotionEvent; import android.view.SurfaceView; import android.view.View; public class ExampleClass extends Activity implements View.OnTouc...

Page 399 of 457