Türkçe   |   English
Calendar
Categories
Archive
Links
Blogroll
Files

23.01.2010
Search Engine Optimization (SEO) Tooklit

The big percent of visitors of our web sites are accessing our sites via search engines. So in order to increase the visitor count of our websites we should ensure that the search engines are crawling our websites correctly.

SEO Toolkit is a free tool that you can download with the link below. SEO helps the search engine optimization that shows warnings, errors about the content which is not compatible for search engines. It can also create robots and sitemap files.

http://www.microsoft.com/web/spotlight/seo/?appid=10991003

News
Comments(0)

21.01.2010
Bill Gates @ Twitter

Bill Gates who is Microsoft’s founder has just jointed Twitter. You can start following him at @BillGates. Twitter has confirmed that this account belongs to Bill Gates. So it's real.

http://twitter.com/BillGates

News
Comments(0)

12.01.2010
Umbraco - Open Source CMS
I choose to use an open source content management system for a technical community site that I am currently developing. While I was researching the best suitable open source project I found Umbraco on Codeplex. We successfully used umbraco in our project. If yu want to try Umbraco you can visit http://umbraco.codeplex.com/. Also in Codeplex There are many extensions developed over Umbraco. You can also download Umbraco using Microsoft Web Platform Installer (http://www.microsoft.com/web/Downloads/platform.aspx) . The only weakness that I determine while using Umbraco is that it does not include any documentation for developers who want to develop custom components.
News
Comments(0)

01.12.2009
Reading Last Access Property of a File at Windows Vista and Windows 7

If you are using Windows Vista or a higher version you'll see that Last Accessed attribute of the file does not change even if you accessed the file just before checking. This situation may cause problem in our programs that we need to get the last access property of a file using FileInfo object or the situation that we use FileSystemWatcher to get notified when file is accessed by using  NotifyFilters.LastAccess attribute.

For improved file system performance Last Access time update in switched off in Windows Vista by default. Thus, Last Access time attribute is set upon creating file and not changed afterwards even if file is modified. However, it is possible to enable Last Access time updates if necessary.
To enable Last Access time updates open Registry Editor by typing regedit in Search input on Start Menu, locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem path entry and change NtfsDisableLastAccessUpdate value data to 0. After setting Last Access time update, system has to be restarted for the change to take effect. Alternatively, run the following command with administrator rights:
fsutil behavior set disablelastaccess 0

You can visit that website

http://www.febooti.com/products/filetweak/online-help/file-last-accessed-date.html

Clues
Comments(0)

13.11.2009
Is your computer connected to Internet?

Most of the developers ping an internet address or a web site to check whether computer is connected to Internet or not. However there is a much simple and accurate way to achieve this goal which is using an api. I'm sharing the code that you can use in your applications.

        [DllImport("wininet.dll")]
        private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);
        public static bool IsInternetConnectionAvailable()
        {
            int d;
            return InternetGetConnectedState(out d, 0);
        }
Clues,Codes
Comments(1)

11.11.2009
RichTextBox BorderStyle.FixedSingle Problem and Solution
When BorderStyle property of RichTextBox is set to FixedSingle it still acts as Fixed3D. MSDN writes that BorderStyle FixedSingle is not suported for RichTextBox in http://msdn.microsoft.com/en-us/library/system.windows.forms.textboxbase.borderstyle(VS.80).aspx
However there is a workaround to get the desired look of RichTextBox. Putting the RichtextBox into a Panel that has FixedSingle BorderStyle and setting the dock property of RichTextBox to fill and BorderStyle property of RichTextBox to none will solve the problem.
Clues
Comments(0)

03.11.2009
Using of Form.ShowDialog Method

We use Form's ShowDialog method in various parts of applications we develop. However these forms will not be collected by GarbageCollector since they are not manually disposed.

Here are the lines from msdn documentation.

When a form is displayed as a modal dialog box, clicking the Close button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the DialogResult property to be set to DialogResult.Cancel. Unlike modeless forms, the Close method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the DialogResult property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is not closed, you must call the Dispose method of the form when the form is no longer needed by your application.

http://msdn.microsoft.com/en-us/library/c7ykbedk.aspx

Codes
Comments(0)

20.10.2009
Visual Studio 2010 Beta 2 Released

Visual Studio 2010 Beta 2 is now available to MSDN subscribers and will be available to the public at next week. For download you can visit the address below.

http://go.microsoft.com/fwlink/?LinkID=151797

 

News
Comments(0)

21.09.2009
Graphic User Interface Tricks and Tips.

Today, I found a nice site about Graphic User Interface Tricks and Tips.

Here is the address http://www.minarts.com/graphic-user-interface-trick-and-tips

and Here are the tips.

