Quantcast
Channel: MSDN Blogs
Viewing all 29128 articles
Browse latest View live

Filtering Event Log Entries by Event Code

$
0
0
When you filter event log entries bu event code using WMI, you can run a query like the following: "SELECT Message FROM Win32_NTLogEvent WHERE EventCode = 7" And as expected, this will return the entries with event code 7. Now, let’s look at the corresponding C# code, given that you already have a list of event log entries, you explore which property you should use to filter the list using LINQ. Conveniently, you find EventLogEntry.EventID , but it’s obsolete and the compiler warning asks...(read more)

New Version of PerfView available at the download center

$
0
0

This is a quick announcement that I have refreshed the version of PerfView at the PerfView Download Center.

There was a last minute typo on my part, and the web site says it is version 1.7, but it really version 1.6 (PerfView's about box is the correct version).    The error was not worth correcting.

The main reason for the refresh was to fix a blocking bug (IndexOutOfRange Exception) that intermittently happens when collect a .NET Memory heap dumps.   

This refresh however also has many 'under the hood' changes (e.g. cleaning up TraceEvent for publication on Nuget, and then modifying PerfView to conform to the cleaned up code).    These changes should not make things noticeably different, but do have the potential for breaking things.   We have been using this version of PerfView internally for over a month without issue, so we have good confidence, but if you notice what seems to be a regression in functionality do let me know by replying to this blog entry. 

Vance

 

 

Moving on and THANK YOU!

$
0
0

Windows

Dear partners, friends and colleagues, I was really blessed to work with you - awesome people - in the past years during my career at Microsoft. I started in Prague subsidiary, later moved to Regional Center in Dublin and then to Corporate office in Redmond – AND it all adds up to wonderful to 18 years that will never be forgotten! It was a great ride on the top of IT wave from a dial-up modem to business critical services in the cloud!

I’m really excited about the latest version Project, it has a TON of potential for many industries and different sizes of customers and I will be a keen supporter of this great product in the coming years!

Hope that we will have a chance to see each other at another major event like SharePoint Conference or World Wide Partner Conference.

What’s next?

The good news is that I’m not going far, I’m joining UMT360 as a Director of Partner Network and Product Management. I’m super excited about their dedication, enthusiasm and recognitions (Cool Vendor and Visionary for IIPA space by Gartner) in their efforts to help transform today’s IT organizations for the future! 

Contact information:

Thanks again!

Regards!

Jan

This Week in Sustainability: The Next Generation of Battery Technology

$
0
0

clip_image002This week, Treehugger looked at new battery management technology that could increase the capacity of lithium-ion batteries by an astounding 40 percent. Created by a father-and-son team of an electrical engineer and a university chemistry student, the technology manages the energy in a lithium-ion battery, enabling it to store more energy, extend its life and increase its capacity. What makes this technology more exciting? Not only would it enable us to use our devices for longer periods of time, it could also have a positive impact on the environment. As the piece highlights, because the new technology would enable devices to last longer and hold power longer, devices wouldn’t need to be disposed of as often, creating less e-waste.

But how can new battery technology help at a larger scale? GigaOm wrote a piece reporting on just that, a new flow battery technology from Primus Power to help the power grid and large-scale utilities function more sustainably. While this type of battery is already on the market, Primus Power is looking to implement them into the grid through its EnergyPods, which can store up to 250 kilowatts of energy and be stacked on top of each other for those looking for larger installations. Not only does this offer a cheaper alternative for the grid, but it can also provide energy storage for longer periods of time.

Even better, the piece highlights that with several power companies looking for technology that helps decrease the intermittency of renewable sources such as wind and solar, the flow battery could offer a great option to release stored energy when the wind isn’t blowing or the sun isn’t shining. With industries across the board striving to have less of an environmental footprint, new battery technology is already proving to be a hot topic for 2014.

Now Available through Microsoft’s Web Platform Installer: Azul Zulu OpenJDK Package for Windows

$
0
0

We have great news for Java developers planning to deploy the latest Azul Zulu OpenJDK v1.7 package on 64 bit Windows Server machines. Now you can automate the process using the Microsoft Web Platform Installer (WebPI).

This new offering is the result of our partnership with Azul, which has produced Zulu, a version of the Azul OpenJDK built for the Windows Azure Platform. In October we also integrated Zulu into our Windows Azure Plugin for Eclipse with Java. Today’s announcement continues our plan of making Java support on Windows Azure as flexible and simple as possible.

If you’re not familiar with the Web PI, then your SysAdmin has probably been holding out on you. It’s a free and extremely useful tool that automates the download and installation of products and applications designed for the Microsoft Web Platform as well as most popular free web applications via its built-in Windows Web Application Gallery.

The Zulu Web PI Application Gallery entry downloads the latest Zulu distribution from Azul Systems, The process is simplified, as WebPI can unzip it, automatically set your JAVA_HOME to reference Zulu, and add Zulu references to your PATH environment variable to set Zulu as the default JVM on that machine. 

Windows Server installation

For now, we recommend - for Windows Server only (not Eclipse clients) - using the Web PI installer to install. This is due to an Eclipse bug we’ve discovered during testing, which we are working to resolve.

Workaround for Eclipse Clients

If you would like toinstall Zulu it on your client computer and you use Eclipse as your Java IDE, we have discovered at least one issue in Eclipse that will result in intermittent hangs if Zulu is used as Eclipse’s JVM. If you are keen to try it out with Eclipse anyway, then the known workaround is to start Eclipse with additional command line parameters: -vmargs -XX:MaxPermSize=256m. If you encounter other issues, then let Azul and/or us know. If you have an Eclipse account and this issue is affecting you, please vote up the importance of bug 426422.

Step-by-Step Installation on Windows Server

Log on to your 64 Bit Windows Server as a user with administrative privileges, open a browser and navigate to http://www.microsoft.com/web/downloads/platform.aspx

Next, click on the big green “Free Download” button to install the Web Platform Installer:

clip_image002

The Installer will start as soon as it’s downloaded. The first screen you see is the “Spotlight” Screen, listing the most popular and/or newest packages featured in the Web PI Installer:

clip_image004

You will need to click to the “Applications” tab to find theZulu Installer in the Web Application Gallery.

clip_image006

NOTE: Entries are ordered by number of downloads, not alphabetically. If you do not see it listed at the top, it may be easiest to search for “Azul Zulu, OpenJDK v1.7”.

clip_image008

Click on the Add button, then click install:

clip_image010

As mentioned earlier, during Installation, the latest Zulu distribution from Azul Systems will automatically download, as well as set your JAVA_HOME to reference Zulu, and then add references to your PATH environment variable to set Zulu as the default JVM on that machine. 

Once this process is complete, you are ready to deploy Java applications!

We’re always looking for ways to enhance the developer experience and to make life easier for Java developers on Windows Server and Windows Azure, so please let us know whether you find this to be a useful tool..

And watch this space for more exciting news coming soon!

Why is the wrong time displayed on my virtual machine?

$
0
0

Here is the scenario:

You have a bunch of server virtual machines that are merrily running somewhere in your environment.  Normally you do not interact with them, but once in a while you need to login to one of them and do something.  When this happens – you open up Hyper-V Manager and connect to the virtual machine.  The virtual machine connection opens and you see:

image

Only, the time and day displayed is completely wrong!  But, as soon as you click on the virtual machine (or press a key) the time and date *pop* to the right time.  What is happening here?

The answer is a little bit odd.  What is actually happening is that Windows (inside the virtual machine) is turning off its monitor to “save power”.  The result is that you get a stale display on the virtual machine until you provide keyboard or mouse input.

This is actually a new behavior as of Hyper-V in Windows Server 2012 / Windows 8.  It is an unintended side effect of other work that we did on our video driver.  The short version of which is: we updated our virtual machine video driver significantly in Windows Server 2012 / Windows 8 in order to improve its efficiency, and accidentally enabled power management of the virtual video device in the process.

When we first realized that this was happening – we had a lengthy discussion about what to do.  Options suggested were:

  1. Hack the virtual video driver to explicitly not support power management.  This would have been a pretty gross thing to do (from a code perspective) so we ruled that option out quickly.
  2. Display a black screen when the guest OS slept the monitor (which is what physical computers do).  With this option we were afraid that users would think that the guest OS had crashed (or something similar).
  3. Grey out the last screen from the guest OS.  Unfortunately this is what we already do when you pause a virtual machine, so we were worried that there would be confusion about this.
  4. Put up a fluorescent pink box with the words “Virtual monitor in sleep mode!” written across it (this idea probably received far more discussion than it deserved).
  5. Just leave the last image displayed up.

To be honest, we were not super happy with any of these ideas – and ended up going with the last option.  If this behavior bothers you, you can actually control it.  Just edit the power management plan inside the virtual machine and tell Windows to not turn the display off:

image

I can guarantee that this will not waste any power :-)

