Tutorial by Examples: 3

First, add the following permissions to the manifest of your project in order to enable device storage access: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> ...
Sometimes we want to use a where query on a a collection of records returned which is not ActiveRecord::Relation.Hence we get the above error as Where clause is know to ActiveRecord and not to Array. There is a precise solution for this by using Joins. EXAMPLE:- Suppose i need to find all user ...
Objective-C //Checking for 3-D Touch availability if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)] && (self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable)) { [self registerForPreviewingWithDelegate:self sourceVie...
$MachinesList # Array $ResourceList # Array $MachineTags # Array pseudo code $mongoDriverPath = 'C:\Program Files (x86)\MongoDB\CSharpDriver 1.7'; Add-Type -Path "$($mongoDriverPath)\MongoDB.Bson.dll"; Add-Type -Path &qu...
To proceed with the deployment to S3, we will install these plugins: ember-cli-deploy-s3-index: It uploads the index.html to S3 with revision information, and activates it ember-cli-deploy-s3: It uploads the assets (js, css and other media files) to S3 As they are Ember addon you can easily i...
ROT13 is a special case of Caesar cipher, with a 13 shift. Only letters are changed, and white-space and special characters are left as they are. What is interesting is that ROT13 is a reciprocal cipher : applying ROT13 twice will give you the initial input. Indeed, 2 * 13 = 26, the number of lette...
Below is an example of Gstreamer pipeline embedded in a simple gtk window. When run, a small window should appear like this: import gi gi.require_version('Gtk', '3.0') gi.require_version('Gst', '1.0') from gi.repository import Gtk, Gst Gst.init(None) Gst.init_check(None) class GstWidg...
Given a text file test.txt: Ford Jeep Honda The following script is processing this text file: 'Read in File Data to an array, separate by newline vb equivalent (vbcrlf) Dim car, cars Dim filefullname : filefullname = "C:\testenv\test.txt" cars = Split(CreateObject("Scriptin...
Dim mdArray(2,3) mdArray(0, 0) = "test1" mdArray(0, 1) = "test2" mdArray(0, 2) = "test3" mdArray(0, 3) = "test4" mdArray(1, 0) = "test5" mdArray(1, 1) = "test6" mdArray(1, 2) = "test7" mdArray(1, 3) = "test8" md...
When the select statement is executed, it displays the given items prefixed with a number and then displays the PS3 prompt: export PS3=" To choose your language type the preceding number : " select lang in EN CA FR DE; do # check input here until valid. break done
Encapsulating an OpenGL object in C++98/03 requires obeying the C++ rule of 3. This means adding a copy constructor, copy assignment operator, and destructor. However, copy constructors should logically copy the object. And copying an OpenGL object is a non-trivial undertaking. Equally importantly,...
Here's how to translate objects in P3D: size(200, 200, P3D); //Starting P3D renderer fill(255, 0, 0, 150); //transparent red rect(10, 10, 100, 100); //first rectangle fill(0, 0, 255, 150); //transparent blue translate(50, 50, 50); //translate x, y and z by 50 pixels rect(0, 0, 100, 100); //sec...
There are three functions for 3D rotation: rotateX(angle), rotateY(angle) and rotateZ(angle) for rotation in their respective axes where angle is in radians. size(200, 200, P3D); //Starting P3D renderer fill(255, 0, 0, 150); //transparent red translate(width/2, height/2);//translate to centre, ie...
(Note: There are many IDE, toolchain and library which are ready-to-use with STM32. The following setup requires minimal effort to get it work, but it is only one of the many. Feel free to explore others, it is not the purpose of this example to force anyone to use the tools that will be used here.)...
Registration in AppDelegate import UserNotifications in didFinishLaunchingWithOptions method, UNUserNotificationCenter.current().requestAuthorization(options: [.alert,.sound,.badge]) { (granted, error) in // Here you can check Request is Granted or not. } Create and Schedule notificat...
1)Took backup of Machine.config from locations C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config and C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config 2)Copy them to different location and edit them as a)locate and add under <system.data> <DbProviderFactories> ...
USE [MyDatabase] CREATE MESSAGE TYPE [//initiator] VALIDATION = WELL_FORMED_XML; GO CREATE CONTRACT [//call/contract] ( [//initiator] SENT BY INITIATOR ) GO CREATE QUEUE InitiatorQueue; GO CREATE QUEUE TargetQueue; GO CREATE SERVICE InitiatorService ON QUEUE...
Introduction System Workbench for STM32 is a free IDE on Windows, Linux and OS X. Description from ST Microelectronics: The System Workbench toolchain, called SW4STM32, is a free multi-OS software development environment based on Eclipse, which supports the full range of STM32 microcontrollers...
The sqlite3 module was written by Gerhard Häring. To use the module, you must first create a Connection object that represents the database. Here the data will be stored in the example.db file: import sqlite3 conn = sqlite3.connect('example.db') You can also supply the special name :memory: to ...
These functions will hash either String or Data input with one of eight cryptographic hash algorithms. The name parameter specifies the hash function name as a String Supported functions are MD2, MD4, MD5, SHA1, SHA224, SHA256, SHA384 and SHA512 This example requires Common Crypto It is nece...

Page 7 of 11