*Use cute buttons, icons, and graphics and images.
*Don't be afraid to experiment with colors! But don't use too much colors together.
*Your application should play smart and not run fun sounds and games while operating to keep the users entertained.
*By the way, never, ever use under any circumstance use native graphical controls or widgets. Users get bored of the old fonts, shapes, buttons, text boxes, and "free" stuff.
*When you writing own controls or widgets, check absolutely sure they look and feel nothing like the standard widgets or anything else the end user might expect.
*Is important that the end user should never be able to tell the difference between a checked and unchecked option box or check box.
*Use obscure or poorly drawn graphics for your tool bar buttons, and never put text inside.
*Users need time to think about what they are doing and get coffee. Your application should always take at least 5 minutes to load even on the fastest available computer.
*Tool tips are a bad way to display critical information, use text massages on red color or orange, depends how it is critical.
*To get the most screen space but don't force your application to always run maximized.
*Make the default positions of floating properties windows cover something important.
*Please, don't use the most exotic fonts you can find.
*Your application's user interface can't to be too much flexible and customizable to the point where if the user accidentally sneezes on the mouse or keyboard they will have to spend the next half an hour setting things back.
*Remove 5-year old draw your graphics, including your corporate logo.
*File browsing dialogs are needed, users can't easily remember and type in long file paths.
*Don't design your application so it requires the user to set their tiny monitor to 10512*7430 make it more flexible.

 

Make it Smart
UI Design Tip - 1
Organize the user interface so that the information flows either vertically or horizontally, with the most important information always located in the upper-left corner of the screen.
Group related controls together using either white space or a frame.
Align controls to minimize number of margins.

UI Design Tip- 2
Either center the command buttons along the bottom of the screen or stack them in either the upper-right or lower-right corner.
Use no more than six command buttons on a screen.
Place the most commonly used command button first.

UI Design Tip - 3
Assign meaningful captions to command buttons.
Place the caption on one line and use from one to three words only.
Use book title capitalization for command button captions.

UI Design Tip - 4
Label each control in the interface. The label should be from one to three words only, and it should be entered on one line.
Align each label on the left, and position each either above or to the left of the control it identifies.
Follow the label with a colon (:) and use sentence capitalization.

UI Design Tip - 5
Maintain a consistent margin of two or three dots from the edge of the window.
Position related controls on succeeding dots. Controls that are not part of any logical grouping may be positioned from two to four dots away from other controls.
Try to create an interface that no one notices.

UI Design Tip - 6
Command buttons in the interface should be sized relative to each other.
If the command buttons are centered on the bottom of the screen, then each button should be the same height; there widths, however, may vary.
If the command buttons are stacked in a corner, then each should be the same height and the same width.

UI Design Tip- 7
The human eye is attracted to pictures before text, so include a graphic only if it is necessary to do so.
If you are including the graphic for aesthetics only, use a small graphic and place it in a location that will not distract the user.

UI Design Tip - 8
Use 8, 10, or 12 point fonts for the elements in the user interface.
Use only one or two font sizes.
Use a sans serif font for the text.
Use only one font type for all of the text.
Avoid italics and underlining.

UI Design Tip - 9
The human eye is attracted to color before black and white.
Build the interface using black, white, and gray first, then add color only if you have a good reason to do so.
Use either white, off-white, light gray, pale blue, or pale yellow for an application’s background, and use black for the text.

UI Design Tip - 10
Always use dark text on a light background because it is the easiest to read.
Never use a dark color for the background or a light color for the text.
Limit the number of colors (other than white, black, and gray) to three.
Never use color as the only means of identification for an interface element.

Clues
Comments(0)

07.08.2009
Windows 7 RTM now available for MSDN and TechNet Subscribers
Windows 7 RTM is now available for MSDN and TechNet Subscribers. If you have a subscription for any of this sites visit http://technet.microsoft.com/en-us/default.aspx or http://msdn.microsoft.com/en-us/default.aspx to download Windows 7 RTM.
News
Comments(0)

27.07.2009
Microsoft Tag

In this entry I will share about an excellent technology developed by Microsoft. Microsoft tag's current version is beta, but I haven't had an error since started using it. In basic Microsoft Tag is working like a barcode. Since it is a colored system it can contain lots of information compared to a barcode. This information can be a url, a vcard file, a text, or a phone dialer. Plus this information can be protected by a password or can only be accessable within a specified time. And to read this information all you need is a mobile phone. Tag reader works successfully with a wide number of mobile phone models and can sense tag and read information from sources such as monitor, Tv. In future it will not be suprising seeing tag's on business cards, price tags, advertisement brochures. I will share a tag that contains my contact information at the end of this entry.
For further information you can visit http://tag.microsoft.com/
You can download to your mobile phone from http://gettag.mobi/
Codes,News
Comments(0)

23.07.2009
Windows Media Center EPG Data Quality Submission Form

Media Center feature which is delivered by Windows is used by a wide number of users. But sometimes users who use EPG data realize that the EPG information is not totally correct.

For this issue Microsoft has added an EPG Data Quality Submission form to Microsoft Greenbutton (Offical Windows Media Center Community) site. If you want to take part in increasing quality of EPG Data's you can use http://thegreenbutton.com/dqs/ address to participate.

Also for general feedbacks you can use the forum at http://thegreenbutton.com/forums/

News
Comments(0)

20.07.2009
Quotes about code writing

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
- Brian Kernighan

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”
- Bjarne Stroustrup

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
- Martin Fowler

“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”
- C.A.R. Hoare

“Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.”
-  Alan Kay

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”
- Bill Gates

“If you want to set off and go develop some grand new thing, you don’t need millions of dollars of capitalization. You need enough pizza and Diet Coke to stick in your refrigerator, a cheap PC to work on and the dedication to go through with it.”
- John Carmack

“Programs must be written for people to read, and only incidentally for machines to execute.”
- Abelson / Sussman

“Question: How does a large software project get to be one year late? Answer: One day at a time!”
- Fred Brooks

Funny
Comments(0)

13.07.2009
Document Preview & Explorer @ CodeProject

Document Preview is an application that allows users to preview their files such as Pdf, Doc, Xls, Jpg, Mp3, Avi while browsing with an interface like Windows Explorer but without opening an extra application. It also allows users to move, copy, delete folders or files.

The idea to develop this software came up to my mind while trying to find a pdf document that contained specific information. My goal was to develop this application with techniques like Abstract Classes, Inheritance, Interfaces, Linq and provide community samples about usages of these techniques.

For further information you can visit http://www.codeproject.com/KB/cs/DocumentPreviewApp.aspx

Codes,News,Open Source
Comments(0)

22.04.2009
How green is your pc?

Today while surfing on the internet I saw articles about Green IT which is one of the most popular topics. There was another topic about an application that can measure your computer is how environment friendly and also makes your computer work more environment friendly. Application is built on the idea of turning off your devices that consumes power such as screen, hard disks in period of inactivity. Application can also schedule timelines for different profiles such as work hours, non working hours. You can also see how much energy you saved by changing your profile and what is the amount of CO2 emission that your computer indirectly caused.

For further information you can visit http://www.microsoft.com/environment/edison.aspx .

News
Comments(0)

20.04.2009
Invalid Viewstate Exception
It is certain that you have recieved "System.Web.HttpException: The client disconnected. ---> System.Web.UI.ViewStateException: Invalid viewstate" message if you are logging exceptions in a web application. There are lots of reasons of this problem. These reasons may be the difference in machine key configuration of applications that are running in a web farm, Firewall or antivirus softwares that running on web server or trimming of hidden viewstate field at client's proxy server or firewall. However there are no possible solutions that can be made by developer for the first two reasons, there is a solution for the last reason. In web.config file at the pages element of System.Web node you can set maxPageStateFieldLength property to 512 or another value by typing maxPageStateFieldLength="512". This change made to web.config file will cause the application split viewstate field to strings that maximum 512 character length. I had significant decrease at the number of Invalid Viewstate errors.
Clues,Codes
Comments(0)

16.04.2009
Are You Certifiable?

This is a very funny game developed by Microsoft using Silverlight for whose want to have a certificate or just test their knowledge.

Also it is great to have different questions for IT Professionals and Developers.

If you are so ambitious to play, you can visit http://www.microsoft.com/click/areyoucertifiable/ without wasting time.

News,Funny
Comments(0)

01.04.2009
MVP Again
I have been awarded as Microsoft MVP this year. This is the fourth time I have been awarded in a row. I would like to thank everyone who has supported me. My category is C# as usual. C# Forever :)
News
Comments(0)

19.03.2009
Internet Explorer 8 Released
I've been using Internet Explorer 8 since beta version. Especially I enjoyed using Release Candidate which was extremely successfull for a RC version. And finally Microsoft released Internet Explorer 8. For further information and to download you can visit https://www.microsoft.com/windows/internet-explorer/default.aspx .
News
Comments(0)

19.02.2009
Pinging With .Net

You can easily ping an address with your .Net applications via a class came by .Net 2.0. I am sharing the code snippet with you which can be used for discovering whether a website is down or not.

C#

            System.Net.NetworkInformation.Ping png = new System.Net.NetworkInformation.Ping();
             try
 
            {
                 PingReply rply = png.Send("www.tameroz.com");
                 Console.Write(rply.RoundtripTime.ToString());
                 Console.ReadLine();
             }
             catch (Exception)
             {
                 Console.Write("Ping Error");
                 Console.ReadLine();
 
            }

 

VB.Net

 

        Dim png As New System.Net.NetworkInformation.Ping()
        Try
            Dim rply As PingReply = png.Send("www.tameroz.com")
            Console.Write(rply.RoundtripTime.ToString())
            Console.ReadLine()
        Catch generatedExceptionName As Exception
            Console.Write("Ping Error")
            Console.ReadLine()
        End Try

Clues,Codes
Comments(0)

14.02.2009
Internet Explorer 8 Accelerator

As you know accelerator is one of the most exciting features in Internet Explorer 8. I developed an accelerator for my site. You can add accelerator to Internet Explorer 8 by clicking here to easily serch content of my site.

Also you can find the code of this accelerator below.

