Small Basic - Nesting Subroutines

Nesting Subroutines A subroutine might call other subroutines, like in Figure 1. In that figure, the main program calls a subroutine, SubA(), which in turn calls another subroutine, SubC(). Subroutines called from other subroutines are nested subroutines. [Image Coming Soon]  Figure 1: Illustrating nested subroutines As an example of using nested subroutines, let’s build on your triangle area calculation program and add other geometric shapes. You’ll add the ability to find (1) the area of a square, where your user enters either its side or the length of its diagonal, and (2) the area of a circle, where your user enters either its radius or its circumference (perimeter). See Figure 2. [Image Coming Soon] Figure 2: Two additional shapes supported by the area calculator program The main program now changes to ask your user whether he wants to find the area of a triangle, a square, or a circle (see Figure 3). Each option is handled by its own subroutine which, as you’ll see in a moment, can call other subroutines to do the job.   Figure 3: The Area Calculator program in action The main program’s in Listing 1. Write this program out; the other listings in this section build on it! Listing 1: Area Calculator  1 '  2 ' Calculates the area of different geometric shapes  3  4 GraphicsWindow.Title  = "Area Calculator"  5 TextWindow.Title      = GraphicsWindow.Title  6 GraphicsWindow.Width  = 480  7 GraphicsWindow.Height = 360  8 GraphicsWindow.CanResize = 0  9 10 GetChoice: 11 bkgndImg = Program.Directory + "\MainMenu.png" 12 GraphicsWindow.DrawImage(bkgndImg, 0, 0) 13 14 TextWindow.Write("Enter your choice [1-3]: ") 15 choice = TextWindow.ReadNumber() 16 17 If (choice = 1 ) Then 18   TriangleAreaManager() 19 ElseIf (choice = 2 ) Then 20   SquareAreaManager() 21 ElseIf (choice = 3 ) Then 22   CircleAreaManager() 23 Else 24   TextWindow.WriteLine("Sorry, that's not an option.") 25 EndIf 26 27 TextWindow.WriteLine("") 28 Goto GetChoice As the program got bigger, you promoted yourself to a higher position (like a director) and hired three managers (the three subroutines) under you to handle the special functions of calculating the areas of triangles, squares, and circles (see Figure 4). Each one of these managers could have other subroutines working for him to perform the required functions. (Don’t talk to these subroutine managers in real life, or people will think you’re crazy; at least put your hand up to your ear so that people think you’re on the phone.)  Figure 4: Illustrating the Area Calculator subroutines The program (that you wrote back in Listing 2) has now become part of the TriangleAreaManager() subroutine in Listing 9-9. The three triangle-area-calculation subroutines are still the same as before, so we won’t show you them again (trust us, this book is long enough). Listing 2  1 Sub TriangleAreaManager  2   bkgndImg = Program.Directory +"\TriMenu.png"  3  GraphicsWindow.DrawImage(bkgndImg, 0, 0)  4    5   TextWindow.Write("Trianglechoice [1-3]: ")  6   choice =TextWindow.ReadNumber()  7    8   If (choice = 1 ) Then  9     Tri1Area() 10   ElseIf(choice = 2 ) Then 11     Tri2Area() 12   ElseIf(choice = 3 ) Then 13     Tri3Area() 14   Else 15     TextWindow.WriteLine("Sorry, that’s not an option.") 16   EndIf 17 EndSub Our SquareAreaManager is still young and energetic (he probably tweets a lot), and he wants to do all the work by himself, without any help from subroutines (see Listing 3). Listing 3  1 Sub SquareAreaManager  2   bkgndImg = Program.Directory +"\SquareMenu.png"  3  GraphicsWindow.DrawImage(bkgndImg, 0, 0)  4  5   TextWindow.Write("Squarechoice [1-2]: ")  6   choice =TextWindow.ReadNumber()  7    8   If ( choice = 1 ) Then  9     TextWindow.Write("Enterthe side-length: ") 10     s = TextWindow.ReadNumber() 11     area = s * s 12     TextWindow.WriteLine("Area = " +area )  13   ElseIf(choice = 2 ) Then 14     TextWindow.Write("Enter the diagonal: ") 15     d = TextWindow.ReadNumber() 16     s = Math.SquareRoot(2) * d 17     area = s * s 18     TextWindow.WriteLine("Area = " +area )    19   Else 20     TextWindow.WriteLine("Sorry, that’s not an option.") 21   EndIf 22 EndSub The subroutine starts by displaying the two available options (see Figure 9-13) and requesting your user to enter his choice (Lines 2-6). If heselects the first choice, the subroutine asks him to enter the side-length ofthe square, and then it calculates and displays the area (Lines 8-12). If heselects the second choice, the subroutine prompts him to enter the length ofthe square’s diagonal, and then it uses the entered value to find the side-lengthsand compute the area (Lines 13-18). If he enters a number that isn’t on thelist, the subroutine tells him that his entered choice isn’t an option (Lines 19-20).   Figure 5: The Square Area Calculator menu Our CircleAreaManager decided to take a different approach. Heisn’t good in math (he doesn’t like pi, but he loves pie), so he decided tohire a worker under him (the CircleAreaCalculator), and that worker calculatesthe two circle options (and she brought in a pi expert). The CircleAreaManager()subroutine is in Listing 9-11. Listing 9-11  1 Sub CircleAreaManager  2   bkgndImg = Program.Directory +"\CircleMenu.png"  3  GraphicsWindow.DrawImage(bkgndImg, 0, 0)  4    5   TextWindow.Write("Circlechoice [1-2]: ")   6   choice =TextWindow.ReadNumber()  7    8   If ( (choice = 1) Or (choice = 2) ) Then  9    CircleAreaCalculator() 10   Else 11     TextWindow.WriteLine("Sorry,that’s not an option.") 12   EndIf 13 EndSub 14 15 SubCircleAreaCalculator 16   If( choice = 1 ) Then 17     TextWindow.Write("Enterthe radius: ") 18     r = TextWindow.ReadNumber() 19   Else 20     TextWindow.Write("Enterthe circumference: ") 21     c = TextWindow.ReadNumber() 22     r = c / (2 * Math.Pi ) 23   EndIf 24   25   area = r * r * Math.Pi 26   TextWindow.WriteLine("Area = " +area ) 27 EndSub Like before, this subroutine displays the available choices (seeFigure 9-14) to the user and waits for her input (Lines 2-6). If her choice isvalid, Small Basic calls the CircleAreaCalculator() subroutine to do thecalculation (Lines 8-9). If it isn’t valid, your program displays an errormessage, “Sorry, that’s not an option” (Lines 11-12).   Figure 6: The Circle Area Calculator menu How does the CircleAreaCalculator() subroutine know what todo? Well, the top-level manger, the CircleAreaManager() subroutine, saves thetype of calculation to be done (in the choice variable) beforemaking the call. It calls the CircleAreaCalculator() subroutine only if youruser’s choice is valid (she picks 1 or 2). That’s why the CircleAreaCalculatorsubroutine uses a single If/Else statement. Change the main program from this section to adda rectangle to the main menu. Add a RectangleAreaManager() subroutine foryour user to enter either: (1) the length and width of the rectangle, or (2)the length of one side and the diagonal as we show below. (Hint: the folder forthis exercise has all the images you’ll need.)  

