Is Agile Accountability an Oxymoron?

Despite what some people may think, accountability and Agile are not mutually exclusive.

How does your organization incorporate accountability? Is it part of your organization's value statement or part of your enterprise culture? Most companies and leaders I’ve worked with (Agile or otherwise) are not very good with accountability.

A Review of Spring Boot Alternatives

At present, there is no lack of frameworks for creating miсroservices in Java and Kotlin. In this article, we will be considering the following frameworks:

Name Version Year of a first release Developer GitHub

Helidon SE

800+ Free & Premium Procreate Brushes

Procreate makes it easy to create stunning designs and pieces of artwork for personal and professional use. However, gathering all the resources you need, like Procreate brushes, can seem like a daunting task when you’re first starting out.

Instead of having to hunt down brushes to use in your art, we’ve put together a resource you can reference whenever you need a new brush. Here, we’ve compiled some premium brushes, free collections, as well as premium (free & premium) collections you can use in your work starting right now.

All The Best Procreate Brushes
Unlimited Downloads: Hundreds of Procreate Brushes For Your Designs

Envato Elements - Procreate Brushes

Premium Procreate Brushes

Vintage Comic Brushes

Procreate Brushes - Vintage Comic

The Vintage Comic Brushes set contains 51 brushes for Procreate that are heavily inspired by the vintage comic halftone look.

Procreate Texture Brushes.Sand

Procreate Brushes - Texture

This set of texture brushes offer a variety of sand effects for your Procreate projects. The set comes with 6 sand texture brushes.

Fabulous Pencils for Procreate

Procreate Brushes - Pencils

The Fabulous Pencils set comes with 44 different brushes that offer realistic pencil textures for any project that requires a hand drawn look.

Graffiti Brush for Procreate

Procreate Brushes - Graffiti

The Graffiti Brush set makes it easy to create analog graffiti looks in your digital artwork.

The Jungle Brushes

Procreate Brushes - Jungle

The Jungle Brushes is a set of 20 brushes for Procreate that can be used to add an earthy and grungy look to any project.

Free Procreate Brush Collections

Watercolor & Paint Brushes

Procreate Brushes - Watercolor

This is a lovely collection of free watercolor and paint brushes.

250+ Creative and Free Brushes for the iPad Pro

Procreate Brushes - Creative

This is a real treasure trove of free resources! Here, you can find over 250 free brushes that offer you new creative ways to make what you want to make.

351+ Inking, Lettering, and Calligraphy Brushes for the iPad Pro

Procreate Brushes - 351+

If lettering is what you’re interested in, why not browse the 350+ brushes listed in this resource?

Free Procreate Brushes

Procreate Brushes - Free

Here’s another lovely set of brushes that you can browse and use for free.

Free Brushes: A Stockpile of all My Freebies

Procreate Brushes - Stockpile

In this collection, you can browse through all the free brushes a fellow artist has compiled. How generous!

50 of the Best Free Brushes

Procreate Brushes - 50 best free

Another great list here, this time of 50 fantastic free brushes.

Premium Procreate Brush Collections

Premium Brushes for Artists & Illustrators

Procreate Brushes - master bundle

If it’s within your budget, you can always splurge on a new brush or two after browsing those listed here.

34 of the Best Brushes

Procreate Brushes - 34 best

This list of 34 all-time favorite brushes can really take you far when it comes to professionalism — plus there are some freebies included here as well.

The Best Procreate Brushes for iPad (Free & Premium Packs)

Procreate Brushes - iPad

Another free and premium list here, chock full of some of the best brushes you could ever ask for.

The Best Procreate Brushes to Download in 2019

Procreate Brushes - essential bundle

Over 300 brushes are listed at this resource. Odds say you’ll find what you’re looking for here.

100+ Brushes for Artists (Best Free & Premium Brush Sets)

Procreate Brushes - 100+

Last on our list is this collection of over 100 brushes that includes free and premium selections, all of which are great for working artists.

