Help Links

Free eBooks from Microsoft Press on Windows 8 and Windows Server 2012

December 1, 2012 .NET, All, CodeSnippets, Community, DevLabs, Help Links, Microsoft, Microsoft Press, MSDN, Must-Have, Recommends, VisualStudio, VS2012, Windows, Windows 8, Windows Server 2012, Windows Store No comments

Introducing Windows 8: An Overview for IT Professionals (Final Edition)

image

You can download the eBook in:
Introducing Windows 8- An Overview for IT Professionals – PDF ebook

Introducing Windows 8-An Overview for IT Professionals – Mobi format for Kindle
Introducing Windows 8-An Overview for IT Professionals – ePub format

If you prefer a hard copy of the final book, you can order it here for $14.99 from official distributor, O’Reilly Media.

Introducing Windows Server 2012 (RTM Edition)

675353.indd

PDF – Introducing Windows Server 2012 RTM Edition – PDF ebook

EPUB – Introducing Windows Server 2012 RTM Edition – ePub format

MOBI – Introducing Windows Server 2012 RTM Edition – MOBI format (for Kindle)

If you prefer a hard copy of the book, you can order it here for $14.99 from official distributor, O’Reilly Media.

 

 

Programming Windows 8 Apps with HTML, CSS, and JavaScript (Final Edition)

672611.indd 

You can download the eBook in:

PDF – http://go.microsoft.com/FWLink/?Linkid=270056 (17.9 MB)

EPUB – http://go.microsoft.com/FWLink/?Linkid=272592 (37.3 MB)

MOBIhttp://go.microsoft.com/FWLink/?Linkid=272591 (69.5 MB)

 

Provided to by Microsoft Press Team Blog

Free HTML5 Certification and Training Offer from Microsoft–Prove your HTML5 Programming Skills for free

December 1, 2012 All, Certification, Community, CSS, CSS 3, DevLabs, Help Links, HTML, HTML5, JavaScript, jQuery, KnowledgeBase, Microsoft, Microsoft Learning, MSDN, StyleSheets, VisualStudio, VS2012, Web, Web 2.0, Windows, Windows 8, Windows 8 apps development, Windows Store Development, WinJS 8 comments

Microsoft few month back launched a free HTML5 Certification program for exam – 070-480 – Programming in HTML5, CSS3 and JavaScript. To prepare for this exam you have set of nice Training materials also available through http://www.microsoftvirtualacademy.com. Lets go through in detail How you can utilize this exam.

When you pass Exam 70-480: Programming in HTML5 with JavaScript and CSS3, you complete the requirements for the following certification(s):

  • Programming in HTML5 with JavaScript and CSS3 Specialist

Also Exam 70-480: Programming in HTML5 with JavaScript and CSS3: counts as credit toward the following certification(s):

  • MCSD: Web Applications
  • MCSD: Windows Store Apps using HTML5

FREE TRAINING RESOURCES FOR 70-480!  & HOW TO PREPARE FOR THIS EXAM

  1. Attend the training session https://www.microsoftvirtualacademy.com/tracks/developing-html5-apps-jump-start
  2. Complete the training session. Now you will have enough knowledge to write the exam. But remember to practice what you have learnt.
  3. Additionally Prepare for your certification exams and boost your dev skills with:
    Kraig Brockschmidt’s FREE e-book: "Programming Windows 8 Apps with HTML, CSS, and JavaScript" .
  4. You can download the eBook in PDF format here: http://go.microsoft.com/FWLink/?Linkid=270056 (17.9 MB)

    EPUB format is here: http://go.microsoft.com/FWLink/?Linkid=272592 (37.3 MB)

    MOBI format is here: http://go.microsoft.com/FWLink/?Linkid=272591 (69.5 MB)

    Download the Updated Companion Content Set for the Book  (source code samples) (59MB)

FREE EXAM VOUCHER FOR 70-480!

  • Register now to take Exam 70-480 Programming in HTML5 with JavaScript and CSS3 for FREE!
  • Just use this voucher code when scheduling your exam: HTMLJMP (voucher code available through 3/31/2013 or while supplies last.)

HOW TO TAKE THE EXAM

  • Go to www.register.prometric.com and follow the steps to schedule Exam 70-480: Programming in HTML5 with JavaScript and CSS3 at a testing center near you.
  • Use the voucher code HTMLJMP to get the free exam.

That’s it you are an HTML5 Programmer or a beginner and you want to prove your HTML5 development skills – then this is the right time. You will have the time till 03/31/2013 and till stocks last. Happy Programming.. Remember sharing is caring, so share with your friends.Smile

