Tutorial by Examples

To get a list of the service on your system, you may run: service --status-all The output of service --status-all lists the state of services controlled by System V. The + indicates the service is running, - indicates a stopped service. You can see this by running service SERVICENAME status for...
ng new NewProject or ng init NewProject
The Flexbox (Flexible box) layout, introduced in CSS3 provides a more efficient way to lay out, align and distribute space among children elements(flex items) within a container element(flex container). Most importantly even when their sizes are unknown or dynamic and hence the term "flex"...
Caveat: alloca is only mentioned here for the sake of completeness. It is entirely non-portable (not covered by any of the common standards) and has a number of potentially dangerous features that make it un-safe for the unaware. Modern C code should replace it with Variable Length Arrays (VLA). Ma...
import sys from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QIcon class Example(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.setGeometry(300, 30...
import sys from PyQt5.QtWidgets import (QWidget, QToolTip, QPushButton, QApplication) from PyQt5.QtGui import QFont class Example(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): ...
Here we can create UUID String with in one line. Represents UUID strings, which can be used to uniquely identify types, interfaces, and other items. Swift 3.0 print(UUID().uuidString) It is very useful for identify multiple devices with unique id.
package main import ( "k8s.io/kubernetes/pkg/api" unver "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/restclient" client "k8s.io/kubernetes/pkg/client/unversioned&...
package main import ( //"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" "log" "os" // unver "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" client &...
package main import ( // "k8s.io/kubernetes/pkg/api" // unver "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/restclient" client "k8s.io/kubernetes/pkg/client/unv...
Dockerize zookeeper-3.4.6 Create a Dockerfile: ####################################################### # Image: img.reg.3g:15000/zookeeper:3.4.6 ####################################################### FROM img.reg.3g:15000/jdk:1.7.0_67 MAINTAINER [email protected] USER root ENV ZO...
You can use Try..Catch to rollback database operation by placing the rollback statement at the Catch Segment. Try 'Do the database operation... xCmd.CommandText = "INSERT into ...." xCmd.ExecuteNonQuery() objTrans.Commit() ...
Note : I am assuming that you know about how to use BottomNavigationView. This example I will explain how to add selector for BottomNavigationView. So you can state on UI for icons and texts. Create drawable bottom_navigation_view_selector.xml as <?xml version="1.0" encoding="...
Repository interface; public interface IRepository<T> { void Insert(T entity); void Insert(ICollection<T> entities); void Delete(T entity); void Delete(ICollection<T> entity); IQueryable<T> SearchFor(Expression<Func<T, bool>> predicate);...
To play a sound of with a specific tone,we first have to create a sine wave sound.This is done in the following way. final int duration = 10; // duration of sound final int sampleRate = 22050; // Hz (maximum frequency is 7902.13Hz (B8)) final int numSamples = duration * sampleRate; final double ...
Although Catch ex As Exception claims that it can handle all exceptions - there are one exception (no pun intended). Imports System Static Sub StackOverflow() ' Again no pun intended StackOverflow() End Sub Static Sub Main() Try StackOverflow() Catch ex As Exception ...
Generally most of the exceptions are not that critical, but there are some really serious exceptions that you might not be capable to handle, such as the famous System.StackOverflowException. However, there are others that might get hidden by Catch ex As Exception, such as System.OutOfMemoryExceptio...
To enable rerere run the following command: $ git config --global rerere.enabled true This can be done in a specific repository as well as globally.
The basic setup of hybrid coding is a single, fluid column. Since most email clients support max-width, we can use that to set the <table>'s width to 100% (fluid), but not exceed a max width (660px in this case). Just like on the web. However, Windows Desktop Microsoft doesn't support max-wid...
#define kPaperSizeA4 CGSizeMake(595.2,841.8) First of all implement UIPrintPageRenderer protocol @interface UIPrintPageRenderer (PDF) - (NSData*) printToPDF; @end @implementation UIPrintPageRenderer (PDF) - (NSData*) printToPDF { NSMutableData *pdfData = [NSMutableData data]; ...

Page 1151 of 1336