Tutorial by Examples: bas

app = QApplication( sys.argv ) box = QMessageBox() # Window Title box.setWindowTitle( "Hello World." ) # Icon: Information, Warning, Question, Critical box.setIcon( QMessageBox.Information ) # Short version of the information box.setText( "Hello World!" ) # Inform...
Step1 Message Flow: [![enter image description here][1]][1] Step 2: Databse Connector Configuration For this you need mysql-connector-java-5.1.40-bin.jar . Right click on Project -->build Path--> Add external archieve and add the jar(without jar it cannot be connected) Enter all the value...
#pragma strict import UnityEngine.Advertisements; #if !UNITY_ADS // If the Ads service is not enabled public var gameId : String; // Set this value from the inspector public var enableTestMode : boolean = true; // Enable this during development #endif function InitializeAds () // Example o...
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Route, BrowserRouter as Router, Link } from 'react-router-dom'; class Home extends React.Component<any, any> { render() { return ( <div> <div>HOME</div> <d...
Router enables navigation from one view to another based on user interactions with the application. Following are the steps in implementing basic routing in Angular - NOTE: Ensure you have this tag: <base href='/'> as the first child under your head tag in your index.html file. This ele...
The following example demonstrates a simple HTTP GET request. http.get() returns an Observable which has the method subscribe. This one appends the returned data to the posts array. var posts = [] getPosts(http: Http): { this.http.get(`https://jsonplaceholder.typicode.com/posts`) ....
<h:form> <p:dialog widgetVar="myDialog"></p:dialog> <p:commandButton onclick="PF('myDialog').show();" /> </h:form>
One of the most common and useful ways to replace text with regex is by using Capture Groups. Or even a Named Capture Group, as a reference to store, or replace the data. There are two terms pretty look alike in regex's docs, so it may be important to never mix-up Substitutions (i.e. $1) with Back...
Use Nginx map to parse fields and reject requests. # Allowed hosts map $http_host $name { hostnames; default no; example.com yes; *.example.com yes; example.org yes; *.example.org yes; .example.net yes; wap.* yes; } # Allowed count...
Bukkit uses an event based system that allows plugin developers to interact with and modify the server and specific actions that occur in the world. Creating an Event Handler Event handlers are methods that get called when their event occurs. They are generally public and void as well as named o...
Fetching the values from the SQLite3 database. Print row values returned by select query import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() c.execute("SELECT * from table_name where id=cust_id") for row in c: print row # will be a list To fetch single match...
Add any JSR 303 implementation to your classpath. Popular one used is Hibernate validator from Hibernate. <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.2.0.Final</version> </dependen...
InputBox, userinput This will store what the user types into the input box in the variable named userinput
This example just illustrates how this keyword can be used. int a = 10; // Assume that type of variable 'a' is not known here, or it may // be changed by programmer (from int to long long, for example). // Hence we declare another variable, 'b' of the same type using // decltype keyword. de...
Copy: Sub CopyFile() Dim fso as Scripting.FileSystemObject Set fso = CreateObject("Scripting.FileSystemObject") fso.CopyFile "c:\Documents and Settings\Makro.txt", "c:\Documents and Settings\Macros\" End Sub Move: Sub MoveFile() Dim fso as Scri...
Create: Sub CreateFolder() Dim fso as Scripting.FileSystemObject Set fso = CreateObject("Scripting.FileSystemObject") fso.CreateFolder "c:\Documents and Settings\NewFolder" End Sub Copy: Sub CopyFolder() Dim fso as Scripting.FileSystemObject Set fso...
The first standalone R script Standalone R scripts are not executed by the program R (R.exe under Windows), but by a program called Rscript (Rscript.exe), which is included in your R installation by default. To hint at this fact, standalone R scripts start with a special line called Shebang line, ...
CREATE INDEX first_name_idx ON user_data (UPPER(first_name)); SELECT * FROM user_data WHERE UPPER(first_name) = 'JOHN2'; Function based index means, creating index based on a function. If in search (where clause), frequently any function is used, it's better to create index based on ...
To list the available databases, use the following command: $ show databases name: databases name ---- _internal devices ... list of your databases You can connect to one specific database: $ use <database_name> By using a single database, the scope for each subsequent query wi...
It is possible to DELETE data from a table if it matches (or mismatches) certain data in other tables. Let's assume we want to DELETEdata from Source once its loaded into Target. DELETE FROM Source WHERE EXISTS ( SELECT 1 -- specific value in SELECT doesn't matter FROM Target ...

Page 61 of 65