|
January,2010 (3)
|
|
December,2009 (1)
|
|
November,2009 (3)
|
|
October,2009 (1)
|
|
September,2009 (1)
|
|
August,2009 (1)
|
|
July,2009 (4)
|
|
April,2009 (4)
|
|
March,2009 (1)
|
|
February,2009 (4)
|
|
December,2008 (1)
|
|
November,2008 (1)
|
|
September,2008 (1)
|
|
August,2008 (1)
|
|
June,2008 (3)
|
|
May,2008 (1)
|
|
April,2008 (5)
|
|
March,2008 (1)
|
|
February,2008 (1)
|
|
January,2008 (9)
|
|
November,2007 (1)
|
|
April,2006 (2)
|
|
Show All
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
|
|
|
.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)
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
Top Mistakes In Software Projects
|
|
- 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
- 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
- Product Related Mistakes
- Requirements gold-plating
- Feature creep
- Developer gold-plating
- Push-me, pull-me negotiation
- Research-oriented development
- 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)
|
|
|
|
|
|
|