Use Windows Phone Personal Assistant (Cortana) Outside US

Microsoft recently push windows phone 8.1 updates to all windows 8.0 devices. The major feature of this update was to include an interactive personal assistant software; Cortana.. it is like Siri on IPhone an Google Now on Andriod devices.. Cortana is Beta release now and it is enabled only for US area.. the good news is you can still use cotana while you are a non-US resident by following few steps to adjust the regional settings on your device. to accomplish that you need to do the followings:

1. your phone language should be English (united State); to do so, go to Settings > Language and make sure the first item on the list to be English (United States). your phone may ask for restart; if so, please do restart for your phone.

2. your region should be United state. to do so; go to Settings > Region and make sure the region is US and regional format to be US… your phone might require a restart, if so, please do a restart for your phone.

3. the last step is to make sure that you set the Location Services to be ON; this will enable GPS on your phone Cortana will use it in order to accomplish your commands. To do that; go to Settings > Location and make sure it is set to ON.

 

after restarting your phone, you should see cortana on your App list. swap to the left and search for Cortana and you are there.. to start it; you can use the search button on your  mobile devise..

 

similar article: http://www.wpcentral.com/want-cortana-outside-us-heres-how

 

Responsive Web Design

Responsive web design is a web design approach that is aimed at crafting sites to provide an optimal viewing experience, easy reading and navigation with minimal efforts of resizing, panning, and scrolling – across wide range of devices including mobile, tablets and desktop devices. Mainly the Responsive web design position the page content in a fluid, proportion-based grids, flexible images, and CSS3 media queries, an extension of the @media rule.

Mobile and tablet devices adoption is rapidly grow all over the world; thus it is becoming more critical to have websites that looking good in those devises and make users feel comfortable while using your website on small screens as well as on large screens. Based on recent stats on the market, the sales for mobile and tablet devices overtake the sales for desktop devices which is making to have your website looking good on those devices essential for your organization success.

When you start thinking of having website that looks good on mobile and tablet devices , you will have 2 options;

  • Build a separated website for mobile devices and another one for desktop.
  • Using responsive design technique to have single website that works on both desktop and mobile devices.

Both options are valid and debatable… each of these options has its own pros and cons. Which one to adopt and go with depends on your business and what factors to consider. It is not the target

 

Google in general is recommending to go with Responsive web design approach… it will help you a lot in many areas.. For me, I hate code duplication. For the marketing guys they hate to duplicate the marketing content in many places.. Responsive web design will help on solving both problems and make those things centralized in one place and get rid of the headache of duplicated code/contents.

SOLID Object-Oriented-Design Principles

One of the main principles of OOD (Object Oriented Design) is SOLID principles. SOLID is stands for :

1. Single Responsibility Principle:

This means the class has to have one and only one reason to responsibility. This responsibility should be encapsulated by the class.

2. Open/closed principle:

The open/closed principle states that software entities (classes, modules, functions, …etc) should be open for extension, but not for (closed) modification

This will be very helpful on the production environment where fixing and enhancing certain area is required without affecting other areas. thus you will go with extending the class and its behaviors without modifying the current existing code/methods

3. Liskov substitution principle:

means Substitute-ability; It states that, if SubclassA is a sub-type of MainTypeA, then objects of type MainTypeA may be replaced with objects of type SubclassA without altering any of the properties of that program

4. Interface segregation principle:

The main goal from this point is to make the software more maintainable and loosely coupled; thus easier to re-factor and change. Basically, we need to split the large interfaces into smaller interfaces so that the client classes will be aware of the methods/properties they concern about

5. Dependency inversion principle:

It is about decoupling software layers and making sure the software is loosely coupled. Basically this principle states 2 things:

– High-level modules/layers should NOT depend on low-level modules/layers. communication between modules and layers should go through abstractions.

– Abstractions should NOT depend on details and the Details should depend on abstractions.

 

 

How to Create Pivot Tables with MS Excel

Usually when you have a large list of data; you will need to have summary and statistics out from this list to take decisions. I mean by summary things like:

1. How many records do we have under certain category?

2. What is the best time that my product is being sold?

3. How my salespersons performing during the course of certain period?

The easiest way to get the answers of the above questions is to create a pivot table on Microsoft Excel. Pivot tables are interactive tables where it extract data and summaries the data in a more meaningful format. It will make it easy to analyze and make comparisons detect what kind of decisions you need to do.

Let’s assume that we have the following list and we need to extract summary data from it.

datasource snapshot image

 

to create pivot table do the followings:

1. highlight your data table.

2. from insert tab; Click on Pivot table

3. make sure the Table/Range is selecting the correct range of data that you need to create your report against.

4. Click OK

5. Configure your items as showing on the below snapshot

 

pivot table snapshot table

 

I would recommend to play with the columns and rows to let you understand the concept in a solid way. using Pivot table will save time and effort when you are create reports to take decision up on. I’m attaching sample data here if you would like to download and play with it.

Google Chrome Frame Plugin!

There is many of technologies that are not supported in IE 6,7,8 and even 9; such as rich text editing and faster Java script execution. some of these features supported on the new versions of IE but not supported in the older versions, like the curve edges for tables, buttons..etc (supported on IE 9 but not on IE 6)