Posted by on 19 April 2015 | 1:59 am

Last chance to save big on WPC 2015!

Save US$200 by registering early On April 23, the price for an all-access pass for WPC 2015 increases to US$2,195. Now is your last opportunity to save big on attending the largest Microsoft partner event of the year. Don’t miss out on the insights, connections and opportunities and register today for WPC 2015. Speakers and sessions you simply can’t miss In addition to myriad networking opportunities with the leaders and innovators of the IT industry, WPC features hundreds of sessions and speakers to give you the latest learning's and analysis—all to help partners reach new levels of profitability and growth. Whether your goal is to innovate and create new solutions, engage your customers by improving your existing sales and marketing capabilities, transform your business to adapt to the changing industry or find new and effective leadership strategies, sessions at WPC offer you actionable information to get ahead. Explore our session catalogue today and find out more about our featured speakers—you won’t want to miss them. The WPC Solution Opportunities abound at WPC, but all of the activities are focused on bringing partners new opportunity and profitability by addressing common business challenges and providing solutions. What will your focus be at WPC 2015?

Posted by on 19 April 2015 | 12:55 am

Azure Guru Winners - March 2015

It's time to award our top articles of the month!   And below are the Azure Guru results for the TechNet Guru Awards, March 2015 !!!!   The TechNet Guru Awards celebrate the technical articles on TechNet, contributed from valued wiki authors like YOU! Each month, the contributions are scored by a panel of judges (5 per category, 2-3 in each are MS experts), and the winners of each category are showered with love and attention from all corners of TechNet.        Microsoft Azure Technical Guru - March 2015     saramgsilva Avoid Nightmares Using EF First Migration in Azure Mobile Services JH: "Another nice one from Sara. Definitely worth a look." Ed Price: "I love the use of embedded links to the related library articles! And the article is rich with descriptions, well-formatted code with great commenting, and clarifying images. Plus a link to the source code. Fantastic job on this!" Alan Carlos: "Great! Very detailed!"   Ken Cenerelli Creating an Microsoft Application Insights resource Alan Carlos: "Great article!" Ed Price: "Incredibly thorough how-to article!" JH: "Application Insight is something everybody should have on his radar. Ken provides a nice article to get started."   Prashant Mahajan Azure: MVC application to refer js from blob JH: "Nice alternative on deploying JavaScript on Azure. Worth a look in some deployment scenariosEd Price: "This is a great topic! Could be improved on with code formatting and a See Also section. Good article!" Also worth a mention were the other entries this month: The Way to Migrate to Hyper-v/Azure by Samir FarhatEd Price: "I like the formatting, use of images, and connecting it into the series at the bottom! Could use section headers (with TOC) and a See Also section. Great clarity in this article!" JH: "An article with some potential about moving non-Microsoft virtualized environments to Hyper-V or Azure."   Big thanks go out to Sara, Ken, Prashant, and Samir for a great month of quality Azure articles!   You can find all the March 2015 TechNet Guru award winners here: The Microsoft TechNet Guru Awards! (March 2015)    Have a great weekend!    - Ninja Ed  

Posted by on 18 April 2015 | 8:31 pm

Office 365 and are converging infrastructure