Cheers,
Ben

Maintenance on Friday, 7 Feb - Started

$
0
0

Our maintenance for today, has started.  We are giving ourselves until 9 Feb 08:00 UTCto complete activities.  Just a friendly reminder that new account creation will be disabled during some stages of the updateOtherwise we’re expecting that the service remains up throughout the update activities and you should not see any additional noticeable impact to your work.

Keep checking back for updates.

Thank you,
Erin Dormier

Optimizing Performance with automatic Proxyconfiguration scripts (PAC)

$
0
0

Hi Team,

when creating an automatic proxy-configuration script (PAC-filer or also known as wpad.dat), questions arrive on how these could be optimized in order to speed up their performance

The functions which can be used in order to evaluate an address (URL and hostname) are explained in the following article:
JavaScript or JScript Auto-Proxy Example Files
http://technet.microsoft.com/library/Dd361950

As mentioned in that article, the functions  isInNet(), isResolvable() and dnsResolve() initiate queries to the DNS-subsystem.
Therefore the usage of these functions should be avoided, when possible or at least reduced.

1. Query for NetBIOS-names
NetBIOS-names (servernames with no dot in their name) no are typically used in the intranet only and are therefore not routed through the proxy.
  if (isPlainHostName(host))
    return "DIRECT";

2. Query for internal DNS-suffixes
Internally used DNS-zones are normally routed directly. The easiest way to determine such hosts is done by using the function dnsDomainis:
  if (dnsDomainIs (host, ".dns.company.com"))
    return "DIRECT";

