13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.130 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.1313:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.13

.

.

Monday, January 18, 2010

Working Web Application in ASP.Net, C#, w/Ajax Storing Data on an MS SQL Server Remotely




Working or Maybe Not - Yet

Check it Out !





















Sunday, January 17, 2010

Assembly Programming - Good Tutorial by a Knowledgeable Guy

http://www.xs4all.nl/~smit/asm01001.htm

===================================================================


Assembly Tutorial


"This is for all you folks out there, who want to learn the magic art of Assembly programming." - MAD

Index of Section 1

Ready To Start
Memory Segmentation
Code Example
The Stack
The Naming Convention
Main Page
Next Chapter
First thing you need to know is that Assembly is a great, fast language, but only if you put time and effort in learning it. You must give all or nothing. (I suggest you give all) And remember, the beginning is always borring and hard...so don't give up !
Well, I'll start with the basics, like instruction format and some simple instructions to manipulate registers. I don't know how much you know about coding, so I'll explain even the most simple stuff. Please note, that I explain 8086 assembly coding. That means NO 32-bit registers and instructions and NO protected-, real- and virtual 86 mode for now.


Ready to Start!

First of all, we'll talk about the registers and then about the instructions to manipulate (change) them. The 8086 has 14 16-bit registers, all with different usage (see below). You might not understand some of the registers purposes, but be patient, I'll explain everything later.

Segment Registers
CS Code Segment16-bit number that points to the active code-segment
DSData Segment16-bit number that points to the active data-segment
SSStack Segment16-bit number that points to the active stack-segment
ESExtra Segment16-bit number that points to the active extra-segment
Pointer Registers
IPInstruction Pointer16-bit number that points to the offset of the next instruction
SPStack Pointer16-bit number that points to the offset that the stack is using
BPBase Pointerused to pass data to and from the stack
General-Purpose Registers
AXAccumulator Registermostly used for calculations and for input/output
BXBase RegisterOnly register that can be used as an index
CXCount Registerregister used for the loop instruction
DXData Registerinput/output and used by multiply and divide
Index Registers
SISource Indexused by string operations as source
DIDestination Indexused by string operations as destination
(The general purpose registers can be "split". You have the AH and the AL register for example. AH contains the high byte of AX and AL contains the lowbyte. You also have: BH, BL, CH, CL, DL, DH So if eg. DX contains the value 1234h DH would be 12h and DL would be 34h).
And a 16-bit FLAG Register. All "flags" (see below) are stored here. The FLAGS Register consists of 9 status bits. These bits are also called flags, because they can either be SET (1) or NOT SET (0). All these flags have a name and purpose.

Flags Register
Abr.Namebit nÂșDescription
OFOverflow Flag11indicates an overflow when set
DFDirection Flag10used for string operations to check direction
IFInterrupt Flag9if set, interrupt are enabled, else disabled
TFTrap Flag8if set, CPU can work in single step mode
SFSign Flag7if set, resulting number of calculation is negative
ZFZero Flag6if set, resulting number of calculation is zero
AFAuxiliary Carry4some sort of second carry flag
PFParity Flag2indicates even or odd parity
CFCarry Flag0contains the left-most bit after calculations
Test it!
If you want to see all these register and flags, you can go to DOS and then start "debug" (just type debug) When you're in debug, just type "r" and you'll see all the registers and some abreviations for the flags. Type "q" to quit again. We won't use debug to program in this tutorial, we'll use a real assembler. I use TASM 3.2, but MASM or any other assembler works just fine too.


[Back] [Index]

Memory Segmentation

Now I've to explain something about the way the 8086 uses memory (actually about how DOS uses memory). Since the databus of the 8086 is 16-bits, it can move and store 16-bits (1 word=2 bytes) at a time. If the processor stores a "word" (16-bits) it stores the bytes in reverse order in the memory. It looks like this:
1234h (word) ---> memory 34h (byte) 12h (byte)
So if the memory looks like this: 78h 56h and you get a word from memory you'll get the value 5678h. (note, I use the "h" after a number to indicate it's hexadecimal) However, if you just get a byte from memory it goes this way: memory 78h 56h -----> first byte you get 78h. Okay, pretty clear huh?
Now let's talk about segments. The 8086 divides it's memory into segments. Segments are (standard in DOS) 64 KB big and have a number. These numbers are stored in the segment registers (see above). Three main segments are the code, data and stack segment. Segments overlap each other almost completely. If you start debug again and type "d" you can see some addresses at the left of the screen. The format is like this: 4576:0100. that's a memory address. The first number is the segment number and the second number is the offset within the segment. So FFFF:FFF0 means: Segment FFFFh and FFF0h bytes from the beginning of the segment.
As I said before, segments overlap. The address 0000:0010 is EXACTLY the same address as 0001:0000. That means that segment begin at paragraph boundaries. (a paragraph=16 bytes, so the segment starts at an address divisible by 16) Now you can start calculating REAL addresses in memory. An example: 0000:0010 means: segment 0000h offset 10h Now we multiply the segment number with 16 and add the offset.
Note that the offset 10h means the value 16 in decimal: (0 * 16 = 0 + 16 = 16) this is the linear address.
Next, the other address 0001:0000: (16 * 1 = 16 + 0 = 16). Same linear address! Like I told you. These are some basic things you need to know when you want to program in Assembly. Learn the registers and flags by heart and try to understand the segmentation of memory.
By The Way, this segmentation of memory is actually done by DOS at startup. On a 286 or higher, you have something called real-mode and protected-mode. This Segment explanation is based on Real-mode, in Protected-mode it's way different, but don't bother, that's real complicated stuff you don't need to know. Just assume that what I explained about segments is ALWAYS true. But remember in the back of your head, that there's more.... Trust me...... I know what I'm talking about.

[Back] [Index]

Our first program

Our first program will be a real simple one. I'll first give you the code and then I'll explain it. Here's the code, cut it out and put it in a file called FIRST.ASM. Download the source.

.model small
.stack
.data
message   db "Hello world, I'm learning Assembly !!!", "$"

.code

main   proc
   mov   ax,seg message
   mov   ds,ax

   mov   ah,09
   lea   dx,message
   int   21h

   mov   ax,4c00h
   int   21h
