<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >

<channel>
	<title>LiveDev.com</title>
	<atom:link href="http://livedev.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://livedev.com</link>
	<description>Site for Developers (C#, ASP.NET, HTML, PHP, MySQL, SQL Server)</description>
	<lastBuildDate>Fri, 09 Feb 2018 09:43:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.10</generator>
<site xmlns="com-wordpress:feed-additions:1">142525457</site>	<item>
		<title>What is Electron?</title>
		<link>http://livedev.com/que-es-electron/</link>
		<comments>http://livedev.com/que-es-electron/#respond</comments>
		<pubDate>Fri, 09 Feb 2018 09:40:51 +0000</pubDate>
		<dc:creator><![CDATA[readmin]]></dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://livedev.com/?p=63</guid>
		<description><![CDATA[Electron is an open source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript. Electron accomplishes this by combining Chromium and Node.js into a single runtime and apps can be &#8230; ]]></description>
				<content:encoded><![CDATA[<p><a href="https://electronjs.org/">Electron</a> is an open source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript. Electron accomplishes this by combining <a href="https://www.chromium.org/Home">Chromium</a> and <a href="https://nodejs.org/">Node.js</a> into a single runtime and apps can be packaged for Mac, Windows, and Linux.</p>
<p>Electron began in 2013 as the framework on which <a href="https://atom.io/">Atom</a>, GitHub&#8217;s hackable text editor, would be built. The two were open sourced in the Spring of 2014.</p>
<p>It has since become a popular tool used by open source developers, startups, and established companies. <a href="https://electronjs.org/apps">See who is building on Electron</a>.</p>
<p>Read on to learn more about the contributors and releases of Electron or get started building with Electron in the <a href="https://electronjs.org/docs/tutorial/quick-start">Quick Start Guide</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://livedev.com/que-es-electron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">63</post-id>	</item>
		<item>
		<title>What is and Why Processing.js?</title>
		<link>http://livedev.com/what-is-and-why-processing-js/</link>
		<comments>http://livedev.com/what-is-and-why-processing-js/#respond</comments>
		<pubDate>Fri, 09 Feb 2018 08:38:24 +0000</pubDate>
		<dc:creator><![CDATA[readmin]]></dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://livedev.com/?p=60</guid>
		<description><![CDATA[What is Processing? The Processing language was originally created at MIT as part of the Media lab and Aesthetics and Computation group. They needed a way to bridge the gap &#8230; ]]></description>
				<content:encoded><![CDATA[<p><strong>What is Processing?</strong><br />
The Processing language was originally created at MIT as part of the Media lab and Aesthetics and Computation group. They needed a way to bridge the gap between software developers, artists, data visualizers, etc., and to do so in a way that allowed new programmers (or non-programmers) to do complex visual work easily. Processing was built using Java, and can be thought of as a simplified Java, with a simplified Java API for drawing and graphics.</p>
<p><strong>What does Processing bring to the web?</strong><br />
Processing has a large and vibrant community, who are good at creating 2D and 3D graphics, visualizing data sets, audio, video, etc. With HTML5 the web gained canvas, audio, and video&#8211;things which had previously only been available via plugins like Flash or Java. At the same time, advances in JavaScript engines have made it possible to do things in script that were previously too slow.</p>
<p>By porting the Processing language to the web, both the Processing and web communities benefit. For Processing, this means that code which used to only work on the desktop now &#8220;just works&#8221; in the browser. For the web, this means that a new but mature and full-featured approach to graphics programming becomes available. The &lt; canvas &gt; element is too low-level for most developers to use directly&#8211;JavaScript libraries are necessary. Processing.js can be thought of as just such a library, simplifying the use of the 2D and 3D canvas operations.</p>
<p><strong>How much work is it to learn Processing?</strong><br />
The Processing language was designed to be small but complete, and easy to learn. This document does not attempt to teach you Processing, and you are encouraged to seek out Processing specific tutorials, books, and examples. Any Processing code or concepts should map to Processing.js (the exceptions are listed below). You can also use pure JavaScript to work with the Processing drawing API, skipping the Java syntax of Processing in favour of JavaScript.</p>
<p><strong>Ways to Use Processing.js</strong><br />
Processing.js was originally created in order to allow existing Processing developers and existing Processing code (often referred to as sketches) to work unmodified on the web. As a result, the recommend way to use Processing.js is to write Processing code, and have Processing.js convert it to JavaScript before running it.</p>
<p>Over time, many web developers have begun using Processing.js, and asked that we design a way for the API to be used separate from the Processing language itself. Therefore, we have provided a way for JavaScript developers to write pure JavaScript code and still use the Processing.js functions and objects. NOTE: Processing.js is first and foremost a port of Processing to the open web, with design decisions favouring compatibility with Processing. It was not designed as a general purpose HTML drawing library. Having said that, it can be used as a high-level drawing API for canvas.</p>
<p>Below we discuss the various methods for using Processing.js in your web pages.</p>
<p><strong>Writing Pure Processing Code</strong><br />
This is the preferred method for using Processing.js, and has been dealt with at length in the Processing.js for Processing Devs quick start guide. To summarize:</p>
<p>Download Processing.js <a href="http://processingjs.org/download" target="_blank" rel="noopener">from here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://livedev.com/what-is-and-why-processing-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">60</post-id>	</item>
		<item>
		<title>Order of Operations</title>
		<link>http://livedev.com/order-of-operations/</link>
		<pubDate>Sat, 07 Oct 2017 10:41:11 +0000</pubDate>
		<dc:creator><![CDATA[readmin]]></dc:creator>
				<category><![CDATA[Maths]]></category>

		<guid isPermaLink="false">http://livedev.com/?p=17</guid>
		<description><![CDATA[Learning Objective(s) Use the order of operations to simplify expressions, including those with parentheses. Use the order of operations to simplify expressions containing exponents and square roots. Introduction People need a &#8230; ]]></description>
				<content:encoded><![CDATA[<p><strong>Learning Objective(s)</strong></p>
<ul>
<li>Use the order of operations to simplify expressions, including those with parentheses.</li>
<li>Use the order of operations to simplify expressions containing exponents and square roots.</li>
</ul>
<p><strong>Introduction</strong></p>
<p>People need a common set of rules for performing computation. Many years ago, mathematicians developed a standard <strong>order of operations</strong> that tells you which calculations to make first in an expression with more than one <strong>operation</strong>. Without a standard procedure for making calculations, two people could get two different answers to the same problem. For example, 3 + 5 • 2 has only one correct answer. Is it 13 or 16?</p>
<p><strong>The Order of Addition, Subtraction, Multiplication &amp; Division Operations</strong></p>
<p>First, consider expressions that include one or more of the arithmetic operations: addition, subtraction, multiplication, and division. The order of operations requires that all multiplication and division be performed first, going from left to right in the <strong>expression</strong>. The order in which you compute multiplication and division is determined by which one comes first, reading from left to right.</p>
<p>After multiplication and division has been completed, add or subtract in order from left to right. The order of addition and subtraction is also determined by which one comes first when reading from left to right.</p>
<p>Below, are three examples showing the proper order of operations for expressions with addition, subtraction, multiplication, and/or division.</p>
<table>
<tbody>
<tr>
<td colspan="5" width="466"><strong>Example</strong></td>
</tr>
<tr>
<td width="69">Problem</td>
<td colspan="2" width="308"><strong>Simplify 3 + 5 </strong>•<strong> 2.</strong></td>
<td width="74"><strong> </strong></td>
<td width="15"><strong> </strong></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="176">3 + <strong>5 </strong>•<strong> 2</strong></td>
<td colspan="2" width="206">Order of operations tells you to perform multiplication before addition.</p>
<p>&nbsp;</td>
<td width="15"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="176">3 + 10</td>
<td colspan="2" width="206">Then add.</td>
<td width="15"></td>
</tr>
<tr>
<td colspan="5" width="466"><em>Answer     </em>3 + 5 • 2 =<strong> </strong>13</td>
</tr>
<tr>
<td width="69"></td>
<td width="176"></td>
<td width="132"></td>
<td width="74"></td>
<td width="15"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<td colspan="5" width="466"><strong>Example</strong></td>
</tr>
<tr>
<td width="69">Problem</td>
<td colspan="2" width="308"><strong>Simplify 20 – 16 ÷ 4.</strong></td>
<td width="74"><strong> </strong></td>
<td width="15"><strong> </strong></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="176">20 – <strong>16 ÷ 4</strong></td>
<td colspan="2" width="206">Order of operations tells you to perform division before subtraction.</p>
<p>&nbsp;</td>
<td width="15"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="176">20 – 4</p>
<p>16</td>
<td colspan="2" width="206">Then subtract.</td>
<td width="15"></td>
</tr>
<tr>
<td colspan="5" width="466"><em>Answer     </em>20 – 16 ÷ 4 = 16</td>
</tr>
<tr>
<td width="69"></td>
<td width="176"></td>
<td width="132"></td>
<td width="74"></td>
<td width="15"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="479">
<tbody>
<tr>
<td colspan="6" width="479"><strong>Example</strong></td>
</tr>
<tr>
<td width="69">Problem</td>
<td colspan="3" width="387"><strong>Simplify 60 – 30 ÷ 3 • 5 + 7.</strong></td>
<td width="12"><strong> </strong></td>
<td width="11"><strong> </strong></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="176">60 – <strong>30 ÷ 3 • 5</strong> + 7</td>
<td width="206">Order of operations tells you to perform multiplication and division first, working from left to right, before doing addition and subtraction.</p>
<p>&nbsp;</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="176">60 – <strong>10 • 5</strong>  + 7</p>
<p>60  –  50  +  7</td>
<td width="206">Continue to perform multiplication and division from left to right.</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="176">10 + 7</p>
<p>17</td>
<td width="206">Next, add and subtract from left to right. (Note that addition is not necessarily performed before subtraction.)</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td colspan="6" width="479"><em>Answer</em><em>     </em>60 – 30 ÷ 3 • 5 + 7  = 17</td>
</tr>
<tr>
<td width="69"></td>
<td width="176"></td>
<td width="206"></td>
<td width="4"></td>
<td width="12"></td>
<td width="11"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Grouping Symbols and the Order of Operations</strong></p>
<p><strong>Grouping symbols</strong> such as parentheses ( ), brackets [ ], braces, and fraction bars can be used to further control the order of the four basic arithmetic operations. The rules of the order of operations require computation within grouping symbols to be completed first, even if you are adding or subtracting within the grouping symbols and you have multiplication outside the grouping symbols. After computing within the grouping symbols, divide or multiply from left to right and then subtract or add from left to right.</p>
<p>&nbsp;</p>
<table width="479">
<tbody>
<tr>
<td colspan="6" width="479"><strong>Example</strong></td>
</tr>
<tr>
<td width="69">Problem</td>
<td colspan="3" width="387"><strong>Simplify 900 ÷ (6 + 3 </strong><strong>• 8) – 10.</strong></td>
<td width="12"><strong> </strong></td>
<td width="11"><strong> </strong></td>
</tr>
<tr>
<td colspan="2" width="245">900 ÷ <strong>(6 + 3 • 8) </strong>– 10</td>
<td width="206">Order of operations tells you to perform what is inside the parentheses first.</p>
<p>&nbsp;</p>
<p>&nbsp;</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="177">900 ÷ <strong>(</strong>6 +<strong> 3 • 8) </strong>– 10</p>
<p>900 ÷ <strong>(6 + 24) </strong>– 10</p>
<p>&nbsp;</td>
<td width="206">Simplify the expression in the parentheses. Multiply first.</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="177">900 ÷ 30 – 10</p>
<p>&nbsp;</td>
<td width="206">Then add 6 + 24.</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="177"><strong>900 ÷ 30</strong> – 10</p>
<p>30 – 10</p>
<p>20</td>
<td width="206">Now perform division; then subtract.</p>
<p>&nbsp;</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td colspan="6" width="479"><em>Answer</em><em>    </em>900 ÷ (6 + 3 • 8)<strong> </strong>– 10 = 20</td>
</tr>
<tr>
<td width="69"></td>
<td width="177"></td>
<td width="206"></td>
<td width="4"></td>
<td width="12"></td>
<td width="11"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>When there are grouping symbols within grouping symbols, compute from the inside to the outside. That is, begin simplifying the innermost grouping symbols first. Two examples are shown.</p>
<table width="479">
<tbody>
<tr>
<td colspan="5" width="479"><strong>Example</strong></td>
</tr>
<tr>
<td width="65">Problem</td>
<td colspan="2" width="391"><strong>Simplify 4 – 3[20 – 3 • 4 – (2 + 4)] ÷ 2.</strong></td>
<td width="12"><strong> </strong></td>
<td width="11"><strong> </strong></td>
</tr>
<tr>
<td colspan="2" width="264">4 – 3<strong>[20 – 3 • 4 – (2 + 4)]</strong> ÷ 2</td>
<td colspan="2" width="204">There are brackets and parentheses in this problem. Compute inside the innermost grouping symbols first.</td>
<td width="11"></td>
</tr>
<tr>
<td colspan="2" width="264">4 – 3[<strong>20 – 3 • 4 – (2 + 4)]</strong> ÷ 2</p>
<p>4 – 3[<strong>20 – 3 • 4 – 6]</strong> ÷ 2</td>
<td colspan="2" width="204">Simplify within parentheses.</td>
<td width="11"></td>
</tr>
<tr>
<td colspan="2" width="264">4 – 3[<strong>20 – 3 • 4 – 6]</strong> ÷ 2</p>
<p>4 – 3<strong>[20 – 12 – 6]</strong> ÷ 2</p>
<p>4 – 3<strong>[8 – 6]</strong> ÷ 2</p>
<p>&nbsp;</p>
<p>4 – 3(2) ÷ 2</td>
<td colspan="2" width="204">Then, simplify within the brackets by multiplying and then subtracting from left to right.</td>
<td width="11"></td>
</tr>
<tr>
<td colspan="2" width="264">4 – <strong>3(2) ÷ 2</strong></p>
<p>4 –<strong> 6 ÷ 2</strong></p>
<p>4 <strong>–</strong> 3</td>
<td colspan="2" width="204">Multiply and divide from left to right.</td>
<td width="11"></td>
</tr>
<tr>
<td width="65"><strong> </strong></td>
<td width="199">4 <strong>–</strong> 3</p>
<p>1</td>
<td colspan="2" width="204">Subtract.</td>
<td width="11"></td>
</tr>
<tr>
<td colspan="5" width="479"><em>Answer</em><em>     </em>4 – 3[20 – 3 • 4 – (2 + 4)] ÷ 2  = 1</td>
</tr>
<tr>
<td width="65"></td>
<td width="199"></td>
<td width="192"></td>
<td width="12"></td>
<td width="11"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Remember that parentheses can also be used to show multiplication. In the example that follows, the parentheses are not a grouping symbol; they are a multiplication symbol. In this case, since the problem only has multiplication and division, we compute from left to right. Be careful to determine what parentheses mean in any given problem. Are they a grouping symbol or a multiplication sign?</p>
<table width="479">
<tbody>
<tr>
<td colspan="6" width="479"><strong>Example</strong></td>
</tr>
<tr>
<td width="69">Problem</td>
<td colspan="3" width="387"><strong>Simplify 6 ÷ (3)(2).</strong></td>
<td width="12"><strong> </strong></td>
<td width="11"><strong> </strong></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="177">6 ÷  3 • 2</td>
<td width="206">This expression has multiplication and division only. The multiplication operation can be shown with a dot.</p>
<p>&nbsp;</p>
<p>&nbsp;</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td width="69"><strong> </strong></td>
<td width="177">6 ÷  3 • 2</p>
<p>2 • 2</p>
<p>4</td>
<td width="206">Since this expression has only division and multiplication, compute from left to right.</td>
<td colspan="3" width="28"></td>
</tr>
<tr>
<td colspan="6" width="479"><em>Answer    </em>6 ÷ (3)(2) = 4</td>
</tr>
<tr>
<td width="69"></td>
<td width="177"></td>
<td width="206"></td>
<td width="4"></td>
<td width="12"></td>
<td width="11"></td>
</tr>
</tbody>
</table>
<p>Consider what happens if braces are added to the problem above: 6 ÷ {(3)(2)}. The parentheses still mean multiplication; the additional braces are a grouping symbol. According to the order of operations, compute what is inside the braces first. This problem is now evaluated as 6 ÷ 6 = 1. Notice that the braces caused the answer to change from 1 to 4.</p>
<table style="font-size: 1rem;">
<tbody>
<tr>
<td width="590">Simplify 40 – (4 + 6) ÷ 2 + 3.</p>
<p>A) 18</p>
<p>&nbsp;</p>
<p>B) 38</p>
<p>&nbsp;</p>
<p>C) 24</p>
<p>&nbsp;</p>
<p>D) 32</p>
<p>&nbsp;</p>
<p>Show/Hide Answer</p>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<td width="590"><strong>The Order of Operations</strong></p>
<p>&nbsp;</p>
<p>1)      Perform all operations within grouping symbols first. Grouping symbols include</p>
<p>parentheses ( ), braces { }, brackets [ ], and fraction bars.</p>
<p>2)      Multiply and Divide, from left to right.</p>
<p>3)      Add and Subtract, from left to right.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Performing the Order of Operations with Exponents and Square Roots</strong></p>
<p>So far, our rules allow us to simplify expressions that have multiplication, division, addition, subtraction or grouping symbols in them. What happens if a problem has <strong>exponents</strong> or <strong>square roots</strong> in it? We need to expand our order of operation rules to include exponents and square roots.</p>
<p>If the expression has exponents or square roots, they are to be performed a<em>fter </em>parentheses and other grouping symbols have been simplified and <em>before </em>any multiplication, division, subtraction and addition that are outside the parentheses or other grouping symbols.</p>
<p>Note that you compute from more complex operations to more basic operations. Addition and subtraction are the most basic of the operations. You probably learned these first. Multiplication and division, often thought of as repeated addition and subtraction, are more complex and come before addition and subtraction in the order of operations. Exponents and square roots are repeated multiplication and division, and because they’re even more complex, they are performed before multiplication and division. Some examples that show the order of operations involving exponents and square roots are shown below.</p>
<table width="518">
<tbody>
<tr>
<td colspan="4" width="518"><strong>Example</strong></td>
</tr>
<tr>
<td width="67">Problem</td>
<td width="252"><strong>Simplify 14 + 28 ÷ 2<sup>2</sup>.</strong></td>
<td width="163"><strong> </strong></td>
<td width="36"><strong> </strong></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="252">14 + 28 ÷ 2<sup>2</sup></td>
<td width="163">This problem has addition, division, and exponents in it. Use the order of operations.</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="252">14 + 28 ÷ 4</td>
<td width="163">Simplify 2<sup>2</sup>.</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="252">14 + 7</td>
<td width="163">Perform division before addition.</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="252">21</td>
<td width="163">Add.</td>
<td width="36"></td>
</tr>
<tr>
<td colspan="4" width="518"><em>Answer    </em>14 + 28 ÷ 2<sup>2 = </sup>21</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="518">
<tbody>
<tr>
<td colspan="4" width="518"><strong>Example</strong></td>
</tr>
<tr>
<td width="67">Problem</td>
<td width="252"><strong>Simplify 3<sup>2</sup> </strong>•<strong> 2<sup>3</sup>.</strong></td>
<td width="163"><strong> </strong></td>
<td width="36"><strong> </strong></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="252">3<sup>2</sup> • 2<sup>3</sup></td>
<td width="163">This problem has exponents and multiplication in it.</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="252">9 • 8</td>
<td width="163">Simplify 3<sup>2 </sup>and<sup> </sup>2<sup>3</sup>.</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="252">72</td>
<td width="163">Perform multiplication.</td>
<td width="36"></td>
</tr>
<tr>
<td colspan="4" width="518"><em>Answer</em><em>   </em>3<sup>2</sup> • 2<sup>3</sup> = 72</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="518">
<tbody>
<tr>
<td colspan="4" width="518"><strong>Example</strong></td>
</tr>
<tr>
<td width="67">Problem</td>
<td width="198"><strong>Simplify (3 + 4)<sup>2</sup> + (8)(4).</strong></td>
<td width="217"><strong> </strong></td>
<td width="36"><strong> </strong></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="198"><strong>(3 + 4)</strong><sup>2</sup> + (8)(4)</td>
<td width="217">This problem has parentheses, exponents, and multiplication in it. The first set of parentheses is a grouping symbol. The second set indicates multiplication.</p>
<p>Grouping symbols are handled first.</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="198">7<sup>2</sup> + (8)(4)</p>
<p>49 + (8)(4)</td>
<td width="217">Add the numbers inside the parentheses that are serving as grouping symbols. Simplify 7<sup>2</sup>.</p>
<p>&nbsp;</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="198">49 + 32</td>
<td width="217">Perform multiplication.</td>
<td width="36"></td>
</tr>
<tr>
<td width="67"><strong> </strong></td>
<td width="198">81</td>
<td width="217">Add.</td>
<td width="36"></td>
</tr>
<tr>
<td colspan="4" width="518"><em>Answer    </em>(3 + 4)<sup>2</sup> + (8)(4) = 81</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<td width="590">&nbsp;</p>
<p>Simplify 77 – (1 + 4 – 2)<sup>2</sup>.</p>
<p>&nbsp;</p>
<p>A) 68</p>
<p>&nbsp;</p>
<p>B) 28</p>
<p>&nbsp;</p>
<p>C) 71</p>
<p>&nbsp;</p>
<p>D) 156</p>
<p>&nbsp;</p>
<p>Show/Hide Answer</p>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="581">
<tbody>
<tr>
<td width="581"><strong>The Order of Operations</strong></p>
<p>&nbsp;</p>
<p>1)      Perform all operations within grouping symbols first. Grouping symbols include</p>
<p>parentheses ( ), braces { }, brackets [ ], and fraction bars.</p>
<p>2)      Evaluate exponents and roots of numbers, such as square roots.</p>
<p>3)      Multiply and Divide, from left to right.</p>
<p>4)      Add and Subtract, from left to right.</td>
</tr>
</tbody>
</table>
<p>Some people use a saying to help them remember the order of operations. This saying is called PEMDAS or “<strong>P</strong>lease <strong>E</strong>xcuse <strong>M</strong>y <strong>D</strong>ear <strong>A</strong>unt <strong>S</strong>ally.” The first letter of each word begins with the same letter of an arithmetic operation.</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<td width="401"><strong>P</strong>lease  <strong>P</strong>arentheses (and other grouping symbols)</td>
</tr>
<tr>
<td width="401"><strong>E</strong>xcuse  <strong>E</strong>xponents</td>
</tr>
<tr>
<td width="401"><strong>M</strong>y <strong>D</strong>ear  <strong>M</strong>ultiplication and <strong>D</strong>ivision (from left to right)</td>
</tr>
<tr>
<td width="401"><strong>A</strong>unt <strong>S</strong>ally  <strong>A</strong>ddition and <strong>S</strong>ubtraction (from left to right)</td>
</tr>
</tbody>
</table>
<p>Note: Even though multiplication comes before division in the saying, division could be performed first. Which is performed first, between multiplication and division, is determined by which comes first when reading from left to right. The same is true of addition and subtraction. Don’t let the saying confuse you about this!</p>
<p><strong>Summary</strong></p>
<p>The order of operations gives us a consistent sequence to use in computation. Without the order of operations, you could come up with different answers to the same computation problem. (Some of the early calculators, and some inexpensive ones, do NOT use the order of operations. In order to use these calculators, the user has to input the numbers in the correct order.)</p>
]]></content:encoded>
		<post-id xmlns="com-wordpress:feed-additions:1">17</post-id>	</item>
		<item>
		<title>Calculate age in C#</title>
		<link>http://livedev.com/calculate-age-in-c/</link>
		<pubDate>Sat, 07 Oct 2017 06:37:21 +0000</pubDate>
		<dc:creator><![CDATA[readmin]]></dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[age]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[calulate]]></category>

		<guid isPermaLink="false">http://livedev.com/?p=48</guid>
		<description><![CDATA[An easy to understand and simple solution. This is a strange way to do it, but if you format the date to yyyymmdd and subtract the date of birth from &#8230; ]]></description>
				<content:encoded><![CDATA[<p>An easy to understand and simple solution.</p>
<pre class="brush: csharp; title: ; notranslate">
// Save today's date.
var today = DateTime.Today;
// Calculate the age.
var age = today.Year - birthdate.Year;
// Go back to the year the person was born in case of a leap year
if (birthdate &amp;gt; today.AddYears(-age)) age--;</pre>
<p>This is a strange way to do it, but if you format the date to yyyymmdd and subtract the date of birth from the current date then drop the last 4 digits you&#8217;ve got the age <img src="https://s.w.org/images/core/emoji/11/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>I don&#8217;t know C#, but I believe this will work in any language.</p>
<p>20080814 &#8211; 19800703 = 280111<br />
Drop the last 4 digits = 28.</p>
<p>C# Code:</p>
<pre class="brush: csharp; title: ; notranslate">
int now = int.Parse(DateTime.Now.ToString(&quot;yyyyMMdd&quot;));
int dob = int.Parse(dateOfBirth.ToString(&quot;yyyyMMdd&quot;));
int age = (now - dob) / 10000;
&lt;/code&gt;
Or alternatively without all the type conversion in the form of an extension method. Error checking omitted:
&lt;code&gt;
public static Int32 GetAge(this DateTime dateOfBirth)
{
    var today = DateTime.Today;

    var a = (today.Year * 100 + today.Month) * 100 + today.Day;
    var b = (dateOfBirth.Year * 100 + dateOfBirth.Month) * 100 + dateOfBirth.Day;

    return (a - b) / 10000;
}
</pre>
<p>I don&#8217;t know how the wrong solution can be accepted.<br />
The correct C# snippet was written by Michael Stum</p>
<p>Here is a test snippet:</p>
<pre class="brush: csharp; title: ; notranslate">
    DateTime bDay = new DateTime(2000, 2, 29);
    DateTime now = new DateTime(2009, 2, 28);
    MessageBox.Show(string.Format(&quot;Test {0} {1} {2}&quot;,
                    CalculateAgeWrong1(bDay, now),     // outputs 9
                    CalculateAgeWrong2(bDay, now),     // outputs 9
                    CalculateAgeCorrect(bDay, now)));  // outputs 8
</pre>
<p>Here you have the methods:</p>
<pre class="brush: csharp; title: ; notranslate">
    public int CalculateAgeWrong1(DateTime birthDate, DateTime now)
    {
        return new DateTime(now.Subtract(birthDate).Ticks).Year - 1;
    }

    public int CalculateAgeWrong2(DateTime birthDate, DateTime now)
    {
        int age = now.Year - birthDate.Year;

        if (now &lt; birthDate.AddYears(age))
            age--;

        return age;
    }

    public int CalculateAgeCorrect(DateTime birthDate, DateTime now)
    {
        int age = now.Year - birthDate.Year;

        if (now.Month &lt; birthDate.Month || (now.Month == birthDate.Month &amp;&amp; now.Day &lt; birthDate.Day))
            age--;

        return age;
    }
</pre>
]]></content:encoded>
		<post-id xmlns="com-wordpress:feed-additions:1">48</post-id>	</item>
	</channel>
</rss>