The faster method for the same result can be done by using ShExMatch(), which performs a string compare. So the same result with the function above, where the “*”-character is then used as wildcard:
  if (shExpMatch(host, "*.dns.company.com"))
    return "DIRECT";

3.  Query for IP-ranges
The idea for that rule is to check, if the IP-address of the host belongs to the local intranet, regardless to the name of the webserver, which should bypass the proxy in order to navigate directly to the it.

In case, that the IP-address had been entered directly in the address-bar there is no need to resolve it again. You can use the following code in order to check, if the host has already the format of an IP-address :
  var isIpV4Addr = /^(\d+.){3}\d+$/;
  ret = isIpV4Addr.test (host);
This routine checks if the variable host contains 3 numbers which are followed by a dot, and if another number is followed- The result of this check is then passed to the variable ret, which is true in case of an IP, and false – if otherwise.

This would be be the codesnip where the variable hostIP will contain the IP-address for additional checks later:
  var hostIP;
  var isIpV4Addr = /^(\d+.){3}\d+$/;
  if (isIpV4Addr.test (host))
    hostIP=host;
  else
    hostIP=dnsResolve (host);

When a non-existing host had been passed to the function (e.g. cause the user entered something wrong in the address bar), the result in hostIP might be 0. Any additional errorhandling could be done by the proxy:
  if (hostIP==0)
    return "PROXY myproxy:80";