Use These Procreate Brushes to Create Your Next Stunning Work

Don’t let a lack of on-hand resources stunt your next project. Instead, see what’s available to you for or for a nominal fee. What’s available might really surprise you. And hopefully, this collection of Procreate brushes will send you well on your way toward putting together something truly eye-catching. Be sure to check out our other brush resources here.

Rise, the Jakarta EE Ambassadors!

Over the years, Java EE has included many powerful key open standards, and the Java EE Guardians were created to ensure that these standards move forward for the community and industry. Now that the transition of Java EE to the Eclipse Foundation is complete, and Jakarta EE is out in the wild, it’s important that the group re-brand as the Jakarta EE Ambassadors in order to make our intention clear: empowering efforts to ensure these standards continue to evolve and thrive.

The key to accomplishing this under the new Jakarta EE banner is community advocacy, facilitating participation and ensuring rank-and-file developers are heard. We invite you to learn about what we are doing and re-engage with us once more towards these ends now as Jakarta EE Ambassadors.

Top 4 Cyber Security Trends to Watch Out For in 2020

Incidents of data breaches and theft are showing no signs of slowing down. According to Forbes, in the first half of 2019 alone, cybercriminals compromised the personal information of more than 4 billion users. As the world becomes more and more digitalized, businesses can longer afford to ignore cybersecurity.

One of the best ways to stay safe is to keep abreast of emerging cybersecurity trends, so here we’ll discuss five of the most prominent ones to be aware of going in 2020:

Scalable Data Grid Using Apache Ignite

In this article, I introduce the concept of a Data Grid, it's properties, services it offers, and finally how to design a scalable Data Grid for your needs.

What Is a Data Grid?

A Data Grid is a set of services that delivers a shared data management system, wherein heterogeneous data from various applications and services will be accessible by forming a grid-like structure. This is possible using strong middle-ware applications and services that support data ingress/query from various application requests.

Top 10 Mobile App UI/UX Design Trends to Look for in 2020

Do you think you are ready for the future?

This blog is centered around future UI/UX design future trends. I have mentioned the new technologies that will become more popular or will be launched shortly. These technologies will change the way we develop our mobile apps, and you need to prepare in advance for that!

Online Payments With React and Square

Create a Custom Payment Form Using React and Square

There are a lot of ways to accept payments online. Wouldn’t it be nice to implement a single form that could accept as many payment methods as we want? Let’s take a look at implementing a custom payment form using Square and React. This form will enable us to take credit cards online, and give us support for Apple Pay, Google Pay, and Masterpass in a single payment form.

Requirements

Our Final (Payment) Form:

Final payment form

7 Best WordPress Activity Log and Tracking Plugins (Compared)

Are you looking for an activity log and tracking plugin for your WordPress site?

If multiple users log in to your website, then keeping an activity log helps you monitor all user activity on your website.

In this article, we’ll show you the best WordPress activity log and tracking plugins that you can use.

Comparing the best WordPress activity log and monitoring plugins

Why Use a WordPress Activity Log and Tracking Plugin?

Keeping an activity log in WordPress helps you track and monitor user actions on your website.

For instance, on a WordPress membership site, you’d be able to keep track of user login, downloads, and other actions.

Online stores and ccommerce websites using WooCommerce will be able to track customer activity and keep track of downloads, logins, emails sent, and more.

These plugins can also help you identify suspicious activities like fake user accounts, spam, and even DDoS attacks.

That being said, let’s take a look at some of the best WordPress activity log and tracking plugins.

1. Sucuri

Sucuri

Sucuri is the best WordPress security plugin on the market. It comes with comprehensive WordPress activity log and monitoring with instant email alerts to notify you of important changes as they happen.

Sucuri monitors your WordPress files, plugins and themes for any changes. This enables you to be notified if a malicious script is added to your site. It also keeps track of plugins installed, activated, or deactivated on your website.

