Tutorial by Examples: 7

display: inline-block; The display property with the value of inline-block is not supported by Internet Explorer 6 and 7. A work-around for this is: zoom: 1; *display: inline; The zoom property triggers the hasLayout feature of elements, and it is available only in Internet Explorer. The *di...
C++17 Thanks to int std::uncaught_exceptions(), we can implement action which executes only on success (no thrown exception in scope). Previously bool std::uncaught_exception() just allows to detect if any stack unwinding is running. #include <exception> #include <iostream> templa...
C++17 Thanks to int std::uncaught_exceptions(), we can implement action which executes only on failure (thrown exception in scope). Previously bool std::uncaught_exception() just allows to detect if any stack unwinding is running. #include <exception> #include <iostream> template ...
The same example above, Image loading, can be written using async functions. This also allows using the common try/catch method for exception handling. Note: as of April 2017, the current releases of all browsers but Internet Explorer supports async functions. function loadImage(url) { return...
In this iText 7 example, we will create a Hello World example in different languages, using different fonts: public void createPdf(String dest) throws IOException { PdfDocument pdf = new PdfDocument(new PdfWriter(dest)); try (Document document = new Document(pdf)) { PdfFont fon...
In this iText 7 example, we need to switch between different styles in the same document: The best way to achieve this in iText 7, is to create a Style object, and to apply that Style to a Text object: public void createPdf(String dest) throws IOException { PdfDocument pdf = new PdfDocument...
In this example, we'll create the following table using iText 7: We'll need the Table and Cell class to achieve this: public void createPdf(String dest) throws IOException { PdfDocument pdf = new PdfDocument(new PdfWriter(dest)); try (Document document = new Document(pdf)) { T...
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 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 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 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...
Xcode by itself has quite a few good tools built in, but sometimes you just want to change a specific behavior or create a convenience shortcut. That's why there's Alcatraz. Installation curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | sh Throw this ...
In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73. So, be sure if you have Java in your system. If not, then follow the procedure: # Install wget with yum yum -y install w...
The following are the steps that you will need to follow to setup mysql datasource in JBoss AS 7. Download the MySQL jdbc zip file from here: Create a directory mysql inside /jboss-as-7.1.1.Final/modules/com Inside that create a directory structure like the following: /jboss-as-7.1.1.Final/m...
In this iText 7 example, we'll create a text field and we'll add it to a PDF: public void manipulatePdf(String src, String dest) throws IOException { PdfReader reader = new PdfReader(src); PdfDocument pdf = new PdfDocument(reader, new PdfWriter(dest)); PdfAcroForm form = PdfAcroFor...
In this iText 7 example, we'll change the properties and the value of a text field: public void manipulatePdf(String src, String dest) throws IOException { PdfReader reader = new PdfReader(src); PdfDocument pdf = new PdfDocument(reader, new PdfWriter(dest)); PdfAcroForm form = PdfA...
1. Overview In this article we are going to discuss how to get started with Enterprise JavaBeans (EJB). We will use JBoss AS 7.1.1.Final, but you are free to use any server of your choice. 2. Maven Dependencies for Bean In order to use EJB make sure you add the latest version of it to the depende...
Sometimes we want to use a where query on a a collection of records returned which is not ActiveRecord::Relation.Hence we get the above error as Where clause is know to ActiveRecord and not to Array. There is a precise solution for this by using Joins. EXAMPLE:- Suppose i need to find all user ...
I need to query all the details from virtual machine and update into the MongoDB. Which require the output look like this. { "_id" : ObjectId("5800509f23888a12bccf2347"), "ResourceGrp" : "XYZZ-MachineGrp", "ProcessTime" : ISODate(&q...
You cannot alter the array's contents through the loop variable because it's a temporary each element is being assigned to. Dim cars(2) 'collection of different cars Dim trace 'track iteration details cars(0) = "Ford" cars(1) = "Audi" cars(2) = "Prius" For Each ca...

Page 2 of 3