<?xml version="1.0" encoding="UTF-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
    <homepageUrl>http://www.tameroz.com/</homepageUrl>
    <display>   
        <name>tameroz.com ara</name>
    </display>
    <activity category="define">
        <activityAction context="selection" >
            <preview action="http://www.tameroz.com/searchResultsPane.aspx" accept-charset="iso-8859-9">
                <parameter name="Search" value="{selection}" />
                <parameter name="Exact" value="false" />
                <parameter name="Preview" value="true" />
                <parameter name="Language" value="0" />
            </preview>
            <execute action="http://www.tameroz.com/searchResultsPane.aspx" accept-charset="iso-8859-9">
  <parameter name="Search" value="{selection}" type="text" />
                <parameter name="Exact" value="false" type="text" />
                <parameter name="Preview" value="false" />
                <parameter name="Language" value="0" type="text" />
            </execute>
        </activityAction>
    </activity>
</openServiceDescription>

Codes,News
Comments(0)

06.02.2009
BDC Meta Man
MOSS 2007 comes with a great feature: Business Data Catalog. We can get any data from a database or a web service by generating our Business Data Catalog and showing it on a business data list web part. It's a great new feature but in order to be able to achieve this, we need to generate a file called 'Application Definition File' and upload it to Sharepoint. Generating this file can be boring and waste of time. But luckily, there is great tool available on the market that generates this file for you called BDC Meta Man. I have been using it for a while for my business data list web parts and it has helped me save a great amount of time while generating application definition files. Business data catalog is a very cool feature of Sharepoint and BDC Meta Man is the best tool on the market that will help you with your business data catalog lists. You can get more information about BDC Meta Man and download a free developer version at http://www.lightningtools.com/bdc-meta-man/default.aspx
News
Comments(3)

04.02.2009
Internet Explorer 8.0 RC1

As you know Microsoft has released Internet Explorer 8.0 RC1 in past few days. However I was not able to share the release of IE8 RC1 with you on my blog I started using IE8 RC1 right away. The main purpose of writing this entry is to share opinions and experiences of using IE8 RC1 with you.

As a user who also used Beta2 version of Internet Explorer 8 I can say that RC1 is more stable and while using RC1 i haven't had any problems like using Beta 2. I can nearly say that RC1 has never crashed since I started to use it. The only problem is there are some design problems related to css or images while rendering some sites. But you can easily deal with this problem by using Compability View option.

For people who want to have more information about RC1 may visit http://www.microsoft.com/windows/internet-explorer/beta/default.aspx

News
Comments(0)

24.12.2008
What Happened To Open Table in SQL Server 2008 Management Studio?
When you start to use Sql Server Management Studio 2008 maybe the first change you'll realize is Select Top 1000 Rows and Edit Top 200 Rows commands instead of Open Table command in 2005. If it is hard for you to leave old habits or you want to change 200 and 1000 parametric you can change these parameters in Management Studio. The only thing you should do is to open Options Window under Tools menu then on the left select Commands node under Sql Server Object explorer node. When Commands is selected you can change the functionality of these commands by changing related values. Also you can make these commands work for entire table by setting values to 0.
Clues
Comments(8)

11.11.2008
Encrypting The Web.Config

When developing web applications it is necessary to use web.config file. However normally iis is not publishing config files there can be some situations that needs higher security of web.config file.

I'd like to talk about how to encrypt the content of web.config file in this kind of situation.

First you must open Visual Studio Command Prompt or browse to directory C:\Windows\Microsoft.NET\Framework\V.2.0.50727 from Windows Command Prompt. To encrypt web.config we will use aspnet_regiis command.

Now lets look at how to use this command.

aspnet_regiis.exe -pef "Section To Encrypt In Web.Config" "Psyical path of web.config file" - prov "DataProtectionConfigurationProvider"

For example :

aspnet_regiis.exe -pef "connectionStrings" "c:\MyWebApplication" - prov "DataProtectionConfigurationProvider"

After executing this command you will see the section you described as encrypted. But your application will not have any problems while accessing to values in web.config.
Another important point is that the web.config is encrypted at machine level. That means that if you move to application to another computer, it will not work because of the machine keys.

If you want to decrypt a web.config file using -pdf parameter will be enough.

Clues,Codes
Comments(0)

22.09.2008
Summary Of Last 2 Months


I was not able to write entries to my blog for about 2 months. Lots of things happened that i would like to share with you. I'll try to mention about most important ones in this entry.

07.08.2008
A long expected Sql Server 2008 has been released. To learn what's new in Sql 2008 you can visit http://msdn.microsoft.com/en-us/library/bb500435(SQL.100).aspx.
However in the same announcement it says that if you want to work on Sql Server 2008 with Visual Studio 2008 you'll have to install VS2008 sp1.

11.08.2008
Visual Studio 2008 Sp1 And .Net Framework 3.5 Sp1 has been released. You can download via links below.

.Net Framework 3.5 Service Pack 1
http://www.microsoft.com/downloads/details.aspx?FamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en

Visual Studio 2008 Service Pack 1
http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en

27.09.2008
Internet Explorer 8.0 Beta 2 has been released. For further information you can visit http://www.microsoft.com/windows/internet-explorer/beta/worldwide-sites.aspx.

News
Comments(0)

05.08.2008
Most Valuable Practices On The Way To Solution

