Pages

Thursday, January 31, 2013

Getting started with JQuery UI Tabs

JQuery UI Tabs allows you to create HTML tabs in a very simple fashion. Listed below are the different steps you need to take:

  1. Add a reference to the JQuery javascript files
  1. Add a reference to a JQuery UI css
  1. Create your tabs by adding an unordered list in a div – note the href=”#tabs-1” part which points to the id of a div which will contain the tab content
  1. Create the divs which will contain the tab content
  1. Initialize your tabs by adding some javascript code

Finally your code should look this

 

Some interesting references:

Tags van Technorati: ,,,

Wednesday, January 30, 2013

6 interesting facts about continuous crawling in SharePoint 2013

One of the new features in SharePoint 2013 is continuous crawling which  allows your SharePoint search results to be be as fresh as possible. Continuous crawls run every 15 minutes by default but you can change the interval. This might sound similar to incremental crawling but there are some important differences:

  • Continuous crawls can run in parallel and a crawl does not require a previous crawl to be completed prior to launch
  • Processed results will appear in the search results immediate after the crawl – there is no need for index merging
  • Continuous crawling is only available for SharePoint content
  • It is not possible to pause or stop continuous crawls
  • Continuous crawling is not available in SharePoint Online – only in on-premise deployments (See Search features in Office 365 Preview)
  • A SharePoint 2013 farm will also be able to crawl older versions of SharePoint using continuous crawling.

References:

Saturday, January 26, 2013

How and why to compact your Outlook OST file

When you delete items in your mailbox, the size of the Outlook data file (.pst or .ost file – it is an ost file if you are using Microsoft Exchange Server) might not decrease as much as you expected. You can free more space by doing a compact of your mailbox – check out How to compact PST and OST files to eliminate deleted file spaces in Outlook. This is especially useful after you have done a complete cleanup of your mailbox since this probably grew your .ost file because the deleted items are also kept in this same .ost file.

Tags van Technorati: ,,

Wednesday, January 23, 2013

Windows Phone SDK Update for Windows Phone 7.8

Windows Phone SDKUpdate for Windows Phone 7.8





It’s time to cheer with new update of Windows Phone 7.8, now time to update your windows phone 7.5 apps to Windows Phone 7.8. It’s an optional update that allows you to add two new Windows Phone 7.8 emulator images to your existing windows phone SDK installation.

The Windows Phone 7.8 has to offer *New* Live Tiles, the SDK including the new Emulators is now available.

Direct download : Windows Phone SDKUpdate for Windows Phone 7.8

Official Blog Post : Windows Phone 7.8 SDK Update

*Happy Programming*

Cheer

Wednesday, January 16, 2013

Office apps development - Getting started building an Excel task pane app

Apps for Office are a new type of apps which allow you to extend Office 2013 client applications  using a combination of web technologies (Javascript, CSS and HTML) and the new Javascript API for Office. If you are new to this I recommend that you check out these apps for Office and SharePoint 90 second videos. 

Afterwards you can immediately dive in and check out Build apps for Office. In this series of blog posts I will explain how I learned to built an Excel Content app and issues I faced when trying to built this type of app. There are different types of Office 2013 apps – check out.

A good place to start building a task pane app is Sample task pane and content app walkthroughs – which shows you how to build a Bing Maps content app.

The Excel content app I will build is a variant of the Bing Finance apps – which is basically aimed at integrating stock data into Excel. Where the Excel 2013 app which I will illustrate will differ in a first version:

  • Allow the app to work with Excel sheets which already have tables to add and bind to these existing tables and refresh data in these apps
  • Incorporate financial data from multiple sources (not only Bing Finance)

Usage scenario is the following:

  • User selects an existing Excel table which contains stock information – every row is representing a stock. For each stock there should be a column which contains the stock symbol code. User defines which column contains this stockdata and in which column he wants to update the stock price.
  • Provide a button to update the table with the latest stock price for each stock in the table
  • When a row is selected in the Excel table – show extra information in the task pane.

In the sample code from the Bing Maps content app - you notice that you need to create bindings to interact with specific sections of your Office apps – see Binding to regions in a document or spreadsheet . This is something I will need as well for the Excel table with stocks.

There are 3 types of bindings which you can create and from which you can read data  ( see BindingType enumeration) – in this case I want to use Office.BindingType.Table and read information from that binding afterwards. First create the binding:

Office.context.document.bindings.addFromSelectionAsync(Office.BindingType.Table, { id: 'stockdata' }, function (asyncResult) {
        if (asyncResult.status == Office.AsyncResultStatus.Failed) {
            write('Action failed. Error: ' + asyncResult.error.message);
        } else {
            write('Added new binding for table with' asyncResult.value.columnCount + ' columns');
        }
    });








Afterwards you can retrieve the binding again and read data from that binding. Unfortunately the sample code in the MSDN article only showed how to read data from a text binding – so it took me some time to find out how to read it from TableData object.