The plugin keeps an activity log of all user sessions, login/logout activity, and changes made to your WordPress posts and pages. You can also export the logs and view them on your computer for in-depth analysis.

2. WP Security Audit Log

WP Security Audit Log

WP Security Audit Log is a comprehensive WordPress activity log and monitoring plugin. It allows you to monitor user sessions and keep track of who logged in and out of your website.

It comes with a detailed event view showing each user activity with their IP address. You can also view changes they make like creating posts, pages, comments, media uploads, theme changes, plugins, and more.

You can terminate a user session from the dashboard at any time which would log them out of your website. The plugin also supports WordPress multisite networks and helps network admins monitor activities across all sites.

This plugin also allows you to create any kind of reports for different activities, keep track of them, and download them on demand when needed. This comes in handy if you are looking for an activity log plugin for regulatory compliance in your region.

3. Simple History

Simple History

Simple History is a simpler but excellent WordPress activity monitor plugin. It is easy to use and shows you complete website activity status inside WordPress admin or any page you want.

It keeps track of all user activity on your site. This includes post and page editing, image uploads, comments, widgets, user profiles, login sessions, theme changes, and more.

It also works seamlessly with many popular WordPress plugins like Beaver Builder, Redirection, Limit Login Attempts, and more.

All log events are kept for 60 days, after that they are discarded. You can click on any event to view full details including user ID, changes made, time and date, IP address, and more.

4. ActivityLog

ActivityLog

ActivityLog is another useful WordPress activity monitoring and logging plugin. It is easy to use and allows you to view all website activity inside the WordPress dashboard.

The plugin keeps a log of all user sessions, any changes made to posts, pages, comments, themes, plugins, or widgets, plugins, and theme changes.

You can set the plugin to send you notification emails for certain events. The plugin also allows you to easily export activity logs as a CSV file to your computer.

5. User Activity Log

User Activity Log

User Activity Log is another simple option to set up a WordPress activity log and monitoring system. The plugin tracks all user activities including any changes made to content, media, or WordPress settings.

You can also set up notifications for specific users and receive an email alert when those users login. There is a built-in export feature that allows you to export activity log to your computer.

It also offers additional support for several popular plugins such as WooCommerce, Yoast SEO, Easy Digital Downloads, Advanced Custom Fields, and more.

6. Error Log Monitor

Error Log Monitor

WordPress is written in the PHP programming language which comes with its own error reporting feature.

By default, WordPress does not show several less important messages for notices and warnings. However, these messages can be really helpful in troubleshooting WordPress issues.

Error Log Monitor helps you track those errors and displays them inside the WordPress admin dashboard. This helps you easily look for problematic plugins and address those issues quickly.

7. WP Mail SMTP

WP Mail SMTP Pro

If multiple users access your website by logging in, then this means your website often sends email notifications. This includes password reset requests, email changes, membership website emails, orders, receipts, etc.

WP Mail SMTP Pro ensures that all those emails reach users inbox by using a proper SMTP service to send your WordPress emails. It also keeps an email log of all the emails sent by your WordPress website.

Looking at this log, you can find a lot of useful information that you would otherwise miss as many activity log monitoring plugins don’t save email logs.

For more details, see our article on how to set up email logs for WordPress and WooCommerce

Which is The Best WordPress Activity Log and Tracking Plugin?

If you are considering an overall activity monitoring solution, then Sucuri is hands down the best option. Not only does it keep an activity log, but you also get the complete WordPress security for your website.

It is an activity monitor, vulnerability scanner, malware removal, and the best WordPress firewall against any threats.

If you already have a security plugin, but need a more detailed activity log solution, then WP Security Audit Log is the best option.

You would also want to keep a log of all emails sent by your website, and for that you’ll need WP Mail SMTP Pro.

We hope this article helped you find the best WordPress activity log and tracking plugin for your website. You may also want to check out our complete WordPress security guide to protect your website against common internet threats.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 7 Best WordPress Activity Log and Tracking Plugins (Compared) appeared first on WPBeginner.