Now, as we have the IP-address of the host, the checks for the internal IP-ranges needs to be done.
When possible, use the shExpMatch-function instead of isInNet. The following two codesnips have the identical result, while shExpMatch is faster in execution:
  if (isInNet (hostIP, "95.53.0.0", "255.255.0.0"))
    return "DIRECT";
  if (shExpMatch (hostIP, "95.53.*))
    return "DIRECT";

4. Javascript is case-sensitive
The proxyscript uses the language javascript, which is case-sensitve. Therefore an if-clause where upper characters are used will never turn true, while the other parameter is using lowercase.
Internet Explorer itself converts the variables host and url into lowercase before the function  FindProxyForURL is called.
This is not true for WinHTTP, which passes the hoist and the url directly to the function.
Therefore the parameters, which are checked within the PAC-file should be converted within the PAC befotre they are evaluated. Here is the call for the convert:
    host = host.toLowerCase();

5. Use of IPv6
In case that you want to use and handle IPv6-addresses, Internet Explorer supports them since IE7 on every OS-Version (and WinHTTP since Windows Vista), but you then need to use “Ex“-functions (like isInNetEx ()) as mentioned in the following Blogpost:

WinINet and WinHTTP IPv6 Support in Web Proxy Auto-Discovery (WPAD) scripts enabled in Windows Vista
http://blogs.msdn.com/b/wndp/archive/2006/07/18/ipv6-wpad-for-winhttp-and-wininet.aspx

One example, where the implementation of myIpAddressEx was very useful is also mentioned in the KB-article http://support.microsoft.com/kb/2839111/en-us

6. Testing of a PAC-file
In case that the script contains any syntax-error (e.g. a missing ‘)’-character in an if-statement, the script is no more executed. In order to minimize such errors, you may consider the usage of a script-editor which performs syntax-checking on the fly. When using Visual Studio, you can just rename the extension of your PAC-file to JS when editing.

After this, you can test it by configuring it in IE as a local PAC-file. For the local C:-drive the syntax in order to configure IE would be file://c:\test.pac 
With IE11, the usage of a PAC-file through the file-protocol is no more possible, unless you add the following registry-key

[HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings]
(DWORD)"EnableLegacyAutoProxyFeatures"=1

More information to the usage of local PAC-files is available in the following Blogpost:

When debugging and testing the PAC-file, you can add statements as extraline which will initiate a popup, when the line is hit:
alert ("We are now here and host is: " + host);

Of course, alert ()-statements should never be active within the production environment.

6.1 Testing with autoprox.exe
Sometimes you need just to test your PAC-file, if the expected route is returned, although you have no access to the website in question. For such testing you can use the (attached) command line-utility tool autoprox.exe, which my colleague Pierre-Louis Coll created.
When starting it in a CMD without additional parameter the usage is displayed:

C:\temp>autoprox
Version : 2.1.0.0
Written by pierrelc@microsoft.com
Usage : AUTOPROX -s  (calling DetectAutoProxyUrl and saving wpad.dat file in temporary file)
Usage : AUTOPROX  [-h] url [Path to autoproxy file]
       -h: calls InternetInitializeAutoProxyDll with helper functions implemented in AUTOPROX
AUTOPROX url: calling DetectAutoProxyUrl and using WPAD.DAT logic to find the proxy for the url
AUTOPROX url path: using the autoproxy file from the path to find proxy for the url
Example: autoprox -s
Example: autoprox http://www.microsoft.com
Example: autoprox -h http://www.microsoft.com c:\inetpub\wwwroot\wpad.dat
Example: autoprox http://www.microsoft.comhttp://proxy/wpad.dat

Here is the output with our sample:

C:\temp>autoprox http://us.msn.com c:\temp\sample.pac
The Winsock 2.2 dll was found okay
url: http://us.msn.com
autoproxy file path is : c:\temp\sample.pac
Calling InternetInitializeAutoProxyDll with c:\temp\sample.pac
        Calling InternetGetProxyInfo with url http://us.msn.com and host us.msn.com
        Proxy returned for url http://us.msn.com is:
PROXY myproxy:80;

When you want to see which DNS-related functions have been called, you can use the parameter “-h” in addition: 
Here the output, when this is used:

C:\temp>autoprox -h http://us.msn.com c:\temp\sample.pac
The Winsock 2.2 dll was found okay
Will call InternetInitializeAutoProxyDll with helper functions
url: http://us.msn.com
autoproxy file path is : c:\temp\sample.pac
Calling InternetInitializeAutoProxyDll with c:\temp\sample.pac
        Calling InternetGetProxyInfo with url http://us.msn.com and host us.msn.com
ResolveHostByName called with lpszHostName: us.msn.com
ResolveHostByName returning lpszIPAddress: 65.55.206.229
        Proxy returned for url http://us.msn.com is:
PROXY myproxy:80;

Error-Handling in autoprox.exe:
a) When you specify a non-existing PAC-file (e.g. typo in the command-line), the result from autoprox.exe will be:
  ERROR: InternetInitializeAutoProxyDll failed with error number 0x6 6.

b) When the Pac-file contains syntax-errors, you typically receive the following message displayed:
  ERROR: InternetGetProxyInfo failed with error number 0x3eb 1003.

After finishing the local test, the PAC-file should be copied to the webserver where it will be accessed through http-protocol.

Here would be the complete sample, as discussed above:

function FindProxyForURL(url,host)
{
  // NetBIOS-names
  if (isPlainHostName(host))
    return "DIRECT";
  // change to lower case – if not already been done
  host = host.toLowerCase();
  // internal DNS-suffixes
  if (shExpMatch(host, "*.corp.company.com") ||
      shExpMatch(host, "*.dns.company.com"))
    return "DIRECT";
  // Save the IP-address to variable hostIP
  var hostIP;
  var isIpV4Addr = /^(\d+.){3}\d+$/;
  if (isIpV4Addr.test (host))
    hostIP=host;
  else
    hostIP=dnsResolve (host);
  // IP could not be determined -> go to proxy
  if (hostIP==0)
    return "PROXY myproxy:80";
  // These 3 scopes are used only internally
  if (shExpMatch (hostIP, "95.53.*") ||
      shExpMatch (hostIP, "192.168.*") ||
      shExpMatch (hostIP, "127.0.0.1"))
    return "DIRECT";
  // Eveything else goes through the proxy
  return "PROXY myproxy:80;";
}

 

