Tutorial by Examples: sin

CSS div { /* check remarks before usage */ height: 200px; width: 400px; background-image: url(http://lorempixel.com/400/200/nature/4); mask-image: linear-gradient(to top right, transparent 49.5%, white 50.5%), linear-gradient(to top left, transparent 49.5%, white 50.5%), linear-gradient...
When inheriting from any base class, only one partial class needs to have the base class specified. // PartialClass1.cs public partial class PartialClass : BaseClass {} // PartialClass2.cs public partial class PartialClass {} You can specify the same base class in more than one partial clas...
We can use Channel to copy file content faster. To do so, we can use transferTo() method of FileChannel . import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel; public class FileCopier { ...
Reading file using a BufferedInputStream generally faster than FileInputStream because it maintains an internal buffer to store bytes read from the underlying input stream. import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; public class FileReadin...
public static void main(String[] args) throws Exception { File jarFile = new File("Input.jar"); Map<String, ClassNode> nodes = JarUtils.loadClasses(jarFile); Map<String, byte[]> out = JarUtils.loadNonClassEntries(jarFile); Map<String, String> map...
To write data to a file using Channel we need to have the following steps: First, we need to get an object of FileOutputStream Acquire FileChannel calling the getChannel() method from the FileOutputStream Create a ByteBuffer and then fill it with data Then we have to call the flip() method of ...
We can use PrintStream class to write a file. It has several methods that let you print any data type values. println() method appends a new line. Once we are done printing, we have to flush the PrintStream. import java.io.FileNotFoundException; import java.io.PrintStream; import java.time.Local...
An SKView does not need to fill the whole screen and can share space with other UI controls. You can even have more than one SKView displayed at once if you wish. To create a smaller SKView amongst other controls with Interface Builder, first create a normal ViewController, then drag and drop a new...
We can use org.apache.commons.lang3.RandomUtils to generate random numbers using a single line. int x = RandomUtils.nextInt(1, 1000); The method nextInt(int startInclusive, int endExclusive) takes a range. Apart from int, we can generate random long, double, float and bytes using this class. R...
Go to the GitHub website Open your repository Click Settings Under GitHub Pages, click "Launch Automatic Page Generator" Follow the instructions
Edit your package.json to add the following script : { "scripts": { "lint": "eslint .;exit 0" } } Then run it using npm run lint We use exit 0 as a trick to gracefully terminate the script when linting fails, otherwise npm will use eslint return code an...
Two erlang processes can communicate with each other, wich is also known as message passing. This procedure is asynchronous in the form that the sending process will not halt after sending the message. Sending Messages This can be achieved with the construct Pid ! Message, where Pid is a valid pr...
using System.Text.RegularExpressions; string pattern = ":(.*?):"; string lookup = "--:text in here:--"; // Instanciate your regex object and pass a pattern to it Regex rgxLookup = new Regex(pattern, RegexOptions.Singleline, TimeSpan.FromSeconds(1)); // Get the match from y...
Syntax $array = array( '' => , ); # can pass array $singelData = ''; # something just a filed value $this->load->model('model_name'); $this->model_name->method_name($singelData, $array); Practice $array = array( 'name' => 'codeigniter', 'version' =&g...
It is generally not considered 'best practice' to re-purpose the reserved names of Properties or Methods as the name(s) of your own procedures and variables. Bad Form - While the following is (strictly speaking) legal, working code the re-purposing of the Find method as well as the Row, Column and ...
This sample annotation indicates that the following method is deprecated. @deprecated def anUnusedLegacyMethod(someArg: Any) = { ... } This can also be equivalently written as: @deprecated def anUnusedLegacyMethod(someArg: Any) = { ... }
.SD .SD refers to the subset of the data.table for each group, excluding all columns used in by. .SD along with lapply can be used to apply any function to multiple columns by group in a data.table We will continue using the same built-in dataset, mtcars: mtcars = data.table(mtcars) # Let's not ...
zo opens a fold underneath the cursor. zO opens all folds underneath the cursor, recursively. zc closes a fold underneath the cursor. zC closes all folds underneath the cursor, recursively. za toggles a fold under the cursor (a closed fold is opened, an opened fold is closed). zM closes all f...
[SerializeField] GameObject[] gameObjects; ProsConsGreat performanceObject collection is staticPortable codeCan only refer to GameObjects from the same scene
AlertDialog is a subclass of Dialog that can display one, two or three buttons. If you only want to display a String in this dialog box, use the setMessage() method. The AlertDialog from android.app package displays differently on different Android OS Versions. The Android V7 Appcompat library pro...

Page 59 of 161