The Prestwood eMag  |  www.prestwood.com |
|
| March 2010 - Full Edition | Year 12 Issue 3
|
|
| A computer community for power-users and I.T. professionals! |
|
Table of Contents: |
|
From The Editor Mike Prestwood |
This edition, March 2010, is coming out late in the month. I held up sending it because we are trying to improve layout and content of our monthly eMag. Our goal is to deliver a better free product to you. We appreciate you subscribing and we want to make sure our eMag is of interest to you and contains useful information and links. You'll notice this month's eMag has a simpler look and feel to it and you'll see many more improvements like this over the next few months.
We also know that our servers lately have, at times, been slow. Right now we are migrating to our viaVerio hosting farm (same servers we use with our PrestwoodHosting.com hosting clients). We will be moving in the next month or so to a new server. Until then, thank you for putting up with our occasionally slow website.
Again, thank you for subscribing to our monthly eMag.
--Mike Prestwood  Ramesh R | From our General, Getting Started, etc. topic...Critical Thinking in technical writingby Ramesh R Critical Thinking skills comes automatically as a writer becomes experienced over a period of time. Learning to write and transforming the ideas into writing help develop critical thinking aspects/skills. A clear set of phases/activities are inititated in the human brain as part of critical thinking. This article helps to understand the learning basics, learning process and the impact of writing that drives critical thinking skills. This is a good read for all our technical writing friends across the globe. From our General News & Trends topic... Microsoft Embraces Open Document Format? by Wes PetersonTo read some of the blogs and press releases out there, one might think that Microsoftt has embraced ODF as it's native file format. While that would be cool, it isn't the case, and cause for celebration is premature. From our Computer Community topic... Prestwood Community Rules & Disclaimers by Mike PrestwoodThe Prestwood Online Community rules and disclaimers. Essentially, our policies all center around be-friendly, don't flame, encourage more discussion, and limit advertising to approved areas.
A classic post from our Language Basics topic... Access VBA Comments (' or REM) by Mike PrestwoodAccess VBA, like all the VB-based languages, uses a single quote (') or the original class-style basic "REM" (most developers just use a quote). Access VBA does NOT have a multiple line comment. Directives are sometimes called compiler or preprocessor directives. A # is used for directives within Access VBA code. Access VBA offers only an #If..then/#ElseIf/#Else directive. A classic post from our Language Basics topic... Access VBA Logical Operators (and, or, not) by Mike PrestwoodSame as VB. Access VBA logical operators:
| and |
and, as in this and that |
| or |
or, as in this or that |
| Not |
Not, as in Not This | |
Monthly Access Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Language Basics Topic. Code Snippet of the Month Microsoft Access is a class-based
language. Although you can create classes, Access VBA is not fully OOP.
You can create classes, but not inherit from them. It is a traditional language with a few OOP extensions. You code in a
traditional approach using functions, procedures, and global data, and
you can make use of simple classes to help organize your reusable code. Microsoft Access is most suitable for creating business desktop applications that run within Microsoft Access for Windows.
| |
Access Message Board Ask this group a question! Select a topic below or Visit Access Board Now!
American I.T. Message Board Ask this group a question! Select a topic below or Visit American I.T. Board Now!
Monthly Analyst Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Unified Modeling Language (UML) Topic. An actor is a person or system that fills a role and interacts with another system. An actor supplies a stimulus to the system.
When establishing actors of your system, do not think in terms of a specific person, think in terms of their role. Do not name an actor the name of the person filling the role. If Bob is our Sales Clerk, name your actor Sales Clerk (not Bob). | |
Analyst Message Board Ask this group a question! Select a topic below or Visit Analyst Board Now!
A classic post from our Language Basics topic... Read/Write from ASP to create a page from template by Kim BerryThe Scripting object provides reading and writing of files. By adding a string replace in each line, ASP content can reside in a DB and inserted into the desired template. |
Monthly ASP Classic Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our ASP Classic Topic. Code Snippet of the Month In ASP, using ADO, you use RecordSet.AddNew to add a new record, Recordset.Update to post the record, and RecordSet.Delete to delete it. To edit a record, you open the RecordSet using an editable cursor. The following code snippet adds a record to a given editable RecordSet with FullName and Created fields:
objRS.AddNew
objRS.Fields("FullName") = "Barack Obama"
objRS.Fields("Created") = Now
objRS.Update
From our ASP Classic Topic. Question: What does VBScript stand for? Answer: VBScript is short for Visual Basic Scripting. VBScript brings scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer and Web server scripting in Microsoft Internet Information Service. It is used in Visual Basic, Access, Word, Excel, ASP, etc. From our Language Basics Topic Tip of the Month Short-circuit evaluation is a feature of most languages where once an evaluation evaluates to False, the compiler evaluates the whole expression to False, exits and moves on to the next code execution line. The ASP Classic if statement does not support short-circuit evaluation but you can mimic it. Use either an if..else if..else if statement or nested if statements. ASP code that makes use of this technique is frequenlty clearer and easier to maintain than the short-circuit equivalent. | |
ASP Classic Message Board Ask this group a question! Select a topic below or Visit ASP Classic Board Now!
A classic post from our OOP topic... C# Overriding (virtual, override) by Mike PrestwoodMethod overriding allows you to define or implement a virtual method in a parent class and then replace it in a descendant class. In C#, you specify a virtual method with the virtual keyword in a parent class and replace it in a descendant class using the override keyword. |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Tool Basics Topic. Code Snippet of the Month C# String CancatenationC# performs implicit casting of numbers to strings. To concatenate two strings, a string to an integer, or a string to a floating point number, use the + operator. For example, to convert a floating point number to a string just concatenate an empty string to the number as in "" + 3.2.
Alternatively, you can use the System.Text.StringBuilder class which frequently but not always provides faster code. String FirstName; String LastName; Int16 Age; FirstName = "Mike"; LastName = "Prestwood"; Age = 43; Console.WriteLine(FirstName + " " + LastName + " is " + Age + "."); //Implicit casting of numbers. // //This fails: //MessageBox.Show(3.3); // //This works: MessageBox.Show("" + 3.3); From our C# Topic. Variables that only contain a reference to the values. Reference data type variables only contain a reference to it's constituent value. Reference data types include objects and strings. Assignment of one reference type variable to another copies the reference, thus changes to the values in one variable changes the values in the other. From our Language Basics Topic Resource Link of the Month: CSharp Language Specification (C#) By Scott Wiltamuth and Anders Hejlsberg
This document describes the syntax, semantics, and design of the C# programming language. | |
C# Message Board Ask this group a question! Select a topic below or Visit C# Board Now!
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our C++/CLI Language Basics Topic. Code Snippet of the Month Same as standard C++. Literals are quoted as in "Prestwood". If you need to embed a quote use a slash in front of the quote as in \". MessageBox::Show("Hello");MessageBox::Show("Hello \"Mike\"."); //Does ASP evaluate this simple //floating point math correctly? No! if ((.1 + .1 + .1) == 0.3) { MessageBox::Show("Correct"); } else { MessageBox::Show("Not correct"); }From our C++/CLI Topic. Question: Can you use native code in a C++/CLI application to increase speed? Answer: Yes, that's one of the big advantages of using C++/CLI over C#. Although you can also call unmanaged code from within C#, support for native objects is built into C++/CLI.
I was telling to a friend how impressed I was with the performance of Paint .NET (a free .NET desktop graphics program), and he remarked the the only reason it could peform so well was because it made extensive use of an unmanaged graphics code library. | |
C++ Message Board Ask this group a question! Select a topic below or Visit C++ Board Now!
A classic post from our Borland Database Engine topic... How to check what BDE version is installed. by Mike PrestwoodQ. I've updated my BDE from version 5.01 to version 5.2.0.2 but the About BDE Administrator dialog still shows version 5.01?
A. Your update may have taken. Updates typically just replace the DLLs the BDE uses so you may have the latest installed. Version Information To see what version of the BDE engine
you "actually" have installed, you need to look at the Version
Information from within the BDE Administrator. Select Object | Version
Information... to see the DLL version numbers A classic post from our Object Orientation (OO) topic... An Introduction to Object Orientation by Mike PrestwoodOverview and introduction to object orientation. When you analyze, design, and code in an OO way, you "think" about objects and their interaction. This type of thinking is more like real life where you naturally think about how "this object" relates to "that object". Classes represent the "design" of an existing object. The values or properties of an existing object is it's current state. When designing classes, OO supports many features like inheritance (like real-life where you inherit your parents characteristics), encapsulation (hiding data), and polymorphism (the ability of one thing to act like another or in different ways). |
Monthly Coder Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Object Orientation (OO) Topic. Also known as a Class Method.
A code routine that belongs to the class or an object instance (an instance of the class). Methods that belong to the class are called class methods or static methods. Methods that belong to an object instance are called instance methods, or simply methods.
When a method returns a value, it is a function method. When no value is returned (or void), it is a procedure method.
Methods frequently use method parameters to transfer data. When one object instance calls another object instance using a method with parameters, you call that messaging. From our General Info, Installation, etc. Topic. Error: Microsoft Visual Studio The service Microsoft.VisualStudio.Shell.Interop.ISelectionContainer already exists in the service container. Parameter name: serviceType From our General .Net Concepts Topic Resource Link of the Month: PowerCommands for Visual Studio 2008 According to Microsoft, "PowerCommands is a set of useful extensions for the Visual Studio 2008 adding additional functionality to various areas of the IDE. The source code is included and requires the VS SDK for VS 2008 to allow modification of functionality or as a reference to create additional custom PowerCommand extensions. " If you've previously worked with Delphi and GExperts, you know how helpful some extensions to your IDE can be. This free download, from Microsoft, adds some really useful functionality to the VS2008 IDE. Check it out. From our General Info, Installation, etc. Topic. Question: What are the benefits of managed code over native code? Answer: In general terms, managed .Net code is a little more portable (will run on any platform with the correct CLR installed) and is easier to write. However, managed code may run slower and require more system resources. From our General Coding Concepts Topic Tip of the Month When comparing floating point numbers, make sure you round to an acceptable level of rounding for the type of application you are using. | |
Coder Message Board Ask this group a question! Select a topic below or Visit Coder Board Now!
A classic post from our DBA & Data topic... Corporate Database Administration by Jeffrey K. TyzzerCorporate database admin standard first published by Prestwood Software in 1996. |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our ANSI SQL Scripting Topic. Code Snippet of the Month The following selects all the records in Table1 where IDField is not in Table2. SELECT Table1.* FROM Table1 LEFT JOIN Table2 ON Table1.IDField = Table2.IDField WHERE Table2.IDField is null
From our DBA & Data Topic. A locking mechanism that allows other users to edit a record that is currently being edited. Essentially, last in wins or edits are discarded usually with an error. From our MS SQL 2005 Topic Microsoft's free download tool for managing MS SQL 2005 databases. Microsoft SQL Server Management Studio Express (SSMSE) is a free, graphical management tool for managing SQL Server 2005 databases.
Available editions:
From our Interbase Education (Audio/Video) Topic Resource Link of the Month: Video & Audio: CDN Interbase TV Lots here! Interbase TV is part of CodeGear's developer network. Contains both audios and videos. From our Microsoft SQL Server Topic. Question: Are views in Microsoft SQL Server editable? Answer: Yes and no. Yes, there is nothing in MS SQL Server preventing a client from writing to the underlying tables involved in an view. Therefore, it is left up to the tool accessing the view. Many tools allow you to edit views in SQL Server including ASP Classic, ASP.Net, VB, Access, etc. Some tools, like SQL Server Management Studio allow you to edit tables, but not views. From our DBA & Data Topic Tip of the Month When naming fields/columns in a table, use ONE name for the data in the field. For example, although states are called provinces and other names in other coutries, use one or the other in the database but not both. Use CompanyState, avoid CompanyStateProvince., use PostalCode or ZipCode, avoid PostalZipCode. Use labels in your website or program to switch context. | |
DBA Message Board Ask this group a question! Select a topic below or Visit DBA Board Now!
A classic post from our BDE topic... A 10 Minute Delphi 2009 Paradox BDE TTable Quick Start by Mike PrestwoodThis KB Post addresses accessing Paradox tables through the BDE using TDatasource, TTable, and TDBGrid. This tutorial was updated for Delphi 2009 but applies to all versions of Delphi. A classic post from our Language Basics topic... A 10 Minute Delphi Console App Quick Start by Mike PrestwoodCreate a classic "Hello, World" Windows native code Console App using Delphi. This tutorial is based on Borland Developer Suite 2006 but you can use any version of Delphi you wish. In this tutorial, you will create a classic "Hello, World!" windows console application. A console application is a type of Windows application that has FULL access to the Win32 API, but it's GUI is limited to a DOS-like text window. When Windows starts a console application, it creates a text-mode console window where the program can display text and the user can interact with the program via the keyboard. |
Monthly Delphi Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our OOP Topic. Code Snippet of the Month Delphi uses the keywords procedure and function. A procedure does not return a value and a function does. //Interface section: TCyborg = class(TObject) public procedure IntroduceYourself; end; //Implementation section; procedure TCyborg.IntroduceYourself; begin ShowMessage('Hi, I do not have a name yet.'); end; //Some event like a button click: var T1: TCyborg; begin T1 := T1.Create; T1.IntroduceYourself; end; From our Language Basics Topic. A unit. A unit is defined in its own source file (a .PAS file) that contains types (including classes), constants, variables, and routines (functions and procedures). Each unit begins with unit UnitName; where UnitName must match the filename (minus the .PAS extension). The .PAS unit files are compiled into Delphi Compiled Units with a .DCU extension. A Delphi program is constructed from units. Specifically, the .DCU files are linked into your application. The Delphi compiler is very fast because it only recompiles units that have changed. You can force Delphi to recompile all units with a build all. From our Delphi for Win32 Topic. Error: [DCC Fatal Error] Program or unit 'Buttons' recursively uses itself
Explanation: You cannot create a Delphi unit with the same name as is already in use. For example, do not create a buttons.pas unit for your application because the VCL already has a Buttons.pas unit. The solution is to rename your unit. From our Delphi for Win32 Topic Resource Link of the Month: Book: Delphi 2007 for Win32 Development Essentials Bob Swart, affectionately known by some of us as "Dr. Bob," has long been a great resource for details about Delphi development.
I'll never forget how, when I first had to write a Windows service in Delphi, Dr. Bob's articles provided the most lucid explanations about all the ugly details of Windows Services.
Swart, being a well recognized Delphi authority, I'll read any thing the good doctor publishes. I'm drooling to get my hands on this one. From our BDE Topic. Question: I have an application in Delphi 1-7, using BDE. Is there a way that I can upgrade the BDE so the can work with MSSQL 2005 or 2008. They work fine if MSSQL2000 is is used. Am I on a dead end or there is still hope? Answer: In 2001 or 2002, Borland announced that they were stopping development on the BDE and on SQL Links. That news affected SQL Links users most since SQL Servers change more dramatically than Paradox and dBase do. So, yes, you are in a bad situation.
You could continue with the BDE using the ODBC drivers for MS SQL but most developers switched out BDE/SQL Links for ADO/dbExpress. My suggestion is to take a look at switching out to ADO. From our Tool Basics Topic Tip of the Month To insert a GUID into code using the Delphi Editor, use Control + Shift + G. ['{BB45987C-0552-415F-A439-636A87E9F4E2}']
However, if you are using either the Visual Studio or Visual Basic key mapping emulation, use Control + Alt + G. | |
Delphi Message Board Ask this group a question! Select a topic below or Visit Delphi Board Now!
Monthly Java Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Language Details Topic. Code Snippet of the Month Unlike languages such as C++ and Object Pascal, every line of code written in Java must occur within a class. //Declare class. public class Cyborg { //Fields. private String cyborgName; private int age; //Constructor. public Person() { cyborgName = "unknown"; age = 0; } } //Create object from class. Cyborg p = new Cyborg(); p.getClass(); //From the Object base class. From our Java Topic Resource Link of the Month: Eclipse Eclipse (although it can be used for and has many other plugins for other languages) is a widely supported, open-source, free, IDE for creating Java applications; whether they be small one-off programs or enterprise wide systems. | |
Java Message Board Ask this group a question! Select a topic below or Visit Java Board Now!
Monthly JavaScript Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Beginners Corner Topic. Code Snippet of the Month Language Overview: Class-like language with limited but usable class-like and object-like functionality but no formal inheritance nor visibility control, etc.
Target Platforms: JavaScript is most commonly used to extend HTML by executing code on the browser side when visiting a website. It does have other uses including server side scripting and AJAX. From our JavaScript and AJAX Topic. Question: How is JavaScript syntax like C / C++? Answer: The languages have enough in common to make learning one easy if you know the other. By the same token, the differences are subtle enough to trip up those proficient in both. Here's a short list comparing C and JavaScript: - Terminating JavaScript command lines in semicolons is optional; in C it's mandatory. Recommended practice is to use them religiously in both languages (and Java as well).
- Both JavaScript and C are case-sensitive; 'doThis' is different from 'DOTHIS'. Experienced programmers learn to love this feature, which drives beginners nuts.
- Both JavaScript and C are block-structured computer languages and employ curly brackets -- '{' and '}' -- to delimit blocks.
- Both JavaScript and C employ quotation -- enclosure in single or double quote marks -- to designate text strings.
- Arrays in both JavaScript and C are zero-based; the first element is myArray[0], not myArray[1].
- Both JavaScript and C employ '==' for comparison, '=' for equality, and '!' for negation. In fact the set of JavaScript operators is essentially borrowed from C (right down to the deprecated ternary construct a ? b : c).
- Both JavaScript and C employ the symbols /* to designate a comment */. JavaScript also permits the use of '//' for short comments, as in C++.
Finally, JavaScript's statements are a strict subset of C++'s, offering a smaller selection of identical looping and conditional constructs. | |
JavaScript Message Board Ask this group a question! Select a topic below or Visit JavaScript Board Now!
Monthly Paradox Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our OPAL: Language Details Topic. Code Snippet of the Month In ObjectPAL, you can filter set a TCursor, UIObject, and Table objects using setRange() and setGenFilter(). The following example loads, filters, and runs a report.
var r Report dyn DynArray[] String endVar
dyn["Name"] = "SCUBA Heaven" Customer.setGenFilter(dyn)
r.load(":Sample:customer") r.Customer.setGenFilter(dyn)
r.run()
You can also drop a flter with:
r.Customer.dropGenFilter() From our OPAL: Language Basics Topic. Camel Casing capitalizes the first character of each word except the first word, so it frequently looks like a one or two hump camel. Used by many languages including Paradox's ObjectPAL.
You can contrast Camel Casing with Pascal Casing which capitalizes the first character of each word (including acronyms over two letters in length) and was popularized by Pascal. Camel Casing capitalizes the first character of each word except the first word, so it frequently looks like a one or two hump camel. Used by many languages including Paradox's ObjectPAL. myAge theBoxCar
You can contrast Camel Casing with Pascal Casing which capitalizes the first character of each word (including acronyms over two letters in length) and was popularized by Pascal. From our P9 Book: Power Programming Topic Download the 1,500 KB ZIP support file download (unzips to 5+MB). Contains 200+ forms demoing code from the book PLUS OTHER MATERIAL (much more material). Also includes 7 libraries, 10 scripts, and other support files (reports, queries, tables, datamodels, etc.) From our Paradox for Linux Topic Resource Link of the Month: Paradox for Linux Resource Page Our Prestwood Programmer Community page that contains links to varioius Paradox for Linux resources. Part of our Linux Group. From our Interactive Paradox: Using Data Topic. Question: How do I import an Excel 2003, XP, or 2007 spreadsheet? Answer: Corel Paradox 9, 10, and 11+ can import Excel spreadsheets up through Excel 97 so you need to save the spreadsheet as an Excel 97 spreadsheet. Then you can import it in Paradox using either the interactive File | Import option or with ObjectPAL's importSpreadsheet procedure.
If you have trouble with then Excel 97 file format (and you may depending on the version of Excel you are using), try saving the file as an Excel 4 file format. The worst case scenario, is that you may have to save the file as a dBASE table file format (.DBF) which you can directly use in Paradox and even copy it to a Paradox table (.DB). From our Paradox Tables Topic Tip of the Month Autoincrement fields have the same type as a long integer. This is important to know when linking with detail tables. | |
Paradox Message Board Ask this group a question! Select a topic below or Visit Paradox Board Now!
| Thread Starter | Replies | Last Post | Topic | | Have a problem with Paradox... Have a problem with Paradox 9 running on XP Pro workstation. Been running this for several years on a Server with XP Pro OS. Have two workstations a... | 3 | You indicated that the data was stored on the server. Where is the code, forms, reports etc.?&... 5/12/2010 | Paradox Tables | | Paradox for DOS 4.5 Very S... I am running Paradox for Dos 4.5 on Windows XP. I have set it to run on a Network and it does work however it takes about 4 seconds to access the y: drive which... | 3 | We had a similar problem with our wireless. We were getting interference with our wireless pho... 4/29/2010 | Paradox for DOS | | Im running Paradox 9 on a T... I'm running Paradox 9 on a Toshiba Satellite L305-S5894 with Vista.Paradox periodically crashes when I either:1. try to sort a table2. close out a table.These c... | 9 | As Mike recommends...check your version. The service packs are everything.
... 3/8/2010 | Paradox Setup, Vista, etc. | | no shortcut icon option wit... HI,
I'm Randy. Have been developing with Paradox since the DOS days. Been a few years since I visited a Pdox forum. Good to see there are ... | 1 | I was successful in changing the embedded icon of the PDXRWN32.exe. It still works and th... 2/27/2010 | Paradox Runtime & Distribution | | Redesign Tables ?? I broke a cardinal design rule. I designed my Tables using spaces such as "Last Name" and "First Name". Now I am realizing that I am having difficul... | 1 | First off, you definately can use spaces in your fieldnames. Yes, you'll have to learn how to handle... 2/23/2010 | Paradox Tables |
A classic post from our Beginners Corner topic... Perl Variables ($x = 0;) by Mike PrestwoodPerl is a loosely typed language with only three types of variables: scalars, arrays, and hashes. Use $ for a scalar variable, @ for an array, or % for a hash (an associative array). The scalar variable type is used for anytype of simple data such as strings, integers, and numbers. In Perl, you identify and use a variable with a $ even within strings A classic post from our Beginners Corner topic... A 10 Minute Perl Quick Start by Mike PrestwoodA short 10 minute Perl primer. Get started in Perl now! |
Monthly Perl Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Beginners Corner Topic. Code Snippet of the Month An operation with only one operand (a single input). The following are the Perl unary operators: !, -, ~, +,�\, &, and *.
- ! performs logical negation which is "not"
- - performs arithmetic negation if the operand is numeric.
- ~ performs bitwise negation, that is 1's complement.
- + has no semantic effect whatsoever, even on strings.
- \ creates a reference to whatsoever follows.
- & Address of operator.
- * Dereference address operator.
| |
Perl Message Board Ask this group a question! Select a topic below or Visit Perl Board Now!
A classic post from our Beginners Corner topic... PHP Variables ($x = 0;) by Mike PrestwoodPHP is a loosely typed language. No variable types in PHP. Declaring and using variables are a bit different than in other languages. In PHP, you identify and use a variable with a $ even within strings!
You assign by reference with & as in &$MyVar.
|
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Language Reference Topic. Code Snippet of the Month PHP uses functions and loosely typed parameters. Function definitions can come before or after their usage so my preference when mixing PHP in with a mostly HTML page is to put the functions after the </html> tag. function sayHello($pName) { echo "Hello " . $pName . "<br>"; } function add($p1, $p2) { return $p1 + $p2; }From our Education (Audio/Video) Topic Resource Link of the Month: Video: What's New in Delphi for PHP 2 What's new with Delphi for PHP 2.0 by Nick Hodges (Delphi for PHP product manager). | |
PHP Message Board Ask this group a question! Select a topic below or Visit PHP Board Now!
| Thread Starter | Replies | Last Post | Topic | | PHP and Paradox Hello,
Is it possible to retrieve multiple records from a paradox table in php? I can connect and retrieve a single record, but I don't see how, given the php ... | 1 | Hi Steve,
Are you using a select statement right now? In other words, when you say " I can connect ... 2/15/2010 | PHP |
Prestwood Message Board Ask this group a question! Select a topic below or Visit Prestwood Board Now!
A classic post from our Computer Community topic... Prestwood Community Rules & Disclaimers by Mike PrestwoodThe Prestwood Online Community rules and disclaimers. Essentially, our policies all center around be-friendly, don't flame, encourage more discussion, and limit advertising to approved areas. |
PrestwoodBoards Message Board Ask this group a question! Select a topic below or Visit PrestwoodBoards Board Now!
A classic post from our Language Details topic... Delphi Prism Overloading (implicit) by Mike PrestwoodLike Delphi, Prism supports overloading. However, Prism supports implicit overloading (no need for an overload keyword). A classic post from our OOP topic... Delphi Prism Class..Object (class..end..new) by Mike PrestwoodDeclare your class in the Interface section. Then implement the class in the Implementation section. To create an object instance, use the New keyword. Optionally, you can use Create for backword compatibility with Delphi if you turn it on in the compatibility options. Since Prism does have a garbage collector, you do not have to free the object. If you need to free either unmanaged resources or resources where "timing" is important, implement IDisposable and take control of freeing the object yourself using Dispose. |
Monthly Prism Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our OOP Topic. Code Snippet of the Month Prism uses the keyword method for member methods. Alternatively, you can use procedure or function if you want the compiler to make sure all functions return a value and all procedures do not. In the interface section: Cyborg = class(System.Object) public method IntroduceYourself(); end;
In the Implementation section: method Cyborg.IntroduceYourself(); begin MessageBox.Show("Hi, I do not have a name yet."); end;
On some event like a button click: var T1: Cyborg; begin T1 := New Cyborg; T1.IntroduceYourself; end; From our Tool Basics Topic A Delphi Prism implementation of the Delphi for Win32 RTL. From our Language Details Topic Resource Link of the Month: The Delphi Prism Primer Comprehensive introduction by Christian Stelzmann. From our Delphi Prism Topic. Question: What is the difference between a partial method and an abstract method? Answer: Both are very similar in usage. However, a partial method is a callable empty method whereas an abstract method is a defined method in a parent class that must be implemented in a child class. Contrast this with a partial method which can be implemented in a child class but does not have to be. Partial methods are common with code generators for managing events. | |
Prism Message Board Ask this group a question! Select a topic below or Visit Prism Board Now!
Monthly PSDP Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our PSDP & Process Topic. A task, requirement item, design item, test script, or defect. Generically you could refer to items in PSDP as software artifacts (especially requirement items, design items, and test scripts). A PSDP Artifact is a feature that links to together a task, requirement item, design item, and test script. From our PSDP Phases Topic. Question: What is the default phase for a task, artifact, and defect? Answer: The default phase for a defect is Phase 6 Testing & Rework. The default phase for a task or PSDP Artifact is Phase 2 Requirements. Whether or not you have enabled PSDP Phases for a project, the defaults are always set just in case you enable PSDP Phases. Even though PSDP Artifacts contain a Task, Requirement Item, Design Item, and a Test Script, it belongs to the requirements phase because the Requirement Item is the first real software documentation item. An additional task or tasks of filling in design items belong to Phase 4 Detail Design. The task of coding the artifacts belong to Phase 5 Initial Coding, and finally the task of completing of the test scripts and testing a particular build belongs to Phase 5 Testing & Rework. | |
PSDP Message Board Ask this group a question! Select a topic below or Visit PSDP Board Now!
A classic post from our Domains topic... Conveting from a Workgroup to a Domain by Mike PrestwoodFor a particular user on a particular computer, all programs installed for all users will still be available whether they log into their computer or the domain. You will have to migrate all other user specific settings either manually or use an automated tool.
Both of which are incomplete so expect to have to manually migrate some application specific settings and data for each user. At a minimum, log into the old local account and migrate My Documents, Desktop, Favorites, and perhaps e-mail such as the Outlook .PST or Outlook Express .DBX files. |
Monthly Tech Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Non-Removable Storage Technology Topic. Definition of the Month: RAID RAID is the acronym for a Redundant Array of Independent Drives. RAID specifies several "levels," 0, 1, etc. Different levels provide different options. One level allows you to combine multiple smaller drives into one, huge volume. Another level offers tremendous performance boosts by "striping" data across multiple drives such that reads and writes are split across the drives. If one drive fails, the other takes over until the bad drive is replaced. Once replaced, the RAID subsystem automatically restores the mirror. From our Exchange Server Topic. Question: What is the best way to share addresses in Exchange Server 2003? Answer: Create a Contacts folder in Public Folders. All a user will need to do is browse to the Public Folders section, go to properties, and check the box under Outlook Address Book tab.
Public folders have inverse permissions from individual Mailboxes. A mailbox has initial permissions granting access only to its owner. The owner may elect to open up permissions, allowing others to see various folders within his mailbox. Public folders are born with full access granted to everyone. The creator of the public folder can then tighten down access permissions as appropriate. From our Wireless Networking Topic Tip of the Month If you have a USB wireless device such as a wireless NIC, mouse controller, etc. that has a weak signal because of location, try adding a USB extension cable and placing the device in a more open location.
USB cables from stores such as Radio Shack, Best Buy, etc. are over priced 5 or 6 times what you can get on the internet.
For wireless network cards, you can also buy a range-extending antenna for the computer's WiFi card or router, or a wireless range extender. | |
Tech Message Board Ask this group a question! Select a topic below or Visit Tech Board Now!
A classic post from our General, Getting Started, etc. topic... What is technical writing? by Ramesh RAbout technical writing and the knowledge domain. |
Monthly Tech Writer Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Grammar Topic Tip of the Month Use "hung" for things and longer durations. Use "hanged" for people and shorter durations.
Examples:
"I hung a picture on the wall."
"He hung a deer on a tree for butchering."
"Felicia and Ashley hung out last night."
"Horse theives were hanged in the 19th century."
"The terrorist was hanged and his corpse was hung on the tree." | |
Tech Writer Message Board Ask this group a question! Select a topic below or Visit Tech Writer Board Now!
Monthly Tester Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Testing, QA, QC Topic. A process employed to ensure a certain level of quality in each deliverable such as a requirements specification, a design specification, the final delivered software, etc. A process employed to ensure a certain level of quality in each deliverable such as a requirements specification, a design specification, the final delivered software, etc. For software developers, the software development process is the process employed to ensure a certain level of quality. Prestwood Software Development Process (PSDP) is such a process. To learn more about PSDP, go to the PSDP Process Page. From our Testing Websites Topic Tip of the Month Test each website with various common browsers. As of early 2008, we test each website we build with Internet Explorer, FireFox, and Safari. Sometimes we also include Opera as part of our standard test suite. The minimum resolution we test for "regular" websites is 1024x768 (and higher). We no longer support 800x600. | |
Tester Message Board Ask this group a question! Select a topic below or Visit Tester Board Now!| Topic | Threads | Posts | Last Active Thread | | Testing | 1 | 0 | No Subject! |
V.FoxPro Message Board Ask this group a question! Select a topic below or Visit V.FoxPro Board Now!
A classic post from our Tool Basics topic... VB Classic Comments (' or REM) by Mike PrestwoodCommenting Code VB Classic, like all the VB-based languages, uses a single quote (') or the original class-style basic "REM" (most developers just use a quote). VB Classic does NOT have a multiple line comment.
Directives - #
Directives are sometimes called compiler or preprocessor directives. A # is used for directives within VB Classic code. VB Classic offers only an #If..then/#ElseIf/#Else directive. A classic post from our Language Basics topic... VB Classic Logical Operators (and, or, not) by Mike PrestwoodVB Classic logical operators:
| and |
and, as in this and that |
| or |
or, as in this or that |
| Not |
Not, as in Not This | |
Monthly VB Classic Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our OOP Topic. Code Snippet of the Month VB6 has limited support for interfaces. You can create an interface of abstract methods and properties and then implement them in one or more descendant classes. It's a single level implementation though (you cannot inherit beyond that). The parent interface class is a pure abstract class (all methods and properites are abstract, you cannot implement any of them in the parent class).
In the single level descendant class, you have to implement all methods and properties and you cannot add any. Your first line of code is Implements InterfaceName. | |
VB Classic Message Board Ask this group a question! Select a topic below or Visit VB Classic Board Now!
| Thread Starter | Replies | Last Post | Topic | | IP addreses As part of an application I am trying to program, I need to find out the users internet IP address. As some of you no doubt know, their are two seperate IP addr... | 1 | For lurkers, here's a goo... 2/20/2010 | VB Classic Other | | Reference the BDE in VB Is there any way to reference the BDE in my Visual basic 6.0 project so that I can access Paradox data and create ADO recordsets, execute queries, etc.? Thanks... | 1 | Hi Juan,
I hope all is going well!!! I just wanted to add to this old thread for those that end up ... 2/8/2010 | VB Classic Other |
A classic post from our OOP topic... VB.Net Constructors (New) by Mike Prestwood A sub named New. You can overload the constructor simply by adding two or more New subs with various parameters. Public Class Cyborg Public CyborgName As String Public Sub New(ByVal pName As String) CyborgName = pName End Sub End Class A classic post from our OOP topic... VB.Net Finalizer (Finalize()) by Mike PrestwoodUse a destructor to free unmanaged resources. A destructor is a method with the same name as the class but preceded with a tilde (as in ~ClassName). The destructor implicity creates an Object.Finalize method (you cannot directly call nor override the Object.Finalize method).
In VB.Net you cannot explicitly destroy an object. Instead, the .Net Frameworks garbage collector (GC) takes care of destroying all objects. The GC destroys the objects only when necessary. Some situations of necessity are when memory is exhausted or you explicitly call the System.GC.Collect method. In general, you never need to call System.GC.Collect. |
Monthly VB.Net Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Tool Basics Topic. Code Snippet of the Month Most (many?) developers recommend using "+" because that's what C# uses but "&" is also available and many VB Classic and VBA/ASP developers prefer it. My preference is to use the & because it offers implicit type casting. Dim FullName Dim Age //You can use + for strings. FullName = "Prestwood" Console.WriteLine("Hello " + FullName) //For implicit casting, use & Age = 35 Console.WriteLine(FullName & " is " & Age & " years old.") 'Implicit casting of numbers. ' 'This works: MessageBox.Show(3.3) 'This fails: 'MessageBox.Show("" + 3.3)
'This works: MessageBox.Show("" + CStr(3.3)) 'Implicit casting &. This also works: MessageBox.Show("" & 3.3) | |
VB.Net Message Board Ask this group a question! Select a topic below or Visit VB.Net Board Now!
Monthly Web Design Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Website Design Topic. Code Snippet of the Month Get rid of the boring default icon on your website. Add a custom icon! Most browsers support .ico and the most popular ones will show any standard web image.
Follow this easy step by step to add one to your web page or site.
Example: This is Prestwood.com's icon.  Images must be 16x16 pixels. I use GIMP to create mine.
Normally, save as a .ico file in the root of your site or in any unsecured folder. I usually put them in "/images", and I usually name it favicon.ico or favicon.gif.
Add this to the header section of your AJAX Master page or any aspx/htm/html/shtml page. <link REL="SHORTCUT ICON" HREF="/images/favicon.gif">
Some browsers even support ANIMATED gifs.
From our Graphics Topic Resource Link of the Month: Benefits of the PNG Image Format You should be aware of the benefits of using PNG images. This short article is a great overview. Although here at Prestwood we use and recommend using GIFs and JPGS because of compatiblity with older browsers and you can animate GIFs. However, this compatibility issue will likely go away in the coming years and we too may switch to PNG images at that time. From our Website Hosting Topic. Question: I've created a web application using v3.5 of the .NET Framework. But, when I go to deploy it, I find only versions 1.x and 2.x in the ASP .NET dropdown for IIS configuration of my application's virtual directory. Where is v3.5? How do I deploy if that's not a configuration choice? Answer: It's not there. You see, v3.5 isn't really a "version" in Microsoft's eyes. 3.5 builds upon v2, and is really considered an incarnation of v2. Sounds crazy, doesn't it? Not to worry, though, you can still deploy your v3.5 app. There are just two things that must be done:
- The .NET Framework, v3.5 must be installed on the server.
- When configuring your application's virtual folder in IIS, choose the v2.x from the ASP .NET version dropdown.
You'll find this in IIS on the ASP .NET tab of the Properties dialog for your app's virtual directory. From our Artistic (design, layout, etc.) Topic Tip of the Month Do not use the smallest standard font size of "1" and "xx-small" for any text you actually want a visitor to read. The smallest font size should be reserved for text you don't care if the visitor reads like the copyright notice at the bottom of the page. | |
Web Design Message Board Ask this group a question! Select a topic below or Visit Web Design Board Now!
Monthly Web Owners Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Standard Website Content Pages Topic Resource Link of the Month: Example Proper Online Netiquette Page This is our proper netiquette page. You are welcome to use it for your website. You can link to it or copy the content over to your website. If you copy it, you will most likely want to update it a bit as it's pretty specific to our website. | |
Web Owners Message Board Ask this group a question! Select a topic below or Visit Web Owners Board Now!
A classic post from our Win Users topic... Slow Open and Save Dialogs in MS Office by Wes PetersonWhen running an Office application, like Word, have you ever encountered maddeningly slow response in the Open or Save dialogs?
Here's the cause - and cure. |
Monthly Win Users Lesson | Learn! Review! Keep Up! |
| Short tidbits pulled from our knowledge base each month. | M O N T H L Y L E S S O N | From our Windows Vista Topic. The act of isolating or unbinding one computing resource from another. Windows virtualization adds virtualization services to the core Windows operating system at a fundamental level. From our Win Users Topic Resource Link of the Month: Primo PDF Convert to PDF from any application by simply 'printing' to the PrimoPDF printer - it couldn't be easier! Within minutes, you can create high-quality PDFs by converting from Word, Excel, and virtually any other printable file type.
- Completely FREE PDF Converter - not just a trial version.
- Print to PDF from virtually any Windows application.
- Create PDF output optmized for print, screen, ebook, or prepress.
- No annoying pop-up ads, no registration requirement - no catch!
- High-quality, easy to use PDF creator for all users.
- New! Ability to merge PDF files upon conversion.
- New! Now supports Windows Vista.
This is the PDF creating tool we use here at Prestwood software!From our Windows Vista Topic. Question: How many processors can Windows Vista use? Answer: Vista targets consumers so it does have limits. Vista Business, Enterprise, and Ultimate OS support 2 physical CPUs; others support one only. There is no limit on the cores. So, for example, you could have 2 physical CPUs with 2 cores each and Vista Business will fully utilize all four processors. If you need more, use the Windows server OSes. From our Windows Vista Topic Tip of the Month If you want to make your application data available to multiple users on a Windows Vista PC you can place the data in a subfolder of the Public folder. Vista does not virtualize this folder and it is available to all users on a PC. You can also set the permissions on the files or folders you want to share to allow all users full permissions. | |
Win Users Message Board Ask this group a question! Select a topic below or Visit Win Users Board Now!
| Thread Starter | Replies | Last Post | Topic | | TMonthCalendar and OnGetMon... I've noticed a problem with the OnGetMonthInfo event of TMonthCalendar. (IE. MonthCalendar1GetMonthInfo(Sender: TObject; Month: Cardinal; var MonthBoldInf... | 1 | Try such a nice piece of code as Calendar.Date:=Calendar.Date+31; C... 9/4/2010 | Delphi VCL | | PrinterSetCurrent I have the following code on a form to switch printers behind the scenes. There is a table that lists the users printers and a field in that table that defines what the printer is used for (i.e.... | 0 | New! 9/2/2010 | ObjectPAL | | ReportPrintInfo DynArray Can anybody explain to me the syntax to use ReportPrintInfo - the syntax # 3 version that uses an array? I need to set the PrintToFile option to create a postscript file and it seems to only be availa... | 0 | New! 9/2/2010 | ObjectPAL | | ReportPrintInfo DynArray Can anybody explain to me the syntax to use ReportPrintInfo - the syntax # 3 version that uses an array? I need to set the PrintToFile option to create a postscript file and it seems to only be availa... | 0 | New! 9/2/2010 | ObjectPAL | | Printing forms as reports d... I have a 3 page form that I need to open as a report. When I open it, however, I only get the first page and a half. Any ideas? I have to do i... | 1 | Figured it out - has to do with the page size - ended up having to create 3 seperate reports but it ... 9/2/2010 | Paradox Reports | | Changing account records ba... Does anyone know how to write this Paradox 4.5 code into a Paradox 11 script?
This works in my old Paradox. It goes through a list of account names finds the account in another table and scans to pro... | 0 | New! 8/29/2010 | ObjectPAL | | Windows 7 Paradox 9 report ... I've successfully installed Paradox 9 on a windows 7 workstation linked to SBS 2008.However, when I went to amend a report by redefining a field, Paradox crashe... | 9 | I've tried everything suggested in previous posts. Sometimes it works and sometimes it crashes. My w... 8/24/2010 | Paradox Reports | | Server 2003 and BDE I have just thought I might move all my delphi stuff onto my 2003 server and then use remote desktop to access it however some of my apps give me a bdertl70 err... | 2 | Hi Owen,
I suspect a rights problem. The app/user needs full rights to the data folder and net dir. 8/16/2010 | Delphi Single User Apps | | Paradox 7 Update I know P7 is an ancient version but I dug the install disks out of a dusty drawer this morning and installed it in my XP machine. My question is whether I need ... | 1 | Never mind, I've applied the patch selectively. 8/11/2010 | Paradox Setup, Vista, etc. | | Diplaying javascript error ... | 0 | New! 8/7/2010 | ASP Classic - Handling Data |
|