{"appState":{"pageLoadApiCallsStatus":true},"categoryState":{"relatedCategories":{"headers":{"timestamp":"2022-06-23T18:31:12+00:00"},"categoryId":33592,"data":{"title":"Programming & Web Design","slug":"programming-web-design","image":{"src":null,"width":0,"height":0},"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592}],"parentCategory":{"categoryId":33512,"title":"Technology","slug":"technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"}},"childCategories":[{"categoryId":34511,"title":"Go Programming Language","slug":"go-programming-language","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34511"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33593,"title":"3D Printing","slug":"3d-printing","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33593"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33594,"title":"App Development","slug":"app-development","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33594"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33595,"title":"C","slug":"c","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33595"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33596,"title":"C#","slug":"csharp","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33596"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33597,"title":"C++","slug":"cplusplus","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33597"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33598,"title":"Cisco","slug":"cisco-programming","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33598"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33599,"title":"Coding","slug":"coding","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33599"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33600,"title":"HTML","slug":"html","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33600"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33601,"title":"HTML5","slug":"html5","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33601"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33602,"title":"Java","slug":"java","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33602"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33603,"title":"JavaScript","slug":"javascript","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33603"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33604,"title":"MATLAB","slug":"matlab","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33604"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33605,"title":"PHP","slug":"php","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33605"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33606,"title":"Python","slug":"python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33607,"title":"R","slug":"r","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33607"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":33608,"title":"SQL","slug":"sql","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33608"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":34324,"title":"CSS3","slug":"css3","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34324"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}},{"categoryId":34338,"title":"Web Hosting","slug":"web-hosting","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34338"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0}},{"categoryId":34376,"title":"Blogging & Website Platforms","slug":"blogging-website-platforms","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34376"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0}}],"description":"Ever wonder what makes the software, websites, and blogs you use every day function properly (or improperly)? It's programming. Our articles reveal the ins and outs of programming and web design.","relatedArticles":{"self":"https://dummies-api.dummies.com/v2/articles?category=33592&offset=0&size=5"}},"_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"}},"relatedCategoriesLoadedStatus":"success"},"listState":{"list":{"count":10,"total":1390,"items":[{"headers":{"creationTime":"2016-03-26T14:56:06+00:00","modifiedTime":"2022-05-31T14:42:00+00:00","timestamp":"2022-06-22T19:37:41+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"How to Fix Noncompliant Code on Your Web Page","strippedTitle":"how to fix noncompliant code on your web page","slug":"how-to-fix-noncompliant-code-on-your-web-page","canonicalUrl":"","seo":{"metaDescription":"For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are eas","noIndex":0,"noFollow":0},"content":"For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are easy to fix, such as missing <span class=\"code\">alt</span> text and <span class=\"code\"><noscript></span> tags, you’re bound to find coding issues that completely baffle and stump you.\r\n\r\nFor instance, if you get an error message that reads <span class=\"code\">XML Parsing Error: Opening and ending tag mismatch: br line 52 and body</span>, it might be difficult to figure out what that means, let alone why it was caused and how you should fix it.\r\n\r\nAs a strategy then, try to fix the issues within the code from the top down, as they’re listed in the validation results, because sometimes fixing one issue resolves another. With the XML parsing error, that issue might disappear when you correct for an omitted closing element on a <span class=\"code\"><br /></span> tag listed earlier in the error results.\r\n\r\nThe best way to find out how to code better and make fewer mistakes before validation testing is to make lots of honest mistakes and figure out how to correct them on your own. Most often, you can fix noncompliant code by hand or with the help of a good HTML editor.\r\n\r\nTo help you identify some of the more common coding mistakes, here several code issues along with suggestions about how to fix them.\r\n<table>\r\n<tbody>\r\n<tr>\r\n<th>Problem</th>\r\n<th>Solution</th>\r\n</tr>\r\n<tr>\r\n<td>\r\n<pre class=\"code\">alt</pre>\r\ntext attribute missing from\r\n<pre class=\"code\"><img></pre>\r\ntag</td>\r\n<td>Add the alternative text attribute, either with or without a\r\ndescription, as in\r\n<pre class=\"code\"><img\r\nsrc=\"images/logo.gif\" width=\"150\"\r\nheight=\"150\" alt=\"Pete’s Pizza\">\r\n<img src=\"images/flourish.gif\" width=\"200\"\r\nheight=\"150\" alt=\"\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<pre class=\"code\"><noscript></pre>\r\ntags missing from\r\ncode</td>\r\n<td>Add\r\n<pre class=\"code\"><noscript></pre>\r\ntags below each\r\ninstance when JavaScript is present in in-line JavaScript or at the\r\nend of the content before the closing body tag. Between the\r\n<pre class=\"code\"><noscript></pre>\r\ntags, insert HTML content\r\n(text, graphics, media files, and so on) that describes the\r\nfunction of the JavaScript and, when appropriate, how visitors can\r\naccess the information revealed by it, as shown here:\r\n<pre class=\"code\"><script language=\"JavaScript\"\r\nsrc=\"bookmark.js\"\r\ntype=\"text/javascript\"></script><noscript>The\r\nJavaScript used on this page provides a quick link that allows\r\nvisitors to automatically bookmark this page. As an alternative,\r\nplease use your browser’s Bookmark This Page feature.</noscript></pre>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>Flashing or flickering element(s) detected, such as animated\r\nGIFs, Java applets, and other multimedia plug-ins</td>\r\n<td>Adjust the speed of any animations to avoid causing the screen\r\nto flicker with a frequency between 2 Hz and 55 Hz. Animations that\r\nexceed these two measures may cause seizures in visitors with\r\nphotosensitive epilepsy.</td>\r\n</tr>\r\n<tr>\r\n<td>No\r\n<pre class=\"code\">DOCTYPE</pre>\r\nspecified</td>\r\n<td>Add a valid\r\n<pre class=\"code\">DOCTYPE</pre>\r\nabove the opening\r\n<pre class=\"code\"><head></pre>\r\ntag.</td>\r\n</tr>\r\n<tr>\r\n<td>No HTTP charset parameter specified</td>\r\n<td>This special meta tag specifies the character set used in the\r\nHTML code. Some HTML editors include it automatically when\r\ngenerating new blank web pages. If validation finds that this tag\r\nis missing from your HTML or XHTML code, insert the following code\r\nby hand:\r\n<pre class=\"code\"><meta\r\nhttp-equiv=\"Content-Type\" content=\"text/html;\r\ncharset=utf-8\"></pre>\r\n. For HTML5, insert\r\n<pre class=\"code\"><meta charset=\"utf-8\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>No\r\n<pre class=\"code\"><title></pre>\r\ntag specified</td>\r\n<td>Add a unique title between\r\n<pre class=\"code\"><title></pre>\r\ntags in the head area on each\r\npage.</td>\r\n</tr>\r\n<tr>\r\n<td>No\r\n<pre class=\"code\"><meta></pre>\r\ntags specified</td>\r\n<td>Add meta keywords and meta description tags to the head of each\r\npage. These can be identical on every page on the site. If desired,\r\nyou may also add additional meta tags as needed.</td>\r\n</tr>\r\n<tr>\r\n<td>No Robots tags specified</td>\r\n<td>Add the\r\n<pre class=\"code\">Robots</pre>\r\n<pre class=\"code\"><meta></pre>\r\ntag in the head of the page to\r\ninstruct web spiders and robots whether to index the page and\r\nfollow any hyperlinks, such as\r\n<pre class=\"code\"><meta\r\nname=\"Robots\" content=\"All\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>Deprecated\r\n<pre class=\"code\"><font></pre>\r\ntags\r\ndetected</td>\r\n<td>Move all the presentation markup of the HTML (page, fonts,\r\ntables, links, and so on) to an external CSS file and remove all\r\n<pre class=\"code\"><font></pre>\r\ntags and HTML and inline\r\nformatting attributes.</td>\r\n</tr>\r\n<tr>\r\n<td>Deprecated table height attribute detected</td>\r\n<td>Control table cell heights, when necessary, with CSS\r\nstyles.</td>\r\n</tr>\r\n<tr>\r\n<td>Style attributes detected in the opening\r\n<pre class=\"code\"><body></pre>\r\ntag</td>\r\n<td>Move <span class=\"code\">body</span> attributes, like margin\r\nattributes and background page color, to a BODY tag redefine style\r\nin an external CSS file.</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<pre class=\"code\">type</pre>\r\nattribute not specified for\r\nJavaScript or CSS</td>\r\n<td>Add the\r\n<pre class=\"code\">type=\"text/css\"</pre>\r\nattribute for\r\n<pre class=\"code\"><style></pre>\r\ntags and the\r\n<pre class=\"code\">type=\"text/javascript\"</pre>\r\nattribute for\r\n<pre class=\"code\"><script></pre>\r\ntags:\r\n<pre class=\"code\"><style type=\"text/css\" ><script\r\ntype=\"text/javascript\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>Entity name used instead of entity number</td>\r\n<td>Change the entity name to an entity number, such as using\r\n<pre class=\"code\">$#169;</pre>\r\ninstead of\r\n<pre class=\"code\">&copy;</pre>\r\nto create the copyright symbol\r\n(c).</td>\r\n</tr>\r\n<tr>\r\n<td>No background color attribute was specified for a CSS style\r\nthat specifies text color</td>\r\n<td>Provide each style that contains a text\r\n<pre class=\"code\">color</pre>\r\nattribute with an attending background\r\n<pre class=\"code\">color</pre>\r\nattribute. The background color\r\nshould match, or closely match, the background color upon which the\r\ntext will display on.</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\nWhen you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.","description":"For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are easy to fix, such as missing <span class=\"code\">alt</span> text and <span class=\"code\"><noscript></span> tags, you’re bound to find coding issues that completely baffle and stump you.\r\n\r\nFor instance, if you get an error message that reads <span class=\"code\">XML Parsing Error: Opening and ending tag mismatch: br line 52 and body</span>, it might be difficult to figure out what that means, let alone why it was caused and how you should fix it.\r\n\r\nAs a strategy then, try to fix the issues within the code from the top down, as they’re listed in the validation results, because sometimes fixing one issue resolves another. With the XML parsing error, that issue might disappear when you correct for an omitted closing element on a <span class=\"code\"><br /></span> tag listed earlier in the error results.\r\n\r\nThe best way to find out how to code better and make fewer mistakes before validation testing is to make lots of honest mistakes and figure out how to correct them on your own. Most often, you can fix noncompliant code by hand or with the help of a good HTML editor.\r\n\r\nTo help you identify some of the more common coding mistakes, here several code issues along with suggestions about how to fix them.\r\n<table>\r\n<tbody>\r\n<tr>\r\n<th>Problem</th>\r\n<th>Solution</th>\r\n</tr>\r\n<tr>\r\n<td>\r\n<pre class=\"code\">alt</pre>\r\ntext attribute missing from\r\n<pre class=\"code\"><img></pre>\r\ntag</td>\r\n<td>Add the alternative text attribute, either with or without a\r\ndescription, as in\r\n<pre class=\"code\"><img\r\nsrc=\"images/logo.gif\" width=\"150\"\r\nheight=\"150\" alt=\"Pete’s Pizza\">\r\n<img src=\"images/flourish.gif\" width=\"200\"\r\nheight=\"150\" alt=\"\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<pre class=\"code\"><noscript></pre>\r\ntags missing from\r\ncode</td>\r\n<td>Add\r\n<pre class=\"code\"><noscript></pre>\r\ntags below each\r\ninstance when JavaScript is present in in-line JavaScript or at the\r\nend of the content before the closing body tag. Between the\r\n<pre class=\"code\"><noscript></pre>\r\ntags, insert HTML content\r\n(text, graphics, media files, and so on) that describes the\r\nfunction of the JavaScript and, when appropriate, how visitors can\r\naccess the information revealed by it, as shown here:\r\n<pre class=\"code\"><script language=\"JavaScript\"\r\nsrc=\"bookmark.js\"\r\ntype=\"text/javascript\"></script><noscript>The\r\nJavaScript used on this page provides a quick link that allows\r\nvisitors to automatically bookmark this page. As an alternative,\r\nplease use your browser’s Bookmark This Page feature.</noscript></pre>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>Flashing or flickering element(s) detected, such as animated\r\nGIFs, Java applets, and other multimedia plug-ins</td>\r\n<td>Adjust the speed of any animations to avoid causing the screen\r\nto flicker with a frequency between 2 Hz and 55 Hz. Animations that\r\nexceed these two measures may cause seizures in visitors with\r\nphotosensitive epilepsy.</td>\r\n</tr>\r\n<tr>\r\n<td>No\r\n<pre class=\"code\">DOCTYPE</pre>\r\nspecified</td>\r\n<td>Add a valid\r\n<pre class=\"code\">DOCTYPE</pre>\r\nabove the opening\r\n<pre class=\"code\"><head></pre>\r\ntag.</td>\r\n</tr>\r\n<tr>\r\n<td>No HTTP charset parameter specified</td>\r\n<td>This special meta tag specifies the character set used in the\r\nHTML code. Some HTML editors include it automatically when\r\ngenerating new blank web pages. If validation finds that this tag\r\nis missing from your HTML or XHTML code, insert the following code\r\nby hand:\r\n<pre class=\"code\"><meta\r\nhttp-equiv=\"Content-Type\" content=\"text/html;\r\ncharset=utf-8\"></pre>\r\n. For HTML5, insert\r\n<pre class=\"code\"><meta charset=\"utf-8\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>No\r\n<pre class=\"code\"><title></pre>\r\ntag specified</td>\r\n<td>Add a unique title between\r\n<pre class=\"code\"><title></pre>\r\ntags in the head area on each\r\npage.</td>\r\n</tr>\r\n<tr>\r\n<td>No\r\n<pre class=\"code\"><meta></pre>\r\ntags specified</td>\r\n<td>Add meta keywords and meta description tags to the head of each\r\npage. These can be identical on every page on the site. If desired,\r\nyou may also add additional meta tags as needed.</td>\r\n</tr>\r\n<tr>\r\n<td>No Robots tags specified</td>\r\n<td>Add the\r\n<pre class=\"code\">Robots</pre>\r\n<pre class=\"code\"><meta></pre>\r\ntag in the head of the page to\r\ninstruct web spiders and robots whether to index the page and\r\nfollow any hyperlinks, such as\r\n<pre class=\"code\"><meta\r\nname=\"Robots\" content=\"All\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>Deprecated\r\n<pre class=\"code\"><font></pre>\r\ntags\r\ndetected</td>\r\n<td>Move all the presentation markup of the HTML (page, fonts,\r\ntables, links, and so on) to an external CSS file and remove all\r\n<pre class=\"code\"><font></pre>\r\ntags and HTML and inline\r\nformatting attributes.</td>\r\n</tr>\r\n<tr>\r\n<td>Deprecated table height attribute detected</td>\r\n<td>Control table cell heights, when necessary, with CSS\r\nstyles.</td>\r\n</tr>\r\n<tr>\r\n<td>Style attributes detected in the opening\r\n<pre class=\"code\"><body></pre>\r\ntag</td>\r\n<td>Move <span class=\"code\">body</span> attributes, like margin\r\nattributes and background page color, to a BODY tag redefine style\r\nin an external CSS file.</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<pre class=\"code\">type</pre>\r\nattribute not specified for\r\nJavaScript or CSS</td>\r\n<td>Add the\r\n<pre class=\"code\">type=\"text/css\"</pre>\r\nattribute for\r\n<pre class=\"code\"><style></pre>\r\ntags and the\r\n<pre class=\"code\">type=\"text/javascript\"</pre>\r\nattribute for\r\n<pre class=\"code\"><script></pre>\r\ntags:\r\n<pre class=\"code\"><style type=\"text/css\" ><script\r\ntype=\"text/javascript\"></pre>\r\n.</td>\r\n</tr>\r\n<tr>\r\n<td>Entity name used instead of entity number</td>\r\n<td>Change the entity name to an entity number, such as using\r\n<pre class=\"code\">$#169;</pre>\r\ninstead of\r\n<pre class=\"code\">&copy;</pre>\r\nto create the copyright symbol\r\n(c).</td>\r\n</tr>\r\n<tr>\r\n<td>No background color attribute was specified for a CSS style\r\nthat specifies text color</td>\r\n<td>Provide each style that contains a text\r\n<pre class=\"code\">color</pre>\r\nattribute with an attending background\r\n<pre class=\"code\">color</pre>\r\nattribute. The background color\r\nshould match, or closely match, the background color upon which the\r\ntext will display on.</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\nWhen you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.","blurb":"","authors":[{"authorId":9719,"name":"Sue Jenkins","slug":"sue-jenkins","description":"Sue Jenkins is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Jenkins has also created a series of courses on popular Adobe design tools including Photoshop and Illustrator.","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9719"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":208112,"title":"Web Design All-in-One For Dummies Cheat Sheet","slug":"web-design-all-in-one-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/208112"}},{"articleId":204470,"title":"How to Add a DOCTYPE in Dreamweaver","slug":"how-to-add-a-doctype-in-dreamweaver","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/204470"}},{"articleId":204469,"title":"How to Remove Unwanted Formatting from Your Website","slug":"how-to-remove-unwanted-formatting-from-your-website","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/204469"}},{"articleId":204468,"title":"How to Transfer Files to Your Website with Dreamweaver","slug":"how-to-transfer-files-to-your-website-with-dreamweaver","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/204468"}},{"articleId":171074,"title":"Nine Basic CSS Categories to Use in Web Design","slug":"nine-basic-css-categories-to-use-in-web-design","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/171074"}}],"fromCategory":[{"articleId":265680,"title":"Tips for Improving Engineering Performance with DevOps","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"Make More of Your Cloud Tools: Automating DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"Choosing the Best Cloud Service Provider, Features, and Tools for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}},{"articleId":265656,"title":"Moving to DevOps Processes: From a Line to a Circuit","slug":"moving-to-devops-processes-from-a-line-to-a-circuit","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265656"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281890,"slug":"web-design-all-in-one-for-dummies-2nd-edition","isbn":"9781118404102","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1118404106-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/web-design-all-in-one-for-dummies-2nd-edition-cover-9781118404102-203x255.jpg","width":203,"height":255},"title":"Web Design All-in-One For Dummies, 2nd Edition","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"9719\">Sue Jenkins</b> is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Sue has also created a series of training DVDs on popular Adobe design tools including Photoshop, Dreamweaver, and Illustrator.</p>","authors":[{"authorId":9719,"name":"Sue Jenkins","slug":"sue-jenkins","description":"Sue Jenkins is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Jenkins has also created a series of courses on popular Adobe design tools including Photoshop and Illustrator.","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9719"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118404102&quot;]}]\" id=\"du-slot-62b36f859714a\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118404102&quot;]}]\" id=\"du-slot-62b36f859789a\"></div></div>"},"articleType":{"articleType":"Articles","articleList":null,"content":null,"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2022-05-31T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":166201},{"headers":{"creationTime":"2016-03-27T16:53:50+00:00","modifiedTime":"2022-05-03T18:17:32+00:00","timestamp":"2022-06-22T19:37:40+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"Beginning Programming All-In-One For Dummies Cheat Sheet","strippedTitle":"beginning programming all-in-one for dummies cheat sheet","slug":"beginning-programming-all-in-one-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"This Cheat Sheet covers beginning programming knowledge, including data structures, branching and looping statements, and online resources.","noIndex":0,"noFollow":0},"content":"If you're just getting started writing computer programs, you need to learn programming branching and looping statements to perform the specific jobs you need for an effective program. Keeping a list of computer programming resources for useful information handy can help, too.","description":"If you're just getting started writing computer programs, you need to learn programming branching and looping statements to perform the specific jobs you need for an effective program. Keeping a list of computer programming resources for useful information handy can help, too.","blurb":"","authors":[{"authorId":9043,"name":"Wallace Wang","slug":"wallace-wang","description":" <b>Wallace Wang</b> is a bestselling author with more than 2.3 million <i>For Dummies</i> books in print. He wrote <i>Beginning Programming For Dummies</i> and moonlights as a stand-up comic.","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9043"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[],"fromCategory":[{"articleId":265680,"title":"Tips for Improving Engineering Performance with DevOps","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"Make More of Your Cloud Tools: Automating DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"Choosing the Best Cloud Service Provider, Features, and Tools for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}},{"articleId":265656,"title":"Moving to DevOps Processes: From a Line to a Circuit","slug":"moving-to-devops-processes-from-a-line-to-a-circuit","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265656"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":292091,"slug":"beginning-programming-all-in-one-for-dummies-2nd-edition","isbn":"9781119884408","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1119884403/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119884403/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119884403-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119884403/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119884403/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/9781119884408-203x255.jpg","width":203,"height":255},"title":"Beginning Programming All-in-One For Dummies, 2nd Edition","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"<p><b><b data-author-id=\"9043\">Wallace Wang</b></b> is a bestselling author with more than 2.3 million <i>For Dummies</i> books in print. He wrote <i>Beginning Programming For Dummies</i> and moonlights as a stand-up comic.</p>","authors":[{"authorId":9043,"name":"Wallace Wang","slug":"wallace-wang","description":" <b>Wallace Wang</b> is a bestselling author with more than 2.3 million <i>For Dummies</i> books in print. He wrote <i>Beginning Programming For Dummies</i> and moonlights as a stand-up comic.","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9043"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119884408&quot;]}]\" id=\"du-slot-62b36f848294d\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119884408&quot;]}]\" id=\"du-slot-62b36f848309e\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":187570,"title":"Computer Programming Branching Statements","slug":"computer-programming-branching-statements","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/187570"}},{"articleId":187577,"title":"Computer Programming Looping Statements","slug":"computer-programming-looping-statements","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/187577"}},{"articleId":187572,"title":"Programming Compilers and Interpreters","slug":"programming-compilers-and-interpreters","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/187572"}}],"content":[{"title":"Storing stuff in data structures","thumb":null,"image":null,"content":"<p>Every programming language needs to store data. The simplest way to store data is to use a variable, but a variable can only hold one item at a time. Another limitation is that you must create enough variables to store all the data your program may need to store. Because you likely won’t know how much data your program needs to store, you need to store related data inside a data structure.</p>\n<p>Think of a data structure as a super variable that can group related data together and grow or shrink in size depending on how much data your program needs to store. Structures group multiple variables together. Arrays or lists can grow or shrink to store different amounts of data. Dictionaries, maps, or hashes identify data using a “key” value to make it easy to retrieve data quickly. Stacks and queues provide two different ways to store and retrieve data.</p>\n<h3>Structures</h3>\n<p>A single variable can only hold exactly one chunk of data at a time. However, a structure can store multiple variables inside a single variable, like this:</p>\n<p>struct person</p>\n<p>{</p>\n<p>string name;</p>\n<p>int, age;</p>\n<p>};</p>\n<p>person.name = &#8220;Billy the Kid&#8221;;</p>\n<p>person.age = 26;</p>\n<p>This code defines a structure and gives it an arbitrary name of person. Inside the structure, it defines a name variable that can hold a string and an age variable that can hold an integer.</p>\n<p>To store a string in the name variable, you need to define the structure name (person) and the string variable name to hold it (name). Thus, person.name specifies the structure (person) and the string variable (name) to hold &#8220;Billy the Kid&#8221;.</p>\n<p>To store an integer in the age variable, you need to define the structure name (person) and the integer variable name to hold it (age). Thus, person.age specifies the structure (person) and the integer variable (age) to hold 26.</p>\n<h3>Arrays or lists</h3>\n<p>Arrays store one type of data in a list, which is why some languages refer to arrays as <em>lists.</em> Arrays/lists store multiple chunks of data within a single variable name. To identify a specific chunk of data, you must reference the array/list name followed by the position of the data inside that array/list.</p>\n<p>The position of items, stored in an array/list, is identified by an index number. In zero-based arrays, the first stored item in the array is assigned an index number of 0. In one-based arrays, the first stored item in the array is assigned an index number of 1.</p>\n<p>var arrayname = [-4, 90, 128, -57, 32, 306, -48]</p>\n<p>arrayname[4] = 32</p>\n<p>This code defines an array/list that holds multiple integers such as –4 and 90. To retrieve the number 32, you must reference the array/list name (arrayname) followed by the position or index number of the data you want to retrieve. If the index number of the first item is 0, then arrayname[0] would retrieve –4, arrayname[1] would retrieve 90, arrayname[2] would retrieve 128, arrayname[3] would retrieve –57, and arrayname[4] would retrieve 32.</p>\n<h3>Dictionaries, maps, or hashes</h3>\n<p>Also called <em>hashes,</em> dictionaries or maps store a key-value pair where a unique key is associated with specific data. To store data, you must store a key followed by the data you want linked to that key, like this:</p>\n<p>mydictionary = {&#8216;pi&#8217;: 3.14, &#8216;taxrate&#8217;: 0.75}</p>\n<p>This code stores the key &#8216;pi&#8217; that’s linked to the value 3.14. Then it stores the key &#8216;taxrate&#8217; that’s linked to the value 0.75. Notice that in a dictionary/map/hash, the keys must all be the same data type and the stored values must also be the same data type. In this example, the keys are all strings (&#8216;pi&#8217; and &#8216;taxrate&#8217;), while the values are all decimal numbers (3.14 and 0.75).</p>\n<p>To retrieve data, specify the dictionary/map/hash name followed by the key associated with the data to retrieve, like this:</p>\n<p>mydictionary[&#8216;pi&#8217;] = 3.14</p>\n<p>This code says to retrieve the value linked to the &#8216;pi&#8217; key stored in the dictionary/map/hash called mydictionary. In this example, the value linked to the &#8216;pi&#8217; key is 3.14.</p>\n<h3>Stacks</h3>\n<p>Stacks are known as “last in, first out” (LIFO) data structures because the last item stored is the first one that can be removed. Stacks can shrink and grow and store any data types. In the real world, stack data types behave like a stack of dishes. The first item you store in a stack gets placed at the bottom. Each additional item stored in a stack buries the first item further and further. To retrieve the bottom item (the first item stored) in a stack, you must retrieve all items stored above it.</p>\n<p>You can perform two types of operations on stacks:</p>\n<ul>\n<li><strong>Push</strong>: The Push command adds new data to a stack. When you push data onto a stack, you must also specify the data to push to the top of a stack.</li>\n<li><strong>Pop:</strong> The Pop command removes data from the top of the stack. Because the Pop command always removes the top item, you only need to specify that you want to pop the top item off the stack.</li>\n</ul>\n<p>By using a combination of Push and Pop commands, you can store and retrieve data from a stack.</p>\n<h3>Queues</h3>\n<p>Queues are known as “first in, first out” (FIFO) data structures because the first item stored is the first one that can be removed. Queues can shrink and grow and store any data types.</p>\n<p>You can perform two types of operations on queues:</p>\n<ul>\n<li><strong>Enqueue</strong>: The Enqueue command adds new data to the end of a queue. When you add data to a queue, you must also specify the data to add to the end of the queue.</li>\n<li><strong>Dequeue</strong>: The Dequeue command removes data from the beginning of a queue. Because the Dequeue always removes the first item, you only need to specify that you want to remove (dequeue) the first item from the queue.</li>\n</ul>\n<p>By using a combination of Enqueue and Dequeue commands, you can add and remove data from a queue.</p>\n"},{"title":"Making decisions with branching statements","thumb":null,"image":null,"content":"<p>Branching statements, often called if statements, let a program choose between different sets of instructions based on a true or false condition. By using branching statements, programs can make decisions based on ever-changing data.</p>\n<p>The simplest branching statement is called an if statement (or an if-then statement). If a Boolean condition is true, then the if (or if-then) statement runs a set of commands; if the Boolean condition is false, then the if (or if-then) statement doesn’t run anything.</p>\n<p>If (condition) Then command</p>\n<p>If (condition) Then</p>\n<p>Commands</p>\n<p>End If</p>\n<p>if (condition) {</p>\n<p>Commands</p>\n<p>}</p>\n<p>Another variation of the branching statement, called if-else, offers exactly two choices. If a Boolean condition is true, the if-else statement follows one set of commands. If a Boolean condition is false, the if-else statement follows a second set of commands.</p>\n<p>If (condition) Then</p>\n<p>Commands</p>\n<p>Else</p>\n<p>Commands</p>\n<p>End If</p>\n<p>if (condition) {</p>\n<p>Commands</p>\n<p>} else {</p>\n<p>More commands</p>\n<p>}</p>\n<p>Rather than check a single Boolean condition, the if-elseif statement can check multiple Boolean conditions.</p>\n<p>If (condition) Then</p>\n<p>Commands</p>\n<p>Else If (condition2) then</p>\n<p>Commands</p>\n<p>End if</p>\n<p>if (condition1) {</p>\n<p>Commands</p>\n<p>} else if (condition2) {</p>\n<p>More commands</p>\n<p>} else if (condition3) {</p>\n<p>Even more commands</p>\n<p>}</p>\n<p>The if-elseif statement can check multiple Boolean conditions, but the more Boolean conditions there are to check, the harder the entire if-elseif statement can be to read. That’s why programming languages offer an alternative to the if-elseif statement, called a Select or switch statement.</p>\n<p>Like the if-elseif statement, the Select or switch statement can also check multiple Boolean conditions, but in a shorter, simpler way that’s easier to read and understand.</p>\n<p>Select Case variable</p>\n<p>Case value1</p>\n<p>Commands</p>\n<p>Case value2</p>\n<p>Commands</p>\n<p>Else</p>\n<p>Commands</p>\n<p>End Select</p>\n<p>switch (variable) {</p>\n<p>case value1:</p>\n<p>Commands;</p>\n<p>break;</p>\n<p>case value2:</p>\n<p>Commands;</p>\n<p>break;</p>\n<p>default:</p>\n<p>commands;</p>\n<p>break;</p>\n<p>}</p>\n"},{"title":"Repeating commands in looping statements","thumb":null,"image":null,"content":"<p>Looping statements let a program repeat one or more instructions. A for loop repeats a fixed number of times where you must define exactly how many times the loop should run.</p>\n<p>For variable = startvalue to endvalue</p>\n<p>Commands</p>\n<p>Next</p>\n<p>for (initial variable value, final value, increment) {</p>\n<p>commands;</p>\n<p>}</p>\n<p>Often, you don’t know exactly how many times a loop should run. In those cases, you must use a while loop, which checks a Boolean condition. If this Boolean condition is true, then the while loop runs. As soon as this Boolean condition becomes false, the while loop stops running.</p>\n<p>while (condition) {</p>\n<p>commands;</p>\n<p>}</p>\n<p>If a Boolean condition is false from the beginning, a while loop will never run at all. On the other hand, a do-while loop always runs at least once and then checks a Boolean condition. In some programming languages, the do-while loop may be called a repeat-until loop.</p>\n<p>do {</p>\n<p>commands;</p>\n<p>} while (condition);</p>\n<p>repeat {</p>\n<p>commands;</p>\n<p>} until (condition);</p>\n<p>Because both a while and do-while loop won’t stop until a condition becomes false, you must change this Boolean condition within the loop so the loop will eventually stop.</p>\n"},{"title":"Truth tables","thumb":null,"image":null,"content":"<p>Truth tables show specific Boolean values for different Boolean operators: AND, OR, XOR, and NOT. The AND operator (shortened to &amp;&amp; in many programming languages) is true only if both Boolean values are true.</p>\n<p>The OR operator (shortened to || in many programming languages) is false only if both Boolean values are false. The XOR operator is false only if both Boolean values are either both true or both false. The NOT operator (shortened to ! in many programming languages) simply reverses a true value to false or a false value to true.</p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"33%\"><strong>Value1</strong></td>\n<td width=\"33%\"><strong>Value2</strong></td>\n<td width=\"33%\"><strong>AND (&amp;&amp;)</strong></td>\n</tr>\n<tr>\n<td width=\"33%\">True</td>\n<td width=\"33%\">True</td>\n<td width=\"33%\">True</td>\n</tr>\n<tr>\n<td width=\"33%\">True</td>\n<td width=\"33%\">False</td>\n<td width=\"33%\">False</td>\n</tr>\n<tr>\n<td width=\"33%\">False</td>\n<td width=\"33%\">True</td>\n<td width=\"33%\">False</td>\n</tr>\n<tr>\n<td width=\"33%\">False</td>\n<td width=\"33%\">False</td>\n<td width=\"33%\">False</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"33%\"><strong>Value1</strong></td>\n<td width=\"33%\"><strong>Value2</strong></td>\n<td width=\"33%\"><strong>OR (||)</strong></td>\n</tr>\n<tr>\n<td width=\"33%\">True</td>\n<td width=\"33%\">True</td>\n<td width=\"33%\">True</td>\n</tr>\n<tr>\n<td width=\"33%\">True</td>\n<td width=\"33%\">False</td>\n<td width=\"33%\">True</td>\n</tr>\n<tr>\n<td width=\"33%\">False</td>\n<td width=\"33%\">True</td>\n<td width=\"33%\">True</td>\n</tr>\n<tr>\n<td width=\"33%\">False</td>\n<td width=\"33%\">False</td>\n<td width=\"33%\">False</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"33%\"><strong>Value1</strong></td>\n<td width=\"33%\"><strong>Value2</strong></td>\n<td width=\"33%\"><strong>XOR</strong></td>\n</tr>\n<tr>\n<td width=\"33%\">True</td>\n<td width=\"33%\">True</td>\n<td width=\"33%\">False</td>\n</tr>\n<tr>\n<td width=\"33%\">True</td>\n<td width=\"33%\">False</td>\n<td width=\"33%\">True</td>\n</tr>\n<tr>\n<td width=\"33%\">False</td>\n<td width=\"33%\">True</td>\n<td width=\"33%\">True</td>\n</tr>\n<tr>\n<td width=\"33%\">False</td>\n<td width=\"33%\">False</td>\n<td width=\"33%\">False</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n<table width=\"66%\">\n<tbody>\n<tr>\n<td width=\"50%\"><strong>Value1</strong></td>\n<td width=\"50%\"><strong>Not (!)</strong></td>\n</tr>\n<tr>\n<td width=\"50%\">True</td>\n<td width=\"50%\">False</td>\n</tr>\n<tr>\n<td width=\"50%\">False</td>\n<td width=\"50%\">True</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"Programming compilers and interpreters","thumb":null,"image":null,"content":"<p>Programming compilers and interpreters let you write code in different programming languages and then run your program on a computer. Most compilers and interpreters work on multiple operating systems, but some may work only on one or two operating systems.</p>\n<p>To learn programming, you need to practice writing code in a specific programming language to see what you’re doing right and wrong. As long as you use a popular operating system such as Linux, macOS, or Windows, you should have little trouble finding a compiler or interpreter for your favorite programming language.</p>\n<p>Here are some compilers and interpreters to consider:</p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"29%\"><strong>Compiler/Interpreter</strong></td>\n<td width=\"14%\"><strong>Chrome OS</strong></td>\n<td width=\"13%\"><strong>iPadOS</strong></td>\n<td width=\"11%\"><strong>Linux</strong></td>\n<td width=\"13%\"><strong>macOS</strong></td>\n<td width=\"16%\"><strong>Windows</strong></td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://developer.android.com/\" target=\"_blank\" rel=\"noopener\">Android Studio</a></td>\n<td width=\"14%\">X</td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://dart.dev/\" target=\"_blank\" rel=\"noopener\">Dart</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://flutter.dev/\" target=\"_blank\" rel=\"noopener\">Flutter</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://gcc.gnu.org/\" target=\"_blank\" rel=\"noopener\">GNU Compiler Collection (GCC)</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://go.dev/\" target=\"_blank\" rel=\"noopener\">Go</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.java.com/\" target=\"_blank\" rel=\"noopener\">Java</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://kotlinlang.org/\" target=\"_blank\" rel=\"noopener\">Kotlin</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.mathworks.com/\" target=\"_blank\" rel=\"noopener\">MATLAB</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.perl.org/\" target=\"_blank\" rel=\"noopener\">Perl</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.php.net/\" target=\"_blank\" rel=\"noopener\">PHP</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.r-project.org/\" target=\"_blank\" rel=\"noopener\">R</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://reactnative.dev/\" target=\"_blank\" rel=\"noopener\">React Native</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.ruby-lang.org/\" target=\"_blank\" rel=\"noopener\">Ruby</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.rust-lang.org/\" target=\"_blank\" rel=\"noopener\">Rust</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://scala-lang.org/\" target=\"_blank\" rel=\"noopener\">Scala</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://www.apple.com/swift/playgrounds/\" target=\"_blank\" rel=\"noopener\">Swift Playgrounds</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\">X</td>\n<td width=\"11%\"></td>\n<td width=\"13%\">X</td>\n<td width=\"16%\"></td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://visualstudio.microsoft.com/\" target=\"_blank\" rel=\"noopener\">Visual Studio</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\">X</td>\n<td width=\"13%\">X</td>\n<td width=\"16%\">X</td>\n</tr>\n<tr>\n<td width=\"29%\"><a href=\"https://developer.apple.com/xcode/\" target=\"_blank\" rel=\"noopener\">Xcode</a></td>\n<td width=\"14%\"></td>\n<td width=\"13%\"></td>\n<td width=\"11%\"></td>\n<td width=\"13%\">X</td>\n<td width=\"16%\"></td>\n</tr>\n</tbody>\n</table>\n"},{"title":"Free programming editors","thumb":null,"image":null,"content":"<p>Although most programming compilers and interpreters come with an editor, many programmers prefer using a different editor that provides unique features or shortcuts that make writing code faster and easier.</p>\n<p>Here are some free programming editors worth checking out (they all work on Linux, macOS, and Windows):</p>\n<p>*  <a href=\"https://netbeans.apache.org/\" target=\"_blank\" rel=\"noopener\">Apache NetBeans</a></p>\n<p>*  <a href=\"https://atom.io/\" target=\"_blank\" rel=\"noopener\">Atom</a></p>\n<p>*  <a href=\"https://www.eclipse.org/eclipseide\" target=\"_blank\" rel=\"noopener\">Eclipse IDE</a></p>\n<p>*  <a href=\"https://www.gnu.org/software/emacs\" target=\"_blank\" rel=\"noopener\">GNU Emacs</a></p>\n<p>*  <a href=\"https://www.jetbrains.com/idea\">IntelliJ IDEA</a></p>\n<p>*  <a href=\"https://www.vim.org/\">Vim</a></p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"One year","lifeExpectancySetFrom":"2022-05-03T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":208608},{"headers":{"creationTime":"2018-03-02T18:53:33+00:00","modifiedTime":"2022-05-02T14:14:35+00:00","timestamp":"2022-06-22T19:37:40+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"R","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33607"},"slug":"r","categoryId":33607}],"title":"R Projects For Dummies Cheat Sheet","strippedTitle":"r projects for dummies cheat sheet","slug":"r-projects-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Keep this Cheat Sheet nearby when working in R for quick reference to functions for users, machine learning, databases, maps, and more.","noIndex":0,"noFollow":0},"content":"To complete any project using R, you work with functions that live in packages designed for specific areas. This cheat sheet provides some information about these functions.","description":"To complete any project using R, you work with functions that live in packages designed for specific areas. This cheat sheet provides some information about these functions.","blurb":"","authors":[{"authorId":9759,"name":"Joseph Schmuller","slug":"joseph-schmuller","description":" <p><b>Joseph Schmuller</b> works on the Digital & Enterprise Architecture Team at Availity. He has taught statistics at the undergraduate and graduate levels. He has created and delivered courses for LinkedIn Learning, and he is the author of all previous editions of <i>Statistical Analysis with Excel For Dummies.</i></p> ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9759"}}],"primaryCategoryTaxonomy":{"categoryId":33607,"title":"R","slug":"r","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33607"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":251666,"title":"R Project: Combining an Image with an Animated Image","slug":"r-project-combining-image-animated-image","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251666"}},{"articleId":251663,"title":"11 Useful Resources for R Programmers","slug":"11-useful-resources-r-programmers","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251663"}},{"articleId":251660,"title":"R Project: Delay and Weather","slug":"r-project-delay-weather","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251660"}},{"articleId":251657,"title":"R Project for RFM Analysis: Another Data Set","slug":"r-project-rfm-analysis-another-data-set","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251657"}},{"articleId":251653,"title":"R Project for Neural Networks: Rattling Around","slug":"r-project-neural-networks-rattling-around","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251653"}}],"fromCategory":[{"articleId":262959,"title":"Statistical Analysis with R For Dummies Cheat Sheet","slug":"statistical-analysis-with-r-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/262959"}},{"articleId":251666,"title":"R Project: Combining an Image with an Animated Image","slug":"r-project-combining-image-animated-image","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251666"}},{"articleId":251663,"title":"11 Useful Resources for R Programmers","slug":"11-useful-resources-r-programmers","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251663"}},{"articleId":251660,"title":"R Project: Delay and Weather","slug":"r-project-delay-weather","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251660"}},{"articleId":251657,"title":"R Project for RFM Analysis: Another Data Set","slug":"r-project-rfm-analysis-another-data-set","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251657"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281847,"slug":"r-projects-for-dummies","isbn":"9781119446187","categoryList":["technology","programming-web-design","r"],"amazon":{"default":"https://www.amazon.com/gp/product/111944618X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/111944618X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/111944618X-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/111944618X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/111944618X/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/r-projects-for-dummies-cover-9781119446187-203x255.jpg","width":203,"height":255},"title":"R Projects For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"9759\">Joseph Schmuller, PhD,</b> is a veteran of more than 25 years in Information Technology. He is the author of several books, including <i>Statistical Analysis with R For Dummies</i> and four editions of <i>Statistical Analysis with Excel For Dummies.</i> In addition, he has written numerous articles and created online coursework for Lynda.com. </p>","authors":[{"authorId":9759,"name":"Joseph Schmuller","slug":"joseph-schmuller","description":" <p><b>Joseph Schmuller</b> works on the Digital & Enterprise Architecture Team at Availity. He has taught statistics at the undergraduate and graduate levels. He has created and delivered courses for LinkedIn Learning, and he is the author of all previous editions of <i>Statistical Analysis with Excel For Dummies.</i></p> ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9759"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;r&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119446187&quot;]}]\" id=\"du-slot-62b36f84320bc\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;r&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119446187&quot;]}]\" id=\"du-slot-62b36f8432804\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":250440,"title":"Interacting with Users with R Functions","slug":"interacting-users-r-functions","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250440"}},{"articleId":250443,"title":"Tackling Machine Learning with R","slug":"tackling-machine-learning-r","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250443"}},{"articleId":250446,"title":"Working with Large(ish) Databases in R","slug":"working-largeish-databases-r","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250446"}},{"articleId":250449,"title":"Manipulating Maps and Images with R","slug":"manipulating-maps-images-r","categoryList":["technology","programming-web-design","r"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250449"}}],"content":[{"title":"Interacting with users with R functions","thumb":null,"image":null,"content":"<p>Here&#8217;s a selection of statistical functions that come with the standard R installation. You&#8217;ll find many others in R packages. R provides the <code>shiny </code>package and the <code>shinydashboard </code>package for developing interactive applications. Here are selected functions from these packages:</p>\n<table width=\"648\">\n<caption><strong>Central Tendency and Variability</strong></caption>\n<tbody>\n<tr>\n<td width=\"144\"><strong>Function</strong></td>\n<td width=\"388\"><strong>What it Calculates</strong></td>\n</tr>\n<tr>\n<td width=\"144\"><code>mean(x)</code></td>\n<td width=\"388\">Mean of the numbers in vector x.</td>\n</tr>\n<tr>\n<td width=\"144\"><code>median(x)</code></td>\n<td width=\"388\">Median of the numbers in vector x</td>\n</tr>\n<tr>\n<td width=\"144\"><code>var(x)</code></td>\n<td width=\"388\">Estimated variance of the population from which the numbers in vector x are sampled</td>\n</tr>\n<tr>\n<td width=\"144\"><code>sd(x)</code></td>\n<td width=\"388\">Estimated standard deviation of the population from which the numbers in vector x are sampled</td>\n</tr>\n<tr>\n<td width=\"144\"><code>scale(x)</code></td>\n<td width=\"388\">Standard scores (z-scores) for the numbers in vector x</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n<p><strong>Relative Standing</strong></p>\n<table>\n<tbody>\n<tr>\n<td width=\"266\"><strong>Function</strong></td>\n<td width=\"266\"><strong>What it Calculates</strong></td>\n</tr>\n<tr>\n<td width=\"266\"><code>sort(x)</code></td>\n<td width=\"266\">The numbers in vector x in increasing order</td>\n</tr>\n<tr>\n<td width=\"266\"><code>sort(x)[n]</code></td>\n<td width=\"266\">The nth smallest number in vector x</td>\n</tr>\n<tr>\n<td width=\"266\"><code>rank(x)</code></td>\n<td width=\"266\">Ranks of the numbers (in increasing order) in vector x</td>\n</tr>\n<tr>\n<td width=\"266\"><code>rank(-x)</code></td>\n<td width=\"266\">Ranks of the numbers (in decreasing order) in vector x</td>\n</tr>\n<tr>\n<td width=\"266\"><code>rank(x, ties.method= \"average\")</code></td>\n<td width=\"266\">Ranks of the numbers (in increasing order) in vector x, with tied numbers given the average of the ranks that the ties would have attained</td>\n</tr>\n<tr>\n<td width=\"266\"><code>rank(x, ties.method=  \"min\")</code></td>\n<td width=\"266\">Ranks of the numbers (in increasing order) in vector x, with tied numbers given the minimum of the ranks that the ties would have attained</td>\n</tr>\n<tr>\n<td width=\"266\"><code>rank(x, ties.method = \"max\")</code></td>\n<td width=\"266\">Ranks of the numbers (in increasing order) in vector x, with tied numbers given the maximum of the ranks that the ties would have attained</td>\n</tr>\n<tr>\n<td width=\"266\"><code>quantile(x)</code></td>\n<td width=\"266\">The 0th, 25th, 50th, 75th, and 100th percentiles (i.e, the <em>quartiles</em>) of the numbers in vector x. (That’s not a misprint: quantile(x) returns the quartiles of x.)</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n<p><strong>T-tests</strong></p>\n<table>\n<tbody>\n<tr>\n<td width=\"184\"><strong>Function</strong></td>\n<td width=\"348\"><strong>What it Calculates</strong></td>\n</tr>\n<tr>\n<td width=\"184\"><code>t.test(x,mu=n, alternative = \"two.sided\")</code></td>\n<td width=\"348\">Two-tailed t-test that the mean of the numbers in vector x is different from n.</td>\n</tr>\n<tr>\n<td width=\"184\"><code>t.test(x,mu=n, alternative = \"greater\")</code></td>\n<td width=\"348\">One-tailed t-test that the mean of the numbers in vector x is greater than n.</td>\n</tr>\n<tr>\n<td width=\"184\"><code>t.test(x,mu=n, alternative = \"less\")</code></td>\n<td width=\"348\">One-tailed t-test that the mean of the numbers in vector x is less than n.</td>\n</tr>\n<tr>\n<td width=\"184\"><code>t.test(x,y,mu=0, var.equal  = TRUE, alternative = \"two.sided\")</code></td>\n<td width=\"348\">Two-tailed t-test that the mean of the numbers in vector x is different from the mean of the numbers in vector y. The variances in the two vectors are assumed to be equal.</td>\n</tr>\n<tr>\n<td width=\"184\"><code>t.test(x,y,mu=0, alternative = \"two.sided\", paired  = TRUE)</code></td>\n<td width=\"348\">Two-tailed t-test that the mean of the numbers in vector x is different from the mean of the numbers in vector y. The vectors represent matched samples.</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n<p><strong>Analysis of Variance (ANOVA)</strong></p>\n<table>\n<tbody>\n<tr>\n<td width=\"136\"><strong>Function</strong></td>\n<td width=\"396\"><strong>What it Calculates</strong></td>\n</tr>\n<tr>\n<td width=\"136\"><code>aov(y~x, data = d)</code></td>\n<td width=\"396\">Single-factor ANOVA, with the numbers in vector y as the dependent variable and the elements of vector x as the levels of the independent variable. The data are in data frame d.</td>\n</tr>\n<tr>\n<td width=\"136\"><code>aov(y~x + Error(w/x), data = d)</code></td>\n<td width=\"396\">Repeated Measures ANOVA, with the numbers in vector y as the dependent variable and the elements in vector x as the levels of an independent variable. Error(w/x) indicates that each element in vector w experiences all the levels of x (i.e., x is a repeated measure). The data are in data frame d.</td>\n</tr>\n<tr>\n<td width=\"136\"><code>aov(y~x*z, data = d)</code></td>\n<td width=\"396\">Two-factor ANOVA, with the numbers in vector y as the dependent variable and the elements of vectors x and z as the levels of the two independent variables. The data are in data frame d.</td>\n</tr>\n<tr>\n<td width=\"136\"><code>aov(y~x*z + Error(w/z), data = d)</code></td>\n<td width=\"396\">Mixed ANOVA, with the numbers in vector z as the dependent variable and the elements of vectors x and y as the levels of the two independent variables. Error(w/z) indicates that each element in vector w experiences all the levels of z (i.e., z is a repeated measure). The data are in data frame d.</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n<p><strong>Correlation and Regression</strong></p>\n<table>\n<tbody>\n<tr>\n<td width=\"174\"><strong>Function</strong></td>\n<td width=\"357\"><strong>What it Calculates</strong></td>\n</tr>\n<tr>\n<td width=\"174\"><code>cor(x,y)</code></td>\n<td width=\"357\">Correlation coefficient between the numbers in vector x and the numbers in vector y</td>\n</tr>\n<tr>\n<td width=\"174\"><code>cor.test(x,y)</code></td>\n<td width=\"357\">Correlation coefficient between the numbers in vector x and the numbers in vector y, along with a t-test of the significance of the correlation coefficient.</td>\n</tr>\n<tr>\n<td width=\"174\"><code>lm(y~x, data = d)</code></td>\n<td width=\"357\">Linear regression analysis with the numbers in vector y as the dependent variable and the numbers in vector x as the independent variable. Data are in data frame d.</td>\n</tr>\n<tr>\n<td width=\"174\"><code>coefficients(a)</code></td>\n<td width=\"357\">Slope and intercept of linear regression model a.</td>\n</tr>\n<tr>\n<td width=\"174\"><code>confint(a)</code></td>\n<td width=\"357\">Confidence intervals of the slope and intercept of linear regression model a</td>\n</tr>\n<tr>\n<td width=\"174\"><code>lm(y~x+z, data = d)</code></td>\n<td width=\"357\">Multiple regression analysis with the numbers in vector y as the dependent variable and the numbers in vectors x and z as the independent variables. Data are in data frame d.</td>\n</tr>\n</tbody>\n</table>\n<p class=\"article-tips tip\">When you carry out an ANOVA or a regression analysis, store the analysis in a list.</p>\n<p>For example, <code>a &lt;- lm(y~x, data = d)</code>.</p>\n<p>Then, to see the tabled results, use the <code>summary()</code> function:</p>\n<p><code>summary(a)</code></p>\n"},{"title":"Tackling machine learning with R","thumb":null,"image":null,"content":"<p>Machine Learning (ML) is a popular area. R provides a number of ML-related packages and functions. Here are some of them:</p>\n<p><strong>Machine Learning Packages and Functions</strong></p>\n<table>\n<tbody>\n<tr>\n<td width=\"109\"><strong>Package</strong></td>\n<td width=\"142\"><strong>Function</strong></td>\n<td width=\"281\"><strong>What it does</strong></td>\n</tr>\n<tr>\n<td width=\"109\"><code>rattle</code></td>\n<td width=\"142\"><code>rattle()</code></td>\n<td width=\"281\">Opens the Rattle Graphic User Interface</td>\n</tr>\n<tr>\n<td width=\"109\"><code>rpart</code></td>\n<td width=\"142\"><code>rpart()</code></td>\n<td width=\"281\">Creates a decision tree</td>\n</tr>\n<tr>\n<td width=\"109\"><code>rpart.plot</code></td>\n<td width=\"142\"><code>prp()</code></td>\n<td width=\"281\">Draws a decision tree</td>\n</tr>\n<tr>\n<td width=\"109\"><code>randomForest</code></td>\n<td width=\"142\"><code>randomForest()</code></td>\n<td width=\"281\">Creates a random forest of decision trees</td>\n</tr>\n<tr>\n<td width=\"109\"><code>rattle</code></td>\n<td width=\"142\"><code>printRandomForests()</code></td>\n<td width=\"281\">Prints the rules of a forest’s individual decision trees</td>\n</tr>\n<tr>\n<td width=\"109\"><code>e1071</code></td>\n<td width=\"142\"><code>svm()</code></td>\n<td width=\"281\">Trains a support vector machine</td>\n</tr>\n<tr>\n<td width=\"109\"><code>e1071</code></td>\n<td width=\"142\"><code>predict()</code></td>\n<td width=\"281\">Creates a vector of predicted classifications based on a support vector machine</td>\n</tr>\n<tr>\n<td width=\"109\"><code>kernlab</code></td>\n<td width=\"142\"><code>ksvm()</code></td>\n<td width=\"281\">Trains a support vector machine</td>\n</tr>\n<tr>\n<td width=\"109\"><code>base R</code></td>\n<td width=\"142\"><code>kmeans()</code></td>\n<td width=\"281\">Creates a k-means clustering analysis</td>\n</tr>\n<tr>\n<td width=\"109\"><code>nnet</code></td>\n<td width=\"142\"><code>nnet()</code></td>\n<td width=\"281\">Creates a neural network with one hidden layer</td>\n</tr>\n<tr>\n<td width=\"109\"><code>NeuralNetTools</code></td>\n<td width=\"142\"><code>plotnet()</code></td>\n<td width=\"281\">Draws a neural network</td>\n</tr>\n<tr>\n<td width=\"109\"><code>nnet</code></td>\n<td width=\"142\"><code>predict()</code></td>\n<td width=\"281\">Creates a vector of predictions based on a neural network</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n"},{"title":"Working with large(ish) databases in R","thumb":null,"image":null,"content":"<p>Created for statistical analysis, R has a wide array of packages and functions for dealing with large amounts of data. This selection is the tip of the iceberg’s tip:</p>\n<p><strong>Packages and Functions for Exploring Databases</strong></p>\n<table>\n<tbody>\n<tr>\n<td width=\"93\"><strong>Package</strong></td>\n<td width=\"140\"><strong>Function</strong></td>\n<td width=\"299\"><strong>What it does</strong></td>\n</tr>\n<tr>\n<td width=\"93\"><code>didrooRFM</code></td>\n<td width=\"140\"><code>findRFM()</code></td>\n<td width=\"299\">Performs a Recency, Frequency, Money analysis on a database of retail transactions</td>\n</tr>\n<tr>\n<td width=\"93\"><code>vcd</code></td>\n<td width=\"140\"><code>assocstats()</code></td>\n<td width=\"299\">Calculates statistics for tables of categorical data</td>\n</tr>\n<tr>\n<td width=\"93\"><code>vcd</code></td>\n<td width=\"140\"><code>assoc()</code></td>\n<td width=\"299\">Creates a graphic that shows deviations from independence in a table of categorical data</td>\n</tr>\n<tr>\n<td width=\"93\"><code>tidyverse</code></td>\n<td width=\"140\"><code>glimpse()</code></td>\n<td width=\"299\">Provides a partial view of a data frame with the columns appearing onscreen as rows</td>\n</tr>\n<tr>\n<td width=\"93\"><code>plotrix</code></td>\n<td width=\"140\"><code>std.error()</code></td>\n<td width=\"299\">Calculates the standard error of the mean</td>\n</tr>\n<tr>\n<td width=\"93\"><code>plyr</code></td>\n<td width=\"140\"><code>inner_join()</code></td>\n<td width=\"299\">Joins data frames</td>\n</tr>\n<tr>\n<td width=\"93\"><code>lubridate</code></td>\n<td width=\"140\"><code>wday()</code></td>\n<td width=\"299\">Returns day of the week of a calendar date</td>\n</tr>\n<tr>\n<td width=\"93\"><code>lubridate</code></td>\n<td width=\"140\"><code>ymd()</code></td>\n<td width=\"299\">Returns a date in R date-format</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"Manipulating maps and images with R","thumb":null,"image":null,"content":"<p>Here are some packages and functions to help you get started using R to draw maps and to process images.</p>\n<p><strong>Packages and Functions for Plotting Maps and for Processing Images</strong></p>\n<table>\n<tbody>\n<tr>\n<td width=\"177\"><strong>Package</strong></td>\n<td width=\"177\"><strong>Function</strong></td>\n<td width=\"177\"><strong>What it does</strong></td>\n</tr>\n<tr>\n<td width=\"177\"><code>maps</code></td>\n<td width=\"177\"><code>map_data()</code></td>\n<td width=\"177\">Returns a data frame of latitudes and longitudes</td>\n</tr>\n<tr>\n<td width=\"177\"><code>ggmaps</code></td>\n<td width=\"177\"><code>geocode()</code></td>\n<td width=\"177\">Returns latitude and longitude of a place-name</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_read()</code></td>\n<td width=\"177\">Reads an image into R and turns it into a magick object</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_resize()</code></td>\n<td width=\"177\">Resizes an image</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_rotate()</code></td>\n<td width=\"177\">Rotates an image</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_flip()</code></td>\n<td width=\"177\">Rotates an image on a horizontal axis</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_flop()</code></td>\n<td width=\"177\">Rotates an image on a vertical axis</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_annotate()</code></td>\n<td width=\"177\">Adds text to an image</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_background()</code></td>\n<td width=\"177\">Sets the background for an image</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_composite()</code></td>\n<td width=\"177\">Combines images</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_morph()</code></td>\n<td width=\"177\">Makes one image appear to gradually become (morph into) another</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_animate()</code></td>\n<td width=\"177\">Puts an animation into the RStudio Viewer window</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_apply()</code></td>\n<td width=\"177\">Applies a function to every frame in an animated GIF</td>\n</tr>\n<tr>\n<td width=\"177\"><code>magick</code></td>\n<td width=\"177\"><code>image_write()</code></td>\n<td width=\"177\">Saves an animation as a reusable GIF</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2022-05-02T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":250453},{"headers":{"creationTime":"2018-06-02T04:51:46+00:00","modifiedTime":"2022-04-27T19:00:34+00:00","timestamp":"2022-06-22T19:37:39+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"Coding","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33599"},"slug":"coding","categoryId":33599}],"title":"Helping Kids with Coding For Dummies Cheat Sheet","strippedTitle":"helping kids with coding for dummies cheat sheet","slug":"helping-kids-coding-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"This Cheat Sheet offers many ways you can support children's learning of coding, and describes many possible career paths for coders.","noIndex":0,"noFollow":0},"content":"Coding is fast becoming a skill that every child needs to be educated for in the 21st Century. But coding is taught at only a small fraction of schools, and often only at the high school level. Helping kids learn how to code also means you’re assisting them in developing a skill that is highly marketable and sets them apart from peers at school and later, in their careers.\r\n\r\nThe topics in this cheat sheet can assist you on getting started when your kid expresses an interest in learning how to code.","description":"Coding is fast becoming a skill that every child needs to be educated for in the 21st Century. But coding is taught at only a small fraction of schools, and often only at the high school level. Helping kids learn how to code also means you’re assisting them in developing a skill that is highly marketable and sets them apart from peers at school and later, in their careers.\r\n\r\nThe topics in this cheat sheet can assist you on getting started when your kid expresses an interest in learning how to code.","blurb":"","authors":[{"authorId":9324,"name":"Camille McCue","slug":"camille-mccue","description":" <p><b>Camille McCue, PhD,</b> is Director of Curriculum Innovations at the Adelson Educational Campus in Las Vegas where she leads the Startup Incubator, teaches STEM, and kickstarts K&#45;12 learning initiatives. <b>Sarah Guthals, PhD,</b> co&#45;founded an ed&#45;tech company and now continues to build technology for kids to learn, create, and share safely online. She loves to teach teachers how to teach coding in the classroom. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9324"}},{"authorId":9091,"name":"Sarah Guthals","slug":"sarah-guthals","description":" <p><b>Camille McCue, PhD,</b> is Director of Curriculum Innovations at the Adelson Educational Campus in Las Vegas where she leads the Startup Incubator, teaches STEM, and kickstarts K&#45;12 learning initiatives. <b>Sarah Guthals, PhD,</b> co&#45;founded an ed&#45;tech company and now continues to build technology for kids to learn, create, and share safely online. She loves to teach teachers how to teach coding in the classroom. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9091"}}],"primaryCategoryTaxonomy":{"categoryId":33599,"title":"Coding","slug":"coding","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33599"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":253846,"title":"Helping Kids with Coding: Distributing Mobile Apps","slug":"helping-kids-coding-distributing-mobile-apps","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253846"}},{"articleId":253837,"title":"Using the MIT App Inventor to Teach Kids Coding","slug":"using-mit-app-inventor-teach-kids-coding","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253837"}},{"articleId":253831,"title":"Teaching Kids Strategies for Debugging Code","slug":"teaching-kids-strategies-debugging-code","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253831"}},{"articleId":253826,"title":"Helping Kids Find Common Coding Semantic Errors","slug":"helping-kids-find-common-coding-semantic-errors","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253826"}},{"articleId":253818,"title":"Teaching Kids to Code Subprograms with Parameters","slug":"teaching-kids-code-subprograms-parameters","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253818"}}],"fromCategory":[{"articleId":253846,"title":"Helping Kids with Coding: Distributing Mobile Apps","slug":"helping-kids-coding-distributing-mobile-apps","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253846"}},{"articleId":253837,"title":"Using the MIT App Inventor to Teach Kids Coding","slug":"using-mit-app-inventor-teach-kids-coding","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253837"}},{"articleId":253831,"title":"Teaching Kids Strategies for Debugging Code","slug":"teaching-kids-strategies-debugging-code","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253831"}},{"articleId":253826,"title":"Helping Kids Find Common Coding Semantic Errors","slug":"helping-kids-find-common-coding-semantic-errors","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253826"}},{"articleId":253818,"title":"Teaching Kids to Code Subprograms with Parameters","slug":"teaching-kids-code-subprograms-parameters","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253818"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281734,"slug":"helping-kids-with-coding-for-dummies","isbn":"9781119380672","categoryList":["technology","programming-web-design","coding"],"amazon":{"default":"https://www.amazon.com/gp/product/1119380677/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119380677/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119380677-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119380677/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119380677/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/helping-kids-with-coding-for-dummies-cover-9781119380672-203x255.jpg","width":203,"height":255},"title":"Helping Kids with Coding For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"9324\">Camille McCue, PhD,</b> is Director of Curriculum Innovations at the Adelson Educational Campus in Las Vegas where she leads the Startup Incubator, teaches STEM, and kickstarts K-12 learning initiatives. <b data-author-id=\"9091\">Sarah Guthals, PhD,</b> co-founded an ed-tech company and now continues to build technology for kids to learn, create, and share safely online. She loves to teach teachers how to teach coding in the classroom. </p>","authors":[{"authorId":9324,"name":"Camille McCue","slug":"camille-mccue","description":" <p><b>Camille McCue, PhD,</b> is Director of Curriculum Innovations at the Adelson Educational Campus in Las Vegas where she leads the Startup Incubator, teaches STEM, and kickstarts K&#45;12 learning initiatives. <b>Sarah Guthals, PhD,</b> co&#45;founded an ed&#45;tech company and now continues to build technology for kids to learn, create, and share safely online. She loves to teach teachers how to teach coding in the classroom. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9324"}},{"authorId":9091,"name":"Sarah Guthals","slug":"sarah-guthals","description":" <p><b>Camille McCue, PhD,</b> is Director of Curriculum Innovations at the Adelson Educational Campus in Las Vegas where she leads the Startup Incubator, teaches STEM, and kickstarts K&#45;12 learning initiatives. <b>Sarah Guthals, PhD,</b> co&#45;founded an ed&#45;tech company and now continues to build technology for kids to learn, create, and share safely online. She loves to teach teachers how to teach coding in the classroom. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9091"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;coding&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119380672&quot;]}]\" id=\"du-slot-62b36f83cbba5\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;coding&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119380672&quot;]}]\" id=\"du-slot-62b36f83cc2d0\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":252783,"title":"Programming Languages by Ages","slug":"programming-languages-ages","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/252783"}},{"articleId":252786,"title":"Career Paths for Coders","slug":"career-paths-coders","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/252786"}},{"articleId":252789,"title":"Example Applications for Novice Coders by Language","slug":"example-applications-novice-coders-language","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/252789"}},{"articleId":252825,"title":"10 Ways to Invest in a Kid’s Coding Future","slug":"10-ways-invest-kids-coding-future","categoryList":["technology","programming-web-design","coding"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/252825"}}],"content":[{"title":"Programming languages by ages","thumb":null,"image":null,"content":"<p>When we were growing up, there weren’t as many applications and languages targeting novices. Logo and Basic were the main choices! Luckily, in the past decade, programmers and educators from around the world have developed so many languages and environments for coders of all ages and levels of expertise! This is a short list of programming languages, applications, and environments by age.</p>\n<h3><strong>Ages 4 to 7</strong></h3>\n<p>The general goal for coding with children as young as age 4 is to help them develop logical thinking and “computational thinking.” Basically, this is understanding how to break apart problems and formulate a set of clearly defined steps to solve the problem in such a way that a computer could carry out the steps.</p>\n<ul>\n<li><a href=\"https://codespark.com/webglhost/\" target=\"_blank\" rel=\"noopener\">The Foos</a></li>\n<li><a href=\"http://www.daisythedinosaur.com/\" target=\"_blank\" rel=\"noopener\">Daisy the Dinosaur</a></li>\n<li><a href=\"https://www.scratchjr.org/\" target=\"_blank\" rel=\"noopener\">ScratchJr</a></li>\n<li><a href=\"https://www.kodable.com/\" target=\"_blank\" rel=\"noopener\">Kodable</a></li>\n<li><a href=\"http://lightbot.com/index.html\" target=\"_blank\" rel=\"noopener\">Light Bot</a></li>\n<li><a href=\"https://www.makewonder.com/dash\">Dash and Dot</a></li>\n<li><a href=\"http://www.microworlds.com/\" target=\"_blank\" rel=\"noopener\">MicroWorlds JR</a></li>\n</ul>\n<h3><strong>Ages 8 to 12</strong></h3>\n<p>Children in this age range really rev up their coding as they advance their math skills and improve their abilities in creating long and more complex sequences of code.</p>\n<p>At this point your goals in guiding them are helping them expand their understanding of how code is used (apps, electronics, and others), fostering their creativity, and building their persistence in sticking-to-it when they encounter challenges — including debugging. Help them realize that they can build almost anything they can imagine!</p>\n<ul>\n<li><a href=\"https://scratch.mit.edu/\" target=\"_blank\" rel=\"noopener\">Scratch</a></li>\n<li><a href=\"https://code.org/educate/applab\" target=\"_blank\" rel=\"noopener\">App Lab</a></li>\n<li><a href=\"https://www.gethopscotch.com/\" target=\"_blank\" rel=\"noopener\">Hopscotch</a></li>\n<li><a href=\"https://www.kodugamelab.com/\" target=\"_blank\" rel=\"noopener\">Kodu</a></li>\n<li><a href=\"http://microbit.org/\" target=\"_blank\" rel=\"noopener\">micro:bit</a></li>\n<li><a href=\"https://makecode.com/\" target=\"_blank\" rel=\"noopener\">Make Code</a></li>\n<li><a href=\"https://www.arduino.cc/\" target=\"_blank\" rel=\"noopener\">Arduino</a></li>\n<li><a href=\"http://www.microworlds.com/\">MicroWorlds EX</a></li>\n<li><a href=\"https://www.tynker.com/\" target=\"_blank\" rel=\"noopener\">Tynker</a></li>\n</ul>\n<h3><strong>Ages 13+</strong></h3>\n<p>Coding with teens introduces a whole new world of making! This is usually when youth start working in text-based languages and therefore engage in industry-standard languages and high-level concepts.</p>\n<p>At this point, you should be motivating your young coders to think about how they might apply what they are learning to future careers, advising them to really plan their programs, and encouraging them to determine what languages would be best for what they want to build.</p>\n<ul>\n<li><a href=\"https://www.alice.org/\" target=\"_blank\" rel=\"noopener\">Alice</a></li>\n<li><a href=\"http://appinventor.mit.edu/explore/\" target=\"_blank\" rel=\"noopener\">MIT App Inventor</a></li>\n<li><a href=\"https://www.python.org/\" target=\"_blank\" rel=\"noopener\">Python</a></li>\n<li><a href=\"https://www.javascript.com/\" target=\"_blank\" rel=\"noopener\">JavaScript</a></li>\n<li><a href=\"https://java.com/en/\" target=\"_blank\" rel=\"noopener\">Java</a></li>\n<li><a href=\"https://www.makewonder.com/cue_the_cleverbot\" target=\"_blank\" rel=\"noopener\">Cue</a></li>\n<li><a href=\"https://gamesalad.com/\" target=\"_blank\" rel=\"noopener\">Game Salad</a></li>\n</ul>\n<p>(<em>Note:</em> Alice is a teaching language, and Cue is a robot that uses both tile-based code and JavaScript.)</p>\n<p>Coding is a life-long journey. Even adults with extensive experience are surprised by the programs they can write in Scratch. So, if you have an older coder, don’t be afraid to challenge them with applications to build in “younger” languages.</p>\n<p>Scratch is the first language used at Berkeley for students who might be interested in computer science — undergraduate students! Exposure, creativity, and exploration is what matters; don’t feel the need to force kids to move onto “real” languages too quickly — let it be a journey!</p>\n"},{"title":"Career paths for coders","thumb":null,"image":null,"content":"<p>The really neat thing about learning to code is that you can literally apply it to pretty much any other passion in life, and any other field.</p>\n<p>Our biggest piece of advice for coders in high school and college who are considering computer science as their career path is to first choose a passion outside of coding, and then figure out a way to apply coding to that passion. This doesn’t have to be a requirement, but it’s a lot of fun and really inspiring to have older kids discover that they can mix their love of rap music to their new-found excitement of computer science and make a career out of it.</p>\n<h3>Software companies</h3>\n<p>The most commonly talked about career path for someone interested in coding is to work for a software company — such as Google, Microsoft, or Facebook. These companies typically hire folks who have degrees in computer science (bachelor’s through doctorate), although they&#8217;ve been known to hire from boot camps and people who are self-taught.</p>\n<p>For many companies, the degree isn’t what matters, only the skill set coders possess. GitHub, for example, is a company that doesn’t require candidates to even list what school they went to, instead asking for a technical portfolio. These companies typically provide high-paying jobs, good benefits, and flexibility in work schedules. Coders are usually the focus of the company, and employees can work on cutting edge technology.</p>\n<h3>Freelance coding</h3>\n<p>One of the really neat things about the computer science industry is that you do not have to join a large tech company to be a part of the field! People all around the world with varying levels of formal education, from being self-taught to having PhDs in computer science, become freelance coders.</p>\n<p>Sites, such as <a href=\"https://www.upwork.com/\" target=\"_blank\" rel=\"noopener\">Upwork</a>, help coders find people who need code written for them. A lot of freelance coders will work on web development or mobile development, because those projects tend to be more contained and have clearer cut lines regarding ownership. This is a great career, especially for those who want to live in places where fewer technical jobs are available.</p>\n<h3>Entertainment companies</h3>\n<p>Most forms of entertainment these days involve an incredible amount of coding. For example, most movies have huge teams of software engineers for special effects and animation.</p>\n<p>Aside from movies, video games are huge efforts by hundreds and thousands of software engineers over years. For example, World of Warcraft took nearly five years to make. Companies such as Blizzard (creator of World of Warcraft) and Riot Games (creator of League of Legends) employ thousands of artists and engineers to produce games.</p>\n<p>Even the music industry has software engineers, creating soundboards, using algorithms to create new music, and discovering new ways to engage with their audiences.</p>\n<p>Finally, entertainment parks are filled with software engineers; most notably Disney’s <em>imagineers</em> are some of the most innovative when it comes to in-person customer experience.</p>\n<h3>Non-software focused companies</h3>\n<p>In today’s world, pretty much every industry and company has a need for a coder. Smaller companies might use existing software or get freelance coders to help. For example, small companies might use something like Wix or Squarespace to create their websites, both of which provide an easy-to-use interface for high quality websites.</p>\n<p>Larger companies, with more specialized software needs, might hire coders to make software specifically for their needs. For example, companies like Target hire software engineers to build the mobile apps, website, and behind-the-scenes software for sales and inventory.</p>\n<p>Working at non-software focused companies can be fun, because the software can have a direct application other than just “software.”</p>\n<h3>Any other industry</h3>\n<p>The really neat thing about knowing how to code is that it can be useful in pretty much any other industry and context, without it being the main focus of your career.</p>\n<p>Having the ability to code could give you the power to enhance and improve your job in ways you didn’t expect. Furthermore, even if you don’t code within your job, you will most likely interact with some kind of software, and that software will most likely have a problem. At this point, you will most likely have to interact with the IT department, and the more you understand about computers and coding, the more likely you are able to explain and help IT resolve your issue.</p>\n"},{"title":"Example applications for novice coders by language","thumb":null,"image":null,"content":"<p>Following, are some ideas for programs you and your young coder can write, separated by programming language. You can also imagine creating almost any of these in the other languages, too.</p>\n<p>When in doubt, search the internet for examples of programs you want to build in the languages you want to build them in — luckily there is almost always a near-example that can help guide you.</p>\n<h3>Scratch</h3>\n<p><a href=\"https://scratch.mit.edu/projects/203946438/\" target=\"_blank\" rel=\"noopener\">Question and Answer Game</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252790\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0101.jpg\" alt=\"kidscode-question\" width=\"535\" height=\"255\" /></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252791\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0102.jpg\" alt=\"kidscode-answer\" width=\"535\" height=\"212\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/177641066/\" target=\"_blank\" rel=\"noopener\">Asteroid Game</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252794\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0105.jpg\" alt=\"kidscode-asteroid\" width=\"535\" height=\"334\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/195801142/\" target=\"_blank\" rel=\"noopener\">Costume Changer with Sounds</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252795\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0106.jpg\" alt=\"kidscode-costume\" width=\"535\" height=\"157\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/204630366/\" target=\"_blank\" rel=\"noopener\">Helicopter Flying</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252796\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0107.jpg\" alt=\"kidscode-helicopter\" width=\"535\" height=\"334\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/167906267/\" target=\"_blank\" rel=\"noopener\">Crypto Code Breaker</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252798\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0109.jpg\" alt=\"kidscode-crypto\" width=\"437\" height=\"400\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/204630588/\" target=\"_blank\" rel=\"noopener\">Rock-Paper-Scissors</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252799\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0110.jpg\" alt=\"kidscode-rock\" width=\"535\" height=\"334\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/196405818/\" target=\"_blank\" rel=\"noopener\">Random Art Maker 1</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252802\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0113.jpg\" alt=\"kidscode-random-art\" width=\"535\" height=\"172\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/204631318/\" target=\"_blank\" rel=\"noopener\">Random Art Maker 2</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252803\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0114.jpg\" alt=\"kidscode-randomart2\" width=\"535\" height=\"172\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/203948999/\" target=\"_blank\" rel=\"noopener\">Race</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252804\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0115.jpg\" alt=\"kidscode-race\" width=\"535\" height=\"218\" /></p>\n<p><a href=\"https://scratch.mit.edu/projects/204631450/\" target=\"_blank\" rel=\"noopener\">Greeter</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252809\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0120.jpg\" alt=\"kidscode-greeter\" width=\"535\" height=\"238\" /></p>\n<h3>Micro:bit</h3>\n<p><a href=\"https://makecode.microbit.org/_ajrTHD67s6Aw\" target=\"_blank\" rel=\"noopener\">Stock Ticker</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252797\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0108.jpg\" alt=\"kidscode-face\" width=\"535\" height=\"334\" /></p>\n<p><a href=\"https://makecode.microbit.org/_MCLDL3MCqERH\" target=\"_blank\" rel=\"noopener\">Face Maker</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252822\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0333.jpg\" alt=\"kidscode-stock\" width=\"535\" height=\"334\" /></p>\n<h3>MIT App Inventor</h3>\n<p>Mobile App Game</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252820\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0131.jpg\" alt=\"kidscode-app\" width=\"250\" height=\"400\" /></p>\n<p>Greeter</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252821\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0132.jpg\" alt=\"kidscode-winston\" width=\"250\" height=\"400\" /></p>\n<h3>JavaScript/HTML/CSS</h3>\n<p><a href=\"https://drive.google.com/open?id=1xv55S2Z1vOhtOsMQJYPj-E_EqhWMQz6F\" target=\"_blank\" rel=\"noopener\">Greeter</a></p>\n<p>Note: Be sure you have a file called “puppy.jpg” in the same folder as your HTML file so that the image actually appears.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252817\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0128.jpg\" alt=\"kidscode-first\" width=\"535\" height=\"220\" /></p>\n<p><a href=\"https://drive.google.com/open?id=1ESeQvij2lkYDCdfDUPKgs2MvmMx0SPvs\" target=\"_blank\" rel=\"noopener\">Picture Hider</a></p>\n<p>Note: Be sure you have files called “puppy.jpg” and “kitten.jpeg” in the same folder as your HTML file so that the images actually appears.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252818\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0129.jpg\" alt=\"kidscode-picture\" width=\"535\" height=\"244\" /></p>\n<p><a href=\"https://drive.google.com/file/d/1sALjJDsENfuBgIleYA1KAuhVzByAqzuO/view?usp=sharing\" target=\"_blank\" rel=\"noopener\">Webpage</a></p>\n<p>Note: Be sure you have files called “winston.jpg,” “princess.jpg,” and “luke.jpg” in the same folder as your HTML file so that the images actually appear!</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252819\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0130.jpg\" alt=\"kidscode-welcome\" width=\"535\" height=\"187\" /></p>\n<h3>Python</h3>\n<p><a href=\"https://repl.it/@sguthals/GainsboroAthleticCodewarrior\" target=\"_blank\" rel=\"noopener\">Mad Libs Game</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252792\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0103.jpg\" alt=\"kidscode-mad-lib\" width=\"535\" height=\"198\" /></p>\n<p><a href=\"https://repl.it/@sguthals/BuzzingCommonMenu\" target=\"_blank\" rel=\"noopener\">Number Guesser</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252805\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0116.jpg\" alt=\"kidscode-guesser\" width=\"535\" height=\"193\" /></p>\n<p><a href=\"https://repl.it/@sguthals/NecessaryEnchantingProblems\" target=\"_blank\" rel=\"noopener\">Greeter</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252806\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0117.jpg\" alt=\"kidscode-names\" width=\"535\" height=\"102\" /></p>\n<p><a href=\"https://repl.it/@sguthals/NaiveOrderlyFile\" target=\"_blank\" rel=\"noopener\">Art Maker</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252807\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0118.jpg\" alt=\"kidscode-print\" width=\"535\" height=\"246\" /></p>\n<p><a href=\"https://repl.it/@sguthals/WeeklyGaseousTranslation\" target=\"_blank\" rel=\"noopener\">Fibonacci Printer</a></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252808\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0119.jpg\" alt=\"kidscode-fibonacci\" width=\"535\" height=\"153\" /></p>\n<h3>Java</h3>\n<p><a href=\"https://drive.google.com/drive/folders/1UndZGQMZ4ArHZ0VqeLDgUDFrDUxySnL_?usp=sharing\" target=\"_blank\" rel=\"noopener\">Pizza Divider</a></p>\n<p>The Pizza Divider is a BlueJ program that you can download and run inside of the BlueJ code editor.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252800\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0111.jpg\" alt=\"kidscode-pizza\" width=\"535\" height=\"396\" /></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252801\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0112.jpg\" alt=\"kidscode-pizza\" width=\"535\" height=\"382\" /></p>\n<p><a href=\"https://drive.google.com/drive/folders/1NGwSIiZWBpl4iVC21hxAeut-AMS2wGNW?usp=sharing\" target=\"_blank\" rel=\"noopener\">Greeter</a></p>\n<p>The Greeter is a BlueJ program that you can download and run inside of the BlueJ code editor.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252810\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0121.jpg\" alt=\"kidscode-bluej\" width=\"535\" height=\"380\" /></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252811\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0122.jpg\" alt=\"kidscode-naming\" width=\"535\" height=\"152\" /></p>\n<p><a href=\"https://drive.google.com/drive/folders/1sdjjk0CBUU68E3aQY-gTab6a8Ip9Aq3p?usp=sharing\" target=\"_blank\" rel=\"noopener\">Number Sorter</a></p>\n<p>The Number Sorter is a BlueJ program that you can download and run inside of the BlueJ code editor.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252812\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0123.jpg\" alt=\"kidscode-numbering\" width=\"535\" height=\"348\" /></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252813\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0124.jpg\" alt=\"kidscode-numbers\" width=\"535\" height=\"97\" /></p>\n<p><a href=\"https://drive.google.com/drive/folders/1zIWS-qtYQ9ygc23zLizYY8I7-jisIMIm?usp=sharing\" target=\"_blank\" rel=\"noopener\">Phone Number Finder</a></p>\n<p>The Phone Number Finder is a BlueJ program that you can download and run inside of the BlueJ code editor.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252814\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0125.jpg\" alt=\"kidscode-phone\" width=\"481\" height=\"400\" /></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252815\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0126.jpg\" alt=\"kidscode-phoning\" width=\"463\" height=\"400\" /></p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-252816\" src=\"https://www.dummies.com/wp-content/uploads/9781119380672-oa0127.jpg\" alt=\"kidscode-final\" width=\"535\" height=\"121\" /></p>\n"},{"title":"10 ways to invest in a kid's coding future","thumb":null,"image":null,"content":"<p>There are so many ways to invest in your young coders coding future. Though a computer with an internet connection and time and dedication are some of the best ways to invest, this list gives an overview of some of the ways parents we know have dedicated time or money to support their children in their coding adventures.</p>\n<p><strong>Coding workshops: </strong>Coding workshops are often one to two hours long and held at community centers or libraries. They vary in price, but provide novice coders with a sense of community and an easy-to-finish project that they can feel proud of.</p>\n<p><strong>Coding camps: </strong>Camps are typically more expensive but offer full  or half days for at least one week. These are great for school breaks and students often finish the camp, having completed a larger project and having a sense of what to do next, on their own.</p>\n<p><strong>Coding classes (in person):</strong> In person coding classes are typically once per week and can happen during the school year (after school or on weekends). Students are often learning something specific and there is a guided curriculum, but they still gain a sense of community and growth.</p>\n<p><strong>Private tutors: </strong>For your budding coder who really wants to build something specific, a private tutor can help get your young coder ready for a high school or college class, support them outside of a class they are already taking, or help them create a very specific project that they have in mind.</p>\n<p><strong>Coding classes (online):</strong> Online classes are great for asynchronously learning; with the ability to watch videos, pause them, and re-watch them, students are able to learn a variety of things without the hassle of leaving their home. Sometimes you can still get a sense of community, depending on the platform.</p>\n<p><strong><a href=\"https://www.lego.com/en-us/themes/mindstorms\" target=\"_blank\" rel=\"noopener\">Lego Mindstorms</a></strong>: Lego Mindstorms is an entire kit that integrates coding and robot building. A young coder can work on this on their own, or even create a team of people and recruit an adult to help lead them through the curriculum provided by Lego in its Education set.</p>\n<p><strong><a href=\"https://kano.tech/us/original\" target=\"_blank\" rel=\"noopener\">Kano</a>:</strong> Kano is an all-in-one, lightweight, DIY computer. Using a micro-controller as the computer (Raspberry Pi), and simple mouse, keyboard, and speakers, young coders can quickly wire up their computer and play Minecraft, jump on the web, or start coding.</p>\n<p><strong>Codable toys: </strong>A great gift for the young coder is codable toys. With edutainment like <a href=\"http://littlebits.cc/\" target=\"_blank\" rel=\"noopener\">Little Bits</a>, or the <a href=\"https://www.makewonder.com/\" target=\"_blank\" rel=\"noopener\">Dash and Dot Robots</a>, coding can be for an immediate purpose—changing and interacting with the world around you.</p>\n<p><strong>Computers and devices</strong>: A big question is always what kind of device to get for a young coder. Often hand-me-down computers (OSX or Windows) can be useful, as long as they can run the programs your young coder is looking to run. If you’re primarily working on the web, a Chromebook can be a great option (especially for Scratch coders). And every day more apps are coming out, making mobile devices more accessible to young coders too.</p>\n<p><strong>Software: </strong>Most software that a young coder will want to use is free; however, sometimes it can make sense to invest in software to support the entire development process. Software like Photoshop or Illustrator can invite more artistic folks into the coding world, integrating their creations into software like Blender or Maya to create games in game engines like Unity.</p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Explore","lifeExpectancy":"One year","lifeExpectancySetFrom":"2022-04-27T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":252828},{"headers":{"creationTime":"2016-03-27T16:47:50+00:00","modifiedTime":"2022-04-26T15:00:23+00:00","timestamp":"2022-06-22T19:37:38+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"Python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"},"slug":"python","categoryId":33606}],"title":"Beginning Programming with Python For Dummies Cheat Sheet","strippedTitle":"beginning programming with python for dummies cheat sheet","slug":"beginning-programming-python-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Ensure your Python applications have the best chance possible of working exactly as planned, wherever you run them.","noIndex":0,"noFollow":0},"content":"Python is an incredibly flexible language that has significant third-party support and is used in a broad range of applications. The applications you build will run on any platform that Python supports without any modification as long as you create a pure Python solution. Of course, you want to ensure that your applications have the best chance possible of working exactly as you anticipated everywhere they're run, which is why you need the information in this cheat sheet.","description":"Python is an incredibly flexible language that has significant third-party support and is used in a broad range of applications. The applications you build will run on any platform that Python supports without any modification as long as you create a pure Python solution. Of course, you want to ensure that your applications have the best chance possible of working exactly as you anticipated everywhere they're run, which is why you need the information in this cheat sheet.","blurb":"","authors":[{"authorId":9109,"name":"John Paul Mueller","slug":"john-paul-mueller","description":" <p><b> John Mueller</b> has published more than 100 books on technology, data, and programming. John has a website and blog where he writes articles on technology and offers assistance alongside his published books.</p> <p><b>Luca Massaron</b> is a data scientist specializing in insurance and finance. A Google Developer Expert in machine learning, he has been involved in quantitative analysis and algorithms since 2000. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9109"}}],"primaryCategoryTaxonomy":{"categoryId":33606,"title":"Python","slug":"python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":250588,"title":"How to Get Additional Python Libraries","slug":"get-additional-python-libraries","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250588"}},{"articleId":250582,"title":"Printing Lists Using Python","slug":"printing-lists-using-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250582"}},{"articleId":250578,"title":"Understanding How Permanent Storage Works for Python Programming","slug":"understanding-permanent-storage-works-python-programming","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250578"}},{"articleId":250575,"title":"Extending Python Classes to Make New Classes","slug":"extending-python-classes-make-new-classes","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250575"}},{"articleId":250571,"title":"Understanding the Python Class as a Packaging Method","slug":"understanding-python-class-packaging-method","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250571"}}],"fromCategory":[{"articleId":264919,"title":"How to Define and Use Python Lists","slug":"how-to-define-and-use-python-lists","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264919"}},{"articleId":264911,"title":"How to Use Lambda Functions in Python","slug":"how-to-use-lambda-functions-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264911"}},{"articleId":264906,"title":"Your Guide to the Python Standard Library","slug":"your-guide-to-the-python-standard-library","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264906"}},{"articleId":264894,"title":"A Beginner’s Guide to Python Versions","slug":"a-beginners-guide-to-python-versions","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264894"}},{"articleId":264888,"title":"How to Build a Simple Neural Network in Python","slug":"how-to-build-a-simple-neural-network-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264888"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281830,"slug":"beginning-programming-with-python-for-dummies-2nd-edition","isbn":"9781119457893","categoryList":["technology","programming-web-design","python"],"amazon":{"default":"https://www.amazon.com/gp/product/1119457890/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119457890/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119457890-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119457890/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119457890/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/beginning-programming-with-python-for-dummies-2nd-edition-cover-9781119457893-203x255.jpg","width":203,"height":255},"title":"Beginning Programming with Python For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"9109\">John Paul Mueller</b> is a freelance author and technical editor with more than 107 books and 600 articles to his credit. His subjects range from networking and artificial intelligence to database management and heads-down programming. He also consults and writes certification exams. Visit his website at http://www.johnmuellerbooks.com/. </p>","authors":[{"authorId":9109,"name":"John Paul Mueller","slug":"john-paul-mueller","description":" <p><b> John Mueller</b> has published more than 100 books on technology, data, and programming. John has a website and blog where he writes articles on technology and offers assistance alongside his published books.</p> <p><b>Luca Massaron</b> is a data scientist specializing in insurance and finance. A Google Developer Expert in machine learning, he has been involved in quantitative analysis and algorithms since 2000. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9109"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119457893&quot;]}]\" id=\"du-slot-62b36f82e56c5\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119457893&quot;]}]\" id=\"du-slot-62b36f82e5e0a\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":248967,"title":"The 4 Common Python Programming Styles","slug":"4-common-python-programming-styles","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/248967"}},{"articleId":248973,"title":"Common Python Operators","slug":"common-python-operators","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/248973"}},{"articleId":248976,"title":"Python Operator Precedence","slug":"python-operator-precedence-2","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/248976"}},{"articleId":248970,"title":"Common Jupyter Notebook Magic Functions","slug":"common-jupyter-notebook-magic-functions","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/248970"}}],"content":[{"title":"The 4 common Python programming styles","thumb":null,"image":null,"content":"<p>You might be a nonprogrammer or a developer who isn&#8217;t interested in learning some new arcane method of writing code. If so, Python is the a great language for you. Most programming languages use just one coding style, which reduces flexibility for the programmer. Python is different, though. You can use a number of coding styles with it to achieve differing effects. Among the various Python coding styles, here are the four commonly used:</p>\n<ul>\n<li><strong>Functional:</strong> Every statement is a kind of math equation. This style lends itself well to use in parallel processing activities. Academics and data scientists tend to use this coding style regularly. However, nothing stops you from using it even if you don&#8217;t fall into one of these groups.</li>\n<li><strong>Imperative:</strong> Computations occur as changes to program state. This style is most used for manipulating data structures. Scientists of all sorts rely on this programming style because it demonstrates processes so clearly.</li>\n<li><strong>Object-oriented:</strong> This is the style commonly used with other languages to simplify the coding environment by using objects to model the real world. Python doesn&#8217;t fully implement this coding style because it doesn&#8217;t support features like data hiding, but you can still use this approach to a significant degree. This is the style that most developers use, but other groups can use it when creating more complicated applications.</li>\n<li><strong>Procedural:</strong> Most people begin learning a language by using procedural code, where tasks proceed a step at a time. This style is most used for iteration, sequencing, selection, and modularization. It&#8217;s the simplest form of coding you can use. Nonprogrammers love this style because it&#8217;s the least complicated way to achieve smaller, experimental tasks.</li>\n</ul>\n"},{"title":"Common Python operators","thumb":null,"image":null,"content":"<p><em>Operators</em> help determine the interactions between elements in a Python statement. For example, when you write <code>2 + 3</code>, it means to add (using the <code>+</code> operator) the value <code>2</code> to the value <code>3</code> for a sum of <code>5</code>. It&#8217;s important to know which operators Python supports, and remembering them all is not always easy. The following table provides a quick summary.</p>\n<table>\n<tbody>\n<tr>\n<td width=\"122\"><strong>Operator</strong></td>\n<td width=\"120\"><strong>Type</strong></td>\n<td width=\"255\"><strong>Description</strong></td>\n<td width=\"168\"><strong>Example</strong></td>\n</tr>\n<tr>\n<td width=\"122\">−</td>\n<td width=\"120\">Arithmetic</td>\n<td width=\"255\">Subtracts the right operand from left hand operand.</td>\n<td width=\"168\">5 − 2 = 3</td>\n</tr>\n<tr>\n<td width=\"122\">−</td>\n<td width=\"120\">Unary</td>\n<td width=\"255\">Negates the original value so that positive becomes negative and vice versa.</td>\n<td width=\"168\">−(−4) results in 4 while −4 results in −4</td>\n</tr>\n<tr>\n<td width=\"122\">−=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Subtracts the value found in the right operand from the value found in the left operand and places the result in the left operand.</td>\n<td width=\"168\">MyVar -= 2 results in MyVar containing 3</td>\n</tr>\n<tr>\n<td width=\"122\">!=</td>\n<td width=\"120\">Relational</td>\n<td width=\"255\">Determines whether two values are not equal. Some older versions of Python would allow you to use the &lt;&gt; operator in place of the != operator. Using the &lt;&gt; operator results in an error in current versions of Python.</td>\n<td width=\"168\">1 != 2 is True</td>\n</tr>\n<tr>\n<td width=\"122\">%</td>\n<td width=\"120\">Arithmetic</td>\n<td width=\"255\">Divides the left operand by the right operand and returns the remainder.</td>\n<td width=\"168\">5 % 2 = 1</td>\n</tr>\n<tr>\n<td width=\"122\">%=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Divides the value found in the left operand by the value found in the right operand and places the remainder in the left operand.</td>\n<td width=\"168\">MyVar %= 2 results in MyVar containing 1</td>\n</tr>\n<tr>\n<td width=\"122\">&amp; (And)</td>\n<td width=\"120\">Bitwise</td>\n<td width=\"255\">Determines whether both individual bits within two operators are true and sets the resulting bit to true when they are.</td>\n<td width=\"168\">0b1100 &amp; 0b0110 = 0b0100</td>\n</tr>\n<tr>\n<td width=\"122\">*</td>\n<td width=\"120\">Arithmetic</td>\n<td width=\"255\">Multiplies the right operand by the left operand.</td>\n<td width=\"168\">5 * 2 = 10</td>\n</tr>\n<tr>\n<td width=\"122\">**</td>\n<td width=\"120\">Arithmetic</td>\n<td width=\"255\">Calculates the exponential value of the right operand by the left operand.</td>\n<td width=\"168\">5 ** 2 = 25</td>\n</tr>\n<tr>\n<td width=\"122\">**=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Determines the exponential value found in the left operand when raised to the power of the value found in the right operand and places the result in the left operand.</td>\n<td width=\"168\">MyVar ** 2 results in MyVar containing 25</td>\n</tr>\n<tr>\n<td width=\"122\">*=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Multiplies the value found in the right operand by the value found in the left operand and places the result in the left operand.</td>\n<td width=\"168\">MyVar *= 2 results in MyVar containing 10</td>\n</tr>\n<tr>\n<td width=\"122\">/</td>\n<td width=\"120\">Arithmetic</td>\n<td width=\"255\">Divides the left operand by the right operand.</td>\n<td width=\"168\">5 / 2 = 2.5</td>\n</tr>\n<tr>\n<td width=\"122\">//</td>\n<td width=\"120\">Arithmetic</td>\n<td width=\"255\">Performs integer division, where the left operand is divided by the right operand and only the whole number is returned (also called floor division).</td>\n<td width=\"168\">5 // 2 = 2</td>\n</tr>\n<tr>\n<td width=\"122\">//=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Divides the value found in the left operand by the value found in the right operand and places the integer (whole number) result in the left operand.</td>\n<td width=\"168\">MyVar //= 2 results in MyVar containing 2</td>\n</tr>\n<tr>\n<td width=\"122\">/=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Divides the value found in the left operand by the value found in the right operand and places the result in the left operand.</td>\n<td width=\"168\">MyVar /= 2 results in MyVar containing 2.5</td>\n</tr>\n<tr>\n<td width=\"122\">^ (Exclusive or)</td>\n<td width=\"120\">Bitwise</td>\n<td width=\"255\">Determines whether just one of the individual bits within two operators are true and sets the resulting bit to true when they are. When both bits are true or both bits are false, the result is false.</td>\n<td width=\"168\">0b1100 ^ 0b0110 = 0b1010</td>\n</tr>\n<tr>\n<td width=\"122\">| (Or)</td>\n<td width=\"120\">Bitwise</td>\n<td width=\"255\">Determines whether either of the individual bits within two operators are true and sets the resulting bit to true when they are.</td>\n<td width=\"168\">0b1100 | 0b0110 = 0b1110</td>\n</tr>\n<tr>\n<td width=\"122\">~</td>\n<td width=\"120\">Unary</td>\n<td width=\"255\">Inverts the bits in a number so that all the 0 bits become 1 bits and vice versa.</td>\n<td width=\"168\">~4 results in a value of −5</td>\n</tr>\n<tr>\n<td width=\"122\">~ (One&#8217;s complement)</td>\n<td width=\"120\">Bitwise</td>\n<td width=\"255\">Calculates the one&#8217;s complement value a number.</p>\n<p><strong><em> </em></strong></td>\n<td width=\"168\">~0b1100 = −0b1101</p>\n<p>~0b0110 = −0b0111</td>\n</tr>\n<tr>\n<td width=\"122\">+</td>\n<td width=\"120\">Arithmetic</td>\n<td width=\"255\">Adds two values together.</td>\n<td width=\"168\">5 + 2 = 7</td>\n</tr>\n<tr>\n<td width=\"122\">+</td>\n<td width=\"120\">Unary</td>\n<td width=\"255\">Provided purely for the sake of completeness. This operator returns the same value that you provide as input.</td>\n<td width=\"168\">+4 results in a value of 4</td>\n</tr>\n<tr>\n<td width=\"122\">+=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Adds the value found in the right operand to the value found in the left operand and places the result in the left operand.</td>\n<td width=\"168\">MyVar += 2 results in MyVar containing 7</td>\n</tr>\n<tr>\n<td width=\"122\">&lt;</td>\n<td width=\"120\">Relational</td>\n<td width=\"255\">Verifies that the left operand value is less than the right operand value.</td>\n<td width=\"168\">1 &lt; 2 is True</td>\n</tr>\n<tr>\n<td width=\"122\">&lt;&lt; (Left shift)</td>\n<td width=\"120\">Bitwise</td>\n<td width=\"255\">Shifts the bits in the left operand left by the value of the right operand. All new bits are set to 0 and all bits that flow off the end are lost.</td>\n<td width=\"168\">0b00110011 &lt;&lt; 2 = 0b11001100</td>\n</tr>\n<tr>\n<td width=\"122\">&lt;=</td>\n<td width=\"120\">Relational</td>\n<td width=\"255\">Verifies that the left operand value is less than or equal to the right operand value.</td>\n<td width=\"168\">1 &lt;= 2 is True</td>\n</tr>\n<tr>\n<td width=\"122\">=</td>\n<td width=\"120\">Assignment</td>\n<td width=\"255\">Assigns the value found in the right operand to the left operand.</td>\n<td width=\"168\">MyVar = 2 results in MyVar containing 2</td>\n</tr>\n<tr>\n<td width=\"122\">==</td>\n<td width=\"120\">Relational</td>\n<td width=\"255\">Determines whether two values are equal. Notice that the relational operator uses two equals signs. A mistake many developers make is using just one equals sign, which results in one value being assigned to another.</td>\n<td width=\"168\">1 == 2 is False</td>\n</tr>\n<tr>\n<td width=\"122\">&gt;</td>\n<td width=\"120\">Relational</td>\n<td width=\"255\">Verifies that the left operand value is greater than the right operand value.</td>\n<td width=\"168\">1 &gt; 2 is False</td>\n</tr>\n<tr>\n<td width=\"122\">&gt;=</td>\n<td width=\"120\">Relational</td>\n<td width=\"255\">Verifies that the left operand value is greater than or equal to the right operand value.</td>\n<td width=\"168\">1 &gt;= 2 is False</td>\n</tr>\n<tr>\n<td width=\"122\">&gt;&gt; (Right shift)</td>\n<td width=\"120\">Bitwise</td>\n<td width=\"255\">Shifts the bits in the left operand right by the value of the right operand. All new bits are set to 0 and all bits that flow off the end are lost.</td>\n<td width=\"168\">0b00110011 &gt;&gt; 2 = 0b00001100</td>\n</tr>\n<tr>\n<td width=\"122\">and</td>\n<td width=\"120\">Logical</td>\n<td width=\"255\">Determines whether both operands are true.</td>\n<td width=\"168\">True and True is True</p>\n<p>True and False is False</p>\n<p>False and True is False</p>\n<p>False and False is False</td>\n</tr>\n<tr>\n<td width=\"122\">in</td>\n<td width=\"120\">Membership</td>\n<td width=\"255\">Determines whether the value in the left operand appears in the sequence found in the right operand.</td>\n<td width=\"168\">&#8220;Hello&#8221; in &#8220;Hello Goodbye&#8221; is True</td>\n</tr>\n<tr>\n<td width=\"122\">is</td>\n<td width=\"120\">Identity</td>\n<td width=\"255\">Evaluates to true when the type of the value or expression in the right operand points to the same type in the left operand.</td>\n<td width=\"168\">type(2) is int is True</td>\n</tr>\n<tr>\n<td width=\"122\">is not</td>\n<td width=\"120\">Identity</td>\n<td width=\"255\">Evaluates to true when the type of the value or expression in the right operand points to a different type than the value or expression in the left operand.</td>\n<td width=\"168\">type(2) is not int is False</td>\n</tr>\n<tr>\n<td width=\"122\">not</td>\n<td width=\"120\">Logical</td>\n<td width=\"255\">Negates the truth value of a single operand. A true value becomes false and a false value becomes true.</td>\n<td width=\"168\">not True is False</p>\n<p>not False is True</td>\n</tr>\n<tr>\n<td width=\"122\">not in</td>\n<td width=\"120\">Membership</td>\n<td width=\"255\">Determines whether the value in the left operand is missing from the sequence found in the right operand.</td>\n<td width=\"168\">&#8220;Hello&#8221; not in &#8220;Hello Goodbye&#8221; is False</td>\n</tr>\n<tr>\n<td width=\"122\">or</td>\n<td width=\"120\">Logical</td>\n<td width=\"255\">Determines when one of two operands are true.</td>\n<td width=\"168\">True or True is True</p>\n<p>True or False is True</p>\n<p>False or True is True</p>\n<p>False or False is False</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"Python operator precedence","thumb":null,"image":null,"content":"<table>\n<tbody>\n<tr>\n<td width=\"92\"><strong>Operator</strong></td>\n<td width=\"573\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"92\">()</td>\n<td width=\"573\">Parentheses are used to group expressions and to override the default precedence so that you can force an operation of lower precedence (such as addition) to take precedence over an operation of higher precedence (such as multiplication).</td>\n</tr>\n<tr>\n<td width=\"92\">**</td>\n<td width=\"573\">Exponentiation raises the value of the left operand to the power of the right operand.</td>\n</tr>\n<tr>\n<td width=\"92\">~ + &#8211;</td>\n<td width=\"573\">Unary operators interact with a single variable or expression.</td>\n</tr>\n<tr>\n<td width=\"92\">* / % //</td>\n<td width=\"573\">Multiply, divide, modulo and floor division.</td>\n</tr>\n<tr>\n<td width=\"92\">+ &#8211;</td>\n<td width=\"573\">Addition and subtraction.</td>\n</tr>\n<tr>\n<td width=\"92\">&gt;&gt; &lt;&lt;</td>\n<td width=\"573\">Right and left bitwise shift.</td>\n</tr>\n<tr>\n<td width=\"92\">&amp;</td>\n<td width=\"573\">Bitwise AND.</td>\n</tr>\n<tr>\n<td width=\"92\">^ |</td>\n<td width=\"573\">Bitwise exclusive OR and standard OR.</td>\n</tr>\n<tr>\n<td width=\"92\">&lt;= &lt; &gt; &gt;=</td>\n<td width=\"573\">Comparison operators.</td>\n</tr>\n<tr>\n<td width=\"92\">== !=</td>\n<td width=\"573\">Equality operators.</td>\n</tr>\n<tr>\n<td width=\"92\">= %= /= //= -= += *= **=</td>\n<td width=\"573\">Assignment operators.</td>\n</tr>\n<tr>\n<td width=\"92\">is is not</td>\n<td width=\"573\">Identity operators.</td>\n</tr>\n<tr>\n<td width=\"92\">in not in</td>\n<td width=\"573\">Membership operators.</td>\n</tr>\n<tr>\n<td width=\"92\">not or and</td>\n<td width=\"573\">Logical operators.</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"Common Jupyter Notebook magic functions","thumb":null,"image":null,"content":"<p>Jupyter Notebook relies on the literate programming approach originally advanced by Donald Knuth. This means that the Integrated Development Environment (IDE) produces output that looks more like a report than the complex coding environments that most people rely on. The magic functions add to this capability by creating an environment in which you can choose something other than the expected result. The following table highlights the most important magic functions that Jupyter Notebook provides.</p>\n<table>\n<tbody>\n<tr>\n<td width=\"122\"><strong>Magic Function</strong></td>\n<td width=\"105\"><strong>Type Alone Provides Status?</strong></td>\n<td width=\"438\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"122\">%alias</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Assigns or displays an alias for a system command.</td>\n</tr>\n<tr>\n<td width=\"122\">%autocall</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Enables you to call functions without including the parentheses. The settings are Off, Smart (default), and Full. The Smart setting applies the parentheses only if you include an argument with the call.</td>\n</tr>\n<tr>\n<td width=\"122\">%automagic</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Enables you to call the line magic functions without including the % sign. The settings are False (default) and True.</td>\n</tr>\n<tr>\n<td width=\"122\">%autosave</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Displays or modifies the intervals between automatic Notebook saves. The default setting is every 120 seconds.</td>\n</tr>\n<tr>\n<td width=\"122\">%cd</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Changes directory to a new storage location. You can also use this command to move through the directory history or to change directories to a bookmark.</td>\n</tr>\n<tr>\n<td width=\"122\">%cls</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Clears the screen.</td>\n</tr>\n<tr>\n<td width=\"122\">%colors</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Specifies the colors used to display text associated with prompts, information system, and exception handlers. You can choose between NoColor (black and white), Linux (default), and LightBG.</td>\n</tr>\n<tr>\n<td width=\"122\">%config</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Enables you to configure IPython.</td>\n</tr>\n<tr>\n<td width=\"122\">%dhist</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Displays a list of directories visited during the current session.</td>\n</tr>\n<tr>\n<td width=\"122\">%file</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Outputs the name of the file that contains the source code for the object.</td>\n</tr>\n<tr>\n<td width=\"122\">%hist</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Displays a list of magic function commands issued during the current session.</td>\n</tr>\n<tr>\n<td width=\"122\">%install_ext</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Installs the specified extension.</td>\n</tr>\n<tr>\n<td width=\"122\">%load</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Loads application code from another source, such as an online example.</td>\n</tr>\n<tr>\n<td width=\"122\">%load_ext</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Loads a Python extension using its module name.</td>\n</tr>\n<tr>\n<td width=\"122\">%lsmagic</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Displays a list of the currently available magic functions.</td>\n</tr>\n<tr>\n<td width=\"122\">%magic</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Displays a help screen showing information about the magic functions.</td>\n</tr>\n<tr>\n<td width=\"122\">%matplotlib</td>\n<td width=\"105\">Yes</td>\n<td width=\"438\">Sets the backend processor used for plots. Using the inline value displays the plot within the cell for an IPython Notebook file. The possible values are gtk&#8217;; &#8216;gtk3&#8217;; &#8216;inline&#8217;; &#8216;nbagg&#8217;; &#8216;osx&#8217;; &#8216;qt&#8217;; &#8216;qt4&#8217;; &#8216;qt5&#8217;; &#8216;tk&#8217;; and &#8216;wx&#8217;.</td>\n</tr>\n<tr>\n<td width=\"122\">%paste</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Pastes the content of the Clipboard into the IPython environment.</td>\n</tr>\n<tr>\n<td width=\"122\">%pdef</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Shows how to call the object (assuming that the object is callable).</td>\n</tr>\n<tr>\n<td width=\"122\">%pdoc</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Displays the docstring for an object.</td>\n</tr>\n<tr>\n<td width=\"122\">%pinfo</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Displays detailed information about the object (often more than is provided by help alone).</td>\n</tr>\n<tr>\n<td width=\"122\">%pinfo2</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Displays extra detailed information about the object (when available).</td>\n</tr>\n<tr>\n<td width=\"122\">%reload_ext</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Reloads a previously installed extension.</td>\n</tr>\n<tr>\n<td width=\"122\">%source</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Displays the source code for the object (assuming that the source is available).</td>\n</tr>\n<tr>\n<td width=\"122\">%timeit</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Calculates the best performance time for an instruction.</td>\n</tr>\n<tr>\n<td width=\"122\">%%timeit</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Calculates the best time performance for all the instructions in a cell, apart from the one placed on the same cell line as the cell magic (which could therefore be an initialization instruction).</td>\n</tr>\n<tr>\n<td width=\"122\">%unalias</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Removes a previously created alias from the list.</td>\n</tr>\n<tr>\n<td width=\"122\">%unload_ext</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Unloads the specified extension.</td>\n</tr>\n<tr>\n<td width=\"122\">%%writefile</td>\n<td width=\"105\">No</td>\n<td width=\"438\">Writes the contents of a cell to the specified file.</td>\n</tr>\n</tbody>\n</table>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"One year","lifeExpectancySetFrom":"2022-02-25T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":207635},{"headers":{"creationTime":"2016-03-27T16:54:26+00:00","modifiedTime":"2022-04-25T15:20:42+00:00","timestamp":"2022-06-22T19:37:38+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"SQL","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33608"},"slug":"sql","categoryId":33608}],"title":"SQL All-in-One For Dummies Cheat Sheet","strippedTitle":"sql all-in-one for dummies cheat sheet","slug":"sql-all-in-one-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Get to know the basics of SQL development, including information on the set and value functions and using the WHERE clause.","noIndex":0,"noFollow":0},"content":"SQL is a popular and useful programming language. You can make SQL even more useful if you know the phases of SQL development, the criteria for normal forms, the data types used by SQL, a little bit about set and value functions, as well as some tips on how to filter tables with <a href=\"https://www.dummies.com/programming/php/knowing-the-mysql-where-clause-format/\" target=\"_blank\" rel=\"noopener\">WHERE clauses</a>.","description":"SQL is a popular and useful programming language. You can make SQL even more useful if you know the phases of SQL development, the criteria for normal forms, the data types used by SQL, a little bit about set and value functions, as well as some tips on how to filter tables with <a href=\"https://www.dummies.com/programming/php/knowing-the-mysql-where-clause-format/\" target=\"_blank\" rel=\"noopener\">WHERE clauses</a>.","blurb":"","authors":[{"authorId":9559,"name":"Allen G. Taylor","slug":"allen-g-taylor","description":"Allen G. Taylor is a 40-year veteran of the computer industry and the author of more than 40 books, including SQL For Dummies and Database Development For Dummies. For the latest news on Taylor's activities, check out his online courses (at pioneer-academy1.teachable.com).","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9559"}}],"primaryCategoryTaxonomy":{"categoryId":33608,"title":"SQL","slug":"sql","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33608"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":188699,"title":"SQL Data Types","slug":"sql-data-types","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188699"}},{"articleId":188700,"title":"SQL Criteria for Normal Forms","slug":"sql-criteria-for-normal-forms","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188700"}}],"fromCategory":[{"articleId":260869,"title":"Using SQL Constraints Within Transactions","slug":"using-sql-constraints-within-transactions","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260869"}},{"articleId":260866,"title":"How to Use the SQL Union Join","slug":"how-to-use-the-sql-union-join","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260866"}},{"articleId":260727,"title":"How to Declare a SQL Cursor","slug":"how-to-declare-a-sql-cursor","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260727"}},{"articleId":260720,"title":"What is SQL?","slug":"what-is-sql","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260720"}},{"articleId":260678,"title":"ODBC: Interfacing with SQL Databases","slug":"odbc-interfacing-with-sql-databases","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260678"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281870,"slug":"sql-all-in-one-for-dummies-3rd-edition","isbn":"9781119569619","categoryList":["technology","programming-web-design","sql"],"amazon":{"default":"https://www.amazon.com/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119569613-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/sql-all-in-one-for-dummies-3rd-edition-cover-9781119569619-203x255.jpg","width":203,"height":255},"title":"SQL All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"34913\">Allen G. Taylor</b> is a 40-year veteran of the computer industry and the author of more than 40 books, including <i>SQL For Dummies</i> and <i>Database Development For Dummies</i>. For the latest news on Allen's activities, check out his online courses (at pioneer-academy1.teachable.com) and his blog (at www.allengtaylor.com). You can contact Allen at [email protected] </p>","authors":[{"authorId":34913,"name":"Allen G. Taylor","slug":"allen-g.-taylor","description":" <p><b>Allen G. Taylor</b> is a 30&#45;year veteran of the computer industry and the author of over 40 books, including <b><i>SQL For Dummies</i></b> and <i>Crystal Reports For Dummies.</i> He lectures nationally on databases, innovation, and entrepreneurship. He also teaches database development internationally through a leading online education provider. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/34913"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;sql&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119569619&quot;]}]\" id=\"du-slot-62b36f8244ee4\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;sql&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119569619&quot;]}]\" id=\"du-slot-62b36f824561e\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":188695,"title":"Phases of SQL System Development","slug":"phases-of-sql-system-development","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188695"}},{"articleId":188700,"title":"SQL Criteria for Normal Forms","slug":"sql-criteria-for-normal-forms","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188700"}},{"articleId":188699,"title":"SQL Data Types","slug":"sql-data-types","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188699"}},{"articleId":188693,"title":"SQL Value Functions","slug":"sql-value-functions","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188693"}},{"articleId":188692,"title":"SQL Set Functions","slug":"sql-set-functions","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188692"}},{"articleId":188697,"title":"SQL WHERE Clause Predicates","slug":"sql-where-clause-predicates","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188697"}}],"content":[{"title":"Phases of SQL system development","thumb":null,"image":null,"content":"<p>In developing any system, you start at the beginning and go through to the end, and it&#8217;s no different with SQL. The following list shows you what to consider at each phase of the SQL development lifecycle:</p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\"><b>Definition Phase:</b> Precisely define the problem to be solved, its magnitude, and who will work on it.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Requirements Phase: </b>Develop a detailed description of exactly what the development effort will produce. Gather all relevant information and put it into a requirements document (Statement of Requirements). Get client signoff.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Evaluation Phase:</b> Determine exactly how you will meet the requirements. What tools will you use? How will you deploy your development team? Determine whether the job is doable within time and budget constraints.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Design Phase:</b> Create a database model and then design a database and database application that satisfy the terms of the requirements document.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Implementation Phase:</b> Build the database and the database application. Include copious documentation within the code and in external documents.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Final Documentation and Testing Phase:</b> Give the database and application a tough workout. Hit the system with every conceivable input condition and a few inconceivable ones. Try to overload it. See where it breaks. When it breaks, send it back to the implementers or even back to the designers. Document everything.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Maintenance Phase:</b> Fix latent bugs as they arise. Provide updates and enhancements called for by the client.</p>\n</li>\n</ul>\n"},{"title":"SQL criteria for normal forms","thumb":null,"image":null,"content":"<p>In SQL, normal forms are defining characteristics of relational databases. SQL forms get classified according to the types of modification anomalies they&#8217;re subject to. First, second, and third normal forms (1NF, 2NF, 3NF) serve as remedies to the three main sources of modification anomalies.</p>\n<p>The normal forms are nested in the sense that a table that&#8217;s in 2NF is automatically also in 1NF. Similarly, a table in 3NF is automatically in 2NF, and so on. For most practical applications, putting a database in 3NF is sufficient to ensure a high degree of integrity. To be absolutely sure of its integrity, you must put the database into DK/NF.</p>\n<p>The following lists lay out the criteria for each form:</p>\n<p><b>First Normal Form (1NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Table must be two-dimensional, with rows and columns.</p>\n</li>\n<li>\n<p class=\"first-para\">Each row contains data that pertains to one thing or one portion of a thing.</p>\n</li>\n<li>\n<p class=\"first-para\">Each column contains data for a single attribute of the thing being described.</p>\n</li>\n<li>\n<p class=\"first-para\">Each cell (intersection of row and column) of the table must be single-valued.</p>\n</li>\n<li>\n<p class=\"first-para\">All entries in a column must be of the same kind.</p>\n</li>\n<li>\n<p class=\"first-para\">Each column must have a unique name.</p>\n</li>\n<li>\n<p class=\"first-para\">No two rows may be identical.</p>\n</li>\n<li>\n<p class=\"first-para\">The order of the columns and of the rows does not matter.</p>\n</li>\n</ul>\n<p><b>Second Normal Form (2NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Table must be in first normal form (1NF).</p>\n</li>\n<li>\n<p class=\"first-para\">All non-key attributes (columns) must be dependent on the entire key.</p>\n</li>\n</ul>\n<p><b>Third Normal Form (3NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Table must be in second normal form (2NF).</p>\n</li>\n<li>\n<p class=\"first-para\">Table has no transitive dependencies.</p>\n</li>\n</ul>\n<p><b>Domain-Key Normal Form (DK/NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Every constraint on the table is a logical consequence of the definition of keys and domains.</p>\n</li>\n</ul>\n"},{"title":"SQL data types","thumb":null,"image":null,"content":"<p>Depending on their histories, different SQL implementations support a variety of data types. The SQL specification recognizes nine predefined general types, shown in the lists below</p>\n<p><b>Exact Numerics:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">INTEGER</p>\n</li>\n<li>\n<p class=\"first-para\">SMALLINT</p>\n</li>\n<li>\n<p class=\"first-para\">BIGINT</p>\n</li>\n<li>\n<p class=\"first-para\">NUMERIC</p>\n</li>\n<li>\n<p class=\"first-para\">DECIMAL</p>\n</li>\n<li>DECFLOAT</li>\n</ul>\n<p><b>Approximate Numerics:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">REAL</p>\n</li>\n<li>\n<p class=\"first-para\">DOUBLE PRECISION</p>\n</li>\n<li>\n<p class=\"first-para\">FLOAT</p>\n</li>\n</ul>\n<p><b>Boolean:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">BOOLEAN</p>\n</li>\n</ul>\n<p><b>Character Strings:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">CHARACTER (CHAR)</p>\n</li>\n<li>\n<p class=\"first-para\">CHARACTER VARYING (VARCHAR)</p>\n</li>\n<li>\n<p class=\"first-para\">NATIONAL CHARACTER (NCHAR)</p>\n</li>\n<li>\n<p class=\"first-para\">NATIONAL CHARACTER VARYING (NVARCHAR)</p>\n</li>\n</ul>\n<p><b>Datetimes:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">DATE</p>\n</li>\n<li>\n<p class=\"first-para\">TIME</p>\n</li>\n<li>\n<p class=\"first-para\">TIMESTAMP</p>\n</li>\n<li>\n<p class=\"first-para\">TIME WITH TIMEZONE</p>\n</li>\n<li>\n<p class=\"first-para\">TIMESTAMP WITH TIMEZONE</p>\n</li>\n</ul>\n<p><b>Intervals:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">INTERVAL DAY</p>\n</li>\n<li>\n<p class=\"first-para\">INTERVAL YEAR</p>\n</li>\n</ul>\n<p><b>Large Objects:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">BLOB</p>\n</li>\n<li>\n<p class=\"first-para\">CLOB</p>\n</li>\n</ul>\n<p><b>Collection Types:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">ARRAY</p>\n</li>\n<li>\n<p class=\"first-para\">MULTISET</p>\n</li>\n</ul>\n<p><b>Other Types:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">ROW</p>\n</li>\n<li>\n<p class=\"first-para\">XML</p>\n</li>\n</ul>\n"},{"title":"SQL value functions","thumb":null,"image":null,"content":"<p>These SQL value functions perform operations on data. There are all kinds of operations that could conceivably be performed on data items, but these are some that are needed most often.</p>\n<table>\n<caption>String Value Functions</caption>\n<tbody>\n<tr>\n<th>Function</th>\n<th>Effect</th>\n</tr>\n<tr>\n<td>SUBSTRING</td>\n<td>Extracts a substring from a source string</td>\n</tr>\n<tr>\n<td>SUBSTRING SIMILAR</td>\n<td>Extracts a substring from a source string, using POSIX-based<br />\nregular expressions</td>\n</tr>\n<tr>\n<td>SUBSTRING_REGEX</td>\n<td>Extracts from a string the first occurrence of an XQuery<br />\nregular expression pattern and returns one occurrence of the<br />\nmatching substring</td>\n</tr>\n<tr>\n<td>TRANSLATE_REGEX</td>\n<td>Extracts from a string the first or every occurrence of an<br />\nXQuery regular expression pattern and replaces it or them with an XQuery replacement string</td>\n</tr>\n<tr>\n<td>UPPER</td>\n<td>Converts a character string to all uppercase</td>\n</tr>\n<tr>\n<td>LOWER</td>\n<td>Converts a character string to all lowercase</td>\n</tr>\n<tr>\n<td>TRIM</td>\n<td>Trims off leading or trailing blanks</td>\n</tr>\n<tr>\n<td>TRANSLATE</td>\n<td>Transforms a source string from one character set to<br />\nanother</td>\n</tr>\n<tr>\n<td>CONVERT</td>\n<td>Transforms a source string from one character set to<br />\nanother</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Numeric Value Functions</caption>\n<tbody>\n<tr>\n<th>Function</th>\n<th>Effect</th>\n</tr>\n<tr>\n<td>POSITION</td>\n<td>Returns the starting position of a target string within a<br />\nsource string</td>\n</tr>\n<tr>\n<td>CHARACTER_LENGTH</td>\n<td>Returns the number of characters in a string</td>\n</tr>\n<tr>\n<td>OCTET_LENGTH</td>\n<td>Returns the number of octets (bytes) in a character string</td>\n</tr>\n<tr>\n<td>EXTRACT</td>\n<td>Extracts a single field from a datetime or interval</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Datetime Value Functions</caption>\n<tbody>\n<tr>\n<th>Function</th>\n<th>Effect</th>\n</tr>\n<tr>\n<td>CURRENT_DATE</td>\n<td>Returns the current date</td>\n</tr>\n<tr>\n<td>CURRENT_TIME(p)</td>\n<td>Returns the current time; (p) is precision of seconds</td>\n</tr>\n<tr>\n<td>CURRENT_TIMESTAMP(p)</td>\n<td>Returns the current date and the current time; (p) is precision of seconds</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"SQL set functions","thumb":null,"image":null,"content":"<p>The SQL set functions give you a quick answer to questions you may have about the characteristics of your data as a whole. How many rows does a table have? What is the highest value in the table? What is the lowest? These are the kinds of questions that the SQL set functions can answer for you.</p>\n<table width=\"586\">\n<tbody>\n<tr>\n<td width=\"181\">Function</td>\n<td width=\"399\">Effect</td>\n</tr>\n<tr>\n<td width=\"181\"><code>COUNT</code></td>\n<td width=\"399\">Returns the number of rows in the specified table</td>\n</tr>\n<tr>\n<td width=\"181\"><code>MAX</code></td>\n<td width=\"399\">Returns the maximum value that occurs in the specified able</td>\n</tr>\n<tr>\n<td width=\"181\"><code>MIN</code></td>\n<td width=\"399\">Returns the minimum value that occurs in the specified table</td>\n</tr>\n<tr>\n<td width=\"181\"><code>SUM</code></td>\n<td width=\"399\">Adds up the values in a specified column</td>\n</tr>\n<tr>\n<td width=\"181\"><code>AVG</code></td>\n<td width=\"399\">Returns the average of all the values in the specified column</td>\n</tr>\n<tr>\n<td width=\"181\"><code>LISTAGG</code></td>\n<td width=\"399\">Transforms values from a group of rows into a delimited string</td>\n</tr>\n</tbody>\n</table>\n<h2><span style=\"color: #000000; font-family: Arial Black;\">Trigonometric and Logarithmic Functions</span></h2>\n<p><code>sin</code>, <code>cos</code>, <code>tan</code>, <code>asin</code>, <code>acos</code>, <code>atan</code>, <code>sinh</code>, <code>cosh</code>, <code>tanh</code>, <code>log(&lt;base&gt;, &lt;value&gt;)</code>, <code>log10(&lt;value&gt;)</code>. <code>ln( &lt;value&gt;)</code></p>\n<h2><span style=\"color: #000000; font-family: Arial Black;\">JSON Constructor Functions</span></h2>\n<p><code>JSON_OBJECT</code></p>\n<p><code>JSON_ARRAY</code></p>\n<p><code>JSON_OBJECTAGG</code></p>\n<p><code>JSON_ARRAYAGG</code></p>\n<h2><span style=\"color: #000000; font-family: Arial Black;\">JSON Query Functions</span></h2>\n<p><code>JSON_EXISTS</code></p>\n<p><code>JSON_VALUE</code></p>\n<p><code>JSON_QUERY</code></p>\n<p><code>JSON_TABLE</code></p>\n"},{"title":"SQL WHERE clause predicates","thumb":null,"image":null,"content":"<p>Predicates boil down to either a TRUE or a FALSE result. You can filter out unwanted rows from the result of an SQL query by applying a WHERE clause whose predicate excludes the unwanted rows.</p>\n<table border=\"0\">\n<caption>Comparison Predicates    </caption>\n<tbody>\n<tr>\n<td>=</td>\n<td>Equal</td>\n</tr>\n<tr>\n<td>&lt;&gt;</td>\n<td>Not equal</td>\n</tr>\n<tr>\n<td>&lt;</td>\n<td>Less than</td>\n</tr>\n<tr>\n<td>&lt;=</td>\n<td>Less than or equal</td>\n</tr>\n<tr>\n<td>&gt;</td>\n<td>Greater than</td>\n</tr>\n<tr>\n<td>&gt;=</td>\n<td>Greater than or equal</td>\n</tr>\n</tbody>\n</table>\n<table border=\"0\">\n<caption>Other Predicates    </caption>\n<tbody>\n<tr>\n<td>ALL</td>\n<td>BETWEEN</td>\n</tr>\n<tr>\n<td>DISTINCT</td>\n<td>EXISTS</td>\n</tr>\n<tr>\n<td>IN</td>\n<td>LIKE</td>\n</tr>\n<tr>\n<td>MATCH</td>\n<td>NOT IN</td>\n</tr>\n<tr>\n<td>NOT LIKE</td>\n<td>NULL</td>\n</tr>\n<tr>\n<td>OVERLAPS</td>\n<td>SOME, ANY</td>\n</tr>\n<tr>\n<td>UNIQUE</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"One year","lifeExpectancySetFrom":"2022-03-09T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":208690},{"headers":{"creationTime":"2018-04-15T23:07:07+00:00","modifiedTime":"2022-04-20T20:53:15+00:00","timestamp":"2022-06-22T19:37:38+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"Virtual & Augmented Reality For Dummies Cheat Sheet","strippedTitle":"virtual & augmented reality for dummies cheat sheet","slug":"virtual-augmented-reality-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Virtual and augmented reality are rapidly changing fields, so learn where they are today and where they may be headed in the future.","noIndex":0,"noFollow":0},"content":"The terms <em>virtual reality</em> and <em>augmented reality</em> (and others, like <em>mixed reality</em> and <em>extended reality</em>) are thrown about everywhere today, but do you really know what they mean? Virtual and augmented reality are rapidly changing fields, so it helps to know where they are today and where they may be headed in the future. Finally, seeing how virtual and augmented reality are being used in a variety of industries and how exactly you can experience these technologies is key to your enjoyment.","description":"The terms <em>virtual reality</em> and <em>augmented reality</em> (and others, like <em>mixed reality</em> and <em>extended reality</em>) are thrown about everywhere today, but do you really know what they mean? Virtual and augmented reality are rapidly changing fields, so it helps to know where they are today and where they may be headed in the future. Finally, seeing how virtual and augmented reality are being used in a variety of industries and how exactly you can experience these technologies is key to your enjoyment.","blurb":"","authors":[{"authorId":11302,"name":"Paul Mealy","slug":"paul-mealy","description":" <p><b>Paul Mealy</b> has worked with virtual reality since the release of the Oculus Rift DK1 in 2013. He has architected, designed and developed applications for Oculus Rift, HTC Vive, Samsung Gear VR, Windows Mixed Reality, Google Daydream, and Google Cardboard. He has worked with numerous augmented reality hardware and technologies including the Microsoft HoloLens, ARKit for iOS, ARCore for Android and cross&#45;platform solutions such as Vuforia. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/11302"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":256467,"title":"Augmented Reality App Design: Starting Up and User Environment","slug":"augmented-reality-app-design-starting-up-and-user-environment","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/256467"}},{"articleId":256462,"title":"Designing Augmented Reality Apps: Comfort Zones, Interfaces, and Text","slug":"designing-augmented-reality-apps-comfort-zones-interfaces-and-text","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/256462"}},{"articleId":256456,"title":"Designing Augmented Reality Apps: Interacting with Objects","slug":"designing-augmented-reality-apps-interacting-with-objects","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/256456"}},{"articleId":256447,"title":"Best Practices and Virtual Reality Design Principles","slug":"best-practices-and-virtual-reality-design-principles","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/256447"}},{"articleId":256440,"title":"Virtual Reality Design Principles: Starting Up, User Attention, and Comfort Zones","slug":"virtual-reality-design-principles-starting-up-user-attention-and-comfort-zones","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/256440"}}],"fromCategory":[{"articleId":265680,"title":"Tips for Improving Engineering Performance with DevOps","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"Make More of Your Cloud Tools: Automating DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"Choosing the Best Cloud Service Provider, Features, and Tools for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}},{"articleId":265656,"title":"Moving to DevOps Processes: From a Line to a Circuit","slug":"moving-to-devops-processes-from-a-line-to-a-circuit","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265656"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281887,"slug":"virtual-augmented-reality-for-dummies","isbn":"9781119481348","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1119481341/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119481341/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119481341-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119481341/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119481341/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/virtual-and-augmented-reality-for-dummies-cover-9781119481348-203x255.jpg","width":203,"height":255},"title":"Virtual & Augmented Reality For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"11302\">Paul Mealy</b> has worked with virtual reality since the release of the Oculus Rift DK1 in 2013. He has architected, designed and developed applications for Oculus Rift, HTC Vive, Samsung Gear VR, Windows Mixed Reality, Google Daydream, and Google Cardboard. He has worked with numerous augmented reality hardware and technologies including the Microsoft HoloLens, ARKit for iOS, ARCore for Android and cross-platform solutions such as Vuforia. </p>","authors":[{"authorId":11302,"name":"Paul Mealy","slug":"paul-mealy","description":" <p><b>Paul Mealy</b> has worked with virtual reality since the release of the Oculus Rift DK1 in 2013. He has architected, designed and developed applications for Oculus Rift, HTC Vive, Samsung Gear VR, Windows Mixed Reality, Google Daydream, and Google Cardboard. He has worked with numerous augmented reality hardware and technologies including the Microsoft HoloLens, ARKit for iOS, ARCore for Android and cross&#45;platform solutions such as Vuforia. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/11302"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119481348&quot;]}]\" id=\"du-slot-62b36f8209ef2\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119481348&quot;]}]\" id=\"du-slot-62b36f820a66d\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":251717,"title":"What Are Virtual Reality, Augmented Reality, Mixed Reality, and Extended Reality?","slug":"virtual-reality-augmented-reality-mixed-reality-extended-reality","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251717"}},{"articleId":251720,"title":"The Current State of Virtual and Augmented Reality","slug":"current-state-virtual-augmented-reality","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251720"}},{"articleId":251723,"title":"Consuming Virtual and Augmented Reality","slug":"consuming-virtual-augmented-reality","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251723"}},{"articleId":251726,"title":"Virtual and Augmented Reality Use Cases","slug":"virtual-augmented-reality-use-cases","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251726"}},{"articleId":251729,"title":"The Future of Virtual and Augmented Reality","slug":"future-virtual-augmented-reality","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/251729"}}],"content":[{"title":"What are virtual reality, augmented reality, mixed reality, and extended reality?","thumb":null,"image":null,"content":"<p>If you’ve been paying attention to the tech world recently, you’ve likely heard a number of new terms being thrown around — <em>virtual reality, augmented reality, extended reality,</em> and <em>mixed reality</em> — and you may have wondered what they mean. To help make sense of it all, here’s a breakdown of each of those terms, how they’re alike, and how they’re different.</p>\n<ul>\n<li><strong>Virtual reality (VR): </strong>A computer-simulated reality that simulates a fully artificial environment that does not physically exist. Users within VR are closed off from the real world. Consumer VR executions typically consist of a headset and some sort of controller.</li>\n<li><strong>Augmented reality (AR):</strong> A way of viewing the real world in which your view of the real world is “augmented” by computer-generated input, such as still images, audio, or video. AR differs from VR in that AR <em>augments</em> (adds to) a real-world scene, instead of creating something from scratch. AR headsets aren’t quite commonplace yet, but you may have an AR device in your pocket: Newer generations of both iOS and Android devices have been enabled with AR capabilities.</li>\n<li><strong>Mixed reality (MR):</strong> MR may take your view of the real world and integrate computer-generated content that can interact with that view of the real world. Or it may take a fully digital environment and connect it to real-world objects. In this way, MR can sometimes function similarly to VR and sometimes function similarly to AR. You’ll often hear the terms being used interchangeably, which can be confusing. Here’s a quick glance at the differences.</li>\n</ul>\n<p style=\"padding-left: 30px;\">In MR, you may have a view of the real world, and a digital basketball may appear to bounce off the real world floor and walls, or a digital rocket ship may appear to land on your coffee table. This is AR-based MR, and you’ll often just hear these experiences referred to as AR.</p>\n<p style=\"padding-left: 30px;\">In other MR instances, you may only see a completely digital environment with no view of the real world, but that digital environment is connected to real-world objects around you. In your virtual world, real-world tables or chairs may digitally appear as rocks or trees. Real-world office walls may appear as moss-covered cave walls. This is VR-based MR, sometimes called <em>augmented virtuality.</em></p>\n<p style=\"padding-left: 30px;\">Mixed reality is gaining traction in the industry, especially AR-based mixed reality. Remember that it is not uncommon for the terms <em>augmented reality</em> and <em>mixed reality</em> to be used synonymously.</p>\n<ul>\n<li><strong>Extended reality (XR): </strong>The umbrella term used for all these technologies. It can cover everything from VR to MR to AR technologies. People sometimes use the term <em>virtual reality</em> to refer to all of the above, but the correct umbrella term is <em>extended reality.</em></li>\n</ul>\n"},{"title":"The current state of virtual and augmented reality","thumb":null,"image":null,"content":"<p>Virtual reality (VR) and augmented reality (AR) have some similar core technologies but differ in a number of ways. These differences have likely contributed to their current state of technological maturity.</p>\n<p>Neither technology has advanced far enough to be considered “mature,” but VR has made large strides over the past few years. VR has seen the release of a large number of headsets for mass consumption, from low-cost devices powered by users’ mobile devices to high-end headsets that require a large amount of external computing power. VR has reached a decent consumer install base, VR consumer software is easy to come by, and we’re rapidly approaching what could be considered the second generation of consumer-based VR headsets.</p>\n<p>AR, on the other hand, is still fairly new technology. AR headsets exist, but they are all fairly expensive, are limited in number, and generally focus on release for developers or enterprise rather than for mass consumption. VR’s form factor appears to be generally set, but how AR will be experienced isn’t quite settled yet.</p>\n<p>AR does have a unique option: Both Apple and Google have released technologies (ARKit and ARCore, respectively) that allow consumers to experience smaller, mobile-device AR experiences. These technologies allow users to view the real world via their mobile-device cameras and augment those cameras’ video with digital holograms. Device restrictions such as the small video window and having to hold the device make mobile-based AR a less than optimal experience, but it’s a good introduction for most users as to just what AR is.</p>\n"},{"title":"Consuming virtual and augmented reality","thumb":null,"image":null,"content":"<p>Options for consuming content are readily available for virtual reality (VR). VR devices cover a spectrum from high-end options to low-end options to everything in between, with more devices being released every day.</p>\n<p>High-end consumption devices for VR include headsets such as the HTC Vive, the Oculus Rift, or Windows Mixed Reality headsets. These options all require powerful external hardware to power the headset experience and include options such as a “room-scale” experience, or the ability to move around in physical space and have that movement translated into the virtual environment. Midrange options for VR consumption include headsets such as the Samsung Gear VR or Google Daydream. These VR headsets are powered by higher-end mobile devices. They allow users to look around in VR, but not physically move about as if a user were there. Google Cardboard is an example of a low-end VR device. Released as a low-cost way of democratizing VR, almost any reasonably powerful mobile device can run the Google Cardboard software. Unlike the midrange VR options, user input in Google Cardboard devices is extremely limited.</p>\n<p>Augmented reality (AR) devices such as headsets or goggles remain beyond most consumer budgets for now. High-end AR devices such as the Microsoft HoloLens, the Meta 2, or the upcoming Magic Leap One are targeted toward enterprise customers or developers only. We’re likely a generation or two of AR devices away before we can expect to see AR headsets released to consumers, though you may encounter some devices being utilized in commercial settings. There are also a few potential “midrange” AR headsets such as the Mira Prism that are powered by users’ mobile devices. These headsets are currently targeted toward developers but may see release to consumers in the near future.</p>\n<p>Many consumers can experience a lower-end AR experience right now, however. Newer iOS and Android mobile devices come equipped with AR capabilities. Simply searching either the Apple App Store or Google Play Store for “ARKit” or “ARCore,” respectively, will reveal a large number of applications built specifically for AR experiences on mobile devices. For example, the <em>New York Times</em> mobile app allows users to browse news stories featuring augmented content, and Amazon’s ARView allows users to place digital holograms in their physical spaces and walk around them as if they were truly there.</p>\n"},{"title":"Virtual and augmented reality use cases","thumb":null,"image":null,"content":"<p>Virtual reality (VR) and augmented reality (AR) have a large number of use cases spread across any number of industries. VR lends itself readily to the entertainment industry.</p>\n<p>VR has very strong roots in gaming. Gamers tend to be early technology adopters. Plus, they often have the powerful computer systems needed to run the highest-end VR headsets. But VR is not limited to gaming and entertainment. VR has made inroads into the education market. Classrooms have utilized VR applications such as Google Expeditions to facilitate virtual field trips or applications such as <a href=\"https://www.with.in/watch/clouds-over-sidra\" target=\"_blank\" rel=\"noopener\">Clouds Over Sidra</a> to educate on events as far ranging as the Syrian refugee crisis. VR has found inroads in the art world as a tool to create and educate, the healthcare industry to train surgeons and treat psychological issues, and the retail industry to advertise and shop in new ways. Name an industry, and VR likely has an applicable use case.</p>\n<p>AR is similar, though the maturity level of the technology means consumer use cases are a bit fewer and further between as AR focuses on enterprise-level executions. These enterprise-level executions cover a gamut of uses:</p>\n<ul>\n<li>Industrial applications for training workers on the factory floor for steps to utilize equipment or display via digital holograms where to find various parts in a physical warehouse</li>\n<li>Entertainment applications where users battle digital holograms projected into real-world space</li>\n<li>Utility applications for connecting users and allowing them to work in a shared virtual 3D space projected into a real-world environment</li>\n</ul>\n<p>That’s not to say consumers are left out in the cold. Apple’s and Google’s release of ARKit and ARCore, respectively, mean mobile executions for retail (such as Ikea’s Place app, which allows you to preview full-size digital holograms of Ikea furniture) and utility applications such as Google Translate (which can translate images of more than 30 different languages on the fly through your mobile device’s camera) can be utilized by anyone with a supported mobile device.</p>\n"},{"title":"The future of virtual and augmented reality","thumb":null,"image":null,"content":"<p>The future of virtual reality (VR) and augmented reality (AR) looks to be an interesting one. Although both VR and AR have been utilized in small doses in various industries in the past, both have experienced a resurgence in interest both publicly and within commercial industries in the past few years. VR rose to public prominence with the Kickstarter release of the Oculus Development Kit 1 in 2013, and AR saw a large boost with the announced releases of ARKit and ARCore in late 2017.</p>\n<p>VR is further ahead in its product development life cycle than AR. It has seen hardware releases directly to the mass consumer market, and many headset manufacturers have released their plans for the second generation of VR devices. The first generation of VR devices, especially the high-end devices, have been lauded by critics and consumers for the level of immersive experience they can provide. However, adoption by consumers was focused far more on the lower-end VR devices, due in part to high costs and the newness of the technology. That has yet to dull manufacturers’ push for VR adoption. At the Oculus Connect conference in October 2017, Facebook CEO Mark Zuckerberg said, “We’re setting a goal: We want to get a billion people in virtual reality.” A lofty goal. Only time will tell if such a goal is truly attainable, but many experts see VR as having the potential to hit mass adoption levels within the next two to five years.</p>\n<p>AR is trending behind VR. The technological challenges of augmenting real-world environments are many: realistic digital display, comfortable wearable computing power, world-sensing technology, and so on. And AR needs to be able to handle all these potential speed bumps at a price attainable for consumers in order to hit mass adoption numbers. But like VR, AR has its share of advocates in high places. “We believe augmented reality is going to change the way we use technology forever,” claimed Apple CEO Tim Cook in a 2017 call with analysts. “We’re already seeing things that will transform the way you work, play, connect, and learn. Augmented reality is going to change everything.”</p>\n<p>With the challenges AR faces, technology research predictions put AR’s adoption level further out than that of VR. Most analysts see AR’s mainstream adoption somewhere between five to ten years out. In the meantime, however, many expect to see AR make large inroads into enterprise sectors such as industrial and commercial industries, where utilizing AR promises to save industries time and money by minimizing costly errors and mistakes.</p>\n<p>No one knows for sure just how big the VR and AR markets will be, but many research firms predict a combined market cap of up to $150 billion for VR and AR by 2021, potentially with AR leading the way — an interesting development for a technology that started “behind” VR.</p>\n<p>No one can predict just how explosive growth for VR and AR will be, but the future of both these technologies appears promising.</p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Explore","lifeExpectancy":"One year","lifeExpectancySetFrom":"2022-04-20T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":251732},{"headers":{"creationTime":"2018-02-01T03:45:03+00:00","modifiedTime":"2022-04-20T18:48:57+00:00","timestamp":"2022-06-22T19:37:37+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"PHP, MySQL & JavaScript All-in-One For Dummies Cheat Sheet","strippedTitle":"php, mysql & javascript all-in-one for dummies cheat sheet","slug":"php-mysql-javascript-one-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Learn how to extract data in your PHP programs, filter out data from web forms, and quickly find data stored in your MySQL database.","noIndex":0,"noFollow":0},"content":"Working with PHP, MySQL, and JavaScript to create dynamic web applications can be difficult, but if you know a few programming tricks, you can make that job a lot easier. This Cheat Sheet shows you how to extract data from different databases in your PHP programs, filter out unwanted or potentially dangerous data from web forms, quickly find data stored in your MySQL database, and trigger timed events in your JavaScript programs.","description":"Working with PHP, MySQL, and JavaScript to create dynamic web applications can be difficult, but if you know a few programming tricks, you can make that job a lot easier. This Cheat Sheet shows you how to extract data from different databases in your PHP programs, filter out unwanted or potentially dangerous data from web forms, quickly find data stored in your MySQL database, and trigger timed events in your JavaScript programs.","blurb":"","authors":[{"authorId":10600,"name":"Richard Blum","slug":"richard-blum","description":" <p><b>Richard Blum</b> has more than 30 years of experience as a systems administrator and programmer. He teaches online courses in PHP, JavaScript, HTML5, and CSS3 programming, and authored the latest edition of <i>Linux For Dummies</i>. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/10600"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":253381,"title":"Using XMLHttpRequest Class Properties","slug":"using-xmlhttprequest-class-properties","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253381"}},{"articleId":253378,"title":"Making Sure Your MySQL Database is ACID Compliant","slug":"making-sure-mysql-database-acid-compliant","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253378"}},{"articleId":253374,"title":"MySQL Features","slug":"mysql-features","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253374"}},{"articleId":253362,"title":"How to Set Cookies with PHP","slug":"set-cookies-php","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253362"}},{"articleId":253250,"title":"What are Accessor Magic Methods in PHP?","slug":"accessor-magic-methods-php","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/253250"}}],"fromCategory":[{"articleId":265680,"title":"Tips for Improving Engineering Performance with DevOps","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"Make More of Your Cloud Tools: Automating DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"Choosing the Best Cloud Service Provider, Features, and Tools for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}},{"articleId":265656,"title":"Moving to DevOps Processes: From a Line to a Circuit","slug":"moving-to-devops-processes-from-a-line-to-a-circuit","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265656"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281821,"slug":"php-mysql-javascript-all-in-one-for-dummies","isbn":"9781119468387","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1119468388/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119468388/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119468388-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119468388/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119468388/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/php-mysql-and-javascript-all-in-one-for-dummies-cover-9781119468387-203x255.jpg","width":203,"height":255},"title":"PHP, MySQL, & JavaScript All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"10600\">Richard Blum</b> has more than 30 years of experience as a systems administrator and programmer. He teaches online courses in PHP, JavaScript, HTML5, and CSS3 programming, and authored the latest edition of <i>Linux For Dummies</i>. </p>","authors":[{"authorId":10600,"name":"Richard Blum","slug":"richard-blum","description":" <p><b>Richard Blum</b> has more than 30 years of experience as a systems administrator and programmer. He teaches online courses in PHP, JavaScript, HTML5, and CSS3 programming, and authored the latest edition of <i>Linux For Dummies</i>. ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/10600"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119468387&quot;]}]\" id=\"du-slot-62b36f81a8460\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119468387&quot;]}]\" id=\"du-slot-62b36f81a8cf0\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":249463,"title":"Using the PHP Database Object Library Functions","slug":"using-php-database-object-library-functions","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/249463"}},{"articleId":249466,"title":"Filtering Data in PHP","slug":"filtering-data-php","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/249466"}},{"articleId":249471,"title":"Using Regular Expressions in MySQL","slug":"using-regular-expressions-mysql","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/249471"}},{"articleId":249474,"title":"Working with Timers in JavaScript","slug":"working-timers-javascript","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/249474"}}],"content":[{"title":"Using the PHP database object library functions","thumb":null,"image":null,"content":"<p>When you know your application will run in a MySQL environment, it makes sense to use the php_mysqli library functions to interact with the database. However, there may come a time when you want to write an application that can work using other databases as well. PHP supports quite a few database libraries, each of which interacts with a specific database server. The downside, though, is that you&#8217;d need to create a different version of your application for each database server.</p>\n<p>Alternatively, you can use the PHP Database Object (PDO) library functions. PDO allows you to use the same code to interact with any type of underlying database server. You just need to specify the database server used for the connection, and PDO does the rest!</p>\n<p>To open a PDO connection to a database, you instantiate a PDO object:</p>\n<p><code>$con = new PDO(</code></p>\n<p><code>\"mysql:host=localhost;dbname=<em>mydata</em>;charset=utf8',</code></p>\n<p><code>'<em>username</em>', '<em>password</em>');</code></p>\n<p>The databases your application can connect to depends on which PDO database drivers are loaded in the PHP server. To determine which drivers are available, use the <code>getAvailableDrivers()</code> static method:</p>\n<p><code>$list = PDO::getAvailableDrivers();</code></p>\n<p><code>foreach ($list as $db) {<br />\n</code><br />\n<code>echo \"$db&lt;br&gt;\\n\";</code></p>\n<p><code>}</code></p>\n<p>After you connect to the database, to submit a simple query, use the <code>query()</code> method:</p>\n<p><code>$query = \"SELECT bidderid, lastname, firstname, address</code></p>\n<p><code>FROM bidders\";</code></p>\n<p><code>foreach($con-&gt;query($query) as $row) {</code></p>\n<p><code>$bidderid = $row['bidderid'];<br />\n</code><br />\n<code>$lastname = $row['lastname'];</code></p>\n<p><code>$firstname = $row['firstname'];<br />\n</code><br />\n<code>$address = $row['address'];</code></p>\n<p><code>echo \"$bidderid - $lastname, $firstname&lt;br&gt;$adress&lt;br&gt;&lt;br&gt;\\n\";</code></p>\n<p><code>}</code></p>\n<p>Unlike the php_mysqli library, the PDO library <code>query() </code>method returns the actual data records from the result set. You don&#8217;t need to fetch the results. Each time you call the <code>query() </code>method, it returns the next data record from the result set.</p>\n<p>You can also use prepared statements with the PDO library to help filter input data:</p>\n<p><code>$sql = \"INSERT INTO bidders (bidderid, lastname,</code></p>\n<p><code>firstname, address) VALUES (?, ?, ?, ?)\";</code></p>\n<p><code>$stmt = $con-&gt;prepare($sql);</code></p>\n<p><code>$stmt-&gt;bindParam(1, 100, PDO::PARAM_INT);</code></p>\n<p><code>$stmt-&gt;bindParam(2, 'Blum', PDO::PARAM_STR);</code></p>\n<p><code>$stmt-&gt;bindParam(3, 'Rich', PDO::PARAM_STR);</code></p>\n<p><code>$stmt-&gt;bindParam(4, \"123 Main St.; Chicago, IL 60633\",</code></p>\n<p><code>PDO::PARAM_STR);</code></p>\n<p><code>$stmt-&gt;execute();</code></p>\n<p>Using this method, you can submit multiple data records by binding each data set to the prepared statement and executing them individually.</p>\n<p>With the PDO library, you can now write a single application that will work with any underlying database server your customers need to use!</p>\n"},{"title":"Filtering data in PHP","thumb":null,"image":null,"content":"<p>Validating input data is crucial to any PHP application. You don&#8217;t want an attacker trying to attack your system by submitting improper form data. Fortunately, the PHP developers have provided some help with that process.</p>\n<p>PHP provides several filter functions that allow you to easily check for valid data or sanitize the data if any unwanted data is present. The following table lists the different functions available in the filter family.</p>\n<table>\n<caption>The PHP Filter Functions</caption>\n<tbody>\n<tr>\n<td width=\"293\"><strong>Function</strong></td>\n<td width=\"445\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"293\"><code>filter_has_var()</code></td>\n<td width=\"445\">Checks if a variable of the specified type exists</td>\n</tr>\n<tr>\n<td width=\"293\"><code>filter_id()</code></td>\n<td width=\"445\">Returns the filter ID of the specified filter</td>\n</tr>\n<tr>\n<td width=\"293\"><code>filter_input()</code></td>\n<td width=\"445\">Retrieves a value passed by GET, POST, sessions, or cookies and filters it</td>\n</tr>\n<tr>\n<td width=\"293\"><code>filter_input_array()</code></td>\n<td width=\"445\">Retrieves multiple values passed to the PHP program and filters them</td>\n</tr>\n<tr>\n<td width=\"293\"><code>filter_list()</code></td>\n<td width=\"445\">Returns a list of supported filters</td>\n</tr>\n<tr>\n<td width=\"293\"><code>filter_var()</code></td>\n<td width=\"445\">Filters a variable</td>\n</tr>\n<tr>\n<td width=\"293\"><code>filter_var_array()</code></td>\n<td width=\"445\">Filters a list of variables</td>\n</tr>\n</tbody>\n</table>\n<p>These functions allow you to specify a variable to check and the type of check to perform. There are two main groups of filter:</p>\n<ul>\n<li><strong>Validation:</strong> Checks if the specified data is present</li>\n<li><strong>Sanitation:</strong> Checks if the specified data is present and removes it</li>\n</ul>\n<p>The following table shows the different validation filters available.</p>\n<table>\n<caption>PHP Validation Filters</caption>\n<tbody>\n<tr>\n<td width=\"369\"><strong>Filter</strong></td>\n<td width=\"369\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"369\"><code>FILTER_VALIDATE_BOOLEAN</code></td>\n<td width=\"369\">Checks for a valid Boolean value</td>\n</tr>\n<tr>\n<td width=\"369\"><code>FILTER_VALIDATE_EMAIL</code></td>\n<td width=\"369\">Checks for a valid email address</td>\n</tr>\n<tr>\n<td width=\"369\"><code>FILTER_VALIDATE_FLOAT</code></td>\n<td width=\"369\">Checks for a valid float value</td>\n</tr>\n<tr>\n<td width=\"369\"><code>FILTER_VALIDATE_INT</code></td>\n<td width=\"369\">Checks for a valid integer value</td>\n</tr>\n<tr>\n<td width=\"369\"><code>FILTER_VALIDATE_IP</code></td>\n<td width=\"369\">Checks for a valid IP address value</td>\n</tr>\n<tr>\n<td width=\"369\"><code>FILTER_VALIDATE_REGEXP</code></td>\n<td width=\"369\">Checks for a valid regular expression value</td>\n</tr>\n<tr>\n<td width=\"369\"><code>FILTER_VALIDATE_URL</code></td>\n<td width=\"369\">Checks for a valid URL string</td>\n</tr>\n</tbody>\n</table>\n<p>The validation checks return a <code>TRUE </code>value if the data contains the data type being checked, or a <code>FALSE </code>value if not.</p>\n<p>The following table shows the different sanitation filters available.</p>\n<table>\n<caption>PHP Sanitation Filters</caption>\n<tbody>\n<tr>\n<td width=\"362\"><strong>Filter</strong></td>\n<td width=\"377\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_EMAIL</code></td>\n<td width=\"377\">Removes illegal characters from an email address</td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_ENCODED</code></td>\n<td width=\"377\">Encodes special characters in the string</td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_MAGIC_QUOTES</code></td>\n<td width=\"377\">Apply the <code>addslashes()</code> function</td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_NUMBER_FLOAT</code></td>\n<td width=\"377\">Remove all characters, except digits, +, –, and <code>E</code></td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_NUMBER_INT</code></td>\n<td width=\"377\">Removes all characters except digits and + or –</td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_SPECIAL_CHARS</code></td>\n<td width=\"377\">Removes any special characters in the string</td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_FULL_SPECIAL_CHARS</code></td>\n<td width=\"377\">Same as <code>htmlspecialchars()</code></td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_STRING</code></td>\n<td width=\"377\">Removes HTML tags and special characters from a string</td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_STRIPPED</code></td>\n<td width=\"377\">Same as <code>FILTER_SANITIZE_STRING</code></td>\n</tr>\n<tr>\n<td width=\"362\"><code>FILTER_SANITIZE_URL</code></td>\n<td width=\"377\">Removes all illegal characters from a URL string</td>\n</tr>\n</tbody>\n</table>\n<p>You can combine both the sanitizing and validating features in your code to ensure the data you receive from an HTML form is valid:</p>\n<p><code>$address = $_POST['email'];</code></p>\n<p><code>$address = filter_var($address, FILTER_SANITIZE_EMAIL);<br />\n</code><br />\n<code>if (!filter_var($address, FILTER_VALIDATE_EMAIL)) {</code></p>\n<p><code>echo \"&lt;h2&gt;Sorry, you have entered an incorrect address&lt;/h2\";</code></p>\n<p><code>} else {</code></p>\n<p><code>echo \"&lt;h2&gt;Thank you for submitting your data&lt;/h2&gt;\";</code></p>\n<p><code>}</code></p>\n<p>Using the PHP filter functions will help you safely process any type of input data received in your application HTML forms.</p>\n"},{"title":"Using regular expressions in MySQL","thumb":null,"image":null,"content":"<p>Searching for data in a MySQL <code>SELECT </code>statement means incorporating a <code>WHERE </code>clause. It&#8217;s easy to search for a single item:</p>\n<p><code>SELECT prodid, product WHERE prodid = 100;</code></p>\n<p>What gets tricky is if you need to search for an item based on search pattern. MySQL uses the <code>LIKE </code>clause to help out with that:</p>\n<p><code>SELECT prodid, product WHERE product LIKE 'apple%';</code></p>\n<p>The percent sign works as a wildcard character, matching zero or more characters in the string. So this will return <code>apples</code>, as well as <code>apple juice</code>.</p>\n<p>The wildcard character in the LIKE operator is handy, but it&#8217;s somewhat limited. A more advanced way of searching for data is using a <em>regular expression</em> pattern match. Regular expressions use their own language to define a template used to match data patterns.</p>\n<p>MySQL supports regular expressions using the <code>REGEXP </code>operator. You specify the matching pattern similar to how you do it with the <code>LIKE </code>operator:</p>\n<p><code>SELECT prodid, product WHERE product REGEXP 'apple';</code></p>\n<p>In the regular expression, by default any text you enter is matched anywhere in the data field. So, this query will return <code>apple</code>, <code>apple juice</code>, or <code>candy apple</code>.</p>\n<p>You can specify exactly where in the string the text pattern should appear by using anchor characters. The caret character (<code>^</code>) indicates the start of the string. So, the following query matches only <code>apple </code>and <code>apple juice</code>:</p>\n<p><code>SELECT prodid, product WHERE product REGEXP '^apple';</code></p>\n<p>The dollar sign indicates the end of the string and would return <code>apple </code>or <code>candy apple</code>:</p>\n<p><code>SELECT prodid, product WHERE product REGEXP 'apple$';</code></p>\n<p>The MySQL regular expression languages uses lots of special characters to define the matching template. The following table shows the more popular ones.</p>\n<table>\n<caption>The MySQL Regular Expression Characters</caption>\n<tbody>\n<tr>\n<td width=\"129\"><strong>Character</strong></td>\n<td width=\"609\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"129\"><code>^string</code></td>\n<td width=\"609\">Matches the text at the beginning of the string</td>\n</tr>\n<tr>\n<td width=\"129\"><code>string$</code></td>\n<td width=\"609\">Matches the text at the end of the string</td>\n</tr>\n<tr>\n<td width=\"129\"><code>.</code></td>\n<td width=\"609\">Matches any single character (including special characters)</td>\n</tr>\n<tr>\n<td width=\"129\"><code>a*</code></td>\n<td width=\"609\">Matches the sequence of zero or more of the specified character</td>\n</tr>\n<tr>\n<td width=\"129\"><code>a+</code></td>\n<td width=\"609\">Matches the sequence of one or more of the specified character</td>\n</tr>\n<tr>\n<td width=\"129\"><code>a?</code></td>\n<td width=\"609\">Matches zero or one occurrence of the specified character</td>\n</tr>\n<tr>\n<td width=\"129\"><code>abc|def</code></td>\n<td width=\"609\">Matches either one of the specified strings</td>\n</tr>\n<tr>\n<td width=\"129\"><code>[abc]</code></td>\n<td width=\"609\">Matches any one of the specified characters</td>\n</tr>\n</tbody>\n</table>\n<p>With the <code>LIKE </code>and <code>REGEXP </code>operators in the <code>WHERE </code>clause, you can customize your <code>SELECT </code>statement to look for just about any type of data that you need for your application!</p>\n"},{"title":"Working with timers in JavaScript","thumb":null,"image":null,"content":"<p>Often you&#8217;ll run into a situation where you need to trigger an event dynamically in a web page, without the website visitor doing anything. JavaScript provides two simple functions that allow you to schedule an event to trigger at a preselected time.</p>\n<p>The <code>setTimeout() </code>function allows you to schedule a specified function to trigger at a specific time from the current time:</p>\n<p><code>setTimeout(<em>function</em>, <em>time</em>);</code></p>\n<p>The <code>function </code>parameter specifies the name of the function to trigger, while the <code>time </code>parameter specifies the amount of time (in milliseconds) for the browser to wait until triggering the function. An example would be the following, which triggers the <code>myfunction()</code> function after waiting five seconds:</p>\n<p><code>setTimeout(myfunction, 5000);<br />\n</code><br />\nYou may also run into situations where you need a specific function to trigger repeatedly at a specific time interval, such as if your application needs to refresh data from the application database on the server. Instead of having to set multiple <code>setTimeout()</code> functions, you can use the <code>setInterval() </code>function:</p>\n<p><code>setInterval(function, time);</code></p>\n<p>With the <code>setInterval() </code>function, JavaScript repeats the event trigger for the specified number of milliseconds, and repeats the function for each interval.</p>\n<p>If you need to disable the timer functions before they trigger, you use the <code>clearTimeout()</code> and <code>clearInterval()</code> functions. You&#8217;ll need to include the value returned by the individual functions when they&#8217;re set as the parameter:</p>\n<p><code>$timer = setInterval(myfunction, 5000);<br />\n</code><br />\n<code>clearInterval($timer);</code></p>\n<p>With the use of the timer functions in PHP, you can trigger automatic updates to a web page at a regular interval, checking for updated data. This comes in handy when working with Ajax applications.</p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2022-04-20T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":249477},{"headers":{"creationTime":"2020-08-17T01:55:42+00:00","modifiedTime":"2022-03-25T16:29:25+00:00","timestamp":"2022-06-22T19:37:31+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"App Development","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33594"},"slug":"app-development","categoryId":33594}],"title":"SwiftUI For Dummies Cheat Sheet","strippedTitle":"swiftui for dummies cheat sheet","slug":"swiftui-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Discover how SwiftUI makes creating iPhone stacked and tabbed applications easy. Also learn how to use the Share Sheet to share something in your app.","noIndex":0,"noFollow":0},"content":"SwiftUI makes creating iPhone stacked and tabbed apps easy! You can add shake fail feedback using animation, so your users know when their login attempt has failed. And you can give users the option of sharing something in your app, using the Share Sheet.","description":"SwiftUI makes creating iPhone stacked and tabbed apps easy! You can add shake fail feedback using animation, so your users know when their login attempt has failed. And you can give users the option of sharing something in your app, using the Share Sheet.","blurb":"","authors":[],"primaryCategoryTaxonomy":{"categoryId":33594,"title":"App Development","slug":"app-development","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33594"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":274241,"title":"How to Make Your Own Animation in SwiftUI","slug":"how-to-make-your-own-animation-in-swiftui","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274241"}},{"articleId":274231,"title":"Understanding How to Animate in SwiftUI","slug":"understanding-how-to-animate-in-swiftui","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274231"}},{"articleId":274224,"title":"How to Use UIKit in SwiftUI","slug":"how-to-use-uikit-in-swiftui","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274224"}},{"articleId":274217,"title":"Swift Closures","slug":"swift-closures","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274217"}},{"articleId":274211,"title":"A Quick Intro to Swift Functions","slug":"a-quick-intro-to-swift-functions","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274211"}}],"fromCategory":[{"articleId":274241,"title":"How to Make Your Own Animation in SwiftUI","slug":"how-to-make-your-own-animation-in-swiftui","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274241"}},{"articleId":274231,"title":"Understanding How to Animate in SwiftUI","slug":"understanding-how-to-animate-in-swiftui","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274231"}},{"articleId":274224,"title":"How to Use UIKit in SwiftUI","slug":"how-to-use-uikit-in-swiftui","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274224"}},{"articleId":274217,"title":"Swift Closures","slug":"swift-closures","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274217"}},{"articleId":274211,"title":"A Quick Intro to Swift Functions","slug":"a-quick-intro-to-swift-functions","categoryList":["technology","programming-web-design","app-development"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/274211"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281877,"slug":"swiftui-for-dummies","isbn":"9781119652687","categoryList":["technology","programming-web-design","app-development"],"amazon":{"default":"https://www.amazon.com/gp/product/1119652685/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119652685/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119652685-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119652685/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119652685/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/swiftui-for-dummies-cover-9781119652687-203x255.jpg","width":203,"height":255},"title":"SwiftUI For Dummies","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"<p><b><b data-author-id=\"33413\">Wei-Meng Lee</b></b> is founder of Developer Learning Solutions, specializing in hands-on technology training. His name regularly appears in publications like DevX.com, MobiForge.com, and <i>CODE Magazine</i>. He is also the author of <i>SwiftUI For Dummies, Beginning Swift Programming, Python Machine Learning,</i> and <i>Learning WatchKit Programming</i>.</p>","authors":[{"authorId":33413,"name":"Wei-Meng Lee","slug":"wei-meng-lee","description":" <p><b>Wei-Meng Lee</b> is founder of Developer Learning Solutions, specializing in hands-on technology training. His name regularly appears in publications like DevX.com, MobiForge.com, and <i>CODE Magazine</i>. He is also the author of <i>SwiftUI For Dummies, Beginning Swift Programming, Python Machine Learning,</i> and <i>Learning WatchKit Programming</i>.</p> ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/33413"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;app-development&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119652687&quot;]}]\" id=\"du-slot-62b36f7b60b0f\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;app-development&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119652687&quot;]}]\" id=\"du-slot-62b36f7b61279\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":0,"title":"","slug":null,"categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/"}}],"content":[{"title":"Creating a Stacked and Tabbed Navigation Application","thumb":null,"image":null,"content":"<p>In iOS, you often encounter applications that combine the use of stacked and tabbed navigations. Creating this kind of design is easy to accomplish using SwiftUI. The following figure shows how such an application may look.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-272597\" src=\"https://www.dummies.com/wp-content/uploads/swiftui-application.jpg\" alt=\"SwiftUI application\" width=\"535\" height=\"356\" /></p>\n<p>The application has two tab items:</p>\n<ul>\n<li><code>TabView1 </code>corresponds to the first tab item.</li>\n<li><code>TabView2 </code>corresponds to the second tab item.</li>\n</ul>\n<p>In <code>TabView1</code>, there is a button that says “Tap Me!” When the user taps this button, the application navigates to <code>DetailView</code>.</p>\n<p>To implement this in SwiftUI, you just need to create three views (you can create them in separate <a href=\"https://dummies-wp-content.dummies.com/programming/macintosh/swift/swift-for-dummies-cheat-sheet/\">Swift</a> files, or put them all in one single file):</p>\n<pre class=\"“code”\">import SwiftUI\r\n\r\nstruct TabView1: View {\r\n var body: some View {\r\n NavigationView {\r\n NavigationLink(destination: DetailView()) {\r\n Text(\"Tap me!\")\r\n }\r\n .navigationBarTitle(\"TabView1\")\r\n }\r\n }\r\n}\r\n\r\nstruct TabView2: View {\r\n var body: some View {\r\n NavigationView {\r\n Text(\"TabView2\")\r\n .navigationBarTitle(\"TabView2\")\r\n }\r\n }\r\n}\r\n\r\nstruct DetailView: View {\r\n var body: some View {\r\n Text(\"DetailView\")\r\n .navigationBarTitle(\"DetailView\", \r\n displayMode: .inline)\r\n }\r\n}\r\n</pre>\n<p><code>NavigationLink </code>is a button that, when pressed, triggers a navigation presentation. <code>NavigationView </code>is for presenting a stack of views representing a visible path in a navigation hierarchy.<br />\nTo create the tab items, use the <code>TabView </code>view:</p>\n<pre class=\"“code”\">struct ContentView: View {\r\n var body: some View {\r\n TabView {\r\n TabView1()\r\n .tabItem {\r\n Image(systemName: \"doc.richtext\")\r\n Text(\"News\")\r\n }\r\n \r\n TabView2()\r\n .tabItem {\r\n Image(systemName: \"gear\")\r\n Text(\"Preferences\")\r\n }\r\n }\r\n }\r\n}\r\n</pre>\n<p>The <code>tabItem()</code> modifier displays a tab item for each view.</p>\n"},{"title":"Creating Shake Fail Feedback Using Animation","thumb":null,"image":null,"content":"<p>Most iOS users are familiar with this: If you enter an incorrect passcode when unlocking your iPhone, the dots (representing your entered passcode) on your iPhone “shake,” letting you know that your passcode is wrong. This shaking is a useful form of UI feedback — it lets the user know that the login has failed.</p>\n<p>How about implanting this animation in your own app using SwiftUI? Turns out, it isn’t that difficult! You can make use of SwiftUI’s <code>animation() </code>modifier.</p>\n<p>The following code snippet contains a <code>SecureField </code>view with the <code>animation()</code> modifier set:</p>\n<pre class=\"“code”\">struct ContentView: View {\r\n @State var offset:CGFloat = 0\r\n @State private var username: String = \"\"\r\n @State private var password: String = \"\"\r\n \r\n var body: some View {\r\n VStack {\r\n Text(\"Username\")\r\n TextField(\"Enter username\", text:$username)\r\n .frame(width: 300, height: 30)\r\n .border(Color.black)\r\n \r\n Text(\"Password\")\r\n SecureField(\"Enter a password\", \r\n text: $password)\r\n .frame(width: 300, height: 30)\r\n .offset(x: offset) // amount to \"shake\"\r\n .animation(\r\n offset != 0 ? \r\n Animation.default\r\n .repeatCount(5).speed(4)\r\n :\r\n nil) // if offset is not zero, animate\r\n .border(Color.black)\r\n\r\n Button(action: {\r\n if true { // simulates login failed\r\n self.offset = 20 // set \"shake\" amount\r\n\r\n // after a delay of 0.5 seconds, set \r\n // offset to 0 to bring back the \r\n // SecureField to its original \r\n // position \r\n DispatchQueue.main.asyncAfter(\r\n deadline: .now() + 0.5) {\r\n self.offset = 0\r\n }\r\n }\r\n }) {\r\n Text(\"Login\")\r\n }\r\n }\r\n }\r\n}\r\n</pre>\n<p>The <code>SecureField </code>view has its <code>offset </code>set to a value stored in the <code>offset </code>state variable, which is in turn bound to the <code>animation()</code> modifier. If the login fails, the <code>offset </code>state variable is set to 20 and the <code>SecureField </code>will start to animate to its new location.</p>\n<p>This animation is repeated five times and, by speeding it up, the “shaking” effect is created. One side effect of the animation is that, at the end of the animation, the <code>SecureField </code>will be permanently offset by 20 points. To remedy this, half a second after the animation starts, you set the <code>offset </code>state variable back to 0, which effectively brings the <code>SecureField </code>back to its original location at the end of the animation. The following figure shows the UI containing the SecureField.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-272600\" src=\"https://www.dummies.com/wp-content/uploads/swiftui-securefield.jpg\" alt=\"Securefield in SwiftUI\" width=\"201\" height=\"400\" /></p>\n"},{"title":"Displaying the Share Sheet","thumb":null,"image":null,"content":"<p>The <em>Share Sheet</em> is an action sheet that shows the item that you’re sharing, with optional buttons at the bottom. Using the Share Sheet, you can easily share items of interest with other users through AirDrop, Messages, Mail, Notes, and other apps on your device.</p>\n<p>The following code snippets shows an Image view showing an image of a Macintosh SE computer. It also has a navigation button at the top showing a share icon (see the figure):</p>\n<pre class=\"“code”\">struct ContentView: View {\r\n func shareURLButton() {\r\n let img = UIImage(named: \"Macintosh_SE\")\r\n let avc = UIActivityViewController(\r\n activityItems: [img!],\r\n applicationActivities: nil)\r\n \r\n UIApplication.shared.windows.first?\r\n .rootViewController?.present(\r\n avc, animated: true, completion: nil)\r\n }\r\n\r\n var body: some View {\r\n NavigationView {\r\n Image(\"Macintosh_SE\")\r\n .resizable()\r\n .frame(width: 200.0, height: 220.0)\r\n .navigationBarItems(trailing:\r\n Button(action: {\r\n self.shareURLButton()\r\n }) {\r\n Image(systemName: \r\n \"square.and.arrow.up\")\r\n }\r\n )\r\n .navigationBarTitle(\"Share Sheet Example\")\r\n }\r\n }\r\n}\r\n</pre>\n<p>When the Share icon is tapped, the Share Sheet displays, as shown on the right side of the figure. Users will be able to copy the image, save a copy of it to the Photos app, assign it to a contact, and so on.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-272601\" src=\"https://www.dummies.com/wp-content/uploads/swiftui-share-sheet.jpg\" alt=\"Share Sheet\" width=\"401\" height=\"400\" /></p>\n<p class=\"article-tips tip\">If you want to allows users to save the image to the Photos app, you need to add the <code>NSPhotoLibraryAddUsageDescription</code> key to the <code>Info.plist</code> file and assign it a value.</p>\n<p> You can also make the Image view context sensitive using the contextMenu() modifier:</p>\n<pre class=\"“code”\"> var body: some View {\r\n NavigationView {\r\n Image(\"Macintosh_SE\")\r\n .resizable()\r\n .frame(width: 200.0, height: 220.0)\r\n .navigationBarItems(trailing:\r\n Button(action: {\r\n self.shareURLButton()\r\n }) {\r\n Image(systemName: \r\n \"square.and.arrow.up\")\r\n }\r\n )\r\n .contextMenu {\r\n Button(action: {\r\n self.shareURLButton()\r\n }) {\r\n Text(\"Share\")\r\n Image(systemName: \r\n \"square.and.arrow.up\")\r\n }\r\n }\r\n .navigationBarTitle(\"Share Sheet Example\")\r\n }\r\n }\r\n</pre>\n<p>The following figure shows the context menu displaying after long-pressing the image.</p>\n<p>Tapping the Share menu displays the Share Sheet.</p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-272599\" src=\"https://www.dummies.com/wp-content/uploads/swiftui-context-menu.jpg\" alt=\"Context menu Swift\" width=\"203\" height=\"400\" /></p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Six months","lifeExpectancySetFrom":"2022-03-25T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":272596},{"headers":{"creationTime":"2016-03-27T16:51:08+00:00","modifiedTime":"2022-03-23T18:58:44+00:00","timestamp":"2022-06-22T19:37:30+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"C","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33595"},"slug":"c","categoryId":33595}],"title":"Objective-C Programming For Dummies Cheat Sheet","strippedTitle":"objective-c programming for dummies cheat sheet","slug":"objective-c-programming-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"When you write an Objective-C program for your iOS or Mac OS X apps, all you're doing is providing a set of instructions for the computer to follow. Fundamental","noIndex":0,"noFollow":0},"content":"When you write an Objective-C program for your iOS or Mac OS X apps, all you're doing is providing a set of instructions for the computer to follow. Fundamentally, programs manipulate numbers and text, and all things considered, a computer program has only two parts: variables (and other structures), which \"hold\" the data, and instructions, which perform operations on that data.\r\n\r\nThis Cheat Sheet provides some of the main aspects of Objective-C programming, including making a statement, built-in and new data types, operators, and more.","description":"When you write an Objective-C program for your iOS or Mac OS X apps, all you're doing is providing a set of instructions for the computer to follow. Fundamentally, programs manipulate numbers and text, and all things considered, a computer program has only two parts: variables (and other structures), which \"hold\" the data, and instructions, which perform operations on that data.\r\n\r\nThis Cheat Sheet provides some of the main aspects of Objective-C programming, including making a statement, built-in and new data types, operators, and more.","blurb":"","authors":[{"authorId":9187,"name":"Neal Goldstein","slug":"neal-goldstein","description":" <p><b>Neal Goldstein</b> is a veteran programmer and trusted instructor of iOS programming topics. He is the author of all editions of <i>iPhone Application Development For Dummies.</i><b> Karl Kowalski</b> is a programmer who specializes in security and mobile apps and author of <i>Mac Application Development For Dummies.</i> ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9187"}}],"primaryCategoryTaxonomy":{"categoryId":33595,"title":"C","slug":"c","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33595"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":172896,"title":"Control Statements and Loops in Objective-C","slug":"control-statements-and-loops-in-objective-c","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172896"}},{"articleId":172897,"title":"Objective-C Operators","slug":"objective-c-operators","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172897"}},{"articleId":172898,"title":"Making an Objective-C Statement","slug":"making-an-objective-c-statement","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172898"}},{"articleId":172893,"title":"Declaring Classes and Sending Messages in Objective-C","slug":"declaring-classes-and-sending-messages-in-objective-c","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172893"}},{"articleId":172894,"title":"Objective-C Built-in Data Types and New Data Types","slug":"objective-c-built-in-data-types-and-new-data-types","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172894"}}],"fromCategory":[{"articleId":275915,"title":"10 Common Mistakes in C Programming","slug":"10-common-mistakes-in-c-programming","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/275915"}},{"articleId":275893,"title":"10 Tips and Reminders for C Programmers","slug":"10-tips-and-reminders-for-c-programmers","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/275893"}},{"articleId":207820,"title":"C Programming For Dummies Cheat Sheet","slug":"c-programming-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/207820"}},{"articleId":201056,"title":"Looking at the C Language","slug":"looking-at-the-c-language","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/201056"}},{"articleId":200524,"title":"Declaring Variables in C","slug":"declaring-variables-in-c","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/200524"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281793,"slug":"objective-c-programming-for-dummies","isbn":"9781118213988","categoryList":["technology","programming-web-design","c"],"amazon":{"default":"https://www.amazon.com/gp/product/111821398X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/111821398X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/111821398X-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/111821398X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/111821398X/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/objective-c-programming-for-dummies-cover-9781118213988-203x255.jpg","width":203,"height":255},"title":"Objective-C Programming For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"9187\">Neal Goldstein</b> is a veteran programmer and trusted instructor of iOS programming topics. He is the author of all editions of <i>iPhone Application Development For Dummies.</i> Karl Kowalski is a programmer who specializes in security and mobile apps and author of <i>Mac Application Development For Dummies.</i></p>","authors":[{"authorId":9187,"name":"Neal Goldstein","slug":"neal-goldstein","description":" <p><b>Neal Goldstein</b> is a veteran programmer and trusted instructor of iOS programming topics. He is the author of all editions of <i>iPhone Application Development For Dummies.</i><b> Karl Kowalski</b> is a programmer who specializes in security and mobile apps and author of <i>Mac Application Development For Dummies.</i> ","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9187"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;c&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118213988&quot;]}]\" id=\"du-slot-62b36f7a6c9a4\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;c&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118213988&quot;]}]\" id=\"du-slot-62b36f7a6d10e\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":172898,"title":"Making an Objective-C Statement","slug":"making-an-objective-c-statement","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172898"}},{"articleId":172894,"title":"Objective-C Built-in Data Types and New Data Types","slug":"objective-c-built-in-data-types-and-new-data-types","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172894"}},{"articleId":172897,"title":"Objective-C Operators","slug":"objective-c-operators","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172897"}},{"articleId":172896,"title":"Control Statements and Loops in Objective-C","slug":"control-statements-and-loops-in-objective-c","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172896"}},{"articleId":172893,"title":"Declaring Classes and Sending Messages in Objective-C","slug":"declaring-classes-and-sending-messages-in-objective-c","categoryList":["technology","programming-web-design","c"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/172893"}}],"content":[{"title":"Making an Objective-C statement","thumb":null,"image":null,"content":"<p>Programming iPhone and Mac apps in Objective-C is about making a statement. You can recognize a statement in Objective-C immediately by noting the semicolon at the end:</p>\n<pre class=\"code\">statement;</pre>\n<p>You will see other lines of code, but unless the line ends with a semicolon, it is not an Objective-C statement.</p>\n"},{"title":"Objective-C built-in and new data types","thumb":null,"image":null,"content":"<p>The variables you declare in Objective-C, Objective-C data types, must be a type that the compiler can recognize. Objective-C comes with a number of built-in data types, as well as mechanisms to create new ones, for programming your iPhone or Mac OS X applications.</p>\n<table>\n<caption>Built-In Types</caption>\n<tbody>\n<tr>\n<th>Type</th>\n<th>Description</th>\n<th>Size</th>\n</tr>\n<tr>\n<td>char</td>\n<td>A character</td>\n<td>1 byte</td>\n</tr>\n<tr>\n<td>int</td>\n<td>An integer — a whole number</td>\n<td>4 bytes</td>\n</tr>\n<tr>\n<td>float</td>\n<td>Single precision floating point number</td>\n<td>4 bytes</td>\n</tr>\n<tr>\n<td>Double</td>\n<td>Double precision floating point number</td>\n<td>8 bytes</td>\n</tr>\n<tr>\n<td>short</td>\n<td>A short integer</td>\n<td>2 bytes</td>\n</tr>\n<tr>\n<td>long</td>\n<td>A double short</td>\n<td>4 bytes</td>\n</tr>\n<tr>\n<td>long long</td>\n<td>A double long</td>\n<td>8 bytes</td>\n</tr>\n<tr>\n<td>BOOL</td>\n<td>Boolean (signed char)</td>\n<td>1 byte</td>\n</tr>\n</tbody>\n</table>\n<h3>Enumeration types</h3>\n<pre class=\"code\">enum typeName { identifier1, ... identifiern};</pre>\n<blockquote><p>Identifiers are of constants of type <span class=\"code\">int</span>.</p></blockquote>\n<h3>typedef</h3>\n<pre class=\"code\">typedef typeName identifier;</pre>\n<blockquote><p>Associates an identifier with a specific type.</p></blockquote>\n<h3>Constants</h3>\n<pre class=\"code\">const type identifier = value;\r\n#define identifier value</pre>\n<blockquote><p>Allows you to define names for constants.</p></blockquote>\n"},{"title":"Objective-C operators","thumb":null,"image":null,"content":"<p>Objective-C operators, like those in other programming languages, let you perform operations on variables (hence the name). Objective-C provides many operators, and keeping track of all of them can be difficult as you program your iPhone or Mac OS X apps.</p>\n<p>Use the following tables to jog your memory as to which operator accomplishes what task.</p>\n<table>\n<caption>Arithmetic Operators</caption>\n<tbody>\n<tr>\n<th>Operator</th>\n<th>What It Does</th>\n</tr>\n<tr>\n<td>+</td>\n<td>Addition</td>\n</tr>\n<tr>\n<td>&#8211;</td>\n<td>Subtraction</td>\n</tr>\n<tr>\n<td>*</td>\n<td>Multiplication</td>\n</tr>\n<tr>\n<td>/</td>\n<td>Division</td>\n</tr>\n<tr>\n<td>%</td>\n<td>Modulo</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Relational and Equality Operators</caption>\n<tbody>\n<tr>\n<th>Operator</th>\n<th>What It Does</th>\n</tr>\n<tr>\n<td>==</td>\n<td>Equal to</td>\n</tr>\n<tr>\n<td>!=</td>\n<td>Not equal to</td>\n</tr>\n<tr>\n<td>&gt;</td>\n<td>Greater than</td>\n</tr>\n<tr>\n<td>&lt;</td>\n<td>Less than</td>\n</tr>\n<tr>\n<td>&gt;=</td>\n<td>Greater than or equal to</td>\n</tr>\n<tr>\n<td>&lt;=</td>\n<td>Less than or equal to</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Logical Operators</caption>\n<tbody>\n<tr>\n<th>Operator</th>\n<th>What It Does</th>\n</tr>\n<tr>\n<td>!</td>\n<td>NOT</td>\n</tr>\n<tr>\n<td>&amp;&amp;</td>\n<td>Logical AND</td>\n</tr>\n<tr>\n<td>||</td>\n<td>Logical OR</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Compound Assignment Operators</caption>\n<tbody>\n<tr>\n<th>Operator</th>\n<th>What It Does</th>\n</tr>\n<tr>\n<td>+=</td>\n<td>Addition</td>\n</tr>\n<tr>\n<td>-=</td>\n<td>Subtraction</td>\n</tr>\n<tr>\n<td>*=</td>\n<td>Multiplication</td>\n</tr>\n<tr>\n<td>/=</td>\n<td>Division</td>\n</tr>\n<tr>\n<td>%=</td>\n<td>Modulo</td>\n</tr>\n<tr>\n<td>&amp;=</td>\n<td>Bitwise AND</td>\n</tr>\n<tr>\n<td>|=</td>\n<td>Bitwise Inclusive OR</td>\n</tr>\n<tr>\n<td>^=</td>\n<td>Exclusive OR</td>\n</tr>\n<tr>\n<td>&lt;&lt;=</td>\n<td>Shift Left</td>\n</tr>\n<tr>\n<td>&gt;&gt;=</td>\n<td>Shift Right</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Increment and Decrement Operators</caption>\n<tbody>\n<tr>\n<th>Operator</th>\n<th>What It Does</th>\n</tr>\n<tr>\n<td>++</td>\n<td>Addition</td>\n</tr>\n<tr>\n<td>&#8212;</td>\n<td>Subtraction</td>\n</tr>\n<tr>\n<td>*=</td>\n<td>Multiplication</td>\n</tr>\n<tr>\n<td>/=</td>\n<td>Division</td>\n</tr>\n<tr>\n<td>%=</td>\n<td>Modulo</td>\n</tr>\n<tr>\n<td>&amp;=</td>\n<td>Bitwise AND</td>\n</tr>\n<tr>\n<td>|=</td>\n<td>Bitwise Inclusive OR</td>\n</tr>\n<tr>\n<td>^=</td>\n<td>Exclusive OR</td>\n</tr>\n<tr>\n<td>&lt;&lt;=</td>\n<td>Shift Left</td>\n</tr>\n<tr>\n<td>&gt;&gt;=</td>\n<td>Shift Right</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Bitwise Operators</caption>\n<tbody>\n<tr>\n<th>Operator</th>\n<th>What It Does</th>\n</tr>\n<tr>\n<td>&amp;</td>\n<td>Bitwise AND</td>\n</tr>\n<tr>\n<td>|</td>\n<td>Bitwise Inclusive OR</td>\n</tr>\n<tr>\n<td>^</td>\n<td>Exclusive OR</td>\n</tr>\n<tr>\n<td>~</td>\n<td>Unary complement (bit inversion)</td>\n</tr>\n<tr>\n<td>&lt;&lt;</td>\n<td>Shift Left</td>\n</tr>\n<tr>\n<td>&gt;&gt;</td>\n<td>Shift Right</td>\n</tr>\n</tbody>\n</table>\n<table>\n<caption>Other operators</caption>\n<tbody>\n<tr>\n<th>Operator</th>\n<th>What It Does</th>\n</tr>\n<tr>\n<td>()</td>\n<td>Cast</td>\n</tr>\n<tr>\n<td>,</td>\n<td>Comma</td>\n</tr>\n<tr>\n<td>Sizeof()</td>\n<td>Size of</td>\n</tr>\n<tr>\n<td>? :</td>\n<td>Conditional</td>\n</tr>\n<tr>\n<td>&amp;</td>\n<td>Address</td>\n</tr>\n<tr>\n<td>*</td>\n<td>Indirection</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"Control statements and loops","thumb":null,"image":null,"content":"<p>In programming, as in life, you have to make decisions and act on them. Objective-C provides control statements and loops to help your program take action. You may want to repeat a set of instructions based on some condition or state, for example, or even change the program execution sequence.</p>\n<p>Here is the basic syntax for Objective-C control statements and loops:</p>\n<h3>if else</h3>\n<pre class=\"code\"><b>if</b> (condition) {\r\n statement(s) if the condition is true;\r\n }\r\n<b>else</b> {\r\n statement(s) if the condition is not true;\r\n }</pre>\n<h3>for</h3>\n<pre class=\"code\"><b>for</b> (counter; condition; update counter) {\r\n statement(s) to execute while the condition is true;\r\n }</pre>\n<h3>for in</h3>\n<pre class=\"code\"><b>for</b> (Type newVariable <b>in</b> expression ) {\r\n<b> </b> statement(s); \r\n }</pre>\n<p>or</p>\n<pre class=\"code\">Type existingVariable ;\r\nfor (existingVariable in expression) {\r\n statement(s);\r\n }</pre>\n<p><span class=\"code\">Expression</span> is an object that conforms to the NSFastEnumeration protocol.</p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">An NSArray and NSSet enumeration is over content.</p>\n</li>\n<li>\n<p class=\"first-para\">An NSDictionary enumeration is over keys.</p>\n</li>\n<li>\n<p class=\"first-para\">An NSManagedObjectModel enumeration is over entities.</p>\n</li>\n</ul>\n<h3>while</h3>\n<pre class=\"code\">while (condition) { \r\n statement(s) to execute while the condition is true \r\n }</pre>\n<h3>do while</h3>\n<pre class=\"code\">do {\r\n statement(s) to execute while the condition is true \r\n } while (condition);</pre>\n<h3>Jump statements</h3>\n<pre class=\"code\">return ;</pre>\n<blockquote><p>Stop execution and returns to the calling function.</p></blockquote>\n<pre class=\"code\">break;</pre>\n<blockquote><p>Leave a loop.</p></blockquote>\n<pre class=\"code\">continue;</pre>\n<blockquote><p>Skip the rest of the loop and start the next iteration.</p></blockquote>\n<pre class=\"code\">goto labelName;\r\n...\r\nlabelName:</pre>\n<blockquote><p>An absolute jump to another point in the program (don’t use it).</p></blockquote>\n<pre class=\"code\">exit();</pre>\n<blockquote><p>Terminates your program with an exit code.</p></blockquote>\n"},{"title":"Declaring classes and sending messages","thumb":null,"image":null,"content":"<p>Object-oriented programming languages enable you to declare classes, create derived classes (subclass), and send messages to the objects instantiated from a class. This is the essence of object-oriented programming and part of the object-oriented extensions that Objective-C adds to C.</p>\n<p>To ensure that everything operates smoothly, compiler directives are available that enable you to inform the compiler of your classes by using <span class=\"code\">@class</span> and <span class=\"code\">#import</span>.</p>\n<h3>Interface</h3>\n<pre class=\"code\">#import \"Superclass.h\"\r\[email protected] ClassName : Superclass {\r\ninstance variable declarations;\r\n}\r\nmethod declarations\r\[email protected](attributes) instance variable declaration;\r\n–d</pre>\n<h3>Implementation</h3>\n<pre class=\"code\">#import \"ClassName.h\"\r\[email protected] ClassName\r\[email protected] instance variable ;\r\nmethod definitions\r\n–d</pre>\n<h3>Message Syntax</h3>\n<pre class=\"code\">[receiver message]</pre>\n<h3>#import</h3>\n<pre class=\"code\">#import “filename.h”</pre>\n<blockquote><p>Guarantees that a header file will be included only once.</p></blockquote>\n<h3>@class</h3>\n<pre class=\"code\">@class ClassName;</pre>\n<blockquote><p>Clues the compiler into user defined types.</p></blockquote>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2022-03-23T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":208191}],"_links":{"self":{"self":"https://dummies-api.dummies.com/v2/categories/33592/categoryArticles?sortField=time&sortOrder=1&size=10&offset=0"},"next":{"self":"https://dummies-api.dummies.com/v2/categories/33592/categoryArticles?sortField=time&sortOrder=1&size=10&offset=10"},"last":{"self":"https://dummies-api.dummies.com/v2/categories/33592/categoryArticles?sortField=time&sortOrder=1&size=10&offset=1380"}}},"objectTitle":"","status":"success","pageType":"article-category","objectId":"33592","page":1,"sortField":"time","sortOrder":1,"categoriesIds":[],"articleTypes":[],"filterData":{"categoriesFilter":[{"itemId":0,"itemName":"All Categories","count":1390},{"itemId":33593,"itemName":"3D Printing","count":33},{"itemId":33594,"itemName":"App Development","count":85},{"itemId":34376,"itemName":"Blogging & Website Platforms","count":64},{"itemId":33595,"itemName":"C","count":17},{"itemId":33596,"itemName":"C#","count":29},{"itemId":33597,"itemName":"C++","count":63},{"itemId":33598,"itemName":"Cisco","count":1},{"itemId":33599,"itemName":"Coding","count":106},{"itemId":34324,"itemName":"CSS3","count":4},{"itemId":33610,"itemName":"General Programming & Web Design","count":206},{"itemId":34511,"itemName":"Go Programming Language","count":1},{"itemId":33600,"itemName":"HTML","count":8},{"itemId":33601,"itemName":"HTML5","count":265},{"itemId":33602,"itemName":"Java","count":122},{"itemId":33603,"itemName":"JavaScript","count":86},{"itemId":33604,"itemName":"MATLAB","count":83},{"itemId":33592,"itemName":"Programming & Web Design","count":2},{"itemId":33606,"itemName":"Python","count":84},{"itemId":33607,"itemName":"R","count":98},{"itemId":33608,"itemName":"SQL","count":27},{"itemId":34338,"itemName":"Web Hosting","count":6}],"articleTypeFilter":[{"articleType":"All Types","count":1390},{"articleType":"Articles","count":1286},{"articleType":"Cheat Sheet","count":48},{"articleType":"Step by Step","count":56}]},"filterDataLoadedStatus":"success","pageSize":10},"adsState":{"pageScripts":{"headers":{"timestamp":"2022-06-23T12:59:04+00:00"},"adsId":0,"data":{"scripts":[{"pages":["all"],"location":"header","script":"<!--Optimizely Script-->\r\n<script src=\"https://cdn.optimizely.com/js/10563184655.js\"></script>","enabled":false},{"pages":["all"],"location":"header","script":"<!-- comScore Tag -->\r\n<script>var _comscore = _comscore || [];_comscore.push({ c1: \"2\", c2: \"15097263\" });(function() {var s = document.createElement(\"script\"), el = document.getElementsByTagName(\"script\")[0]; s.async = true;s.src = (document.location.protocol == \"https:\" ? \"https://sb\" : \"http://b\") + \".scorecardresearch.com/beacon.js\";el.parentNode.insertBefore(s, el);})();</script><noscript><img src=\"https://sb.scorecardresearch.com/p?c1=2&c2=15097263&cv=2.0&cj=1\" /></noscript>\r\n<!-- / comScore Tag -->","enabled":true},{"pages":["all"],"location":"footer","script":"<!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->\r\n<script type='text/javascript'>\r\n(function(){var g=function(e,h,f,g){\r\nthis.get=function(a){for(var a=a+\"=\",c=document.cookie.split(\";\"),b=0,e=c.length;b<e;b++){for(var d=c[b];\" \"==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};\r\nthis.set=function(a,c){var b=\"\",b=new Date;b.setTime(b.getTime()+6048E5);b=\"; expires=\"+b.toGMTString();document.cookie=a+\"=\"+c+b+\"; path=/; \"};\r\nthis.check=function(){var a=this.get(f);if(a)a=a.split(\":\");else if(100!=e)\"v\"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(\":\"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case \"v\":return!1;case \"r\":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(\":\")),!c}return!0};\r\nthis.go=function(){if(this.check()){var a=document.createElement(\"script\");a.type=\"text/javascript\";a.src=g;document.body&&document.body.appendChild(a)}};\r\nthis.start=function(){var t=this;\"complete\"!==document.readyState?window.addEventListener?window.addEventListener(\"load\",function(){t.go()},!1):window.attachEvent&&window.attachEvent(\"onload\",function(){t.go()}):t.go()};};\r\ntry{(new g(100,\"r\",\"QSI_S_ZN_5o5yqpvMVjgDOuN\",\"https://zn5o5yqpvmvjgdoun-wiley.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_5o5yqpvMVjgDOuN\")).start()}catch(i){}})();\r\n</script><div id='ZN_5o5yqpvMVjgDOuN'><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>\r\n<!--END WEBSITE FEEDBACK SNIPPET-->","enabled":false},{"pages":["all"],"location":"header","script":"<!-- Hotjar Tracking Code for http://www.dummies.com -->\r\n<script>\r\n (function(h,o,t,j,a,r){\r\n h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\r\n h._hjSettings={hjid:257151,hjsv:6};\r\n a=o.getElementsByTagName('head')[0];\r\n r=o.createElement('script');r.async=1;\r\n r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\r\n a.appendChild(r);\r\n })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\r\n</script>","enabled":false},{"pages":["article"],"location":"header","script":"<!-- //Connect Container: dummies --> <script src=\"//get.s-onetag.com/bffe21a1-6bb8-4928-9449-7beadb468dae/tag.min.js\" async defer></script>","enabled":true},{"pages":["homepage"],"location":"header","script":"<meta name=\"facebook-domain-verification\" content=\"irk8y0irxf718trg3uwwuexg6xpva0\" />","enabled":true},{"pages":["homepage","article","category","search"],"location":"footer","script":"<!-- Facebook Pixel Code -->\r\n<noscript>\r\n<img height=\"1\" width=\"1\" src=\"https://www.facebook.com/tr?id=256338321977984&ev=PageView&noscript=1\"/>\r\n</noscript>\r\n<!-- End Facebook Pixel Code -->","enabled":true}]}},"pageScriptsLoadedStatus":"success"},"navigationState":{"navigationCollections":[{"collectionId":287568,"title":"BYOB (Be Your Own Boss)","hasSubCategories":false,"url":"/collection/for-the-entry-level-entrepreneur-287568"},{"collectionId":293237,"title":"Be a Rad Dad","hasSubCategories":false,"url":"/collection/be-the-best-dad-293237"},{"collectionId":287563,"title":"For Those Seeking Peace of Mind","hasSubCategories":false,"url":"/collection/for-those-seeking-peace-of-mind-287563"},{"collectionId":287570,"title":"For the Aspiring Aficionado","hasSubCategories":false,"url":"/collection/for-the-bougielicious-287570"},{"collectionId":291903,"title":"For the Budding Cannabis Enthusiast","hasSubCategories":false,"url":"/collection/for-the-budding-cannabis-enthusiast-291903"},{"collectionId":291934,"title":"For the Exam-Season Crammer","hasSubCategories":false,"url":"/collection/for-the-exam-season-crammer-291934"},{"collectionId":287569,"title":"For the Hopeless Romantic","hasSubCategories":false,"url":"/collection/for-the-hopeless-romantic-287569"},{"collectionId":287567,"title":"For the Unabashed Hippie","hasSubCategories":false,"url":"/collection/for-the-unabashed-hippie-287567"},{"collectionId":292186,"title":"Just DIY It","hasSubCategories":false,"url":"/collection/just-diy-it-292186"},{"collectionId":290164,"title":"Make a Commitment to Better Yourself","hasSubCategories":false,"url":"/collection/make-a-commitment-to-better-yourself-290164"}],"navigationCollectionsLoadedStatus":"success","navigationCategories":{"books":{"0":{"data":[{"categoryId":33512,"title":"Technology","hasSubCategories":true,"url":"/category/books/technology-33512"},{"categoryId":33662,"title":"Academics & The Arts","hasSubCategories":true,"url":"/category/books/academics-the-arts-33662"},{"categoryId":33809,"title":"Home, Auto, & Hobbies","hasSubCategories":true,"url":"/category/books/home-auto-hobbies-33809"},{"categoryId":34038,"title":"Body, Mind, & Spirit","hasSubCategories":true,"url":"/category/books/body-mind-spirit-34038"},{"categoryId":34224,"title":"Business, Careers, & Money","hasSubCategories":true,"url":"/category/books/business-careers-money-34224"}],"breadcrumbs":[],"categoryTitle":"Level 0 Category","mainCategoryUrl":"/category/books/level-0-category-0"}},"articles":{"0":{"data":[{"categoryId":33512,"title":"Technology","hasSubCategories":true,"url":"/category/articles/technology-33512"},{"categoryId":33662,"title":"Academics & The Arts","hasSubCategories":true,"url":"/category/articles/academics-the-arts-33662"},{"categoryId":33809,"title":"Home, Auto, & Hobbies","hasSubCategories":true,"url":"/category/articles/home-auto-hobbies-33809"},{"categoryId":34038,"title":"Body, Mind, & Spirit","hasSubCategories":true,"url":"/category/articles/body-mind-spirit-34038"},{"categoryId":34224,"title":"Business, Careers, & Money","hasSubCategories":true,"url":"/category/articles/business-careers-money-34224"}],"breadcrumbs":[],"categoryTitle":"Level 0 Category","mainCategoryUrl":"/category/articles/level-0-category-0"}}},"navigationCategoriesLoadedStatus":"success"},"searchState":{"searchList":[],"searchStatus":"initial","relatedArticlesList":[],"relatedArticlesStatus":"initial"},"routeState":{"name":"ArticleCategory","path":"/category/articles/programming-web-design-33592/","hash":"","query":{},"params":{"category":"programming-web-design-33592"},"fullPath":"/category/articles/programming-web-design-33592/","meta":{"routeType":"category","breadcrumbInfo":{"suffix":"Articles","baseRoute":"/category/articles"},"prerenderWithAsyncData":true},"from":{"name":null,"path":"/","hash":"","query":{},"params":{},"fullPath":"/","meta":{}}},"sfmcState":{"newsletterSignupStatus":"initial"}}
Logo
  • Articles Open Article Categories
  • Books Open Book Categories
  • Collections Open Collections list
  • Custom Solutions

Article Categories

Book Categories

Collections

Explore all collections
BYOB (Be Your Own Boss)
Be a Rad Dad
For Those Seeking Peace of Mind
For the Aspiring Aficionado
For the Budding Cannabis Enthusiast
For the Exam-Season Crammer
For the Hopeless Romantic
For the Unabashed Hippie
Just DIY It
Make a Commitment to Better Yourself
  • Home
  • Technology Articles
  • Programming & Web Design Articles

Programming & Web Design Articles

Ever wonder what makes the software, websites, and blogs you use every day function properly (or improperly)? It's programming. Our articles reveal the ins and outs of programming and web design.

Browse By Category

Go Programming Language

3D Printing

App Development

C

C#

C++

Cisco

Coding

HTML

HTML5

Java

JavaScript

MATLAB

PHP

Python

R

SQL

General Programming & Web Design

CSS3

Web Hosting

Blogging & Website Platforms

Previous slideNext slide

Go Programming Language

3D Printing

App Development

C

C#

C++

Cisco

Coding

HTML

HTML5

Java

JavaScript

MATLAB

PHP

Python

R

SQL

General Programming & Web Design

CSS3

Web Hosting

Blogging & Website Platforms

Articles From Programming & Web Design

page 1
page 2
page 3
page 4
page 5
page 6
page 7
page 8
page 9
page 10
page 11
page 12
page 13
page 14
page 15
page 16
page 17
page 18
page 19
page 20
page 21
page 22
page 23
page 24
page 25
page 26
page 27
page 28
page 29
page 30
page 31
page 32
page 33
page 34
page 35
page 36
page 37
page 38
page 39
page 40
page 41
page 42
page 43
page 44
page 45
page 46
page 47
page 48
page 49
page 50
page 51
page 52
page 53
page 54
page 55
page 56
page 57
page 58
page 59
page 60
page 61
page 62
page 63
page 64
page 65
page 66
page 67
page 68
page 69
page 70
page 71
page 72
page 73
page 74
page 75
page 76
page 77
page 78
page 79
page 80
page 81
page 82
page 83
page 84
page 85
page 86
page 87
page 88
page 89
page 90
page 91
page 92
page 93
page 94
page 95
page 96
page 97
page 98
page 99
page 100
page 101
page 102
page 103
page 104
page 105
page 106
page 107
page 108
page 109
page 110
page 111
page 112
page 113
page 114
page 115
page 116
page 117
page 118
page 119
page 120
page 121
page 122
page 123
page 124
page 125
page 126
page 127
page 128
page 129
page 130
page 131
page 132
page 133
page 134
page 135
page 136
page 137
page 138
page 139

Filter Results

1,390 results
1,390 results
General Programming & Web Design How to Fix Noncompliant Code on Your Web Page

Article / Updated 05-31-2022

For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are easy to fix, such as missing alt text and </span> tags, you’re bound to find coding issues that completely baffle and stump you. For instance, if you get an error message that reads <span class="code">XML Parsing Error: Opening and ending tag mismatch: br line 52 and body</span>, it might be difficult to figure out what that means, let alone why it was caused and how you should fix it. As a strategy then, try to fix the issues within the code from the top down, as they’re listed in the validation results, because sometimes fixing one issue resolves another. With the XML parsing error, that issue might disappear when you correct for an omitted closing element on a <span class="code"><br /></span> tag listed earlier in the error results. The best way to find out how to code better and make fewer mistakes before validation testing is to make lots of honest mistakes and figure out how to correct them on your own. Most often, you can fix noncompliant code by hand or with the help of a good HTML editor. To help you identify some of the more common coding mistakes, here several code issues along with suggestions about how to fix them. <table> <tbody> <tr> <th>Problem</th> <th>Solution</th> </tr> <tr> <td> <pre class="code">alt</pre> text attribute missing from <pre class="code"><img></pre> tag</td> <td>Add the alternative text attribute, either with or without a description, as in <pre class="code"><img src="images/logo.gif" width="150" height="150" alt="Pete’s Pizza"> <img src="images/flourish.gif" width="200" height="150" alt=""></pre> .</td> </tr> <tr> <td> <pre class="code"><noscript></pre> tags missing from code</td> <td>Add <pre class="code"><noscript></pre> tags below each instance when JavaScript is present in in-line JavaScript or at the end of the content before the closing body tag. Between the <pre class="code"><noscript></pre> tags, insert HTML content (text, graphics, media files, and so on) that describes the function of the JavaScript and, when appropriate, how visitors can access the information revealed by it, as shown here: <pre class="code"><script language="JavaScript" src="bookmark.js" type="text/javascript"></script><noscript>The JavaScript used on this page provides a quick link that allows visitors to automatically bookmark this page. As an alternative, please use your browser’s Bookmark This Page feature. Flashing or flickering element(s) detected, such as animated GIFs, Java applets, and other multimedia plug-ins Adjust the speed of any animations to avoid causing the screen to flicker with a frequency between 2 Hz and 55 Hz. Animations that exceed these two measures may cause seizures in visitors with photosensitive epilepsy. No DOCTYPE specified Add a valid DOCTYPE above the opening tag. No HTTP charset parameter specified This special meta tag specifies the character set used in the HTML code. Some HTML editors include it automatically when generating new blank web pages. If validation finds that this tag is missing from your HTML or XHTML code, insert the following code by hand: . For HTML5, insert . No </pre> tag specified</td> <td>Add a unique title between <pre class="code"><title></pre> tags in the head area on each page.</td> </tr> <tr> <td>No <pre class="code"><meta></pre> tags specified</td> <td>Add meta keywords and meta description tags to the head of each page. These can be identical on every page on the site. If desired, you may also add additional meta tags as needed.</td> </tr> <tr> <td>No Robots tags specified</td> <td>Add the <pre class="code">Robots</pre> <pre class="code"><meta></pre> tag in the head of the page to instruct web spiders and robots whether to index the page and follow any hyperlinks, such as <pre class="code"><meta name="Robots" content="All"></pre> .</td> </tr> <tr> <td>Deprecated <pre class="code"><font></pre> tags detected</td> <td>Move all the presentation markup of the HTML (page, fonts, tables, links, and so on) to an external CSS file and remove all <pre class="code"><font></pre> tags and HTML and inline formatting attributes.</td> </tr> <tr> <td>Deprecated table height attribute detected</td> <td>Control table cell heights, when necessary, with CSS styles.</td> </tr> <tr> <td>Style attributes detected in the opening <pre class="code"><body></pre> tag</td> <td>Move <span class="code">body</span> attributes, like margin attributes and background page color, to a BODY tag redefine style in an external CSS file.</td> </tr> <tr> <td> <pre class="code">type</pre> attribute not specified for JavaScript or CSS</td> <td>Add the <pre class="code">type="text/css"</pre> attribute for <pre class="code"><style></pre> tags and the <pre class="code">type="text/javascript"</pre> attribute for <pre class="code"><script></pre> tags: <pre class="code"><style type="text/css" ><script type="text/javascript"></pre> .</td> </tr> <tr> <td>Entity name used instead of entity number</td> <td>Change the entity name to an entity number, such as using <pre class="code">$#169;</pre> instead of <pre class="code">©</pre> to create the copyright symbol (c).</td> </tr> <tr> <td>No background color attribute was specified for a CSS style that specifies text color</td> <td>Provide each style that contains a text <pre class="code">color</pre> attribute with an attending background <pre class="code">color</pre> attribute. The background color should match, or closely match, the background color upon which the text will display on.</td> </tr> </tbody> </table> When you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.

View Article
General Programming & Web Design Beginning Programming All-In-One For Dummies Cheat Sheet

Cheat Sheet / Updated 05-03-2022

If you're just getting started writing computer programs, you need to learn programming branching and looping statements to perform the specific jobs you need for an effective program. Keeping a list of computer programming resources for useful information handy can help, too.

View Cheat Sheet
R R Projects For Dummies Cheat Sheet

Cheat Sheet / Updated 05-02-2022

To complete any project using R, you work with functions that live in packages designed for specific areas. This cheat sheet provides some information about these functions.

View Cheat Sheet
Coding Helping Kids with Coding For Dummies Cheat Sheet

Cheat Sheet / Updated 04-27-2022

Coding is fast becoming a skill that every child needs to be educated for in the 21st Century. But coding is taught at only a small fraction of schools, and often only at the high school level. Helping kids learn how to code also means you’re assisting them in developing a skill that is highly marketable and sets them apart from peers at school and later, in their careers. The topics in this cheat sheet can assist you on getting started when your kid expresses an interest in learning how to code.

View Cheat Sheet
Python Beginning Programming with Python For Dummies Cheat Sheet

Cheat Sheet / Updated 04-26-2022

Python is an incredibly flexible language that has significant third-party support and is used in a broad range of applications. The applications you build will run on any platform that Python supports without any modification as long as you create a pure Python solution. Of course, you want to ensure that your applications have the best chance possible of working exactly as you anticipated everywhere they're run, which is why you need the information in this cheat sheet.

View Cheat Sheet
SQL SQL All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 04-25-2022

SQL is a popular and useful programming language. You can make SQL even more useful if you know the phases of SQL development, the criteria for normal forms, the data types used by SQL, a little bit about set and value functions, as well as some tips on how to filter tables with WHERE clauses.

View Cheat Sheet
General Programming & Web Design Virtual & Augmented Reality For Dummies Cheat Sheet

Cheat Sheet / Updated 04-20-2022

The terms virtual reality and augmented reality (and others, like mixed reality and extended reality) are thrown about everywhere today, but do you really know what they mean? Virtual and augmented reality are rapidly changing fields, so it helps to know where they are today and where they may be headed in the future. Finally, seeing how virtual and augmented reality are being used in a variety of industries and how exactly you can experience these technologies is key to your enjoyment.

View Cheat Sheet
General Programming & Web Design PHP, MySQL & JavaScript All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 04-20-2022

Working with PHP, MySQL, and JavaScript to create dynamic web applications can be difficult, but if you know a few programming tricks, you can make that job a lot easier. This Cheat Sheet shows you how to extract data from different databases in your PHP programs, filter out unwanted or potentially dangerous data from web forms, quickly find data stored in your MySQL database, and trigger timed events in your JavaScript programs.

View Cheat Sheet
App Development SwiftUI For Dummies Cheat Sheet

Cheat Sheet / Updated 03-25-2022

SwiftUI makes creating iPhone stacked and tabbed apps easy! You can add shake fail feedback using animation, so your users know when their login attempt has failed. And you can give users the option of sharing something in your app, using the Share Sheet.

View Cheat Sheet
C Objective-C Programming For Dummies Cheat Sheet

Cheat Sheet / Updated 03-23-2022

When you write an Objective-C program for your iOS or Mac OS X apps, all you're doing is providing a set of instructions for the computer to follow. Fundamentally, programs manipulate numbers and text, and all things considered, a computer program has only two parts: variables (and other structures), which "hold" the data, and instructions, which perform operations on that data. This Cheat Sheet provides some of the main aspects of Objective-C programming, including making a statement, built-in and new data types, operators, and more.

View Cheat Sheet
page 1
page 2
page 3
page 4
page 5
page 6
page 7
page 8
page 9
page 10
page 11
page 12
page 13
page 14
page 15
page 16
page 17
page 18
page 19
page 20
page 21
page 22
page 23
page 24
page 25
page 26
page 27
page 28
page 29
page 30
page 31
page 32
page 33
page 34
page 35
page 36
page 37
page 38
page 39
page 40
page 41
page 42
page 43
page 44
page 45
page 46
page 47
page 48
page 49
page 50
page 51
page 52
page 53
page 54
page 55
page 56
page 57
page 58
page 59
page 60
page 61
page 62
page 63
page 64
page 65
page 66
page 67
page 68
page 69
page 70
page 71
page 72
page 73
page 74
page 75
page 76
page 77
page 78
page 79
page 80
page 81
page 82
page 83
page 84
page 85
page 86
page 87
page 88
page 89
page 90
page 91
page 92
page 93
page 94
page 95
page 96
page 97
page 98
page 99
page 100
page 101
page 102
page 103
page 104
page 105
page 106
page 107
page 108
page 109
page 110
page 111
page 112
page 113
page 114
page 115
page 116
page 117
page 118
page 119
page 120
page 121
page 122
page 123
page 124
page 125
page 126
page 127
page 128
page 129
page 130
page 131
page 132
page 133
page 134
page 135
page 136
page 137
page 138
page 139

Quick Links

  • About For Dummies
  • Contact Us
  • Activate A Book Pin

Connect

Opt in to our newsletter!

By entering your email address and clicking the “Submit” button, you agree to the Terms of Use and Privacy Policy & to receive electronic communications from Dummies.com, which may include marketing promotions, news and updates.

About Dummies

Dummies has always stood for taking on complex concepts and making them easy to understand. Dummies helps everyone be more knowledgeable and confident in applying what they know. Whether it's to pass that big test, qualify for that big promotion or even master that cooking technique; people who rely on dummies, rely on it to learn the critical skills and relevant information necessary for success.

Terms of Use
Privacy Policy
Cookies Settings
Do Not Sell My Personal Info - CA Only