Tutorial by Examples: c

package main import ( "encoding/gob" "fmt" "log" "os" ) type User struct { Username string Password string } type Admin struct { Username string Password string IsAdmin bool } type Deleter interface ...
var providerName = "System.Data.SqlClient"; //Oracle.ManagedDataAccess.Client, IBM.Data.DB2 var connectionString = "{your-connection-string}"; //you will probably get the above two values in the ConnectionStringSettings object from .config file var factory = DbProviderFac...
Assume that I have a file named in.txt: $ cat in.txt a b a c a d I only want to replace the a\nc with deleted, but not a\nb or a\nd. $ sed -e ':loop # create a branch/label named `loop` $!{ N # append the next line of input into the pattern space /\n$/!b...
Encyption happens by replacing each letter of the alfabet with an other letter. The keys can be showed with this circle. Here is a shift of 8 chars used. Here will the A replaced by T, B by U, C by V etc. So will next string encrypted: OriginalEncryptedHELLO WORLDAXEEH PHKEW
Decription happens by the same cicle showed in the encryption example. Example: EncryptedOriginalAXEEH PHKEWHELLO WORLD
Ceasar ciphers are easy to hack. If you know that an encrypted A is equal to H and a P is equal to I, everything with the same encryption key could be encrypted.
class Person { String name; public Person(String name) { this.name = name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Person person = (Person) ...
While coding a script or a function, it can be the case that one or more than one temporary file be needed in order to, for example, store some data. In order to avoid overwriting an existing file or to shadow a MATLAB function the tempname function can be used to generate a unique name for a te...
class Program { static void Main(string[] args) { string serverName = "INTACT-ETL"; string databaseName = "SOMEDB"; string collectionName = "TestCol"; //Build Connection string ...
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' } ...
The basic use of fit is best explained by a simple example: f(x) = a + b*x + c*x**2 fit [-234:320][0:200] f(x) ’measured.dat’ using 1:2 skip 4 via a,b,c plot ’measured.dat’ u 1:2, f(x) Ranges may be specified to filter the data used in fitting. Out-of-range data points are ignored. (T. W...
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...
Callback hell (also a pyramid of doom or boomerang effect) arises when you nest too many callback functions inside a callback function. Here is an example to read a file (in ES6). const fs = require('fs'); let filename = `${__dirname}/myfile.txt`; fs.exists(filename, exists => { if (exi...
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...
First, Go to Tools > NuGet Package Manager > Package Manager Console. Enter this Command "Install-Package Plugin.Facebook" in Package Manger Console. Now all the file is automatically created. Video : Login with Facebook in Xamarin Forms Other Authentication by using Pl...
From the Welcome to Android Studio dialogue box, select New Project... to open the Create New Project dialog. In the New Android Application dialog, under Application name, specify an appropriate application name. The remainder of this tutorial uses BasicMapSolution as the application name....
When using the Oozie Proxy job submission API for submitting the Oozie Hive, Pig, and Sqoop actions. To pass any configuration to the action, is required to be in below format. For Hive action: oozie.hive.options.size : The number of options you'll be passing to Hive action. oozie.hive.options....
The abstract class IntentService is a base class for services, which run in the background without any user interface. Therefore, in order to update the UI, we have to make use of a receiver, which may be either a BroadcastReceiver or a ResultReceiver: A BroadcastReceiver should be used if your s...
Use browser.driver instead of driver Use browser.driver.ignoreSynchronization = true Reason: Protractor waits for angular components to load completely on a web-page befor it begins any execution. However, since our pages are non-angular, Protractor keeps waiting for 'angular' to load till the tes...

Page 689 of 826