Tutorial by Examples: and

The first step for coding for localization is to create default resources. This step is so implicit that many developers do not even think about it. However, creating default resources is important because if the device runs on an unsupported locale, it would load all of its resources from the defau...
This shows how to create the demo database used in big parts of Progress documentation: sports2000. This assumes you have installed the Progress products with at least one type of database license. Run proenv script/bat-file that will give you a prompt with all environment variables set. Create ...
import spock.lang.* class HelloWorldSpec extends Specification { @Shared message = 'Hello world!' def "The world can say hello using when and then"() { when: def newMessage = message then: newMessage == 'Hello world!' } ...
Using the Flyable example as a starting point, we can add a second interface, Swimmable, with the following code: Sub Swim() ' No code End Sub The Duck object can Implement both flying and swimming: Implements Flyable Implements Swimmable Public Sub Flyable_Fly() Debug.Print &quo...
Hadoop is an open-source software framework for storage and large-scale processing of data-sets in a distributed computing environment. It is sponsored by Apache Software Foundation. It is designed to scale up from single servers to thousands of machines, each offering local comput...
from sqlalchemy import create_engine cnx = create_engine('mysql+pymysql://username:password@server:3306/database').connect() sql = 'select * from mytable' df = pd.read_sql(sql, cnx)
The LAG function provides data on rows before the current row in the same result set. For example, in a SELECT statement, you can compare values in the current row with values in a previous row. You use a scalar expression to specify the values that should be compared. The offset parameter is the n...
The PERCENT_RANK function calculates the ranking of a row relative to the row set. The percentage is based on the number of rows in the group that have a lower value than the current row. The first value in the result set always has a percent rank of zero. The value for the highest-ranked – or last...
The PERCENTILE_DISC function lists the value of the first entry where the cumulative distribution is higher than the percentile that you provide using the numeric_literal parameter. The values are grouped by rowset or partition, as specified by the WITHIN GROUP clause. The PERCENTILE_CONT functi...
In SQL, you use date and time data types to store calendar information. These data types include the time, date, smalldatetime, datetime, datetime2, and datetimeoffset. Each data type has a specific format. Data typeFormattimehh:mm:ss[.nnnnnnn]dateYYYY-MM-DDsmalldatetimeYYYY-MM-DD hh:mm:ssdatetim...
Example Data Please try to provide a minimal example input data in a format that can be directly used by the answers without tedious and time consuming parsing for example input file or local collection with all code required to create distributed data structures. When applicable always include ty...
An example of a configuration function in SQL is the @@SERVERNAME function. This function provides the name of the local server that's running SQL. SELECT @@SERVERNAME AS 'Server' ServerSQL064 In SQL, most data conversions occur implicitly, without any user intervention. To perform any convers...
A common requirement for a Java application is that can be deployed by copying a single file. For simple applications that depend only on the standard Java SE class libraries, this requirement is satisfied by creating a JAR file containing all of the (compiled) application classes. Things are not ...
package main import ( "encoding/gob" "os" ) type User struct { Username string Password string } func main() { user := User{ "zola", "supersecretpassword", } file, _ := os.Create("user.go...
package main import ( "encoding/gob" "fmt" "os" ) type User struct { Username string Password string } func main() { user := User{} file, _ := os.Open("user.gob") defer file.Close() decoder := gob...
Setup Steps: Download and install jdk8. Add the following to your project’s main build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath 'me.tatarka:gradle-retrolambda:3.2.3' } } Now add this to your application m...
Complete the Installation and setup part to connect your app to Firebase. This will create the project in Firebase. Add the dependency for Firebase Cloud Messaging to your module-level build.gradle file: dependencies { compile 'com.google.firebase:firebase-messaging:10.2.1' } ...
SQL has two logical functions – CHOOSE and IIF. The CHOOSE function returns an item from a list of values, based on its position in the list. This position is specified by the index. In the syntax, the index parameter specifies the item and is a whole number, or integer. The val_1 … val_n paramete...
Try catch Errors must always be handled. If you are using synchronous programming you could use a try catch. But this does not work if you work asynchronous! Example: try { setTimeout(function() { throw new Error("I'm an uncaught error and will stop the server!"); }, 1...
Progress supports one dimensional arrays, but they are called EXTENTS. /* Define a character array with the length 5, and display it's length */ DEFINE VARIABLE a AS CHARACTER EXTENT 5 NO-UNDO. DISPLAY EXTENT(a). Individual positions i the array is accessed using "standard" c-style b...

Page 124 of 153