Thursday, April 24, 2014

Remote Desktop Access problem due to license

If you have problem to access a remote desktop and get error messages that you have to contact system administrator to get license etc. The following steps can solve your access problem:
  • Run the following command in start command box
          regedit
  • Inside Regedit, navigate to the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing
  • Right click on the key name “MSLicensing” and select DELETE.


Example of CSS-based waiting indicator, an example

Example of CSS-based waiting indicator with Angular JS

In your HTML-file:
<div class="overlay" ng-class="{'ng-hide' : !isVisible }">
                <img ng-show="image"  ng-class="{'ng-hide' : !isVisible , 'myloading' : isVisible }" src="/images/loadingindicator.gif" alt="Spinner">
            </div>

CSS:
.myloading {
    opacity:0.5;
    background-color:#ccc;
    position:fixed;
    top:0px;
    left:0px;
    z-index:1000;
    border: 0px solid;
    margin: auto;
    right: 0;
    bottom: 0;
}

.overlay{
    opacity:0.8;
    background-color:#ccc;
    position:fixed;
    width:100%;
    height:100%;
    top:0px;
    left:0px;
    z-index:1000;
}

Use Broadcast/on concept in Angular to share data between Controllers, something like below:

$scope.$on('globalalertWaitMessages', function(event) {
           $scope.isVisible = true;
      });


Thursday, May 23, 2013

Convert An Android application to Library

When I deveoped an Android applicaton, I want to convert it to a libray to be shared by my other applications. This is easy to do in Eclipse. Go to Properties->Android and check "IsLibrary".
The following line will be added to project.properties


android.library=true

However you will get some errors related to R.*. You have to convert all switch-statements to
if-statements to make it a library. The reason is thoroughly explained by the following links:
http://tools.android.com/tips/non-constant-fields

Thursday, January 3, 2013

PHP Warning: PHP Startup: Unable to load dynamic library php_pdo_mysql.dll



php_pdo_mysql.dll comes with php when you install and you can find this library under
$YOUR_HOME/php/ext/.

Uncomment in php.ini:


; On windows:
extension_dir = "ext"

Wednesday, December 26, 2012

Create a MySql Trigger to run shell script on insert




delimiter ;;
create trigger smf_message_trigger
after insert on smf_messages
for each row
begin
set @stupid_var=sys_exec(CONCAT('/home2/luxefash/triggers/smf.sh  '+ id_topic ));
end;
;;
delimiter ;


Shell script:


#/usr/bin/sh

echo "test " >> /tmp/smf.log


Monday, October 22, 2012

My PC is slow when I try to shut down


Check your EventViewer and localize the error. This can depends on something is wrong with Windows Update and need to be reparated.

Go to
http://fixitcenter.support.microsoft.com/Portal
and download their tool and run it to fix all possible problems.

Tuesday, October 2, 2012

AssemblyInfo.cs' could not be opened ('Unspecified error ')


Error AssemblyInfo.cs could not be opened



So you open a project in Visual Studio 2010 and get an odd error:
AssemblyInfo.cs' could not be opened ('Unspecified error ')
What this means is that the AssemblyInfo.cs file is either missing from the Properties folder in the project or there is a permissions issue. If permissions, update the ACL (File > Properties > Security), close and re-open the project. If missing altogether, you just need to recreate it using the following steps:
  1. Within Visual Studio 2010, select Tools > Create GUID
  2. Click Copy (or New GUID then Copy)
  3. Click Exit
  4. Expand the Properties folder in the Solution Explorer (Control + W, S to open)
  5. Delete the AssemblyInfo.cs file shown with the exclaimation point
  6. Double click on the Properties folder - this should open the Properties window
  7. On the Application Tab, click the Application Information... button
  8. Fill in the application information, paste the GUID you copied into the GUID field - when done click OK