Tutorial by Examples: sin

btn class of Twitter-bootstrap can be used with any of the following html elements. anchor button input with both type="button" and type="submit" Below are examples of all possible use cases of btn class <a class="btn" href="#" role="button&qu...
When Vim opens a file with <CR><NL> line endings (common on MSDOS based operating systems, also called CRLF) it will set fileformat to dos, you can check what with: :set fileformat? fileformat=dos Or just :set ff? fileformat=dos To convert it to <NL> line endings (com...
Class for which you will create unit test case. class Authorization { /* Observer so that mock object can work. */ public function attach(Curl $observer) { $this->observers = $observer; } /* Method for which we will create test */ public function postAuthorization($url, $met...
UI-Router exposes transition events that can be helpful for handling transition errors, handling/blocking transitions based on certain parameter values, custom authentication etc.. These events can be bound to $rootScope for a global effect or to $scope for a per controller effect. $stateChangeE...
Sometimes you might want to pass information that has been generated in one form, to another form for additional use. This is useful for forms that display a search tool, or a settings page among many other uses. Let's say you want to pass a DataTable between a form that is already open (MainForm) ...
Here are a simple example of some common tasks related to developing an API, differentiating between the HTTP Method of the request, accessing query string values and accessing the request body. Resources http.Handler interface http.ResponseWriter http.Request Available Method and Status cons...
When you have to use both PIL and Pygame because missing functionalities in both of them, you need a way to convert between Pygame Surfaces and PIL Images, preferably without writing them to the disk. For that you can use "tostring" and "fromstring" functions provided in both li...
function getGoogleDriveFileById(id) { var file; file = DriveApp.getFileById(id);//Returns a file - The "id" must be a string //One way to manually get a file ID // - Open the file from Google Drive // - The file ID is in the URL in the browsers address bar //https...
The container creates a singleton bean and injects collaborators into it only once. This is not the desired behavior when a singleton bean has a prototype-scoped collaborator, since the prototype-scoped bean should be injected every time it is being accessed via accessor. There are several solution...
- name: Installing Oracle Java and support libs apt: pkg={{ item }} with_items: - python-software-properties - oracle-java8-installer - oracle-java8-set-default - libjna-java
The following procedure is a generic one which will be used to log all errors in an application to a common error log table. CREATE OR REPLACE PROCEDURE log_errors ( p_calling_program IN VARCHAR2, p_error_code IN INTEGER, p_error_description IN VARCHAR2 ) IS PRAGMA AUTONOMOUS_TRANSAC...
Create a new browser bookmark, for example, in Chrome click the star icon at the right in the address bar, make sure the Folder is Bookmarks Bar, and then click the Edit... button: In the edit box that opens paste the following code as the URL: javascript:(function(){var root=(window.location.pa...
To open a new WebSocket, simply add something like: var WebSocket = require("ws"); var ws = new WebSocket("ws://host:8080/OptionalPathName); // Continue on with your code... Or to open a server, use: var WebSocketServer = require("ws").Server; var ws = new WebSocketS...
1. Include the font in your Xcode project. 2. Make sure that they are included in the Target Membership column Click on the font from the navigator, and check if the font included. 3. Check if the font included as Resource in your bundle click on your Xcode project file, select "Build P...
Create a sample application using spring-boot from spring-boot initializer site. Import the code in your local IDE and run the goal as clean install spring-boot:run -e Go to target folder and check for the jar file. Open your Amazon account or create a new Amazon Account and selec...
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...
https://www.genuitec.com/products/gapdebug/ GapDebug is a comprehensive mobile debugging tool that bridges the gap left by other debugging options. Operating on both the Windows and Mac platforms, GapDebug allows debugging of hybrid mobile apps, such as PhoneGap and Cordova, on modern iOS and Andro...
All UI elements created and reside in the main thread of a program. Accessing these from another thread is forbidden by the .net framework runtime. Basically it is because all UI elements are thread sensitive resources and accessing a resource in a multi-threaded environment requires to be thread-sa...
PM2 is a production process manager for Node.js applications, that allows you to keep applications alive forever and reload them without downtime. PM2 also enables you to manage application logging, monitoring, and clustering. Install pm2 globally. npm install -g pm2 Then, run the node.js app u...
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 102 of 161