Here is a known issue:

 

Good Blog Article:

 

This blog has been provided to you by another one of our Escalation Engineers for Internet Explorer, Heiko Mayer.

 


Default Set of Reports that come Out of the Box (OOB) with TFS 2013.

$
0
0
In TFS 2013 Microsoft provides three templates. (1) Scrum (2) Agile and (3) CMMI Kanban is not provided OOB, but you can download the template and upload it to your TFS server. Also there is a version of Kanban template  available on the codeplex site. Often users want to know what are the default reports that come OOB. The below is given as an answer to this search. This information is also very publicly available in our MSDN documentation. SCRUM 2.2 AGILE 6.2 CMMI 6.2 Kanban 1.0 Backlog Overview...(read more)

HOW TO: Grant Project Manager’s privileges in TFS but without outright granting Project Administrator privileges

$
0
0
In a recent customer situation, there was the need to give a few members of the team “Project Administrator/Project Manager” kind-of/sort-of privileges. However there was a twist to it. The TFS Administrators who were managing the instance did not want the resulting set of Project Managers to have the privilege to “DELETE” the Team Project itself. Project Administrator privileges usually mean the members of this group are given “Edit Project Level Information”. Project-level permissions Project-level...(read more)

New apps from Velin

$
0
0

Velin a student at IIT and a friend.  He has built some new apps recently.  Here is a bit of info on the apps and their URLs.

App info

Link

Texas Holdem lessons -

Texas Holdem is the best and most famous poker game right now!!! This app will teach you everything about the game!!! Get the best lessons to become a winning player!! Learn how to use your hands , how to read your opponents and how to bluff like a pro!!!
Have Fun!!!!

Texas Holdem Lessons

Healthy Food App -

This app is to all of you , who like the healthy lifestyle and good food!!! It includes about 150 recipes from all overt the world!!! Get the best from indian , mexican , italian , chinese and mediterranean cuisine while having fun on your Windows 8 device!!!
Bon Appetit!!!

Healthy Food App

Hairstyle App -

This  neat little app will give you fresh ideas on how to make your hairstyle. It will show you new and interesting techniques for everyday hairstyles , short hair , holiday and bridal hairstyle, and also some great ideas for the kids. Get the beautiful hairstyle you want, while having fun with your Windows 8 device.
It's completely ad free!!!

Hairstyle App

Beauty App -

Have you ever wondered how to get that perfect look with makeup? This neat little app will give you new and fresh ideas on how to apply perfect eyeliner. It will show you new and interesting techniques on how to do your eyebrows, eyelashes, lips and hair. Get the perfect look you want while having fun with your Windows 8 device.
Enjoy!

Beauty App

Adam's test of Mirroring.

$
0
0
Hi this is just a mirrored test. this is just a test. ...read more...( read more ) ...read more...(read more)

Adam's test of Mirroring.

$
0
0

Hi this is just a mirrored test.

 

this is just a test.

 

First post

$
0
0

Hi, I'm a writer on the Internet Explorer documentation team, and I'll be writing posts about new examples and documentation in the Canvas and Media areas. Each post I'll feature a new example and associated reference or other documentation that goes with it. If things aren't clear, let me know.

Thanks and "watch this space"

Spin that graphic! Canvas rotate example

$
0
0

When I first wrote the reference docs for the canvas rotate method , I included a simple example. The problem with it was that it rotated an image from the upper left corner, not the center of the image. In answer to some feedback from a reader, I created a new, simplified example with a better graphic that rotates from the center.

I've updated the reference content, due in the library soon, to talk about using the translate method to change the current origin on the canvas. The rotate method applies a rotation matrix to the canvas, using the current 0,0 position as the pivot point. To spin an object, you need to reorient the 0,0 point to the center of the object.

 

This example http://samples.msdn.microsoft.com/Workshop/samples/canvas/rotate.htm has several steps. Initially I set up a few globals to get the canvas object, and precalculate the center of the canvas.

