Monday, March 1, 2010

SqlCacheDependency using ASP.NET 2.0 and SQL Server 2005

SqlCacheDependency using ASP.NET 2.0 AND SQLSERVER 2005 is a beautiful thing :) Although getting SqlCacheDependency to work with SQL Server 2000 is not rocket science, there are a few extra moving parts that need to be set-up in your web.config and on SQL Server 2000. When using SQL Server 2005, all of that goes away :)

Enable Service Broker

Before SqlCacheDependency will work with SQL Server 2005, you first have to enable Service Broker, which is reponsible for the notification services that let the web cache know a change has been made to the underlying database and that the item in the cache must be removed.

ALTER DATABASE Store SET ENABLE_BROKER;
GO

SqlCacheDependency.Start() in Global.asax

In ASP.NET, you need to run SqlCacheDependency.Start(connectionString) in the Global.asax:

void Application_Start(object sender, EventArgs e)
{
string connectionString = WebConfigurationManager.
ConnectionStrings[
"Catalog"].ConnectionString;
SqlDependency.Start(connectionString);
}

SqlCacheDependency in ASP.NET 2.0 Example

Now you can just create your SqlCacheDependency as normal in your ASP.NET 2.0 page. Here is a simple example:

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataTable categories
= (DataTable)Cache.Get("Categories");

if (categories == null)
{
categories
= GetCategories();
Label1.Text
= System.DateTime.Now.ToString();
}

GridView1.DataSource
= categories.DefaultView;
GridView1.DataBind();
}

private DataTable GetCategories()
{
string connectionString = WebConfigurationManager.
ConnectionStrings[
"Catalog"].ConnectionString;

DataTable categories
= new DataTable();

using (SqlConnection connection =
new SqlConnection(connectionString))
{
SqlCommand command
= new SqlCommand(
"SELECT CategoryID,Code,Title
FROM dbo.Categories", connection);

SqlCacheDependency dependency
=
new SqlCacheDependency(command);

SqlDataAdapter adapter
= new SqlDataAdapter();
adapter.SelectCommand
= command;

DataSet dataset
= new DataSet();

adapter.Fill(dataset);

categories
= dataset.Tables[0];

Cache.Insert(
"Categories", categories, dependency);
}

return categories;
}
}

Wednesday, January 20, 2010

Top 10 Tutorials to Develop iPhone Apps

If you are tired of downoading apps for your iPhone why not develop one. Don't worry, even if you are a novice with iPhone programming there are a good number of tutorials that can guide you with the development of iPhone apps. It's obvious that you would find it hard when developing your first iPhone app. There is a whole lot of information in iPhone SDKDevelopment that will guide you with the tools and APIs for iPhone application development. Further, there are some cool tutorials that will provide you a step-by-step guide for developing iPhone apps. After a thorough search I came across the top 10 tutorials to develop iPhone apps. Hope my tutorials inspire you to develop your own great iPhone applications.

1. Objective-C and Interface Builder

In order to build iPhone apps you would require a the basics of Cocoa Touch, Objective-C, and Interface Builder. This free tutorial will assist you to learn the elementary knowledge required for developingiPhone apps.

Link

2. First iPhone Application

This tutorial gives you a brief introduction on how to get started with your first iPhone application. This app has been named as

Link

3. Basic iPhone Programming

This is a great tutorial for those new to iPhone SDK Programming (Cocoa in general). Learn the techniques for creating lables, Allocating Classes, AND how to use the basic features of Xcode.

Link

4. Cocoa Touch Tutorial

This tutorial teaches you how to build the a basic Cocoa application using Interface Builder.

Link

5. iPhone SDK Tutorial: Build a Simple RSS reader for the iPhone

To follow this tutorial you would require some familiarity iPhone SDK. This free tutorial allows you to build an RSS feed reader for simple feed.

Link

6. How to make an iPhone Application on XCode

This is an video tutorial that teaches you the step by step procedure need to get an iPhone application running on The XCode Simulator.

Link

7. iPhone Application Tutorial

This tutorial combines two applications - Hello World app and Timer app. By the end of this tutorial you would have the foundation to think about future apps.

Link

8. iPhone Dev Sessions: How To Make An Orientation-Aware Clock

This free tutorial provides you with the steps to create a simple clock that is orientation-aware. in this app the time will rotate as you rotate the iPhone.

Link

9. iPhone Programming Tutorial - Creating a ToDo List Using SQLite Part 1

Before you head for this tutorial you must be well acquainted with UITableViews. With the help of this tutorial you may create a prioritized To-Do list with SQLite.

Link

10. Make an iPhone App Using the Envato API

This tutorial teaches you how to make create your own iPhone app using data from the new API. This can be a useful for those in the beginning stages of API and JSON.

