Monday, 18 July 2016

Tilde key not working in VMware fusion

Problem:

Today I ran into a small but frustrating problem. The tilde key (~) didn’t work on my VMware fusion machine.

Situation:

I run Windows 10 in VMware fusion on a Macbook Pro. I searched a bit around the internet but didn’t find the right solution. By the way, my keyboard layout is US, so the ‘~’ key should be on the key just left from the ‘1’.
Some trial and error with keyboard combination with CTRL, ALT, Winkey etc didn’t work out. Strangely enough, I got it to work on the command prompt by pressing SHIFT+ALT+`, but that didn’t work on e.g. Notepad++ and Visual Studio.

Solution:

I found out that you can fix that in the settings of the VM itself. You don’t need to shutdown you VM. Just do the following:

  • Open the Settings of you VM
  • Click on ‘Keyboard & Mouse’
  • Just under the list of Profiles, you will see a gear wheel button which you can expand.
  • Click in the gear wheel popup menu on the option ‘Edit profile’
  • In the popup window, click on the tab ‘Key Mapping’ and unselect the option ‘Enable Language Specific Key Mappings’. This will do the trick (a least for me).
  • Close all settings windows, return to your (running) VM and voila, the ‘~’ will work back again.

I assume that this will work on other Windows versions on VM's as well. Just give it a try.

Happy programming!

Monday, 9 May 2016

MS Access and LINQPad

Situation:

As most developers, using LINQ queries saves a lot of time and works absolutely great. For me one of the greatest tools for quick and easy querying data and testing code is LINQPad. However, sometimes you get a project where the (backend)database is MS Access (yes, it still happens, even in 2016 :) ).

Problem:

And there starts the problem. There is no MS Access driver for LINQPad, at least no free one.

Solution:

But we are lucky, LINQPad provides a way to create custom drivers. So one of my colleagues, Frank den Outer, made a driver for MS Access to enable you to connect to *.mdb and *.accdb and allows you to query on data from LINQPad on MS Access database (even with password protected ones). So the credits of this post goes to him!

See the screenshots below:






Our company, DNM, offers you this driver for free. You can download is here: MSAccessDataContextDriver.lpx. After the download, start LINQPad, and when creating a new connection, you can easily add the downloaded driver.

Happy programming!

Android Screen Recording on Mac

Scenario:

For one of the apps we are developing, I needed to make a screen cast of some strange behaviour inside the app on Android. But how can you record screen activity from a Android device on Mac OS X?

Solution:

After a little bit of searching, the solution was actually pretty simple. You need to do the following:

1. Install the Android Tool
Download the Android Tool from GitHub (please check out the GitHub project page to keep track of updates and news). The download gave you a zip file. Unzip the file and place the tool inside the application folder on your Mac.

2. Prepare your Android device
In order to be able to establish a successful communication between your Android device and the Mac, you have to enable the 'Developer Options'. Inside the Developer Options, you need to enable the 'USB Debugging' feature. If you like, you can also enable the feature that shows your touch actions on the screen.

3. Launch the Android Tool
Start the Android Tool (note: you may get the warning that the app is from an unidentified developer). Once the app is opened, simply plug in your Android device

4. Start Recording
The tool is as easy as it can be:
Click on the camera button to take a screenshot or click on the camcorder button for a screen recording. When done with screen recording, press the red square (stop) button which appeared on the camcorder button place. You can record as long as you wish :).
The files created will be stored in an 'AndroidTool' folder on your desktop.

Note: You won't be able to record audio with this tool and neither you can take screenshots of record videos of protected videos.

Last tip: once you have your screencast video file, put it through Handbrake. This will decreases you file size a lot (e.g. 8.3 MB to 2.4 MB)

Monday, 1 June 2015

Fix slow boot-up on Mac

Problem
Recently I ran into a frustrating issue on my new MacBook Pro Retina (with 512MB SSD). The time of (re)boot took a lot of time, holding the screen black for a long time.
I checked several tips, but it was not due to old hardware (...), also not that my disk was full (more than 50% free space).
I searched a lot and found a solution that works actually pretty well and seems really stupid to me (a kind of Microsoft-type-solution-when-something-unexpectedly-stop-working-well).

Solution
What you need to do is to go to System Preferences, and selecting Startup Disk. Then, select your primary disk, and hit ‘Restart’ from the same window.


That's all! It worked for me pretty well!
By the way, it seems that this happened after the update of OS X 10.10.3.

Wednesday, 26 March 2014

Format date on textbox in Lightswitch HTML client

The HTML client for Ligthswitch is nice, except that not everything is that easy to obtain as in the Silverlight version. So is formatting dates on 'view' screens. Despite setting it at the entity in the 'Server' part of the project, it doesn't show up on the HTML output.
Solution:
Add a 'postRender' script to the date field(s) you like to format.

  • Therefore, go to the (view)screen where you like to format the date.
  • Select the field which shows a date. Let say 'StartDate'.
  • Click on 'Write code' on top of the window and select 'StartDate_postRender'.
  • Add the following piece of code:

myapp.ViewProject.StartDate_postRender = function (element, contentItem) {
    // Write code here.
    contentItem.dataBind("value", function (value) {
        if (value) {
            $(element).text(value.format("dd-MM-yyyy"));
        }
    })
};


Done.

Tuesday, 11 June 2013

Free online 15GB+ storage alternative for Dropbox

Hi folks,

Dropbox is fine, but you can run out of space. There is a free alternative which give you even bigger storage, copy.com!
You start with 15GB and for every user who creates an account via yours, you both get 5 GB storage extra, for free.
So, start creating an account with this link: https://copy.com?r=2ClF1N and get the default 15GB + 5 GB extra, because of using this link (and I get 5 GB free as well :) ).

Copy.com supports both Microsoft and Mac OS X environment!

Thanks and have a nice day!

Wednesday, 1 May 2013

Time Machine - preparing to copy "forever"

Problem:
I just got a new HD in my iMac (HD replacement action of Apple). Got the latest MacOSX on it. So far so good, but placing back my data from my Time Machine backup disk, I ran into problems. I had first a message and sometimes errors, telling that my disk was not properly removed (however, that was done by the OS itself). I just restarted the computer and tried it again. I started with an action to place back some data (couple of MB's), just to try if everything was working well.
Well, it didn't. It was preparing to copy forever. And finder hang, couldn't shutdown the computer on the normal way. So, just hard reset...
Solution:
Due to the 'not properly removed' messages and errors, I decided to run the Disk Utility and from there I ran the 'Verify Disk' option on my Time Machine (TM) backup disk. This took about half an hour or so. The results it shown were all good (green messages).
But, guess what, after that, restoring data from my TM Backup worked fine. Depending on the amount of data I restored, it took just a little moment to 'prepare to copy' and then it started to place the data back on my computer just as aspected and with an appropriate speed!