Tuesday, April 17, 2012

Java Data Objects JDO with App engine



To bind data to Java Objects and store it in Google App Engine the following API can be used and recommended:


Objectify is a very simple and convenient interface to the App Engine Datastore that helps you avoid some of the complexities presented by JDO/JPA and the low-level Datastore.
Twig is a configurable object persistence interface that improves support for inheritance, polymorphism, and generic types. Like Objectify, Twig also helps you avoid complexities posed by JDO and the low-level Datastore.
Slim3 is a full-stack model-view-controller framework that you can use for a wide variety of App Engine functions, including (but not limited to) the Datastore.



Monday, April 16, 2012

"Access is denied." when you run "./RedistMaker.bat y 32 y"

When you run
$ ./RedistMaker.bat y 32 y

You may see "Access is denied" in the output as follows:
*******************************************
*** Running the Redist OpenNI script... ***
*******************************************
Access is denied.

This is due to the Windows is unable to run  Python program Redist_OpenNi.py. You solve it by 

Running Play framwork in Cygwin om windows


If you run Play in command line of Cygwin om Windows and get the folowing:

$ play
Error: Unable to access jarfile /cygdrive/e/tools/play/framework/sbt/sbt-launch.jar


This is due to the fact that play.bat is a Windows bat. This works if you run:
$play.bat




Java Security frameworks



1) Shiro
2) Spring Security (Use Shiro?)

Freetds problem: odbcinst: SQLGetPrivateProfileString failed with .


Problem:
bash-3.2# odbcinst -q -s

odbcinst: SQLGetPrivateProfileString failed with .

Solution:

bash-3.2# ODBCINI=/local/umdac/home/platsbanken/.odbc.ini
bash-3.2# odbcinst -j
unixODBC 2.3.0
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: //.odbc.ini
SQLULEN Size.......: 4
SQLLEN Size........: 4
SQLSETPOSIROW Size.: 2
bash-3.2# export ODBCINI




bash-3.2#  odbcinst -q -s
[MSSQLServer]
[MSSQLAnother]
bash-3.2#

Sunday, April 15, 2012

change password to Administrator in Windows 7



If you forget password to Administrator in Windows 7 you can solve as follows: I spent hours to test various solutions, used and burned different Crack password programs from open source such as PC Log in Now and many others but nothing helped.  You can see the list below as no one helped me change or crack the password to theAdministrator:
Ophcrack
Offline NT Password & Registry Editor
PC Login Now
When I tested a few of them I realised that no other solution would help if the best one above can not solve my problem about forgetting a password to Administrator.They are require not corrupted users information. Here is the best solution:
1) Have some Linux LiveCD. I used Puppy 4.1.2 because this is very fast liveCD than for example Ubuntu that do not provide LiveCD in the latest version. I tried the Try Demo but this did not work and this take more time to start up the Ubuntu than Puppy which is very fast and you can save to USB the last session if you want.

2) Using Puppy , open a terminal and locate the mounts where windows resides and change inside System32 as follows:
cd /mnt/sda3/
cd Windows/System32
#Save this before you change
cp sethc.exe sethc.exe.saveit
cp cmd.exe sethc.exe

3)Reboot your computer and when you see the log-on screen and press Shift key five times.
4) You will see a black terminal windows. Write the following to change the password to your user Administrator:
net user MyAdministratorUser MyNewPassword
and try to log in with the new password MyNewPassword to your administrator.

You can add new user as follows if you have Administrators group:
net user root /add

net localgroup Administrators root /add

net localgroup Users root /delete


5) Once inside your computer change back , i.e. restore the Sticky Keys application:
 copy /y c:/windows/system32/sethc.exe.saveit c:/windows/system32/sethc.exe

You can also try to get the Administrator visible as follows:
net user administrator /active:yes 


But this did not helped me in my case. So my solution above is the best one.

Tuesday, April 3, 2012

How to remove duplicate location in Eclipse?


You remove the duplicated location threough Preferences->Install/Update/Available Software Sites and remove the old duplicate before you install new software. Do not forget to restart Eclipse after changing: