When you have a huge JSON database, adding a value event listener doesn't make sense. It will return the huge JSON and parsing it would be time consuming. In such cases we can use pagination and fetch part of data and display or process it. Kind of like lazy loading or like fetching old chats when u...
In [1]: df = pd.DataFrame({'A': [1, 2, 3], 'B': [1.0, 2.0, 3.0], 'C': ['a', 'b', 'c'],
'D': [True, False, True]})
In [2]: df
Out[2]:
A B C D
0 1 1.0 a True
1 2 2.0 b False
2 3 3.0 c True
Getting a python list from a series:
In [3]: df['...
Magento is a very popular eCommerce application. It offers a great deal of customization and abilities from initial install. Here are a few suggestions for optimizing a Magento installation.
Enabling Output Compression
In your .htaccess file for Magento you will find a section of text starting wit...
First-time visitors to any web page has to make several HTTP requests. By using the “Expires” header you make the components of the requests cacheable. This avoids unnecessary HTTP requests on subsequent page views.
You want to find the area of the .htaccess file that starts with <IfModulemod_ex...
Merge JS and CSS Files
This particular tweak will reduce the number of HTTP requests on your eCommerce site.
[box type=”alert” border=”full”]Note: This can sometimes break some applications. After performing the following steps, please ensure that the site still performs as it did before enabling ...
The task is to find the length of the longest subsequence in a given array of integers such that all elements of the subsequence are sorted in ascending order. For example, the length of the longest increasing subsequence(LIS) for {15, 27, 14, 38, 26, 55, 46, 65, 85} is 6 and the longest increasing ...
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 ...
This chapter describes how to set up a Docker Container with Jenkins inside, which is capable of sending Docker commands to the Docker installation (the Docker Daemon) of the Host. Effectively using Docker in Docker. To achieve this, we have to build a custom Docker Image which is based on an arbitr...
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...
Joda-Time is a robust alternative to the Java date and time classes.
Prior to Java SE 8, the standard Java date and time classes like java.util.Calendar are difficult to use and prone to errors. Joda-Time emerged as the de-facto standard library for date and time manipulation in many open-source-pr...
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 caching problem arises from the limitation of finite space. Lets assume our cache C has k pages. Now we want to process a sequence of m item requests which must have been placed in the cache before they are processed.Of course if m<=k then we just put all elements in the cache and it will wo...
Adding the aurelia-configuration to a cli application sometimes produces a build error. This is caused by a missing dependency so we simply add the dependency to the build bundle.
Try the following:
npm install deep-extend --save
npm install aurelia-configuration --save
Now add the followi...
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...
Two-element tuples
(,) is an example of a type that has a Bifunctor instance.
instance Bifunctor (,) where
bimap f g (x, y) = (f x, g y)
bimap takes a pair of functions and applies them to the tuple's respective components.
bimap (+ 2) (++ "nie") (3, "john") --> (5,...
Preface
Instead of starting with a formal definition, the goal is to approach these topic via a row of examples, introducing definitions along the way. The remark section Theory will consist of all definitions, theorems and propositions to give you all informations to faster look up specific aspect...
A LocalDate is a date without a timezone. Consider using them when you are only concerned with the year, month, and day of month and are not interested in an exact time. For example, when we write our date of birth (such as 1960-01-01) we don't care about the timezone in which it happened.