Apache: Allow remote access to an alias

To allow others from access an alias directory on your apache server, so you can always login to something like phpmyadmin, or phpsysinfo from outside. You need to update the .conf file for the alias. the config file is located in your /alias/ folder. The most important thing is Required all granted, and Allow from […]

C#: Passing data to BackgroundWorker DoWork Event

Normally, you call the RunWorkerAsync() without an argument to start the background worker. Sometimes you might want to pass some data into the DoWork() function. All you have to do is simply do: RunWorkerAsync(some data) For example, the following code pass an array of string: string[] list = {"one", "two", "three"}; MyBackgroundWorker1.RunWorkerAsync(List); Then you have […]

ORACLE: Limit Returned records with rownum

The following query will get the latest entered_on date from the result table.   — This select will get the latest result entered_on date — to check after a refresh what’s the latest data — SELECT * FROM ( your_query_here ) WHERE ROWNUM <= N. select * from (select entered_on from result where trim(entered_on) is […]

Windows: Generate file checksum Hash easily

Windows has a build in command line tool called CertUtil, which allows you to generate a file checksum hash. For exmaple: CertUtil -hashfile [FileName] [Hash Algorithm] [Hash Algorithm] could be: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512 An example command would be: CertUtil -hashfile c:\myfile.txt SHA512. This command line will give you an output of […]