Tutorial by Examples: st

To get a list of the processes running in the current terminal, you can use ps : $ sleep 1000 & $ ps -opid,comm PID COMMAND 1000 sh 1001 sleep 1002 ps To kill a running process, use kill with the process ID (PID) indicated by ps: $ kill 1001 $ ps -opid,comm PID COMMAND 1000 sh...
Reading the content of a Reader as a String: // Reading from a file try (Reader reader = new FileReader("in.txt")) { String content = CharStreams.toString(reader); // do something with content } Reading the content of a Reader as a list of line contents: try (Reader reader = n...
int val = 10; // val will be printed to the extreme left end of the output console: std::cout << val << std::endl; // val will be printed in an output field of length 10 starting from right end of the field: std::cout << std::setw(10) << val << std::endl; This ...
Traditionally, you can use routing to map an the request with the Routing Component who handled request and response parameters by HttpFoundation Component. Additionally, a custom route parameter can be created by using the FOSRestBundle to extends the default functionalities of the Routing Compone...
Custom matchers can be added in jasmine using the syntax: jasmine.addMatchers([ toMatch: function () { return { compare: function (actual, expected) { return { pass: actual===expected, message: "Expected actual to match expected...
Protractor can selectively run groups of tests using fdescribe() instead of describe(). fdescribe('first group',()=>{ it('only this test will run',()=>{ //code that will run }); }); describe('second group',()=>{ it('this code will not run',()=>{ //code...
Protractor allows tests to be set as pending. This means that protractor will not execute the test, but will instead output: Pending: 1) Test Name Temporarily disabled with xit Or, if disabled with xdescribe(): Pending: 1) Test Name No reason given Combinations A xit() within an xdesc...
Time complexity is a property of Problems someone might want to solve computationally, Algorithms designed to solve such problems and Programs implementing such algorithms. An abstract concept requires no installation or setup. Simply take any problem, algorithm, or code and ask "How lo...
Doubly Linked Lists are a type of linked list. A doubly linked list's nodes have two "pointers" to other nodes, "next" and "previous." It is called a double linked list because each node only has two "pointers" to other nodes. A doubly linked list may have a h...
There is a dozen implementations of Standard ML. MLton produces very optimized code, but has no REPL. SML/NJ is the most widely used, but has slightly difficult error messages for learning purposes. Moscow ML and Poly/ML are easy to get started with, but don't support the .mlb package format. That i...
// Set up Express var express = require('express'); var app = express(); // Serve files from the absolute path of the directory app.use(express.static(__dirname + '/public')); // Start Express server app.listen(3030);
- Without quotes: You can just split a long piece of text like this. - With quotes: "[But be careful: if you \"need\" punctuation, put double quotes around it. You can ev\ en split without spaces by using backslashes." - Or single quotes: 'This wor...
Here is the JSON Structure we are going to use. { "employees": [ { "firstName": "John", "lastName": "Doe", "skills": [ { "name": "javascript", "rating&quo...
Detailed instructions on getting phonegap-build set up or installed.
Overview Android Studio's built-in update mechanism can be set to receive updates through any one of these four channels: Canary: Bleeding edge, released about weekly. These are early previews released in order to obtain real-world feedback during development. The canary channel will always have...
Detailed instructions on getting retrofit set up or installed.
Sometimes there are sections of code that are difficult to test, such as accessing a database, or interacting with the user. You can stub out those sections of code, allowing the rest of the code to be tested. Let's start with a class that prompts the user. For simplicity, it has only two methods...
Go to the Microsoft link for the OpenXML SDK download. Click the red download button. On the next screen click the box next to OpenXMLSDKToolV25.msi and click next to begin the download. Once the download is complete, launch the OpenXMLSDKToolV25.msi and follow the instructions on the screen. Th...
When you try to restore database from another server you might get the following error: Error 3154: The backup set holds a backup of a database other than the existing database. In that case you should use WITH REPLACE option to replace database with the database from backup: RESTORE DATABAS...
I have previously written documentation on this site in order to describe how to make web services on Symfony I will write again a tutorial for the symfony >= 3 version. We think that we have a installed web-server on a configured version of Symfony Framework. You must have composer (php packag...

Page 256 of 369