# Friday, 29 November 2013
 #
 
Back To Basics

A cascading style sheet (CSS) is used to apply styling to an HTML web page. Separating styling from markup provides cleaner markup, easier reuse of styles, and greater flexibility when maintaining a web page.

This article describes the basics of using CSS to applying styles to a web page.

Cascading style sheets are applied to a web page by either enclosing CSS syntax between a beginning and ending STYLE tag or by creating a separate file (typically with a “.CSS” extension) containing CSS syntax and linking that file to the web page, via the LINK tag. The two syntaxes are shown below:

Inline CSS:

<style>
selector {
     style-name: style-value;
}
tag {
     style-name: style-value;
}
#id {
     style-name: style-value;
}
.classname {
     style-name: style-value;
}
</style> 

Link to stylesheet

<LINK REL=StyleSheet  HREF="style.css" TYPE="text/css">

The CSS syntax consists of a set of selectors, followed by curly brackets (“{” and “}”), containing a set of stylename:stylevalue pairs. For example, in the example below:

div {
     background-color: yellow;
} 

The selector is the word “div”. It tells the style sheet to select all div tags on the page and apply the corresponding style (in this case, yellow background color) to each div.

Historically, the most common type of selectors are

  • Text, to identify a tag name and select all tags of that type (e.g., “div”)
  • Text, preceded by “#”, to identify any element on the page with a given ID (e.g., “#Div1”, which selects any element with the attribute id=“Div1”.)
  • Text, preceded by “.”, to identify any elements on the page with a given class applied to them (e.g., “.Class1”, which selects any element with the attribute class= “Class1”).

Examples of each are below:

Select by Tag

Style:

<style> div
{
background-color: yellow;
} </style>

HTML Markup:

<div>Life, the Universe</div>
<div>and Everything!</div>

Output:

image

Select by ID

Style:

<style> #MyDiv
{
background-color: green;
} </style>

HTML Markup:

<div id="MyDiv">Life, the Universe</div>
<div id="YourDiv">and Everything!</div>

Output:

image

Select by Class name

Style:

<style>
.CoolDiv
 {
    background-color: purple;
 }
</style>

HTML Markup:

<div>Life, the Universe</div>
<div class="CoolDiv">and Everything!</div>

Output:

image

Friday, 29 November 2013 20:28:00 (GMT Standard Time, UTC+00:00)
# Thursday, 28 November 2013

11/28
Today I am grateful for the drawers I cleaned out last night and the all excess clutter I threw away this morning.

11/27
Today I am thankful that everyone else is thankful today.

11/26
There was a time in my life I would lay awake in bed every night, unable to sleep, my mind racing with stress and guilt and regret. These days, I tend to fall asleep immediately from exhaustion, which is a thousand times better. I am grateful that this has changed.

11/25
Today I am grateful that my mother is out of the hospital and feeling better.

11/24
Today I am grateful that the Michigan State Spartans won 2 championships yesterday - the Legends Division in football and the Coaches vs Cancer Classic in basketball! #GoGreen

11/22
Today I am grateful to all those who put on another great #MVPSummit.

11/21
Today I'm grateful that Keith Elder traveled 1000 miles from Hattiesburg, MS to Southfield, MI to speak at a the Great Lakes Area .NET User Group. I wish I could have been there.

11/20
Today I am grateful for a chance to meet with a group of Midwest MVPs last night and learn what is important to them. I'm excited to work with such a passionate group of community influencers.

11/19
Today I am grateful for a chance to meet and exchange ideas with so many of the smartest people in my industry.

11/18
Today I am grateful that I managed to get out of O'Hare before the storms hit Chicago yesterday.

11/17
Today I am grateful that I get to the #MVPSummit, even though I'm no longer an MVP.

11/16
Today I am grateful that my son's basketball team scheduled a game near my home so I had a chance to watch him work and spend some time with him last night.

11/15
Today I am grateful to Martin Schray, who has gone out of his way these past few weeks to help me learn my new job.

11/14
Today I am grateful that I made it through a full month of this new job with no visible scars!

11/13
Today I am grateful I was able to find a 2nd row seat at face value to watch the Spartans knock off the #1 team in the country last night!

11/12
Today I am grateful for an amazing developer community here in Michigan.

11/11
Today I am grateful to the men and women who have served our country in the armed forces, especially my father Normand Giard (Lt. Cmdr., ret), who gave 22 years of his life to the US Navy.

11/10
Today I am grateful that my son's coaching career began last night with a victory!