Courtesy: Microsoft Learning & Microsoft Virtual Academy

Zip(Archive) API’s in .NET Framework 4.5 – ZipArchive Class

October 22, 2012 .NET, .NET Framework, .NET Framework 4.5, All, Back-2-Bascis, C#.NET, Codes, CodeSnippets, General, Help Links, KnowledgeBase, Microsoft, Samples, VB.NET, VisualStudio, VS2012 1 comment

With release of .NET Framework 4.5, Microsoft has introduced new classes in to System.IO.Compression namespace. These classes will add the necessary programming support for Zipping(Achiving), and Extracting support for Zip Files in your .NET Source Code.

Below are the newly introduced classes as part of .NET Framework 4.5:

ZipArchive – Represents a package of compressed files in the zip archive format.

ZipArchiveEntry – Represents a compressed file within a zip archive.

ZipFile – Provides static methods for creating, extracting, and opening zip archives.

ZipFileExtensions – Provides extension methods for the ZipArchive and ZipArchiveEntry classes.

In this blog post I am going to discuss about ZipArchive class which will help you with most of the important tasks in Archiving a file or folder using .NET.

The ZipArchive class enables you to work with a package of compressed files. The package contains an entry for each compressed file. You can:

  • Retrieve an entry by using the GetEntry method.
  • Retrieve the entire collection of entries by using the Entries property.
  • Create a new entry in the package by calling the overloaded CreateEntry method.

If you add reference for the System.IO.Compression.FileSystem assembly in your project, you can access three extension methods (from the ZipFileExtensions class) for the ZipArchive class: CreateEntryFromFile, CreateEntryFromFile, and ExtractToDirectory. These extension methods enable you to compress and decompress the contents of the entry to a file.

The System.IO.Compression.FileSystem assembly is not available for Windows Store apps.

In Windows Store apps, you can compress and decompress files by using the DeflateStream or GZipStream class, or you can use the Windows Runtime types Compressor and Decompressor.

Here is the quick sample that would help you to understand how to use ZipArchive class. Code is self explanatory – hope that helps. There are three methods ZipFiles – zip all files in a folder, ExtractFile – to extract files with specificname, ExtractFiles – extract multiple files.

Please go through the below code snippet. If you need additional information: visit MSDN Ref on System.IO.Compression, and in later posts we might discuss about the ZipFile class in more detail.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.IO.Compression;
using System.IO;

namespace ConsoleApp01
{
    class Program
    {
        static void Main(string[] args)
        {
            string targetZip = AppDomain.CurrentDomain.BaseDirectory + "\" + System.Guid.NewGuid().ToString() + ".zip";

            string sourceFolder = AppDomain.CurrentDomain.BaseDirectory + "\Sample01" ; //We are going to zip the whole contents of the folder. 

            Console.WriteLine(String.Format("Now Archiving the folder/file {0}, to target zip:{1} ", sourceFolder, targetZip));

            //Zipping the folder 
            ZipFiles(sourceFolder, targetZip);



            string extractFolder = AppDomain.CurrentDomain.BaseDirectory + "\" + Path.GetFileNameWithoutExtension(targetZip);

            Console.WriteLine(String.Format("Now Extracting the file {0}, to location:{1} ", targetZip, extractFolder));

            //Extract the entire Zip file 
            ExtractFiles(targetZip, extractFolder);



            //Extract files based on search pattern such as *.txt
            string extractFolder2 = AppDomain.CurrentDomain.BaseDirectory + "\" + Path.GetFileNameWithoutExtension(targetZip) + "12";

            Console.WriteLine(String.Format("Now Extracting the selected file(s) {0}, to location:{1} ", targetZip, extractFolder2));
            
            //Extract the entire Zip file 
            ExtractFiles(targetZip, extractFolder2, "*.txt");

            Console.WriteLine("Press any key to exit");

            Console.ReadKey();
        }

