Tutorial by Examples: am

import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.WindowConstants; public class Main { public static void main(String[] args) { SwingUtilities.invokeLater(() -> { JFrame frame = new JFrame("Hello World!"); frame...
Dim cars() Redim cars(0) 'Give it 1 entry Dim tmp tmp = "Ford" 'ubound(arrayvariable) is the count of array size. 'in this case, it would be 1, since there is 1 entry. cars(ubound(cars)) = tmp 'cars(0) Redim preserve cars(ubound(cars)+1)
First Execute CREATE EXTENSION DBLINK; Then INSERT INTO <SCHEMA_NAME>.<TABLE_NAME_1> SELECT * FROM DBLINK( 'HOST=<IP-ADDRESS> USER=<USERNAME> PASSWORD=<PASSWORD> DBNAME=<DATABASE>', 'SELECT * FROM <SCHEMA_NAME>.<TABLE_NAME_2...
In application/hooks folder, create a file with name Blocker.php and paste the below code. <?php class Blocker { function Blocker(){ } /** * This function used to block the every request except allowed ip address */ function requestBlocker(){ ...
In mysqld.cnf or equivalent: [mysql] prompt = '\u@\h [\d]> ' This achieves a similar effect, without having to deal with .bashrc's.
Snippet from MyExampleFile.xaml <TextBlock Foreground="{ThemeResource SystemControlBackgroundAccentBrush}" Text="This is a colored textbox that use the Accent color of your Windows 10"/> <TextBlock Foreground="{ThemeResource SystemControlBackgroundBa...
All needed usage shown with this snippet: #!/usr/bin/env bash declare -A assoc_array=([key_string]=value \ [one]="something" \ [two]="another thing" ...
Page.html <div data-bind="foreach: blogs"> <br /> <span data-bind="text: entryPostedDate"></span> <br /> <h3> <a data-bind="attr: { href: blogEntryLink }, text: title"></a> </h3> ...
Dim mddArray() ReDim mddArray(0) Dim ti, testinc: testinc = "test": ti = 1 For i = 0 To 4 Dim tmpArray(): ReDim tmpArray(0) For j = 0 To 3 tmpArray(UBound(tmpArray)) = testinc & ti ti = ti + 1 ReDim Preserve tmpArray(UBound(tmpArray) + 1) Ne...
The whole point of MVVM is to separate layers containing logic from the view layer. On Android we can use the DataBinding Library to help us with this and make most of our logic Unit-testable without worrying about Android dependencies. In this example I'll show the central components for a stupid...
typealias SuccessHandler = (NSURLSessionDataTask, AnyObject?) -> Void This code block creates a type alias named SuccessHandler, just in the same way var string = "" creates a variable with the name string. Now whenever you use SuccessHandler, for example: func example(_ handler: S...
import pandas as pd df = pd.DataFrame({'eggs': [1,2,4,8,], 'chickens': [0,1,2,4,]}) df # chickens eggs # 0 0 1 # 1 1 2 # 2 2 4 # 3 4 8 df.shift() # chickens eggs # 0 NaN NaN # 1 0.0 1.0 # 2 1.0 2.0 ...
Use the ls() commands to find objects by name: freds = cmds.ls("fred") #finds all objects in the scene named exactly 'fred', ie [u'fred', u'|group1|fred'] Use * as a wildcard: freds = cmds.ls("fred*") # finds all objects whose name starts with 'fred' # [u'fred', u'freder...
On Mac OSX computers with MacPorts installed, open a terminal window and type: port list | grep scala This will list all the Scala-related packages available. To install one (in this example the 2.11 version of Scala): sudo port install scala2.11 (The 2.11 may change if you want to install a...
ORMLite is an Object Relational Mapping package that provides simple and lightweight functionality for persisting Java objects to SQL databases while avoiding the complexity and overhead of more standard ORM packages. Speaking for Android, OrmLite is implemented over the out-of-the-box supported da...
tkinter is a GUI toolkit that provides a wrapper around the Tk/Tcl GUI library and is included with Python. The following code creates a new window using tkinter and places some text in the window body. Note: In Python 2, the capitalization may be slightly different, see Remarks section below. ...
Use Update the object name which is stored in reference SYNOPSIS git update-ref [-m <reason>] (-d <ref> [<oldvalue>] | [--no-deref] [--create-reflog] <ref> <newvalue> [<oldvalue>] | --stdin [-z]) General Syntax Dereferencing the symbolic refs, update th...
The [record][1] library provides the ability to create compound terms with named fields. The directive :- record/1 <spec> compiles to a collection of predicates that initialize, set and get fields in the term defined by <spec>. For example, we can define a point data structure with nam...
01 some-string PIC X(32). ... MOVE " a string literal" TO some-string DISPLAY ":" some-string ":" DISPLAY ":" FUNCTION TRIM(some-string) ":" DISPLAY ":" FUNCTION TRIM(some-string LEADING) ":" DISPLAY ":" F...
UNSTRING Input-Address DELIMITED BY "," OR "/" INTO Street-Address DELIMITER D1 COUNT C1 Apt-Number DELIMITER D2 COUNT C2 City DELIMITER D3 COUNT C3 State DELIMITER D4 COUNT C4 Zip-Code DELIMITER D5 COUNT C5 WITH POINTER...

Page 89 of 129