Tutorial by Examples: o

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!" ...
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...
INSERT INTO [dbo].[Customers] ([CustomerName]) VALUES ('Jerry'), ('Gorge') SELECT * FROM [dbo].[Customers] Results CustomerIDCustomerName10001Jerry10002Gorge
DELETE FROM [dbo].[Customers] WHERE CustomerName = 'Gorge'; INSERT INTO [dbo].[Customers] ([CustomerName]) VALUES ('George') SELECT * FROM [dbo].[Customers] Results CustomerIDCustomerName10001Jerry10003George
SCOPE_IDENTITY() returns the last identity value inserted into an identity column in the same scope. A scope is a module: a stored procedure, trigger, function, or batch. Therefore, two statements are in the same scope if they are in the same stored procedure, function, or batch. INSERT INTO ([col...
This function will take 2 datetime parameters, the DOB, and a date to check the age at CREATE FUNCTION [dbo].[Calc_Age] ( @DOB datetime , @calcDate datetime ) RETURNS int AS BEGIN declare @age int IF (@calcDate < @DOB ) RETURN -1 -- If a DOB is supplied a...
This query will drop the view - if it already exists - and create a new one. IF OBJECT_ID('dbo.PersonsView', 'V') IS NOT NULL DROP VIEW dbo.PersonsView GO CREATE VIEW dbo.PersonsView AS SELECT name, address FROM persons;
Will be available till the current connection persists for the user. Automatically deleted when the user disconnects. The name should start with # (#temp) CREATE TABLE #LocalTempTable( StudentID int, StudentName varchar(50), Student...
Will start with ## (##temp). Will be deleted only if user disconnects all connections. It behaves like a permanent table. CREATE TABLE ##NewGlobalTempTable( StudentID int, StudentName varchar(50), StudentAddress varchar(150)) Insert ...
Create a Job To add a job first we have to use a stored procedure named sp_add_job USE msdb ; GO EXEC dbo.sp_add_job @job_name = N'Weekly Job' ; -- the job name Then we have to add a job step using a stored procedure named sp_add_jobStep EXEC sp_add_jobstep @job_name = N'W...
Depending on the structure of your data, you can create variables that update dynamically. DECLARE @CurrentID int = (SELECT TOP 1 ID FROM Table ORDER BY CreateDate desc) DECLARE @Year int = 2014 DECLARE @CurrentID int = (SELECT ID FROM Table WHERE Year = @Year) In most cases, you will want...
Detailed instructions on getting zend-framework set up or installed.

Page 564 of 1038