Tutorial by Examples: application

1)In project.json, add below dependencies- "Serilog": "2.2.0", "Serilog.Extensions.Logging": "1.2.0", "Serilog.Sinks.RollingFile": "2.0.0", "Serilog.Sinks.File": "3.0.0" 2)In Startup.cs, add below lines in constru...
The ApplicationData.Current.LocalFolder api allows us to get access to the application cache : var file = await ApplicationData.Current.LocalFolder.CreateFileAsync("myFile.dat", CreationCollisionOption.ReplaceExisting); The FileIO class contains a set of utility methods to easily add d...
To use an in memory cache in your ASP.NET application, add the following dependencies to your project.json file: "Microsoft.Extensions.Caching.Memory": "1.0.0-rc2-final", add the cache service (from Microsoft.Extensions.Caching.Memory) to ConfigureServices method in Startup...
app\Exceptions\Handler.php public function render($request, Exception $exception) { if ($exception instanceof ModelNotFoundException) { abort(404); } return parent::render($request, $exception); } You can catch / handle any exception that is thrown in Laravel.
This example demonstrates how to develop a simple UWP application. On creation of a "Blank App (Universal Windows)" project there are many essential files that are created in your solution. All files in your project can be seen in the Solution Explorer. Some of the crucial files in your...
It makes it easier to manage complexity by dividing an application into the model, the view, and the controller (Separation of concerns). It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an applica...
Once you have your UWP application ready for tests you should add test application to your solution. To do it "right" click on the solution and choose "Unit Test App (Universal Windows)": Once you add it to the solution there are few more steps required to configure it. You w...
Once your test application is ready you can connect it with code for which you want to write unit tests. Either you have you code in PCL, or in UWP app project (I assume that you applied MVVM pattern) just add reference to it in Test Application project: Now you have access to all your code from...
Technically, Ruby doesn't have functions, but methods. However, a Ruby method behaves almost identically to functions in other language: def double(n) n * 2 end This normal method/function takes a parameter n, doubles it and returns the value. Now let's define a higher order function (or met...
For Getting updated or to do something before app goes live to user you can use below method. AppDidFinishLaunching - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Write your code before app launch return YES; } While ...
The example I'm going to discuss assumes you have a Docker installation that works in your system and a basic understanding of how to work with Node.js . If you are aware of how you must work with Docker , it should be evident that Node.js framework need not be installed on your system, rather we wo...
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskWrites() .penaltyLog() //Logs a message to LogCat .build())
SWIFT: Step 1: In your Info.plist add the following attribute: View controller-based status bar appearance and set its value to NO as described in the image below: Step 2: In your AppDelegate.swift file, in didFinishLaunchingWithOptions method, add this code: UIApplication.shared.st...
Once the IPA file is generated, open Xcode, navigate to developer tools and open Application Loader. If you have multiple accounts in your Xcode, you will be asked to choose. Naturally pick the one you used for code signing in the first step. Pick "Deliver your app" and upload the code....
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 ...
Android Apps are written in Java. The Android SDK tools compile the code, data and resource files into an APK (Android package). Generally, one APK file contains all the content of the app. Each app runs on its own virtual machine(VM) so that app can run isolated from other apps. Android system wor...
First of all you should know that you can extend Android.Application class so you can access two important methods related with app lifecycle: OnCreate - Called when the application is starting, before any other application objects have been created (like MainActivity). OnTerminate - This...
Visual Basic for Applications (VBA) is the macro language behind all Microsoft Office products and is essentially identical across all Office products. What differs from product to product is the Object model. Excel has workbooks, worksheets and cells. Access has tables and attributes. Outlook h...
Follow following steps to try out a sample application on AWS ECS service as a proof of concept. Login to AWS management console and go to AWS service catalog - > Compute - > Ec2 Create a VM(EC2 instance) using amazon linux 64 bit OS, this we will use to configure docker, git, AWS ECS agen...
The create-* commands in Grails automatically create unit or integration tests for you within the src/test/groovy directory. It is of course up to you to populate these tests with valid test logic, information on which can be found in the section on Unit and integration tests. To execute tests you ...

Page 8 of 11