Tutorial by Examples: er

var WebSocketServer = require('ws').Server , wss = new WebSocketServer({ port: 8080 }); // If you want to add a path as well, use path: "PathName" wss.on('connection', function connection(ws) { ws.on('message', function incoming(message) { console.log('received: %s', message); ...
Spinner It is a type of dropdown input. Firstly in layout <Spinner android:id="@+id/spinner" <!-- id to refer this spinner from JAVA--> android:layout_width="match_parent" android:layout_height="wrap_content"> </Spinner> ...
add_filter('comment_text','before_comment'); add_filter('comment_text','after_comment'); function before_comment($comment_text){ return 'input before comment'.$comment_text; } function after_comment($comment_text){ return $comment_text.'input after comment'; ...
Basic docs can be found here app.get('/path/:id(\\d+)', function (req, res, next) { // please note: "next" is passed if (req.params.id == 0) // validate param return next(new Error('Id is 0')); // go to first Error handler, see below // Catch error on sync operation ...
app.use() and middleware can be used for "before" and a combination of the close and finish events can be used for "after". app.use(function (req, res, next) { function afterResponse() { res.removeListener('finish', afterResponse); res.removeListener('clos...
Unlike some other Bootstrap components like Buttons, the Alerts do not come with a default or primary styling, because they are meant to alert the user in a specific way. <div class="alert alert-success" role="alert"> Some action was completed successfully </div&g...
When required you can tell Docker to execute additional commands on an already running container using the exec command. You need the container's ID which you can get with docker ps. docker exec 294fbc4c24b3 echo "Hello World" You can attach an interactive shell if you use the -it option...
String base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; void setup() { Serial.begin(9600); // Turn the serial protocol ON Serial.println("Start Typing"); } void loop() { if (Serial.available() > 0) { // Check if data has bee...
You can create a new cron entry by simply typing crontab -e on the command line. If it's the first time you want to edit your crontab(le), you will be prompted with an editor selection: no crontab for <user> - using an empty one Select an editor. To change later, run 'select-editor'. ...
We have a set of data We would like to see by using the following expression in the detail textbox. we can achieve the Remark =IIF(Fields!Points.Value>=10,"Good","Average")
Using the Swift class Mirror works if you want to extract name, value and type (Swift 3: type(of: value), Swift 2: value.dynamicType) of properties for an instance of a certain class. If you class inherits from NSObject, you can use the method class_copyPropertyList together with property_getAttrib...
If you want to upload .ipa file to itunesconnect without integrating developer account in Xcode and you want to use application loader. then you can generate .ipa with iTunes . Step 1 :- Select device inplace of simulator. Step 2 :- Go to Product -> select Archive Step 3 :- After complited...
It's a good practice to encode state of Single Page Application (SPA) in url: my-app.com/admin-spa/users/edit/id123 This allows to save and share application state. When user puts url into browser's address bar and hits enter server must ignore client-side part of the requested url. If you serv...
When building a React application, it is often desirable to divide components based on their primary responsibility, into Presentational and Container components. Presentational components are concerned only with displaying data - they can be regarded as, and are often implemented as, functions tha...
In this example you will learn how to use Microsoft Cognitive Services with Xamarin iOS mobile application. We will use Computer Vision API to detect what is in the picture. Once you create Xamarin.iOS project please add below NuGet package to the project: https://www.nuget.org/packages/Microsoft....
using NUnit.Framework; namespace MyModuleTests { [TestFixture] public class MyClassTests { [TestCase(1, "Hello", true)] [TestCase(2, "bye", false)] public void MyMethod_WhenCalledWithParameters_ReturnsExpected(int param1, string para...
The BluetoothLE API was introduced in API 18. However, the way of scanning devices has changed in API 21. The searching of devices must start with defining the service UUID that is to be scanned (either officailly adopted 16-bit UUID's or proprietary ones). This example illustrates, how to make an A...
When decorating filters, name parameter must include Filter suffix (case sensitive). If filter is called repeat, decorator parameter is repeatFilter. Below we'll decorate custom filter that repeats any given string n times so that result is reversed. You can also decorate angular's build-in filters ...
(Access Code)[https://github.com/vDoers/vDoersCameraAccess]
Process manager is generally used in production to deploy a nodejs app. The main functions of a process manager are restarting the server if it crashes, checking resource consumption, improving runtime performance, monitoring etc. Some of the popular process managers made by the node community are ...

Page 265 of 417