Tutorial by Examples: 2

Sprite animation consists in showing an existing sequence of images or frames. First import a sequence of images to the asset folder. Either create some images from scratch or download some from the Asset Store. (This example uses this free asset.) Drag every individual image of a single animati...
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 you have the following text file: jekyll_hyde.txt How do we convert it to a PDF that looks like this: When using iText 7, we'd need the following code: public void createPdf(String dest) throws IOException { PdfDocument pdf = new PdfDocument(new PdfWriter(dest)); Document...
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 you have the following text file: jekyll_hyde.txt How do we convert it to a PDF that looks like this: When using iText 7, you'd need code like this: public void createPdf(String dest) throws IOException { PdfDocument pdf = new PdfDocument(new PdfWriter(dest)); Document do...
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 you have the following text file: jekyll_hyde.txt How do we convert it to a PDF that looks like this: Note the page numbers at the bottom of each page. These are added using an IEventHandler implementation: protected class Footer implements IEventHandler { @Override pub...
Suppose that you have the following text file: jekyll_hyde.txt How do we convert it to a PDF that looks like this: Note that this is very similar to what we had before, but the border of the titles now has rounded corners. We created a custom ParagraphRenderer to achieve this, and we created a T...
Suppose that we wanted to create a simple Hello World document: In iText 7, we could do that like this: public void createPdf(String dest) throws IOException { PdfDocument pdf = new PdfDocument(new PdfWriter(dest)); Document document = new Document(pdf); document.add(new Paragraph...
For example you want to use surfaceView in ng2-nativescript. As we don't have surfaceView in nativescript we should use placeholder. first we should import the requirements: import {Component} from "@angular/core"; import placeholder = require("ui/placeholder"); let applicat...
app.component.ts: import {Component,OnInit} from "@angular/core"; import placeholder = require("ui/placeholder"); let application= require("application"); @Component({ selector: "my-app", templateUrl: "app.component.html", }) export...
def search_news_by_entity(location,timestamp): query = """ MATCH (n)-[]->(l) where l.name='%s' and n.timestamp='%s' RETURN n.news_id limit 10 """ query = query % (location,timestamp) news_ids = [] for res in graph.cypher.e...
Modern versions of Jenkins (version 2.x) come with a "Build Pipeline Plugin" that can be used to orchestrate complex CI tasks without creating a multitude of interconnected jobs, and allow you to easily version-control your build / test configuration. You may install this manually in a &q...
Here is an example of a pipeline script that builds a Docker container, then runs the tests inside of it. The entrypoint is assumed to be either manage.py or invoke/fabric with a runtests command available. #!/usr/bin/groovy node { stage 'Checkout' checkout scm sh 'git submodule update ...
Log on to the Azure classic portal. In the left navigation pane of the portal, click Service Bus. Select the namespace that you would like to create the queue in. In this case, it is “mytestns1.” Select Queues. Select New in the bottom left corner, then select Quick Creat...
Apache 2.4 provides the following 6 directives via the mod_rewrite module: RewriteBase RewriteCond RewriteEngine RewriteMap RewriteOptions RewriteRule The following directives, available previously in Apache 2.2 have been removed: RewriteLock RewriteLog RewriteLogLevel All the dir...
CREATE DATABASE SAMPLEDB; This will create a new database called sampledb.
CONNECT TO SAMPLEDB; From the command line (db2clp, terminal, db2cmd) you can write: db2 CONNECT TO SAMPLEDB
The following statement will create a new table called employee: CREATE TABLE EMPLOYEE ( EMPNO CHAR(6) NOT NULL, FIRSTNME VARCHAR(12) NOT NULL, LASTNAME VARCHAR(15) NOT NULL, SALARY DECIMAL(9,2) , PRIMARY KEY (EMPNO) ...
Let's suppose we are going to insert rows in the previously created table. We can explicitly name the columns we are going to out values is and its order: INSERT INTO EMPLOYEE (EMPNO, FIRSTNME, LASTNAME, SALARY) VALUES ( '123456', 'Ali', 'Veli', 100000); If we know the order and we are going...

Page 9 of 21