This title is the translation to English of a book that Turkish MVPs wrote in Turkish. The main subject of the book is sharing the knowledge and experience that MVPs have had during business life. The book has a different style and contains very valuable information that is worth reading. I wrote three chapters named Customer In Software Projects, Tips For Software Project Management and High Performance and Code Optimization. If you live in Turkey you can get the book from all bookstores. If you are outside of Turkey, I am planning to publish the sections I wrote in English at my blog, but it may take some time. You can contact me for any opinion or suggestion about the book.

Clues,News
Comments(0)

23.06.2008
Yazgelistir - CodeSnippets And Open Source Projects
Turkey's Developer Platform Yazgelistir.com has opened two new categories. These categories are Code Snippets and OpenSource Projects. From now on the users will not only read the topics that they intrested, bur also wil have the chance to download the code of an application that they are intrested in. Since the software industry is also based on practical knowledge and experience as teorical knowledge, this is an excellent improvement.
Codes,News,Open Source
Comments(0)

05.06.2008
Announcment From Microsoft: SharePoint Developer Introduction for .NET Developers launched

The new material is designed to help .NET Developers to learn the top ten artifacts in SharePoint that are interesting to them. We’ve created a variety of materials with different learning styles to make getting started with these artifacts easy and it’s all based on the Visual Studio extensions for SharePoint – planned to release v1.2 for Visual Studio 2008 this week also (watch for their announce).

The Top Ten SharePoint Artifacts of interest to .NET Developers being promoted
• Web Parts
• Data Lists
• Event Handlers
• Workflows
• Silverlight Web Parts
• Page Navigation
• Page Branding
• Web Services
• Content Types
• User Management

At the site (which is hosted on microsoft.com) we have:
• An Introductory Whitepaper
• Benefits of SharePoint for Developers
• A Small Public VPC
• Hosted MSDN Virtual Labs in C# and VB.NET
• Video Interview with SharePoint MVPs
• Screencasts
• Web Casts with SharePoint MVPs (incredible 1705 live attendees in just the first four WebCasts)
• Quickstarts
• Labcasts
• Presentation Download
• Hands on Labs Download
• Additional Resource Links

The site encourages developers who use the content to also take a next step and go on Instructor Led Training, Get Certified, and Download an evaluation copy of Microsoft Office SharePoint Server.

http://MSSharePointDeveloper.com

News
Comments(0)

04.06.2008
Internet Explorer 8 Beta 2 Coming in August
It has been announced at Internet Explorer Weblog that after Beta 1 which realised in March, Beta 2 will be realised in August. Also the entry pays attention to the 2 million download of Beta 1 and very useful user feedbacks on Beta 1. Group Program Manager Tony Chor tells that they are expecting more feedbacks on Beta 2. Maybe the most exciting point for us is that we will be able to download and use the Beta 2 in Turkish. For further information and the full text of entry you can visit http://blogs.msdn.com/ie/archive/2008/06/03/ie8-beta-2-coming-in-august.aspx
News
Comments(0)

10.05.2008
T.C. Identity Number correctness validation

There is a hash algorithm which makes us able to validate T.C. Identity Number that we take as an input in our projects. You can find the method that checks this hash below.

        private bool ValidateNumber(string parNumber)

        {

            for (int i = 0; i < parNumber.Length; i++)

            {

                if (!(char.IsNumber(parNumber[i]))) return false;

            }

 

            return true;

        }

        public void ValidateTCIdentityNumber(string TCIdentityNumber)

        {

            if (ValidateNumber(TCIdentityNumber.Trim()))

            {

                if (TCIdentityNumber.Trim().Length < 11)

                {

                    throw new Exception("T.C. Kimlik Numarası 11 karakterden az olamaz. Lütfen kontrol ediniz.");

                }

                else

                {

                    decimal identityNumberDecimal = Convert.ToDecimal(TCIdentityNumber.Trim());

                    decimal temp = Math.Floor(identityNumberDecimal / 100);

                    decimal temp1 = Math.Floor(identityNumberDecimal / 100);

                    int[] D = new int[10];

                    for (int n = 9; n >= 1; n--)

                    {

                        D[n] = (int)temp1 % 10;

                        temp1 = Math.Floor(temp1 / 10);

                    }

                    int oddSum = D[9] + D[7] + D[5] + D[3] + D[1];

                    int evenSum = D[8] + D[6] + D[4] + D[2];

                    int total = oddSum * 3 + evenSum;

                    int ChkDigit1 = (10 - (total % 10)) % 10;

                    oddSum = ChkDigit1 + D[8] + D[6] + D[4] + D[2];

                    evenSum = D[9] + D[7] + D[5] + D[3] + D[1];

 

                    total = oddSum * 3 + evenSum;

                    int ChkDigit2 = (10 - (total % 10)) % 10;

                    temp = (temp * 100) + (ChkDigit1 * 10) + ChkDigit2;

                    if (temp != identityNumberDecimal)

                    {

                        throw new Exception("T.C. Kimlik Numaranızı kontrol ediniz.");

                    }

                }

            }

            else

            {

                throw new Exception("T.C. Kimlik Numarası yalnızca rakamlardan oluşmalıdır. Lütfen kontrol ediniz.");

            }

        }

 

Clues,Codes
Comments(4)

