The Prestwood eMag  |  www.prestwood.com |
|
| September 2009 - Full Edition | Year 11 Issue 9
|
|
| A computer community for power-users and I.T. professionals! |
|
Table of Contents: |
|
 Wes Peterson | From our General Coding Concepts topic...Is Native Code Irrelevant?by Wes Peterson With Microsoft heavily evangelizing .NET, and Sun continuing to improve Java, many a developer and customer are torn between targeting native machine code or a just-in-time compiler.
Here we take a quick look at that particular state of the union... A classic post from our Win Users topic... Speed Up Your Windows Computer for FREE by Mike PrestwoodIf your computer was fast but is now slow, you can use techniques such as adware removers, defrag, and others to bring your PC back to life! You can also add hardware to speed up your computer (RAM, SATA HD, better video card, etc.). 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. From our psSendMail DLL topic... v1.1 Documentation by Wes Petersonv1.1 of psSendMail will soon be replaced by v2.
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 Access VBA is a loosely typed language. Declaring variables is optional unless you use the Option Explicit statement to force explicit declaration of all variables with Dim, Private, Public, or ReDim. Using Option Explicit is strongly recommended to avoid incorrectly typing an existing variable and to avoid any confusion about variable scope. Variables declared with Dim at the module level are available to all procedures within the module. At the procedure level, variables are available only within the procedure. Dim FullName As String Dim Age As Integer Dim Weight As Double FullName = "Mike Prestwood" Age = 32 Weight = 154.4 'Declaritive assignment not supported: ''Dim Married As String = "Y" '>>>Not supported. | |
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. Where you generalize specific classes into general parent classes or take general parent classes and specialize them as needed in child classes. A Generalization relationship is the equivalent of inheritance in object oriented programming (OOP). A Generalization relationship is an "is-a" relationship and is indicated by an arrow with a hollow arrowhead pointing to the parent class. For example, a Honda Accord "is-a" Car. | |
Analyst Message Board Ask this group a question! Select a topic below or Visit Analyst Board Now!
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 Tool Basics Topic. Code Snippet of the Month Languages Focus: End of StatementIn coding languages, common End of statement specifiers include a semicolon and return (others exist too). Also of concern when studying a language is can you put two statements on a single code line and can you break a single statement into two or more code lines.
ASP Classic End of StatementA return marks the end of a statement and you cannot combine statements on a single line of code. You can break a single statement into two or more code lines by using a space and underscore " _". Response.Write("Hello1") Response.Write("Hello2") Response.Write("Hello3") 'The following commented code on a single line does not work... ' Response.Write("Hello4") Response.Write("Hello5") 'Two or more lines works too with a space+underscore: Response.Write _ ("Hello6")
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 WebForms Coding Tasks topic... ASP.NET Extension Information by Mike PrestwoodThis article describes the ASPX file extensions. A classic post from our OOP topic... C# Finalizer (~ClassName) 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 C# 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. |
| 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 C# uses a semicolon ";" as an end of statement specifier and you can put multiple statements on a single line of code if you wish as well as split a single statement into two or more code lines.
Console.WriteLine("Hello1"); Console.WriteLine("Hello2"); Console.WriteLine("Hello3"); //Same line works too: Console.WriteLine("Hello4"); Console.WriteLine("Hello5"); //Two or more lines works too: Console. WriteLine ("Hello6");
From our C# Topic. A Delegate is a variable that references a method.A delegate is a variable that references a method. A delegate's signature (parameters and return value) must match the signature of the method that it references. In some cases it is possible to use a method with parameters that are less derived than in the delegate or a method with a return type that is more derived than in the delegate 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++ OOP Topic. Code Snippet of the Month C++ supports both multiple implementation inheritance and multiple interface inheritance. 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 General Coding Concepts Topic. A language symbol used for assignment, comparison, computational, or as a logical. A language symbol used for assignment, comparison, computational, or as a logical. 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!
| Thread Starter | Replies | Last Post | Topic | | Great Delphi and .Net Tool Bought this two days ago.
Easy to implement, flexible and everything it says it... | 1 | Hi Daniel,
Yeah, that's a great tool. One of our members demoed it at one of our Sac Delphi user gr... 9/18/2009 | Coding Techniques |
A classic post from our MS SQL 2005 topic... Moving Databases with SQL Server 2005 by Joshua DelahuntySQL Server 2005's available management tools make moving databases from one machine to another a snap. This article describes the steps 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. Definition of the Month: ANSI ANSI is an acronym for American National Standards Institute. ANSI - An acronym for American National Standards Institute. The ANSI set consists of 8-bit codes that represent 256 standard characters, letters, numbers, and symbols. The ANSI set is used by Windows applications. 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 Education (Audio/Video) Topic Resource Link of the Month: Video: MySQL On Demand Web Seminars Lots here! MySQL has made available on-demand web seminars. They are recorded replays of our their live more popular web seminars and cover a wide range of topics. You will have to register but well worth it if you use MySQL. 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 Delphi for Win32 topic... Virus Targets Old Delphi ToolsNew virus targets old versions of Delphi but not the applications developed with Delphi and not the current Delphi versions, just Delphi itself. I detest the jerks that write viruses and other forms of malware. But this one really gets my goat generally because it was a virus that targeted my favorite best-of-breed development tool and specifically because ZDNet reported the problem in a way that implies it targets applications developed by Delphi. Despite ZDNet's tag line, the virus targets old versions of Delphi (4, 5, 6, and 7) but not the applications developed with Delphi and not the current Delphi versions. I sure hope the way ZDNet chose to report this issue doesn't hurt Embarcadero, the owner of Delphi, because of a virus that attacks pre-Embarcadero versions of Delphi. A classic post from our Using Data topic... Delphi Components 101 by Mike PrestwoodBe careful who you associate with! |
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 Delphi for Win32 Topic. Code Snippet of the Month Delphi also offers a try...finally where code will execute in the finally section no matter what. It's common to put a try...except inside a try...finally: var y : Double; begin try y := 0; y := (1/y); ShowMessage(FloatToStr(y)); except ShowMessage('You cannot divide by zero.'); end; 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 Education (Audio/Video) Topic Resource Link of the Month: Video & Audio: CDN Delphi TV Lots here! Delphi TV is part of CodeGear's developer network. Contains both audios and videos. From our OOP Topic. Question: What is a sealed class? 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 The Java compiler automatically inlines when it determines a benefit. The use of final methods is considered a compiler hint to tell the compiler to inline the method if beneficial. 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 JavaScript logical operators:
| and, && |
and, as in this and that |
| or, || |
or, as in this or that |
| !, Not |
Not, as in Not This | //Given expressions a, b, c, and d: if !((a && b) && (c || d)) { //Do something. } 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!
A classic post from our P9 Book: Power Programming topic... Power: d_Appendix A, Prestwood Coding Convention by Mike PrestwoodThis chapter will introduce you to creating both menus and pop-up menus. If you are going to create an application-wide menu, then I strongly recommend you use Paradox’s Application Framework. This chapter will instruct you how to create menus for non-Application Framework applications and pop-up menus you can use with both. A classic post from our Interactive Paradox: Using Data topic... A Data Normalization Primer - Part 3 by CliffSuttleIn October we finally normalized our invoice data base. In this final part III, there will be little in the way of review, so if you’re lost, don’t be lazy, read parts I and II. |
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 By Reference or Value (and by constant) The default for parameters is by value. For by reference, add var in front of the parameter. ObjectPAL also offers constant parameters where you add const in front of the parameter. A constant parameter is like a read-only parameter the compiler can optimize. You cannot assign a value to a constant parameter. method cmCode(s String) ;...s is by value. endMethod
method pushButton(var eventInfo Event) ;...eventInfo is by reference. endMethod
method cmCode(Const s String) ;...s is a constant read-only parameter. endMethod proc cpNever() String return "Never duplicate a line of code!" endProc
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 Paradox & ObjectPAL Topic Lots to download here including support files, chapter PDFs, sample applications, and more. Lots to download here including support files, chapter PDFs, sample applications, and more. From our Paradox & ObjectPAL Topic Resource Link of the Month: Corel WordPerfect X3 Pro Home Page Paradox 11 with SP2 applied ships with WordPerfect Office X3 Professional Edition. There are two ways to get the current Paradox, buy the WPO Pro Edition (X2, X3, etc.) or buy a license directly from Corel.
System requirements
 |