If you’ve talked to me in person over the past few months, you may have heard me talk about this. But if not, I’ll talk about it in this blog post and what it means. Some background Exchange Online Protection (EOP), the mail filtering branch of Office 365 (I use the terms interchangeably) is the email-for-enterprise part of Microsoft. EOP originally started off as Frontbridge Technologies, based out of Los Angeles. It was acquired by Microsoft in 2005 and was renamed a few times, most recently as Forefront Online Protection for Exchange (FOPE). All of the backend infrastructure of FOPE has been retired and EOP is entirely built on a different platform. Hotmail was acquired by Microsoft in the 1990’s and a couple of years ago was rechristened as, which I will heretofore refer to as “consumer”. It ran on a different filtering stack, and email filtering technology, than EOP/FOPE. We shared some technology but not that much as the email in consumer is different than the email in enterprise. Furthermore, the architectural differences between the two made sharing technologies difficult even if we wanted to share. While we negotiated third party vendor contracts as a company, we each implemented them differently. Over the past several months, the two teams merged – Hotmail and EOP together at last. That’s all well and good, the two teams are together. But what next? The way forward The next step is to merge the two platforms. I would argue that Hotmail’s spam filter technology is more advanced than EOP’s (but not in all aspects) but that EOP’s backend platform is more advanced than Hotmail’s (although not necessarily in all aspects). For example, Hotmail only started supporting TLS in either 2013 or 2014 but FOPE/EOP has supported it for at least a decade. Furthermore, the mailbox infrastructure in EOP is more suitable for redundancy, failover, and message tracing. So, starting six months ago and continuing into the foreseeable future, Hotmail is moving onto the EOP infrastructure and it is an absolutely massive undertaking. We have to ensure all of the features that we available in Hotmail are supported in EOP – that includes MTA, spam filter, and web UX – and then we have to ensure that EOP is properly equipped to handle a 5x (?) increase in load. EOP’s infrastructure is “heavier” than Hotmail’s because the requirements for enterprise (i.e., redundancy, queuing) are more demanding. Some challenges Hotmail is also a different customer than any other tenant in EOP. One of EOP’s strengths is its geolocale feature – customers are provisioned in a particular geo-region. If you’re based in North America, all of your email flows through data centers in North America. If you’re based in Europe, all of your email flows through Europe. However, Hotmail has a global footprint. That means that a single customer has to span every single geo-region. We don’t have any customers like that currently. One of the big benefits for Hotmail/ users is that if they are both users of that service and then for Office 365, they get the same platform and look-and-feel in both. The UX is the same, and they integrate a lot better. You can move from one to the other without having to relearn a bunch of things. In addition, antispam technologies that work in one can move to the other since the backend is the same. Because the pipes that plug into both are both now hooked up to each other (sort of; it’s not quite this simple) we can leverage technology between the two a lot better. The two services probably won’t use the same filter, but each will have parts in common. The drawback of migration is that it means we have to devote a lot of time and resources towards migrating users, and this results in opportunity cost of not being able to do new features that can help improve the overall customer experience. Having been through two (!) rewrites already before this, that’s frustrating for me. But in the end, having two services running on different stacks is unsupportable. What I’m working on that relates to this Unlike many other members of my team, I am peripherally involved in the migration of Hotmail-to-EOP. The biggest ones I am doing: The Safety UX Hotmail has a green shield for senders who are heavily spoofed but authenticate, but Outlook Web Access (OWA) does not. I’m working on overhauling the safety experience in OWA so that users can know why a message is marked up the way it is, and then carry over this experience to enterprise and not only in consumer. Backscatter protection with Boomerang You’ve heard me talk about Backscatter protection with Boomerang before. We just released it enterprise, and it’s a necessary component before migrating consumer mailboxes. DKIM and DMARC EOP already supports inbound DKIM verification, but so does EOP supports DMARC and so does, but EOP does it a little differently (I have other blog posts that explain the difference). However, EOP has yet to turn on DMARC reports, we have to fix a couple of items in the Exchange MTA before we do. Then we will be at parity with Hotmail. But even more than that, EOP is currently working on DKIM-signing (it’s on our public roadmap). Eventually, when Hotmail moves over to EOP I’d like to get it to start signing with DKIM. That will be an improvement to the Hotmail service, rather than a simple migration. People sometimes ask me “Does Hotmail plan to create a DMARC record with p=reject the same way that Yahoo and AOL do?” My response is non-committal. Before we can look at that, we need to get the fix in Exchange completed to preserve message content. We can deploy this fix in Office 365, but we also need to push it to various versions of on-premise Exchange server; what versions do we push it to? How much uptake is enough? Next, we need to sign all mail in Hotmail with DKIM which means we have to migrate the entire user base of Hotmail over to EOP. Then, we have to measure and assess the potential impact. So before I can even answer the question, I need to know what will happen if we do and then do a cost/benefit analysis and as you can see, it’s a long path forward. So, that’s part of what’s happening with Office 365 and right now. It’s not everything that’s going on with the service but it is a big part of it.

Posted by on 18 April 2015 | 3:46 pm

Office 365 will slightly modify its treatment of anonymous inbound email over IPv6

Exchange Online Protection (EOP), aka Office 365, is going to be making a small change to its behavior for inbound anonymous (i.e., not sent over TLS) email sent over IPv6. Luckily, for customers with IPv6 enabled, no action is required. Currently, we require the following for senders over IPv6: The sending IPv6 address must have a PTR record. If it does not, the service will reject the message with the permanent reject error: 550 5.7.25 Service unavailable, sending IPv6 address [$SenderIPAddress] must have reverse DNS record. The sending email must pass SPF or DKIM verification. If it does not, the service will reject the message with the permanent reject error: 554 5.7.26 Service unavailable, message sent over IPv6 must pass either SPF or DKIM validation. The change we are making is regarding #2. Starting April 24, 2015, if a message does not pass SPF or DKIM, the service will reject with the following temporary reject error: 450 4.7.26 Service unavailable, message sent over IPv6 must pass either SPF or DKIM validation. In other words the 550 becomes 450, and 5.7.26 becomes 4.7.26. If a sender sends a message over IPv6 that doesn’t pass SPF or DKIM, rather than failing because of the 5xx reject, it should retry at the next available MX record which is IPv4. That is, for a customer like who has enabled receiving email over IPv6, their MX record looks like the following:        3599    IN    MX    5 Which resolves to: 9 IN    A 9 IN    A 9 IN    A 9 IN    AAAA 2a01:111:f400:7c10::1:10 9 IN    AAAA 2a01:111:f400:7c09::11 9 IN    AAAA 2a01:111:f400:7c10::10 A sending mail server that is dual stack (sends over IPv4 and IPv6) will try the AAAA-records first and will bounce the message if it doesn’t send with SPF or DKIM passing. When it receives the 4xx, it will  retry (that is, it will if its RFC-compliant and is properly configured). When it next finds the A-record (IPv4), it will not be rejected since SPF or DKIM is not required for IPv4, although we encourage all senders to authenticate their email. IPv6 still requires the same conditions above, however, the new implementation now allows for automatic failover at the sending MTA level instead of issuing a hard bounce and prompting the domain administrator to set up SPF or DKIM. Related Articles Support for anonymous inbound email over IPv6 A workaround for receivers over IPv6 who receive unauthenticated email (this workaround is now less useful now that we have done the change above) How to create Allow rules for senders in Office 365 over IPv6

