Wednesday, November 12, 2014

Cross Join

Recently met with a problem, where in I need to lookup a table using LINQ query where the JOIN clause is not supporting non-equi joins.  The Cross Join came as handy and helped.  Here is the sample SQL query which unit tested the same.

 

DROP TABLE BucketList
GO
CREATE TABLE BucketList
(
    StartNum INT,
    EndNum INT,
    Bucket VARCHAR(20)
)

INSERT INTO BucketList values
( 1,10,'[01-10]')
,( 11,20,'[11-20]')
,( 21,30,'[21-30]')
,( 31,40,'[31-40]')

drop TABLE #T1
go
CREATE TABLE #T1
(
    IP INT,
    Label VARCHAR(40)
)

INSERT INTO #T1 VALUES
(4,'Four')
,(9,'Nine')
,(34,'Thirty four')
,(44,'FortyFour')
GO

SELECT StartNum, EndNum, Label, Bucket
FROM #T1
CROSS JOIN BucketList
WHERE IP >= StartNum AND IP <= EndNum

Tuesday, June 10, 2014

Windows Calculator

Do you know Windows Calculator can do more than simple calculators.  Probably you may used different views of calculators like Standard, Scientific, Programmer and Statistics.  But do you know you can do more with Windows Calculator!!

image

Unit Conversion

image

Date Calculation (Even Excel cannot do this as simple as it is!!)

image

Lease Calculation

image

Fuel Calculation

image image

Friday, April 4, 2014

VHD as a Drive

You can mount the VHD as a drive using simple UI.

  1. Open Disk Management (from run you can use diskmgmt.msc)
  2. Select Attach VHD
  3. image
  4. Alternatively you can also use the Diskpart to achieve the same

Wednesday, April 2, 2014

Microsoft Office Save – Backstage view

It is annoying to select the Save location every time to Computer when your most used location is local computer.  Though I hate to choose every time, explored the option to get rid of it.

image

Open the File –> Option Menu choose Save tab.

Use the following two options to make your preferences

  • Don’t show the Backstage when opening or saving files: (To complete get rid of the backstage view)
  • Save To Computer by default: (Just to make the Computer as the default on backstage view)

clip_image002

Sunday, January 19, 2014

Office Apps

Microsoft Office apps are custom extension on top of standard office suite, now we have full fledge store support.  The office apps provides custom extensions and utilities, which works inside the office apps.  The recent one which I liked is the Linkedin integration with Outlook.  It is cool to see within your outlook window on a mouse over you can see the complete detail of the sender.

  • To add new apps, in outlook go to Info tab and select Manage Apps
    Outlook Apps
  • You will be presented with list of apps, installed required apps.
    Outlook Apps 2
  • Once you install an app, the app will show up in your message just below the subject line
    LinkedIn2

Similarly, you have apps for Word, Excel

excel appsword appsapps

Thursday, January 2, 2014

Windows 8.1 Navigation Customization

Windows 8.1 added with lot of small improvements, this post highlight the Navigation Customization.

Right click on Task Bar and bring the Properties of Taskbar.  Notice it is no more called as Taskbar Property.  It is now Taskbar and Navigation properties.  Check out these cool settings under “Navigation” tab to improve user experiences.

taskbar

You can skip remaining post if you got all above settings!

Corner Navigation

    • Quick App Switch: Charms
      • Mouse: When I click the upper-left corner, switch between my recent apps
      • Keyboard: Windows Key + Tab
      • Win Tab
    • Charms Bar
      • Mouse: When I point to the upper-right corner, show the charms.  You will still get charms using bottom-right corner.  This setting is to avoid disturbance if you are using Close button of desktop apps image .
      • Keyboard: Windows + I

 

    • Default to PowerShell:
      • Mouse: Bring the Windows Power User Menu by using Right click, you can set the Power.  It is good idea to start using Powershell instead of command prompt.
      • Keyboard: Windows + X
      • Powershell

Start Screen

  • Default Modern UI / Desktop?: You can set your preferred mode as start screen, between Desktop (Icons) and Modern UI Start screen (Tiles)
  • Wallpaper as Modern UI background: You can have the same or different wall paper between Modern UI Start Menu and Desktop.
  • Windows Tiles / App list as start screen:  You can switch between Modern Tiles vs App list as your default likst
  • Search default Apps / Everywhere
    • search
  • List Desktop apps first: When all the Apps list you can bring the Desktop to first.

Teams PowerShell

 The PowerShell helps to get quick meta data around Teams. Install-Module -Name MicrosoftTeams Connect-MicrosoftTeams Get-TeamAllChannel...