Tutorial by Examples: c

##= #= Service::Start # # USAGE: # ${Service::Start} "NAME" /DISABLEFSR $0 $1 # # ::Start = Start a service. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return after call # $1 ...
##= #= Service::Stop # # USAGE: # ${Service::Stop} "NAME" /DISABLEFSR $0 $1 # # ::Stop = Sends a STOP control request to a service. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return aft...
##= #= Service::Remove # # USAGE: # ${Service::Remove} "NAME" /DISABLEFSR $0 $1 # # ::Remove = Deletes a service entry from the registry. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return...
We can put assembly instructions inside a macro and use the macro like you would call a function. #define mov(x,y) \ { \ __asm__ ("l.cmov %0,%1,%2" : "=r" (x) : "r" (y), "r" (0x0000000F)); \ } /// some definition and assignment unsigned char sbox[...
_id is a 12 bytes hexadecimal number which assures the uniqueness of every document. You can provide _id while inserting the document. If you didn't provide then MongoDB provide a unique id for every document. These 12 bytes first 4 bytes for the current timestamp, next 3 bytes for machine id, next ...
Reduce is a function which will take an array, function and accumulator and use accumulator as seed to start the iteration with the first element to give next accumulator and the iteration continues for all the elements in the array (refer below example) defmodule MyList do def reduce([], _func,...
You will need to install node.js - https://nodejs.org/en/ npm install -g @angular/cli - install the CLI by executing this command in the terminal ng new projectname - after executing this command in the terminal, you will create a new sub folder titled projectname in your current folder. cd pro...
Let's assume we have a search results page that displays a user's search query back to them. The code below is an example of how this could be done in PHP: Results for "<?php echo $_GET['query'] ?>" For this to work, you would access the page with a URL like: https://yoursite.te...
In this example, we take a sine curve plot and add more features to it; namely the title, axis labels, title, axis ticks, grid and legend. # Plotting tutorials in Python # Enhancing a plot import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2.0*np.pi, 101) y = np.sin(x) ...
Similar to the previous example, here, a sine and a cosine curve are plotted on the same figure using separate plot commands. This is more Pythonic and can be used to get separate handles for each plot. # Plotting tutorials in Python # Adding Multiple plots by superimposition # Good for plots sha...
Because Node.js runs on a single process uncaught exceptions are an issue to be aware of when developing applications. Silently Handling Exceptions Most of the people let node.js server(s) silently swallow up the errors. Silently handling the exception process.on('uncaughtException', functio...
There are two methods using which you can consume data from AWS S3 bucket. Using sc.textFile (or sc.wholeTextFiles) API: This api can be used for HDFS and local file system as well. aws_config = {} # set your aws credential here sc._jsc.hadoopConfiguration().set("fs.s3n.awsSecretAccessK...
Many custom views need to accept user interaction in the form of touch events. You can get access to touch events by overriding onTouchEvent. There are a number of actions you can filter out. The main ones are ACTION_DOWN: This is triggered once when your finger first touches the view. ACTION_MO...
HTML (classes used are based on Semantic-UI) <div id="app" class="ui grid"> <div class="row"> <div class="column"> <div class="ui label">Vechicle Make</div> <select class="ui dropdown"...
Seismic is an Android device shake detection library by Square. To use it just start listening to the shake events emitted by it. @Override protected void onCreate(Bundle savedInstanceState) { sm = (SensorManager) getSystemService(SENSOR_SERVICE); sd = new ShakeDetector(() -> { /* rea...
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
ImageMagick includes a number of command-line utilities for manipulating images. Here we will use compare command-line tool. compare tool is very useful. Suppose you want to test (e.g. layout, color, icons etc.) the difference between your expected design UI HTML file with actual result of JSP...
pry is a powerful tool that can be used to debug any ruby application. Setting up a ruby-on-rails application with this gem is very easy and straightforward. Setup To start debugging your application with pry Add gem 'pry' to the application's Gemfile and bundle it group :development, :test ...
As recently Apple rolled out iOS11 and Xcode-9, we can now debug apps on devices without connecting devices to Xcode through USB. We can take advantage of wireless debugging feature added to this Xcode-9. To enable wireless debugging, we have to configure some steps in Xcode. 1 First connect the ...

Page 791 of 826