Thursday, December 13, 2012

Windows store App : enable type-to-search feature in other page


In your xaml code u bind these to events to page::


    Loaded="pageRoot_Loaded_1"
    Unloaded="pageRoot_Unloaded_1"


and inside these methods u have to bind and unbind ur events for keydown or keypress ::


    private void pageRoot_Loaded_1(object sender, RoutedEventArgs e)
    {
        SearchPane.GetForCurrentView().ShowOnKeyboardInput = true;
    }



This is enough for enabling for type tp search

if there is a some requirement u can also use the following by setting it to false


    private void pageRoot_Unloaded_1(object sender, RoutedEventArgs e)
    {
        SearchPane.GetForCurrentView().ShowOnKeyboardInput = false;
    }

Thursday, November 29, 2012

Convert json date to C#, code for tested for windows 8 and android devices developed with mono and ,


 Convert json date to C#, code for tested for windows 8 and android devices developed with mono and ,
this method uses "TimeZoneInfo.Local" Most of the time it will return in GMT(GreenWich Mean Time format)

public string ConvertJsonDateToDate(string dateString)
{
    string ConvertedDate = null;
    if (string.IsNullOrEmpty(dateString))
    {
        return DateTime.Now.ToString();
    }
    Regex re = new Regex(@"(\d+)([-+]\d{4})");
    Match match = re.Match(dateString);
    long timestamp = 0; int offset = 0;
    if (!string.IsNullOrEmpty(match.Groups[1].Value))
    {
        timestamp = Convert.ToInt64(match.Groups[1].Value);
        offset = Convert.ToInt32(match.Groups[2].Value) / 100;
    }
    ConvertedDate = TimeZoneInfo.ConvertTime(new DateTime(1970, 1, 1).AddMilliseconds(timestamp), TimeZoneInfo.Local).ToString();
    return ConvertedDate + " GMT";

}


Windows 8 app certification requirements


Windows Software Development Kit (SDK) for Windows 8


download link :: http://msdn.microsoft.com/en-US/windows/desktop/hh852363


Windows 8 app certification requirements (Windows)

http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx

Very Basic of windows stroe app \ windows 8 apps : PLM - Page Lifecycle management in



Following are some of the common Methods available in any xaml.cs file

//Constructor 
public GroupedItemsPage()
{
    this.InitializeComponent();
}


protected override void OnNavigatedTo(NavigationEventArgs e)
{
    base.OnNavigatedTo(e);
}


protected override void LoadState(Object navigationParameter, Dictionary pageState)
{
   base.OnNavigatedTo(navigationParameter, pageState);
}


protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
    base.OnNavigatingFrom(e);
}


public ItemDetailPage()
{
     this.InitializeComponent();
}



protected override void OnNavigatedFrom(NavigationEventArgs e)
{
    base.OnNavigatedFrom(e);
}


protected override void SaveState(Dictionary pageState)
{
    base.SaveState(pageState);
}


(eg - first page name is GroupedItemsPage  and  second page name is ItemDetailPage) 

Onstart Up 1st it calls the Constructer With no Doubt,  

the 2nd hit is OnNavigatedTo method 

the 3rd hit is LoadState method

...... while calling any xaml page WinRT executes in these sequence ( Evert time same sequence ... ), 

When we are clicking on a some other page Link or item 

1st it calls OnNavigatingFrom method 
2nd it calls Constructer of the second page i.e. ItemDetailsPage
3rd OnNavigatedFrom
4th SaveState

Wednesday, November 21, 2012

Extended Splash Screen in Windows 8 Apps

U can these following links For Help

http://www.windows8designhandbook.com/designing-a-windows-8-splash-page.html


http://www.c-sharpcorner.com/UploadFile/99bb20/extended-splash-screen-in-metro-style-application/

http://msdn.microsoft.com/en-us/library/windows/apps/hh465338.aspx



Thursday, August 25, 2011

Java Tools: Source Code Optimization and Analysis

Below is a list of some tools that can help you examine your Java source code for potential problems:


1. PMD from http://pmd.sourceforge.net/

License: PMD is licensed under a "BSD-style" license

PMD scans Java source code and looks for potential problems like:

* Possible bugs - empty try/catch/finally/switch statements
* Dead code - unused local variables, parameters and private methods
* Suboptimal code - wasteful String/StringBuffer usage
* Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
* Duplicate code - copied/pasted code means copied/pasted bugs

You can download everything from here, and you can get an overview of all the rules at the rulesets index page.

PMD is integrated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.

2. FindBug from http://findbugs.sourceforge.net/

License: L-GPL

FindBugs, a program which uses static analysis to look for bugs in Java code. And since this is a project from my alumni university (IEEE - University of Maryland, College Park - Bill Pugh) , I have to definitely add this contribution to this list.