The guts of the example is the draw function, I first use the translate method to move the 0,0 origin to the center of the canvas. I think use the rotate method to rotate the canvas by 1 degree. The rotate method accepts radians only, so I convert degrees with the formula radians = (degrees * Math.PI)/180;  I substitute a 1 for degrees in this algorithm, and pass it to the rotate method.

        //  Translate our coordinates so 0,0 is in the center of the canvas
          ctx.translate(cW, cH);    

    //  And rotate it 1 degree
          ctx.rotate((1 * Math.PI) / 180);

I then create a five point star. The star is defined around an xy point, and that's set to 0,0 to match the origin I use for the rotate method..The star uses lineTo methods to draw lines from points on two circles, five at the radius we set, and five at 1/2 the radius (inner part of the star).        

//  Start shape, blue lines, yellow fill
          ctx.beginPath();                 

//  Build the star hitting 10 points (11 to complete)
         for (var i = 11; i != 0; i--) {          
          var r = radius * (i % 2 + 1) / 2;  // Alternate between inside and outside points
      
var curAngle = vertAngle * i;  //  Calculate angle of the current point
          ctx.lineTo((r * Math.sin(curAngle)) + starCenter[0], (r * Math.cos(curAngle)) + starCenter[1]);
          }

I then set the strokeStyle, lineWidth, and fillStyle properties, and call the stroke and fill methods. This creates the star at the angle we wanted.

//  Fill and stroke
          ctx.strokeStyle ="blue";
          ctx.lineWidth ="5"
          ctx.fillStyle ="yellow";
          ctx.stroke();
          ctx.fill();

 

Finally I reset the origin back to the upper left corner. This lets me call the draw() function again.

//  Reset the translate so clearRect works correctly
          ctx.translate(-cW, -cH);

 

Now to rotate the star, we call the animate function which is very simple. It first calls the draw() function, and then calls itself using the requestAnimationFrame method.

     animate(); //  Start animating the star

//  Animate calls the draw function every time the system lets it draw

function animate() {
     draw();

   //  RequestAnimationFrame is a one shot function, needs to keep calling itself
      window.requestAnimationFrame(animate);
 }

 

That's pretty much it. The main point of using rotate() is to be sure your 0,0 origin is in the right place.

 

 

 


Advanced Developers Conference 2014

$
0
0
The Advanced Developers Conference 2014 takes place April 29-30 in Munich. This years sessions will be about modern device apps, debugging, drivers, graphics,cloud services and much more. The conference will host about 200 attendees with a broad range of international speakers including one or two from Microsoft. It is a great conference for developers, especially C++ developers. They are still looking for speakers , if you are interested, please drop a line to Ulrike Selbach ....(read more)

Vote for the SharePoint Conference App Awards – People’s Choice!

$
0
0

We asked for innovative and high-quality apps for the Office Store, and the response was overwhelming, with over 200 new or updated apps! If you are registered to attend SPC14, now is the time to cast your People’s Choice vote.

Voting will take place in two rounds – the Preliminaries and the Finals. Preliminary voting starts now and runs until February 14, 2014 16:00 Pacific Time. The Finals voting round will be announced shortly afterwards. There are a lot of apps to choose from, so check out all of them and nominate your favorite for the People’s Choice award.

SPC14 Attendees: To review the contest apps and cast your vote, see App Awards – People’s Choice.

For contest details, see App Awards.

Small Basic Challenges of the Month! February 2014

$
0
0

It's time for another set of Small Basic challenges! Thanks to LitDev for hosting this. And...

Have fun!

 

These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using Small Basic.  Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!

Please post your solutions / partial solutions / questions / feedback etc. into this forum thread that will remain 'sticky' for the month.  The only rule is that your solution must use standard SmallBasic methods (no extensions).

It would be good if people could post their problems with these challenges (in this thread) so that a discussion can start so that everyone can learn from each other.

Also post feedback (in this thread) on the kind of challenges that you want to see more of in the future.

Curriculum Challenges 3.2

  1. Write a program to read in a user's name, then create an array of the letters using Shapes.AddText for each letter.  Then animate the Text shapes in the array to reveal the name on the GraphicsWindow.
  2. Write a program using arrays to store 20 balls and move them all in some way on the GraphicsWindow. 
  3. Write a program to shuffle a pack of cards and add the shuffled cards to a stack so they can be 'popped' or dealt.

 Graphics Challenge

  1. Draw a dial (perhaps a speedometer or some other dial).  It should be able to animate as a value is changed.
  2. Write a short turtle program (10 lines or less) to draw interesting patterns.  Here is an example to get you started - try different mathematical combinations.

 

