Friday, February 13, 2015

Microsoft Remote Desktop on Mac OS X


Quick guide (in a single picture) how to properly setup remote desktop connection using Microsoft Remote Desktop software on Mac OS X:


How to setup Microsoft Remote Desktop on Apple computer under Mac OS X


Text variant:

  • Don't use old Remote Desktop Connection software Mac OS X version 10.10.x and higher! Use Microsoft Remote Desktop from App Store instead.
  • Don't add domain or PC name with back slash into username! Put just a login name, official instruction is wrong.
  • Specify the port number in the connection filed! Different RDC protocols uses different port numbers by default.


Wednesday, August 27, 2014

Need cool art for website or presentation?

Absolutely amazing online service with hundreds templates of different hardware devices (phone, tablets, laptops, etc.) where you can upload own picture of the screen to get the perfect art for website, presentation or brand-book.

This picture is created using Place.To:

P.S. Why I didn't do such service few years ago? :)


Monday, May 05, 2014

Bad Key Hash for Facebook Apps


When you are creating application for Facebook on Android platform, Developer Website requires the Key Hash for every development device.

This secret stroke is automatically generated by Eclipse or other dev studio in "debug.keystore" storage.

You can obtain Key Hash via command line:

keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64

or sample code:

...
   @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Temporary code to print out the key hash
        try {
            PackageInfo info = getPackageManager().getPackageInfo(
                    "com.Your.Application.Package.Name", PackageManager.GET_SIGNATURES);
            for (Signature signature : info.signatures) {
                MessageDigest md = MessageDigest.getInstance("SHA");
                md.update(signature.toByteArray());
                Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
            }
        } catch (NameNotFoundException e) {
        } catch (NoSuchAlgorithmException e) {
        }
...

You have to add all you developer and release key hashes into Web panel of your Facebook Application. Everything looks simply enough.

But, if your hash key contains / (slash) or + (plus) symbol Facebook integration will not work! You'll get error message, something like that: "Key hash Fj2DQ/kUxqHuaTq1jy9iTejN2Uk= does not match any stored key hashes".

I've spent few hours to understand the problem and find a workaround :( Here is an easiest way:

  1. Delete "debug.keystore" file in your "[%USERNAME%]/.android" folder.
  2. Rebuild project to get new "debug.keystore" file with new key hash.
  3. If new hash contains any symbol (= at the end is OK :)) repeat again

Hope this tip helps other developers! Sometimes, development for Android and Facebook is a pain...


Thursday, March 20, 2014

How to detect Internet Explorer 10 and higher?

For a long time detecting of Internet Explorer browser was easy using Conditional Comments, something like:

<!--[if IE]>
 <script type="text/javascript">
  var isIE = true;
 </script>
<![endif]-->

Starting version 10, Internet Explorer doesn't support conditional comments feature :(

Here is the JavaScript code to detect IE of any version since 5 till 11:

var isIE = (function(){
    var undef,rv = -1; // Return value assumes failure.
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf('MSIE ');
    var trident = ua.indexOf('Trident/');

    if (msie > 0) {
        // IE 10 or older => return version number
        rv = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
    } else if (trident > 0) {
        // IE 11 (or newer) => return version number
        var rvNum = ua.indexOf('rv:');
        rv = parseInt(ua.substring(rvNum + 3, ua.indexOf('.', rvNum)), 10);
    }

    return ((rv > -1) ? rv : undef);
}());
 

Hope Internet Explorer 12 and higher will work the same way :)


Tuesday, November 19, 2013

Cannot format flash drive or delete partition from SD card? I will help you.


Sometimes Flash drives, storage sticks and cards become useless even if they are not physically damaged. Such drive is recognized by operating system, but the size is wrong (less than should be) and very often the user cannot even format the disk.

Yesterday I've got 2 such devices at once! I was trying to install Chrome OS on my netbook, so wrote the image of Chromium bootable drive to 4GB flash stick and 16GB SD card…

As I understand Google developers think (can they?) that having many partitions on disk is a cool true hackers way! They use 10 (Ten!) partitions on a small 4GB drive!!!

Partitions on Chrome/Chromium OS boot drive, how to delete them?

The biggest problem is that you cannot delete all these strange partitions and unallocated spaces using standard programs. Even Disk manager administrative tool will not help :( So here is a step by step instruction on how to clear unnecessary partitions on the disk and get flash drive or memory card back to normal life.

  • Press Win+R.
  • Type DiskPart and press OK or Enter.
  • Push Yes button in UAC warning window.

DiskPart.exe console should appear, next steps could damage your computer data, so be very careful!

  • list disk - shows the list of all disks in the system.
  • select disk X - where X is a number of disk you want to fix.
  • list disk - call this command again, to make sure you've selected the right disk! You'll see * mark near the selected disk.

Next steps will destroy all data on the disk! Do you want to continue?

  • clean - cleans the disk in 90% of cases.

If clean command fails, you have to delete each partition on the disk manually, by repeating the following 2-3 commands until all partitions are gone.

  • list partition - shows the list of all partitions on the disk.
  • select partition 1 - selects the currently first partition.
  • delete partition override - override parameter allows deleting a locked partition.

When the disk is cleaned, you should create a primary active partition, then format the drive and assign some letter to it. Follow these commands:

  • create partition primary - creates a partition for the whole disk.
  • select partition 1 - choose current partition to perform other operation.
  • active - makes partition active, so it could be a bootable one.
  • format quick fs=fat32 - formats the disk, FAT32 is a standard file system for Flash Drives and SD cards.
  • assign - sets some letter name for the logical drive.

That's all. Now you can close DiskPart.exe console, in a hacker style, by typing exit command or by clicking common x button on the right top corner of the Window :)

Hope this tutorial will help people to get disappeared megabytes back from memory cards and even fix some of "dead" flash drives.




Friday, November 15, 2013

How do I make software products?

Here is a screencast on x8 speed of all processes are required to create the software product and to publish it online:


As you see coding takes less than half of time. Making of screenshots is more important than programming. Pages in social networks are more important than pretty looking website. And so on...

Program in this video is a first public version of Missing Buttons software

Monday, November 04, 2013

Testing Ecwid online shopping platform


KARPOLAN's Autograph
$10.00


Friday, September 13, 2013

Today is 256 Day of Year

So it is the Programmers' Day :)

My first program in 1992 year was something like that:


10 INPUT "Temperature in Fahrenheit: "; F
20 LET C = Int((F + 40) * 5 / 9 - 40)
30 PRINT "Temperature in Celsius: " + C
40 INPUT "Again (Y/N)"; S$
50 IF S$="y" OR S$="Y" THEN GOTO 10

Do you know the languge it is writen on?

Monday, September 02, 2013

Micro USB 3.0 connector pinout

I was spending about 15 minutes googling until I've found the electric pinout of Micro USB connector ver 3.0 (a doubled one)

Also I was not able to get an electric scheme of USB 3.0 that specifies color of each wire inside the cable.

So after some research I've made a paper note for myself. Also I didn't forget to take a photo and share it to everybody:

Micro USB 3.0 pinout and color of wire

Hope this saves time for other people :)