Tutorial by Examples

//set the formatting options ExcelTextFormat format = new ExcelTextFormat(); format.Delimiter = ';'; format.Culture = new CultureInfo(Thread.CurrentThread.CurrentCulture.ToString()); format.Culture.DateTimeFormat.ShortDatePattern = "dd-mm-yyyy"; format.Encoding = new UTF8Encoding(); ...
In the file myConfig.groovy is the following content. message = 'Hello World!' aNumber=42 aBoolean=false aList=["apples", "grapes", "oranges"] Then in your main script you create a ConfigSlurper for your myConfig.groovy file which is really just another groovy sc...
public String getCitiesByCountry(String countryName) throws MalformedURLException, IOException { //Code to make a webservice HTTP request String responseString = ""; String outputString = ""; String wsURL = "http://www.webservicex.com/globalweather.asm...
Define a new visitor class by overriding some of the methods of ExpressionVisitor: class PrintingVisitor : ExpressionVisitor { protected override Expression VisitConstant(ConstantExpression node) { Console.WriteLine("Constant: {0}", node); return base.VisitConstant(...
Go to https://www.mozilla.org/firefox/new/. 1.Click on Download button. 2.An executable file will be downloaded. 3.Double click on the .exe file and click run. 4.Finish the setup. 5.Select the option of "Maintain shortcut on the desktop".
For iterating more than two lists simultaneously within list comprehension, one may use zip() as: >>> list_1 = [1, 2, 3 , 4] >>> list_2 = ['a', 'b', 'c', 'd'] >>> list_3 = ['6', '7', '8', '9'] # Two lists >>> [(i, j) for i, j in zip(list_1, list_2)] [(1, '...
Go to https://ftp.mozilla.org/pub/firefox/releases/ Find the list of older versions in the above link. Select the operating system you want to install in. Select the Language you want to install in. An executable will be downloaded. Run the .exe file to install the firef...
The following tests range A2 to A7 for duplicate values. Remark: This example illustrates a possible solution as a first approach to a solution. It's faster to use an array than a range and one could use collections or dictionaries or xml methods to check for duplicates. Sub find_duplicates() ...
To test an add-on you are developing, you will likely desire to install it in Firefox temporarily. You can do so by loading it as a Temporary Add-on. To do so: Go to about:debugging Click on "Load Temporary Add-on" In the file picker, navigate to the directory containing the add-on f...
Create vectors to hold the x- and y-locations of vertices, feed these into patch. Single Polygon X=rand(1,4); Y=rand(1,4); h=patch(X,Y,'red'); Multiple Polygons Each polygon's vertices occupy one column of each of X, Y. X=rand(4,3); Y=rand(4,3); for i=2:3 X(:,i)=X(:,i)+(i-1); % create ...
Where command line arguments are supported they can be read in via the get_command_argument intrinsic (introduced in the Fortran 2003 standard). The command_argument_count intrinsic provides a way to know the number of arguments provided at the command line. All command-line arguments are read in ...
This: class Foo extends Dynamic { // Expressions are only rewritten to use Dynamic if they are not already valid // Therefore foo.realField will not use select/updateDynamic var realField: Int = 5 // Called for expressions of the type foo.field def selectDynamic(fieldName: String) = ...
This: class Villain(val minions: Map[String, Minion]) extends Dynamic { def applyDynamic(name: String)(jobs: Task*) = jobs.foreach(minions(name).do) def applyDynamicNamed(name: String)(jobs: (String, Task)*) = jobs.foreach { // If a parameter does not have a name, and is simply given, th...
Slightly counterintuitively (but also the only sane way to make it work), this: val dyn: Dynamic = ??? dyn.x(y) = z is equivalent to: dyn.selectDynamic("x").update(y, z) while dyn.x(y) is still dyn.applyDynamic("x")(y) It is important to be aware of this, or else...
Result<T, E> is an enum type which has two variants: Ok(T) indicating successful execution with meaningful result of type T, and Err(E) indicating occurrence of an unexpected error during execution, described by a value of type E. enum DateError { InvalidDay, InvalidMonth, } str...
When it comes to dealing with timing issue, it is tempting and easy to put a "quick" browser.sleep(<timeout_in_milliseconds>) and move on. The problem is, it would some day fail. There is no golden/generic rule on what sleep timeout to set and, hence, at some point due to network or...
Using a CASE statement, conditionally display an expression in the column based on values found in another column, a.k.a. “my kingdom for an OR”. In the example, the result is obtained when the status of the transaction is Pending Fulfillment or Partially Fulfilled: CASE DECODE( {status}, 'Pending ...
Using a regular expression, parse a record name that might be hierarchical. The expression looks for the final colon in the name. It returns what follows the colon, or the entire name if none: regexp_substr( {name} , '[^:]*$' )
The example builds a string from the name of the parent record, the name of this record, and the memo of this record. {createdfrom} || ' ' || {name} || ' ' || {memo}
'<div style="font-size:11pt">' || expression || '</div>'

Page 1070 of 1336