Posts published by Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.

How to read from file in C#

The ability to read from file gives our C# programs the ability to act on data given by other programs, which may be written in different programming languages.

Such a ability is also helpful in allowing humans to configure how our C# program will behave at runtime.

Since being able to read from file is so helpful in C#, I want to remember how I can do that with this post.

How to validate input fields as the user is filling up a form with jQuery

In order to get sensible data from users via an online form, we have to validate data that we receive from them . As much as possible, we will want the data validation process to minimize frustration to our users.

We could have perform the data validation on the input fields at the point when the form is submitted. However, a better way will be to perform data validation on the input fields as the user is filling up the form. The validation process can follow such a sequence:

  1. User clicks on the input field.
  2. User fills up the input field with data.
  3. User clicks away from the input field.
  4. Data validation occurs on the input field. If there are any errors, display the error message near to the input field. Else everything proceeds as usual.

Why my computer restarted automatically by itself while playing league of legends

Just when my brother is really to assist me in killing the enemy champion, my brother shouted: “the computer restarted itself again”. We were playing a game of the league of legends when that situation occurred. Until recently, the computer restart problem came back to haunt us just 10 months after we got a new graphics card. The temptation to replace the 3 year old DIY gaming machine with a newer one escalates with each automatic restart of the computer. However, my gut feeling told me that the problem could be solved.