Author: admin

  • Unit Testing

    Unit Testing involves testing every individual unit of an application. It helps the developer to test small functionalities without running the entire complex application. The Dart external library named “test” provides a standard way of writing and running unit tests. Dart unit testing involves the following steps − Step 1: Installing the “test” package To installing third-party…

  • Libraries

    Elixir provides excellent interoperability with Erlang libraries. Let us discuss a few libraries in brief. The Binary Module The built-in Elixir String module handles binaries that are UTF-8 encoded. The binary module is useful when you are dealing with binary data that is not necessarily UTF-8 encoded. Let us consider an example to further understand…

  • Concurrency

    Concurrency is the execution of several instruction sequences at the same time. It involves performing more than one task simultaneously. Dart uses Isolates as a tool for doing works in parallel. The dart:isolate package is Dart’s solution to taking single-threaded Dart code and allowing the application to make greater use of the hard-ware available. Isolates, as the name suggests, are…

  • Async

    An asynchronous operation executes in a thread, separate from the main application thread. When an application calls a method to perform an operation asynchronously, the application can continue executing while the asynchronous method performs its task. Example Let’s take an example to understand this concept. Here, the program accepts user input using the IO library. The readLineSync() is a synchronous method. This…

  • Errors Handling

    Elixir has three error mechanisms: errors, throws and exits. Let us explore each mechanism in detail. Error Errors (or exceptions) are used when exceptional things happen in the code. A sample error can be retrieved by trying to add a number into a string − When the above program is run, it produces the following…

  • Libraries

    A library in a programming language represents a collection of routines (set of programming instructions). Dart has a set of built-in libraries that are useful to store routines that are frequently used. A Dart library comprises of a set of classes, constants, functions, typedefs, properties, and exceptions. Importing a library Importing makes the components in…

  • Comprehensions

    List comprehensions are syntactic sugar for looping through enumerables in Elixir. In this chapter we will use comprehensions for iteration and generation. Basics When we looked at the Enum module in the enumerables chapter, we came across the map function. In this example, we will pass a function as the second argument. Each item in…

  • Node.js Debugger

    Node.js provides a simple TCP based protocol and built-in debugging client. For debugging your JavaScript file, you can use debug argument followed by the js file name you want to debug. Syntax: Example: If you make any error:PauseNextMute Current Time 0:01 / Duration 18:10 Loaded: 2.94%  Fullscreen If you make any error in your js file source code…

  • Typedef

    A typedef, or a function-type alias, helps to define pointers to executable code within memory. Simply put, a typedef can be used as a pointer that references a function. Given below are the steps to implement typedefs in a Dart program. Step 1: Defining a typedef A typedef can be used to specify a function signature that we want specific functions to…

  • Sigils

    In this chapter, we are going to explore sigils, the mechanisms provided by the language for working with textual representations. Sigils start with the tilde (~) character which is followed by a letter (which identifies the sigil) and then a delimiter; optionally, modifiers can be added after the final delimiter. Regex Regexes in Elixir are…