Tutorial by Examples: n

In order to use Gson you have to include it in your project. You can do this by adding the following dependency of the Gson version available in Maven Central: Maven Add to pom.xml <dependencies> <dependency> <groupId>com.google.code.gson</groupId> <a...
C++ compilers encode additional information in the names of exported functions, such as argument types, to make overloads with different arguments possible. This process is called name mangling. This causes problems with importing functions in C# (and interop with other languages in general), as the...
There're several conventions of calling functions, specifying who (caller or callee) pops arguments from the stack, how arguments are passed and in what order. C++ uses Cdecl calling convention by default, but C# expects StdCall, which is usually used by Windows API. You need to change one or the ot...
foo = "bar" foo[0] = "c" # Error Immutable variable value can not be changed once they are created.
foo = ("bar", 1, "Hello!",) foo[1] = 2 # ERROR!! Second line would return an error since tuple members once created aren't assignable. Because of tuple's immutability.
Each time this parameter is referenced, a random integer between 0 and 32767 is generated. Assigning a value to this variable seeds the random number generator (source). ~> $ echo $RANDOM 27119 ~> $ echo $RANDOM 1349
In Solution Explorer go to your project, right click on References then Add reference… Search for Compression and select System.IO.Compression.FileSystem then press OK. Add Imports System.IO.Compression to the top of your code file (before any class or module, with the other Imports statements)....
Hive-Hbase integration is supported since below versions. Hive: 0.11.0 HBase: 0.94.2 Hadoop: 0.20.2 CREATE TABLE hbase_hive (id string, col1 string, col2 string, col3 int) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping&q...
On Debian or Ubuntu, you can install SCons using $ sudo apt-get install scons On YUM-based systems, use $ sudo yum install scons You can install using an RPM by downloading it, then running $ sudo rpm -Uvh http://prdownloads.sourceforge.net/scons/scons-2.5.0-1.noarch.rpm
Eventually, when you're ready to release a version of your code to production, you'll need a .jar file to distribute. Intellij makes building JARs quite easy. First, navigate to File -> Project Structure and click on Artifacts: Click on the + button, and select JAR -> From modules with dep...
Windows in SFML are represented by one of two classes: sf::Window is a generic window provided by the operating system including an OpenGL render context. sf::RenderWindow is a specialized version of sf::Window that also acts as a sf::RenderTarget, allowing SFML's primitives to be rendered to it...
You can set any function for debugging with debug. debug(mean) mean(1:3) All subsequent calls to the function will enter debugging mode. You can disable this behavior with undebug. undebug(mean) mean(1:3) If you know you only want to enter the debugging mode of a function once, consider t...
On systems that use the System-V style init scripts, such as RHEL/CentOS 6: service <service> start service <service> stop On systems using systemd, such as Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7: systemctl <service> dnsmasq systemctl <service> ...
On systems that use the System-V style init scripts, such as RHEL/CentOS 6: service <service> status On systems using systemd, such as Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7.0: systemctl status <service>
On systems using systemd, such as Fedora => 15, Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7: systemctl status [servicename] ...where [servicename] is the service in question; for example, systemctl status sshd. This will show basic status information and any recent errors ...
ADO.NET Connections are one of the simplest ways to connect to a database from a C# application. They rely on the use of a provider and a connection string that points to your database to perform queries against. Common Data Provider Classes Many of the following are classes that are commonly used...
Entity Framework exposes abstraction classes that are used to interact with underlying databases in the form of classes like DbContext. These contexts generally consist of DbSet<T> properties that expose the available collections that can be queried : public class ExampleContext: DbContext ...
A Connection String is a string that specifies information about a particular data source and how to go about connecting to it by storing credentials, locations, and other information. Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword; Storing Your Connection Stri...
You can combine named arguments with optional parameters. Let see this method: public sealed class SmsUtil { public static bool SendMessage(string from, string to, string message, int retryCount = 5, object attachment = null) { // Some code } } When you want to call t...
You can place named arguments in any order you want. Sample Method: public static string Sample(string left, string right) { return string.Join("-",left,right); } Call Sample: Console.WriteLine (Sample(left:"A",right:"B")); Console.WriteLine (Sample(right...

Page 533 of 1088