Tutorial by Examples: dev

To allow multiple user registration on Ejabberd server, we need to configure file ejabberd.yml in Ejabberd latest versions. Configure ejabberd.yml like: in access_rules: add register: - allow register_from: - allow registration_timeout: - infinity mod_register: acc...
CleverTapAPI cleverTap; try { cleverTap = CleverTapAPI.getInstance(getApplicationContext()); } catch (CleverTapMetaDataNotFoundException e) { // thrown if you haven't specified your CleverTap Account ID or Token in your AndroidManifest.xml } catch (CleverTapPermissionsNotSatisfied e) { /...
Sometimes Android's logcat is running infinitely with errors coming from some process not own by you, draining battery or just making it hard to debug your code. A convenient way to fix the problem without restarting the device is to locate and kill the process causing the problem. From Logcat 03...
Getting set up to use webdev takes some time, if you're doing anything more than tweaking a bit of text. Here are the initial setup steps: $ mkdir site $ cd site $ git clone [email protected]:dart-lang/site-webdev.git $ source ./scripts/env-set.sh $ ./scripts/install-dart-sdk.sh $ ./s...
Ffmpeg is a swiss knife for streaming project. For any kind of device streaming you only need to get the specification of device. To list the device ffmpeg -f dshow -list_devices true -i dummy Command prompt will list all the aviable device on machine. [dshow @ 0000000004052420] DirectShow vid...
Interceptors are a good tool for implementing cross-cutting concerns such as logging or authentication. Let's say we have a following service: public interface IService { string CreateOrder(NetworkCredential credentials, Order orderToCreate); string DeleteOrder(NetworkCredential credenti...
It's possible to pass variables from your server into Pug for dynamic content or script generation. Pug templates can access variables passed to the res.render function in Express (or pug.renderFile if you are not using Express, the arguments are identical). index.js let colors = ["Red",...
TL;DR It basically allows us to simulate real devices and test our apps without a real device. According to Android Developer Documentation, an Android Virtual Device (AVD) definition lets you define the characteristics of an Android Phone, Tablet, Android Wear, or Android TV device that you w...
Let's say you use Webpack for front end bundling. You can add webpack-dev-middleware to serve your statics through tiny and fast server. It allows you to automatically reload your assets when content has changed, serve statics in memory without continuously writing intermediate versions on disk. Pr...
# install sbt with homebrew (if you didn't) brew install sbt # - create a new scala project # - name your project name when asked like: hello-world sbt new sbt/scala-seed.g8 # go to the new project directory that you named cd hello-world # run sbt to open the sbt shell sbt # run you...
A wordpress theme consists two types of files. The basic files that each theme has and the files that define the theme's layout and functionality. This second group i'm going to call the theme specific files. The basic theme files The basic theme files are the files that are used to setup and regi...
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....
How we can use jenkins in our SalesForce product development. What are the tools plugins are available for Jenkins Integration How to solve CI configuration issue.....etc
OpenCL Kernels can be either executed on the GPU or the CPU. This allows for fallback solutions, where the customer may have a very outdated system. The programmer can also choose to limit their functionality to either the CPU or GPU. To get started using OpenCL, you'll need a 'Context' and a 'Devi...
Sonim devices have varying by model a lot of different custom buttons: PTT_KEY com.sonim.intent.action.PTT_KEY_DOWN com.sonim.intent.action.PTT_KEY_UP YELLOW_KEY com.sonim.intent.action.YELLOW_KEY_DOWN com.sonim.intent.action.YELLOW_KEY_UP SOS_KEY com.sonim.intent.action.SOS_KEY_DOWN co...
PTT Button android.intent.action.PTT.down android.intent.action.PTT.up Confirmed on: RG730, RG740A
hello_world.c #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #define AUTHOR "Bruce Lee" #define DESC "Hello World driver" static int __init init(void) { printk(KERN_DEBUG "Hello World\n"); return 0;...
To ensure that a GPU version TensorFlow process only runs on CPU: import os os.environ["CUDA_VISIBLE_DEVICES"]="-1" import tensorflow as tf For more information on the CUDA_VISIBLE_DEVICES, have a look to this answer or to the CUDA documentation.
To use a particular set of GPU devices, the CUDA_VISIBLE_DEVICES environment variable can be used: import os os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" # see issue #152 os.environ["CUDA_VISIBLE_DEVICES"]="0" # Will use only the first GPU device os.en...

Page 8 of 9