Saturday, May 13, 2017

Angular 4: How to use Augury chrome extension to view or edit component properties

Augury is an extension developed as a debugging tool. It makes debugging UI problem a breath. To use it first you can go directly to its web page to find the install link:

https://augury.angular.io/

Once you install it, you will find a new tab in Chrome Developer Tools console called Augury. If your Angular application is running in development mode, then it is possible to simply inspect the component and see the direct typescript properties. You can also modify the values and see the results.

 

Friday, April 14, 2017

Refresh the UI manually if Angular2 doesn't detect changes in component variables

Sometimes Angular is unable to detect or mark changes so even if you change a variable, UI remains untouched. In this case, if any other solution doesn't work there is a simple workaround based on `ChangeDetectorRef` class. Simply inject it into your component and call markForCheck() and detectChanges():



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  constructor(ref: ChangeDetectorRef) {
  }

  ngAfterViewInit(): void {
      // no matter of how and where you need a refresh, 
      // simply call markForCheck & detectChanges anywhere you want
      // In my code, I have called them in a custom event handler
      this.myService.somethingChanged$.subscribe(e => {
          this.ref.markForCheck();
          this.ref.detectChanges();
      });
  }

Saturday, March 18, 2017

Easy way for configuring proxy for your Angular2 CLI applications

Problem: 

Calling backend API from angular2 applications is not easy. If you call the API on another port you will receive cross-reference error. 

Solution:

Angular CLI has a built-in proxy server that can wrap and redirect your calls to your backend API address. I found this tutorial helpful:




Monday, March 28, 2016

Running Rift 1.0 contents on DK2

Today 28 March 2016, I installed two important updates that finally fixed my never ending problems with DK2 on my ASUS gaming laptop. A few months ago with introducing a breaking change, everything stopped working on my laptop but then with these new updates everything seems OK now. I am so happy because the last time I contacted support they simply said they don't support laptops any more!

Anyway I managed to install Oculus runtime 1.3 and after setting up the helmet, I downloaded a free software from the Oculus Store and it worked! There is no lag or performance issue however I see a warning about performance shown on main menu.

Steps to install:
1- Make sure you have installed the latest Nvidia Driver (my GPU is Geforce GTX 880m)
http://www.geforce.com/whats-new/articles/oculus-rift-now-available-and-game-ready


2- Uninstall your Oculus runtime and setup the new version from this address: https://www.oculus.com/en-us/setup

3- Go through all setup steps, For me I have to ignore USB 2 warning, also did not complete the setup as I did not have the XBOX controller but skipping just works! The last step was to enter my Oculus credentials to login.

4- When it logs you in you will see Oculus Rift Home in your Rift. Also you will see the store home page in your Ocolus Runtime window like bellow:



4- To test it, I recommend you to install The Body VR. This is  free package and also small in size (less than 100 MB). It plays smoothly on my DK2 as well.




5- I have not tested an XBOX controller yet. Please share your experience/problems if you try it.

Thank you.

Tuesday, September 29, 2015

My experiences with Oculus Rift DK2

One of my serious hobbies is VR and I spend a lot of time developing experimental scenes with Oculus Rift DK2 and Unity. Here is my presentation in Kuala Lumpur hosted by LVL. UP KL event (March 2015). I introduced development process and frequent problems with Rift.


Monday, February 9, 2015

You need this Visual Studio extension if your breakpoints not being hit in Silverlight projects

I found the following extension very handy because it silently fix inability of Visual Studio to stop debugger at your break points in Silverlight. Just install the extension, restart the Visual Studio and it will work. You don't need to do anything else.




Note: If you want to install it on VS2013 then you need to add the following section to the manifest file. You can do that using 7Zip. Simply right click on the extension file, then select 7Zip->open archive, then choose the manifest file (extension.vsixmanifest) and edit it. You need to add the following section under SupportedProducts tag and then update the file in the archive:

     <VisualStudio Version="12.0">
        <Edition>Ultimate</Edition>
        <Edition>Premium</Edition>
        <Edition>Pro</Edition>
      </VisualStudio>


Saturday, February 7, 2015

You can have best of the both worlds (SQL and NoSQL) in one product: FoundatonDB

I was looking into FoundationDB NoSql database and deeply impressed in the way it leverages SQL Layer in a totally separate set of scalable servers talking to an underlying layer that is responsible for key-value storage. So it is no longer a NoSQL only database and as they claimed it is best suited for operational (OLTP) applications with high concurrency.