The DirectX SDK is included within the Windows SDK, in all versions past Windows SDK v8. Normally, the Windows SDK is installed with Visual Studio (any version past Visual Studio 2012), however, it can be installed separately. Previously, the DirectX SDK was available as a separate installation, the...
Here is how to create a custom calendar. The example given is a french calendar -- so it provides many examples.
from pandas.tseries.holiday import AbstractHolidayCalendar, Holiday, EasterMonday, Easter
from pandas.tseries.offsets import Day, CustomBusinessDay
class FrBusinessCalendar(AbstractH...
Here is how to use the custom calendar.
Get the holidays between two dates
import pandas as pd
from datetime import date
# Creating some boundaries
year = 2016
start = date(year, 1, 1)
end = start + pd.offsets.MonthEnd(12)
# Creating a custom calendar
cal = FrBusinessCalendar()
# Getti...
Let's discuss with an example. From n items, in how many ways you can choose r items? You know it is denoted by . Now think of a single item.
If you don't select the item, after that you have to take r items from remaining n-1 items, which is given by .
If you select the item, after that you hav...
No matter how many problems you solve using dynamic programming(DP), it can still surprise you. But as everything else in life, practice makes you better. Keeping these in mind, we'll look at the process of constructing a solution for DP problems. Other examples on this topic will help you understan...
This attribute used t identify a method that is called once to perform setup before any child tests are run. For the new versions we are using OneTimeSetUp as the TestFixtureSetUp is obsolete.
OneTimeSetUp
[OneTimeSetUp]
public void SetUp()
{
}
A public gist can be almost anything.
A simple example of a Javascript function:
function randomInt(min, max) {
return Math.floor((max - min + 1) * Math.random()) + min;
}
A secret gist should be used for anything that you don't want to appear publicly on GitHub. Secret gists can be used when you don't want private keys to be accessible to the public, or for and private code in general.
A simple example of JSON code that would be better fit for a secret gist:
{
&qu...
Go to Tools -> Options. Go to Environment -> Keyboard -> Query Shortcuts
On the right side you can see some shortcuts which are by default in SSMS. Now if you need to add a new one, just click on any column under Stored Procedure column.
Click OK. Now please go to a query window and sel...
Import the namespace System.Runtime.Caching(Make sure that you have added System.Runtime.Caching DLL to your project reference).
Create an instance of MemoryCache class.
MemoryCache memCache = MemoryCache.Default;
Add values to MemoryCache
public IQueryable<tblTag> GettblTags()
...
Most Rx operators take an optional scheduler on which to schedule their future iterations. If not supplied they will use their default configured scheduler. Supplying a scheduler can be useful for testing purposes in which we like to talk about virtual time instead of real time for speed of test exe...
Create a folder where you would like to have your game live, and move into that
mkdir my-new-game
cd my-new-game
Initialize the directory using npm.
npm init -y
Install phaser as a node package.
npm install phaser
Install http-server as a global module, to be used on the...
With the Tap Gesture, you can make any UI-Element clickable (Images, Buttons, StackLayouts, ...):
(1) In code, using the event:
var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += (s, e) => {
// handle the tap
};
image.GestureRecognizers.Add(tapGestureR...
Open a raster that covers the globe and extract a subset of the raster.
import gdal
# Path to a tiff file covering the globe
# http://visibleearth.nasa.gov/view.php?id=57752
tif_name = "/path_name/land_shallow_topo_21600.tif"
# Open raster in read only mode
ds = gdal.Open(tif_n...
Dependencies:
GNU Make Version > 3.80
an ISO/ ANSI C-Compiler (e.g. gcc)
an extractor like tar or gzip
zlib-devel
readline-devel oder libedit-devel
Sources:
Link to the latest source (9.6.3)
Now you can extract the source files:
tar -xzvf postgresql-9.6.3.tar.gz
There are a large ...
Before we get our hands dirty with code, I feel it is necessary to understand how data is stored in firebase. Unlike relational databases, firebase stores data in JSON format. Think of each row in a relational database as a JSON object (which is basically unordered key-value pair). So the column nam...
Take a use case, like a chat app or a collaborative grocery list app (that basically requires a list of objects to be synced across users). If you use firebase database and add a value event listener to the chat parent node or grocery list parent node, you will end with entire chat structure from th...
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['...
When we put the control of Label, the Label does not provide any event.
<Label x:Name="lblSignUp Text="Dont't have account?"/>
as shown the Label only display purpose only.
When the user want to replace Button with Label, then we give the event for Label.
As shown below:
XA...
Login to your administration area and go to – System > Cache
Management
Next, click on the Select All link
Finally, make sure the Actions is set to Enable and click submit
Disable Error Logging
Login to your administration area and go to – System > Configuration > Developer
Under ...