22.04.2008
My USA Diary - New York
New York, my last stop in USA, is a similar city to Istanbul in many ways. City has serious traffic jams and chaotic traffic. As Vehicles change lanes frequently, pedesterians sometimes do not wait the green light to cross the road. Unlike other cities you can bargain with salespeople. However in order to get rid of this chaos only thing you should do is to take a step into the Central Park. You feel as if you were out of city center at this huge park that people can run, cycle, sit on grass, do boating at lake. New York is really a huge city. It would be nice to join a Sight Seeing Tour on a Double Decker bus. These tours are continue in daytime and you can hop out at a stop, walk around and after hop in again. Even at night, thanks to the  the light of lcd's at Times Square, you can walk as if it's daytime. While Sight Seeing tour you will see a lot of beautiful buildings. Especially Statue Of Liberty, Empire States Building, Chrysler Building, Brooklyn Bridge will impress you.
News
Comments(1)

20.04.2008
My USA Diary - Seattle

I spent 4 days in Seattle while attending Microsoft Mvp Global Summit 2008. Seattle is known as a technological city beacuse of the settlement of Microsoft and the Boeing Factory. However Seattle has a quiet and peaceful life style. Another intesting fact about Seattle is that the weather is cloudy and dark 75% of a year. It is also possible to see marines and houses  in the middle of nature that impress you. Even not as high as in Chicago you have the chance to see the city from the top by visiting Space Needle. If you have leisure time, you can join Underground Tour to visit Old Seattle or plan a trip to Seattle Aquarium to view sea life closer and see surprisingly cute animals. If you are enthusiastic about technology attending a tour to Boeing Factory is a great opportunity that you should not miss.

News
Comments(0)

15.04.2008
My USA Diary - Chicago
I had the chance to spend 2 days in Chicago just before attending the Microsoft MVP Global Summit which was held in Seattle. Most of you know that Chicago's most known nickname is The Windy City. That is a perfect nickname for Chicago because it was really so windy and so cold. To decrease the effect of cold you can get an extreme hot drink from Starbucks that you can see every five minutes on your walkpath. Also in the downtown Chicago wherever you look you can see a skyscraper. Skyscrapers were so high that the gps device was not working correctly. To feel the height of skyscrapers you can visit the Hancock Observatory at the 94th floor of John Hancock Center which totally has 100 floors. At this observatory while feeling as if you were in a plane you can see 130km(80 mile) away and 4 different states. When you see Lake Michigan, you can easily be impressed with the size of the lake, the view of of the running and cycling tracks and the beauty of the parks. You can also visit the Buckingam Fountain which was seen in the trailer of Married With Children and for shopping you can find lots of shopping malls and stores on Michigan Avenue.
News
Comments(0)

11.04.2008
My Longest Day
The title of my entry may remind an episode of Scrubs, however 11 April 2008 was the longest day I’ve ever lived. I had a flight from Istanbul to Chicago on 11st April 2008 at 10:00. After a 12 hours flight, it was exactly 14:00 on the same day when I arrived Chicago. Consequently, I had a 32 hours of day instead of 24 on 11 April 2008. It was a different experience I had in my life. But I’ll be living my shortest day on the way back home.
News,Funny
Comments(0)

02.04.2008
ISO approves Open Document Format as standard

Today ISO have approved ISO/IEC DIS 29500, Office Open XML File Formats as an International Standard by support of 86% of 87 countries during approval process. To gain more information about Open XMl you can visit the sites below.

http://openxmldeveloper.org/default.aspx
http://www.openxmlcommunity.org/

Also you can reach ECMA's declaration from
http://www.ecma-international.org/news/TC45_current_work/ISO_and_IEC_approve_Office_Open_XML.htm

and Microsoft's press announcement from
http://www.microsoft.com/presspass/press/2008/apr08/04-01OpenXMLVotePR.mspx

News
Comments(0)

03.03.2008
.Net Programmer vs SQL Programmer

We work as software developers in software development industry. However are we actually a .Net Programmer or a SQL Programmer?
You can easily decide what kind of a programmer you are after considering the differences between these two concepts.

*While .Net Programmer uses the objects and methods of .Net Framework to achive the functionality requirement of application, SQL Programmer uses the methods of Sql Server.
*While .Net Programmer manages the business rules by the decision mechanisms and loops in .Net Framework, SQL programmer prefers to use decision mechanisms and loops in SQL server such as cursors.
*While .Net Programmer manages the transactions in business layer, SQL Programmer manages transactions in Sql Server.
*While .Net programmer designs the application compatible and can be easily integrated to any database system, SQL Programmer uses commands and functions which are specific to SQL Server.
*While .Net Programmer uses stored procedures or queries which are short, easy to read and written for a specific purpose, SQL programmer uses complex queries, stored procedures or triggers.

Clues,News
Comments(0)

22.02.2008
Windows Server 2008

