<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prathibha Perera on Medium]]></title>
        <description><![CDATA[Stories by Prathibha Perera on Medium]]></description>
        <link>https://medium.com/@prathibhaperera95?source=rss-ef48fbcf9d2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0Ba8X-zTCU2nNorfvR28Ng.jpeg</url>
            <title>Stories by Prathibha Perera on Medium</title>
            <link>https://medium.com/@prathibhaperera95?source=rss-ef48fbcf9d2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 10:56:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prathibhaperera95/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Facial Emotion Recognition]]></title>
            <link>https://levelup.gitconnected.com/facial-emotion-recognition-7e2706ad7843?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e2706ad7843</guid>
            <category><![CDATA[facial-expressions]]></category>
            <category><![CDATA[facial-emotion-detection]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[fer]]></category>
            <category><![CDATA[deepface]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Tue, 30 Nov 2021 16:25:37 GMT</pubDate>
            <atom:updated>2021-11-30T16:25:37.778Z</atom:updated>
            <content:encoded><![CDATA[<h4>Two different methods to detect facial emotions of a human face</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PWoh5KBrgC4fAqXiXjNQcQ.gif" /><figcaption>GIF by Author</figcaption></figure><blockquote>Facial emotions can be introduced as a non-verbal communication method. People express their feelings and expression through words but facial emotions can be used to enhance communication. Facial emotion recognition is a trendy topic these days. Basically identified facial emotions are <strong>Happy, Sad, Angry, Neutral, Fear, Disgust, Surprise</strong>, and all together they are 7.</blockquote><blockquote>Human facial emotion recognition can be achieved in real-time or using a static image. This article provides you to detect facial emotion using a static image by two major methods. I used Google Colab to practice the following codes.</blockquote><h4><a href="https://pypi.org/project/fer/">1. FER library</a></h4><p>It is a Python library that was built upon a deep neural network using <em>Tensorflow, Keras libraries</em>, and the dataset used is from <em>Kaggle&#39;s competition Challenges in Representation Learning: Facial Expression Recognition Challenge</em>. FER requires dependencies as <strong><em>Python &gt; 3.6, OpenCV &gt;=3.2</em></strong>, and <strong><em>Tensorflow&gt;=1.7.0</em></strong><em>.</em> If you do not install OpenCV and Tensorflow, use the commands below.</p><pre><strong>pip install opencv-contrib-python<br>pip install tensorflow</strong></pre><p>Then install FER library using,</p><pre><strong>pip install fer</strong></pre><p>Try to follow code snip.</p><pre><strong>from fer import FER<br>import matplotlib.pyplot as plt<br>%matplotlib inline</strong></pre><pre><strong>test_image = plt.imread(&quot;/content/Merlin_1.jpg&quot;)</strong></pre><pre># Faces by default are detected using OpenCV&#39;s Haar Cascade classifier. To use the more accurate MTCNN network, add the parameter<br><strong>emo_detector = FER(mtcnn=True)</strong></pre><pre># Capture all the emotions on the image<br><strong>captured_emotions = emo_detector.detect_emotions(test_image)</strong></pre><pre># Print all captured emotions with the image<br><strong>print(captured_emotions)<br>plt.imshow(test_image)</strong></pre><p>You will get a result like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oxs9boasqDnxPr45HKDlaQ.png" /><figcaption>Image by Author</figcaption></figure><p>Further, you can use the following code to get extracted emotions in the image,</p><pre><strong>captured_emotions</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*2TLmZlMT79Qd844hmhizfg.png" /><figcaption>Image by Author-captured emotions</figcaption></figure><p>Then use the following code snip to extract tp most emotion from your image</p><pre><strong>print(emo_detector.top_emotion(test_image))</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*nBLnUOLc3TgdeDOUjIj0hg.png" /><figcaption>Image by Author-top most emotion</figcaption></figure><h4><a href="https://pypi.org/project/deepface/">2. DeepFace</a></h4><p>It is a lightweight facial recognition and facial attribute analysis framework used in Python and it is a <em>deep learning facial recognition system</em> created by a research group at Facebook. Using DeepFace, we can analyze <em>facial attributes like age, gender, emotion, and race</em>. It is important to mention that using DeepFace can be achieved a <strong><em>97.35% ± 0.25% accuracy</em></strong> level. Let’s focus on how to deal with DeepFace in Python.</p><pre><strong>pip install deepface</strong></pre><p>After installing deepface, use the following code to load the image and plot the image.</p><pre><strong>from deepface import DeepFace<br>import cv2<br>import matplotlib.pyplot as plt<br>img_path = &#39;Merlin_1.jpg&#39;<br>img = cv2.imread(img_path)<br>plt.imshow(img[:, :,::-1])</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*gizJinzzt_VLI7UVrWxcoQ.png" /><figcaption>Image by Author</figcaption></figure><p>Then using the following commands you can find demographic information of the image.</p><pre><strong>demography = DeepFace.analyze(img_path)<br>demography</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*qByUbGrDrjAdfJMDYq2Lmw.png" /><figcaption>Image by Author-demography information of the image</figcaption></figure><p>Then we can extract only emotion data by using the following command.</p><pre><strong>demography[&#39;emotion&#39;]</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*KgfjY1qWd03XNpffBZyLhw.png" /><figcaption>Image by Author-emotion data of the image</figcaption></figure><p>Then if you want to extract the most prominent emotion of the image, use the following code.</p><pre><strong>demography[&#39;dominant_emotion&#39;]</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/84/1*1G0JIv11oyngKHERmtTu1Q.png" /><figcaption>Image by Author-dominant emotion</figcaption></figure><p>Done Guys… 😀</p><p>We have discussed two methods that you can use to recognize the facial emotions of a human face.</p><p>Hope you can collect some important facts about recognizing facial emotion and expression using FER and DeepFace in Python.</p><p>A future article will focus on differentiation of the facial emotion recognition in the hearing-impaired community and how to train a data set to collect real-time facial emotion recognition.</p><p>Thank you for reading and hit a clap if you enjoy this article. 🙌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e2706ad7843" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/facial-emotion-recognition-7e2706ad7843">Facial Emotion Recognition</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regular Expressions]]></title>
            <link>https://levelup.gitconnected.com/regular-expressions-22bbd24ac439?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/22bbd24ac439</guid>
            <category><![CDATA[pattern-matching]]></category>
            <category><![CDATA[regular-expressions]]></category>
            <category><![CDATA[expression]]></category>
            <category><![CDATA[regular]]></category>
            <category><![CDATA[basics]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Thu, 04 Nov 2021 04:20:58 GMT</pubDate>
            <atom:updated>2021-11-04T04:20:58.381Z</atom:updated>
            <content:encoded><![CDATA[<h4>Basic knowledge you need when dealing with the RE</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rkYQU6f9yL_Gf2aWioDQSA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@xps?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">XPS</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><blockquote>A <strong><em>regular expression</em></strong> is a searching pattern that contains a sequence of characters. Regular expressions are useful for<strong> </strong>extracting information from a text by searching for one or more matches of a specific search pattern. When we are working with regular expressions there are common things that are needed to deal with. They can be categorized as follows.</blockquote><ol><li><strong><em>Basic pattern</em></strong></li><li><strong><em>[] operator</em></strong></li><li><strong><em>() operator</em></strong></li><li><strong><em>Character classes</em></strong></li><li><strong><em>Negation</em></strong></li><li><strong><em>^ and $</em></strong></li><li><strong><em>OR operator - |</em></strong></li><li><strong><em>Operator based (*, +, ?, .)</em></strong></li><li><strong><em>Numerical range</em></strong></li><li><strong><em>Boundaries</em></strong></li></ol><p>I use <a href="https://regexr.com/"><strong><em>regexr.com</em></strong> </a>to practice regular expressions. You can practice one by one to get the basic knowledge about the RE as follows.</p><h4>1. Basic pattern</h4><p>It is the simplest regular expression form that is the character sequence itself, used to match a sequence of characters within a given sentence or paragraph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*FUL9iPEl1t5ZYqRg9fyF_w.png" /><figcaption>With the global flag, then only matches the given word</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*i0QbXGiLvJEYnskhtozY4w.png" /><figcaption>With the case-insensitive flag matches the word without case sensitivity</figcaption></figure><h4>2. [] Operator</h4><p>Square braces specify a disjunction of characters to match</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*t93Lq70mMKNQHzaIP6FbGg.png" /><figcaption>Match either Apple or apple</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*XnRD8dpr6sPuBOZMu3H1JA.png" /><figcaption>Match the letter ‘x’ or ‘y’ or ‘z’</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*WAzOHmJZmWWJWL0Zi4iOzg.png" /><figcaption>Match any digit</figcaption></figure><p>Dash <strong>(-)</strong> with <strong>[]</strong> is used to specify any one character in a range</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*AWQTGH8_SqrZeHOo_XqRCw.png" /><figcaption>A single-digit will be matched</figcaption></figure><h4>3. () Operator</h4><p>It constructs a grouping construct to establish a precedence order and parenthesis is also useful for OR’ing two expressions with the bar<strong> | </strong>character.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*GnOyChTL6aNq_jtxETv2zQ.png" /><figcaption>() with | operator</figcaption></figure><h4>4. Character classes</h4><p>The following table has mentioned the basic character classes that are useful for you to deal with RE.</p><pre>+---------------+----------------------------------------------+<br>| Metacharacter |                   Behavior                   |<br>+---------------+----------------------------------------------+<br>| <strong>\d</strong>            | Match any digit character [0-9]              |<br>| <strong>\D </strong>           | Match any non-digit character                |<br>| <strong>\n</strong>            | Match a new line                             |<br>| <strong>\s</strong>            | Match white spaces                           |<br>| <strong>\S</strong>            | Match non-white spaces                       |<br>| <strong>\w</strong>            | Match word characters (includes a-z and 0–9) |<br>| <strong>\W </strong>           | Match non-word characters                    |<br>|               |                                              |<br>+---------------+----------------------------------------------+</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*XQwEaV8PYfu9bsO8rmOl5g.png" /><figcaption>Match any digit character [0–9]</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*RXktphu0nCF7Fe3n_TzgHA.png" /><figcaption>Match any non-digit character</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*Bcsp-vUVYBBjCGSAVae2lA.png" /><figcaption>Match white spaces</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*oP8k4LEUWNNZGbe4xvNROA.png" /><figcaption>Match non-white spaces</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*M4JWK9nH7XJiDmVbt1Pysw.png" /><figcaption>Match word characters (includes a-z and 0–9)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*cl9qdxg9KfD50l850pFdFA.png" /><figcaption>Match non-word characters</figcaption></figure><h4>5. Negation</h4><p>If the <strong>^</strong> caret symbol is the first symbol after opening the square brace, it specifies the negation operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*U_hlXkH2lp6xAEwnEfaGxw.png" /><figcaption>^ specifies that not an upper case letter</figcaption></figure><h4>6. ^ and $</h4><p><strong>^</strong> and <strong>$</strong> can be called as most common anchors in regular expressions. <strong>^</strong> matches the start of a line and <strong>$</strong> matches the end of the line.</p><p>Here examples match with the multiline flag enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OoNvx0LtjtTuAcWTpuhLww.png" /><figcaption>^ Specifies the start of the sentence</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWH_xOIZrzLESbLQ6MECMQ.png" /><figcaption>$ Specifies the end of the sentence</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*Ow1HrHVtpr_GmIfaC3kUug.png" /><figcaption>Both ^ and $ have been used to specify the whole sentence “Apple is the world’s 4th-largest PC vendor.”</figcaption></figure><h4>7. OR Operator — |</h4><p>The <strong>OR</strong> operator allows us to specify different allowable capture groups</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*ZO-Q_SLYd_zrprbgopG3Zg.png" /><figcaption>Match both “4th-largest” and “fourth-largest”</figcaption></figure><h4>8. Operator based ( *, + , ?, . )</h4><p><strong>*</strong>, <strong>+</strong>, <strong>?</strong> and <strong>. </strong>are the operators that are used to deal with RE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*KHi1iJwJnvutR3glSxwqSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*U6974Pfs_qE_Vbp9hJ3zzQ.png" /><figcaption>It should exactly not existence of the letter “u” or the existence of “u”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*KieUZhiYKoi-LOeN4ik3iw.png" /><figcaption>It should have zero or more occurrences of the character “o”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*XdpmWDZoBc2oaNA2mk8AaQ.png" /><figcaption>It should have exactly one or more occurrences of the character “o”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*OJGvq7X8O9f_yL-w96_ncw.png" /><figcaption>It should have zero or more occurrences of the “h” with “oohh”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*pFqGCIgXBwqHE-1txlOKrQ.png" /><figcaption>Between “r” and “n” it can have different letters but only one letter</figcaption></figure><h4>9. Numerical range</h4><p>It is used to specify a quantity range using <strong>{low, high}</strong></p><p><strong><em>{n,m}</em></strong><em> — minimum is n and maximum is m</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*kgHb6U0UmTgRa526iGV4JQ.png" /><figcaption>Minimum should have 4 digits and maximum should have 6 letters</figcaption></figure><p><strong><em>{n,}</em></strong><em> — minimum is n and maximum is undefined</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*KVkasPGJ1fJgDVLWZWAeug.png" /><figcaption>Minimum should have 4 digits and the maximum is undefined</figcaption></figure><h4>10. Boundaries</h4><p><strong>\b</strong> matches the word boundary and <strong>\B</strong> is used to identify non-word boundary</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*Qiulyhw8EAmNi9gH0OsquQ.png" /><figcaption>Matches with “the” either “The” or “the” but do not match the word “other”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*jztfBQzlwGkiU692gH3YeQ.png" /><figcaption>Matches with “the” as a non-word boundary and not match for word “the”</figcaption></figure><p>OK Cool, Guys 🤗🤗🤗🤗</p><blockquote>This is the end of the Regular Expression article and I hope you may grab some important facts about RE. If you enjoy the article and help to improve your knowledge on RE, then hit a clap. 🙌</blockquote><p>Thank you for reading !!! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22bbd24ac439" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/regular-expressions-22bbd24ac439">Regular Expressions</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[URI vs URL vs URN]]></title>
            <link>https://medium.com/@prathibhaperera95/uri-vs-url-vs-urn-51b8167cafad?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/51b8167cafad</guid>
            <category><![CDATA[urn]]></category>
            <category><![CDATA[uri]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[url]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Tue, 14 Sep 2021 18:46:04 GMT</pubDate>
            <atom:updated>2021-09-14T18:46:04.195Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is the Difference Between URI, URL, and URN</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_QxA1nK-8X_rA-SqcTxhMA.jpeg" /></figure><blockquote>When we are dealing with the internet and online stuff, URI, URL, and URN is the most familiar words that we can hear. Let’s dig into their meanings…</blockquote><h3>URI — Uniform Resource Identifier</h3><p>URI is a generic term for the names of all resources connected to the World Wide Web, and it is a sequence of characters that identifies a logical or physical resource. In other words, it is used to identify a resource on the internet either by location, or by name, or both. There are two major subsets of URI, namely <strong><em>URL</em> </strong>and <strong><em>URN</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*rgVgfOZborj_UMb9I7wxSw.png" /><figcaption>Image by Author</figcaption></figure><p><strong><em>URI syntax</em></strong><em>:</em> <em>scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]</em></p><p><strong><em>Sample URI</em></strong>: <em>foo://example.com:8042/over/there?name=ferret#nose</em></p><p><strong>Scheme</strong>: It is the initiation point of a URI and is associated with the protocols for the URI. Schemes are case-intensive and followed by a “:” URI schemes should be registered with the Internet Assigned Numbers Authority (IANA), although non-registered schemes are used in practice. Few popular examples for URI schemes are HTTP, HTTPS, FTP, and mailto.</p><p><strong>Authority</strong>: The authority component is the second item, comes after the scheme component, and starts with two slashes (//). This component consists of multiple sub-components,</p><ul><li><strong><em>authentication </em>—<em> </em></strong><em>optional field and username, password and they are separated by a colon, followed by “@” symbol</em></li><li><strong><em>host </em>— </strong><em>having a registered name or an IP address, and it comes after the “@” symbol</em></li><li><strong><em>port number</em> — </strong><em>optional field and a colon follows it</em></li></ul><p><strong>Path: </strong>The path is the third component. It is notated by a sequence of segments separated by slashes and provides the location of a resource. It is important to notice that the path should start with a single slash if the authority part exists or not but not with a double slash(//)</p><p><strong>Query</strong>: The query is the fourth component. It is an optional component of the URI that contains a string of nonhierarchical data and proceeds with a “?”.</p><p><strong>Fragment: </strong>The fragment is the fifth component. It is also an optional field that provides direction to a secondary resource and proceeds with a “#.” To clarify, the fragment field can be used to direct to a specific element of an HTML page (primary resource).</p><h3>URL — Uniform Resource Locator</h3><p>As I mentioned above, <strong><em>URL </em></strong>is one subset of the <strong><em>URI</em></strong>. A <strong><em>URL </em></strong>is nothing more than the address of a given unique resource on the web that indicates the location of that unique web resource. Users are browsing the Internet with <strong><em>URLs. If</em></strong> we click any hyperlink in any application, it redirects us to the relevant <strong><em>URL </em></strong>or <strong><em>URL </em></strong>that can be easily typed in the browser&#39;s address bar and can load the particular resource.</p><p><strong><em>URL syntax</em></strong>: <em>scheme://host:port/path?query-string#fragment-id</em></p><p><strong><em>Sample URL</em></strong>: <a href="https://medium.com/@prathibhaperera95"><em>https://medium.com/p/51b8167cafad</em></a></p><p><strong>Scheme: </strong>First part of the URL denotes the protocol that the browser must use to request the resource. It is followed by a colon “:” Few common examples for URI schemes are HTTPS(secured version) and HTTP(unsecured version).</p><p><strong>Authority: </strong>The authority is the second component of the URL and proceeds with a “//.” It contains subparts as,</p><ul><li><strong><em>host</em></strong><em> — a domain name or an IP address assigned to a host computer, and it is a combination of the host’s local name with its parent domain’s name</em></li><li><strong><em>port — </em></strong><em>denotes the technical gate used to access the resources on the webserver, usually 80 for HTTP, 443 for HTTPS, and this is an optional field</em></li></ul><p><strong>Path to resource: </strong>The path is the third component of the URL, and it is the path to the resource on the webserver</p><p><strong>Query: </strong>The query is the fourth component of the URL, and it consists of the data to be passed to server-side scripts and is running on the webserver. The query is proceeding with a “?” and it has parameters for search. Usually, a string of name and value pairs is separated by “&amp;.”</p><p><strong>Fragment Identifier: </strong>The fragment is an optional field, and it is the last component of the URL used to represent a location within the page. A “# introduces the fragment identifier.”</p><h3>URN — Uniform Resource Name</h3><p>A <strong><em>URN </em></strong>is an internet resource with a static name that remains valid even if its data is moved to another location. Unlike a <strong><em>URL</em></strong>, which cannot work if the content is moved, a <strong><em>URN can always</em></strong> track the resource of certain data on the Web, resolving a frequent issue of moving of data.</p><p>Further, we can say that URL can be used when the user knows the location of a unique resource, but URN only knows the name of the specific resource without specifying its location.</p><p><strong><em>URN Syntax: </em></strong><em>scheme:NID: NSS</em></p><p><strong><em>Sample URN: </em></strong><em>urn:ISSN:0167–6423</em></p><p><strong>Scheme</strong>: it is the leading part of the URN, ends with “:” and it is case-insensitive</p><p><strong>NID:</strong> is the second component of the URN, and it is the namespace identifier registered with the Internet Assigned Number Authority. NID is followed by a “:” and it can consist of letters, digits, and “-”</p><p><strong>NSS: </strong>it is the next component after NID, and it is a namespace-specific string. Namespace ID determines the syntactic interpretation of the Namespace Specific String. It is followed by a “:” NSS can consist of ASCII letters and digits and many punctuations and special characters.</p><ul><li><em>After 2017, q-component and r-component were added to enable the passing of parameters to named resources and the passing of parameters to resolvers.</em></li></ul><h3>Some tips to distinguish and identify URI, URL, and URN</h3><ul><li>A URL is a link that can retrieve a web-based resource; a URN is a unique identifier but cannot create a clickable link.</li><li>People often describe URIs and URNs by using a name as an example person’s name can serve sort of like a URI, in that it’s identifying an individual. But it doesn’t tell you exactly where to find a specific person in the world or even which person we’re talking about.</li><li>A simple name isn’t an example for URN because it doesn’t have uniqueness. There are plenty of other people same name all over the world. A URN would be, for instance, a name with some global unique identifier attached, like our identification number or social security number.</li><li>In networking, URNs are easy to spot.</li></ul><p><em>This is the end of the article, and I hope you can gain some important facts about URI, URL, and URN. Hit a clap if the article is useful for you.</em></p><p>Thank you for reading…!!!🤗🤗🤗</p><h3>Learn More</h3><ul><li><a href="https://enlear.academy/http-vs-https-93c87cf51a20">HTTP vs HTTPS—Why HTTP Is Not Safe?</a></li><li><a href="https://enlear.academy/angular-for-everyone-chapter-4-services-61beaa998a86">Understanding Services in Angular</a></li><li><a href="https://enlear.academy/angular-for-everyone-chapter-5-httpinterceptors-2ea8e3f9ec75">Understanding HTTP Interceptors</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51b8167cafad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do you really know about UX Design?]]></title>
            <link>https://levelup.gitconnected.com/do-you-really-know-about-ux-design-c9588ac502a0?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9588ac502a0</guid>
            <category><![CDATA[storyboarding]]></category>
            <category><![CDATA[prototyping]]></category>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[wireframing]]></category>
            <category><![CDATA[ui-design]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Thu, 09 Sep 2021 12:50:29 GMT</pubDate>
            <atom:updated>2021-09-09T12:50:29.441Z</atom:updated>
            <content:encoded><![CDATA[<h4>Wireframing, Storyboarding and, Prototyping</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nxT0Y0ipj1XVXNv3EkvqQ.gif" /><figcaption>GIF by Author</figcaption></figure><p>UI and UX terms are engaging in relating to each other and most of the time they place together. But do you know what actually they are meant by?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*X4CQudJHDLRKUPqY8W-MNg.gif" /><figcaption>GIF by Author</figcaption></figure><p>UI — User Interface and it is the way of interface design. It basically draws how the communication happens between the user and the system. UI is covering the “Look” aspect.</p><p>UX — User Experience and means the way how users interact with the interface and it helps to identify how easy or difficult to interact with the interface. UX is covering the “Feel” aspect.</p><p>For the UX design, we need to have a better understanding of the Wireframe, Storyboard, and Prototype because it helps to organize our application and also can use to determine our application meets user requirements before releasing the application for commercial use.</p><p>Basically, Wireframes, Storyboards, and Prototypes are using 3 different levels of UX design development.</p><h4>Initial Stage</h4><p>Collecting requirements of the users and confirm them through this stage and the Wireframing tools can be used to create some visual mock-ups based on the collected user requirements and those visual mock-ups can be used to get feedback from the clients.</p><p>What is a <strong>Wireframe</strong>?</p><p>It is a rough plan or a sketch of the system that is going to be built. Wireframes are simple and easy to understand. It does not contain full information but the necessary information. To draw wireframes we do not need any coding stuff and it is simply a rough sketch and in-line annotations. For the wireframe design, make sure not to use user distracting colors, and most of the time gray color themes will be used.</p><p>Useful <strong>Wireframing tools</strong>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*8fCo634rtUERVvPo4N_cxQ.png" /><figcaption>Wireframing Tools: Adobe XD, Figma, UXPin, Freehand, Justinmind</figcaption></figure><h4>Detailed Design Stage</h4><p>After confirming user requirements and features through the initial stage, can move to the screen flow design. The detailed design stage is used to verify the path of application development. In this stage storyboard concept is used to provide the details of the designed system.</p><p>What is a <strong>Storyboard?</strong></p><p>Hence Storyboard is a presentation of wireframes and arranges already developed wireframes in sequential order that are developed in the initial stage. Therefore storyboard helps to visualize the flow of the system functions in an inexpensive manner.</p><p>Useful <strong>Storyboarding tools</strong>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*ETZogLYhaVBNDwU9Q7352w.png" /><figcaption>Storyboarding Tools: Wonderunit, The Plot, Studiobinder, Boords, makeStoryboard</figcaption></figure><h4>Prototype Demonstration Stage</h4><p>After the detailed design stage, we can come to the final stage which is the Prototype Demonstration Stage. In this stage, we can use prototyping to demonstrate the final product.</p><p>What is a <strong>Prototype</strong>?</p><p>A prototype is a draft version of the final product that covers the overall design view. A prototype may be a paperwork or a computer-based craft that represents the actual user interactions and the user interfaces.</p><p>Prototyping is providing the most cost-effective changes to do the sample demonstration rather than do it to the actual product. Then we can make a final product that fits the user&#39;s expectations.</p><p>Useful <strong>Prototype tools</strong>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*5eNnCRA7KUfpa-SbWHmLoA.png" /><figcaption>Prototyping Tools: Figma, Freehand, Adobe XD, axure, webflow</figcaption></figure><p>In order to do the UX design, you should have a better understanding of the three levels of UX design and the importance of Wireframing, Storyboarding, and Prototyping. This article provides short and most relevant details on that topic by covering major aspects of the above-mentioned topic.</p><p>Hope you enjoyed this article and hit a clap if you think so.</p><p>Thank you for reading!!! 🤗</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9588ac502a0" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/do-you-really-know-about-ux-design-c9588ac502a0">Do you really know about UX Design?</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s get to know about Object-Oriented Programming]]></title>
            <link>https://medium.com/coderbyte/lets-get-to-know-about-object-oriented-programming-e7445928baf?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7445928baf</guid>
            <category><![CDATA[encapsulation]]></category>
            <category><![CDATA[inheritance]]></category>
            <category><![CDATA[polymorphism]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[abstraction]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Mon, 09 Aug 2021 11:59:32 GMT</pubDate>
            <atom:updated>2021-08-11T06:42:31.513Z</atom:updated>
            <content:encoded><![CDATA[<h4>Object-Oriented Programming concepts with Java</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*adtQdXX5yOyTGcKgMirMhQ.gif" /><figcaption>GIF by Author</figcaption></figure><p><strong>What is Object-Oriented Programming?</strong></p><blockquote>If the programing using an object concept, we can call it object-oriented programming. Without writing procedures or methods that perform on data, like in procedural programming, creating objects that contain both data and methods can be used in object-oriented programming. The importance of the using OOP concept in programming is we can follow the “<strong>DRY</strong>” principle.</blockquote><p><strong>DRY — Don’t Repeat Yourself</strong></p><p>When we are coding, the DRY principle is a major concern to consider and it helps to increase the coding effectiveness by reducing repetition of code.</p><p><strong>What is a Class?</strong></p><p><strong>Class</strong> is a blueprint that creates objects and it is common to all objects.</p><p><strong>What is an Object?</strong></p><p>An<strong> object </strong>is defined as an instance of a class and it inherits the things that are related to the class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*pSHfPXvdEs-0Xn3BX6h3kQ.gif" /><figcaption>GIF by Author</figcaption></figure><p><strong>Few object-oriented languages: </strong>Java, C++, C#, Python, JavaScript, Dart</p><p>When we are studying object-oriented programming there are some major concepts we should focus on. As you have heard before, they are called <strong>“4 Pillars of Object-Oriented Programming”</strong>. The rest of the article will describe the 4 Pillars of Object-Oriented Programming.</p><h3><strong>Pillar 1 — Inheritance</strong></h3><p>I am starting with explaining <strong><em>Inheritance </em></strong>because it will help you to understand other concepts in an easier manner after you know what is exactly “Inheritance” in OOP. And for the code implementation purpose, I will use Java and examples will bring through Java code examples.</p><p>Through Inheritance, it will allow us to use one class’s features inside another class. Therefore we should know what is a <em>superclass </em>and what is a <em>subclass?</em></p><ul><li><strong><em>Superclass </em></strong>— Parent class is another term for superclass and it is the class being inherited from.</li><li><strong><em>Subclass </em></strong>— Child class is another term for the subclass and it is the class that inherits from another class and it is used <em>extends </em>keyword.</li></ul><p>By using Inheritance, it provides“Re-usability” for our code implementation hence if we need to create a new class with the features that are having an existing class, we can simply derive our new class from the existing class. The <em>final </em>keyword can be stoped for making any inherited classes.</p><p>Following Java-Inheritance example will clarify the concept behind the Inheritance.</p><pre><strong>class</strong> Sampleclass1{</pre><pre><em>// the Sampleclass1 with 2 fields<br></em><strong>public</strong> <strong>int</strong> var1;<br><strong>public</strong> <strong>int</strong> var2;</pre><pre>// the <em>Sampleclass1 </em>class constructor<br><strong>public</strong> <em>Sampleclass1</em>(<strong>int</strong> var1, <strong>int</strong> var2){<br><strong>this</strong>.var1= var1;<br><strong>this</strong>.var2= var2;<br>}</pre><pre>// the <em>Sampleclass1 </em>class method 1;</pre><pre><strong>public</strong> <strong>void</strong> method_1(){</pre><pre>System.out.println(&quot;Method 1 from Parent class&quot;);<br>}<br>// the <em>Sampleclass1 </em>class method 2;</pre><pre><strong>public</strong> <strong>void</strong> method_2(){</pre><pre>System.out.println(&quot;Method 2 from Parent class&quot;);<br>}<br>}</pre><pre>// derived class<br><strong>class</strong> <em>Sampleclass2 </em><strong>extends</strong> <em>Sampleclass1</em>{</pre><pre>// the MountainBike subclass adds one more field<br><strong>public</strong> <strong>int</strong> var3;</pre><pre>// the <em>Sampleclass2 </em>subclass constructor</pre><pre><strong>public</strong> <em>Sampleclass2</em>(<strong>int</strong> var1, <strong>int</strong> var2, <strong>int</strong> va3){</pre><pre>// invoking <em>Sampleclass1</em> constructor<br><strong>super</strong>(var1, var2);<br>var3= var3;<br>}</pre><pre>// the <em>Sampleclass2 </em>class method 1;</pre><pre><strong>public</strong> <strong>void</strong> method_3(int var1, int var2, int var3){</pre><pre>System.out.println(&quot;Method 1 from Child class&quot;);<br>System.out.println(&quot;****** &quot; + &quot;Value 1: &quot; + var1 + &quot; Value 2: &quot; + var2 + &quot; Value 1: &quot; + var3 + &quot; *****&quot;);<br>}<br>}</pre><pre><strong>public</strong> <strong>class</strong> Test {</pre><pre><strong>public</strong> <strong>static</strong> <strong>void</strong> main(String args[]){</pre><pre><em>Sampleclass2 </em>sc = <strong>new</strong> <em>Sampleclass2</em>(3, 100, 25);</pre><pre>sc.method_1();<br>sc.method_2();<br>sc.method_3(3,100,25);<br>}<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*LMhXpuGqH1eATwHLCUsoWA.png" /><figcaption>Image by Author - sample output of the Java-Inheritance code</figcaption></figure><h3>Pillar 2 — Polymorphism</h3><p><strong><em>Poly (many) + morphs (forms) = Polymorphism</em></strong></p><p>As I mentioned above <strong><em>Polymorphism </em></strong>is related to having many forms that are allowed to have single action in different ways. As in a real-world scenario, a person is playing different roles in the home as a Parent for their children, Child to her parents, Grandchild to her GrandParents and etc.</p><p>Polymorphism is subdivided into 2 categories,</p><ol><li><strong><em>Compile-time Polymorphism</em></strong> =&gt; Static Polymorphism =&gt; Overloading</li></ol><p>Overloading can be achieved through multiple functions with the same name but passing the different numbers of arguments or different types of arguments.</p><p>The following examples will clarify the concept behind Overloading.</p><pre>class Sumofinputs {<br>    //2 methods has been declared with same name &quot;Sum&quot; &gt; <strong>Overloading</strong><br>    <strong><em>//Different types of arguments example</em></strong><br>  <br>    // Sum Method with <strong>int</strong> type 2 parameters <br>    static int Sum(int x, int y)<br>    {<br>        return x + y;<br>    }<br>  <br>    // Sum Method with <strong>double</strong> type 2 parameters<br>    static double Sum(double x, double y)<br>    {<br>        return x + y;<br>    }<br>}<br>  <br>public class Test {<br>    public static void main(String[] args)<br>    {<br>  <br>        System.out.println(Sumofinputs.Sum(2, 4));<br>  <br>        System.out.println(Sumofinputs.Sum(5.5, 6.3));<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*UeqcVyzKPWeYx3MqBNYrvw.png" /><figcaption>Image by Author — sample output of the Java-overloading code</figcaption></figure><pre>class Sumofinputs {<br>    //2 methods has been declared with same name &quot;Sum&quot; &gt; <strong>Overloading</strong><br>    <strong>//<em>Different number of arguments example</em></strong><br>  <br>    // Sum Method with 2 parameters <br>    static int Sum(int x, int y)<br>    {<br>        return x + y;<br>    }<br>  <br>    // Sum Method with 3 parameters<br>    static int Sum(int x, int y, int z)<br>    {<br>        return x + y + z;<br>    }<br>}<br>  <br>public class Test {<br>    public static void main(String[] args)<br>    {<br>  <br>        System.out.println(Sumofinputs.Sum(2, 4));<br>  <br>        System.out.println(Sumofinputs.Sum(2, 4, 6));<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*ABE4D7grn9Zf4FciPxO6iw.png" /><figcaption>Image by Author — sample output of the above Java-overloading code</figcaption></figure><p>2.<strong><em> Run time Polymorphism</em></strong> =&gt; Dynamic Method Dispatch =&gt; Overriding</p><p>Overridden methods will be resolved at the run time and overriding is a way that the methods are declaring at the child classes such, declared same as in the parent class.</p><p>The following example will clarify the concept behind Overriding.</p><pre>class Sampleclass1 {<br>    //Parent class method that is overriding <br>    void method_1()<br>    {<br>        System.out.println(&quot;Method from Parent class&quot;);<br>    }<br>}<br>    //Child class 1 with overriden method<br>class Sampleclass2 extends Sampleclass1 {<br>  <br>    void method_1()<br>    {<br>        System.out.println(&quot;Method from Sampleclass2 class&quot;);<br>    }<br>}<br>    //Child class 2 with overriden method<br>class Sampleclass3 extends Sampleclass1 {<br>  <br>    void method_1()<br>    {<br>        System.out.println(&quot;Method from Sampleclass3 class&quot;);<br>    }<br>}<br>  <br>public class Test {<br>    public static void main(String[] args)<br>    {<br>  <br>        Sampleclass1 sc;<br>  <br>        sc = new Sampleclass2();<br>        sc.method_1();<br>  <br>        sc = new Sampleclass3();<br>        sc.method_1();<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*SsQ1C5BptY4SYOExjASqBg.png" /><figcaption>Image by Author — sample output of the Java-overriding code</figcaption></figure><h3>Pillar 3— Abstraction</h3><p>The <strong><em>abstraction </em></strong>concept is used to hide unnecessary details from the user and display only necessary details.</p><p>A simple real-world example is, consider bank ATM or CDM machine that we can withdraw and deposit money. We only do pressing necessary buttons, take money through the machine, put money into the machine, and observe the machine display. But we exactly do not know what is the implementation of the machine. The same kind of thing is happening in the Abstraction concept.</p><p>I will use the Java <strong><em>interface </em></strong>and <strong><em>abstract </em></strong>class to make understand the scenario. Before going to the implementations, we should have a basic idea about the Abstract class and the Abstract method.</p><ul><li>An abstract class is declared with the “abstract” keyword</li><li>An abstract class has one or more abstract methods and it can have concrete methods also. But it is necessary to mention that non-abstract classes may not have abstract methods.</li><li>An abstract method is a method without implementation(method body) and just contains only method definition.</li></ul><p>The following example will clarify the concept behind Abstraction.</p><pre>abstract class Sampleclass1{  <br>  abstract void method();  <br>}  <br>class Sampleclass2 extends Sampleclass1{  <br>void method(){<br>    System.out.println(&quot;Sampleclass2 class method&quot;);<br>    }  <br>}<br>public class Test {<br>public static void main(String args[]){  <br> Sampleclass1 sc = new Sampleclass2();  <br> sc.method();  <br>}  <br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*8-gX7-EbXB6nifAV9Lkszg.png" /><figcaption>Image by Author — sample output of the Java-Abstraction code</figcaption></figure><h3>Pillar 4 — Encapsulation</h3><p>The major purpose of the <strong><em>Encapsulation </em></strong>principle is to hide class data and variables from one class to another class or wrapping up data and functions into a single unit. This can be done through declaring variables as private in the class and implement public methods.</p><p>A simple real-world example is an organization that may contain several departments that are using a common website but each other departments can not access data from them. This concept ensures accuracy and reduces unexpected distractions on data.</p><p>The following example will clarify the concept behind Encapsulation.</p><pre>class Sampleclass1 {<br>    // <strong>private </strong>variables var1 and var2 declared &amp; these can only be accessed by public methods of class<br>;<br>    <strong>private</strong> int var1;<br>    <strong>private</strong> int var2;<br> <br>    // get method for var1 to access private variable var1<br>    public int getVar1() { return var1; }<br> <br>    // get method for var1 to access private variable var1<br>    public int getVar2() { return var2; }<br> <br>    // set method for var1 to access private variable var1<br>    public void setVar1(int newVar1) { var1 = newVar1; }<br> <br> <br>    // set method for var1 to access private variable var1<br>    public void setVar2(int newVar2) { var2 = newVar2; }<br>}<br> <br>public class Test {<br>    public static void main(String[] args)<br>    {<br>        Sampleclass1 sc = new Sampleclass1();<br> <br>        // setting values of the variables<br>        sc.setVar1(10);<br>        sc.setVar2(20);<br> <br>        // Displaying values of the variables<br>        System.out.println(&quot;1: &quot; + sc.getVar1());<br>        System.out.println(&quot;2: &quot; + sc.getVar2());<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*lu5mg1UXR7ghPs2QfDvz1Q.png" /><figcaption>Image by Author — sample output of the Java-Encapsulation code</figcaption></figure><p>Cool… 😊 We did it...</p><h3>Conclusion</h3><blockquote>This article provides you the things that you should basically know about Object-Oriented Programming and example will interpret the coding implementations.</blockquote><p>Hope you enjoyed the article and if so hit a clap.</p><p>Thank you for reading!!!🤗</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7445928baf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coderbyte/lets-get-to-know-about-object-oriented-programming-e7445928baf">Let’s get to know about Object-Oriented Programming</a> was originally published in <a href="https://medium.com/coderbyte">Tech x Talent</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data passing in parent and child component with Angular]]></title>
            <link>https://levelup.gitconnected.com/data-passing-in-parent-and-child-component-with-angular-652e7fd43626?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/652e7fd43626</guid>
            <category><![CDATA[input-output]]></category>
            <category><![CDATA[data-exchange]]></category>
            <category><![CDATA[eventemitter]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Mon, 12 Jul 2021 18:19:55 GMT</pubDate>
            <atom:updated>2021-07-12T18:19:55.722Z</atom:updated>
            <content:encoded><![CDATA[<h4>@Input, @Output, and EventEmitter</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZh9rLHi2oD-d-hJkfipRA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@casparrubin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Caspar Camille Rubin</a> on <a href="https://unsplash.com/s/photos/angular?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>When developing applications we need to pass data from one component to another in several incidents. Here in this article, I will try to provide detailed information about how Angular @Input, @Output decorators, and EventEmitter can be used to pass data among parent and child components. Hence I have identified two major criteria to accomplish this:</p><ol><li>Data exchange from parent to child</li><li>Data exchange from child to parent</li></ol><p>Now I will explain how we can accomplish the above-mentioned criteria using @Input, @Output, and EventEmitter. In this case, I have created an Angular project named “parent-child” with two components such parent component as AppComponent and the child component as ChildComponent.</p><p>@Input Decorator: This is used to define an input property and it is used to send data from parent component to child component.</p><p>@Output Decorator: This is used to bind a property of the type of Angular EventEmitter class and it is used to pass data from child component to parent component.</p><p><a href="https://angular.io/api/core/EventEmitter">EventEmitter</a>: This is used to emit events in components. Use in components with the @Output directive to emit custom events synchronously or asynchronously, and register handlers for those events by subscribing to an instance.</p><p>After getting a brief idea about @Input, @Output, and EventEmitter terms let’s focus on implementations.</p><h4>Exchanging data from parent component to child component</h4><p>As I mentioned before AppComponent is the parent component and you can customize app.component.html as you wish. Here I created an instance of the child component. &lt;hr&gt; tag will separate the parent and child components.</p><pre>&lt;h1&gt;Angular - Parent child component data passing&lt;/h1&gt;<br>&lt;h4&gt;Parent Component&lt;/h4&gt;<br>&lt;hr&gt;&lt;hr&gt;<br>&lt;app-child&gt;&lt;/app-child&gt;</pre><p>After that, using app.component.ts I send a message to the child by passing a string under the parameter called “inputText”.</p><pre>import { Component } from &#39;@angular/core&#39;;<br>@Component({<br>selector: &#39;app-root&#39;,<br>templateUrl: &#39;./app.component.html&#39;,<br>styleUrls: [&#39;./app.component.css&#39;]<br>})<br>export class AppComponent {<br>inputText: string = &#39;Hi...have a nice day - message from parent&#39;;</pre><pre>}<br>}</pre><p>The message sent by the parent component(AppComponent) will be received by the child component(ChildComponet). Then app.component.html passes this variable inside the child component instance, which is passed inside the parent component. We need to create a string variable called “inputFromParent” under the @Input Decorator and inside the child.component.ts. That “inputFromParent” will help to fetch the message from the parent.</p><pre>&lt;app-child [inputFromParent] = &quot;inputText&quot;&gt;&lt;/app-child&gt;</pre><p>By using @Input Decorator(import from @angular/core) it will be captured by the child component. It will display using a console.log. Therefore child.component.ts code should be as follows.</p><pre>import { Component, EventEmitter, Input, OnInit, Output } from &#39;@angular/core&#39;;<br>@Component({<br>selector: &#39;app-child&#39;,<br>templateUrl: &#39;./child.component.html&#39;,<br>styleUrls: [&#39;./child.component.css&#39;]<br>})<br>export class ChildComponent implements OnInit {<br>@Input() inputFromParent : string;<br>constructor() { }<br>ngOnInit() {<br>console.log(this.inputFromParent);</pre><pre>}<br>}</pre><p>Happy😊 !!!! Now you have successfully completed the data passing from parent to child component using @Input Decorator. Your console will print “Hi…have a nice day — message from parent”.</p><h4>Exchanging data from child component to parent component</h4><p>Using @Output Decorator and EventEmitter (import from @angular/core) child component will send data to the parent component. First, we need to create a variable called “outputFromChild” with @Output Decorator, and another variable called “outputText” is needed to store and pass the message to the parent component in the child.component.ts.</p><pre>@Output() outputFromChild : EventEmitter&lt;string&gt; = new EventEmitter();<br>outputText : string = &quot;Hi ... message from child&quot;;</pre><p>Then to show that message in our console, we need to have a button in our ChildComponent and add it to child.component.html. To fire the click we need to have a method called “sendDataToParent”.</p><pre>&lt;button class=&quot;btn btn-success&quot; (click)=&quot;sendDataToParent()&quot;&gt;Send to Parent&lt;/button&gt;</pre><p>“sendDataToParent” method will implement by emitting the “outputText” in the ChildComponent.</p><pre>sendDataToParent() {<br>this.outputFromChild.emit(this.outputText);<br>}</pre><p>Now we need to implement a method called “receiveChildData” in the app.componet.ts to receive the message from the ChildComponent.</p><pre>receiveChildData(data){<br>console.log(data);<br>}</pre><p>To fetch the value, app.component.html must be like below.</p><pre>&lt;app-child [inputFromParent] = &quot;inputText&quot; (outputFromChild) = &quot;receiveChildData($event)&quot;&gt;&lt;/app-child&gt;</pre><p>Then if we click the create button in the child component, “sendDataToParent()” method will fire and the parent component will receive data from ChildComponent and the console shows “Hi … message from child”</p><p>Now we successfully completed the sending data from the child component to the parent component.</p><p>Summary of the output;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCllZkIFl8UVZVs_WuXTQQ.png" /></figure><p>Here is the <a href="https://github.com/Prathibha95/Parent-Child-Component-Data_Passing.git">link </a>to the GitHub repository.</p><p>Thank you for reading 🤗 !!! Hit a clap if this article is helpful for you.</p><h4>Reference</h4><ul><li><a href="https://www.c-sharpcorner.com/article/input-and-output-decorator-in-angular/"><em>@Input() And @Output() Decorator In Angular</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=652e7fd43626" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/data-passing-in-parent-and-child-component-with-angular-652e7fd43626">Data passing in parent and child component with Angular</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[reCAPTCHA Validation]]></title>
            <link>https://levelup.gitconnected.com/recaptcha-validation-f0c0aea02caa?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0c0aea02caa</guid>
            <category><![CDATA[recaptcha]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[google-recaptcha]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Mon, 05 Jul 2021 15:19:56 GMT</pubDate>
            <atom:updated>2021-07-06T05:05:06.731Z</atom:updated>
            <content:encoded><![CDATA[<h4>Google reCAPTCHA with Angular forms</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*h_qhRS1xcB_MN4U3" /><figcaption>Photo by <a href="https://unsplash.com/@xps?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">XPS</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>When we deal with some websites you may experience that there is a validation called reCAPTCHA, which proves that you are not a robot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*xqDQCtfP4jJFH8VtOGB8mQ.png" /><figcaption>reCAPTCHA — Image by Author</figcaption></figure><p>reCAPTCHA is a type of Human Interaction Proof and CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart. It is owned by Google and it has several types like type a word or tick matching images to do the validation using reCAPTCHA. It is a kind of a challenge that helps to identify real users and the computer programs that they are deal with.</p><p>Let’s look into how to add reCAPTCHA validation to your application using the Angular framework.</p><ol><li>You can add this to your existing Angular project or if not you can create a new project using ng new your_project_name.</li></ol><p>After the successful creation of the Angular project, it is needed to open the project and open the terminal.</p><p>2. In order to add CAPTCHA validation to your project it is necessary to install “<a href="https://www.npmjs.com/package/ngx-captcha">NgxCaptchaModule</a>” to the existing project. Therefore open your terminal and use this command npm i ngx-captcha .</p><p>3. Then import “NgxCaptchaModule” to the app.module.ts.</p><p>It is important to notice that, most of the time we use CAPTCHA validation in a form. Therefore we need to implement an Angular form using “ReactiveFormsModule” and “FormsModule”. For that purpose make sure to import “ReactiveFormsModule” and “FormsModule” to the app.module.ts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kN80eKDD-Rzomf7Ee5XvRQ.png" /><figcaption>app.module.ts — Image by Author</figcaption></figure><p>4. Then we need to create a form in the app.component.html and app.component.ts as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*1E_9wYf3-HFrDZH-cD5F7Q.png" /><figcaption>app.component.html — Image by Author</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_gvas_vJQFIq_PTsvcsvw.png" /><figcaption>app.component.ts — Image by Author</figcaption></figure><p>Under the ngx-recaptcha2 tag in app.component.html, there are <a href="https://www.npmjs.com/package/ngx-captcha">several parameters</a> you can customize. But in this case, we need only the “siteKey” and “formControlName”. In your app.component.ts, import necessary modules and create necessary variables. Here there is a field called site key. You need to get it by registering on Google reCAPTCHA by visiting <a href="https://www.google.com/recaptcha/admin/create">https://www.google.com/recaptcha/admin/create</a>. When you are going to get the site key, it is needed to fill the following mentioned fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n6S7NtssgQ97RBNvEXwiyw.png" /></figure><p>Here you have to provide your website name as the label. Then need to choose either v3 or v2 version of Google reCAPTCHA validation. After that provide localhost as Domain. Under the “Owners”, it will come as an automatically filled area with your email that used to sign in to your Google Account. Then put a tick if you are agreed to the Terms and Conditions provides by Google reCAPTCHA. Then click the “Submit” button.</p><p>Then you will redirect to the page that has the “siteKey” and copy the key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SE5XvOG0dVboWcU0WL-s1g.png" /></figure><p>5. Then move to your app.component.ts file and paste the siteKey by creating an instance of siteKey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2aHpeSzc6nC9zlQAcN_TcQ.png" /></figure><p>Now save all the changes and run the project. You can observe that your Angular web page contains the CAPTCHA validation. After you can customize your own form fields and do further form implementations. As an example, you can disable submit button till the CAPTCHA response validates. By below piece of code adding to the app.component.html, you can disable the submit button of the form which you have created. (Here button has added MD Bootstrap stying)</p><pre>&lt;button type=&quot;button&quot; mdbBtn color=&quot;primary [disabled]=&quot;!aFormGroup.valid&quot;&gt;Submit&lt;/button&gt;</pre><p>By doing the above steps you can successfully create an Angular form with reCAPTCHA validation.</p><p>Thank you for reading. Hit a clap if this article is useful for you!!! 🤗</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0c0aea02caa" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/recaptcha-validation-f0c0aea02caa">reCAPTCHA Validation</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Converting Angular Web Application into Ionic App]]></title>
            <link>https://levelup.gitconnected.com/converting-angular-web-application-into-ionic-app-5af678325626?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5af678325626</guid>
            <category><![CDATA[cordova]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Mon, 07 Jun 2021 15:47:16 GMT</pubDate>
            <atom:updated>2021-06-07T15:47:16.940Z</atom:updated>
            <content:encoded><![CDATA[<h4>Better guidance to create a mobile app for an existing Angular application</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*RoXtKSSRnY50EXD4E4AfHQ.png" /><figcaption>Google Image</figcaption></figure><p>In the software industry, after you successfully built a web application aligned with the client requirements, you may be asked to build a mobile application for the same web application to address mobile users&#39; requirements. Therefore this article will provide you with better guidance to convert an existing web application developed using Angular into an Ionic native app by simple and detailed instructions.</p><blockquote>Angular is a famous front-end web development framework which is Typescript-based and open source. Angular is a developed version of AngularJS. Angular Components are used to modify our program HTML, CSS, and logic. Angular Services can be injected into Components and by adding services our code can be reusable.</blockquote><blockquote>Ionic is a mobile application development framework which is an open-source SDK and guides to build HTML5 mobile applications. Ionic can handle mobile UIs in an efficient manner by bringing mobile app feeling to the user.</blockquote><p>First, you must have an existing Angular project (assume that project is named “angular-ionic”), or if not you must create it using the following CLI command.</p><pre>ng new angular-ionic</pre><p>Then you must navigate to that newly created directory or if you have an existing project, move to that directory using the following command.</p><pre>cd angular-ionic</pre><p>Our purpose is to create a mobile app for the same web application, therefore it is needed to add Ionic to the existing project. To do that you can use the Angular CLI command “ng add” to import Ionic packages to the existing project. The following command will help you to do that.</p><pre>ng add @ionic/angular</pre><p>After successful package installation, you will take the output as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*mydSm5njMPLgYeagTqb-aQ.png" /></figure><p>Then you must initialize your existing project with Ionic by using the following command. <strong>If you use this command you will ask a question to enter your project name. Make sure to enter the project name as your existing project name. In this case project name is angular-ionic.</strong></p><pre>ionic init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*8zr1nFhZWFzgFeAdb-do7w.png" /></figure><p>After successful initialization of Ionic to the project, you should be done below 2 changes to the angular.json file which provides details about project-specific configurations.</p><ol><li>Change outputPath “dist/angular-ionic” to <strong>“www” </strong>in the angular.json file to set folders to build Ionic project for www.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*dDbJVYAvjmHTVtkuFpuyrA.png" /></figure><p>2. Change &lt;base href=”/”&gt; into <strong>&lt;base href=”./”&gt;</strong> in the index.html file. &lt;base href=””&gt; defines the base URL for all the relative URL is the document and by <a href="https://stackoverflow.com/questions/48555550/what-does-href-means-in-angular-2-4">default, it is set to root.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*BuFwI6P_CRVFJUWerfaAHA.png" /></figure><p>After doing the above changes you can create an Android APK for your project and use the following command to do so.</p><blockquote>Here you can see that with use of <a href="https://cordova.apache.org/docs/en/10.x/guide/overview/index.html">cordova</a> we could render our web application into a native web view. Cordova is an open source framework which can be used to implement native application for various mobile platforms by using <a href="https://ionic.io/resources/articles/what-is-apache-cordova">HTML, CSS, and JavaScript contents</a>.</blockquote><p>Your built Android APK can be found under the platform&#39;s root folder and move with “platforms\android\app\build\outputs\apk\debug”. You can install it via mobile phone or by enabling the emulator you can see your Ionic mobile app!!!</p><pre>ionic cordova run android --project=&quot;angular-ionic&quot;</pre><p>Great… You will end up with a mobile application that has been built upon your web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*0JesEE3CrcSYbLFimDZMLQ.jpeg" /></figure><p>It is important to notice that, you may have to fix mobile responsiveness issues of your native app like alignment issues, the appearance of icons and images, spacing issues, etc.</p><h3>Conclusion</h3><p><strong>T</strong>his article provides you, how to build a mobile app for existing Angular applications using Ionic. By following the above instructions you will end up with the successful creation of a mobile app.</p><p>Thank you for reading 😊!!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5af678325626" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/converting-angular-web-application-into-ionic-app-5af678325626">Converting Angular Web Application into Ionic App</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Frequent pattern mining, Association, and Correlations]]></title>
            <link>https://medium.com/data-science/frequent-pattern-mining-association-and-correlations-8fa9f80c22ef?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fa9f80c22ef</guid>
            <category><![CDATA[frequent-pattern]]></category>
            <category><![CDATA[weka]]></category>
            <category><![CDATA[apriori]]></category>
            <category><![CDATA[data-mining]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Sun, 06 Jun 2021 16:38:30 GMT</pubDate>
            <atom:updated>2022-12-28T05:43:22.939Z</atom:updated>
            <content:encoded><![CDATA[<h4>Identifying frequent patterns of a data set using Apriori Algorithm and Associate data set through Weka software</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_GZO1oEtSkFY405QQK02VA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@marvelous?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Marvin Meyer</a> on <a href="https://unsplash.com/s/photos/technology?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In Data Mining, Frequent Pattern Mining is a major concern because it is playing a major role in Associations and Correlations. First of all, we should know what is a Frequent Pattern?</p><blockquote>Frequent Pattern is a pattern which appears frequently in a data set. By identifying frequent patterns we can observe strongly correlated items together and easily identify similar characteristics, associations among them. By doing frequent pattern mining, it leads to further analysis like clustering, classification and other data mining tasks.</blockquote><p>Before moving to mine frequent patterns, we should focus on two terms which “support” and “confidence” because they can provide a measure if the Association rule is qualified or not for a particular data set.</p><p><strong>Support</strong>: how often a given rule appears in the database being mined</p><p><strong>Confidence</strong>: the number of times a given rule turns out to be true in practice</p><p>Let’s practice it through a sample data set;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*3LkRNrxB55SWXClU4kxkfw.png" /><figcaption>Image by Author</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*wnVdZYwfeL1oOAx_1eV3lA.png" /><figcaption>support calculation — Image by Author</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*UvwSf6QUqi8g5NMw4X7CCQ.png" /><figcaption>confidence calculation — Image by Author</figcaption></figure><p>Example: One of possible Association Rule is A =&gt; D</p><p>Total no of Transactions(N) = 5</p><p>Frequency(A, D) = &gt; Total no of instances together A with D is 3</p><p>Frequency(A) =&gt; Total no of occurrence in A</p><p>Support = 3 / 5</p><p>Confidence = 3 / 4</p><p>After getting a clear idea about the two terms Support and Confidence, we can move to frequent pattern mining. Frequent pattern mining, there are 2 categories to be considered,</p><ol><li>Mining frequent pattern with candidate generation</li><li>Mining frequent pattern without candidate generation</li></ol><p>In this article, we are focusing on Mining frequent patterns with candidate generation with Apriori Algorithm which is popularly used for Association mining. Let’s understand Apriori Algorithm with an example and it will help you to understand the concept behind it in a clear manner. Let’s consider the sample data set mentioned above and assume that the <strong>minimum support=2</strong>.</p><ol><li><strong>Generate Candidate set 1, do the first scan and generate One item set</strong></li></ol><p>In this stage, we get the sample data set and take each individual’s count and make frequent item set 1(K = 1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*nJCDQ2ghV554jn4dK6VX1w.png" /><figcaption>Candidate set 1</figcaption></figure><p>“Candidate set 1” figure shows you the individual item Support count. Hence the minimum support is 2 and based on that, item E will remove from the Candidate set 1 as an infrequent item (disqualified).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*1qpzZrckQl1vybYYDDExwQ.png" /><figcaption>Frequent itemset from the first scan</figcaption></figure><p>Frequent itemset based on the minimum support value will be shown under the figure “Frequent item set from the first scan” as the “<strong>One item set</strong>”.</p><p><strong>2. Generate Candidate set 2, do the second scan and generate Second item set</strong></p><p>Through this step, you create frequent set 2 (K =2) and takes each of their Support counts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*gjetx2BB8ejqkRtWuzWltg.png" /><figcaption>Candidate set 2</figcaption></figure><p>“Candidate set 2” figure generates through joining Candidate set 1 and takes the frequency of related occurrences. Hence the minimum support is 2, Itemset B, D will be removed from Candidate set 2 as an infrequent item set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*KBqNzc4mp-DlBeJc36XubA.png" /><figcaption>Frequent item set from the second scan</figcaption></figure><p>“Frequent item set from the second scan” is the frequent itemset based on the minimum support value and it will generate the “<strong>Second item set</strong>”.</p><p><strong>3. Generate Candidate set 3, do the third scan and generate Third item set</strong></p><p>In this iteration create frequent set 3 (K = 3) and take count of Support. Then compare with the minimum support value from the Candidate set 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*HV7oO7fx9hseSNdPS50I5w.png" /><figcaption>Candidate set 3</figcaption></figure><p>As you can see here we compare Candidate set 3 with the minimum support value, generated Third item set. The frequent set from the third scan is the same as above.</p><p><strong>4. Generate Candidate set 4, do the fourth scan and generate Fourth item set</strong></p><p>By considering the Frequent set, we can generate Candidate set 4, by joining Candidate set 3. Then possible Candidate set 4 is; [A, B, C, D] which has minimum support less than 2. Therefore we have to stop the calculation from here because we can not go no any more iterations. Therefore for the above data set frequent patterns are <strong>[A, B, C]</strong> and <strong>[A, C, D]</strong>.</p><p>By considering one of the frequent set as{A, B, C} and the possible Association rules as follows;</p><ol><li>A =&gt; B, C</li><li>A, B =&gt; C</li><li>A, C =&gt; B</li><li>B =&gt; A, C</li><li>B, C =&gt; A</li><li>C =&gt; A, B</li></ol><p>Then we assume that the minimum confidence = 50% and calculate each possible Association rules’ Confidence then we can identify disqualified ones with respect to minimum confidence is less than 50%. Then rest of the Association rules which have the Confidence greater or equal to 50% percent those are qualified rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*W4wyE6a7wBH3A-Hk8LVXlQ.png" /><figcaption>Image by Author</figcaption></figure><p>As you can see in the Apriori Algorithm, for each step it is generating candidates and it is taking much time when the list of candidates becomes larger.</p><h4>Here is the pseudo-code for Apriori Algorithm;</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*AwMeqEtGRn0Hau5oBnEpmQ.png" /><figcaption>Photo from <a href="https://www.researchgate.net/publication/227487186_RESEARCH_ISSUES_CONCERNING_ALGORITHMS_USED_FOR_OPTIMIZING_THE_DATA_MINING_PROCESS">Research issues concerning algorithms used for optimizing the data mining process</a> (2010)</figcaption></figure><p>Now let’s focus on how to do Association using <a href="https://www.tutorialspoint.com/weka/what_is_weka.htm">Weka</a>. You can follow the below steps.</p><ol><li>Open Weka software and click the “Explore” button.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*apNcDGlcwpShs8XJTtPrrg.png" /><figcaption>Weka Initial GUI — Image by Author</figcaption></figure><p>After clicking the “Explorer” button you will get a new window named “Weka Explorer”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*6JKVttcI1RMPG1MJAf_ZHA.png" /><figcaption>Weka Explorer — Image by Author</figcaption></figure><p>2. Open a preferred data set</p><pre>Weka Explorer &gt; Preprocess &gt; Open File</pre><p>By following the above order you can load a data set by selecting an in-built data set or any data set that you want to apply to the Apriori Algorithm.</p><p>After opening the selected file you can see the attributes and other statistics under the Preprocess tab. Then you can click the “Edit” button to open the current data set in a Viewer for editing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*Ay_e1DVPgUEsWQ_1yj-ouQ.png" /><figcaption>Edit Button in Preprocess tab — Image by Author</figcaption></figure><p><em>♦♦♦♦♦♦♦♦♦ It is important to notice that, your data set includes numerical data you can discretize them using a filter called “Discretize” under the Preprocess tab♦♦♦♦♦♦♦♦♦</em></p><p>3. Go to the Associate tab and choose Apriori, using the choose button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*JhC2i273io8BqHU4Cqtrqg.png" /><figcaption>Selecting Apriori Algorithm — Image by Author</figcaption></figure><p>4. Left click on Apriori and select “Show properties..”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*pKArAPlV914X9qP70TFanA.png" /><figcaption>Show Properties — Image by Author</figcaption></figure><p>5. Customise the algorithm properties and then click on “Save”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*v-Zu0l7FWfocrz5qLfJtLw.png" /><figcaption>Configure algorithm properties — Image by Author</figcaption></figure><p>As an example, we can change the number of rules which you obtained from the data set after the Association is done.</p><p>6. Click on the “Start” button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*iwq-IEp-JMdHPV-TeoKF1w.png" /><figcaption>Image by Author</figcaption></figure><p>♦♦♦♦<em>It is important to notice that you will not enable the “Start” button if it does not have discrete data which is chosen to do Association</em>♦♦♦♦♦♦♦</p><p>7. Observe the results</p><p>Associator output is as follows and in this case, Algorithm has found the 10 best rules for the provided data set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*E13Hr4ojaPPqQ12YWgWFDQ.png" /><figcaption>Final Result after Association Applied — Image by Author</figcaption></figure><h4>Conclusion</h4><p>This article provides you with some facts that you may know about Frequent pattern mining, Apriori Algorithm, Support, Confidence, and how to proceed with Association through Weka software. Hope this article will help you to enhance your knowledge about the above-mentioned points.</p><p>Thank you for reading 🤗 !!!!!</p><p>Reference</p><p>[1] Ion Lungu, Alexandru Pirjan, <a href="https://www.researchgate.net/publication/227487186_RESEARCH_ISSUES_CONCERNING_ALGORITHMS_USED_FOR_OPTIMIZING_THE_DATA_MINING_PROCESS">Research issues concerning algorithms used for optimizing the data mining process</a> (2010)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fa9f80c22ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/frequent-pattern-mining-association-and-correlations-8fa9f80c22ef">Frequent pattern mining, Association, and Correlations</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s make a five star rating page using Angular]]></title>
            <link>https://medium.com/coderbyte/lets-make-a-five-star-rating-page-using-angular-f9509fdd682d?source=rss-ef48fbcf9d2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9509fdd682d</guid>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Prathibha Perera]]></dc:creator>
            <pubDate>Thu, 27 May 2021 19:14:09 GMT</pubDate>
            <atom:updated>2021-05-27T19:14:09.628Z</atom:updated>
            <content:encoded><![CDATA[<h4>Easy and essential steps for implementing a rating page</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*Tcq4j_NX9qcqop_gxOb-AQ.jpeg" /><figcaption>Image Source : Google Image</figcaption></figure><p>This article helps you to create a five star rating page using Angular. First you need to create an Angular project. In order to implement five star rating page it is needed to install Angular powered Bootstrap widgets using following command as for the first step.</p><p>npm i @ng-bootstrap/ng-bootstrap</p><p>After successfully installing it, you can use NgbModule import to the app.module.ts as follows as for the second step.</p><figure><img alt="NgbModule import to the app.module.ts" src="https://cdn-images-1.medium.com/max/760/1*X8cV6GJcDsXC7MmVS4TUoA.png" /><figcaption>app.module.ts</figcaption></figure><p>After successfully adding the module to app.module.ts, you can use following code piece to the app.component.html as for the third step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*I_czbeAcqqPbquzU3nfxaA.png" /><figcaption>app.component.html</figcaption></figure><p>In the ngb-rating tag there some parameters you need to know and this link will provide more information on that,</p><p><a href="https://ng-bootstrap.github.io/#/components/rating/api"><strong><em>https://ng-bootstrap.github.io/#/components/rating/api</em></strong></a></p><p>Then if you prefer to add some css properties you can add them to the app.component.css. In there you can customise star size, filled colour and non-filled colour as you wish. In this example rating is counting under a form content and submit button also added. Therefore in the fourth step you can implement submitForm() function with a resetForm() which is a predefined function of model driven forms. There you have to rest your rating values to zero. At the end app.component.ts shows like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*QnElWB-AUpTdSB8U_QuqZQ.png" /><figcaption>app.component.ts</figcaption></figure><p>After following above steps you will be having a five star rating page like bellow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*-6XVgMtqy55A_dpsmAWVJA.gif" /><figcaption>Sample Rating Page</figcaption></figure><p>By following above simple steps you can make five start rating app an easier manner. For more details, you can refer this GitHub repository, <a href="https://github.com/Prathibha95/Five_star_rating.git"><strong><em>https://github.com/Prathibha95/Five_star_rating.git</em></strong></a></p><h3>Conclusion</h3><p>You can simple implement a five star rating page using NgbModule in Angular and. It can be effectively customised and rated star values can be passed to database easily. Hope this may help with your implementations.</p><p>Thank you for reading….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9509fdd682d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coderbyte/lets-make-a-five-star-rating-page-using-angular-f9509fdd682d">Let’s make a five star rating page using Angular</a> was originally published in <a href="https://medium.com/coderbyte">Tech x Talent</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>