Tutorial by Examples: ti

The code snippet below shows the various ways you can filter on an array of objects using lodash. let lodash = require('lodash'); var countries = [ {"key": "DE", "name": "Deutschland", "active": false}, {"key": "ZA&qu...
Inserting a row at the bottom of a spreadsheet is easy: var someSheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0]; someSheet.appendRow(["Frodo", "Baggins", "Hobbit", "The Shire", 33]); Note this will add the row after the last non-empty row. I...
A thread terminates if it reaches the end of its code block. The best way to terminate a thread early is to convince it to reach the end of its code block. This way, the thread can run cleanup code before dying. This thread runs a loop while the instance variable continue is true. Set this variable...
Detailed instructions on getting rebol set up or installed. The most mature and stable version of Rebol is the official Rebol2, available from the downloads page for multiple platforms. There are 2 flavors: Rebol/View (version with gui, ~ 0.6 MB) Rebol/Core (no gui, for servers, ~ 0.3 MB) ...
Sometimes, you need to output to more than one index in ElasticSearch, or have a custom mapping you want to apply to new indices as they roll in. There are two ways to apply a custom mapping. One way, is to upload an ElasticSearch template. See the ElasticSearch documentation for that. The other ...
Always use Named Arguments to optional parameters, to avoid potential bugs when the method is modified. class Employee { public string Name { get; private set; } public string Title { get; set; } public Employee(string name = "<No Name>", string title = "&lt...
Detailed instructions on getting c#-4.0 set up or installed.
As of the C 2011 Standard, listed in §5.1.1.2 Translation Phases, the translation of source code to program image (e.g., the executable) are listed to occur in 8 ordered steps. The source file input is mapped to the source character set (if necessary). Trigraphs are replaced in this step. Contin...
You can customize the appearance of the TextInputLayout and its embedded EditTextby defining custom styles in your styles.xml. The defined styles can either be added as styles or themes to your TextInputLayout. Example for customizing the hint appearance: styles.xml: <!--Floating label text st...
<template> <div class="hello"> <p>{{ filtered() }}</p> </div> </template> <script> export default { name: 'hello', data () { return { list: ['toto', 'titi', 'tata', 'tete'] } }, methods: { filtered ...
After a while, you end up with many configuration items in your config.yml. It can make you configuration easier to read if you split your configuration across multiple files. You can easily include all files from a directory this way: config.yml: imports: - { resource: parameters.yml } ...
Create a new database. $ wp db create Drop an existing database. $ wp db drop --yes Reset the current database. $ wp db reset --yes Execute a SQL query stored in a file. $ wp db query < debug.sql
This one-liner illustrates some of the basic series operations. Before analysing, we'll initiate a block to be manipulated: stuff: [chair lamp table book carpet] Now our one-liner: head insert stuff take back tail stuff There are five operations within this example, and with each of them it...
Go to Hardware -> Touch Pressure: To simulate a normal press, use Shift-Command-1 and a deep one, Shift-Command-2. If your MacBook has a Force Touch trackpad, you could use your trackpad force to simulate 3D / Force Touch.
Home button You should use Shift-Command-H to have an animation when closing an app. Lock To lock the device, use Command-L. Rotation Use Command with arrow keys.
1- Run the app on a real device and attach it to Xcode debugger. 2- From Debug menu, select Simulate Background Fetch: 3- Now Xcode will pause the app with SIGSTOP signal. Just tap the continue button to let the app do the background fetch. Now you will see that data is fetched and ready for ...
Django's signals are restricted to precise class signatures upon registration, and thus subclassed models are not immediately registered onto the same signal. Take this model and signal for example class Event(models.Model): user = models.ForeignKey(User) class StatusChange(Event): ...
Creating a Scala function that receives an python RDD is easy. What you need to build is a function that get a JavaRDD[Any] import org.apache.spark.api.java.JavaRDD def doSomethingByPythonRDD(rdd :JavaRDD[Any]) = { //do something rdd.map { x => ??? } }
First, complete the installation and setup to connect your app to Firebase. Then from anywhere in your class, you can write: // Write a message to the database FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference myRef = database.getReference("message"); myRe...
Gradle (All Versions) When adding multiple third party plugins you do not need to separate them into different instances of the buildscript(All) or plugin(2.1+) code, new plug ins can be added alongside pre-existing plugins. buildscript { repositories { maven { url "https://plu...

Page 433 of 505