main   endp
end main

You can assemble this by typing: "tasm first [enter] tlink first [enter]" or something like: "masm first [enter] link first [enter] You must have an assembler and the link/tlink program. I'll explain the code now.
.model small : Lines that start with a "." are used to provide the assembler with infomation. The word(s) behind it say what kind of info. In this case it just tells the assembler the program is small and doesn't need a lot of memory. I'll get back on this later.
.stack : Another line with info. This one tells the assembler that the "stack" segment starts here. The stack is used to store temporary data. It isn't used in the program, but it must be there, because we make an .EXE file and these files MUST have a stack.
.data : indicates that the data segment starts here and that the stack segment ends there.
.code : indicates that the code segment starts there and the data segment ends there.
main proc : Code must be in procedures, just like in C or any other language. This indicates a procedure called main starts here. main endp states that the procedure is finished. Procedures MUST have a start and end. end main : tells the assembler that the program is finished. It also tells the assembler were to start the program. At the procedure called main in this case.
message db "xxxx" : DB means Define Byte and so it does. In the data-segment it defines a couple of bytes. These bytes contain the information between the brackets. "Message" is a name to indentify this byte-string. It's called an "indentifier".
mov ax, seg message : AX is a register. You use registers all the time, so that's why you had to know about them before I could explain this. MOV is an instruction that moves data. It can have a few "operands" (don't worry, I'll explain these names later) Here the operands are AX and seg message. Seg message can be seen as a number. It's the number of the segment "message" is in (The data-segment) We have to know this number, so we can load the DS register with it. Else we can't get to the bit-string in memory. We need to know WHERE the bit-string is located in memory. The number is loaded in the AX register. MOV always moves data to the operand left of the comma and from the operand right of the comma.
mov ds,ax : The MOV instruction again. Here it moves the number in the AX register (the number of the data segment) into the DS register. We have to load this DS register this way (with two instructions) Just typing: "mov ds,segment message" isn't possible.
mov ah, 09 : MOV again. This time it load the AH register with the constant value nine.
lea dx, message : LEA Load Efective Address. This intructions stores the offset within the datasegment of the bit-string message into the DX register. This offset is the second thing we need to know, when we want to know where "message" is in the memory. So now we have DS:DX. See the segment explanation above.
int 21h : This instruction causes an Interrupt. The processor calls a routine somewhere in memory. 21h tells the processor what kind of routine, in this case a DOS routine. INT's are very important and I'll explain more of them later, since they're also very, very complex. However, for now assume that it just calls a procedure from DOS. The procedure looks at the AH register to find out out what it has to do. In this example the value 9 in the AH register indicates that the procedure should write a bit-string to the screen.
mov ax, 4c00h : Load the Ax register with the constant value 4c00h
int 21h : The same INT again. But this time the AH register contains the value 4ch (AX=4c00h) and to the DOS procedure that means "exit program". The value of AL is used as an "exit-code" 00h means "No error"
That's it!!! You now fully understand this program (I hope)

[Back] [Index]

Go to DOS and type "debug first.exe". The debug screen will appear. When you are in the debugger, type "d". You see some addresses and our program.
Now type "u" you'll see a list that looks like this:
0F77:0000  B8790F          MOV AX,0F79
0F77:0003  8ED8            MOV DS,AX
0F77:0005  B409            MOV AH,09
First 0F77:0000 is the segment number and offset. B8790F is the machine code of the mov ax,0f79 instruction. B8 means "mov ax," and 790F is the number. (reversed order) Note that the instruction was: mov ax,seg message and the assembler made it mov ax,0f79 (number might be different at your computer) So that means our data is stored in the segment with the number 0F79. The other instruction lea dx,message turned into mov dx,0. So that means that the offset of the bit-string is 0 --> 0F79:0000. Let's look at that address. Type "d 0f79:0000" and YES our data is there! Look at the right of the screen and you can see the message.
Now let's calculate another address for the data. 0F79:0000 substract 2 from the segment number. That would give you 0F77 (the code segment). 0002:0000 --> 2*16+0=32. Two segments further means 32 bytes further, and that means an offset of 32.
Diagram So at this location the data is: 0F77:0020. Check by typing "d 0f77:0020". Please note that it's the SAME data. We can see it at multiple addresses only because the segments overlap! But in the program we said the data had to be in a data-segment. Remember, the .data instruction? Well, it IS in a data-segment, the data is just stored directly behind the code, but that doesn't matter. I mean, we can address the data with a segment number and an offset of zero.
Also note, that after the int 21h instruction to end the program the data doesn't immediately start, first there some undefined bytes. (probably zero) That's because segments start at paragraph boundaries. The data-segment couldn't start at 0F77:0010 anymore, because there is code there, if there wasn't any code there, the data-segment would have been: 0F78. So the data-segment has to be 0F79 (closest match) and so, some bytes after the code and before the data just take up space. But that doesn't matter. Please remember that the assembler doesn't care how the segment are in the .ASM file. In this example we first declared the data-segment, but the assembler puts it last in memory.

[Back] [Index]

The Stack

The stack is a place where data is temporarily stored. The SS and SP registers point to that place like this: SS:SP So the SS register is the segment and the SP register contains the offset. There are a few instructions that make use of the stack. POP and PUSH are the most basic ones. PUSH can "push" a value on the stack and POP can retrieve that value from the stack. It works like this:

 MOV   AX,1234H
 PUSH  AX
 MOV   AH,09
 INT   21H
 POP   AX
The final value of AX will be 1234h. First we load 1234h into AX, then we push that value to the stack. We now store 9 in AH, so AX will be 0934h and execute an INT. Then we pop the AX register. We retreive the pushed value from the stack. So AX contains 1234h again. Another example:

 MOV   AX, 1234H
 MOV   BX, 5678H
 PUSH  AX
 POP   BX
The final values will be: AX=1234h BX=1234h. We pushed the AX to the stack and we popped that value in BX.
As in the first program, you have to define a stack segment. It is easy done by the instruction .stack that will create a stack of 1024 bytes. Yes, there's more about the stack than just this. The stack usses a LIFO system (Last In First Out) Another example:
MOV   AX,1234H
 MOV   BX,5678H
 PUSH  AX
 PUSH  BX
 POP   AX
 POP   BX