Using CSCS Scripting Language For Cross-Platform Development

Using CSCS Scripting Language For Cross-Platform Development

Using CSCS Scripting Language For Cross-Platform Development

Vassili Kaplan
Our goal is not to build a platform; it’s to be cross all of them.

— Mark Zuckerberg

CSCS (Customized Scripting in C#) is an open-source scripting language implemented in C#. Syntactically it’s very similar to JavaScript, but it also has some similarities with Python. Some of these similarities are the keywords in the well-known if…elif…else construct, and also have the same variable scope definition as in Python (e.g. a variable defined inside of an if block or inside a loop will be also visible outside).

As opposed to JavaScript and Python, variables and functions in CSCS are case-insensitive. The primary goal of CSCS is to let the developer write as little code as possible. Also, the same code is used for both iOS and Android development. Additionally, CSCS can be used for Windows, Mac, and Unity development.

Note: You can read more about how Microsoft uses CSCS in their Maquette product (based on Unity) over here.

CSCS can be added to your project by embedding its C# source code into a Visual Studio Xamarin project. Unlike most other languages, you have full ownership of the CSCS source code and can easily add or modify its functionality. I’ll be sharing an example of this later on in the article.

Also, we are going to learn how to get started with CSCS and use some more advanced features that have been covered in other articles. Among these features, we are going to access a Web Service via Web Requests with JSON string parsing, and we’ll also be using SQLite on iOS and Android.

The easiest way to get started is to download a sample of a project using CSCS and start playing with the start.cscs file. This is what we’ll be doing in the next section: creating an iOS/Android app with basic GUI and events.

"Hello, World!" In CSCS

Let’s start with a relatively simple example of CSCS code that constructs a screen with a few widgets:

AutoScale();
SetBackgroundColor("light_green");

locLabelText = GetLocation("ROOT", "CENTER", "ROOT", "TOP");
AddLabel(locLabelText, "labelText", "Welcome " +
    _DEVICE_INFO_ + " " + _VERSION_INFO_ + " User!", 600, 100);

locTextEdit = GetLocation("ROOT", "LEFT", labelText,
  "BOTTOM");
AddTextEdit(locTextEdit, "textEdit", "Your name", 320, 80);

locButton = GetLocation(textEdit,"RIGHT",textEdit, "CENTER");
AddButton(locButton, "buttonHi", "Hello", 160, 80);

function buttonHi_click(sender, arg) {
  name = getText(textEdit);
  msg = name != "" ? "Hello, "+ name + "!" : "Hello, World!";
  AlertDialog("My Great App", msg);
}

The image below shows the resulting user interface on an iPhone as well as an Android device after clicking on the “Hello” button and not typing anything in the “Text Edit” field:

Hello, World!” on iPhone (left) and Android (right)
“Hello, World!” on iPhone (left) and Android (right) (Large preview)

Let’s briefly go over the code above. It starts with the AutoScale() function call, and what that does is to tell the parser that the widget sizes are relative to the screen size, i.e. they will be auto-resized (the widget will look bigger on bigger screens and smaller on smaller screens). This setting could be also overridden per widget.

Note that there is no need to create a special handler on a button click. If you define a function with name widgetName_click(), it will be used as a handler when the user clicks on a widget called widgetName (it doesn’t have to be a button, it can actually be any widget). That’s why the function buttonHi_click() will be triggered as soon as the user clicks on the button.

You may have noticed that the GUI is constructed completely in code. This is done by supplying a relative widget location when adding it. The general format of a location command is the following:

location = GetLocation(WidgetX, HorizontalPlacement, WidgetY, VerticalPlacement,
                       deltaX=0, deltaY=0, autoResize=true);

So, you can place a widget relative to other widgets on the screen. A special case of a widget is a “ROOT” widget, meaning the main screen.

After creating a location, you need to provide it as an argument to any of the following functions:

  • AddLabel,
  • AddButton,
  • AddCombobox,
  • AddStepper,
  • AddListView,
  • AddTextView,
  • AddStepper,
  • AddImageView,
  • AddSlider,
  • AddPickerView,
  • and so on.

All of the above have the same structure:

AddButton(location, newWidgetname, initialValue, width, height);

The widget width and height will be relative to the screen size if the AutoScale() CSCS command was previously run. Also, the initial value (in case of a button) is the text shown on it. This can be changed anytime by invoking SetText(widgetName, newText).

Using Visual Studio Code To Debug CSCS

We can also use Visual Studio Code to debug CSCS scripts. If you want to develop apps for both Android and iOS, you need to use a Mac. After installing Visual Studio Code, install the CSCS Debugger and REPL extension.

In order to use the extension, add this line of code anywhere in your start.cscs CSCS script:

StartDebugger();

The following image below shows how you can use Visual Studio Code to debug and change the functionality of the “Hello, World!” app that we developed in the previous section. In the upcoming example, we’ll be adding a label and a button on the fly to the existing layout.

To do this, we just select the code to be executed by the parser and press Ctrl + 8. As a result, a label and a button will be added at the center of the screen. We also add a button handler that will update the new label with the current time on each button click.

Changing Layout on the fly with Visual Studio Code
Changing Layout on the fly with Visual Studio Code (Large preview)

Using SQLite In CSCS

SQLite is an ACID (Atomicity, Consistency, Isolation, Durability) type of a relational database, and was developed by Richard Hipp (the first version was released in 2000). In difference to other relational databases, like Microsoft SQL Server or Oracle Database, it’s embedded. (Embedded not only into the device, but also into the end program.) It’s included in the program as a very compact library, which is less than 500 KB in size. But two apps (released by the same developer) can read the same SQLite DB if the DB file path is known to both apps.

The advantage of SQLite is that it can be used without an extra installation on an iOS or an Android device. The disadvantage is that it obviously cannot hold as much data as a “normal” DB and also that it’s weakly typed (i.e. you can insert a string instead of an integer — it will then be converted to an integer or 0 on failure). On the other hand, the latter can be also seen as an advantage as well.

SQLite can be easily used from CSCS without extra import statements. Here’s a table that will help you get an overview of the main SQLite functions used in CSCS:

Command Description
SQLInit(DBName) Initializes a database or sets a database to be used with consequent DB statements.
SQLDBExists(DBName) Checks whether the DB has been initialized. Also sets the database to be used with consequent DB statements.
SQLQuery(query) Executes an SQL query (a select statement). Returns a table with records.
SQLNonQuery(nonQuery) Executes an SQL non-query, e.g. an update, create or delete statement. Returns number of records affected.
SQLInsert(tableName, columnList, data) Inserts passed table of data of records to the specified DB table. The columnList argument has the following structure: colName1,colName2,…,colNameN

Table 1: SQLite commands in CSCS

This is how the SQLInit() and SQLDBExists() functions are typically used:

DBName = "myDB.db1";

if (!SQLDBExists(DBName)) {
  create = "CREATE TABLE [Data] (Symbol ntext, Low real,
    High real, Close real, Volume real,
    Stamp text DEFAULT CURRENT_TIMESTAMP)";
  SQLNonQuery(create);
}