Posted by on 18 April 2015 | 12:34 pm

Portal Customization - Creating Search Scopes

Following up with the Previous Post "Portal Customization - Understanding Search Scopes" We will now look into the process of creating a custom Search Scope. For this posting we will Create a Search Scope for " All Politicians " From the Administration Page click on "Search Scopes" Click on New On the General Tab Enter in information about the Search Scope you wish to Build, for this example we will enter the following: Display Name: All Contractors Description...(read more)

Posted by on 18 April 2015 | 12:08 pm


As you may have heard in the technical press, Microsoft is a more open-source friendly place these days, and has embraced GitHub for a number of high-profile projects. As a result of this shift and an internal push to move to git generally, I've updated my existing CodePlex projects so that I can easily mirror them to GitHub. For the immediate future, I plan to maintain both sites equally with the bulk of the documentation still residing on CodePlex, but you can get full source and releases from either location thanks to the magic of distributed VCS. In addition, all six of these projects is now licensed under MIT rather than MS-PL. The terms of both licenses are basically the same, but in legal circles the MIT license is more widely understood and is considered more 'standard'. Of course, I'm Not A Lawyer, so you should make your own determination about the change of license. DirectX Tool Kit The March 2015 release was updated for the Visual Studio Tools for Windows 10 Preview. GitHub and CodePlex Related: DirectXTK (March 2012), DirectXTK Update (Jan 2013), CodePlex VS 2013 Refresh, DirectX Tool Kit for Audio, CodePlex July 2014 Refresh, DirectX Tool Kit: Now with GamePads DirectXTex The March 2015 release was updated for the Visual Studio Tools for Windows 10 Preview, includes a number of bug fixes, and an updated texconv tool with support for generating normal maps from height-maps. GitHub and CodePlex Related: DirectXTex (October 2011), DirectXTex Update (June 2013), DirectXTex and Effects 11 Update (August 2013), CodePlex VS 2013 Refresh, CodePlex July 2014 Refresh DirectXMesh The March 2015 release was updated for the Visual Studio Tools for Windows 10 Preview. and includes a few bug fixes. GitHub and CodePlex Related: DirectXMesh UVAtlas The April 2015 release was updated for the Visual Studio Tools for Windows 10 Preview. and includes a number of bug fixes. GitHub and CodePlex Related: UVAtlas: Return of the Isochart Effects 11 The April 2015 release includes some updates for better Visual Studio 2015 CTP support. GitHub and CodePlex Related: Effects for Direct3D 11 Update (October 2012), DirectXTex and Effects 11 Update (August 2013), CodePlex VS 2013 Refresh, CodePlex July 2014 Refresh DXUT11 The April 2015 release includes some updates for better Visual Studio 2015 CTP support, and a bug fix for the DDSTextureLoader. GitHub and CodePlex Related: DXUT for Win32 Desktop Update (September 2013), CodePlex VS 2013 Refresh, CodePlex July 2014 Refresh  Sample Content Exporter In addition to the Microsoft GitHub repositories above, I've also set up a personal GitHub project to host the Samples Content Exporter sample which has been updated to support VS 2012 with Autodesk FBX SDK 2014.1 or later, and VS 2013 with Autodesk FBX SDK 2015.1.

Posted by on 18 April 2015 | 11:44 am

Smart Unit Tests - Test to Code Binding, Test Case Management

In an earlier post we had mentioned how Smart Unit Tests can emit a suite of tests for a given code-under-test, and how it can manage this test suite as the code-under-test itself evolves. For any given method serving as the code-under-test, the emitted test suite comprises of a "parameterized unit test" and one or more "generated unit tests", and the following figure illustrates the Pex* custom attributes used to identify the test-to-code binding, that in turn enables such management. These attributes are defined within the Microsoft.Pex.Framework namespace. At compile time, these attributes are baked into the assembly as metadata for the types and methods to which they were applied. On subsequent invocations, Smart Unit Tests can reflect on the assembly and, with the help of this metadata, re-discover the test-to-code binding. As you would have noticed, the generated unit tests are just traditional unit tests; indeed, they will show up in the Visual Studio Test Explorer just like any other hand written test, although it is not expected that such generated unit tests will be edited by hand. Each generated unit test calls into the parameterized unit test which then calls into the code-under-test. The programmatic separation between the generated unit tests and the parameterized unit test allows the parameterized unit test to serve as a single location where you can specify correctness properties about the code-under-test, that all of the generated unit tests can validate. In a future post we will discuss ways to express such correctness properties, but it is not a matter of concern for the test-to- code binding, the topic of this post. What does matter is that the generated unit tests and the parameterized unit test are placed into the same assembly. The management of these generated unit tests involves the following: Preventing the emission of duplicate tests: the code-under-test is always explored from scratch by the testing engine. Therefore it might generate tests that had already been generated before, and such tests should not be emitted. Deleting tests that have become irrelevant: when the code-under-test changes, previously relevant tests might become irrelevant, and might need to be replaced with new tests. Here is how it is done: Given that the parameterized unit test and the generated unit tests are placed into the same assembly, the testing engine pre-processes any existing “generated unit tests” (emitted previously) by scanning the assembly for the test fixture (identified by the type having the PexClass annotation). Generated unit tests are recognized by the Test attribute (the TestMethod, and PexGeneratedBy annotations in this case). For each such unit test method, it fetches the source code, trims away all whitespaces and uses the resulting string as a “hash” of the generated test. Once this is done, the testing engine has a dictionary of such hashes that it can consult to determine whether a newly generated test already exists. Duplicate tests are not emitted, and if a previously existing test case is not generated, it is deleted. Keeping a suite of unit tests in sync with a fast-evolving code base is a challenge. Manually adapting the code of a potentially large number of unit tests incurs significant costs. We hope such automatic management of the suite of generated unit tests helps in addressing this challenge. As ever, report any issues or overall feedback below, or through the Send a Smile feature in Visual Studio.