The values: AX=5678h BX=1234h First the value 1234h was pushed after that the value 5678h was pushed to the stack. Acording to LIFO 5678h comes of first, so AX will pop that value and BX will pop the next.
How does the stack look in memory? Well, it "grows" downwards in memory. When you push a word (2 bytes) for example, the word will be stored at SS:SP and SP will be decreased to times. So in the beginning SP points to the top of the stack and (if you don't pay attention) it can grow so big downwards in memory that it overwrites the source code. Major system crash is the result.
[Back] [Index]

Names

There are some names you need to know. Well, you don't HAVE to know them, but it's handy if you do. I'll use these names from now on, so better learn them.
Indentifiers An identifier is a name you aply to items in your program. the two types of indetifiers are "name", wich refers to the address of a data item, and "label", wich refers to the address of an instruction. The same rules aply to names and labels.
Statements A program is made of a set of statements, there are two types of statements, "instructions" such as MOV and LEA, and "directives" wich tell the assembler to perform a specific action, like ".model small"
Here's the general format of a statement:
indentifier - operation - operand(s) - comment
The identifier is the name as explained above.
The operation is an instruction like MOV.
The operands provide information for the Operation to act on. Like MOV (operation) AX,BX (operands).
The comment is a line of text you can add as a comment, everything the assembler sees after a ";" is ignored.
So a complete instruction looks like this:
MOVINSTRUCTION:      MOV   AX,BX           ;this is a MOV instruction

The label and the comment are optional. In fact I allready explained directives , but, okay, I'll do it again. Directives provide the assembler with information on how to assemble a .ASM file. .MODEL SMALL, or .CODE are, for example, directives.

[Back] [Index]

And so we have come to the end of Section 1 of this tutorial. If you fully understand this stuff (registers, flags, segments, stack, names, etc.) you may, from now on, call yourself a "Level 0 Assembly Coder". Congratulations!
In Part 2 I'll explain some more instructions and I'll explain how to address data yourself.
(MOV BYTE PTR ES:[DI],AL)
I'll also explain the Interrupts and interrupt table.

[Back] [Index] [Next Section]

Copyright 1996, Ferdi Smit. All rights reserved.
Design & Concept by UZillusion
Text by MAD
Send any comments and sugestions to UZTeam

Friday, January 15, 2010

Same book - Donis Marshall - Linq usage

using System;

namespace Example
    {

    class Person
        {
        public Person(string _name, int _age)
            {
            name = _name;
            age = _age;
            }
        public string name = "";
        public int age = 0;
        }
    class Startup
        {
        static void Main()
            {
            Person[] people = {new Person("John", 35),
                                new Person("Jill", 24),
                                new Person("Sarah", 29),
                                new Person("Mary", 28)};
            foreach (Person p in people)
                {
                if (p.age >= 30)
                    {
                    Console.WriteLine(p.name);
                    Console.WriteLine("Press any key to continue. . .");
                    Console.ReadKey();
                    }
                }
            }
        }
    }

Little Exercises from a Book - Programming Microsoft Visual C# 2008: The Language

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HelloNamespace
    {  

    class Greetings
        {
        public static void DisplayEnglish()
            {
            Console.WriteLine("Hello, world!");
            }
        public static void DisplayItalian()
            {
            Console.WriteLine("Ciao, mondo!");
            }
        public static void DisplaySpanish()
            {
            Console.WriteLine("Hola, imundo!");
            }
        }
  

delegate void delGreeting();

class HelloWorld
        {
        static void Main(string[] args) {
            try {
                int iChoice = int.Parse(args[0]);
                delGreeting [] arrayofGreetings={
                    new delGreeting(Greetings.DisplayEnglish),
                    new delGreeting(Greetings.DisplayItalian),
                    new delGreeting(Greetings.DisplaySpanish)};
                  
                arrayofGreetings[iChoice - 1]();
            }
            catch(Exception ex) {
                Console.WriteLine(ex.Message);
                Console.WriteLine("Press any key to continue. . .");
                Console.ReadKey();
            }
        }
    }
}

JG Services - http://inflectionpivot.blogspot.com

JG Services Blog

Wednesday, January 13, 2010

Facebook - Algorithms

I suspect that when one blocks one of their friends on Facebook, Facebook systematically reorders the friends who appear in one's profile in one's 'Friends' pane.  I'm sure there is a purpose for it that has nothing to do with showing people who has been looking at their profile, but that appears to be a byproduct of their algorithm.

I suspect that immediately after blocking someone who is a 'friend' on Facebook, the friends who appear in the 'Friends' pane are people who've been looking at one's profile.

Monday, January 4, 2010

Object-Oriented Programming of End-User Applications to Enter and Query Databases - SQL Server

Relational data appears as a collection of two-dimensional tables ( relations or flat files), where common columns relate tables to each other. To use LINQ to SQL effectively, you must have some familiarity with the underlying principles of relational databases.

In LINQ to SQL, the data model of a relational database is mapped to an object model expressed in the programming language of the developer

Saturday, January 2, 2010

This is a Windows Forms Application Written in C# to Access an SQL Server Database







I Try to Be a Good Son - This is a Windows Forms Application Written in C# to Access an SQL Server Database That I Produced to Help Out My Parents' Business - All Ear Doctors Hearing Aids - Orange County, California


Sunday, December 20, 2009

Portfolio Modeler, Stress Tester & Calculator in Action







This is an old spreadsheet of mine.  All of the numbers are just typed in for illustrative purposes.  All of the values had been 1-year old prior to me just typing numbers to calculate some results for a screenshot to post here.  I was getting erros prior to that because the values had changed so much over the last year.

Below is a screen shot of Excel's Integrated Development Environment for Visual Basic for Applications programming.  These are the modules for you to see.

The source code is "Top Secret."
















Saturday, November 21, 2009

3D Animations - Mathematica


Mathematica Animation

Issues - The Yield-Curve Standstill

Morning CCCCCCCCCC,

No worries about not building a web site from scratch. I’ve done that numerous times for my folks and myself. My shortcoming is programming larger projects in Visual Studio and a lack of experience with SQL. I’ve seen some new freeware that appears to allow people to get C++ into widgets for use on a web server: Wt C++ Web Toolkit.

I was kind of asked by two guys from Hedgehogs (http://www.hedgehogs.net) to build a yield curve widget. I have a C++ open source mathematical software library QuantLib to calculate the yields on debt instruments, and I wanted to move that data into a chart like this http://www.quantumsupport.biz/tester.php here.

I compiled the files from Wt C++ Toolkit and have a ton of object files and a compact SQL database. It is at this point that I ceased to make progress. I couldn’t figure out how to proceed to actually run the example widgets using the object files, etc. From there I was going to proceed to try to incorporate the math library for bond mathematics.

I was asked by these two guys who own Hedgehogs.net to produce this thing. I was offered no money. I agreed to do it because it serves as a form of self-promotion and the target audience is a group that makes money. So, I figured it’s a good way to generate interest and potential business.

I would consider paying you out of pocket to help me proceed with this, since I’m not getting paid. My objective is of course to get revenue from working for firms/funds on an as needed basis. The idea is to split any money made.

Anyways, I wanted to finish this yield-curve widget before I proceed to make serious efforts to solicit business. So, that’s where I stand and what I’ve got planned.

Please let me know what you think. Also, could you please send me your resume?

Thank you,

Ethan Castanon

Monday, November 16, 2009

Saturday, October 24, 2009

Multiplication Game


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public int rgt = 0;
public int wng = 0;
public Int32 prod;
public int uprob;
Random random = new Random();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
uprob = Convert.ToInt32(textBox1.Text);
int num1 = random.Next(1, 100);
int num2 = random.Next(1, 100);
Int32 prod = num1 * num2;
textBox2.Text = Convert.ToString(num1);
textBox3.Text = Convert.ToString(num2);
}
private void button6_Click(object sender, EventArgs e)
{
if (((Convert.ToInt32(textBox2.Text)*(Convert.ToInt32(textBox3.Text)) == Convert.ToInt32(textBox4.Text))))
{
textBox6.Text = "Congratulations! You're correct.";
textBox5.Text = Convert.ToString(prod);
rgt = rgt + 1;
}
else
{
textBox6.Text = "Uh, oh! You need more practice.";
textBox5.Text = Convert.ToString(prod);
wng = wng + 1;
}
Int32 uansr = Convert.ToInt32(textBox4.Text);
Int32 m1 = Convert.ToInt32(textBox2.Text);
Int32 m2 = Convert.ToInt32(textBox3.Text);
Int32 mm = m1 * m2;
int num1 = random.Next(1, 100);
int num2 = random.Next(1, 100);
textBox2.Text = Convert.ToString(num1);
textBox3.Text = Convert.ToString(num2);
Thread.Sleep(1000);
textBox6.Text = "";
textBox5.Text = "";
textBox4.Text = "";
uprob = uprob -1;
textBox1.Text = Convert.ToString(uprob);
}

}
}