11/9
Today I am grateful for post-game drinks at Hop Cat with my friend John and his lady-friend.

11/8
Today I am grateful for the generosity and hospitality of Josh Cheek

11/7
Today I am grateful that I was finally able to replace my broken phone yesterday.

11/6
Today I am grateful to walk through a gently-falling autumn rain on the way to the office.

11/5
Today I am grateful for social media (like this one), which allows me to maintain relationships during the times I don't see friends and family.

11/4
Today I am grateful for another beatdown of um at Spartan Stadium this weekend. That makes 5 of the last 6 for the good guys!

11/3
Today I am grateful for

  1. Dinner with an old friend - John Karamanos - who I haven't seen in 3 years.
  2. making it home safely from Chicago despite driving most of the night and stopping to nap at a rest stop 40 miles from home.
  3. sleeping in a bed for the first time in a week.
  4. A chance to speak at SharePoint Saturday Chicago for the first time.

11/2
Today I am grateful for the generosity and hospitality of Jason Farrell, who opened his home to me this week, saving me a lot of trouble and money.

11/1
Today I am grateful that my mother is now living in a place where her health is more closely monitored.

10/31
Today I am grateful for my brother Dan, who traveled all the way from Australia to help our mother move.

10/30
Today I am grateful that my brother-in-law Brit is finally home after weeks in the hospital, following his liver transplant.

10/29
Today I am grateful for a mostly-sunny-not-cold-good-walking-around-weather day in Chicago.

10/28
Today I am grateful to Scott Zischerk, who helped me figure out my Outlook issues yesterday.

Thursday, 28 November 2013 18:46:56 (GMT Standard Time, UTC+00:00)
# Wednesday, 27 November 2013

On Saturday December 14, the Detroit Mobile .NET Users’ Group will host a Windows 8 Hackathon. Bring your laptop and build an application. Jennifer Marsman and I will be on hand to get people started with Windows 8 development, show some tools to quickly create an app, and help people along. Other experienced developers will also be attending and should be able to answer questions.

Developers at all skill levels should get something out of this event and should have the opportunity to create an app and submit it to the app store.

This event takes place December 14 starting from 9AM to 5:30PM at the Southfield, MI Microsoft office (1000 Town Center, Suite 1930).

You can find details and register at http://www.eventbrite.com/e/devunleashed-se-michigan-windows-8-hackathon-tickets-9449308135.

Wednesday, 27 November 2013 20:23:04 (GMT Standard Time, UTC+00:00)
# Tuesday, 26 November 2013

If you know me, you know I am a big fan of my slow cooker. My slow cooker pot roast recipe was a finalist for DevIntersections top recipe contest in .NET Gurus Can Cook 2nd Edition.

So I was immediately drawn to a Windows 8 app called "A Taste For Slow Cooker".

This app brings together slow cooker recipes, restaurant reviews, and links to purchase crock pots and other slow cookers.

It doesn't appear the app contains any original content but it does pull articles and videos from various sources on the web, such as YouTube and Yelp.

If you aspire to be a better cook, you spend quite a bit of time finding good recipes inside this free app. You can download it at http://aka.ms/slowcookerfoodsTEC.

ATasteForSlowCookerScreenShot 

 

If you have written or know of a Windows 8 app you would like to see featured here, please contact me at dgiard@microsoft.com.

Tuesday, 26 November 2013 21:37:00 (GMT Standard Time, UTC+00:00)
# Monday, 25 November 2013
Monday, 25 November 2013 21:46:00 (GMT Standard Time, UTC+00:00)
# Tuesday, 19 November 2013

Road Runner Jump is a simple game in which the classic Looney Tunes speedster runs to his right and jumps from platform to platform. The player gets points by advancing further to the right without falling into the gaps between the platform.

The game could be improved by adding animations or by adding some obstacles or more complex achievements. Still, it is a fun little time-waster that takes almost no time to learn (pressing any key causes Road Runner to jump).

On the plus side, this app is free and contains no ads.

You can download this Road Runner Jump at http://apps.microsoft.com/windows/en-us/app/007B8B3B-68F8-4C63-A0F6-0D548CDBF469.

RoadRunnerJumpScreenshopt

Tuesday, 19 November 2013 19:55:27 (GMT Standard Time, UTC+00:00)
Tuesday, 19 November 2013 03:06:00 (GMT Standard Time, UTC+00:00)
# Tuesday, 12 November 2013

Knave Blackjack was created by my friend Jason Follas. It realistically mimics the experience of playing blackjack in a casino, down to the texture on the table and the sound of the cards flipping out as they are dealt.

