Tutorial by Examples: dp

Renders text as justified paragraphs. REQUIRES the example Justified text Example render Top paragraph has setting.compact = true and bottom false and line spacing is 1.2 rather than the default 1.5. Rendered by code usage example bottom of this example. Example code // Requires justified...
foo() { while [[ "$#" -gt 0 ]] do case $1 in -f|--follow) local FOLLOW="following" ;; -t|--tail) local TAIL="tail=$2" ;; esac shift done echo "FOLLOW: $FOLLOW" echo "TAIL: $...
You can take a look at the full code in this working Plunker. In this example I use a shared service to handle the communication between the pages inside the tab (child pages) and the tab container (the component that holds the tabs). Even though you probably could do it with Events I like the shar...
Detailed instructions on getting wordpress-theming set up or installed. Wordpress is opensource.You can find large set of theme for use free or premium themes.All theme are provide a documentation for install and use. What you have to understand while choose a theme? Wordpress version you are ...
CustomProgressBarActivity.java: public class CustomProgressBarActivity extends AppCompatActivity { private TextView txtProgress; private ProgressBar progressBar; private int pStatus = 0; private Handler handler = new Handler(); @Override protected void onCreate(Bun...
SVG Patterns behave significantly differently than CSS background images when filling equivalent shapes. This can lead to significant surprises for new-comers to SVG. Below are examples of a pattern defined in all possible combinations of patternUnits and patternContentUnits - showing how these sett...
DP to Pixel: private int dpToPx(int dp) { return (int) (dp * Resources.getSystem().getDisplayMetrics().density); } Pixel to DP: private int pxToDp(int px) { return (int) (px / Resources.getSystem().getDisplayMetrics().density); }
As described in the remarks section the Android build system uses the Android Plugin for Gradle to support building Android applications with Gradle. You can specify the Android Plugin for Gradle version in the top-level build.gradle file. The plugin version applies to all modules built in that And...
By default stored procedures and functions or not generated by mysqldump, you will need to add the parameter --routines (or -R): mysqldump -u username -p -R db_name > dump.sql When using --routines the creation and change time stamps are not maintained, instead you should dump and reload the ...
Create example table Employee: CREATE TABLE Employee ( Id INT, EmpName VARCHAR(25), EmpGender VARCHAR(6), EmpDeptId INT ) Creates stored procedure that checks whether the values passed in stored procedure are not null or non empty and perform insert operation in Employee ta...
Dynamic SQL enables us to generate and run SQL statements at run time. Dynamic SQL is needed when our SQL statements contains identifier that may change at different compile times. Simple Example of dynamic SQL: CREATE PROC sp_dynamicSQL @table_name NVARCHAR(20), @col_name NVARCHAR(2...
The Runtime.exec(String ...) and Runtime.exec(String) methods allow you to execute a command as an external process1. In the first version, you supply the command name and the command arguments as separate elements of the string array, and the Java runtime requests the OS runtime system to start th...
GET your REST data and store in a PowerShell object: $Post = Invoke-RestMethod -Uri "http://jsonplaceholder.typicode.com/posts/1" Modify your data: $Post.title = "New Title" PUT the REST data back $Json = $Post | ConvertTo-Json Invoke-RestMethod -Method Put -Uri "h...
GET your REST data and store in a PowerShell object: $Users = Invoke-RestMethod -Uri "http://jsonplaceholder.typicode.com/users" Modify many items in your data: $Users[0].name = "John Smith" $Users[0].email = "[email protected]" $Users[1].name = "Jane S...
After finding an official Julia package, it is straightforward to download and install the package. Firstly, it's recommended to refresh the local copy of METADATA: julia> Pkg.update() This will ensure that you get the latest versions of all packages. Suppose that the package we want to inst...
Some experimental packages are not included in the METADATA package repository. These packages can be installed by directly cloning their Git repositories. Note that there may be dependencies of unregistered packages that are themselves unregistered; those dependencies cannot be resolved by the pack...
Type below command: instmodsh It'll show you the guild as below: Available commands are: l - List all installed modules m <module> - Select a module q - Quit the program cmd? Then type l to list all the installed modules, you can also use command m &l...
The background script is like any other JavaScript code. You can debug it using same tools you debug other JavaScript code in Chrome. To open the Chrome Developer Tools, go to chrome://extensions, and turn on Developer mode: Now you can debug any extension that have a background page or script. ...
Select following from Menu : File -> New... -> Other... click on "Next >" Enter Project name required for the project, in following dialog box : click on "Next >" If you want to run the project in standalone mode then, Select "Yes" for "Would ...
First, add a reference to <EEPROM.h> at the start of your sketch: #include <EEPROM.h> Then your other code: // Stores value in a particular address in EEPROM. There are almost 512 addresses present. // Store value 24 to Address 0 in EEPROM int addr = 0; int val = 24...

Page 12 of 21