Wednesday, October 21, 2009

C# Instead - Multiplication Game

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;



namespace multip
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
decimal numps = numericUpDown1.Value;
for(int i=1; i<=numps; i++)
{
string doa, dab, xx, yy;
Random randNum1 = new Random();
int num1 = randNum1.Next(0, 101); // No larger than 108, no smaller than 1
Random randNum2 = new Random();
int num2 = randNum2.Next(0, 101);
int prod = num1 * num2;
string yak = textBox4.Text;
int usrans = Convert.ToInt32(yak);
if( prod == usrans)
{
doa = "Contratulations! The answer is";
xx = doa + prod;
textBox2.Text = xx;
}
else
{ dab = "Contratulations! The answer is";
yy = dab + prod;
textBox3.Text = yy;
}
}
}
}
}

Tuesday, October 20, 2009

Multiplication Game - C++ Console Application

// multiplication_game.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include ''
#include ''
#include ''
#include '
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
int mult1, mult2, uprod, prod, ntim;
cout<< "How many problems do you want to solve? "; cin>>ntim;
for(int i=1; i<=ntim; i++) { srand(time(0)); mult1 = rand() % 100 + 1; mult2 = rand() % 100 + 1; cout<< "What is the product of "; cout<<>> uprod;
prod = mult1 * mult2;
if(prod == uprod)
cout<< "Excellent!";
else
cout<< "Wrong!";
cout<< " The product is ";
cout<< prod << endl;
}
system("PAUSE");

}

Monday, October 19, 2009

C++ Progress

// multiplication_game.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include
#include
#include
#include
#include
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
int mult1, mult2, uprod, prod;
srand(time(0));
mult1 = rand() % 100 + 1;
mult2 = rand() % 100 + 1;
cout<< "What is the product of "; cout<<>> uprod;
prod = mult1 * mult2;
if(prod == uprod)
cout<< "Excellent!";
else
cout<< "Wrong!";
cout<< " The product is ";
cout<< prod << endl;
system("PAUSE");

}

Beginning of a Math Game in C++: Multiplication of Two Integers in the Range of 1 to 100

// multiplication_game.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include
#include
#include
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
int mult1, mult2, uprod, prod;
mult1 = rand() % 100 + 1;
mult2 = rand() % 100 + 1;
cout<< "What is the product of ";
cout<< mult1;
cout<< " and ";
cout<< mult2;
cout<< " ?";
cin >> uprod;
prod = mult1 * mult2;
if(prod == uprod)
cout<< "excellent!";
else
cout<< "Wrong!";
cout<< " The product is ";
cout<< prod;
system("PAUSE");

}

Wednesday, October 14, 2009

Here is the working code: c++

// mit_assign_3.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include
#include "math.h"
using namespace std;

int diff(int num1, int num2)
{
int diffnums;
diffnums = num1 - num2;
return diffnums;
}
int quot(int num1, int num2)
{
int quotnums;
quotnums = num1 / num2;
return quotnums;
}
int rmain(int num1, int num2)
{
int rmains;
rmains = num1 % num2;
return rmains;
}
int _tmain(int argc, _TCHAR* argv[])
{
int num1, num2;
int oswitch;
float dg;
int stng;
int rm;
cout << "Please input an integer: ";
cin >> num1;
cout << "Plese input a second integer: ";
cin >> num2;
cout << "1. Difference of two numbers" << endl
<< "2. Quotient of two numbers" << endl
<< "3. Remainder of two numbers" << endl
<< "Enter your choice:";
cin >> oswitch;
switch(oswitch)
{
case 1:
cout << "Difference is " << diff(num1, num2) << endl;
break;
case 2 :
cout << "Quotient is " << quot(num1, num2) << endl;
break;
case 3 :
cout << "Remainder is " << rmain(num1, num2) << endl;
break;
}
system("PAUSE");
}

