Tutorial by Examples

In Java: Call the setAutoSizeTextTypeUniformWithConfiguration() method: setAutoSizeTextTypeUniformWithConfiguration(int autoSizeMinTextSize, int autoSizeMaxTextSize, int autoSizeStepGranularity, int unit) In XML: Use the autoSizeMinTextSize, autoSizeMaxTextSize, and autoSizeStepGranularity att...
In Java: Call the setAutoSizeTextTypeUniformWithPresetSizes() method: setAutoSizeTextTypeUniformWithPresetSizes(int[] presetSizes, int unit) In XML: Use the autoSizePresetSizes attribute in the layout XML file: <TextView android:id=”@+id/autosizing_textview_presetsize” android:la...
The advantage of using vim over a simple text editor like notepad or gedit is that it allows the user to customize it's almost everything about itself. If you ever find yourself doing some kind of action over and over again, vim has a multitude of features that will help you do this action faster a...
The easiest way to get up and running with vue-router is to use the version provided via CDN. HTML: <script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://unpkg.com/vue-router/dist/vue-router.js"></script> <div id="rou...
Detailed instructions on getting google-compute-engine set up or installed.
For this example, let model be a Keras model for classifying video inputs, let X be a large data set of video inputs, with a shape of (samples, frames, channels, rows, columns), and let Y be the corresponding data set of one-hot encoded labels, with a shape of (samples, classes). Both datasets are s...
Foreign Keys constraints ensure data integrity, by enforcing that values in one table must match values in another table. An example of where a foreign key is required is: In a university, a course must belong to a department. Code for the this scenario is: CREATE TABLE Department ( Dept_Code...
To create a customization package replacing images on the login page, follow the steps below on your local Acumatica instance: Create a new folder in the Acumatica instance folder. For this example I added a folder called IconsCustomized in my local LoginImages instance: Add your custom ...
If you have a date stored as a string you will need to parse it. Use time.Parse. // time.Parse( format , date to parse) date, err := time.Parse("01/02/2006", "04/08/2017") if err != nil { panic(err) } fmt.Println(date) // Prints 2017-04-08 00:00:00 +00...
Using yield break as opposed to break might not be as obvious as one may think. There are lot of bad examples on the Internet where the usage of the two is interchangeable and doesn't really demonstrate the difference. The confusing part is that both of the keywords (or key phrases) make sense only...
For this example, let's assume that the inputs have a dimensionality of (frames, channels, rows, columns), and the outputs have a dimensionality of (classes). from keras.applications.vgg16 import VGG16 from keras.models import Model from keras.layers import Dense, Input from keras.layers.pooling...
Creating app project When creating an Android app ready for the app store it's important when using ionic start that we add --appname|-a and --id|-i flags which is used for google play to identify your app from other apps. If you're starting a new mobile app project you can use the cli example b...
using System; using System.Collections.Generic; using System.Linq; using DocumentFormat.OpenXml; using A = DocumentFormat.OpenXml.Drawing; using DW = DocumentFormat.OpenXml.Drawing.Wordprocessing; using PIC = DocumentFormat.OpenXml.Drawing.Pictures; using DocumentFormat.OpenXml.Drawing.Wordpr...
Now open the document using OpenXML, you must add an imagePart that references the picture object to the MainDocumentPart object by using a file stream, and get the ID of the image string temp; MainDocumentPart mainPart = document.MainDocumentPart; ImagePart ima...
In office OpenXML, a picture that is inserted into a word document is considered a "Blip" Object or element. The class is derived from the DocumentFormat.OpenXml.Drawing the Blip must have an Embed value that is an imagePart ID. The Blip object then goes inside a BlipFill Object/element, a...
Now you have a reference of the image. Insert the image into the shapes in the template document. To do this, you will have to use some LINQ to iterate through the document and get a reference to all the shapes in the document. The wps:spPr element you see in the above XML code is the xml element fo...
Now that you have a collection of all the shape references in the document. Loop through the collection with a foreach, and through each iteration create a Blip object. Set the Blip object embed value to the picture ID reference you captured earlier from the image part. Also create a Stretch object...
A DataTrigger can be attached to any property, be it on it's own control, another control, or even a property in a non UI class. Consider the following simple class. public class Cheese { public string Name { get; set; } public double Age { get; set; } public int StinkLevel { get; s...
Conditionals in Pug can evaluate statements in a manner similar to JavaScript. You can evaluate variables created in Pug, or those passed to it by your route (res.render, pug.renderFile, etc). index.js var authorized = true res.render("index", { authorized: authorized }); index...
You can choose to prepend an if or else operator with a dash, but it is not necessary. You will need to wrap the statement in parentheses, though (if you omit a dash, you do not need parentheses.) - var showLogin = false; - if (showLogin === true) .welcome Welcome back to our website! - else...

Page 1212 of 1336