background preloader

Python Tools for Visual Studio - Home

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[edit] 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

Python Development with PyDev and Eclipse Python Development with PyDev and Eclipse - Tutorial Copyright © 2009, 2010, 2011, 2012, 2013 vogella GmbH Python, Pydev and Eclipse This article describes how to write and debug Python programs with Eclipse This article is based on Eclipse 4.3, Python 3.3.1 and PyDev version 2.7.3. Python is an interpreted programming language and claims to be a very effective programming language. The name Python is based on the TV show called Monty Python's Flying Circus. Key features of Python are: high-level data types, as for example extensible lists statement grouping is done by indentation instead of brackets variable or argument declaration is not necessary supports for object-orientated, procedural and functional programming style 1.2. Python identify blocks of code by indentation. This tutorial will first explain how to install Python and the Python plugins for Eclipse. Download Python from 2.2. The following assume that you have already Eclipse installed. 2.3. Warning

Getting Started: Building a Chrome Extension Extensions allow you to add functionality to Chrome without diving deeply into native code. You can create new extensions for Chrome with those core technologies that you're already familiar with from web development: HTML, CSS, and JavaScript. If you've ever built a web page, you should feel right at home with extensions pretty quickly; we'll put that to the test right now by walking through the construction of a simple extension that will give you one-click access to pictures of kittens. Kittens! We'll do so by implementing a UI element we call a browser action, which allows us to place a clickable icon right next to Chrome's Omnibox for easy access. Clicking that icon will open a popup window filled with kittenish goodness, which will look something like this: If you'd like to follow along at home (and you should!) The very first thing we'll need to create is a manifest file named manifest.json. The next block defines the extension's name, description, and version.

Count Letter Frequencies English text contains some letters more than others. It is possible to compute a table of letter frequencies. We do this with a method in the C# language. This may be part of a homework assignment or required for simple textual analysis. Example The first part of the solution is declaring an array to store the frequencies. ArrayInt Array Description of part 1. Char Type Description of part 2. File.ReadAllText: TXT Next:We add up frequencies by iterating over each letter, and casting it to an int. Finally:We display all letter or digit characters we found. Console.WriteLine Correct Incorrect code is worse than useless in production environments. Input file aaaa bbbbb aaaa bbbbb aaaa bbbbb CCcc xx y y y y y Z Output Letter: C Frequency: 2 Letter: Z Frequency: 1 Letter: a Frequency: 12 Letter: b Frequency: 15 Letter: c Frequency: 2 Letter: x Frequency: 2 Letter: y Frequency: 5 Summary We counted the letter frequencies in a string or file using the C# language.

The Python Script Collection For Windows - Automating Microsoft Outlook For Outlook automation it is nesseccary to use the makepy utility. You do this either from the tools menu of the Pythonwin-Editor (installed with Pywin32 or ActivePython) or you call the file c:\python23\Lib\site-packages\win32com\client\ You then have to select the Outlook Object Library ("Microsoft Outlook 10.0 Object Library" for Office 10.0 or known as Office XP). After that Python generates cachefiles into the directory c:\python23\Lib\site-packages\win32com\gen_py or c:\temp\gen_py to tell Python more about the Outlook object library. Here is a well known example which dumps all adressbook entries from your default adressbook: Letter frequency Letter frequency You are encouraged to solve this task according to the task description, using any language you may know. Open a text file and count the occurrences of each letter. Some of these programs count all characters (including punctuation), but some only count letters A to Z. [edit] ACL2 (defun increment-alist (tbl key) (cond ((endp tbl) (list (cons key 1))) ((eql (car (first tbl)) key) (cons (cons key (1+ (cdr (first tbl)))) (rest tbl))) (t (cons (first tbl) (increment-alist (rest tbl) key))))) (defun freq-table (xs) (if (endp xs) nil (increment-alist (freq-table (rest xs)) (first xs)))) (defun letter-freq (str) (freq-table (coerce str 'list))) [edit] Ada Sample Output (counting the characters of its own source code): >. [edit] Aikido import ctype var letters = new int [26] var s = openin (args[0])while (! [edit] APL freq←{(⍪∪⍵),+/(∪⍵)∘.⍷⍵} freq 0 1 2 3 2 3 4 3 4 4 40 11 12 23 34 4 freq 'balloon'b 1a 1l 2o 2n 1 [edit] AutoHotkey Output (using script's own file): [edit] AutoIt Output : !