Last Monday I installed Windows Server 2008 Operating System. My first impressions are that Windows Server 2008 is faster than Windows Server 2003 and looks more stable. Although I had some compability issues like the ones in Windows Vista, I solved every issue by searching the internet. Besides, in order to use the interface in Vista Themes and run some programs like Windows Media Player, you should install Desktop Experience Feature. I've installed Vs2003, Vs2005, Vs2008, SQL2000, SQL2005 and they all work fine. But I observed that Visual Studio 2008 and Sql Server 2005 are the most compatible versions that work with Windows Server 2008. I'd like to share the way how I installed these programs.

1)Installation Of IIS 7.0
2)Installation Of Microsoft Visual Studio 2005
3)Installation Of Microsoft Visual Studio 2005 SP1
4)Installation Of Microsoft SQL Server 2005
5)Installation Of Microsoft SQL Server 2005 SP2
6)Installation Of Microsoft Visual Studio 2005
7)Installation Of .Net Framework 1.1 SP1
8)Configuring the IIS Server to run ASP.Net 1.1 applications (http://www.iis.net/articles/view.aspx/IIS7/Hosting-Web-Applications/ASP-NET/How-to-Run-ASP-NET-v1-1-on-IIS7?Page=1)
9)Installation Of Microsoft SQL Server 2000
10)Installation Of Microsoft SQL Server 2000 SP4
11)Installation Of Microsoft Visual Studio 2008

News
Comments(0)

22.01.2008
Windows Live Api Poster
As we know Windows Live opened API's to users. There is a poster at the link below which summarizes what could be done with those API's.
http://dev.live.com/img/wlp-mix.pdf
News
Comments(0)

20.01.2008
ExtendedDataTable @ Codeplex

I've enhanced some properties and uploaded the ExtendedDataTable component which I previously wrote an article about. You can view and download it with the source code.
http://www.codeplex.com/ExtendedDataTable

Codes,Open Source
Comments(0)

17.01.2008
Wireless Signal Strength
I was researching how to get wireless signal strength with .Net. I'd like to share the resource i found.
http://www.microsoft.com/technet/scriptcenter/resources/qanda/mar07/hey0322.mspx

And also you can write the WMI Query in .Net as shown below.

ManagementObjectSearcher searcher = null;
searcher = new ManagementObjectSearcher(@"root\WMI", "select Ndis80211ReceivedSignalStrength from MSNdis_80211_ReceivedSignalStrength");
ManagementObjectCollection adapterObjects = searcher.Get();
foreach (ManagementObject mo in adapterObjects)
{
string s = mo["Ndis80211ReceivedSignalStrength"].ToString();
}
Codes
Comments(0)

15.01.2008
Passing Objects Between Pages
In order to pass objects within pages we commonly add objects to session at first page, and we remove objects from session just after reading values at redirected page. It is more manageable to use Context.Item for this purpose since it relases objects automaticly. In order to make this technique redirection should be made by Server.Transfer method.
Clues,Codes
Comments(0)

13.01.2008
Chameleon At Codeplex
As most of you know i develped an application named chameleon which allows users to manage their network settings quickly via setting profiles. From now on i will be publishing my project at Codeplex in order to allow users to track changes and view source code. You can visit the project page at http://www.codeplex.com/chameleoncsm 
News,Open Source
Comments(0)

12.01.2008
location.replace
We commonly set the new page address to window.location.href property to redirect a page at client side via javascript. window.location.replace is a function that provides same functionality however it also loads the new url over current history entry. Redirection with this function does not allow users navigate to the previous URL by using browser's Back button. And finally window.location.relpace('newPage.html') is the syntax of this function.
Clues,Codes
Comments(0)

10.01.2008
Dynamic Top N Query
We use TOP N sql command to show top results of a sql query. However we can't use N as dynamic or parametric in TOP N command like getting value of N from a parameter table or from a parameter of a stored procedure. We can use SET ROWCOUNT command for this purpose. Syntax of this command is SET ROWCOUNT N where n is the count of rows to return where 0 means all rows will be returned. You have to set set rowcount to 0 after executing a command in order not to following queries return top n records.

DECLARE @rowCount int
SET
@rowCount = (SELECT ParameterValue FROM Parameters WHERE ParameterId=12)
SET ROWCOUNT @rowCount
SELECT * FROM MyTable ORDER BY MyColumn
SET ROWCOUNT 0

GO

CREATE PROC MyQuery
@rowCount
int
AS
SET
ROWCOUNT @rowCount
SELECT * FROM MyTable ORDER BY MyColumn
SET ROWCOUNT 0
GO

Clues,Codes
Comments(0)

09.01.2008
ConnectionTimeout / CommandTimeout
Although we establish connection to database successfully sometimes we get timeout error while executing commands in our applications. Increasing the value of ConnectionTimeout property is not a solution for this case. ConnectionTimeout property represents number of seconds to wait for a connection to open. However the CommandTimeout property of Command object represents the maximum wait time in seconds for a command to return value. The default value of CommandTimeout property is 30 and setting this property to value 0 means there is no limit in wait time.
Clues,Codes
Comments(0)

08.01.2008
Math.Round

Math.Round function is commonly used in many applications. However this function may not operate as expected and return expected result in some situations. This is a crutial issue to prevent wrong calculations in our applications.

