admin


Latest Postings

August 30 2011

Configuring a split tunnel PPTP VPN in Windows 7

While working remotely I noticed my bandwidth would drop when I connected to our VPN. It appeared that all internet packets were being routed through our VPN connection. While this normally wouldn’t be a problem, I often found myself downloading large files and my connection performance was limited to the available bandwidth to the VPN connection. That’s when I learned about what a “split tunnel” vpn connection is. I wrote this article to walk you through the process of setting up your VPN to take advantage of this option in Windows Networking.

With a “split tunnel vpn” connection, the internet traffic is routed through the local gateway connection. All other network traffic works through the vpn connection as you would expect. This is a feature that is available with Windows Vista and XP PPTP VPN connections, but it isn’t the default setting.

Here is how you configure your VPN connection to use the local gateway:

Step 1

Right click on your VPN connection and choose “properties”

Step 2

Click on the “Networking” tab. This is where we will need to make changes to the TCP/IP settings for your VPN connection. If you are using V6 IP addresses or V4, you’ll need to make the change in both locations just to be sure.

Step 3

Click on the “Advanced” button to get to the Advanced TCP/IP options

Step 4

The VPN connection by default configures all packets to route to the remote server’s gateway. We want to turn this option off by clicking on the “Use default gateway on remote network” option.

That’s it! Once you have made those changes you will notice your internet packets are no longer automatically routing through the VPN server.

www.ISInc.com

August 18 2011

Advanced T-SQL Querying, Programming and Tuning featuring Itzik Ben-Gan – Sept 12-16, 2011

 

Itzik Ben-Gan is returning for another session on SQL Server 2008 Advanced T-SQL Querying training in Sacramento on September 12-16, 2011.

Description

The course focuses on writing and tuning queries and programming with T-SQL in SQL Server 2005 and 2008. In this course you will learn the details and capabilities of T-SQL in the following areas: Logical Query Processing; Query Tuning; Subqueries, Ranking Functions, Joins and Set Operations; Aggregating and Pivoting Data; TOP and APPLY; Data Modification; Data Type Related Problems; Programmable Objects (Dynamic SQL, Views, User Defined Functions, Stored Procedures, Triggers, Transactions and Concurrency, Exception Handling); Graphs, Trees and Hierarchies.

Along the course you will learn how to use T-SQL to solve practical problems such as: Relational Division, Ranking, Missing and Existing Values (Islands and Gaps), Separating Elements, Tie Breakers, Running Aggregations, Pivoting and Unpivoting, Custom Aggregations, Histograms, Dynamic Analysis of Grouping Sets, TOP Problems, Paging, Median, Handling Sequences, and more.

You will learn how to tune your queries, how to develop efficient routines including user defined functions, stored procedures and triggers, work in multi-user environments with transactions and isolation levels, and use dynamic SQL securely and efficiently.

You will also learn how to maintain and query hierarchical data. You will learn what graphs, trees and hierarchies are, what the common requests against graphs are, and how to write T-SQL code to handle those requests. Several different solutions will be presented including: Enumerated Paths, Nested Sets, Nested Iterations using Recursive Queries, and using the HIERARCHYID datatype.

The course provides a dedicated module focusing on query tuning. The module covers internals and index tuning, index access methods, temporary tables, set vs. cursors, and query tuning using query revisions. Moreover, query tuning is in the heart of this course and is incorporated in the different modules throughout the course.

With each querying/programming problem the discussions will revolve around logical aspects, set-based vs. procedural programming and optimization of the solutions.


Author

This course was developed by Itzik Ben-Gan, a mentor and one of the founders of Solid Quality Mentors, author of several books about T-SQL, a columnist in SQL Server Magazine, and a regular speaker in SQL Server related events.


Audience

This course is intended for:

  • T-SQL Programmers, DBAs, Architects, and Analysts
  • Those that need to write or review T-SQL code in SQL Server 2005 and 2008

Prerequisites

Before attending this course, it is recommended that students have the following skills:

  • At least one year of T-SQL querying and programming experience in SQL Server

Course Objectives