SQLInit(DBName);

We are going to see more examples of how you can select and insert data into an SQLite database later on. I’ll show you an example of how to write stock data that has been extracted from a Web Service into a local SQLite database.

Adding Custom Functionality To CSCS

In this section, we are going to see how you can extend the CSCS functionality. As an example, we are going to see the existing implementation of the CSCS Sleep function below.

To add custom functionality, all you need to do is create a new class by deriving from the ParserFunction class, overriding its Evaluate() method, and registering this class with the parser. Here’s a short version (without error checking):

class SleepFunction : ParserFunction
{
  protected override Variable Evaluate(ParsingScript script)
  {
    List  args = script.GetFunctionArgs();
    int sleepms = Utils.GetSafeInt(args, 0);
    Thread.Sleep(sleepms);

    return Variable.EmptyInstance;
  }
}

Registration of a class with the parser can be done anywhere in the initialization stage via the following command:

ParserFunction.RegisterFunction("Sleep", new SleepFunction());

That’s it! Now the Evaluate() method of the SleepFunction class will be invoked as soon as a “Sleep” token is extracted by the parser.

Note that CSCS is case insensitive (except the core control flow statements: if, elif, else, for, while, function, include, new, class, return, try, throw, catch, break, continue). This means that you can type either “sleep(100)” or “Sleep(100)” — both calls will suspend the executing thread for 100 milliseconds.

