Tutorial by Examples: ed

Prerequisites : ChromeDriver is downloaded Copy the following code into your class. public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "path of the exe file\\chromedriver.exe"); } If you're using linux, give the path to the ChromeDri...
`To calculate 1D convolution by hand, you slide your kernel over the input, calculate the element-wise multiplications and sum them up. The easiest way is for padding=0, stride=1 So if your input = [1, 0, 2, 3, 0, 1, 1] and kernel = [2, 1, 3] the result of the convolution is [8, 11, 7, 9, 4], whic...
A-Frame can be developed from a plain HTML file without having to install anything! A great way to try out A-Frame to remix the starter example on Glitch, an online code editor that instantly hosts and deploys for free. Or create an .html file and include A-Frame in the head: <html> <he...
The following permissions are required to use the Bluetooth APIs: android.permission.BLUETOOTH android.permission.BLUETOOTH_ADMIN If you're targeting devices with Android 6.0 (API Level 23) or higher and want to perform scanning/advertising operations you will require a Location permission: a...
You can use Bluetooth LE Advertising to broadcast data packages to all nearby devices without having to establish a connection first. Bear in mind that there's a strict limit of 31 bytes of advertisement data. Advertising your device is also the first step towards letting other users connect to you....
The default icon of the Date-Picker in the Extension Library from OpenNTF is nice but not sexy. You can change it to one of the cool "Font Awesome Icons". First, add a DatePicker component to your page: <xe:djDateTextBox id="datePickerComp" value="#{myDoc.myDateField}&q...
from requests import post payload = {'key1' : 'value1', 'key2' : 'value2' } foo = post('http://httpbin.org/post', data=payload) To pass form encoded data with the post operation, data must be structured as dictionary and supplied as the data parameter. If the data d...
This section will contain some of the most advanced examples realized using Multithreading. Advanced printer (logger) A thread that prints everything is received and modifies the output according to the terminal width. The nice part is that also the "already written" output is modified w...
For Swift 3.1: In the first example one can see how you would intercept the user interacting with a textfield while writing. Similarly, there are methods in the UITextFieldDelegate that are called when a user has started and ended his interaction with a TextField. To be able to access these method...
A common problem might be trying to iterate over Array which has no values in it. For example: Dim myArray() As Integer For i = 0 To UBound(myArray) 'Will result in a "Subscript Out of Range" error To avoid this issue, and to check if an Array contains elements, use this oneliner: If...
This example shows how to have a view track a pan gesture and depart in a physics-based manner. Swift class ViewController: UIViewController { // Adjust to change speed of view from flick let magnitudeMultiplier: CGFloat = 0.0008 lazy var dynamicAnimator: UIDynamicAnimator ...
4.4 Defaults ... ... The default Size depends on the type. For integer it is 8. For float it is 64. For binary it is the size of the specified binary: 1> Bin = << 17/integer, 3.2/float, <<97, 98, 99>>/binary >>. <<17,64,9,153,153,153,153,153,154,97,98,99>...
4.4 Defaults [Beginning omitted: <<3.14>> isn't even legal syntax.] The default Size depends on the type. For integer it is 8. For float it is 64. For binary it is the actual size of the specified binary: 1> Bin = << 17/integer, 3.2/float, <<97, 98, 99>>/binary...
EQ checks if two values have the same address of memory: in other words, it checks if the two values are are actually the same, identical object. So, it is can be considered the identity test, and should be applied only to structures: conses, arrays, structures, objects, typically to see if you ...
We can use the child-attached and child-detached events to listen for when the scene attaches or detaches an entity: entity.addEventListener('child-attached', function (evt) { if (evt.detail.el.tagName.toLowerCase() === 'a-box') { console.log('a box element has been attached'); }; }); ...
When an entity includes multiple mixins that define the same component properties, the right-most mixin takes precedence. In the example below, the entity includes both red and blue mixins, and since the blue mixin is included last, the final color of the cube will be blue. <a-scene> &l...
If you want to use WebVR content mixed with HTML content, for example when you're making a extended showcase key content, you could use the embedded tag. When you're using this, it's possible to look around inside 360° content using the gyroscope of your smartphone or click and drag on computer. &l...
If your application does not need any HTTP interface (for example for a console only app), you will want to disable at least Twig and SensioFrameworkExtra Just comment out those lines: app/AppKernel.php $bundles = [ //... // new Symfony\Bundle\TwigBundle\TwigBundle(), // new Sensio\Bundl...
Command git cherry shows the changes which haven't yet been cherry-picked. Example: git checkout master git cherry development ... and see output a bit like this: + 492508acab7b454eee8b805f8ba906056eede0ff - 5ceb5a9077ddb9e78b1e8f24bfc70e674c627949 + b4459544c000f4d51d1ec23f279d9cdb19c1d32b...
Drupal itself provide good caching options to increase the page speed and serve pages fast to end users. Caches are used to improve the performance of your Drupal site. But it also has a drawback that sometimes it could lead the "stale" data. This means, sometimes, the system may start to ...

Page 136 of 145