Friday, June 15, 2012

Reduce Labor Cost

A Cost Effective Way to Reduced Labor Cost

An employer can have many different pay rates. The only exceptions appear to be that the rate can not be below the minimum rate or be lower for work already performed.


You are allowed to offer an employee a  reduced hourly rate to work from home. I would suggest that the rate be set after discussing with the employee.


The employee will receive less salary but will have save the cost of transportation,  lunch and wardrobe. They will also spend less time away from home.


The employer reduces his payroll cost without investing a dime! It is truely a win win situation for employer and employee.

We plagiarize for small offices!

We plagiarize for small offices!

As an example, I was in my doctor's waiting room and became aware that the lady at the reception desk was spending a great deal of time calling people to remind them of their next appointment. She was still at her task when I left the office an hour later!

My mother raised a really lazy boy so of course I thought there had to be a easier and better way to do this. Before wasting my time, I looked for existing programs. I found several programs that did the appointment reminder task, but they were part of a large suite application which was overkill and cost too much for my small clients.

We wrote a modest program we named "Reminder". We keep the cost down by using cell phone text messaging and email for notification. The user does not have to buy any additional equipment or incur any cost sending text messages or emails. You also do not have to use your email program. The emails and text messages go through our Goggle accounts.

Voice calling has not been included to keep the cost and equipment requirements down. Microsoft Windows® includes code that developers can use to send and receive telephone messages. The major problem is that the code can not tell if the person picked up the telephone without an expensive piece of equipment. Telephones send a signal when they answer a call. As a human, you know a person has answered when they start to speak. Machines wait to received a piece of code which will not arrive if the call is answered by a human. There are companies that make a device that can sense if a call is answered by a person or an answering machine. They also include the ability to covert digital text into sound. Our local library system uses this type equipment to notify us when a reserved book has arrived with a rather funny voice.

If you would like to research this type of  equipment, visit way2call.com.

Saturday, October 8, 2011

Use Javascript to make two columns the same height

 

Our web site needed the left and right columns to be the same height because of the background color. We use this simple script which is loaded from an external file.

<!--
var x = document.getElementById("column_l").clientHeight;
var y = document.getElementById("column_r").clientHeight;
if (x > y)
{
document.getElementById("column_r").style.height = x + 'px';
}
if(x < y)
{
document.getElementById("column_l").style.height = y + 'px';
}
-->

Working with Rich Text Format (RTF)

 

Rich text format allows text to have attributes such as bold, underline, colors, bold etc. It is the formatting code used for Word for Windows and many other text editing programs.If you open a file with an extension of rtf, the file will open Word for Windows or WordPad. You will not see the codes being used to render the text.Database programs, like Notepad, will strip the rtf codes and leave only the text. This gives you a way to copy a web page and paste the text only. Notepad will ignore everything but the text.

Get a trial version of this program.

Storing Rich Text Format in a database

I save the RTF contents to an rtf file and then read it back into a text field.