C++ - Find the error

// mit_assign_3.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include
#include "math.h"
using namespace std;

int diff(int num1, int num2)
{
int diffnums;
diffnums = num1 - num2;
return diffnums;
}
int quot(int num1, int num2)
{
int quotnums;
quotnums = num1 / num2;
return quotnums;
}
int rmain(int num1, int num2)
{
int rmains;
rmains = num1 % num2;
return rmains;
}
int _tmain(int argc, _TCHAR* argv[])
{
int num1, num2, oswitch;
char *stng;
cout << "Please input an integer: ";
cin >> num1;
cout << "Plese input a second integer: ";
cin >> num2;
cout << "Please choose 1 of these 3 options:\n 1. Difference of your 2 numbers\n 2. Quotient of your 2 numbers\n 3. Remainder of two numbers."
cin >> oswitch;
switch (oswitch)
{
case 1: // do these if expr == c1
*stng = diff(int num1, int num2);
case 2:
*stng = quot(int num1, int num2);
case 3:
*stng = rmain(int num1, int num2);
}
cout << *stng;
system("PAUSE");
}

Monday, October 12, 2009

Visual Studio 10 programming integrated development environment (IDE) running on Windows 7 prerelease

Little Loop - C++

// count.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "math.h"
#include
using namespace std;


int _tmain()
{
int sum = 0, i = 0;
do
{
sum += i++;
} while ( i < 5 );
cout << sum;
cout <<"\n";
system ("PAUSE");
}

Sunday, October 11, 2009

Digital Video Editing



Quantum Support conducting experiments, for the betterment of humanity & the advancement of mankind, on the interaction between the feline species and the frequency range of the electromagnetic spectrum where visible light resides: 630 - 670 nanometers in wavelength, in this case. Produced, directed and edited by yours truly Ethan Castanon.


----------------------------------------------------------------------------------
This template is basic. Please see a much more sophisticated one below. It uses custom functions and other goodies.
----------------------------------------------------------------------------------






Option Explicit

Private Sub cmdCancel_Click()
Unload Me
ActiveDocument.Close SaveChanges:=False
End Sub
Private Sub UserForm_Initialize()
With cmb_ref_doc_designation
.AddItem ", M.D."
.AddItem ", D.O."
.AddItem ", Ph.D."
.AddItem ", AuD"
.AddItem ""
End With
With cbo_sex
.AddItem "male"
.AddItem "female"
.AddItem "unspecified"
End With
End Sub

Private Sub btn_date_click_Click()

End Sub

Private Sub btn_no_x_see_attached_Click()
ActiveDocument.Shapes("Group 58").Select
Selection.ShapeRange.Line.Visible = msoFalse
Application.ScreenUpdating = True
End Sub

Private Sub btn_x_expct_more_2_follow_Click()
ActiveDocument.Shapes("Group 61").Select
Selection.ShapeRange.Line.Visible = msoTrue
Application.ScreenUpdating = True
End Sub

Private Sub btn_x_expct_nothing_2_followw_Click()
ActiveDocument.Shapes("Group 61").Select
Selection.ShapeRange.Line.Visible = msoFalse
Application.ScreenUpdating = True
End Sub

Private Sub btn_x_see_attached_Click()
ActiveDocument.Shapes("Group 58").Select
Selection.ShapeRange.Line.Visible = msoTrue
Application.ScreenUpdating = True
End Sub

Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Frame1.Visible = True
Else: Frame1.Visible = False
End If
End Sub

Private Sub CommandButton4_Click()
Frame1.Visible = True
End Sub

Private Sub Enter_Click()
Dim current As Variant
If CheckBox1.Value = True Then
current = txtbox_dt_of_letter_mm.Value & "/" & txtbox_dt_of_letter_dd.Value & "/" & txtbox_dt_of_letter_yyyy.Value
Else
current = DateTime.Now()
End If
With ActiveDocument
.Bookmarks("recipient_doc").Range.Text = txtbox_ref_doc_fname.Value & " " & txtbox_ref_doc_mname.Value & " " & txtbox_ref_doc_lname.Value & cmb_ref_doc_designation.Value
.Bookmarks("date").Range.Text = current
.Bookmarks("patient").Range.Text = txtbox_pt_firstname.Value & " " & txtbox_pt_lastname.Value
.Bookmarks("dob").Range.Text = txtbox_pt_dob_mm.Value & "/" & txtbox_pt_dob_dd.Value & "/" & txtbox_pt_dob_yyyy.Value
.Bookmarks("date_of_service").Range.Text = txtbox_date_service_mm.Value & "/" & txtbox_date_service_dd.Value & "/" & txtbox_date_service_yyyy.Value
.Bookmarks("chief_complaint").Range.Text = txt_chief_complaint.Value
.Bookmarks("physical_findings").Range.Text = txt_physical_findings.Value
.Bookmarks("diagnosis").Range.Text = txt_diagnosis.Value
.Bookmarks("treatment_plan").Range.Text = txt_treatment_plan.Value
.Bookmarks("see_attached_details").Range.Text = txtbox_see_attached_comments.Value
.Bookmarks("expect_detailed_letter_comments").Range.Text = txtbox_detailed_letter_comments.Value
End With
Application.ScreenUpdating = True
Unload Me
End Sub

Private Sub Label3_Click()

End Sub

Private Sub UserForm_Click()

End Sub

Here's some C++ for you - Basic

// stops console application from exiting upon completion without prompting user

// stt.cpp : Defines the entry point for the console application

#include "stdafx.h"
#include
using namespace std;
int main()
{
int a, b;
float c;
cout << "Enter an integer: ";
cin >> a;
cout <<"\n";
cout << "Enter another integer: ";
cin >> b;
cout <<"\n";
cout << "Enter a number with decimal: ";
cin >> c;
cout <<"\n";
cout << "You entered " << a << ", " << b << ", and " << c << endl;
cout <<"\n";
system ("PAUSE");
}