Turtle.Speed=10For i =1To600Turtle.Move(10)Turtle.Turn(i*11)EndFor


Text Challenges

  1. Write a program to write and read Morse Code (dots and dashes) or even use sound in some way.

Maths Challenges

  1. Write a program to solve quadratic equations, like x2 - 8x +15 = 0 has solutions x = 3 and x = 5.
  2. Extend it if possible to solve cubic and quartic equations.


Game Challenge

  1. Write a simple Snake game.

 


Community Suggestions (by Zock77)

  1. Write a program in which the user will draw something with his mouse. Then, when he inputs that he is done, the program will replay in real time what the user drew.

 

Community Suggestions (by Nonki)

  1. Make a tr (UNIX-like translate) command.
  2. Draw a Bezier or spline curve.
  3. Measure pixel width of a text in GraphicsWindow.


Do you have an idea for a future challenge? Please post it in the forum here!

 

Thanks again to LitDev and the community! Enjoy!

   - Ninja Ed

Need more DSC Resources? Announcing DSC Resource Kit Wave 2

$
0
0

Good news everyone! Starting today, you can use Windows PowerShell Desired State Configuration (DSC) to configure Active Directory and SQL Server (including High Availability Groups). We are pleased to release the next wave of the DSC Resource Kit – one that enables you to start using DSC to solve your real world problems and scenarios.

When we shipped DSC in Windows Server 2012 R2, we shipped a platform with great infrastructure for configuration.  The next step for any platform like DSC is the creation of resources to make it immediately usable in significant real world scenarios.  With the resources we shipped in box, configuring SQL Server was out of reach for most of our customers.  That's changing today.  Now is the time to create a vibrant ecosystem and expansive community.

Over the past few months, we've worked hard to kick start this community.  Last month, we released the first wave of the DSC Resource Kit.  That release contained six experimental DSC resources, enabling you to configure IIS websites and Hyper-V.  Those were a limited subset of resources – a first pass at the process.  Now, we’re ready to turn it up a notch. 

This wave of the DSC Resource Kit includes fourteen new resources.  These resources are all focused on enabling you to configure Active Directory and SQL Server (including High Availability Groups).  These are real world scenarios where DSC can make an impact.  Soon, we will be blogging an involved example that uses these resources to set up a SQL High Availability Group using DSC.  In addition, we’ve updated many of the resources from the initial release, adding features and fixing bugs.

Click here to see the latest DSC Resource Kit modules.

We hope these resources will be a starting point for the DSC community – something to facilitate DSC resource creation.  Feel free to take and modify these resources to meet your needs (while following the Renaming Guidelines). We were thrilled to see that several community members created modified versions of last wave’s resources in PowerShell.Org’s GitHub repository.  Also, don’t forget that you can create your own resources – for help, check out this blog post and the DSC Resource Designer.

On a more serious note, we must reiterate that these resources come without any guarantees.  The “x” prefix stands for experimental – which means these resources are provided AS IS and are not supported through any Microsoft support program or service. We will monitor the TechNet pages, take feedback, and may provide fixes on a “fix forward” basis. 

Finally – before diving into the details – we want to invite everyone to give feedback on the DSC Resource Kit.  Are you hungry for even more resources?  Do you need DSC to enable any important scenarios?  Let us know through the comments or TechNet Q&A -- there's definitely more to come.

Description of Resources

After installing the modules, you can discover all of the resources available through the Get-DSCResource cmdlet:

 

 

Here is a brief description of each resource (for more details on a resource, check out the TechNet pages).

 

Resource

Description

Module Name

Link

xADDomain

Create and manage an Active Directory Domain

xActiveDirectory

 click here

xADDomainController

Create and manage an AD Domain Controller

xActiveDirectory

 click here

xADUser

Create and manage an AD User

xActiveDirectory

 click here

xWaitForADDomain

Pause configuration implementation until the AD Domain is available.  Used for cross machine synchronization.

xActiveDirectory

 click here

xSqlServerInstall

Create and manage a SQL Server Installation.

xSqlps

 click here

xSqlHAService

Create and manage a SQL High Availability Service.

xSqlps

 click here

xSqlHAEndpoint

Create and manage the endpoint used to access a SQL High Availability Group.

xSqlps

 click here

xSqlHAGroup

Create and manage a SQL High Availability Group.

xSqlps

 click here

xWaitForSqlHAGroup

Pause configuration implementation until a SQL HA Group is available.  Used for cross machine synchronization.

