Posted by okutbay on 28.07.2010 17:14 | Yorumlar (0)

CD-ROM: Consumer Device, Rendered Obsolete in Months
PCMCIA: People Can’t Memorize Computer Industry Acronyms
ISDN: It Still Does Nothing
SCSI: System Can’t See It
MIPS: Meaningless Indication of Processor Speed
DOS: Defunct Operating System
WINDOWS: Will Install Needless Data On Whole System
OS/2: Obsolete Soon, Too
PnP: Plug and Pray
APPLE: Arrogance Produces Profit-Losing Entity
IBM: I Blame Microsoft
MICROSOFT: Most Intelligent Customers Realize Our Software Only Fools Teenagers
COBOL: Completely Obsolete Business Oriented Language
LISP: Lots of Insipid and Stupid Parentheses
MACINTOSH: Most Applications Crash; If Not, The Operating System Hangs
AAAAA: American Association Against Acronym Abuse.
WYSIWYMGIYRRLAAGW: What You See Is What You Might Get If You’re Really Really Lucky And All Goes Well.

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Posted by okutbay on 15.07.2010 16:41 | Yorumlar (0)

image

Geçen gün iş yerinde yanıt vermeyen bi programı kapatmak için Task Manager a girdim. Ama nedense tabler ve menüler gözükmüyordu. Acaba bilmediğim bir tehlikeli yazılım mı bulaşmıştı bilgisayara diyip internette aramaya koyuldum.

Arama sonucunda bunun Tiny Footprint adı verilen bir çalışma modu olduğunu ve boş bölümde yapılan bir çift tıklama sonucu bu moda geçtiğini söylüyordu. Tekrar geri getirmek için aynı boşluğa çift tıklama yapmak gerekiyordu.

image

Sorun şu ki oraya çift tıklayarak kaybetmedim ben bunları. Yani kaybetsem bile tekrar geri getiremeyecek kadar saf bir bilgisayar kullanıcısı değilim en azından. Yani tablar ve menüler geri geldi ama hala nasıl kaybolduğu konusu bir muamma...

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , | Categories: Web Uygulaması Posted by okutbay on 13.05.2010 12:02 | Yorumlar (0)

You can replace all commas with this little script by the aid of regular expressions

<script>
    var s = '133,123,123.00';
    var replacedText = s.replace(/,/g,'_');
    document.write(replacedText);
</script>

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , , , , , , | Categories: Genel Posted by okutbay on 30.03.2010 10:55 | Yorumlar (5)

Bazen iki tarihin arasında geçen süreyi bulmanız gerekir. Bu kişinin şu anki yaşı olabileceği gibi bir işçinin o gün çalıştığı süre de olabilir. C# bize bu konuda yardımcı olmak için TimeSpan tipini sunar. Bu tipi kullanarak iki tarih arasında geçen süreyi farklı şekillerde alabiliriz. Örneğin iki tarih arasında kaç saat olduğunu bulmak istiyorsak TotalHours özelliğini kullanabiliriz. Eğer iki tarih arasında geçen sürenin sadece saat kısmı bizi ilgilendiriyorsa Hours özelliğini kullanabiliriz.

    1 DateTime myStartTime = Convert.ToDateTime("30.03.2010 08:04:00");

    2 DateTime myEndTime = Convert.ToDateTime("30.03.2010 18:02:00");

    3 TimeSpan myWorkingTime = myEndTime - myStartTime;

    4 double myWorkingHours = myWorkingTime.TotalHours;

Bu işi uygulamanız içinde birden çok kullanacaksanız bir method haline getirmek faydalı olacaktır.

    1 public static double GetWorkingHours(DateTime startTime, DateTime endTime)

    2 {

    3     TimeSpan workingTime = endTime - startTime;

    4     double workingHours = workingTime.TotalHours;

    5     return workingHours;

    6 }

 

bu yeni metodu soyle kullanirsiniz.

    1 DateTime myStartTime = Convert.ToDateTime("30.03.2010 08:04:00");

    2 DateTime myEndTime = Convert.ToDateTime("30.03.2010 18:02:00");

    3 double myWorkingHours = GetWorkingHours(myStartTime, myEndTime);

 

Not:Methodun ve kodun aynı classta olduğu varsayılmıştır...

Kolay gelsin...

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Posted by okutbay on 30.03.2010 10:44 | Yorumlar (0)

"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another"

If you are getting this error probably you are trying to read an non existing column from your query.

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , | Categories: Genel, MCP, News Posted by okutbay on 19.03.2010 10:51 | Yorumlar (0)

Virtual Business Cards (VBCs) are now available as a new benefit for MCPs. Use VBCs to show off your expertise, knowledge, and achievements--creatively, securely, and interactively. Brand yourself and let everyone know what credentials you hold by using them on the Web or in your e-mail signature.

myVirtualCard_blurred

You can start to create your card from this url: http://www.mcpvirtualbusinesscard.com/

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , , | Categories: Windows Uygulaması Posted by okutbay on 03.03.2010 15:14 | Yorumlar (0)

You develop a windows service application and installed to your machine. When you try to start service you get this error.

image

Possible reason to this error is service name definitions.

Check the service name and service installer service name. Both must be the same. For instance this is from service class.

    1 private void InitializeComponent()

    2 {

    3     components = new System.ComponentModel.Container();

    4     this.ServiceName = "DataExporter";

    5 }

and this code is from service installer settings

    1 //

    2 // serviceInstallerDataExporter

    3 //

    4 this.serviceInstallerDataExporter.Description = "Exports Data for SPSS as CSV file";

    5 this.serviceInstallerDataExporter.DisplayName = "x Data Exporter";

    6 this.serviceInstallerDataExporter.ServiceName = "x Data Exporter";

    7 this.serviceInstallerDataExporter.StartType = System.ServiceProcess.ServiceStartMode.Automatic;

P.S.: If you have multiple service instances you must be more careful

Happy coding...

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , | Categories: Library, Tanıtım Posted by okutbay on 26.02.2010 16:07 | Yorumlar (0)

Here is an open source solution for C# PDF export that i want to share.

http://sourceforge.net/projects/itextsharp/

Happy coding...

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , | Categories: Programlama, Genel, Tanıtım Posted by okutbay on 26.02.2010 16:03 | Yorumlar (0)

There is an open source project to use with your projects. It's easy to use.

dotnetzip.codeplex.com

Let's zip a folder :)

    1 using (ZipFile zip = new ZipFile())

    2 {

    3     zip.AddDirectory("c:\somedirectory");

    4     zip.Comment = "This zip was created at " + System.DateTime.Now.ToString("G");

    5     zip.Save("nameofthezipfile.zip");

    6 }

Happy coding...

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , | Categories: Tip, Programlama, Genel Posted by okutbay on 26.02.2010 11:41 | Yorumlar (0)

You can always write comment to your codes. But comment itself can be outdated and misleads a developer. So writing self-documented codes must our first aim to make our code more maintainable.

In my opinion a big step to achieve self-documented code begins writing if clauses.

If a developer understands if clause, he/she understand purpose of the code block more easily.

But how can we write more readable if clause.

Very easy: Don't write logical comparisons into if clause.

    1 if ((preprocessedFailedEmails.Count > 0) || (failedEmails.Count > 0))

    2 {

    3     //some code

    4 }

Although this is a very simple if clause it's a bit hard to get what is happening there. Let's make it more readable.

    1 bool hasErrors = ((preprocessedFailedEmails.Count > 0) || (failedEmails.Count > 0));

    2 if (hasErrors)

    3 {

    4     //some code

    5 }

Happy coding...

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5