Tutorial by Examples: ch

public async int call_async () { return 1; } call_async.begin ((obj, res) => { var ret = call_async.end (res); }); To call an asynchronous functions from a synchronous context, use the begin method and pass a callback to receive the result. The two arguments are: obj is a GLi...
AWS-SDK for javascript Lambda contains aws-sdk (https://aws.amazon.com/sdk-for-node-js/) in its global so no need to upload this node-module into the zip. const AWS = require('aws-sdk'); Sample function module.exports.myFunction = (event, context, callback) => { const response = { ...
Go to terminal, cd projectFolder git remote -v (it will show previous git url) git remote set-url origin https://[email protected]/username/newName.git git remote -v (double check, it will show new git url) git push (do whatever you want.)
If you do not only wish to display static objects, but have your UI respond to changes to correlating objects, you need to understand the basics of the INotifyPropertyChanged interface. Assuming we have our MainWindowdefined as <Window x:Class="Application.MainWindow" xmlns=&quot...
Since Bootstrap 4 is a major rewrite, many of the Bootstrap 3.x class names have changed or been removed. The restructuring of components such as the Navbar, and the introduction of new CSS classes and Flexbox support means that upgrading to 4.x is not a simple conversion process from 3.x. However,...
Let's assume you have a ListView wich is supposed to display every User object listed under the Users Property of the ViewModel where Properties of the User object can get updated programatically. <ListView ItemsSource="{Binding Path=Users}" > <ListView.ItemTemplate> ...
public abstract class BaseActivity extends AppCompatActivity { private Map<Integer, PermissionCallback> permissionCallbackMap = new HashMap<>(); @Override protected void onStart() { super.onStart(); ... } @Override public void setConten...
This example uses <md-chips> and <md-chip>. NOTE: Static chips cannot be selected, removed or edited, and are not part of any model. If no ng-model is provided, there are no input elements in <md-chips>. index.html: <md-content ng-controller="ChipController"> &...
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...
Vertical Index Match =INDEX(A1:A3,MATCH(E2,C1:C3,0))
Horizontal Index Match =INDEX(A1:C1,MATCH(E2,A3:C3,0))
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 //...
As a way of subdividing Ada programs, packages may have so-called children. These can be packages, too. A child package has a special privilege: it can see the declarations in the parent package's private part. One typical use of this special visibility is when forming a hierarchy of derived types ...
(From this answer) The example below adds an enumerated type to a postgres database. First, edit the migration file (created with mix ecto.gen.migration): def up do # creating the enumerated type execute("CREATE TYPE post_status AS ENUM ('published', 'editing')") # creating a...
Starting with version 2.7 ElementTree has a better support for XPath queries. XPath is a syntax to enable you to navigate through an xml like SQL is used to search through a database. Both find and findall functions support XPath. The xml below will be used for this example <Catalog> &l...
The horizontal layout set up the object inside it horizontally. basic code: #include <QApplication> #include <QMainWindow> #include <QWidget> #include <QHBoxLayout> #include <QPushButton> int main(int argc, char *argv[]) { QApplication a(argc, argv); ...
$> perl -MFoo::Bar\ 9999 $> Foo::Bar version 9999 required--this is only version 1.1.

Page 95 of 109