Link

(Source : http://blog.taragana.com/index.php/archive/top-10-tutorials-to-develop-iphone-apps/ )

Thursday, November 26, 2009

Your Professional Network within Microsoft Outlook

Coming Soon: Your Professional Network within Microsoft Outlook

Microsoft announced an exciting new addition to the upcoming Microsoft Office 2010 – the Outlook Social Connector. The Outlook Social Connector is designed to seamlessly bring communications history as well as business and social networking feeds into your Outlook experience.

LinkedIn will be the first networking site to support the Outlook Social Connector. The LinkedIn functionality will be available in early 2010. Our big belief is that you can be much more effective if you have your professional network close at hand, and you can leverage your online identity in the work you do on a daily basis. The Outlook Social Connector will bring your LinkedIn Professional Network to where you work – right within your e-mail inbox.

Here are three key benefits you get from this integration:

1. Keep up with LinkedIn connections right from your e-mail inbox

One of the great things about LinkedIn is being able to learn what your professional connections are working on and thinking about. Just glance at the Network Updates on your LinkedIn homepage and you’ll be able to learn what articles & books your connections are reading, what conferences they are attending, and what questions they are asking and answering on LinkedIn. Many use this information to keep current with their industry and profession, as well as to learn new things and expand their horizons.

The Outlooks Social Connector makes this even easier – by automatically showing the latest activity (i.e. Network Updates) from any LinkedIn connection that sends you an e-mail. So now you can get the latest information from your LinkedIn network even without having to leave your inbox.

2. E-mail your LinkedIn connections directly from Outlook

Know that perfect LinkedIn connection to help you with a business task or question but don’t remember their current email address? No longer do you have to go to the LinkedIn website to find their contact information before sending them a message, as your LinkedIn network is now available right within your inbox. Just start typing the name of a LinkedIn connection in the “To:” field of an Outlook message and the connections’ e-mail address from LinkedIn will automatically appear as if they are an existing Outlook contact. In fact, the Outlook Social Connector will create an Outlook Contacts folder for all of your LinkedIn connections and bring down their contact information, professional details, and picture from LinkedIn into Outlook.

3. Keep building your professional network from Outlook

Working with someone new but haven’t had a chance to connect with them on LinkedIn? By bringing professional networking to where you work, the Outlook Social Connector again makes it easy. Just click a button next to any e-mail you receive and instantly send an invitation to connect to the e-mail’s sender. It’s that easy.

We hope that these functions start bringing some of the key elements of your LinkedIn professional network to where you work – your Outlook e-mail inbox, sometime early next year. But these are certainly just the first steps. Let us know what else you’d like to see by leaving a comment below.

Source : http://blog.linkedin.com/2009/11/

Tuesday, November 17, 2009

Restrict IP Address to prevent invalid login attack to SQL Server.

Restrict IP Address to prevent invalid login attack to SQL Server.

Recently, we in customer scenario, amount of attacks come through making connection to SQL Server 2005 and trying invalid sa login. Under such a situation, SQL Server report error " login failed for user sa . It is quite annoying to get a lot of this kind of error under an attack and consequently impact the performance of SQL Server.

However, currently, SQL Server 2005 can not block client request based on IP Address automatically and it requires administrator to use one of the following operating system tools to workaround.

(1) IP Sec

Configure IP Sec policy to block ip address from the attacker's machine. IPSec is available on windows 2000, XP and windows 2003.

http://support.microsoft.com/kb/313190

(1) Firewall

When enabling exception for SQL Server port, the administrator can specify which ip addresses/network to be allowed to connect to it. Currently Window Firewall is available on windows XP and windows 2003.

http://www.microsoft.com/technet/community/columns/cableguy/cg0204.mspx#ELC

(3) RRAS IP Filter

Configure RRAS to drop the traffic from the attacker's ip address. RRAS is only available on windows server products. such as windows 2000 and windows 2003.

Refer to http://www.microsoft.com/technet/archive/winntas/proddocs/rras40/rrasch03.mspx?mfr=true


Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights


Source: http://blogs.msdn.com/sql_protocols/archive/2006/04/10/572605.aspx


Thursday, November 12, 2009

GO: Google Launches Its Own Programming Language

One of the core philosophies of Google, and one of the reasons it has been so successful, is efficiency. It’s about both being as efficient as possible when serving search results and processing data and creating product that push the limits of efficiency for the user (as an example, Google’s trying to make communication more efficient with Google Wave).

Maybe that’s why we’re not surprised that Google is finally looking to tackle the underpinning code that runs the web. Today the search giant released Go, an open-source development language that Google believes will combine performance with speed, and one that the company probably hopes will reshape the development and software industries in its favor.

Go is based on the C programming family, one of the most widely used programming language trees in the world. However, the twist is that incorporates elements of Python (a preferred development language within Google) and the Pascal/Modula/Oberon family to make faster and more dynamic programs.


Why Did Google Make Its Own Language?


In its Go FAQ, Google explains the main motivations behind the project:

“No major systems language has emerged in over a decade, but over that time the computing landscape has changed tremendously. There are several trends:

- Computers are enormously quicker but software development is not faster.

- Dependency management is a big part of software development today but the “header files” of languages in the C tradition are antithetical to clean dependency analysis—and fast compilation.

- There is a growing rebellion against cumbersome type systems like those of Java and C++, pushing people towards dynamically typed languages such as Python and JavaScript.

- Some fundamental concepts such as garbage collection and parallel computation are not well supported by popular systems languages.

- The emergence of multicore computers has generated worry and confusion.”

Summary: Google believes that the web and computing have changed dramatically in the last ten years, but the languages powering that computing have not. But when you get down to it, Google could benefit a great deal from not only having a more efficient programming language, but having one it designed being used in thousands web and software apps.

If you want to learn more, Google (as usual) has released a detailed, hour-long Google Tech Talk on the new language (embedded below). However, if you’re a developer and just want to get started, we suggest checking out the Go Tutorial and writing your first program.


Source : http://mashable.com/2009/11/10/go-google-language/


Monday, November 9, 2009

How much you love your job ???

Choosing a career and Landing a job — these are important events in one's life.

While we all need to choose a job, and have been `training' for it since we leave school, not everyone lands a job, which they would love to do. There are a good number of people who feel trapped in careers that they do not enjoy. It is especially frustrating when a person finds himself working in an area, which is at total variance to what he has been trained for. This makes him feel that he has somehow wasted all those years of learning! What is more, he may find himself ill equipped to deal with his job and compete with others in his workplace, as he has actually been trained for something quite different. After all, when you love your job, you do not just have a career, but a passion, and being paid for it is a bonus!

You know you love your job when----

.You know what is expected of you at work.
.You have opportunities to use your talents in their roles every day.
.When you receive recognition regularly and feel cared for.
.When You have strong bonds with your coworkers.
.When you receive ongoing feedback on your performance and have regularly scheduled progress .discussions..................,more and more 'n' more.....

While you may not love your job, the ground reality may be that you just have to go on with it for practical reasons.

In which case, try to develop an interest in your job. It is possible!

Try to design thought and intellect into an otherwise mundane, routine job.

Maybe you could learn new skills and implement them so that you may enjoy your work.

If you are abreast with the latest happenings in your area of work, you will feel confident enough to deal with it authoritatively and that will ultimately help you develop a liking for your job.

After all, we all need to earn our bread and butter. So why don't we ensure that we enjoy doing it?

I'll go anywhere as long as it's forward."— David Livingstone





Wednesday, November 4, 2009

5 Ways to Keep Visitors Coming Back to a website

A lot of successful websites depend on returning visitors to account for a major part of their traffic. Returning visitors are easier to convert into paying customers because the more often they return to a site, the more trust they have in that site. The credibility issue just melts away. Hence, keep your visitors coming back to your site with the following methods:

1) Start a forum, chatroom or shoutbox

When you start a forum, chatroom or shoutbox, you are providing your visitors a place to voice their opinions and interact with their peers — all of them are visitors of your site. As conversations build up, a sense of community will also follow and your visitors will come back to your site almost religiously every day.

2) Start a web log (blog)

Keep an online journal, or more commonly known as a blog, on your site and keep it updated with latest news about yourself. Human beings are curious creatures and they will keep their eyes glued to the monitor if you post fresh news frequently. You will also build up your credibility as you are proving to them that there is also a real life person behind the website.

3) Carry out polls or surveys

Polls and surveys are other forms of interaction that you should definitely consider adding to your site. They provide a quick way for visitors to voice their opinions and to get involved in your website. Be sure to publish polls or surveys that are strongly relevant to the target market of your website to keep them interested to find out about the results.

4) Hold puzzles, quizzes and games

Just imagine how many office workers procrastinate at work every day, and you will be able to gauge how many people will keep visiting your site if you provide a very interesting or addicting way of entertainment. You can also hold competitions to award the high score winner to keep people trying continuously to earn the prize.

5) Update frequently with fresh content

Update your site frequently with fresh content so that every time your visitors come back, they will have something to read on your site. This is the most widely known and most effective method of attracting returning visitors, but this is also the least carried out one because of the laziness of webmasters. No one will want to browse a site that looks the same over ten years, so keep your site updated with fresh bites!
 
Feedback Form
Feedback Analytics