Tutorial by Examples

c++17 C++17 introduces int std::uncaught_exceptions() (to replace the limited bool std::uncaught_exception()) to know how many exceptions are currently uncaught. That allows for a class to determine if it is destroyed during a stack unwinding or not. #include <exception> #include <strin...
VB_Name specifies the class or module name. Attribute VB_Name = "Class1" A new instance of this class would be created with Dim myClass As Class1 myClass = new Class1
In VBA, this attribute is ignored. It was not ported over from VB6. In VB6, it creates a Default Global Instance of the class (a "shortcut") so that class members can be accessed without using the class name. For example, DateTime (as in DateTime.Now) is actually part of the VBA.Conversio...
This attribute is ignored. It was not ported over from VB6. In VB6, it was used in combination with the VB_Exposed attribute to control accessibility of classes outside of the current project. VB_Exposed=True VB_Creatable=True Would result in a Public Class, that could be accessed from other ...
Creates a Global Default Instance of a class. The default instance is accessed via the name of the class. Declaration VERSION 1.0 CLASS BEGIN MultiUse = -1 'True END Attribute VB_Name = "Class1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_Pr...
Controls the instancing characteristics of a class. Attribute VB_Exposed = False Makes the class Private. It cannot be accessed outside of the current project. Attribute VB_Exposed = True Exposes the class Publicly, outside of the project. However, since VB_Createable is ignored in VBA, inst...
Adds a text description to a class or module member that becomes visible in the Object Explorer. Ideally, all public members of a public interface / API should have a description. Public Function GiveMeATwo() As Integer Attribute GiveMeATwo.VB_Description = "Returns a two!" ...
VB_VarUserMemId (for module-scope variables) and VB_UserMemId (for procedures) attributes are used in VBA mostly for two things. Specifying the default member of a class A List class that would encapsulate a Collection would want to have an Item property, so the client code can do this: For i = 1...
Transcrypt is a tool to precompile a fairly extensive subset of Python into compact, readable Javascript. It has the following characteristics: Allows for classical OO programming with multiple inheritance using pure Python syntax, parsed by CPython’s native parser Seamless integration with the ...
This code adds outwardly increasing shadows to an image to create a "sticker" version of the image. Notes: In addition to being an ImageObject, the "img" argument can also be a Canvas element. This allows you to stickerize your own custom drawings. If you draw text on the Can...
Once shadowing is turned on, every new drawing to the canvas will be shadowed. Turn off further shadowing by setting context.shadowColor to a transparent color. // start shadowing context.shadowColor='black'; ... render some shadowed drawings ... // turn off shadowing. context.shadowColor=...
Warning! Apply shadows sparingly! Applying shadowing is expensive and is multiplicatively expensive if you apply shadowing inside an animation loop. Instead, cache a shadowed version of your image (or other drawing): At the start of your app, create a shadowed version of your image in a secon...
The traditional use of shadowing is to give 2-dimensional drawings the illusion of 3D depth. This example shows the same "button" with and without shadowing var canvas=document.createElement("canvas"); var ctx=canvas.getContext("2d"); document.body.appendChild(can...
Canvas does not have CSS's inner-shadow. Canvas will shadow the outside of a filled shape. Canvas will shadow both inside and outside a stroked shape. But it's easy to create inner-shadows using compositing. Strokes with an inner-shadow To create strokes with an inner-shadow, use destinat...
let's generate a DataFrame first: df = pd.DataFrame(np.arange(10).reshape(5,2), columns=list('ab')) print(df) # Output: # a b # 0 0 1 # 1 2 3 # 2 4 5 # 3 6 7 # 4 8 9 drop rows with indexes: 0 and 4 using drop([...], inplace=True) method: df.drop([0,4], inplace=True) ...
INSERT INTO Invoices [ /* column names may go here */ ] VALUES (123, '1234abc', '2016-08-05 20:18:25.770', 321, 5, '2016-08-04'); Column names are required if the table you are inserting into contains a column with the IDENTITY attribute. INSERT INTO Invoices ([ID], [Num], [DateTime], [Tota...
To get the list of all backup operations performed on the current database instance: SELECT sdb.Name AS DatabaseName, COALESCE(CONVERT(VARCHAR(50), bus.backup_finish_date, 120),'-') AS LastBackUpDateTime FROM sys.sysdatabases sdb LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_nam...
CREATE SEQUENCE [dbo].[CustomersSeq] AS INT START WITH 10001 INCREMENT BY 1 MINVALUE -1;
CREATE TABLE [dbo].[Customers] ( CustomerID INT DEFAULT (NEXT VALUE FOR [dbo].[CustomersSeq]) NOT NULL, CustomerName VARCHAR(100), );
INSERT INTO [dbo].[Customers] ([CustomerName]) VALUES ('Jerry'), ('Gorge') SELECT * FROM [dbo].[Customers] Results CustomerIDCustomerName10001Jerry10002Gorge

Page 740 of 1336