Saturday, October 3, 2009

Visual Basic for Applications - UserForms for Microsoft Word templates



__________________________________________________________________________

The code below is Visual Basic for Applications designed by The Microsoft Corporation to program in the Microsoft Office suite. It is the code that produces the UserForm (the dialog box that users enter data into, which is then transferred into the template).

There are custom mathematical functions to calculate age from dates, etc.
__________________________________________________________________________

Dim strName As Variant





Private Sub CommandButton1_Click()


End Sub

Private Sub lbl_airboneright_Click()

End Sub

End Sub

Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Frame1.Visible = True
Else: Frame1.Visible = False
End If


End Sub

Private Sub CheckBox2_Click()
If CheckBox2 = True Then
Frame2.Visible = True
Else: Frame2.Visible = False
End If


End Sub



Private Sub UserForm_Initialize()
With cboPatientGender
.AddItem "male"
.AddItem "female"
End With
With cbo_Degr
.AddItem ", M.D."
.AddItem ", D.O."
.AddItem ", Ph.D."
.AddItem ", AuD"
.AddItem ""
End With
With cboRtypehearloss
.AddItem "sensorineural"
.AddItem "conductive"
.AddItem "mixed"
End With
With cboLtypehearloss
.AddItem "sensorineural"
.AddItem "conductive"
.AddItem "mixed"
End With

End Sub

Public Sub btn_pt_hist_status_Click()
Dim strName As String
strName = InputBox(Prompt:="Please enter patient history/status.")

End Sub


Private Sub cmdClear_Click()
txtPatientName.Value = Null
txtDOSmm.Value = Null
txtDOSdd.Value = Null
txtDOSyyyy.Value = Null
txtReferringDoctor.Value = Null
txtDOByyyy.Value = Null
cboPatientGender.Value = Null
txtEVALmm.Value = Null
txtEVALdd.Value = Null
txtEVALyyyy.Value = Null
txt_r_db_lower.Value = Null
txt_r_db_upper.Value = Null
txt_l_db_lower.Value = Null
txt_l_db_upper.Value = Null
End Sub

Private Sub cmdCancel_Click()
Unload Me
ActiveDocument.Close SaveChanges:=False
End Sub

Private Sub cmdEnter_Click()
Dim current As Date
current = DateTime.Now()
Dim xr_2, xr_4, xr_6, xr_8, lx_2, lx_4, lx_6, lx_8 As Variant
xr_2 = r_2
xr_4 = r_4
xr_6 = r_6
xr_8 = r_8
lx_2 = l_2
lx_4 = l_4
lx_6 = l_6
lx_8 = l_8
If xr_2 = "" Then
xr_2 = 0
End If
If xr_4 = "" Then
xr_4 = 0
End If
If xr_6 = "" Then
xr_6 = 0
End If
If xr_8 = "" Then
xr_8 = 0
End If
If lx_2 = "" Then
lx_2 = 0
End If
If lx_4 = "" Then
lx_4 = 0
End If
If lx_6 = "" Then
lx_6 = 0
End If
If lx_8 = "" Then
lx_8 = 0
End If

With ActiveDocument
.Bookmarks("date").Range.Text = current
.Bookmarks("patient_name").Range.Text = txtPatientName.Value & " " & txtPatientLname.Value
.Bookmarks("dos").Range.Text = DateValue(txtDOS.Value)
.Bookmarks("ref_doc").Range.Text = txtReferringDoctor.Value + cbo_Degr
.Bookmarks("ref_doc1").Range.Text = txtReferringDoctor.Value + cbo_Degr
.Bookmarks("patient_name1").Range.Text = txtPatientName.Value
.Bookmarks("age").Range.Text = AgeCalc(txtDOBmm.Value, txtDOBdd.Value, txtDOByyyy.Value)
.Bookmarks("evaldate").Range.Text = DateValue(txtDOS.Value)
.Bookmarks("gender").Range.Text = cboPatientGender
.Bookmarks("ptstatus").Range.Text = txt_pthistory
.Bookmarks("r_lower_limit").Range.Text = txt_r_db_lower.Value
.Bookmarks("r_upper_limit").Range.Text = txt_r_db_upper.Value
.Bookmarks("r_air_bone").Range.Text = airbone(xr_2, xr_4, xr_6, xr_8)
.Bookmarks("l_lower_limit").Range.Text = txt_l_db_lower.Value
.Bookmarks("l_upper_limit").Range.Text = txt_l_db_upper.Value
.Bookmarks("l_air_bone").Range.Text = airbone(lx_2, lx_4, lx_6, lx_8)
.Bookmarks("impression_r").Range.Text = "Right " + lossinwords(txt_r_db_lower.Value) + " to"
.Bookmarks("impression_r_u").Range.Text = lossinwords(txt_l_db_upper.Value)
.Bookmarks("r_type_loss").Range.Text = cboRtypehearloss
.Bookmarks("impression_l").Range.Text = "Left " + lossinwords(txt_l_db_lower.Value) + " to"
.Bookmarks("impression_l_u").Range.Text = lossinwords(txt_l_db_upper.Value)
.Bookmarks("l_type_loss").Range.Text = cboLtypehearloss
.Bookmarks("return_ref_doc").Range.Text = txtReferringDoctor.Value + cbo_Degr
End With
Application.ScreenUpdating = True
Unload Me
End Sub

Function AgeCalc(pmonth As Integer, pday As Integer, pyear As Integer)
Dim Age As Integer
Dim LValue As String
LValue = Format(Date, "yyyy/mm/dd")
nyear = Left(LValue, 4)
nday = Right(LValue, 2)
nmonth = Mid(LValue, 6, 2)
If pmonth <= nmonth Then
AgeCalc = (nyear - pyear)
ElseIf (pmonth > nmonth) Then
AgeCalc = ((nyear - pyear) - 1)
End If
End Function

Function lossinwords(x As Integer)
If x >= 0 And x <= 20 Then
lossinwords = "normal"
ElseIf x <= 40 And x > 20 Then
lossinwords = "mild"
ElseIf x <= 55 And x > 40 Then
lossinwords = "moderate"
ElseIf x <= 70 And x > 55 Then
lossinwords = "moderately severe"
ElseIf x <= 90 And x > 70 Then
lossinwords = "severe"
ElseIf x > 90 Then
lossinwords = "profound"
End If
End Function

