Tutorial by Examples: c

A number of the demonstration macros within this part requires a function which I will explain later. For the moment, please just copy GetFldrNames() to a suitable module. I use this function frequently and keep it, and other like it that I use in many different macros, in a module named “ModGloba...
In TestDefaultFldr() I set Fldr to the default Inbox. The constant olFolderInbox can be replaced by other values giving access to any of the default folders. If you type Set Fldr = Session.GetDefaultFolder(, the VB editor will display a drop down list of all the possible values. Sub TestDefaultFl...
TestFldrChain() demonstrates how to reference any folder within any accessible store: Sub TestFldrChain() Dim Fldr As Folder Set Fldr = Session.Folders("A").Folders("A2"). _ Folders("A21").Folders("A213") Debug.Print...
In Part 2, you were shown how to list every accessible store and the top level folders within each store. This involved a loop through the stores and then a loop for each store through its folders Above you have seen how to reference a known folder at any depth within the hierarchy of folders. Thi...
Most of functions in D3.js accept an anonymous function as an argument. The common examples are .attr, .style, .text, .on and .data, but the list is way bigger than that. In such cases, the anonymous function is evaluated for each selected element, in order, being passed: The current datum (d) ...
<script src="https://apis.google.com/js/api.js"></script> <script> function start() { // 2. Initialize the JavaScript client library. gapi.client.init({ 'apiKey': 'YOUR_API_KEY', // clientId and scope are optional if auth is not required. 'clientId': 'YOUR_WEB_CL...
Declare @Text nvarchar(max) Declare @Value int SET @Text = 'Text' SET @Value = 0
You are an Outlook user and understand terms such as “email”, “received time”, “subject” and “Folder Pane”. You know how to access Outlook’s Visual Basic Editor and create a module. See Introduction Part 1 if necessary. You have at least a basic knowledge of VBA. I declare Subroutines and variab...
Many ls() queries are intended to find a single object, but ls always returns a list (or, in older Mayas, a single None). This creates complicated error checking for a simple question. The easiest way to get a single value from an ls under any circumstances is result = (cmds.ls('your query here'...
All images are from UK versions of Outlook. I know that some names are translated into the local language for other versions and I assume that most of the names for the tabs are translated. Probably the sequence of tabs is unchanged in non-English versions. Alternatively, you will need to look at yo...
All images in this section are from the UK version of Outlook 2016. I know that some names are translated into the local language for other versions and I assume that most of the names for the tabs are translated. Probably the sequence of tabs is unchanged in non-English versions. Alternatively, you...
The images in this section are all from Outlook 2016 but they could have come from Outlook 2003. Outlook VBA may have changed over the years but to my eyes the VBA Editor has not. Whichever version you have you will see something like: Above there is a “+” against "Project1". If you hav...
All strings in Progress ABL are case sensitive unless specified otherwise. This example will display a message box saying that the strings are identical. DEFINE VARIABLE str1 AS CHARACTER NO-UNDO. DEFINE VARIABLE str2 AS CHARACTER NO-UNDO. str1 = "abc". str2 = "ABC". ...
EXP - Returns the result of raising a number to a power. EXP( base, exponent) MESSAGE EXP(10, 2) VIEW-AS ALERT-BOX. // Messages 100 SQRT - Returns the square root of a number. SQRT( number) MESSAGE "The square root of 256 is " SQRT(256) VIEW-AS ALERT-BOX. // Messages 16 M...
The various parts of the introduction aim to give the information that any programmer new to Outlook VBA would need. Much of the code was originally developed with Outlook 2003 and has been tested with Outlook 2016. It should work unchanged with any intermediate version. New functionality has been...
In Swift, protocol extensions cannot have true properties. However, in practice you can use the "associated object" technique. The result is almost exactly like a "real" property. Here is the exact technique for adding an "associated object" to a protocol extension: ...
In this article we will use a simple database called “Company” with two tables: [dbo].[Categories]([CategoryID], [CategoryName]) [dbo].[Products]([ProductID], [CategoryID], [ProductName]) 1-1 Generate Entity Framework code In this layer we generate the Entity Framework code (in project library) ...
In this example we will use the Business layer in Presentation layer. And we will use MVC as example of Presentation layer (but you can use any other Presentation layer). We need first to register the IoC (we will use Unity, but you can use any IoC), then write our Presentation layer 3-1 Register ...
Graphically In XCode a simple NSTextView can be created by dragging and dropping one from the Object Library. This NSTextView sits inside an NSScrollView that is automatically set to expand vertically with the text view. Make sure when option(⌥)-dragging you make connections to the text view and...
The preferred and most common way of making an NSFont object is the following: Objective-C // Name is PostScript name of font; size is in points. NSFont *essayFont = [NSFont fontWithName:@"Times New Roman" size:12.0];

Page 693 of 826