Monthly Archives: April 2015

jquery class selector not working because ill formatted code

If your jQuery class selector [$(‘.myclass’)] is not working, possible culprits are ill formatted code.

  1. The element has same class and ID name. They should be different.
  2. The element are nested wrong. For example <div class=”myclass”> <div class=”myclass”></div>
  3. The element is has class attribute assigned twice. <div class=”form-control” id=”div_id” class=”myclass”></div>

how to transfer domain

These instruction are for justhost but I found them very useful as general.I transferred my domain www.mytimesheet.us to ipage within 2 hours! Hope this will help somebody else too.

 

These instructions are for if you still have cPanel access. If you do not have cPanel access please visit http://www.Justhost.com/dm and you can log in with your old cPanel user name and password to administer your domains, then follow along starting at step 5.

  1. Login to the cPanel
  2. Find the Domains section
  3. Click the Domain Manager icon

 

domain transfer

 

  1. This should display the Hosting tab of the Domain Manager

 

  1. Click on the Domain Manager tab
  2. This should display the domain names that are registered through our registrar, Fast Domain
  3. Put a check mark next to the domain to be transferred
  4. Over on the right, select the Privacy tab
  5. Select the button that says “Pause Domain Privacy”. If privacy is already disabled, then skip this step.
  6. Next, select the Contacts page

 

  1. Fill out the information for the Registrant, Admin, and Billing sections. This information can be the same or different for all three
  2. If you already know the hosting company you will be using to host your domain with and they have given you the name servers to use, please click on the Name Servers tab

 

  1. Select Use Custom Nameservers
  2. Enter in the name servers which the new hosting company has given you (I had to do this step 3 times because the name servers were not appearing after saving. Better way is to remove existing ones and then add new ones).
  3. Next, select the Transfer EPP button. You will need to copy this code, so you can later enter it into a place when transferring it to the new registrar
  4. Select the Lock tab
  5. Select the button which says Click here to UNLOCK your domain name

 

  1. Finally, allow a percentage of standard propagation time to allow this information to be visible by the new registrar
  2. Contact the new registrar once this contact information you updated in the Contacts tab is visible in a place such as http://whois.net

 

How to Add SQL Server Connection in Crystal Report

Crystal Reports connection String SQL Server

I worked in Crystal Report for quite a while but even I got confused how to add SQL Connection when I installed Crystal Reports on a new sytem. Basically there were no existing connections under any of the options and it was not every intuitive how to add a connection string.

1. Simply double click OLE DB (ADO)

2. This will popup a dialog, go to the very bottom in the list and choose SQL Server Native Client.

That’s it! Check the checkbox for integrated security and select  your server. You should be all set.

2015-04-25 12_14_30-OLE DB (ADO)

 

Remove white spaces using regular expression [\t ]+

The correct expression to remove white spaces using regular expression is

[\t ]+ — Make sure  you select Regular Expression in Search Criteria

I used the following which id not quite work [\t ]*. The problem with this one is it match 0 or more. So it basically matche every single character rather than matches spaces only. Hope this helps somebody.

 

It is also a good practice, instead of complete removing white spaces, replace it by a single space as your code might not work if you remove all spaces. The search critera also remove tab characters.

Some variotions

^[\t ]+ =  Will match white spaces that are in the beginning of each line

[\t ]+$ = will match white spaces that are at the end of each line

 

IMPORTANT UPDATE! You should update your Media Player Immediately

save nnet - seaorchu-newwutab

If your browser (esp Firefox) randomly redirects to some strange url and display this message “IMPORTANT UPDATE! You should update your Media Player Immediately”, it is likely either the website your accessing is not safe or you have a virus on your system that does the redirect. The redirect does not takes place to the same site or URL, it always goes to a different url.

I have installed a number of anti viruses and anti malware software but they could not help, although some were better than others. Malewarebytetes that I previously relied on heaveily failed this time and has not been upto the mark. Well turns out, you have to remove these virus manually!! Yes manually!

You literally have to hunt for these software on your system. The best way is

  1. Go to control panel and Uninstall software. Click the installed date column header so everything is sorted by installed date, the latest being on top.
  2. Go throgh the entire list and look for possible culprits. The programs usually would have weird names. In my case the two culprits were “sAve nnet” and “SeaorCChu-Neewutab”.

As soon as I clicked on these to uninstall, a popup came up saying I do have proper permission (which I should have as I am the administrator on my system). My antivirus 360 Total Security, poped up the dialog alerting my about the virus. In the second attempt they were removed and hopefully my system will be ok.

2015_04_18_12_57_21_

 

Attendance Summary Report on LIMTON TIS

Here is quick SQL query that generates employee’s monthly attendance report on Limton TIS. Getting Department and Designation names was a bit tricky as they are not named as such. They are placed inside HRTCompanyLogicDetail table.

This report does contain on query from my own database. Basically were are combining attendance report from TIS and our own attendance system.

convert parameter to int in Stimulsoft mrt

You can use standard C# function in Stimulsoft .MRT report although I have not seen them in documents as such. For example if you want to add two parameter values in Stimulsoft MRT Report, you will have to convert them to integer first. By default they are of “Object” type.

In the following example, I am converting @Month object into an integer. It must first be converted to string using ToString() and then use Int32.Parse() function to convert it.

This variable can then be added to another variable (concatenation) as

Int32.Parse(DataSource1.Parameters[“@num1”].ParameterValue.ToString()) + Int32.Parse(DataSource1.Parameters[“@numb”].ParameterValue.ToString())

Error occured while loading attendance from database – Hanvon

Error loading attendance Hanvon
In Hanvon FaceID Manager, If you go to “Transaction View” and you select “from date” to “to date” when loading data it might spit out this error

Error occured while loading attendance from database

If you fire up SQL Server management studio and look at the logs (under Maintenance > SQL Server Log and double clicking the current log and then selecting “Windows NT” checkbox at left), you will see this error

Stack Trace: at DataAccess.clsDataAccessBaseForMSAccess.ExecuteDataTable()
at DataAccess.HanvonFaceIDPolling.clsPolling.GetAttendanceRecords(String rstrDateTimeFrom, String rstrDateTimeTo)
at HanvonFaceIDManager.frmListDotDatGenerator.LoadDataFromDB(enDateRange miDateRange)

The error message is clearly about ill formatted date. However my date format seems to be in standard format. So what else can be wrong? It is likely related to the corruption of data as I have explain in error while logging in to Hanvor FaceID.

To fix, open the culprit file in Microsoft Access, your .dbm file where Hanvor FACEID stores all its data ( Can be found by going to setting page in Hanvor FacedID). Click Menu > open and the double lick the very first table Attendance. Find out an entry (an invalid date) that might give you this problem. In my case it was the very first record where data was like this

AttendanceID MachineID PinNumber AttendanceDateTime Status MachineName AttendanceDate AttendanceTime AttendancePhoto
################ ################ ################ ################ ################ ################

Right click on the row and delete this record. Now fetch date based data and it should work!