Upon completion of this course, the student will:

  • Understand logical query processing
  • Understand SQL Server’s internal data structures
  • Be able to analyze and tune query performance
  • Be able to analyze query execution plans
  • Be able to solve complex querying and programming problems
  • Think in terms of sets
  • Be able to compare set based and cursor based solutions
  • Know how to handle date and time data
  • Understand compilations, recompilations and reuse of execution plans
  • Understand transactions and concurrency aspects of database programming
  • Know how to handle hierarchical data and write recursive queries
  • Be familiar T-SQL enhancements in SQL Server 2005 and 2008

 

Click here for more information, or to register

Windows 8 App Store Confirmed

Steven Sinofsky, President of the Windows Division at Microsoft, has officially confirmed that the upcoming Windows 8 operating system will have an app store. The news was mentioned via a new blog post over on MSDN, where Sinofsky listed the numerous teams which will be contributing to Windows 8′s development.

 

July 18 2011

Microsoft has officially released Office 365!

 

You might be wondering, what is Microsoft Office 365?

It’s familiar Microsoft Office collaboration and productivity tools delivered through the cloud. Everyone can work together easily with anywhere access to email, web conferencing, documents, and calendars. It includes business-class security and is backed by Microsoft. Whether you are a small business or multinational enterprise, Office 365 offers plans designed to fit your organization’s unique needs.

There are two plan families available:
Plan P – for professionals/small businesses
Plan E – for midsize businesses and enterprises.

Microsoft Office 365 for professionals and small businesses
This service plan is designed for up to 25 employees who want:

•A solution without dedicated IT staff
•Essential email, calendar, and website services
•Free online community support
•Month-to-month subscription

Microsoft Office 365 for midsize businesses and enterprises
This service plan is great for any size organization that wants:

•Advanced IT configuration and control
•Office Professional Plus, Active Directory or advanced archiving
•24×7 IT Administrator support
•Choice between monthly and annual contracts

Please contact an ISInc account representative for more information, or email Sales@ISInc.com.

November 19 2008

Using Windows XP Task Scheduler to Automate an FTP Upload

I recently came across a problem where I needed to schedule the daily FTP upload of a set of files to one of my client’s FTP servers. I was a bit out of my element and found that locating a solution to this task was surprisingly challenging. I thought I would post the steps here so that someone in a similar situation might benefit from the time I spent in trial and error.

1. My first goal was to make sure I could upload via ftp using the command prompt in Windows XP. I created the following script, ftp_script.txt, which I placed in a scripts folder on the C drive:

open www.yourhostname.com
username
password
put c:\test.txt test.txt
quit

Plug in your corresponding hostname, username, password, and file locations. This script will upload the local copy of test.txt to the server. The above script can be passed into your command line ftp client. Open up your command prompt and type:

ftp -s:path_to_script\scriptfile

Which, in my case, was:

ftp -s:c:\scripts\ftp_script.txt

The “-s” allows you to specify a file name in order to pass your username, password, and put commands to the command line ftp client.

2. If you get Step 1 working, the next step is to create a command file to run the ftp script. The command file is just a text file with a .cmd extension that calls up the command line ftp. In my case, I created ftp.cmd with the contents:

ftp -s:c:\scripts\ftp_script.txt

Test your command file by double clicking it to make sure that it executes the FTP successfully.

3. Finally, create a daily task using the Windows Task Scheduler. Go to Start > Control Panel > Scheduled Tasks (in Classic view). Click Add Scheduled Task and when it prompts you for the application, browse to your command file that you created in Step 2. As you finish out the task scheduler, you’ll get to choose how often you want the task to run and at what time.

After you complete these steps, your ftp job should be ready and waiting for its next scheduled execution time. I hope you find this trick as useful as I did!

November 7 2008

Coding CSS – Essential Firefox Add-Ons

If you spend any time coding CSS from scratch or debugging existing stylesheets, you know how tricky it can be to find that pesky error! Whether it is getting IE6 to play nice or just understanding where all that white space is coming from, these Firefox add-ons should help you do the job better and faster. I’ve only chosen a couple of my favorite add-ons and my favorite features of each. Feel free to include your favorite features or add-ons in the comments as this list is anything but exhaustive.

The Web Developer Toolbar by Chris Pederick has many useful features like an easy-access javascript disabler, a simple window resize to test 800×600 screen resolution, and an option to view all of the stylesheets associated with a page (easily searchable!).

