-----------------------------
Creating Links to Maps
-----------------------------
* Map URL Example:
Map 2030 Main St. Glastonbury, CT 06033 (English U.S. site):
http://maps.yahoo.com/maps_result?addr=2030+main+st&csz=glastonbury+ct+06033&country=us
* URL Construction
Base URL: English U.S. – http://maps.yahoo.com/maps_result?
Spanish U.S. – http://espanol.maps.yahoo.com/maps_result?
English Canada – http://ca.maps.yahoo.com/maps_result?
French Canada – http://cf.maps.yahoo.com/maps_result?
* Input Parameters:
Check addresses before creating links
addr= street address and number
csz= city, state and/or ZIP
country= country (valid entries are US or CA only)
-------------------------------------------
Creating Links to Driving Directions
-------------------------------------------
* Directions Example
Directions To: 2030 Main St. Glastonbury, CT 06033 (English U.S. site)
http://maps.yahoo.com/dd?taddr=2030+Main+St&tcsz=Glastonbury%2C+CT+06033&tcountry=us
* URL Construction
Base URL: English U.S. - http://maps.yahoo.com/dd?
Spanish U.S. - http://espanol.maps.yahoo.com/dd?
English Canada - http://ca.maps.yahoo.com/dd?
French Canada - http://cf.maps.yahoo.com/dd?
* Input Parameters:
Check addresses before creating links
taddr=[destination street address number]+[destination street name]+[destination street type].
tcsz=[destination city name]+[destination state/province]+[optional destination zip or zip+4]
tcountry=[origin US or CA]
Reference: http://help.yahoo.com/l/us/yahoo/maps/links/maps-26.html
This website is dedicated to common, day to day programming and database related Frequently Asked Questions. Popular Programming and Database Articles under one blog
Friday, August 6, 2010
Thursday, April 22, 2010
What Are Generics?
Think of Generics in this manner. We can refer to a class, where we don't force it to be related to any specific Type, but we can still perform work with it in a Type-Safe manner. A perfect example of where we would need Generics is in dealing with collections of items (integers, strings, Orders etc.). We can create a generic collection than can handle any Type in a generic and Type-Safe manner. For example, we can have a single array class that we can use to store a list of Users or even a list of Products, and when we actually use it, we will be able to access the items in the collection directly as a list of Users or Products, and not as objects (with boxing/unboxing, casting).
"Generic" Collections as we see them today
Currently, if we want to handle our Types in a generic manner, we always need to cast them to a System.Object, and we lose any benefit of a rich-typed development experience. For example, I'm sure most of us are familiar with the System.Collection.ArrayList class in Framework v1 and v1.1. If you have used it at all, you will notice a few things about it:
-----------------------------------------------------------------------------------
public class Col
{
T t;
public T Val
{
get
{
return t;
}
set
{
t = value;
}
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Col cStr = new Col();
cStr.Val = "some text";
this.listBox1.Items.Add(cStr.Val.ToString());
this.listBox1.Items.Add(cStr.GetType().ToString());
Col cInt = new Col();
cInt.Val = 100;
this.listBox1.Items.Add(cInt.Val.ToString());
this.listBox1.Items.Add(cInt.GetType().ToString());
}
}
-----------------------------------------------------------------------------------
Reference: http://www.15seconds.com/issue/031024.htm
"Generic" Collections as we see them today
Currently, if we want to handle our Types in a generic manner, we always need to cast them to a System.Object, and we lose any benefit of a rich-typed development experience. For example, I'm sure most of us are familiar with the System.Collection.ArrayList class in Framework v1 and v1.1. If you have used it at all, you will notice a few things about it:
-----------------------------------------------------------------------------------
public class Col
{
T t;
public T Val
{
get
{
return t;
}
set
{
t = value;
}
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Col
cStr.Val = "some text";
this.listBox1.Items.Add(cStr.Val.ToString());
this.listBox1.Items.Add(cStr.GetType().ToString());
Col
cInt.Val = 100;
this.listBox1.Items.Add(cInt.Val.ToString());
this.listBox1.Items.Add(cInt.GetType().ToString());
}
}
-----------------------------------------------------------------------------------
Reference: http://www.15seconds.com/issue/031024.htm
Monday, March 29, 2010
What is WPF good for?
WPF is not only for creating visual appealing interfaces but is also good for
1. Skinned User Interface
2. Binding XML data
3. Dynamically loading different portions of UI using web services
4. Creating a desktop application with a web like interface
1. Skinned User Interface
2. Binding XML data
3. Dynamically loading different portions of UI using web services
4. Creating a desktop application with a web like interface
Friday, January 15, 2010
html to pdf & html to ps
Following are the two excellent resources
http://www.digitaljunkies.ca/dompdf/
http://www.tufat.com/s_html2ps_html2pdf.htm
Happy converting!
http://www.digitaljunkies.ca/dompdf/
http://www.tufat.com/s_html2ps_html2pdf.htm
Happy converting!
Wednesday, November 4, 2009
Masked Input plugin
Sometimes it is required to use a masked input box on a webpage for this i use the following
jQuery library. It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates,phone numbers, etc).
http://digitalbush.com/projects/masked-input-plugin/#demo
jQuery library. It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates,phone numbers, etc).
http://digitalbush.com/projects/masked-input-plugin/#demo
Wednesday, October 21, 2009
Cool Tooltip - JQuery
Please refer to the following page for demo
http://cssglobe.com/lab/easytooltip/03.html
To download code
http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin
http://cssglobe.com/lab/easytooltip/03.html
To download code
http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin
Wednesday, September 9, 2009
Top 7 PHP Security Blunders
PHP is a terrific language for the rapid development of dynamic Websites. It also has many features that are friendly to beginning programmers, such as the fact that it doesn't require variable declarations. However, many of these features can lead a programmer inadvertently to allow security holes to creep into a Web application. The popular security mailing lists teem with notes of flaws identified in PHP applications, but PHP can be as secure as any other language once you understand the basic types of flaws PHP applications tend to exhibit.
Subscribe to:
Posts (Atom)