FaultException with WCF

One of the reasons why a connection to WCF services cannot be made due to security issue is due to time difference between the client and the server machine.

If you found this issue, synchronizing the time between the client and the server may resolve it.

Hibernate mapping for decimal scale is wrong

When mapping a SQL table to a model using Hibernate or NHibernate, if you configure the mapping like following

<property name=”MyDecCol” type=”Decimal” precision=”28″ scale=”15″>
<column name=”MyDecCol” sql-type=”decimal” not-null=”false” />
</property>

For some reason, Hibernate/NHibernate will treat the field as a decimal with scale = 5 (5 decimal digits on the right side of the decimal separator). So if you save a value to this column with more decimal digits, it will be truncated to only 5 decimal digits.

I’m not sure why, but if you move the attributes to the inner column element, Hibernate and NHibernate will map the values correctly.

<property name=”MyDecCol” type=”Decimal”>
<column name=”MyDecCol” sql-type=”decimal” not-null=”false” precision=”28″ scale=”15″ />
</property>

Cannot run Python application after installing using pip

I was trying to install qark, an android security program, through pip.

After installation, the readme say to run qark –help. However the system cannot find this command.

After trying python -m quark.py, python quark.py, etc with no result. I managed to solve by finding out that the Script folder of the Python installation contains the .exe file for qark, qark.exe.

Adding this folder to my PATH environment variable allows running this command in the command prompt.

This should be something to be mentioned in the readme at least.