Windows® Vista (Home Basic, Home Premium, Ultimate, Business 32 bit and Business 64 bit Edition with latest SP and Critical Updates)*, Windows® XP (Home, Media or Professional Edition with latest SP and Critical Updates), Windows® 2000 (with latest Critical Updates) or Windows® 98 SE (with latest Critical Updates) |
 |
128 MB RAM (256 MB recommended) |
 |
466 MHZ (Pentium® III or equivalent processor recommended) |
 |
450 MB hard disk space for minimum installation |
 |
Super VGA, 16-bit color monitor with 800 x 600 or greater resolution |
 |
CD-ROM drive |
 |
Mouse or Tablet |
*Paradox and the SDK (software development kit), included in the Professional Edition, will be updated for Windows® Vista at a later date. From our Tool Basics Topic. Question: Whats new in Paradox 13? My Paradox Version is 9 Developer.
Is it right what Paradox 9 forms are not compatible with Paradox 13? Is there anything else happens? Answer: [answered by Mike Prestwood] Paradox version 11 shipped with WPO X2 and Paradox 11 with SP2 ships with WPO X3 and WPO X4. Paradox 11 is essentially the same as Paradox 10 with NO NEW features (minor defects and compatibility issues were resolved). There is no Paradox 12, 13, or 14. Currently Corel states that Paradox is in maintenance mode (meaning no new features are planned).
As for your Paradox 9 forms, you can simply resave them and/or redeliver them in the new version. If you used the Application Framework in 9, it's not in 10 nor 11 so you have some work to do. From our OPAL: Language Basics Topic Tip of the Month If, in experimentation, you use sleep(), doDefault, or DisableDefault to overcome some odd or misunderstood behavior, do not leave the commands in your code. If using the command didnt seem to make a difference, then take it out. Use commands only when they are called for. One great way to really learn the event model and the power of these and other commands is to experiment with adding them. Remember to take them out, however, if they do not do what you wanted. | |
Paradox Message Board Ask this group a question! Select a topic below or Visit Paradox Board Now!
| Thread Starter | Replies | Last Post | Topic | | Paradox drivers, Vista issues {Too Long} | 1 | This may - or may not - help you:
I just concluded an ASP .NET project that needed to read and writ... 11/4/2009 | Paradox Setup, Vista, etc. | | Change color on form Hi Everyone...
New to Paradox.. can't seem to put my finger on the answer for this one.
I have a form with a checkbox on it.. if the checkbox is marked(chec... | 4 | Rick is correct.
In the case you've described there are several considerations. ... 9/1/2009 | Paradox Forms | | ObjectPAL sort question | 1 | the sort only gets forced to a different table if the source table is keyed.. you can add indexes to... 8/19/2009 | ObjectPAL | | look up tables my new computer, an HP laptop, will not allow me to select a look up table. it gives a general protection fault or an error message. i can do this e... | 1 | Hi Marilyn,
Are the paths the same as on the other computer? 8/6/2009 | Paradox Tables | | Printing Code in Color Hi Everyone... I need to print the ObjectPal Scipts in color. This will allow me to draw lines, circles, etc in my attempts to learn & troubleshoot th... | 3 | Sounds great. Let me know either way. 8/6/2009 | ObjectPAL |
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!
A classic post from our psSendMail DLL topic... v1.1 Documentation by Wes Petersonv1.1 of psSendMail will soon be replaced by v2.
|
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!
| Thread Starter | Replies | Last Post | Topic | | It's Done: Borland is no mo... Hi all,I just posted a news post about the final decline of Borland Software tit... | 2 | Very sad. 10/25/2009 | Just Conversation | | sawasdee krub (hello) Sorry for my poor english.My name is Thammanoon Semapru.I am 27 years old. I come from Thailand. I want to be a good and intelligent delphi programmer. I ... | 1 | Welcome Thammanoon. If you haven't done so yet, jo... 10/3/2009 | Member Introductions |
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 Member Field by Mike PrestwoodIn Prism you can set the visibility of a member field to any visibility: private, protected, public, assembly and protected or assembly or protected. Prism supports the readonly modifier for member fields which is handy for constant like data. In this case, I chose not to preface my read-only member field with "F" so it's usage is just like a read-only property. Prism also support the class modifier (static data) for member fields. Delphi developers should notice the use of := to initialize a member field (in Delphi you use an =). |
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 Delphi Prism Topic. Code Snippet of the Month In Prism, you define constants similar to how you define variables but use the Const keyword instead of the Var keyword. Specifying the type is optional. If you don't specify the type, the compiler chooses the most appropriate type for you.
Declare class constants as part of the class definitions. Declare local constants above the begin..end. Although Prism support inline variables, inline constants are not supported. //Specified type: const kFeetToMeter: Double = 3.2808; kMeterToFeet: Double = .3048; kName: String = "Mike"; //Unspecified type: const kPIShort = 3.14; 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 Checkpoints Topic. A checkpoint is NOT a task, but rather a milestone. A point in the project that marks significant progress. Although PSDP contains many standard checkpoints, the executive sponsor and project manager must agree on the checkpoints they wish to track. Once established, tasks can be associated with a checkpoint and you can easily view what tasks are completed per checkpoint and what checkpoints do NOT have tasks established yet. From our PSDP Change Orders Topic. Question: With a PSDP online project, when should I activate the change orders module and when should I create a change order? Answer: At Prestwood Software, all billable projects over 40 hours must make use of the change order module. Your first entry in the change order module is your first estimate/budget (a change from 0 to an initial minimum budget). After that, add a change order whenever the project budget increases (mandatory), decreases substantially (optional), or features are changed or swapped out (optional). | |
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. A classic post from our Technical Writing topic... Technical Writing Domains by Ramesh RA large set of technical writing work have grown up and it has started spanning across several domains. Documentation is strictly a requirement by most of the companies when we look at information management techniques as a whole. Over a period of time, the documentation changes need to be tracked and verified including the release changes and changes in development/API. Technical writing is not just limited to software or hardware or products as such. It is existing across several domains. Let us try to understand the various domains in which technical writing offers it role. |
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 "him" is for "whom" and "he" is for "who" Who is coding that requirement? (He is coding it.) To whom do we ask about this requirement? (We ask him.) | |
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!
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 Interfaces (Interface, Implements) by Mike PrestwoodWith VB.Net you define an interface with the Interface keyword and use it in a class with the Implements keyword. In the resulting class, you implement each property and method and add Implements Interface.Object to each as in: Sub Speak(ByVal pSentence As String) Implements IHuman.Speak MessageBox.Show(pSentence) End Sub |
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 VB.Net Topic. Code Snippet of the Month By Reference or Value For parameters, you can optionally specify ByVal or ByRef. ByVal is the default if you don't specify which is changed from VB Classic (in VB Classic, ByRef was the default). Private Function Add(ByRef a As Integer, _ ByRef b As Integer) As Integer Add = a + b End Function | |
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 Graphics Topic. Question: Should I use GIF or PNG images on my website? Answer: Although the PNG format is slightly superior to the GIF format, GIF is more compatible with older browsers so we are currently recommending you use GIF images. That's the quick answer. However, there are issues so if you wish to use PNG images, read up about it to understand it's pros and cons. 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!
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 Resource Link of the Month: Ultimate List of Free Windows Vista Software from Microsoft Free software from Microsoft? For Vista?
You bet. Check this link for many titles.
For similar XP offerings, see the link below. From our Windows Vista Topic. Question: How do I enable Offline Files in Windows Vista? Answer: In Vista Professional and above, Offline Files is now a Control Panel applet. Go to your control panel, open the Offline Files applet and click the Enable Offline Files button. Offline Files is NOT available in Vista Home Edition nor is it availble in Windows XP Home Edition. In Windows XP, Offline Files is part of the Folder Options. To enable Offline Files in XP: - Click Start, and thin click My Computer.
- On the Tools menu, click Folder Options
- Click the Offline Files tab.
- Select the Enable Offline Files check box, and then clock OK.
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 | | I need to create an rtf file. I need a Rich Text file for a program I'm using (CorelDraw - merge).
I'm not sure if it works to create an rtf file using ObjectPAL but that would be the easiest, otherwise I would like to know how t... | 0 | New! 9/8/2010 | ObjectPAL | | 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. |
|