        /// <summary>
        /// Zips the files from the source folder - for now single level - assuming that we will be zipping all the files in a folder. 
        /// not the child folders and files in it, we will ignore it.
        /// </summary>
        /// <param name="sourceFilesFolderPath">The source files folder path.</param>
        /// <param name="targetZipFilePath">The target zip file path.</param>
        /// <param name="searchPattern">The search pattern.</param>
        public static void ZipFiles(string sourceFilesFolderPath, string targetZipFilePath, string searchPattern = "")
        {
            //if Source Directory exists. 
            if (Directory.Exists(sourceFilesFolderPath))
            {
                using (FileStream zipToOpen = new FileStream(targetZipFilePath, FileMode.OpenOrCreate))
                {
                    //Open Archieve for update
                    using (ZipArchive archive = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
                    {
                        //Getting directory info
                        DirectoryInfo dInfo = new DirectoryInfo(sourceFilesFolderPath);


                        //Getting all files list in the folder 
                        FileInfo[] filesList = dInfo.GetFiles(searchPattern);

                        if (String.IsNullOrEmpty(searchPattern)) //fail safe to retrieve all
                            filesList = dInfo.GetFiles();

                        if (filesList != null && filesList.Length > 0)
                        {
                            //Creating archieve entry for each file in the folder 
                            foreach (FileInfo file in filesList)
                            {
                                archive.CreateEntryFromFile(file.FullName, file.Name);
                            }
                        }


                    }

                }
            }
            else
            {
                throw new DirectoryNotFoundException(String.Format("Source folder: {0} not found",sourceFilesFolderPath);
            }

        }




        /// <summary>
        /// Extracts the files.
        /// </summary>
        /// <param name="sourceZipPath">The source zip path.</param>
        /// <param name="targetExtractPath">The target extract path.</param>
        /// <param name="conditionalExtractPattern">The conditional extract pattern.(OPTIONAL)</param>
        public static void ExtractFiles(string sourceZipPath, string targetExtractPath, string conditionalExtractPattern = "")
        {
            string zipPath      = sourceZipPath;  //Source Zip File 
            string extractPath  = targetExtractPath; //Path to Extract

            if (!Directory.Exists(targetExtractPath))
            {
                Directory.CreateDirectory(targetExtractPath);
            }

            using (ZipArchive archive = ZipFile.OpenRead(zipPath))
            {

                //STEP 1
                foreach (ZipArchiveEntry entry in archive.Entries)
                {
                    //Conditional extract
                    if (!String.IsNullOrEmpty(conditionalExtractPattern))
                    {
                        if (entry.FullName.EndsWith(".txt", StringComparison.OrdinalIgnoreCase))
                        {
                            entry.ExtractToFile(Path.Combine(extractPath, entry.FullName),true);
                        }
                    }
                    else // extract all..
                    {
                        entry.ExtractToFile(Path.Combine(extractPath, entry.FullName),true);
                    }

                    
                }

                //Or EXTRACT ALL USING 

                //STEP 2
                //archive.ExtractToDirectory(targetExtractPath);

            } 

        }




        /// <summary>
        /// Extracts the file.
        /// </summary>
        /// <param name="sourceZipPath">The source zip path.</param>
        /// <param name="targetExtractPath">The target extract path.</param>
        /// <param name="extractFileName">Name of the extract file.</param>
        public static void ExtractFile(string sourceZipPath, string targetExtractPath, string extractFileName)
        {
            string zipPath = sourceZipPath;  //Source Zip File 
            string extractPath = targetExtractPath; //Path to Extract

            using (ZipArchive archive = ZipFile.OpenRead(zipPath))
            {
                //STEP 1
                foreach (ZipArchiveEntry entry in archive.Entries)
                {
                    //Conditional extract
                    if (!String.IsNullOrEmpty(extractFileName))
                    {
                        //Extract the file.
                        if (entry.FullName.EndsWith(extractFileName, StringComparison.OrdinalIgnoreCase))
                        {
                            entry.ExtractToFile(Path.Combine(extractPath, entry.FullName), true);
                        }
                    }

                }

            }

        }

    
    }
}


Write and Publish your blogs in Word 2013 – Office 2013

October 18, 2012 All, Help Links, KnowledgeBase, Microsoft, Office, Office 2013, Recommends, Tips & Tricks, Web 2 comments

Word 2013 in Office 2013 having a nice feature which will help us to write blog posts and publish to any blog provider such as wordpress, blogger etc.

Using the blog post template in Word 2013 ,you can easily write blog posts in your word and publish them to your blog.

Here is some screen shots that explains it from Office 2013 preview

image

Select Blog post template –> it will download the template from online repository for first time

 

image

Now it is the time to setup your account

image

You have the following choices Blogger, Sharepoint blog, WordPress, Typepad etc

image

 

If you have selected Blogger, you will see the below prompt asking for blogger credentials

image

or if WordPress specify the wordpress blog url and your account details

image

image

Now it is the time to specify the settings to upload images from the blog post you are creating

image

or your own server

image

 

Now click on OK and you will see and alert message confirming the setup.

If you have multiple blog account you can manage it using the blog account section

image

 

Now write your blog like a normal word document and format it and choose any of the publish option. You also have the option to specify the categories of your post.

 

image

Select the categories

image

 

Awesome isn’t it.. Hope that is helpful. Try it yourselves.