Tutorial by Examples: l

public abstract class BaseActivity extends AppCompatActivity { private Map<Integer, PermissionCallback> permissionCallbackMap = new HashMap<>(); @Override protected void onStart() { super.onStart(); ... } @Override public void setConten...
var fs = require("fs"); fs.readFileSync(‘abc.txt’,function(err,data){ //Reading File Synchronously if(!err) { console.log(data); } //else //console.log(err); }); console.log("something else"); Here, the program wa...
Detailed instructions on getting web2py set up or installed.
Detailed instructions on getting point-cloud-library set up or installed.
Sometimes you may want to have some login to determine where the user gets redirected to after submitting a form. Form Requests give a variety of ways. By default there are 3 variables declared in the Request $redirect, $redirectRoute and $redirectAction. On top of those 3 variables you can overr...
The minimum required files and folders for the phonegap-build project are: ─ www ├─ res │ ├─ icon │ │ ├─ android │ │ ├─ ios │ │ ├─ windows-phone │ │ &...
When you're ready to upload your project to the phonegap-build service, zip the content of the www folder and upload the zip file to the phonegap-build service. It is recommended to only zip the content of the www folder, and not the www folder itself. However, this is just a recommendation and zip...
I hope this example will help everyone to understand how awk internal variables like NR, FNR etc change when awk is processing two files. awk '{print "NR:",NR,"FNR:",FNR,"fname:",FILENAME,"Field1:",$1}' file1 file2 NR: 1 FNR: 1 fname: file1 Field1: f1d1 NR:...
Block will capture variables that appeared in the same lexical scope. Normally these variables are captured as "const" value: int val = 10; void (^blk)(void) = ^{ val = 20; // Error! val is a constant value and cannot be modified! }; In order to modify the variable, you need to ...
Each FluentWait instance defines the maximum amount of time to wait for a condition, as well as the frequency with which to check the condition. Furthermore, the user may configure the wait to ignore specific types of exceptions whilst waiting, such as NoSuchElementExceptions when searching for an e...
Following is the example of QLabel that displays use of texts,images and hyperlinks. import sys from PyQt4.QtCore import * from PyQt4.QtGui import * def window(): app = QApplication(sys.argv) win = QWidget() l1 = QLabel() l2 = QLabel() l3 = QLabel() l4 = QLabel()...
import sys from PyQt4 import QtGui def window(): app = QtGui.QApplication(sys.argv) w = QtGui.QWidget() b = QtGui.QLabel(w) b.setText("<h1>Welcome to PyQt4 SO Documentation!</h1>") w.setGeometry(100,100,550,65) b.move(50,20) w.setWindowTitle(&quo...
from bs4 import BeautifulSoup import requests main_url = "https://fr.wikipedia.org/wiki/Hello_world" req = requests.get(main_url) soup = BeautifulSoup(req.text, "html.parser") # Finding the main title tag. title = soup.find("h1", class_ = "firstHeading&qu...
Vertical Index Match =INDEX(A1:A3,MATCH(E2,C1:C3,0))
Horizontal Index Match =INDEX(A1:C1,MATCH(E2,A3:C3,0))
Ext.define('App.Duck', { extend: 'Ext.Component', alias: 'widget.duck', initComponent: function () { this.callParent(arguments); this._quack(); }, _quack: function () { console.log('The duck says "Quack!"'); this.fireEvent('quack...
// gets the Class objects from the net.mminecraft.server package with the given name public Class<?> getNmsClass(String name) throws ClassNotFoundException { // explode the Server interface implementation's package name into its components String[] packageArray = Bukkit.getServer()....
public class CustomSurfaceView extends SurfaceView { @Override public boolean onTouchEvent(MotionEvent e) { super.onTouchEvent(e); if(e.getPointerCount() > 2){ return false; // If we want to limit the amount of pointers, we return false //...
A splash screen is just like any other activity, but it can handle all of your startup-needs in the background. Example: Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="...
There is more than one way to do it: Using the package manager: sudo apt install perl Installing from source: wget http://www.cpan.org/src/5.0/perl-version.tar.gz tar -xzf perl-version.tar.gz cd perl-version ./Configure -de make make test make install Installing in your $h...

Page 750 of 861