One of my favorite features, however, is surprisingly simple and incredibly useful.  Using the Outline menu, you can outline any block level element on the page with just two clicks of the mouse.  Personally, I can end up spending minutes of wasted time adding borders to elements here and there trying to figure out why I am seeing too much or too little space in a certain area.  No need to do that anymore with this feature. It outlines your div tags for you, making spatial debugging a much simpler and faster process.

My other favorite feature in the web developer toolbar is the quick access to the W3C XHTML validator.  It will upload your local file and display your pass/fail status quickly and efficiently!

Next on my list is the Firebug add-on which again, has a wealth of useful and time-saving debugging tools.  My favorite, by far, is what I’ve coined as their CSS specificity revealer.  Ok, you got me, I just made that up.  The feature I’m referring to goes something like this:

1. You add some CSS rule

2. Your CSS rule doesn’t work

3. You can’t figure out why it doesn’t work

4. You wish to yourself there was some tool out there that could tell you if someone wrote a rule that is somehow overriding your own

5. You realize that firebug has that very feature and you’re going to use it now!

Launch firebug after you’ve installed it and click the “Inspect” button at the top of the console.  Now, watch the Style panel on the right hand side.  As you mouse over different elements on the page, you will see which rules apply to which elements.  You will also see which rules are being overridden by others as evidenced by the line through.

For instance, in the above example, the #description rule is overriding our normal <p> tag line height of 1.4em because #description is an ID (which will always have a higher specificity than a non-ID rule).

Personally, I think this feature of firebug makes it one of the best CSS debugging tools out there.

And remember, feel free to leave me some tips and tricks in the comments section if you have any!

October 31 2008

IE6 Float Drop in the California State Web Template

A question that recently came up in one of my CSS classes was about the California state web template that was created to standardize state websites.  The template can be downloaded at webtools.ca.gov and you can see live working copies of the customized versions of the template in many places, including:

The template is distributed with three optional column based layouts.  The webpage author can select a style sheet appropriate to the layout they are interested in: one, two, or three columns.  One of the problems with the three column layout in the state template is something known as float drop and you will only see it in Internet Explorer (IE) 6.

Float drop is a phenomenon that occurs when you have a floated element on a page and the width of the page become too small to accomodate the floated element and its neighbors.  Instead of displaying as they should, one of the elements will drop down below the other content.

For example, see this Department of Transportation webpage at full screen width:

Caltrans 3 column page at normal width
Figure 1

However, this is what it looks like on a lower resolution monitor.

Caltrans 3 column page at low width, float drop is evident
Figure 2

See how the middle column drops down below the right?  To prevent this from happening, they have added the following rule to the master css file attached to the state template:

 


#heading, #navigation, #main_content_1, #footer {
min-width:774px;
}

 

This means that those four div tags, which hold the main content of the page as well as portions of the header and footer, will never fall below 774 pixels in width.  This preserves the layout when the user’s screen width is too small, rather than having the elements  stack on top of each other.  The problem with this method is that IE6 does not honor the min-width property.  Thus, what looks lovely in Firefox and IE7 looks like Figure 2 in IE6.

When my student came to me with this question, I went in search of an answer.  The solution I came up with is the following code sample, which can sit anywhere within the head tag of your document:

 

<!––[if IE 6]>

#main_content_1, #heading, #nav, #footer { width:
expression(Math.max(document.documentElement.clientWidth, 774)+'px');
}

<![endif]––>

 

Internet explorer allows you to embed JavaScript within CSS by using an expression, so we can set the width property equal to the result of an expression.  That expression checks to see which value is larger, 774 pixels or the width of the page?  Whichever is the larger of the two will be the new value for width.  This entire rule is embedded within an IE6 conditional comment (<!––[if IE 6]> … <![endif]––>), so that only IE6 will obey these instructions.  Since the expression function is proprietary, the conditional comment also serves the purpose of leaving our current CSS in a standards compliant state.  Simply embed this code snippet into the head of your three column pages and voila, no more float drop!

October 10 2008

Record Selection and the Null Value Bug in Crystal Reports

One of the interesting issues I have found when building reports in Crystal is the nature of their record selection on blank data. More »

October 3 2008

Debugging CSS in IE6, hasLayout and Zoom

As I’ve learned to build website layouts purely in CSS, I have come across many hacks or workarounds for debugging browser inconsistencies. One that I never quite understood was the declaration

