Go Green, Go Solar

First step towards ‘Go Green

And here comes another step,

 

 

 

 

Advertisements
Posted in Uncategorized | Tagged , , | Leave a comment

Extract XML data with SQL Server

I had FHIR resource (https://www.hl7.org/fhir/) saved as XML in a SQL server database. After bit of a struggle found the way to extract data from XML, eg Given below to extract the FHIR resource status,

;WITH XMLNAMESPACES ('http://hl7.org/fhir' as X) select XMLDataColumn.value('(/X:FHIR_RESOURCE/X:status/@value)[1]', 'nvarchar(max)') as FHIR_Resource_Status
from FHIR_Resource_Table

Posted in FHIR, Uncategorized, xmlns | Leave a comment

Smart TV with ownCloud

Whenever you want to watch a movie, its troublesome to copy that to a USB and plug into your smart TV. Specially if its several Gigabytes of data.

A workaround is to created your OwnCloud server at home and copy all movies to one centralised place. Then go to Internet in Smart TV app and click on the movie. This works with mp4 formats. File with extension MOV doesnt work.

owncloud.png

 

 

Posted in Uncategorized | Leave a comment

Zero carbon emission for one month

 

My ride to office (and back home) captured in a phone camera. No parking fees, fines, fuel costs and 15 minutes exercise on the way to office.

Posted in Uncategorized | 1 Comment

Access .NET MVC model property in javascript

This looks to me very useful as it converts and entire server object in to a javascript accessible object.

var yourComplexObject = @Html.Raw(Json.Encode(Model.YourComplexObject));

Add this inside <script> tags when loading the view.

Posted in Uncategorized | Leave a comment

Display a user’s Full Name instead of User.Identity.Name – .NET MVC with AD

A simple article on how to get first Name and last name from Active Directory,

Click here to view the article

One thing is missing in this tutorial is to add the assembly to Web Config file. You have to add the following code ,

<add assembly="System.DirectoryServices.AccountManagement" />

Also I had the version 4.0.0.0 and for some reason it didnt work if I add the correct version within above.

 

Posted in Uncategorized | Leave a comment

Call Java Class static methods from javascript.

This may be a useful tip if you want to call a Java class static methods from javascript.

The syntax is ,

Packages.<package>.<class>.<method>

Make sure jar files loaded and if there are any variables, pass it as javascript array.

var args = [ <param1>, <param2>……. ]

🙂

 

Posted in Uncategorized | Leave a comment