Math.Round(1.44, 1); //Expected: 1.4 Result 1.4
Math.Round(1.45, 1); //Expected: 1.5 Result 1.4
Math.Round(1.46, 1); //Expected: 1.5 Result 1.5

Math.Round(1.54, 1); //Expected: 1.5 Result 1.5
Math.Round(1.55, 1); //Expected: 1.6 Result 1.6
Math.Round(1.56, 1); //Expected: 1.6 Result 1.6

As seen above when we rounded value of 1,45 to one digit the result was 1,4 instead of 1,5. However same problem was not seen while rounding the value of 1,55 to one digit. The reason of this result is that .Net Framework uses bankers rounding as default rounding system. In bankers rounding system if the value of the digits in d to the right of the decimals position is halfway between the digit in position decimals, that digit is rounded up if it is odd, or left unchanged if it is even. If the precision of d is less than decimals, d is returned unchanged. 

private decimal MyRound(decimal number, int decimals)
{
return decimal.Round(number, decimals, MidpointRounding.AwayFromZero);
}

As a solution of this problem we can use Decimal.Round(Decimal, Int32, MidpointRounding) overload instead of Math.Round function. MidpointRounding enum has AwayFromZero and ToEven options. While ToEven acts as default behaviour in .Net Framework AwayFromZero option acts as we commonly use.

Clues,Codes
Comments(0)

07.11.2007
New site, new design
I've been sharing knowledge, things that bother me and funny stuff with you for two years in my blog. About two months ago i decided to share more stuff about myself with you. Işıl also had the same thoughts with me. We discussed about some new features that we could add. We needed something that covered our expectations, could be easily extended and should contain the newest technologies. After our searches we could not find what we needed. At last we found out that as a best solution it would be better to develop our own site. In this new version of my site, you will be able to find everything about me from articles to picture albums. It was clear that my site could not be like this if it weren't for Erbuğ's design and Işıl's support. Thanks again. 
News
Comments(0)

29.04.2006
Exceptional Exception

Mesaj : The operation completed successfully
Detail : System.ComponentModel.Win32Exception: The operation completed successfully at DevExpress.Utils.Drawing.XtraBufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits) at DevExpress.Utils.Drawing.XtraBufferedGraphicsContext.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) at DevExpress.Utils.Drawing.XtraBufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle) at DevExpress.Utils.Drawing.XtraBufferedGraphicsContext.AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle) at DevExpress.Utils.Drawing.XtraBufferedGraphicsContext.Allocate(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle) at DevExpress.Utils.Drawing.XtraBufferedGraphicsContext.Allocate(Graphics targetGraphics, Rectangle targetRectangle) at DevExpress.XtraTabbedMdi.XtraTabbedMdiManager.DrawNC(DXPaintEventArgs e) at DevExpress.XtraTabbedMdi.XtraTabbedMdiManager.DrawNC() at DevExpress.XtraTabbedMdi.XtraTabbedMdiManager.UpdateNCIfNeeded(Object sender, EventArgs e) at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
Target Site : IntPtr CreateCompatibleDIB(IntPtr, IntPtr, Int32, Int32, IntPtr ByRef)
Source : DevExpress.Utils3

Funny
Comments(0)

02.04.2006
Top Mistakes In Software Projects

 

  1. People Related Mistakes
    • Undetermined motivation
    • Weak personnel
    • Uncontrolled problem employees
    • Heroics
    • Adding people to a late project
    • Noisy, crowded offices
    • Friction between developers and customers
    • Unrealistic expectations
    • Lack of effective project sponsorship
    • Lack of stakeholder buy-in
    • Lack of user input
    • Politics placed over substance
    • Wishful thinking
  2. Process Related Mistakes
    • Overly optimistic schedules
    • Insufficient risk management
    • Contractor failure
    • Insufficient planning
    • Abandonment of planning under pressure
    • Wasted time during the fuzzy front end
    • Shortchanged upstream activities
    • Inadequate design
    • Shortchanged quality assurance
    • Insufficient management controls
    • Premature or overly frequent convergence
    • Omitting necessary tasks from estimates
    • Planning to catch up later
    • Code like hell programming
  3. Product Related Mistakes
    • Requirements gold-plating
    • Feature creep
    • Developer gold-plating
    • Push-me, pull-me negotiation
    • Research-oriented development
  4. Technology Related Mistakes
    • Silver-bullet syndrome
    • Overestimated savings from new tools or methods
    • Switching tools in the middle of a project
    • Lack of automated source-code control
Clues,News
Comments(0)

Photos

While smoking sisha in Egypt
Show All
Me in MSDN Forums
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Contributed a proposed answer to the question Close some open windows by name in the Visual C# General forum
-   Replied to the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Replied to the question Close some open windows by name in the Visual C# General forum
-   Contributed a helpful post (total votes:2) to the forums thread Array of events? in the Visual C# General forum
-   Answered the question Displaying random images from resources in the project in the Visual C# Language forum
-   Contributed a helpful post (total votes:1) to the forums thread sorted dictionary (Can i get key from value) in the Visual C# General forum
-   Contributed a proposed answer to the question Non-existing Argument in format string in the Visual C# General forum
Entries
News
Articles