Tutorial by Examples: 5

In addition to image classification datasets, Caffe also have "HDF5Data" layer for arbitrary inputs. This layer requires all training/validation data to be stored in hdf5 format files. This example shows how to use python h5py module to construct such hdf5 file and how to setup caffe &quo...
The summation 1/1 + 1/4 + 1/9 + 1/16 + ... out to infinity converges to π2 / 6, and therefore any summation of the form 1/1 + 1/4 + 1/9 + 1/16 + ... + 1/n2 is Θ(1).
Capabilities of the Canvas Canvas lets you programmatically draw onto your webpage: Images, Texts, Lines and Curves. Canvas drawings can be extensively styled: stroke width, stroke color, shape fill color, opacity, shadowing, linear gradients and radial gradients, font face, font ...
In this iText 5 example, we will create a Hello World example in different languages, using different fonts: public void createPdf(String dest) throws DocumentException, IOException { Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream(dest)); ...
In this iText 5 example, we need to switch between different styles in the same document: The best way to do this in iText 5, is to create a convenience method that creates a Chunk in the style that needs to be used frequently; see the createBgChunk() method: public Chunk createBgChunk(String s,...
In this example, we'll create the following table using iText 5: We need the PdfPTable and PdfPCell class to achieve this: public void createPdf(String dest) throws IOException, DocumentException { Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream...
Suppose that we have the following text file: jekyll_hyde.txt How do we convert it to a PDF that looks like this: When using iText 5, we'd use the following code: public void createPdf(String dest) throws DocumentException, IOException { Document document = new Document(); PdfWriter....
Suppose that we have the following text file: jekyll_hyde.txt How do we convert it to a PDF that looks like this: When using iText 5, you'd need code like this: public void createPdf(String dest) throws DocumentException, IOException { Document document = new Document(); PdfWriter wr...
Suppose that we have the following text file: jekyll_hyde.txt How do we convert it to a PDF that looks like this: Note the blue border that is added to the titles, and the page number at the bottom of each page. In iText 5, these elements are added using page events: class MyPageEvents extends ...
Suppose that we want to create a simple Hello World document: In iText 5, this would be done like this: public void createPdf(String dest) throws DocumentException, IOException { Document document = new Document(); PdfWriter.getInstance( document, new FileOutputStream(des...
The TLC5940 is a handy item to have when you run out of PWM ports on the Arduino. It has 16 channels, each individually controllable with 12 bits of resolution (0-4095). An existing library is available at http://playground.arduino.cc/Learning/TLC5940. It is useful for controlling multiple servos or...
Guice is the default dependency injection (further DI) framework of Play. Other frameworks may be used as well, but using Guice makes development efforts easier, since Play takes care for things under the veil. Injection of Play API-s Starting from Play 2.5 several API-s, which were static in the ...
Put the following code in functions.php: function themify_custom_excerpt_length( $length ) { return 50; } add_filter( 'excerpt_length', 'themify_custom_excerpt_length', 999 ); Use 999 as the priority to ensure that the function runs after the default WordPress filter, otherwise it would ov...
Helpers and fakeApplication Class Helpers is used a lot for unit tests. It imitates a Play application, fakes HTTP requests and responses, session, cookies - all whatever may be needed for tests. A controller under the test should be executed in a context of a Play application. The Helpers method f...
One of most common use cases of Gitflow Initialize repo and define branches $ git flow init # if you use default setup, you'll define six types of branches: # # main branches (lives forever) # # 1. master: for production releases # 2. develop: for "next ...
When using html5Mode([mode]) it is necessary that: You specify the base URL for the application with a <base href=""> in the head of your index.html. It is important that the base tag comes before any tags with url requests. Otherwise, this might result in this error - &quo...
//Create a layout var tableLayout = new sap.ui.commons.layout.MatrixLayout({ layoutFixed : false, columns : 2, width : "100%", height : "100%", widths : [ "20%","80%"] }).addStyleClass('dsAvailLayout'); sap.ui.table.Table.extend(...
Authentication filters Are a new kind of filter added in ASP.NET MVC 5.0 .That run prior to authorization filters in the ASP.NET MVC pipeline and allow you to specify authentication logic per-action, per-controller, or globally for all controllers. Authentication filters process credentials in th...
webpack 2 introduces tree shaking which can remove unused code when ES2015 modules are used to import and export code. Install npm install babel-preset-es2015-webpack --save-dev Usage in .babelrc: { "presets": [ "es2015-webpack" ] }
Goto - http://www.jorambarrez.be/blog/2010/08/02/tutorial-a-bpmn-2-0-hello-world-with-activiti-5-0-alpha4-in-5-steps/ A very Good and detailed tutorial by Joram Barrez (one of the core Developer of Activiti)

Page 3 of 6