Tutorial by Examples: f

'if only one area (not multiple areas): With Range("A3:D20") Debug.Print .Cells(.Cells.CountLarge).Row Debug.Print .Item(.Cells.CountLarge).Row 'using .item is also possible End With 'Debug prints: 20 'with multiple areas (also works if only one area): Dim rngArea As Range,...
A Simple FXML document outlining an AnchorPane containing a button and a label node: <?xml version="1.0" encoding="UTF-8"?> <?import java.lang.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import ...
Swift myButton.titleLabel?.font = UIFont(name: "YourFontName", size: 20) Objective C myButton.titleLabel.font = [UIFont fontWithName:@"YourFontName" size:20];
Here is an example of a method that would live inside a SQLiteOpenHelper subclass. It uses the searchTerm String to filter the results, iterates through the Cursor's contents, and returns those contents in a List of Product Objects. First, define the Product POJO class that will be the container f...
CSS can be applied in multiple places: inline (Node.setStyle) in a stylesheet to a Scene as user agent stylesheet (not demonstrated here) as "normal" stylesheet for the Scene to a Node This allows to change styleable properties of Nodes. The following example demonst...
Any class can configure its own string formatting syntax through the __format__ method. A type in the standard Python library that makes handy use of this is the datetime type, where one can use strftime-like formatting codes directly within str.format: >>> from datetime import datetime &...
WITH CTE (StudentId, Fname, LName, DOB, RowCnt) as ( SELECT StudentId, FirstName, LastName, DateOfBirth as DOB, SUM(1) OVER (Partition By FirstName, LastName, DateOfBirth) as RowCnt FROM tblStudent ) SELECT * from CTE where RowCnt > 1 ORDER BY DOB, LName This example uses a Common Table ...
application-name Giving the name of the Web application that the page represents. <meta name="application-name" content="OpenStreetMap"> If it’s not a Web application, the application-name meta tag must not be used. author Set the author of the page: <meta name=&...
The foreach package brings the power of parallel processing to R. But before you want to use multi core CPUs you have to assign a multi core cluster. The doSNOW package is one possibility. A simple use of the foreach loop is to calculate the sum of the square root and the square of all numbers from...
A good use of extension method is to make the language more functional Sub Main() Dim strings = { "One", "Two", "Three" } strings.Join(Environment.NewLine).Print() End Sub <Extension> Public Function Join(strings As IEnumerable(Of String), separa...
A namespace is a URI, but to avoid verbosity, prefixes are used as a proxy. In the following example, the prefix my-prefix is bound to the namespace http://www.example.com/my-namespace by using the special attribute xmlns:my-prefix (my-prefix can be replaced with any other prefix): <?xml versio...
In XML, element and attribute names live in namespaces. By default, they are in no namespace: <?xml version="1.0"?> <foo attr="value"> <!-- the foo element is in no namespace, neither is the attr attribute --> </foo>
These two documents are semantically equivalement, as namespaces matter, not prefixes. <?xml version="1.0"?> <myns:foo xmlns:myns="http://www.example.com/my-namespace"> </myns:foo> <?xml version="1.0"?> <ns:foo xmlns:ns="http://www...
First, add relevant dependencies into the build.gradle file. dependencies { .... compile 'com.squareup.retrofit2:retrofit:2.3.0' compile 'com.squareup.retrofit2:converter-gson:2.3.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.3.0' .... } Then create the model you ...
import pandas as pd Create a DataFrame from a dictionary, containing two columns: numbers and colors. Each key represent a column name and the value is a series of data, the content of the column: df = pd.DataFrame({'numbers': [1, 2, 3], 'colors': ['red', 'white', 'blue']}) Show contents of d...
Create a DataFrame of random numbers: import numpy as np import pandas as pd # Set the seed for a reproducible sample np.random.seed(0) df = pd.DataFrame(np.random.randn(5, 3), columns=list('ABC')) print(df) # Output: # A B C # 0 1.764052 0.400157 0.9787...
Imports System.Reflection Public Class PropertyExample Public Function GetMyProperties() As PropertyInfo() Dim objProperties As PropertyInfo() objProperties = Me.GetType.GetProperties(BindingFlags.Public Or BindingFlags.Instance) Return objProperties End Fun...
Swift NSNotificationCenter.defaultCenter().postNotificationName("TestNotification", object: self) Objective-C [[NSNotificationCenter defaultCenter] postNotificationName:@"TestNotification" object:nil];
Swift let userInfo: [String: AnyObject] = ["someKey": myObject] NSNotificationCenter.defaultCenter().postNotificationName("TestNotification", object: self, userInfo: userInfo) Objective-C NSDictionary *userInfo = [NSDictionary dictionaryWithObject:myObject forKey:@"som...
Swift func testNotification(notification: NSNotification) { let userInfo = notification.userInfo let myObject: MyObject = userInfo["someKey"] } Objective-C - (void)testNotification:(NSNotification *)notification { NSDictionary *userInfo = notification.userInfo; My...

Page 62 of 457