//Retrieve binding - if no binding - provide warning
Office.context.document.bindings.getByIdAsync("stockdata", function (asyncResult) {
   if (asyncResult.status == Office.AsyncResultStatus.Succeeded) 
   {
         //Loop over table rows
         asyncResult.value.getDataAsync({coerciontype:Office.CoercionType.Table},function(asyncResult2){
           if (asyncResult2.status == Office.AsyncResultStatus.Succeeded)
           {
               var rows = asyncResult2.value.rows;
               for (i = 0; i < rows.length; i++)
               {
                  write(rows[i][1]);
               }                       
            }
         });                
    }
});








In a next blog post I will explain how you can you use events in combination with the binding object.









Wednesday, January 2, 2013

Saving the Windows Phone 8 Emulator State

    Saving the emulator state between runs was one of the feature needed for the Windows Phone emulator, but till now it is not officially supported. It even makes more sense now when the Windows Phone 8 emulator is a full working operating system and not a trimmed one like Windows Phone 7/7.5 was. You could configure an email account, personalize the start screen, install some applications, install certificates or even save the state of an application that requires a lot of data to synchronize before the actual debugging and have everything ready the next time you start the emulator.
   Today I was trying to run the Windows Phone 8 emulator on a Parallels 8 machine using this post because I hate Windows 8 performance in Bootcamp (the disk access is crappy and the UEFI mode still needs drivers for sound, video and a way to enable Hyper-V). I observed that the first time you run an Windows Phone emulator it took more than 40 seconds to start. The reason is that the SDK creates a new Virtual Machine in Hyper-V and saves a "clean" snapshot of it.

       On every subsequent run of that emulator the XDE automatically starts the virtual machine and immediately applies the snapshot (or starts the virtual machine from the snapshot directly). What caught my attention was the name of the snapshot for each virtual machine: 
  1. Emulator 720P - snapshot.720x1280.1024
  2. Emulator WVGA 512MB - snapshot.480x800.512
  3. Emulator WVGA - snapshot.480x800.1024
  4. Emulator WXGA - snapshot.768x1280.1024
     I tried and messed up the names and observed that XDE, if it doesn't see a certain Snapshot, it starts the Virtual Machine and creates a new snapshot with the required name. So in order to save the state it would be enough to alter/change the snapshot XDE uses to start the virtual machine. 
      First we need to start the emulator we want to personalize (in this post i will mess up the 512 WVGA emulator). This can be done in two ways:
  1. From Visual Studio by running a program on that emulator or from Application Deployment (the emulator is easy to personalize because you can zoom the content and you have the hardware buttons but will require a subsequent reset of the Virtual Machine from Hyper-V) 
  2. From Hyper-V manager by starting the Emulator WVGA 512MB virtual machine and applying the saved snapshot for a fast start. After the machine starts you will have to connect to it:

    Once connected to the emulator/virtual machine you can personalize/modify the way you want it to be. If you connected using Hyper-V these keyboard shortcuts will prove helpful (they also work in the emulator):


  • F1 - the same as pressing the back button
  • F2 – the same as pressing the home button
  • PageUp  - enables physical keyboard and minimizes the software keyboard
  • PageDown – disables physical keyboard and maximizes the software keyboard
  • F9 - volume up
  • F10 - volume down
  • F7 – invoke camera
  • F3 – invoke Bing search
If you want/need to install some xap's you can use Application Deployment with the Emulator. 
When you've reached the desired state go to the Hyper-V manager, select the Virtual machine that you are personalizing and hit Snapshot. This will create a new Snapshot(save state for the emulator).

If you've started the emulator from Visual Studio or Application Deployment App before you create the snapshot you will have to connect to the Virtual Machine from Hyper-V and from the menu Action select Reset (this will clean the ports used for debugging and the state you will save will be usable for Visual Studio and XDE).

After saving the new state the only thing you have to do is to rename the snapshot with the same name of the parent snapshot and delete the parent by right-clicking on it and select Delete Snapshot (DO NOT select Delete Snapshot Subtree).

You are now ready to go:  Turn Off the virtual machine from Hyper-V and try it from Visual Studio. Everything should work. If it doesn't it means that the state has some ports that Visual Studio uses still opened and in this case you will have to connect to the Virtual Machine from Hyper-V, Reset the machine from Action and save a new Snapshot.


My personalized emulator looks like this:


If you want to get back to an "unaltered" state just delete the snapshot of the corresponding Virtual Machine from Hyper-V Manager.


Hope saving the emulator state will help you in some scenarios.

NAMASTE!

Tuesday, January 1, 2013

GetNativeSystemInfo on Windows Phone 8

  This post is related/continues my previous one. I have written a small sample that shows how to call the GetNativeSystemInfo and IsProcessorFeaturePresent functions on Windows Phone 8 devices using a  C++ runtime component. For the moment I cannot think of a really good use for calling these functions because there are only two processors on the devices currently available. You could detect which of the two processors the device has and also its features. 
    Here is a screenshot of the sample running on my Nokia Lumia 920:



As it is the first day of the new year I Wish you all a great 2013!

SOURCE CODE