xSqlps

 click here

xCluster

Create and manage a cluster.

xFailOverCluster

 click here

xWaitForCluster

Pause configuration until a cluster is available.  Used for cross machine synchronization.

xFailOverCluster

 click here

xSmbShare

Create and manage a SMB Share.

xSmbShare

 click here

xFirewall

Create and manage Firewall rules

xNetworking

 click here

xVhdFile

Manage files to be copied into a Vhd.

xHyper-V

 click here

xWebsite

Added functionality to xWebsite to support configuration of https websites.

xWebAdministration

 click here

xVhd

Bug fixes

xHyper-V

 click here

 

Renaming Guidelines

When making changes to these resources, we urge the following practice:

1.     Update the following names by replacing MSFT with your company/community name and replacing the “x” with "c" (short for "Community") or another prefix of your choice:

a.     Module name (ex: xWebAdministration becomes cWebAdministration)

a.     Folder name (ex: MSFT_xWebsite becomes Contoso_cWebsite)

b.     Resource Name (ex: MSFT_xWebsite becomes Contoso_cWebsite)

c.     Resource Friendly Name (ex: xWebsite becomes cWebsite)

d.     MOF class name (ex: MSFT_xWebsite becomes Contoso_cWebsite)

e.     Filename for the <resource>.schema.mof (ex: MSFT_xWebsite.schema.mof becomes Contoso_cWebsite.schema.mof)

2.     Update module and metadata information in the module manifest

3.     Update any configuration that use these resources

 

We reserve resource and module names without prefixes ("x" or "c") for future use (e.g. "MSFT_WebAdministration" or "Website").  If the next version of Windows Server ships with a "Website" resource, we don't want to break any configurations that use any community modifications.  Please keep a prefix such as "c" on all community modifications.

As specified in the license, you may copy or modify this resource as long as they are used on the Windows Platform.

Requirements

The DSC Resource Kit requires Windows 8.1 or Windows Server 2012 R2 with update KB2883200 (aka the GA Update Rollup). You can check whether it is installed by running the following command:

 

PS C:\WINDOWS\system32> Get-HotFix -Id KB2883200

 

Source        Description      HotFixID      InstalledBy          InstalledOn             

------        -----------      --------      -----------          -----------             

NANA-TOUCH    Update           KB2883200     NANA-TOUCH\Admini... 9/30/2013 12:00:00 AM   

 

On supported down level operating systems, they require WMF 4.0. Refer to these previous blog posts for more information on WMF 4.0 and issues with partial installation.

Using Resources

For simple examples of configurations that use these resources, check out the respective TechNet pages. Soon, we will be blogging an involved example that details the configuration of a SQL High Availability Group using DSC. If you need help deploying the resources, see this blog post

 

Thanks,

 

John Slack

Program Manager

PowerShell Team

Science in the Cloud: Building cloud virtual machines for research

$
0
0

Coming in March – there is going to be a special Azure for Research Request for Proposals – focusing on Science VMs for Research.  Take a look at the opportunity and get your request in by March 15th.

Building cloud virtual machines for research

As regular readers of this blog know, the Windows Azure for Research program recurrently solicits proposals on the use of Windows Azure, Microsoft’s cloud-computing platform, in scholarly research. Winning projects receive a one-year allocation of Windows Azure storage and compute resources.

We review these proposals on the fifteenth of even-numbered months (February, April, June, and so forth), so the next deadline, February 15, is fast approaching. This marks our third round of solicitations, and the response so far has been outstanding, as a review of current grantees and their projects attests.

New RFP series focuses on specific cloud-based research topics

In addition to these standing, bi-monthly requests for proposals, we are initiating a new set of calls, focused on specific cloud-based research topics. Submissions for the first of these special calls are due on March 15, 2014.

Our first special call—Science VMs for Research—requests proposals to build virtual machine (VM) images that can be shared with communities of users. While it is standard practice for scientific communities to share important open-source, domain-specific software tools, using these tools often involves complex installation procedures or the resolution of library conflicts. Cloud computing obviates such impediments by enabling communities to share a complete operating system image, pre-installed with all the tools needed by specialized groups of users. Thus, a newcomer to the group can install the image in the cloud and be doing productive work very quickly. Moreover, the community can keep the cloud-based VM image updated with the latest version of the software.

Building cloud virtual machines for research - Microsoft Research Connections Blog - Site Home - MSDN Blogs

Viewing all 29128 articles
Browse latest View live




Latest Images