Tutorial by Examples: l

Kotlin Plugin for Android Studio support converting existing Java files to Kotlin files. Choose a Java file and invoke action Convert Java File to Kotlin File:
In windows Platform Step 1: Installation of Ruby If you already have installed ruby in your pc then you can skip this step. Go to rubyinstaller.org's download page and download one of the stable version of ruby corresponding to architecture of your windows platform. Again download development ...
# ruby 1.92 lower_limit = 1 upper_limit = 6 Random.new.rand(lower_limit..upper_limit) # Change your range operator to suit your needs
(Beginner level; IDE: CLion) First, install boost from the Cygwin mirror: open the install exe, search for boost, install the packages. After boost is installed: it will be located in /usr/include/boost. This is where everything is. All #include statements will be a path from the boost folder,...
public class NetworkConnection : IDisposable { string _networkName; public NetworkConnection(string networkName, NetworkCredential credentials) { _networkName = networkName; var netResource = new NetResource() {...
The hslogger module provides a similar API to Python's logging framework, and supports hierarchically named loggers, levels and redirection to handles outside of stdout and stderr. By default, all messages of level WARNING and above are sent to stderr and all other log levels are ignored. import ...
The first instrument you’ll look at is the Time Profiler. At measured intervals, Instruments will halt the execution of the program and take a stack trace on each running thread. Think of it as pressing the pause button in Xcode’s debugger.Here’s a sneak preview of the Time Profiler :- This scree...
Generally, most of the data that is to be analyzed will be produced by various data sources like applications servers, social networking sites, cloud servers, and enterprise servers. This data will be in the form of log files and events. Log file − In general, a log file is a file that lists events...
cf apps I usually start with this as now I get the AppName for cut-n-paste and if verifies I am where I want to be in space and cloud. And yes, I really really want to say space and time.
cf logs AppName --recent Note, depending on who is hosting your CF app, the size of this log may be limited.
CF keeps you logged in. I sometimes have to switch between regions and don't always know where I am #Where am I? cf target #Login. This is logging in to the UK region of bluemix. Replace eu-gb with ng to go to the US. cf login -a https://api.eu-gb.bluemix.net #List spaces cf spaces #C...
This is the simplest way to connect. First, the driver has to be registered with java.sql.DriverManager so that it knows which class to use. This is done by loading the driver class, typically with java.lang.Class.forname(<driver class name>). /** * Connect to a PostgreSQL database. *...
Instead of specifying connection parameters like user and password (see a complete list here) in the URL or a separate parameters, you can pack them into a java.util.Properties object: /** * Connect to a PostgreSQL database. * @param url the JDBC URL to connect to. Must start with "jdbc:...
It is common to use javax.sql.DataSource with JNDI in application server containers, where you register a data source under a name and look it up whenever you need a connection. This is code that demonstrates how data sources work: /** * Create a data source with connection pool for PostgreSQL c...
CDI is a Java EE specification. It specifies how things should be done, and which features must be provided, but it isn't actually a specific library or set of code. In order to use CDI, you will need to use a CDI implementation. The reference implementation of the CDI spec is a set of libraries kn...
You can install Solr in any system where a suitable Java Runtime Environment (JRE) is available, as detailed below. Currently this includes Linux, OS X, and Microsoft Windows. You will need the Java Runtime Environment (JRE) version 1.8 or higher. At a command line, check your Java version like thi...
You can start Solr by running bin/solr from the Solr directory and this will start Solr in the background, listening on port 8983. $ bin/solr start To change the port Solr listens on, you can use the -p parameter when starting, such as: $ bin/solr start -p 8984 Since Solr is a server, it is more...
Given the following class: public class FinalizableObject { public FinalizableObject() { Console.WriteLine("Instance initialized"); } ~FinalizableObject() { Console.WriteLine("Instance finalized"); } } A program that create...
Rule of thumb: when garbage collection occurs, "live objects" are those still in use, while "dead objects" are those no longer used (any variable or field referencing them, if any, has gone out of scope before the collection occurs). In the following example (for convenience, Fi...

Page 777 of 861