Contents of RTF textbox

Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
Try
' The SaveFile save the rtf text in a coded file which is read by databases as ASCII text so it can be stored.
' Use the C:\Windows\Temp\ folder because it exist on all windows computers and allows all users to write to it.
RichTextBox1.SaveFile("C:\Windows\Temp\MyRTF.rtf")
Me.TextBox1.Text = My.Computer.FileSystem.ReadAllText("C:\Windows\Temp\MyRTF.rtf")
0' Reload the form after save
Me.DateModifiedTextBox.Text = Now
Me.Validate()
Me.TblMainBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.FreeFormDBDataSet)
Me.TblMainTableAdapter.Fill(Me.FreeFormDBDataSet.tblMain)
Me.RichTextBox1.Rtf = Me.TextBox1.Text
Catch ex As OleDb.OleDbException
MsgBox(ex.Message)
End Try
End Sub
Partial Contents of MyRTF.rtf file
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq1\fcharset0 Courier New;}
{\f1\fnil\fcharset0 Arial;}}{\colortbl ;\red0\green0\blue255;\red0\green128\blue0;\red163\green21\blue21;}
\viewkind4\uc1\pard\cf1\lang1024\f0\fs20 Private\cf0 \cf1 Sub\cf0 SaveButton_Click(\cf1 ByVal\cf0

Windows Form DateTimePicker

This windows control is simple to implement and hard to use in your application until you learn a little about how it works.

Even though you set the format of the date display to Short Date, the date is saved as date plus time. Time is stored in hours, minutes and seconds plus ticks and some other time span data that are not commonly used.

First problem I ran into was trying to set a new DateTime. I finally broke the DateTime down to month, date and year before doing some calculations on it. I then put it back together as new DateTime(m_year, m_month, m_day, 0, 0, 0)where the zeroes(0) are hours, minutes, seconds.

This is my search code:

private void button1_Click(object sender, EventArgs e)

{

var m_sound = System.Media.SystemSounds.Beep;

m_sound.Play();

string m_date = this.LookFor_dateTimePicker.Value.ToShortDateString();

m_date = m_date + " 12:00:00 AM";

DateTime m_find = Convert.ToDateTime(m_date);

appointmentsTableAdapter.FillByDate(this.reminderDataSet.Appointments, m_find);

}

This is code to set the time to 12:00:00 AM

private void aptDate_DTPicker_ValueChanged(object sender, EventArgs e)
        {
            DateTime m_date = this.aptDate_DTPicker.Value;
            DateTime m_keep = this.aptDate_DTPicker.Value;
 
            int m_month = m_date.Month;
            int m_day = m_date.Day;
            int m_year = m_date.Year;
            // set the Datetime picker time to 12:00:00 AM
            DateTime m_keepNew = new DateTime(m_year, m_month, m_day, 0, 0, 0);
            this.aptDate_DTPicker.Value = m_keepNew;
 
            int m_dayOfWeek = (int)m_date.DayOfWeek;
 
            if (m_dayOfWeek == 1)
            {
               m_day = m_day - 3;
            }
            else
            {
                m_day = m_day - 1;
            }
            DateTime m_newdate = new DateTime(m_year, m_month, m_day,0,0,0);
 
            this.sendReminder_DTPicker.Value = m_newdate;
 
            buildMessage(this.sendToNAME_TextBox.Text, m_date.ToShortDateString(), 
		this.aptTime_DTPicker.Value.ToShortTimeString(), this.aptLength_ComboBox.Text);
        }

Use Javascript to Center a Web Page

 

SmallbSystems.com web site was originally written using the margin-left and margin-right setting of auto to center it's pages. It worked as expected under Explorer 7 and Firefox 2. We could not get it to work correctly in Explorer 8 and Firefox 3 so we went back to basics.

In the old days before word processors, we took the width of a page and subtracted the width of the text and then divided by two and set the left margin to that number. Example: Left Margin = (Window Width - Fixed Design Width) / 2

Your web document needs a Block <div>Tag within the <body> tag. We gave ours an Id of Container. The two columns are floated left and right. The ChangeLeftMargin functions is called by <body onload="ChangeLeftMargin()">

Here is part of the code:

<script type="text/javascript">
< !--
function ChangeLeftMargin()
{
UserWidth = window.screen.width;
setWidth = (UserWidth - 700)/2;
StringSetWidth = setWidth + "px";
document.getElementById("container").style.marginLeft = StringSetWidth;
}
-->
< /script>
< !-- #EndEditable -->
< /head>

<body onload="ChangeLeftMargin()">

<!-- Begin Container -->
< div id="container">

News Flash....Cell Phones can read!

 

The following are excerps from Kaywa FAQ
QR Codes (= Quick Response Codes) are 2D Barcodes (two dimensional Barcodes) developed by Denso and released in 1994 with the primary aim of being easily interpreted by scanner equipment in manufacturing, logistics and sales applications.

 
Japan, the first country with a highly developed 3G network and high usage of the mobile internet, was also the country where telecoms like NTTDoCoMo and KDDI achieved a breakthrough by bringing QR code readers to mobile phones. By installing QR code readers on consumer phones, if was suddenly possible for everyone to create and read QR codes and to connect easily to mobile sites. Today QR Codes are so pervasive in Japan that it's almost impossible not to see one. You can find them in advertisements, mobile campaigns, on maps, in magazines, on billboards etc. In that sense the QR Code revolution is comparable to SMS. It's an easy and simple tool, the cost of the connection to a mobile site is below the price of an SMS and it's up to you to decide whether or not you want to scan it.

The QR code is about to become widely used in the United States as well. Google Maps already uses them and offers posters for clients to use. Facebook is starting a location service that relies on QR code. We recommend that all our clients start using QR code on their web sites, front door and in advertising as we are on our contact page.
This is a video demonstration of QR code being used in Elle© magazine advertisement.
We have developed a program which will generate the code for you. It is web based and very easy to use. Just enter your contact information and QR code will be downloaded to your browser.

Click here to get your QR code.
QR Code: reader.kaywa.com
Click this QR code
to get Kawa Reader