Tutorial by Examples: di

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...
Once you are connected to a Gatt Server, you're going to be interacting with it by writing and reading from the server's characteristics. To do this, first you have to discover what services are available on this server and which characteristics are avaiable in each service: @Override public voi...
An entity is the information that your bot extracts from a particular utterance conforming to an intent. Eg- Let My name is John Doe belong to an intent called introduction. For your bot to understand and extract the name John Doe from the sentence, you need to define an entity which does so. You c...
The raycaster has an origin, where its ray starts, and a direction, where the ray goes. The origin of the raycaster is at the raycaster entity’s position. We can change the origin of the raycaster by setting the position component of the raycaster entity (or parent entities of the raycaster entity)...
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...
Except main @conditional annotation there are set of similar annotation to be used for different cases. Class conditions The @ConditionalOnClass and @ConditionalOnMissingClass annotations allows configuration to be included based on the presence or absence of specific classes. E.g. when OObjectDa...
First, determine the source file for this particular driver. Found it at drivers/usb/serial/ftdi_sio.c. ./scripts/get_maintainer.pl drivers/usb/serial/ftdi_sio.c And the results: Johan Hovold <[email protected]> (maintainer:USB SERIAL SUBSYSTEM) Greg Kroah-Hartman <gregkh@linuxfounda...
If you have a multidimensional array like this: [ ['foo', 'bar'], ['fizz', 'buzz'], ] And you want to change it to an associative array like this: [ 'foo' => 'bar', 'fizz' => 'buzz', ] You can use this code: $multidimensionalArray = [ ['foo', 'bar'], ...
Elasticsearch provides data manipulation & data searching capabilities in almost real time. under this example, we have update, delete & batch processing operations. Updating the same document. Suppose we have already indexed a document on /car/external/1 . Then running the command for i...
In order to load data from a MongoDB database into an R dataframe, use the library MongoLite: # Use MongoLite library: #install.packages("mongolite") library(jsonlite) library(mongolite) # Connect to the database and the desired collection as root: db <- mongo(collection = &quo...
Redis-py provides the execute_command method to directly invoke Redis operations. This functionality can be used to access any modules that may not have a supported interface in the redis-py client. For example, you can use the execute_command to list all of the modules loaded into a Redis server:...
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 ...
Audio and video assets will only block the scene if we set autoplay or if we set preload="auto": <a-scene> <a-assets> <!-- These will not block. --> <audio src="blockus.mp3"></audio> <video src="loadofblocks.mp4">&...
A-Frame's animation system can animate different types of properties. vec3 Properties A-Frame has standard vec3 components (i.e., position, rotation, and scale). These components consist of three factors: X, Y, and Z. We can pass three space-delimited numbers to the from and to attributes just a...
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <p> <input id="cbGroup1" type="checkbox">Select all <input name="cbGroup1" type="checkbox" value="value1_1">Group1 v...
Directional lights are like a light source that is infinitely far away, but shining from a specific direction, like the sun. Thus, absolute position do not have an effect on the intensity of the light on an entity. We can specify the direction using the position component. The example below creates...
libavformat usually takes in a file name and reads media directly from the filesystem. If you want to read from memory (such as streams), do the following: // Define your buffer size const int FILESTREAMBUFFERSZ = 8192; // A IStream - you choose where it comes from IStream* fileStreamData; ...
Opening a media file from the local file system. AVFormatContext *formatContext; // Open the file if(avformat_open_file(&formatContext, "path/to/file.ogg", NULL, NULL) < 0){ // Error opening file } // Do something with the file // Free resources avformat_close_inpu...
Formats contain one or more encoded and muxed streams. We usually read these in chunks, which are often called frames (though in certain cases, FFmpeg refers exclusively to decoded, raw media chunks as frames, and encoded chunks as packets, which may be confusing). To read a single frame from a form...
The API call avio_alloc_context, which sets up a custom IO context, takes in a pointer to a Read function. If you are reading from an IStream, you can use the following: /** * Reads from an IStream into FFmpeg. * * @param ptr A pointer to the user-defined IO data structure. * @param b...

Page 156 of 164