Tutorial by Examples: a

fizzbuzz = fn (0, 0, _) -> "FizzBuzz" (0, _, _) -> "Fizz" (_, 0, _) -> "Buzz" (_, _, x) -> x end my_function = fn(n) -> fizzbuzz.(rem(n, 3), rem(n, 5), n) end
Go to https://www.arduino.cc/en/Main/Software Click the Mac OS X link. Unzip the .zipfile. Move the Arduino application to Applications.
Sometimes one has to work with pages that are not using jQuery while most developers are used to have jQuery handy. In such situations one can use Chrome Developer Tools console (F12) to manually add jQuery on a loaded page by running following: var j = document.createElement('script'); j.onload ...
In VB.NET, every variable must be declared before it is used (If Option Explicit is set to On). There are two ways of declaring variables: Inside a Function or a Sub: Dim w 'Declares a variable named w of type Object (invalid if Option Strict is On) Dim x As String 'Declares a variable named ...
Dim flags = BindingFlags.Static Or BindingFlags.Public Or BindingFlags.Instance Dim members = GetType(String).GetMembers(flags) For Each member In members Console.WriteLine($"{member.Name}, ({member.MemberType})") Next
Static method: Dim parseMethod = GetType(Integer).GetMethod("Parse",{GetType(String)}) Dim result = DirectCast(parseMethod.Invoke(Nothing,{"123"}), Integer) Instance method: Dim instance = "hello".ToUpper Dim method = Gettype(String).GetMethod("ToUpper&quo...
ArrayList is one of the inbuilt data structures in Java. It is a dynamic array (where the size of the data structure not needed to be declared first) for storing elements (Objects). It extends AbstractList class and implements List interface. An ArrayList can contain duplicate elements where it mai...
Test classes are created as local classes in a special unit test include. This is the basic structure of a test class: CLASS lcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mo_cut TYPE REF TO zcl_...
To get more information about any git command – i.e. details about what the command does, available options and other documentation – use the --help option or the help command. For example, to get all available information about the git diff command, use: git diff --help git help diff Similarl...
This example assumes that your lookup column is named MultiLookupColumnName and that you want to set your multi-lookup field to lookup to the items with IDs 1 and 2. Using jQuery AJAX 2010 var listName = "YourListName"; var lookupList = "LookupListName"; var idOfItemToUpdate...
If you want to change the order of a character strings you can use parentheses in the pattern to group parts of the string together. These groups can in the replacement argument be addresed using consecutive numbers. The following example shows how you can reorder a vector of names of the form &quo...
Repeat something n times: >>> import itertools >>> for i in itertools.repeat('over-and-over', 3): ... print(i) over-and-over over-and-over over-and-over
Python 3.x3.2 accumulate yields a cumulative sum (or product) of numbers. >>> import itertools as it >>> import operator >>> list(it.accumulate([1,2,3,4,5])) [1, 3, 6, 10, 15] >>> list(it.accumulate([1,2,3,4,5], func=operator.mul)) [1, 2, 6, 24, 120] ...
The thing is; you can't connect Ionic to any database (MySQL, Postgres, MSSQL, ...) directly. The keyword here is directly. No, there's no workaround, no magic involved, it's just not the way this is supposed to work. Ionic works on top of Angular and Angular is a frontend framework. However, the ...
A Cordova application runs as a website on a WebView component within the native mobile platform. Debugging a cordova application can therefore be done by utilizing your favourite browsers development tools. The following steps are needed to hook the application, running on the device, to the Chrome...
This method accepts a string as input, attempts to parse it into a DateTime, and returns a Boolean result indicating success or failure. If the call succeeds, the variable passed as the out parameter is populated with the parsed result. If the parse fails, the variable passed as the out parameter i...
This method behaves as a combination of TryParse and ParseExact: It allows custom format(s) to be specified, and returns a Boolean result indicating success or failure rather than throwing an exception if the parse fails. TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime) ...
The Replace function in SQL is used to update the content of a string. The function call is REPLACE( ) for MySQL, Oracle, and SQL Server. The syntax of the Replace function is: REPLACE (str, find, repl) The following example replaces occurrences of South with Southern in Employees table: FirstN...
To break loops, the command EXIT can be used. DO. READ TABLE itab INDEX sy-index INTO DATA(wa). IF sy-subrc <> 0. EXIT. "Stop this loop if no element was found ENDIF. " some code ENDDO. To skip to the next loop step, the command CONTINUE can be u...
You can render the contents of an SVG file as an image within an HTML document using an <img> tag. For example: <img src="my_svg_file.svg" alt="Image description"> The dimensions of the image will, by default, display according to the width and height properties s...

Page 437 of 1099