3. Clover from http://www.cenqua.com/clover/

License: Free for Open Source (more like a GPL)

Measures statement, method, and branch coverage and has XML, HTML, and GUI reporting. and comprehensive plug-ins for major IDEs.

* Improve Test Quality
* Increase Testing Productivity
* Keep Team on Track

Fully integrated plugins for NetBeans, Eclipse , IntelliJ IDEA, JBuilder and JDeveloper. These plugins allow you to measure and inspect coverage results without leaving the IDE.

Seamless Integration with projects using Apache Ant and Maven. * Easy integration into legacy build systems with command line interface and API.

Fast, accurate, configurable, detailed coverage reporting of Method, Statement, and Branch coverage.

Rich reporting in HTML, PDF, XML or a Swing GUI

Precise control over the coverage gathering with source-level filtering.

Historical charting of code coverage and other metrics.

Fully compatible with JUnit 3.x & 4.x, TestNG, JTiger and other testing frameworks. Can also be used with manual, functional or integration testing.

Saturday, July 23, 2011


{Top 10 Techies Who Changed The World}

shiva.gif

Steve Jobs, Apple Maverick entrepreneur and co-founder of Apple, Steve Jobs is the current grandmaster of technology. Business savvy and a risk taker, Jobs is the visionary who redefined technology with world changing products like the Personal Computer, iPod, iPhone and iPad.

1.jpg

Mark Zuckerberg, Facebook Whizkid Zuckerberg almost single handedly transformed the Internet from a place people went to get information to a place they went to meet each other. Facebook gave the virtual world a patina of humanity, the real world a new medium of interpersonal relationships, and made Zuckerberg not only this generation's phenomenon, but also the second youngest billionaire in the world. Interesting fact: The youngest billionaire is Dustin Moskovitz co-founder of Facebook and 8 days younger than Zuckerberg, his Harvard roommate

2.jpg

Bill Gates, Microsoft The Microsoft founder has passed the legion of supergeeks into the pantheon of technological demi-gods. The richest man in the world from 1995 to 2007 is currently the second richest. He holds 8 percent of Microsoft stock and now functions as the non-executive chairman of the company. Over the years, Gates and wife Melinda have made philanthropy their primary concern and recently pledged to give away at least half their fortune to charity with time.

3.jpg

Linus Torvalds, Linux This Finnish engineer is virtually unknown outside the inner circles of technology, yet he is among the most influential figures in software development. A believer in open source software, Torvalds initiated thedevelopment of the Linux Kernel. He now acts as the coordinator of the project. The Linux operating system runs the 10 fastest supercomputers in the world and a diverse range of hardware including the smallest of devices. A modified version of the Linux kernel powers the ubiqitous Android OS

4.jpg

Larry Page and Sergey Brin, Google Co-founders of internet behemoth Google, Larry Page and Sergey Brin ran Google from a rented garage in 1998. Twelve years later, Google has left it's Silicon Valley startup past way behind to become the world's largest media corporation.

5.jpg

Evan Williams, Twitter & Blogger Virtually unknown in the real world, this college drop-out created two key communication technologies that shaped the Internet Blogger and Twitter. He no longer works at Twitter but he's left an indelible handprint on the cyberworld.

6.jpg

Shigeru Miyamoto, Nintendo Even if you've never played a video game, chances are you've heard of Super Mario Bros. Shigeru Miyamoto is the Japanese game designer behind popular Nintendo titles like Legend of Zelda, Donkey Kong, Star Fox, and the grand old man of gaming, Mario.

7.jpg

Jeffrey Bezos, Amazon In 1994, this Princeton graduate started Amazon.com from his garage in Seattle and changed the face of online retail forever. He began with selling books online but soon diversified into, well, almost everything. Amazon made him a billionaire as well as Time magazine's person of the year in 1999.

8.jpg

Tim Berners-Lee, the World Wide Web 20 years ago British physicist and computer scientist Berners-Lee invented the World Wide Web, the first web browser and the first web server. This man is the reason we can access webpages and surf the Internet using browsers today. (Photo: AP)

9.jpg

Akio Morita, Sony Former naval officer Akio Morita left his family business of sake, miso and soy sauce to co-found Sony Corporation in 1946. Most of Sony's path-breaking products like magnetic tapes, tape recorders, pocket-sized radios, the Walkman and the Discman were developed under his leadership. (Photo: AP)

10.jpg

11th Man: Woz The other Steve who founded Apple with Steve Jobs was Steve Wozniak. Affectionately called Woz, he has been credited with developing the Apple I and Apple II computers in the 1970s. He no longer works full time with Apple, but is still a shareholder and employee of the company.

11.jpg