Posts belonging to Category Programming

Socket Programming with C#

In this article, we will learn the basics of socket programming using C#. Secondly, we will create a small sample consisting of a server and a client which will communicate using TCP protocols. You can download the solution package for this example at the bottom of the post. About TCP/IP There are two types of […]

Extract string from string using C#

The code spinet below allows you to extract any substring from a bigger string. The usage is very easy, just enter the “start string” and the “end string”. The result will be any string in between these two tags. The function also has 2 additional arguments where you can indicate the position of the tags […]

Get the unix timestamp in C#

Unix timestamp is the count of total seconds since 1970-01-01 to the current time. This number does not depend on the location where you’re executing the code. So, no worries about the timezone. It’s very easy to get Unix timestamp from C#. You can use DateTime.UtcNow and subtracting for the Epoch time of 1970-01-01. 1 […]

C# – Call methods by String names – a simple .net script parser

.Net library System.Reflection allows you to call any methods by its name as string. You can apply this method when you want to parse texts from a script file, such as GiveMeValue(100). “GiveMeValue(100)” is a string, and you want to call a real GiveMeValue(int input) method inside your code. With the help of System.Reflection, you […]

Delphi HttpWebRequest with custom fields

In previous post, I demonstrated how to program a small utility to crawl a website content (HttpWebRequest with GET method in Delphi .net). In this tutorial, I will show you an advanced step to add custom HTTP fields to HttpWebRequest header. One common field that you will need to add when working with AJAX application […]

HttpWebRequest with GET method in Delphi .net

Why HttpWebRequest/HttpWebResponse? This tutorial is to show you how to write an application in Delphi using HttpWebRequest to submit and pull data from a web server¬†programmatic-ally. If you are looking for a method to make a web bot or http bot, this topic is for you too. Delphi 2009 .net supports functions/API from .net frameworks. […]

Install and Create MySQL ODBC Connector on Windows 7 64 bit

Why install ODBC Connector for MySQL? ODBC connector works as a standard gateway for programming languages, applications (such as Excel, Access, or OpenOffice) to communicate with database server with ease. The database behind ODBC Connector could be MySQL, Microsoft SQL, PostgreSQL, Microsoft Access, or FileMaker, and more. You do not have to input the direct […]