Tutorial by Examples

When you have to use both PIL and Pygame because missing functionalities in both of them, you need a way to convert between Pygame Surfaces and PIL Images, preferably without writing them to the disk. For that you can use "tostring" and "fromstring" functions provided in both li...
Wolfram define Mathematica as "The world's definitive system for modern technical computing". A bold statement which is partially true. It's probably not the most predominant (as you have to pay quite a bit for commercial use) system so people use Python or R for example. What it is, is th...
Boxplots are descriptive diagrams that help to compare the distribution of different series of data. They are descriptive because they show measures (e.g. the median) which do not assume an underlying probability distribution. The most basic example of a boxplot in matplotlib can be achieved by jus...
function getGoogleDriveFileById(id) { var file; file = DriveApp.getFileById(id);//Returns a file - The "id" must be a string //One way to manually get a file ID // - Open the file from Google Drive // - The file ID is in the URL in the browsers address bar //https...
Step 1: Create a transition drawable in XML Save this file transition.xml in res/drawable folder of your project. <transition xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/image1"/> <item android:drawable=...
In a procedure with native compilation, T-SQL code is compiled to dll and executed as native C code. To create a Native Compiled stored Procedure you need to: Use standard CREATE PROCEDURE syntax Set NATIVE_COMPILATION option in stored procedure definition Use SCHEMABINDING option in stored pro...
Code in natively compiled function will be transformed into C code and compiled as dll. To create a Native Compiled scalar function you need to: Use standard CREATE FUNCTION syntax Set NATIVE_COMPILATION option in function definition Use SCHEMABINDING option in function definition Instead of...
Native compiled table value function returns table as result. Code in natively compiled function will be transformed into C code and compiled as dll. Only inline table valued functions are supported in version 2016. To create a native table value function you need to: Use standard CREATE FUNCTIO...
# hello_server.py import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) # URL Mapping if __n...
Imagine you have a simple dataframe to plot on a barplot like: df = pd.DataFrame({'a':[1,2,3,4,5], 'b':[10,5,2,4,5]}) using seaborn: sns.barplot(df['a'], df['b'], palette='Blues_d') you can obtain something like: then you can also play with the palette option and colormap adding a gradien...
Binding a Swift Library in Xamarin.iOS follows the same process for Objective-C as shown in https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/, but with some caveats. A swift class must inherit from NSObject to be binded. Swift compiler will translate class and protoco...
One of the biggest appeals of Nginx is the difference in how it works internally as compared to the other popular servers, specially Apache. Servers are busy programs as they have to serve requests from multiple clients. The more requests a server can successfully serve per second, the better. Ngi...
Once a while concecuent deploys to internal tomcat start giving constant error, without any clear cause (Listener start or ClassNotFoundException). When nothing seems to cure it, this procedure saves the world: 1 delete Servers folder 2 restart Eclipse 3 create new server, add project and start...
The container creates a singleton bean and injects collaborators into it only once. This is not the desired behavior when a singleton bean has a prototype-scoped collaborator, since the prototype-scoped bean should be injected every time it is being accessed via accessor. There are several solution...
Add a :cljsbuild node like the following to your project.clj file. :cljsbuild { :builds { ;;Different target goals should have different names. ;;We have the dev build here :dev { ;;The ClojureScript c...
The most common and flexible way to create a service uses the angular.module API factory: angular.module('myApp.services', []).factory('githubService', function() { var serviceInstance = {}; // Our first service return serviceInstance; }); The service factory function can be ...
Here we will be creating a Groovy pipeline in Jenkins 2 to do the following steps : Verify every 5 minutes if new code has been commited to our project Checkout code from SCM repo Maven compile of our Java code Run our integration tests and publish the results Here are the steps we will : ...
The easiest way to import CarouselView is to use the NuGet-Packages Manager in Xamarin / Visual studio: To use pre-release packages, make sure you enable the 'Show pre-release packages' checkbox at the left corner. Each sub-project (.iOS/.droid./.WinPhone) must import this package.
The basics In the heading of ContentPage, insert following line: xmlns:cv="clr-namespace:Xamarin.Forms;assembly=Xamarin.Forms.CarouselView" Between the <ContentPage.Content> tags place the CarouselView: <cv:CarouselView x:Name="DemoCarouselView"> </cv:Carous...
- name: Installing Oracle Java and support libs apt: pkg={{ item }} with_items: - python-software-properties - oracle-java8-installer - oracle-java8-set-default - libjna-java

Page 842 of 1336