Function airbone(a, b, c, d)
If a = 0 And b = 0 And c = 0 And d = 0 Then
airbone = "There was no air-bone gap"
Else
airbone = "There was an air-bone gap of " & a & "dB" & " to " & b & "dB" & " at the frequency range of " & c & " to " & d
End If

End Function

Monday, August 17, 2009

Websites I Built Last Night - I Couldn't Sleep

Richard G. Castanon, M.D., FACS: This site was also redone recently using Adobe Flash, with Actionscript 3.0.

All Ear Doctors Hearing Aids: This site was built using Dreamweaver CS4 & Flash CS4. It makes use of HTML, Flash, ActionScript 3.0, and JavaScript. The menu bar is actually a flash movie that makes use of event handlers using ActionScript 3.0. Also, the "Photos" page is a Flash slideshow that is actually a Flash movie with event handlers to stop frames. It stops at each successive frame and advances only when the subject presses the forward arrow, which advances the movie one frame. ActionScript again controls this process.

Beach, Skin and Laser Cosmetics: This site was made using Microsoft Publisher. The "index" page I actually redid (8/25/2009, or something like that) using Dreamweaver and embedded a Flash Video with some ActionScript 3.0.



Quantum Support: This site is a bare-bones site made using Microsoft Publisher. It has a Yahoo! API that retrieves stock quotes using JavaScript.

Sunday, August 16, 2009

Visual Basic for Applications Macro to Delete Rows of Cells in Microsoft Excel Based on a Criterion

This code will loop through a selected area of a column and delete rows for you. The macro will loop through the selected part of any column searching for whatever you specify. When the macro finds a cell whose content meets your criterion, it will delete the cells corresponding row and then proceed onward: it will continue looping through the remaining cells of the selected column and if it finds another cell whose content matches your criterion - it will delete that cells corresponding row. It will do this until it has looped through every cell of your selection.



To use the code you have to open Microsoft Excel's Visual Basic programming interface. This is done via the "Developer's" tab in the "Ribbon" of Excel. The pic I've uploaded here shows Excel's Ribbon and the Developer's tab is selected. The Developer's tab is not present by default. If your Developer's tab isn't present, click on the "Office Button," this is the button with the Microsoft Office logo in the upper-most corner of all Office applications. Click that button, and then click on "Excel Options" in the lower-right corner of the dialog box that appears. You should be in the "Popular" pane of the Excel Options dialog box by default. I've included a picture of that dialog box in this post. You can clearly see what I'm referring to for reference. The third selectable option down is "Show Developer tab in the Ribbon." Select that, and click "OK."



Click your Developer tab. To the far right, on the Ribbon, you'll see "Visual Basic," click that. You'll then enter the Microsoft Visual Basic programming platform. Click "Insert" and choose "Module." Copy and paste the macro below into the "Module" that appeared as a result of your clicking Insert, then Module.

Close out of the Module by clicking the red in the upper-most right corner of its dialog box. Also exit the Visual Basic platform by clicking on its red x, upper-right corner.

Now you're ready to run your macro. Select the target region of the column containing the data you want to auto-remove, click on "Macros" (the button immediately to the right of the "Visual Basic" button), highlight the macro titled "Find_and_delete," then click "Run."



A dialog box will appear asking you for input. This is where you'll enter the information/data (for example, cat) you want to remove all instances of. Click "OK"

You're done.

Please remember to save your work prior to running any macros and do it under a different name. This is for safety. It's to make sure accidental data loss from running a macro doesn't become permanent data loss. You cannot just click "undo" and retrieve the data you'd have lost from running a macro: automated changes cannot be reversed in the way manual changes can.

-----------------------------------------------------------------------------


Sub Find_and_delete()
Dim rng As Range
Dim what As String
Dim strMsg As String
Dim lok4 As String
Dim count As Integer
count = 0
lok4 = Application.InputBox("What variable?")
Do
Set rng = ActiveSheet.UsedRange.Find(lok4)
If rng Is Nothing Then
Exit Do
Else: Rows(rng.Row).Delete
count = (count + 1)

End If
Loop
MsgBox "The number of deleted cells was " & count


End Sub

Monday, August 3, 2009

What is algorithmic or black-box trading?

What is algorithmic or black-box trading?

Algorithmic trading is the process of automating the buying and selling of securities. The process is completely dependent on computers and programming languages. The advent of the Internet allowed for private individuals and financial institutions to trade directly on exchanges in ways and in volumes never before seen. This in and of itself gave rise to algorithmic trading.

Currently, almost all brokerages offer investors and firms computer programs from which to transmit market orders to exchanges, and these programs are usually either web-based platforms or free-standing programs. Through these applications or programs brokerages’ customers can trade securities directly with other market participants. As stated, these platforms can be web-based applications or interfaces (like Gmail, which is a web-based email service, for example), or they can be free-standing programs that run on your computer and don’t rely on a web browser to transmit orders to exchanges (like Microsoft Office’s Outlook application). Most web-based programs use port 80 to transmit HTTP. Many programs communicate over the Internet and don’t do so using HTTP or port 80, or web-based means and methods. Either way, these programs send communications or instructions from the client computer to the host computer, the computer receiving orders for the exchange. Exchanges act as hubs. They receive orders to buy and orders to sell from all over the world and they have a clearing house that pairs orders and that keeps track of the transactions. Clearing houses also inform brokerages that are exchange members how much capital or cash they have to have on reserves, which the brokerages provide clearing houses using customer funds.

Algorithmic trading is the process having a program interface (or interact) with the brokerage’s trading platform. These programs are almost always proprietary programs. This means that the programs are owned and/or created by the entity using them. Firms almost always employ programmers full time to write and modify the code that makes up their trading program or programs and their proprietary algorithms. There is a common misconception that these programs can, once “finished,” trade unattended and without any upkeep or maintenance. That is not true. These programs must almost always be monitored so that they don’t malfunction and do something terrible, such as rapid-fire selling when they should be buying. This could obviously result in catastrophic financial losses, lawsuits and other unforeseen events. Algo traders must monitor the trading and have to frequently interact with the platform to stop trading, close positions, and change parameters and variables.

