Tutorial by Examples: al

Given a string what is the longest palindromic subsequence(LPS) of it? Let's take a string agbdba. The LPS of this string is abdba of length 5. Remember, since we're looking for subsequence, the characters need not to be continuous in the original string. The longest palindromic substring of the seq...
In order to search for packages in the databse, searching both in packages' names and descriptions: pacman -Ss string1 string2 ... To install a single package or list of packages (including dependencies), issue the following command: sudo pacman -S package_name1 package_name2 ... source
This Documentation is a small summary of the offical one Prerequisites Your PC must be running a 64-bit version of Windows 10 Anniversary Update build 14393 or later To find your PC's CPU architecture and Windows version/build number, open Settings>System>About. Look for the OS Build ...
Given coins of different denominations and a total, in how many ways can we combine these coins to get the total? Let's say we have coins = {1, 2, 3} and a total = 5, we can get the total in 5 ways: 1 1 1 1 1 1 1 1 2 1 1 3 1 2 2 2 3 The problem is closely related to knapsack problem. The o...
Given coins of different denominations and a total, how many coins do we need to combine to get the total if we use minimum number of coins? Let's say we have coins = {1, 5, 6, 8} and a total = 11, we can get the total using 2 coins which is {5, 6}. This is indeed the minimum number of coins require...
Using the library archive Download the JAR and add it to the classpath for your Java project Using a build tool If you are using a build tool like Maven or Gradle: Maven <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> ...
The official site of angular-ui-bootstrap is here. Follow the below instructions in order. The list of files that are to be downloaded is in this link Include all references in this order. angular.js angular-animate.js ui-bootstrap-tpls-2.2.0.js (Reference to UI Bootstrap ) angular-sanitiz...
A given year-month-day: LocalDate oneJanuaryNineteenSixty = new LocalDate(1960,1,1); Today's date: LocalDate today = LocalDate.now() Tomorrow: LocalDate tomorrow = LocalDate.now().plusDays(1); Yesterday: LocalDate yesterday = LocalDate.now().minusDays(1); Two weeks ago: LocalDate tw...
Converting a java.util.Calendar object: Calendar rightNow = Calendar.getInstance(); LocalDate today = LocalDate.fromCalendarFields(rightNow); Converting a java.util.Date object: Date rightNow = new Date(); LocalDate today = LocalDate.fromDateFields(rightNow); Converting a string: String d...
There's a useful set of type combinators for building big Functors out of smaller ones. These are instructive as example instances of Functor, and they're also useful as a technique for generic programming, because they can be used to represent a large class of common functors. The identity functor...
Description: mov copies values of bits from source argument to destination argument. Common source/destination are registers, usually the fastest way to manipulate values with[in] CPU. Another important group of source_of/destination_for values is computer memory. Finally some immediate values m...
This is usually used for renaming or shortening long namespace references such referring to components of a library. namespace boost { namespace multiprecision { class Number ... } } namespace Name1 = boost::multiprecision; // Both Type declarations are equivale...
Alias Declaration are affected by preceding using statements namespace boost { namespace multiprecision { class Number ... } } using namespace boost; // Both Namespace are equivalent namespace Name1 = boost::multiprecision; namespace Name2 = multiprecision; ...
Although not necessary in PHP however it is a very good practice to initialize variables. Uninitialized variables have a default value of their type depending on the context in which they are used: Unset AND unreferenced var_dump($unset_var); // outputs NULL Boolean echo($unset_bool ? "tr...
To compare the difference of two dates, we can do the comparison based on the timestamp. var date1 = new Date(); var date2 = new Date(date1.valueOf() + 5000); var dateDiff = date1.valueOf() - date2.valueOf(); var dateDiffInYears = dateDiff/1000/60/60/24/365; //convert milliseconds into years ...
Detailed instructions on getting parse-server set up or installed.
Detailed instructions on getting seo set up or installed.
On Debian-based distributions (e.g. Ubuntu), follow the following steps. Get Bitcoin Package: apt-add-repository ppa:bitcoin/bitcoin Update: apt-get update Install: apt-get install bitcoind –y Reboot: reboot After rebooting confirm Bitcoin was installed by checking for the directory ~/.bitc...
Detailed instructions on getting tdd set up or installed.
# imports import weka.core.converters.ConverterUtils.DataSource as DS import weka.classifiers.Evaluation as Evaluation import weka.classifiers.trees.J48 as J48 import java.util.Random as Random import os # load data data = DS.read(os.environ.get("MOOC_DATA") + os.sep + "annea...

Page 205 of 269