Usually the end users would like to see the same UI over any browsers and the bad news is, there are some people working on the very old version of IE; IE 6 – I have no idea why they still using such browser.

on the other hand; the GOOD NEWS; There is plugin form Google Chrome, that you can install it on the old IE version and let Chrome handle rendering the websites just like if it is running under chrome. it will be look very good and execute the client side script in very efficient way. that would make the developer life much easier and get rid of having the headache of supporting multiple browsers with very old technologies like IE 6!

Installing this plugin will be very easy, it will be a matter of single click, to install this plugin, please use the below link to get into the downloadable area from Google Chrome!http://www.google.com/chromeframe?quickenable=true

Basically, this plugin will create a frame inside the IE and let Chrome rendering engine render the web page instead of the IE browser; that means whatever is supported on the LATEST chrome version will be there as well. it is like do a perfect union between IE and chrome to get the best of chrome inside the IE!

Locate the Position of website user by IP Address

How can sites knows the country of users? a friend of mine asked me that question and that question drive us into long conversation about “Locating Positions of website’s user”. the idea is very simple behind how the sites locate users’ location. it is by IP address. these days there are many sites that can let you determine in which country a certain IP address, more over, it may give you a very accurate address. I’m usually using ip2location site but there are many websites that do the same job like geobytes and hostip.

Also there are some sites which selling database of IP addresses and locations but you need to keep updating your database every once awhile incase you decided to go with that

Go for Wireless Internet Connections

I had a discussion with a friend of mine about why to go with Wireless Internet connections rather than using the standard way for it; meaning over land phone lines. I have been using wireless internet connectivity for like 2 years by and I am super happy with it. the first concern that I have about it; is the stability for the connection over bad weather conditions. that was my only one concern that I have when I switch to the wireless internet connectivity. but after trying it; I found the wireless connections work very good in the bad weather condition (off course depending on your ISP)

After 2 years of using the wireless internet connection, I found it is more efficient than using land phone lines to connect to internet for many reasons. One of the main reason is I can go anywhere in my country and connect to internet easily as long as there is coverage in the area that I’m on it. This made my life much easier and I could do my work in more effective way.

Some companies having some sort of flexibility in their environment; I know couple of them for sure that implementing the flex-work-environment very effectively like integrant.com and O2; for me to be able to utilize this flexibility of work environment, I need to have flexible internet connection which will let me choose wireless internet connection over land-phone-internet to be able to get full benefits from the flexibility that I have in place.

While technologies emerging, the wireless internet speed are become very fast and competing the land-phone-internet’s speed of internet which is making this is the best choice to go with.

One of the good things that late emerge is Wireless Routers with USB Dongle; which will let you to get a USB dongle as an internet modem and connect this dongle into your wireless router to get a wireless network that is connected to internet thus you will not fin yourself in a situation where you need to pay good amount of money just to get a wireless router that is connecting to wireless internet.

at the end; I strongly recommending going with wireless internet connections over land-phone-internet and believe me you will touch the different in the first week. I would recommend also checking this link

Read and Write BLOB objects on SQL Server

I had faced couple of cases where I need to store files inside the SQL Server rather than storing these files on the file system. for the cases I faced, I compared the value of storing the files inside SQL server versus storing those files on the file system and start interact with the file system and I found going with storing these files in SQL server is much valuable for me which may be the same case for you as well.

To store the files on sql server do the followings:

SELECT TOP 1 *

FROM OPENROWSET (BULK N’<FilePath>’, SINGLE_BLOB) TblName

the above statement will read the file contents and convert it into Binary format (which is the format of BLOB on DB). Make sure to replace <FilePath> with the correct path at your DB Server. meaning this path should be a valid path on DB Server.

after reading the file contents; you can push this content into your DB Tables using ordinary Insert Statement.

Insert into Tbl (FileContent)

SELECT TOP 1 *

FROM OPENROWSET (BULK N’<FilePath>’, SINGLE_BLOB) TblName

To Read file Contents from DB follow the following steps:
1. Open Command Prompt on SQL Server

2. Type the following Command:

 

C:>bcp “<SQL STATMENT>” queryout <OutputFilePath> -T –d <DBNAME>

make sure to replace the following placeholders:

  • <SQL STATEMENT> by your SQL Statement that retrieving the file contents
  • <OutputFilePath> the destination file path including filename
  • <DBNAME> your DB Name

3. There will be couple of questions , answer them as below
     Enter the file storage type of field Media [image]: <Enter>
        Enter prefix-length of field Media [4]: 0
        Enter length of field Media [0]: <Enter>
        Enter field terminator [none]: <Enter>
    Do you want to save this format information in a file? [Y/n] y

 

 

I hope you will find this article helpful… Please let me know what do you think by posting your comments

Conditional Page Break in SRSS Reports

one of the cases that I faced recently is having conditional page break in SRSS report. this is not an out of the box feature in SRSS and I had to do a workaround in order to accomplish this feature. To do so, I followed these steps:

  1. Add a rectangle to your report
  2. Right click on the rectangle and select “rectangle properties “
  3. Check the checkbox related to “Add a page break after” or “Add a page break before”; depending on the location of the rectangle and where the page break is intended to be.
  4. The tricky point is to set a visibility condition that control when the rectangle. The point is if the rectangle is invisible; then there will be no page break.