# Python Tools for Visual Studio - Home

Free ebook: Programming Windows 8 Apps with HTML, CSS, and JavaScript - Microsoft Press Added April 10, 2014: The second edition of this ebook, updated for Visual Studio 2013 and Windows 8.1, is posted here! Hello, Kraig Brockschmidt here. To help celebrate //build/, I’m delighted to announce the completion of Programming Windows 8 Apps with HTML, CSS, and JavaScript! You can download the ebook in PDF format here: (17.9 MB) EPUB format is here: MOBI format is here: The ebook’s companion content is here: This free ebook provides comprehensive coverage of the platform for Windows Store apps. It has been a wild ride these last few months to finish a book of this magnitude at the same time we were building up to the public release of Windows 8. In the end, then, there is much in this ebook that will be highly valuable to developers working on Windows 8 apps in whatever language. Introduction Welcome, my friends, to Windows 8! Stay in Touch

Percentage Percentages are often useful in programs.With the numbers oneand two,we can get a percentage of 50%. We display and process percentages with doubles. We solve an annoying rounding problem. Double Example First, we see some code that uses string.Format to display two numbers or ratio as a percentage. string.Format Also:The second DisplayPercentage accepts two parameters and then passes the ratio of them to the other method. Casts Finally:GetPercentageString accepts a double containing a ratio and returns a percentage string using ToString(). ToString Example 2 Here we convert two integers into a percentage manually with division and multiplication. Program that converts ratios: C# using System; class Program { static void Main() { // We want to have 92.9% from these two numbers. int valid = 92; int total = 99; // First multiply top by 100 then divide. double percent = (double)(valid * 100) / total; // <-- Use cast // This is the percent number. Casting to double. Divide Modulo Modulo Summary

PythonAnywhere Website Thumbnails with CSS — Boldewyn’s Website A thumb­nail view of a web­site is mean­while a com­mon sight. Google has re­cently in­tro­duced it in its search res­ults page, and nu­mer­ous ad ser­vices offer more or less an­noy­ing tool tips with page pre­views. What all these in­stances have in com­mon is the need for ren­der­ing the webpage in ques­tion on the server and dis­play­ing the image only to the cli­ent. In this art­icle I’ll show a thumb­nail tech­nique that works in the browser alone (given some CSS3 sup­port). The Tech­nique A thumb­nail is a mini­fied ver­sion of the ori­ginal. The above will render the ele­ment with ID #thumb at ⅓ of its ori­ginal size. The trick is now to apply this CSS to an iframe ele­ment. Since the cor­res­pond­ing CSS3 spe­cific­a­tions are not final yet, we have to set the known browser pre­fixes for the newer CSS prop­er­ties. En­han­cing with Javas­cript There is one major draw­back of the above simple CSS. width: 320px; height: 160px; Auto-Thumb­nails It Could be more Power­ful A Final Note

Letter frequency The frequency of letters in text has often been studied for use in cryptanalysis, and frequency analysis in particular. No exact letter frequency distribution underlies a given language, since all writers write slightly differently. Linotype machines assumed the letter order, from most to least common, to be etaoin shrdlu cmfwyp vbgkjq xz based on the experience and custom of manual compositors. Likewise, Modern International Morse code encodes the most frequent letters with the shortest symbols; arranging the Morse alphabet into groups of letters that require equal amounts of time to transmit, and then sorting these groups in increasing order, yields e it san hurdm wgvlfbk opjxcz yq. Similar ideas are used in modern data-compression techniques such as Huffman coding. Introduction Letter frequencies, like word frequencies, tend to vary, both by writer and by subject. Accurate average letter frequencies can only be gleaned by analyzing a large amount of representative text. Notes