In its simplest form, the player receives 2 cards and elects to hit (accept another card) or stand (keep and play the cards dealt). The player competes against the dealer for the highest score without exceeding 21. 

However, there are multiple options that allow you to add more players; change dealer defaults; and even select the dealer's next card by clicking a spinning deck. The game also includes information to help you learn blackjack, such as a "Hint" button; a "Strategy" diagram, indicating recommended moves based on the player's cards and the dealer's visible card; and a "How to Play" button that explains the rules of blackjack and this video simulation.

The free version shows an ad on the left, but you can pay $1.49 to remove all ads.

I found Knave Blackjack fun and educational, particularly for those of us who don't play blackjack very often. You can download this game at http://www.knave21.com/index.html.

KnaveBlackjack

Tuesday, 12 November 2013 20:31:00 (GMT Standard Time, UTC+00:00)
# Monday, 11 November 2013
Monday, 11 November 2013 23:05:00 (GMT Standard Time, UTC+00:00)
# Friday, 08 November 2013

Earlier this year, I wrote a Windows Phone app. I had to register for the Windows Phone store (and pay $19) so that others could download my app. Later in the year I wrote a Windows 8 app and registered for the Windows 8 store (for an extra $49).

Registering for these stores was not a huge chore and the cost was still cheaper than the iOS store. But this process just became much simpler and much cheaper. Microsoft announced this week that developers can register for both the Windows store and the Windows Phone store for a single annual fee of $19.

If you are already registered for one of these stores, you will automatically have access to the other; and, if you've registered for both (like me), you receive an additional year for free.

Full details of these changes can be found at http://blogs.windows.com/windows/b/appbuilder/archive/2013/11/06/unifying-developer-registration-windows-and-windows-phone.aspx

This is good news for people like me who like processes to be simple and fees to be low. It removes much of the friction of publishing an app.

Friday, 08 November 2013 06:01:00 (GMT Standard Time, UTC+00:00)
# Tuesday, 05 November 2013

Word Guesser is a simple 2-player Windows 8 game. Player 1 enters a word and player 2 tries to guess the word in as few attempts as possible. The only clues are that the word is between 2 other words in the dictionary. The boundary words are refined with each guess.

This looks like a fun game for children of elementary school age. I can see this game as a good one to hand to kids on a long car trip. It can help to teach both vocabulary (assuming you are providing challenging words) and the concept of a binary search algorithm.

Download Word Guesser at http://apps.microsoft.com/windows/en-us/app/b85001c1-0782-4d4a-af96-caf23d56806e

WordGuesserScreen


Have you written a Windows 8 app or downloaded an app that you would like to see featured here? I will give preference to apps written in the US Central District after July 1.

Tuesday, 05 November 2013 22:44:00 (GMT Standard Time, UTC+00:00)
# Monday, 04 November 2013
Monday, 04 November 2013 18:00:00 (GMT Standard Time, UTC+00:00)
# Saturday, 02 November 2013
 #
 

Yesterday was my first solo flight for the Microsoft DPE team.

I've been at Microsoft over 2 weeks and I've spent my time learning technologies, filling out forms, learning about the company, and shadowing other evangelists.

But yesterday, I traveled to DeVry University in Tinley Park, IL to teach students how to build games for Windows 8.

The hosts at DeVry were great. They were extremely nice, they accommodated every request I made, they made sure the room was set up properly, and they even bought me lunch (Aurelo's Pizza is to die for, BTW).

I built a sample application of a game in which a player shoots monsters that chase him around a 2D landscape. We used the Construct2 game engine from Scirra Ltd - an impressive tool for building such games. The students followed along with my demo and built the project with me.

The students were great. About 30 high school students traveled to DeVry by bus and 4 DeVry students were in the audience. I was impressed that they not only picked up the tool and the concepts, but that they extended my demo - modifying the game in clever ways. One student flipped the game around so that the monster was shooting attacking humans; another bundled multiple players together so that he fired 10 rounds at once; another replaced all the game characters with NBA players. I was delighted to see so much creativity from high school students.

It wasn't all smooth sailing.  When I arrived, I discovered the only browsers on the student machines were IE8 and Firefox 3. Since these browsers don't support the HTML5 features of the Construct game, we could not use them. But the DeVry IT department quickly fixed this and I now have one more detail to add to the classroom setup sheet I hand to the next event organizer.

I was excited to get my first event out of the way successfully and I'm looking forward to the next thousand events.

Saturday, 02 November 2013 18:42:20 (GMT Standard Time, UTC+00:00)