Posted by on 18 April 2015 | 10:56 am

Singapore is making strides in the field

Singapore is making strides in the field of corporate diversity – especially when it comes to its sen… via @declara...(read more)

Posted by on 18 April 2015 | 6:19 am

Avancement du Portail Small Basic Français (fr-FR)

Bonjour à tous, Aujourd'hui la communauté française du Small Basic est heureuse de vous annoncer que le Portail Small Basic Français à une grande partie de ces articles référencés qui ont été traduits. Même si tous n'ont pas été traduits, les articles les plus importants pour commencer sont disponibles. Parmi les traductions vous trouverez entre autres. Les articles pour Débuter Tous les articles pour débuter ( comme par exemple: Télécharger Microsoft Small Basic Démarrer avec le Small Basic Guide de Démarrage Small Basic International (en-US) (Guide de Démarrage en Différentes Langues) Le Guide en français au format Word (.docx)  Le Guide en français au format PDF (.pdf)  Small Basic: Tutoriel - Créer Votre Premier Programme Questions Fréquentes sur le Small Basic Les articles pour une Vue d'Ensemble Tous les articles pour avoir une vue d'ensemble ( du Small Basic comme par exemple : Bienvenue dans le Small Basic Small Basic Démarrer avec le Small Basic FAQ Small Basic Les Caractéristiques du Language du Small Basic Les Bases du Small Basic Syntaxe Small Basic Des sujets avancés Un ensemble d'articles sur des sujets plus avancés que les bases, comme par exemple: Small Basic: Conseils de Programmation Small Basic : Ligne de temps pour les jeux L'Environnement (EDI) de Small Basic Small Basic: Le Saviez-Vous ? Small Basic: Conventions de mise en Majuscules Small Basic: Jeu de Caractères - Unicode Small Basic: Valeurs par Défaut Small Basic: Emoji (Émoticônes) Vous y trouverez également déjà traduits : Quelques articles de la série "Comment Faire" Quelques exemples de programmes Small Basic   N'hésitez pas à visiter le portail pour en savoir plus ou pour y participer. Suivez ce blog pour en savoir plus sur les prochaines évolutions du portail.   A bientôt avec le Small Basic en français, Ninja Yan

Posted by on 18 April 2015 | 5:00 am

Attention All Small Basic Gurus! Time to SPRING Into Action!

We still have 12 days to go in the April Small Basic Guru contest!   April fools out of the way, now let's find an April genius! The name "April" is derived from the Latin verb "aperire", meaning "to open", as it is the season when trees, flowers AND MINDS start to open! And.. I can't wait to OPEN and read this month's community contributions! (groan, tenuous link!) Things are indeed heating up around TechNet. The Wiki has become a shining example of what the community has to offer, and talent is SPRINGING FORTH from all corners of our garden of knowledge.  If you can find the time to enrich us with your latest revelations, or some fascinating facts, then not only will you build up a profile and name for yourself within the gaze of Microsoft's very own glitterati, but you will be adding pages to the most respected source for Microsoft knowledge base articles. This could not only boost your career, but would benefit generations to come! So don't be an April fool. Please realise the potential of this platform, realise where we are going, and join us in growing this community, learning more about you, and opening the minds of others!   All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.   Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!   This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!   HOW TO WIN   1) Please copy over your Microsoft technical solutions and revelations to TechNet Wiki. 2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed) 3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.   If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!   Winning this award in your favoured technology will help us learn the active members in each community.   Feel free to ask any questions below.   More about TechNet Guru Awards   Thanks in advance! Pete Laker

Posted by on 18 April 2015 | 4:41 am

The tools I use with my Microsoft Azure Web App

I wanted to share with you my positive experience with the Microsoft Azure App Service (of which Web Apps, formerly known as Websites, is just one aspect). I also thought it might be of interest to some folks if I give a run-down of the tools I use to create the content on my Web App which is at If you want to create your own Web App, you'll begin by signing in with your Microsoft Account and creating a free trial subscription. If you're wondering why the submit button doesn't light up and why the credit card section is collapsed, that's because first you have to press the button to validate your Microsoft Account and then enter the security code you'll be sent. Then you can fill in your payment details (which, the site says, will not be used as long as you stick with your free subscription). It's all very quick and easy, and the management portal is very impressive, beautiful, full-featured, and a pleasure to use. For authoring html and css, I use Microsoft Expression Web 4. You can get a free version here. Grab the ftp details from the Azure portal and plug them into Expression Web and you're ready to author and publish. I find Expression Web very easy and pleasant to use. It has everything I need but if you have ideas for alternatives, please let me know in the comments. That goes for any tool I mention here. Next comes interactivity. I have just one page with interactive little controls on it, and that's the introductory page to my elements of music section. The controls are rendered with the Silverlight browser plugin, which is arguably anachronistic in this day and age. But it's familiar to me and I know it far better than I know HTML5 (which is barely at all). And I use Visual Studio (and sometimes Blend for Visual Studio) to develop my Silverlight controls. The 3D helix is made of plain old Silverlight Ellipse shapes z-sorted, perspective projected, and rendered back to front. Complicated, but effective. The piano keyboard control uses a MediaStreamSource to generate sample buffers and play them back through a MediaElement. For images, I typically generate those using my Silverlight controls and then take screenshots. Then I manipulate them in Paint or sometimes in By the way, be careful if you try to download the product's website hosts some clickjacking ads even more prominently than it does its own download link. For that reason I hesitate even to link to it. You can find it very easily, though. Finally, there's the musical score and the audio files, examples of which you can see on the harmony/suspense page. I use Steinberg Cubase 7.5 to record midi and then use the score editor to make it look just right. I then export it as a png at 100dpi and then just clip it to size in Paint. The audio is recorded in Cubase simply by recording into an audio track while playing back the midi. Then it's exported as an audio mixdown in mp3 format. I use an img element to show the score and an audio element for the mp3. Building this site has been tremendous fun so far, and I have a lot more content to add to the harmony section before I'm done. And hopefully a lot more recordings. Let me know what you think! -Steve

Posted by on 18 April 2015 | 3:27 am

SQL Server Performance Tuning: Data Access Method

Writing Queries in SQL Server is not all that hard. But, writing Queries by understanding the different patterns SQL Server uses to fetch your data from the disk, resource utilization which can help build efficient query writing skills.   There are multiple ways how SQL Server accesses data from the tables. To illustrate the point I make, I shall query a heap and a clustered tables in AdventureWorksDW2012 in a few different ways   The clustered table taken for the example is FactInternetSales which has a Clustered Index on attributes SalesOrderNumber and SalesOrderLineNumber.    I shall create a heap table , like so     To draw a comparative analysis between the two tables, I have dropped all non-clustered indexes from table FactInternetSales. In addition, I have turned on the Actual Execution Plan and STATISTICS IO , TIME to understand the execution pattern for the below queries.   Query 1 : Execute the Query on the Heap Table         Query 2: Execute the below query on the clustered Table without an Order By Clause           Query 3: Execute the below query on the clustered Table with an Order By Clause       Let's us list the differences between the above 3 queries -   Query1 as expected was a Table Scan with Ordered Property Value as "False". Logical Reads measure 1313. CPU Time = 350 ms Query2 was a Clustered Index Scan with Ordered Property Value as "False". Logical Reads measure 2062. CPU Time = 364 ms Query3 was a Clustered Index Scan with Ordered Property Value as "True" and a new Property Scan Direction as "FORWARD". Logical Reads measure 2061. CPU Time = 393 ms   These above differences may be summarized into the following buckets,  like so   Logical Reads Measure CPU Time Ordered Property   Logical Reads Measure   If we can use the DBCC IND command to get the number of data pages for both the tables , it will explain the difference in Logical measure between the Clustered Table and the Heap table. In this case, the clustered index is fragmented which means more IO as compared to that of the Heap Table. To understand more around the DBCC IND command, there is an excellent post by Paul Randal which can be referred from here.      CPU Time   In the event of a fragmented index (FactInternetSales Clustered Index is fragmented) , An Unordered Scan (Query2) may consume (not necessarily though!!) lesser resource (IO or/and CPU time) than an Ordered Scan (Query3).   Ordered Property   In Query2, SQL Server did an Unordered Clustered Scan while Query3 was an Ordered Scan. Both were full scans as expected. The first query however, had no requirement for an ordered set.  SQL Server uses different algorithms to fetch the data -  For Query2, SQL Server reads the IAM Pages to fetch the list of pages which holds the data. Refer the sys.system_internal_allocation_units table to know more. This type of scan is called the allocation order scan (or a Unordered Clustered Scan) and it will not ensure the order of the dataset as per the clustered key. Where as in Query3, when we exclusively asked SQL Server to fetch the data in an ordered fashion, it scans through the binary tree of the Clustered Index.   I do hope you find this useful. Thanks for reading. Do share your views/learnings on this.

Posted by on 18 April 2015 | 3:15 am

Life Quotes That Will Change Your Life

Life’s better with the right words. And life quotes can help us live better. Life quotes are a simple way to share some of the deepest insights on the art of living, and how to live well. While some people might look for wisdom in a bottle, or in a book, or in a guru at the top of a mountain, surprisingly, a lot of the best wisdom still exists as quotes. The problem is they are splattered all over the Web. The Ultimate Life Quotes Collection My ultimate Life Quotes collection is an attempt to put the best quotes right at your fingertips. I wanted this life quotes collection to answer everything from “What is the meaning of life?” to “How do you live the good life?”  I also wanted this life quotes collection to dive deep into all angles of life including dealing with challenges, living with regrets, how to find your purpose, how to live with more joy, and ultimately, how to live a little better each day. The World’s Greatest Philosophers at Your Fingertips Did I accomplish all that? I’m not sure.  But I gave it the old college try. I curated quotes on life from an amazing set of people including Dr. Seuss, Tony Robbins, Gandhi, Ralph Waldo Emerson, James Dean, George Bernard Shaw, Virginia Woolf, Buddha, Lao Tzu, Lewis Carroll, Mark Twain, Confucius, Jonathan Swift, Henry David Thoreau, and more. Yeah, it’s a pretty serious collection of life quotes. Don’t Die with Your Music Still In You There are many messages and big ideas among the collection of life quotes.  But perhaps one of the most important messages is from the late, great Henry David Thoreau: “Most men lead lives of quiet desperation and go to the grave with the song still in them.”  And, I don’t think he meant play more Guitar Hero. If you’re waiting for your chance to rise and shine, chances come to those who take them. Not Being Dead is Not the Same as Being Alive E.E. Cummings reminds us that there is more to living than simply existing: “Unbeing dead isn’t being alive.”  And the trick is to add more life to your years, rather than just add more years to your life. Define Yourself Life quotes teach us that living live on your terms starts by defining yourself.  Here are big, bold words from Harvey Fierstein that remind us of just that: “Never be bullied into silence. Never allow yourself to be made a victim. Accept no one’s definition of your life; define yourself.” Now is a great time to re-imagine all that you’re capable of. We Regret the Things We Didn’t Do It’s not usually the things that we do that we regret.  It’s the things we didn’t do: “Of all sad words of tongue or pen, the saddest are these, ‘It might have been.”  – John Greenleaf Whittier Have you answered to your calling? Leave the World a Better Place One sure-fire way that many people find their path is they aim to leave the world at least a little better than they found it. “To laugh often and much; to win the respect of intelligent people and the affection of children…to leave the world a better place…to know even one life has breathed easier because you have lived. This is to have succeeded.” -- Ralph Waldo Emerson It’s a reminder that we can measure our life by the lives of the people we touch. You Might Also Like 7 Habits of Highly Motivated People 10 Leadership Ideas to Improve Your Influence and Impact Boost Your Confidence with the Right Words The Great Inspirational Quotes Revamped The Great Leadership Quotes Collection Revamped

Posted by on 18 April 2015 | 1:41 am

Twitch my GameDev Adventures

In the last few weeks I have been setting up my own Twitch channel  and creating my new series: GameDev Adventures. There, I have shared with anyone who cares to check several sessions of Game Development, so far only with Construct 2, but soon also with Cocos2D-JS. Here I will include the first video that is saved in my YouTube Channel.   Since this one was the first video I went for some Construct 2 basics that I have covered in some other videos like My 1st Game with Construct 2. In this one I am creating a new game called Bouncy Aliens and some of the following videos extend on that basic concept. Please share your thoughts on these videos and enjoy the GameDev Adventures.  

Posted by on 17 April 2015 | 11:49 pm

What's new in the April release of the Analysis Services Connector?

This is an in-place upgrade: if you already have the Connector installed, you do not have to uninstall it before installing the new version. Also, you do not have to reconfigure the Connector after installing the new version.  What's new in the release 1. Feature enhancements 2. Better diagnostics and bug fixes   1. Feature Enhancements a. Automated checks for prerequisites during installation & configuration of the Connector to ensure Power BI can connect to the Analysis Services Server via the Analysis Services Connector  For example, we'll validate whether the Power BI account can connect to the Analysis Services Server with the effective user name mechanism. If you get the error in the image below, it means that your Power BI username does not match your on-premises username. Hence the effective user name mechanism that Power BI relies on to connect to the Analysis Services Server could not work.  To fix it, you'll have to ensure you use your work email address with Power BI or your on-premises Active Directory is synchronized with Azure Active Directory.  Learn more about the Analysis Services Connector to understand the role the effective user name plays & why the Active Director to Azure Active Directory sync is needed.    b. Support for network proxy You can now use the Analysis Services Connector within network environments which use proxy servers for HTTP connections. In the previous versions, if your organization's network was using a proxy, under some situations, the Connector would fail to start up. This experience has now been improved. c. Notification when a new version of the Connector is available You will see a notification in the Analysis Services Connector when a new version is available for download. Click on the link to download & install the new version. You do not have to uninstall the previous version or reconfigure the Connector after installing the new one.    d. Support for all languages Power BI is available in.   Along with Power BI, the Analysis Services Connector is also available in all languages supported by Power BI. For more information check world wide availability of Power BI  2. Diagnostics and bug fixes a. Improved error messages in the Connector and in the Power BI service to help you diagnose and fix issues.  For example: When the password of a Windows user expires, you'll see the following message in the Connector. You'll also see a similar error message in the Power BI service when you try to connect to the dataset or open a report.  To fix it, in the Connector click Edit and update the password.    In addition, we have also taken care of several bugs reported. For example this one. We have receive lots of feedback for the Connector and we'll continue to improve it. Stay tuned as updates roll out more frequently! Preview what's next for Power BI Watch our Power BI SSAS Connector Webinar on-demand Follow @MSPowerBI on Twitter Sign up for the Power BI Newsletter 

Posted by on 17 April 2015 | 9:30 pm

[Sample Of Apr. 18] How to disable certain items in GridView in universal Windows apps

Apr. 18 Sample : This sample demonstrates How to disable certain items in GridView in universal Windows apps. You can add items to the GridView and specify whether it could be selected. You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension . They give you the flexibility...(read more)

Posted by on 17 April 2015 | 9:20 pm

Unity 5 Overview

Presentation material for Unity 5 Overview Fri 4/17/2015 @ Howard University PPTX File: Download SlideShare: Unity 5 Overview from Shahed Chowdhuri   Resources: Learn: more...(read more)

Posted by on 17 April 2015 | 8:23 pm

Unity Gaming: Integrating Oculus

Setting Up GREAT NEWS! In 2015 you no longer need Unity Pro Edition to integrate Oculus into your projects.… more...(read more)

Posted by on 17 April 2015 | 6:17 pm

Join us for After Hours @Build on April 29th

Want to learn more about what Microsoft is doing with .NET and Open Source, but don't have a pass for Build? On April 29th, Microsoft is hosting an "After Hours @Build" event, and it's open to everybody! Get the inside scoop from the .NET product teams, .NET Foundation, and GitHub on the innovations in .NET and the journey into open source. We'll also show you what's new and what we're building, including ASP.NET 5, C# 6, .NET compiler platform (Roslyn), and how we're taking .NET cross-platform...(read more)

Posted by on 17 April 2015 | 5:15 pm

On App-V with Azure: Streaming Applications from the Cloud

In App-V in general, the Content Store (also referred to as the package source or streaming source) is the most critical in both traditional streaming (stream-to-disk) scenarios and Shared Content Store mode clients (stream-to-memory.) Traditionally, Microsoft recommends placing Content Stores as close as possible to end user devices when possible leveraging on-premise technologies such as DFS-R to for replication and location. But what about those customers who are looking to leverage cloud services...(read more)

Posted by on 17 April 2015 | 3:53 pm

Microsoft Azure helps build a smart campus

Microsoft Azure helps build a smart campusResearchers at the University of Science and Technology of China and Microsoft Research are building mobile apps to help reduce the stress—and improve the health—of university students.  ...(read more)

Posted by on 17 April 2015 | 1:36 pm

Results for Microsoft Imagine Cup 2015 Pakistan Regional Finals

Update (19/4/15): If you’re experiencing any issues in submission of deliverables at Imagine Cup Online Portal, please ensure that your deliverables are still ready to be presented. As for the issues, please contact Usman ur Rehman at v-usrehm [at] and cc tahirm [at] stating the problem. You may optionally call Usman ur Rehman (0321.5048480) or Tahir Masood (0321.3774128) for further help. I’m excited to announce 20 shortlisted teams from Microsoft Imagine Cup 2015 Regional Finals. Team Name Project Title  Category: Innovation Gestech OneGlove Tesseract Dispatch Electro Rover Kinect Controlled Autonomous Rover Nouvelle_szabist Ehed SYNERGY6 Picage Team Pakistani HAIL Optimization Dream Time Moment Category: World Citizenship Aawaaz Aawaaz - A Sign Language Interpreter J3 THE DEVELOPERS Helping Hands Black Sky Developers Dyslexia Therapy RobHan Brain Computer Interface for Physically Challenged People Urdu IT Tutor Urdu IT Tutor Visioners DiaOC A.C.C.E.S.S A.C.C.E.S.S Team Pakistani Offer and Deal Gikians Neuro Assist Code Spartan Ghealth+ Category: Games Phantom Interactive Sword of Ghost Pinixar Air Force-PAF Third Generation Games Sniper Contract Assassin What’s Next for Shortlisted Teams? The shortlisted teams are directed to submit the following revised deliverables at Microsoft Imagine Cup Online Portal no later than 20th April, 2015, -  Team Introduction (Contact Information) -  Project Abstract -  Up to 3 minutes Video -  Design document -  Project Presentation (8 slides max) Please ensure to submit contact information so that our local team can reach out to you for confirmation of your slot for National Finals presentation (if required). You’ll have to present either in-person (at-least one team member) or optionally through Video Con link. This very post will be updated with National Finals venue by 23rd April 2015, however please be prepared to present from 23rd - 26th April, 2015. We witnessed some very exciting projects this time. As for the teams that couldn’t make it to National Finals, we wish them luck in days ahead and hope that they’ll come back with the same enthusiasm and more robust entries next year. See You All at Microsoft Imagine Cup 2015 National Finals.

Posted by on 17 April 2015 | 1:08 pm

Dynamics CRM 2015 Update 0.1 Full Text Search Quick Find Performance Feature

  The short video presentation for Dynamics CRM 2015 Update 0.1 Full Text Search Quick Find Performance Feature is now available. Dynamics CRM 2015 Update 0.1 KB and download link are below: Update 0.1 for Dynamics CRM 2015 KB Update 0.1 for Dynamics CRM 2015 download The link, short description, and preview of the content of the video is below: Video Describes the new Full Text Search Quick Find feature released in 0.1 (Rollup 1) for Dynamics CRM 2015 On Premise. A brief overview of how the end user will benefit from the new feature, the performance improvements and results from test carried out on Full text Search in CRM 2015 and infrastructure of the feature. Full-Text Quick Find from 0.1 Update: For On Premise only Turned Off by default. Must be enabled in System Settings (as per below image) Text based FIND columns use SQL full-text indexes. Fields that contain ALL words in the search text are returned.   Dynamics CRM Support’s Performance Results comparing Non- Full Text Search and new Full-Text Search: The performance increase is seen with wildcard searches, e.g. searching for *ski to find Alpine Ski House. With Full Text Search the wildcard is not necessary but the record is returned and much faster since it uses an index. If you perform a search for something else that did not previously need a wildcard, performance would be about the same (e.g. searching for an account that starts with Contoso). Benefits of Full-Text Quick Find:   No need to use a wild card Significantly faster performance compared to searches that used wild cards Compared to not using a wild card in the past, performance is about the same Will return forms of a word Pluralisation ( “mouse”, “mice”, etc…) Tense ("drive", "drives", "drove", "driving", and "driven“) Can use quotation marks to limit the search to an exact match   For full details of the Full Text Search in 0.1 Update, please watch the short video here Dynamics CRM 2015 0.1 Update Note: Included in the release of 0.1 Update is the CRM 2015 OrgDbOrgSettings Tool. When you download CRM2015-Tools-KB3010990-ENU-amd64.exe from here, extract the files to any folder location, such as to the C:\OrgDBSettingsTool folder, open the OrgDBOrgSettingsTool folder and open the OrgDBOrgSettingsTool.exe.config file for editing.   Best Regards EMEA Dynamics CRM Support Team Share this Blog Article on Twitter Tweet Follow Us on Twitter Follow @MSDynCRMSupport

Posted by on 17 April 2015 | 12:53 pm

Dynamics CRM 2015 Features and Functionalities Videos Released

  The short video presentations for Microsoft Dynamics CRM 2015 Features and Functionalities are now available. It is split into two parts with the links and short description below: Part 1   12 minutes Search 0:22 minutes Multi-entity 3:42 minutes Business Rules 4:47 minutes Hierarchy 5:11 minutes Custom Help 7:18 minutes Business Process Flows 8:12 minutes Rule Based Branching 10:25 minutes   Part 2    16 minutes The supported configurations in Dynamics CRM 2015 – 0:35 minutes The upgrade process – 3:48 minutes Calculated fields – 5.42 minutes Rollup fields – 8:00 minutes Hierarchical security model 10:17 minutes Synchronization. 13:20 minutes   Best Regards EMEA Dynamics CRM Support Team Share this Blog Article on Twitter Tweet Follow Us on Twitter Follow @MSDynCRMSupport

Posted by on 17 April 2015 | 12:47 pm