zoom: 1;

I knew that if I applied zoom: 1 to certain elements, a layout that once looked like the elephant man in Internet Explorer 6 would miraculously turn into prince charming. But what is zoom: 1? And why does it fix my broken layouts? This post is meant to shed some light on these issues without getting into the nitty gritty details.

To understand zoom: 1, we must understand the proprietary property hasLayout, courtesy of Internet Explorer (IE). The hasLayout property is an internal flag in IE that tells the browser whether or not a particular element is a “layout” element. IE makes a distinction between a layout element and a non-layout element in more ways than I can enumerate here. Suffice it to say that layout elements and non-layout elements are treated differently when IE renders the page. I have found that layout elements will interact differently with their floated and positioned neighbors. This usually manifests in strange vertical and horizontal spacing between the elements.

The hasLayout property cannot be altered by the style sheet author. It is internal. It is flagged as true by default for certain elements (like <table>, <body>, and <img>). It can also be triggered by the style sheet author by changing certain properties (like width, height, float, and zoom).

The zoom property is one of Internet Explorer’s proprietary CSS properties that allows the style sheet author to enlarge something.

zoom: 2;

The above zoom declaration does as you would expect, it makes something twice as big. So since the zoom property will trigger hasLayout, we can use it to force IE into giving certain elements “layout” which can help us with spacing issues between elements. In order to add zoom but avoid any detrimental effects, we just use

zoom: 1;

This keeps the element at the same size while still triggering hasLayout behind the scenes.

To use zoom: 1 to my advantage, my general rule of thumb has been to code my layouts by testing primarily in Firefox (or another standards compliant browser like Safari or Chrome). During the process of coding it, I will periodically test it in IE7 to make sure there are no major hiccups. Usually, I can get the layout working in both browsers without too many hacks. Once the layout is finalized in Firefox and IE7, I test in IE6. If the layout is way off in IE6, I immediately apply the declaration:

* { zoom: 1; }

which gives “layout” to all elements. This will often fix the major issues in IE6, and the rest is just pixel tweaking with conditional comments.

For a complete reference of hasLayout (much more complete than I have attempted here), read this article on having layout.

September 25 2008

Altruistic Linking

Have you ever linked to another web page using the phrase “click here“?

If you are a webmaster, a web author, or a web content editor and you answered yes to that question, keep reading because this blog post is for you.

Why is “click here” the enemy? Let me start with a little anecdote about a phenomenon known as Google bombing.

One of the methods that Google uses to determine what your page is all about is to look at the link text (or anchor text) that others have used to link to your website. So, if there are a million links that say Amazon and link to Amazon.com, there is a good chance that a Google search on the word Amazon will return a first hit to Amazon.com. Seems logical, right?

Google also has a button called “I’m feeling lucky” that is often overlooked. Try it out. Go to Google and search on “Innovative Solutions Inc.” Instead of clicking the “Google Search” button, click the button to the right that says “I’m feeling lucky.” This will take you straight to our home page. Why? Because the “I’m feeling lucky” button takes you to the first search result that you would have seen if you had done a regular Google search.

How does this relate to Google bombing? Once upon a time, somebody decided to use their knowledge of Google’s indexing system to further their own political objectives. In particular, I remember being introduced to the George Bush Google bomb when I was in college. What happens is, a particular blogger, website, or internet community puts out a request to their readers to create a link to George Bush’s bio on the white house website with the link text of “miserable failure.” Eventually, as the scheme gains momentum, there are so many “miserable failure” links to the president’s bio that the Google bots integrate those links into their knowledge base. Eventually, you could type “miserable failure” into Google, click “I’m feeling lucky,” and there was George Bush’s smiling face on your computer screen. Pretty knifing, yes?

The point of this anecdote is to teach you that link text matters. If Google uses your link text to determine what a website is about, why not provide more useful information than a generic “click here”?

This is a helpful link to our website:
Our favorite technical training center in Sacramento, CA – Innovative Solutions Inc.

This is not as helpful:
Click here to go to our favorite technical training center in Sacramento, CA – Innovative Solutions Inc.

That is why I call it altruistic linking. You are doing your neighbor a favor, you are going to help their search ranking by linking to them with appropriate keywords. And hopefully, in turn, they will do the same for you.