Processing JSON In CSCS

JSON (JavaScript Object Notation) is a lightweight data interchange format, consisting of attribute-value pairs and array-type pairs. It was developed by Douglas Crockford in the early 2000s (around same time when SQLite appeared as well).

In this section, we are going to learn how to parse JSON using CSCS.

The CSCS function to parse a JSON string is GetVariableFromJSON(jsonText). This function returns a hash table in which the keys are the attributes from the JSON string.

Consider the following example of a JSON string:

jsonString = '{ "eins" : 1, "zwei" : "zweiString", "mehr" : { "uno": "dos" },
               "arrayValue" : [ "une", "deux" ] }';

After invoking:

a = GetVariableFromJSON();

The variable a will be a hash table with the following values:

a["eins"] = 1
a["zwei"] = "zweiString"
a["mehr"]["uno"] = "dos"
a["arrayValue"][0] = "une"
a["arrayValue"][1] = "deux"

In the next section, we are going to see another example of parsing a JSON string from a Web Service.

An Example Of An App With SQLite, Web Requests And JSON

For an app using SQLite, a Web Service and JSON parsing, we are going to use Alpha Vantage Web Service. You can get an API Key for free but the free version allows accessing their web service no more than 5 times per minute.

Using Alpha Vantage, you can extract various financial data sets — including stock prices. This is what we are going to do in our sample app.

The image below shows how the Stocks apps looks on an iOS and on an Android device.

Extracting Stocks from Alpha Vantage Web Service on iOS (left) and Android (right)
Extracting Stocks from Alpha Vantage Web Service on iOS (left) and Android (right) (Large preview)

The CSCS code to build the GUI is the following:

locLabel = GetLocation("ROOT","CENTER", "ROOT","TOP", 0,30);
AddLabel(locLabel, "labelRefresh", "", 480, 60);

locSFWidget = GetLocation("ROOT","CENTER",
                          labelRefresh,"BOTTOM");
AddSfDataGrid(locSFWidget,  "DataGrid", "",
              graphWidth, graphHeight);

listCols = {"Symbol","string",  "Low","number", "High",
            "number", "Close","number",  "Volume","number"};
AddWidgetData(DataGrid, listCols, "columns");
colWidth = {17, 19, 19, 19, 26};
AddWidgetData(DataGrid, colWidth, "columnWidth");

locButton = GetLocation("ROOT","CENTER",DataGrid,"BOTTOM");
AddButton(locButton, "buttonRefresh", "Refresh", 160, 80);

locLabelError = GetLocation("ROOT","CENTER","ROOT","BOTTOM");
AddLabel(locLabelError, "labelError", "", 600, 160);
SetFontColor(labelError, "red");
AlignText(labelError, "center");

getDataFromDB();

The getDataFromDB() method will extract all the data from the SQLite database. It uses the SQL query defined as follows:

query = "SELECT Symbol, Low, High, Close, Volume, DATETIME(Stamp,
               'localtime') as Stamp FROM Data ORDER BY Stamp DESC LIMIT 5;";

Take a look at the code below for the getDataFromDB() implementation.