The programs that algorithmic traders create are usually coded in a fast, object-oriented programming language, such as the C languages. Programming has changed a lot over the last 20 years. Programs are no longer one long sheet of code. Modern programs/applications consist of many different scripts or pages of code and much of it is only accessed and loaded into memory when needed. Also, programming is now done mainly through programming platforms from which one builds up a dialog box that the user interacts with by inputting data. The program performs tasks on that data, and usually produces some output. A classic example of such a program in action is a calculator. You provide input, and the calculator performs tasks on the input and returns some output once you press the ‘equals’ button.

Trading programs perform the same way, with one distinct difference: they take data provided by a real-time market data feeds and then they carry out instructions programmers specify the program should take based on certain conditions, parameters and variables. These rules are known as algorithms. Here is a simple example of a trading algorithm: an automated trading program should transmit a buy order to a brokerage’s trading platform if the market price of a security increases by 0.1% within a 30 second time span, the trading volume exceeds some specified number (maybe a number defined by a rolling average of the trading volume over the last week), and the time of day is between 9:00 a.m. and 3:00 p.m., in the exchange’s time zone.

Such rule-based actions are implemented well by a computer and they must be communicated to the computer in the form of a programming language. At its core, programming consists of nothing more than conditional logic: looping and branching form the basis of all programming. Looping is the act of doing something until a certain event takes place, and branching is the act of making one of two choices.

Trading programs monitor data feeds and they constantly “loop”: they comparing changing data with fixed data entered into the program in the form of parameters. For example, if the trading program has bought a security, and the trading rules specify that the program should sell the security if the profit captured exceeds 1%, the program will constantly calculate the profit captured until either the specified value has been reached (then the program will sell the security) or until some other rule specified that the program close the position.

Branching, is the process of making a decision based on two choices, a.k.a. bimodal. In formal logic this is manifest in the “if, then” construct. For example, if the time is between the hours of 9:00 a.m. and 3:00 p.m., then buying is permitted. Branching forms the basis of establishing constraints that must be satisfied prior to the program taking some form of action. For example, if the program is currently holding a number of securities that exposes the firm to excessive risk, the code may specify that the program not buy subsequent orders even though an algorithm in question would produce a buy order based on the market data feed and other conditions.

“Market makers” had traditionally been men and women standing at posts designated by the exchange as the location at which trading for specified stocks would take place. Market makers profit in a few ways, but one that is of interest here is how they capture the difference between securities’ bid and ask prices when trades take place. For example, if the bid/ask for a certain stock is 99/100, the market maker can buy the stock at 99 dollars and wait patiently until someone desperate wants to buy the stock – and they will cross the bid/ask spread in order to do so and buy the stock at the best available price, which is 100 dollars, in this example. Desperation trades take place when a buyer or seller will pay the best price offered by the counterparty. There is a distinction between active and passive buying. In active buying, one pays whatever happens to be the best offer on the opposing side, which is slightly more than the price he’d like to pay. The market maker would sell the stock to the first person that lifted his or her order. The market maker would have made 1 dollar for each unit of the security in question: s/he bought at 99 dollars, and sold at 100 dollars.

Automated market making is the process of using code and computers to make markets, rather than humans. Computers can accurately keep track of and process almost infinitely more data than humans can and they can do it at unimaginable speeds. The advent of the Internet and the attendant investor freedom to trade a broad range of securities anywhere in the world sowed the seed for the automation of trading. With automated trading a “market maker” can make markets in not only one security but dozens or hundreds of securities or more, if they have the resources and the ingenuity to create processes that make it work.

Algorithmic trading is made up of much more than just automated market making. There are oceans of relationships amongst securities and reams of data that traders analyze in an effort to deduce predictable sequences of events, inefficiencies or arbitrages that they can profitably trade upon - and with increasing frequency their trading is automated through the use of code, computers and algorithms.

Sunday, August 2, 2009

Quantum Support - Business Proposal




[Recipient Name]
[Company Name]
[Street Address]
[City, ST ZIP]

Dear [Recipient Name]:

Developing your practice can be greatly facilitated through the implementation of technology. You can be only in one place, at one time. Modern technology allows for the automation of many things and business development is one of them. People are looking for the legal services you provide and with increasing frequency they search the Internet in that pursuit. Placing a well-developed web site on the Internet allows for people to find you and to learn more about you while you are busy doing something else: web sites can and should be designed in a careful and persuasive manner to capitalize on a technology known as the Internet to obtain clients who are proactive in their pursuit of services you provide. The best part is that all of this takes place at the same time that you are practicing law. This is real multitasking: this is automation in its most literal sense.

Having a web site allows prospective clients to inform themselves of your practice, areas of expertise, background, education, achievements and more while you are litigating, filing motions & briefs, taking depositions, meeting with clients, networking, vacationing, and spending quality time with family and friends.

My father is a surgeon and I’ve built him several web sites. Many patients have told us that while looking through their insurers’ booklets, they decided to see my father for treatment rather than see other available and approved providers because they found pertinent information, documentation and images on his web sites. They said that this gave them a sense of familiarity that moved them to make an appointment with him, rather than someone else. They have also had an increase in patients through general web searches using terms totally unassociated with my father’s name or the name of his practices. Prior to their search, they had no awareness of his existence. That is automated business development. Please see http://www.drcastanon.com & http://www.castanon.me.

I singlehandedly have all of the skills that are required to build, maintain and administer web sites and their associated domains and can therefore vastly undercut prices other firms charge. Further, I have experience with search engine optimization and build sites following the principles of best practice, as advanced by Google. If sites are not built in a way that is search engine friendly, the site will never fare well in search engine rankings, to the detriment of the web site’s owner. I have a hard science degree and programming experience. Large design firms have a very limited ability to program, manipulate code, and a limited familiarity with the networking backbone of the Internet to make their sites search engine friendly, and they make a practice of not telling clients or prospective clients about their limitations. These firms know only design, not functionality.

I can build web sites for $XXX or less that both look good and accomplish their intended objective of being an effective point of contact for you while you are busy doing what’s important.


Sincerely,


Ethan Castanon