function getDataFromDB() {
  results = SQLQuery(query);
  for (i = 1; i < results.Size; i++) {
    vals       = results[i];
    stock      = vals[0];
    low        = Round(vals[1], 2);
    high       = Round(vals[2], 2);
    close      = Round(vals[3], 2);
    volume     = Round(vals[4], 2);
    refresh    = vals[5];

    stockData  = {stock, low, high, close, volume};
    AddWidgetData(DataGrid, stockData, "item");
  }
  SetText(labelRefresh, "DB Last Refresh: " + refresh);
  lockGui(false);
}

Now let’s see how we get data from the Alpha Vantage Web Service. First, we initialize the data:

baseURL     = "https://www.alphavantage.co/query? " +
              "function=TIME_SERIES_DAILY&symbol=";
apikey      = "Y12T0TY5EUS6BC5F";
stocks      = {"MSFT", "AAPL", "GOOG", "FB", "AMZN"};
totalStocks = stocks.Size;

Next, we load stocks one by one as soon as the user clicks on the “Refresh” button:

function buttonRefresh_click(object, arg) {
  lockGui();

  SetText(labelRefresh, "Loading ...");
  SetText(labelError, "");
  ClearWidget(DataGrid);
  loadedStocks = 0;
  getData(stocks[loadedStocks]);
}

function getData(symbol) {
  stockUrl  = baseURL + symbol + "&apikey=" + apikey;
  WebRequest("GET", stockUrl, "", symbol, "OnSuccess", "OnFailure");
}

Here’s the main CSCS function to use in order to get data from a Web Service:

WebRequest("GET", stockUrl, "", symbol, "OnSuccess", "OnFailure");

The last two parameters are functions to invoke on completion of the web request. For example, in case of a failure, the following CSCS function will be called:

function OnFailure(object, errorCode, text)
{
  SetText(labelError, text);
  lockGui(false);
}

As a result, the user will get an error message as shown below:

An error when requesting web data
An error when requesting web data (Large preview)

But, if all is good, we are going to parse the JSON string and insert its contents into the SQLite DB.

function OnSuccess(object, errorCode, text)
{
  jsonFromText  = GetVariableFromJSON(text);
  metaData      = jsonFromText[0];
  result        = jsonFromText[1];

  symbol        = metaData["2. Symbol"];
  lastRefreshed = metaData["3. Last Refreshed"];
  allDates      = result.keys;

  dateData   = result[allDates[0]];
  high       = Round(dateData["2. high"],  2);
  low        = Round(dateData["3. low"],   2);
  close      = Round(dateData["4. close"], 2);
  volume     = dateData["5. volume"];
  stockData  = {symbol, low, high, close, volume};
  SQLInsert("Data","Symbol,Low,High,Close,Volume",stockData);

  if (++loadedStocks >= totalStocks) {
    getDataFromDB();
  } else {
    getData(stocks[loadedStocks]);
  }
}

In order to understand how we access different fields in the hash table above, let’s take a look at the actual string received from the Alpha Vantage web request:

{   "Meta Data": {
        "1. Information": "Daily Prices (open, high, low, close) and Volumes",
        "2. Symbol": "MSFT",
        "3. Last Refreshed": "2019-10-02 14:23:20",
        "4. Output Size": "Compact",
        "5. Time Zone": "US/Eastern"
    },
    "Time Series (Daily)": {
        "2019-10-02": {
            "1. open": "136.3400",
            "2. high": "136.3700",
            "3. low": "133.5799",
            "4. close": "134.4100",
            "5. volume": "11213086"
        },
   …
    }
}

As you can see, we get the latest date as the first element of the allDates array that consists all of the extracted dates.

Conclusion

Adding CSCS to your project is easy. All you need to do is simply embed the source code of CSCS as a module to your project — just like it’s done in a sample Xamarin project.

Do you use and extend CSCS scripting language in your projects? Leave a comment below — I’d be happy to hear from you!

Further Reading

If you want to explore the CSCS language a bit more, here are some of the articles I’ve written about on the topic:

As an additional resource, I also recommend reading how you can improve CSCS performance by precompiling its functions.

Smashing Editorial (ra, yk, il)