<?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"><channel><title><![CDATA[Open Construct]]></title><description><![CDATA[Open Construct]]></description><link>https://blog.junaidahmed.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 12:33:54 GMT</lastBuildDate><atom:link href="https://blog.junaidahmed.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Installing Homebrew on Mac]]></title><description><![CDATA[What is homebrew?
Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple's operating system, macOS, as well as Linux. The name is intended to suggest the idea of building software o...]]></description><link>https://blog.junaidahmed.dev/installing-homebrew</link><guid isPermaLink="true">https://blog.junaidahmed.dev/installing-homebrew</guid><category><![CDATA[Homebrew]]></category><category><![CDATA[macOS]]></category><category><![CDATA[package manager]]></category><category><![CDATA[#howtos]]></category><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Mon, 30 Jan 2023 16:01:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/4YGnHc8Krz4/upload/83d55779ddb293eba5379487edca2eda.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-what-is-homebrew">What is homebrew?</h2>
<p><strong>Homebrew</strong> is a free and open-source software package management system that simplifies the installation of software on Apple's operating system, macOS, as well as Linux. The name is intended to suggest the idea of building software on the Mac depending on the user's taste.</p>
<h2 id="heading-what-does-homebrew-do">What Does Homebrew Do?</h2>
<ul>
<li><p>Homebrew installs <strong>the stuff you need</strong> that Apple (or your Linux system) didn’t.</p>
</li>
<li><p>It makes installing lots of different software like Git, Ruby, and Node simpler.</p>
</li>
<li><p>It lets you avoid possible security problems associated with using the <code>sudo</code> command to install the software.</p>
</li>
<li><p><code>To install, drag this icon…</code> no more. Homebrew Cask installs macOS apps, fonts and plugins and other non-open source software.</p>
</li>
</ul>
<h2 id="heading-prerequisites">Prerequisites</h2>
<ul>
<li><p><strong>You should have some familiarity with the Mac Terminal application</strong> since you’ll need to use it to install Homebrew. The Terminal application is located in the Utilities folder in the Applications folder. Alternatively, you can press ⌘ + space to open up the spotlight &amp; search for the terminal.</p>
</li>
<li><p><strong>Dependencies.</strong> You need to install one other piece of software before you can install Homebrew:</p>
</li>
<li><p><strong>Xcode.</strong> Install Apple’s Xcode development software: <a target="_blank" href="http://itunes.apple.com/us/app/xcode/id497799835?ls=1&amp;mt=12">Xcode in the Apple App Store</a>.</p>
</li>
</ul>
<h2 id="heading-how-to-install-homebrew">How to Install Homebrew</h2>
<ul>
<li><p>Open the Terminal app &amp; type either one of these commands:</p>
</li>
<li><pre><code class="lang-bash">  /bin/bash -c <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)</span>"</span>

  <span class="hljs-comment"># OR</span>
  <span class="hljs-comment"># If you want to run the Homebrew installer non-interactively without prompting for passwords (e.g. in automation scripts), you can use:</span>
  NONINTERACTIVE=1 /bin/bash -c <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)</span>"</span>
</code></pre>
</li>
</ul>
<ul>
<li>The <strong>interactive</strong> script explains what it will do and then pauses before it does it. Read about other <a target="_blank" href="https://docs.brew.sh/Installation">installation options</a>.</li>
</ul>
<h2 id="heading-how-to-update-homebrew">How to Update Homebrew</h2>
<p>New versions of Homebrew come out frequently, so make sure you update it before updating any of the other software components that you’ve installed using Homebrew.</p>
<ul>
<li><p>In Terminal type <code>brew update</code></p>
</li>
<li><pre><code class="lang-bash">  /bin/bash -c <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)</span>"</span>

  <span class="hljs-comment"># &amp; If you want to run the Homebrew uninstaller non-interactively, you can use: </span>
  NONINTERACTIVE=1 /bin/bash -c <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)</span>"</span>
</code></pre>
</li>
</ul>
<h2 id="heading-how-to-uninstall-homebrew">How to Uninstall Homebrew</h2>
<ul>
<li><p>Open the Terminal app</p>
</li>
<li><p>```bash
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"</p>
</li>
</ul>
<pre><code>#If you want to run the Homebrew uninstaller non-interactively, you can use:
NONINTERACTIVE=<span class="hljs-number">1</span> /bin/bash -c <span class="hljs-string">"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"</span>
<span class="hljs-string">``</span><span class="hljs-string">`</span>
</code></pre><ul>
<li>This downloads and runs the uninstaller script. Follow the instructions and Homebrew will be removed from your computer.</li>
</ul>
<p><strong>Last but not least</strong>, refer to this <a target="_blank" href="https://github.com/Homebrew/install#homebrew-uninstaller">official github page</a> for latest information about how to install &amp; uninstall Homebrew.</p>
]]></content:encoded></item><item><title><![CDATA[How to convert your SIM network from Jazz to Zong]]></title><description><![CDATA[This article is for you if you have a:

non-PTA iPhone

Jazz SIM - that you use primarily

Zong SIM - optional


I have been a Mobilink/Jazz user for years now & I use only 1 SIM. My iPhone is meant to be used for a couple of months so I don't have t...]]></description><link>https://blog.junaidahmed.dev/how-to-convert-your-sim-network-from-jazz-to-zong</link><guid isPermaLink="true">https://blog.junaidahmed.dev/how-to-convert-your-sim-network-from-jazz-to-zong</guid><category><![CDATA[jazz]]></category><category><![CDATA[pakistan]]></category><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Fri, 30 Dec 2022 13:28:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/42bb7abf9f6738a494465be91022e84a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><mark>This article is for you if you have a:</mark></p>
<ul>
<li><p>non-PTA iPhone</p>
</li>
<li><p>Jazz SIM - that you use primarily</p>
</li>
<li><p>Zong SIM - optional</p>
</li>
</ul>
<p>I have been a Mobilink/Jazz user for years now &amp; I use only 1 SIM. My iPhone is meant to be used for a couple of months so I don't have to register it with PTA. I thought it would be simple enough but it so happened that this iPhone won't pick up any Jazz SIMs. Now, I don't want a new SIM so I searched for an alternative &amp; found out that you can get an eSIM for your primary Jazz contact number.</p>
<p><strong><mark>Disclaimer</mark></strong>: <em>An eSIM is basically the exact same thing as a standard SIM except that you don't need a physical SIM. Instead, the company gives you a code which you can scan &amp; add it to your phone. Remember that not all phones support eSIM &amp; not all networks offer eSIM. And, Jazz is one of those companies which offer it.</em>  </p>
<p>I went to Jazz franchise &amp; they told me I have to convert my pre-paid SIM to post-paid &amp; it would cost 2000 rupees, RS 1000 for the eSIM &amp; RS 1000 security. The representative told me that there'll be two biometrics on two different days which was a deal breaker for me so I changed my plan &amp; instead went to a Zong franchise &amp; converted my SIM from Jazz to Zong. This is how it went:</p>
<ul>
<li><p>I sent a message to 667 with the message MNP</p>
</li>
<li><p>I received a reply with some <strong><em>sensitive</em></strong> <strong><em>gibberish</em></strong> which I FORWARDED to 76313</p>
</li>
</ul>
<p>After this, the representative wrote some numbers on a hand-sized machine &amp; took my fingerprints. I paid him RS 200 &amp; he handed me the SIM.<br />He also gave me these instructions:</p>
<ul>
<li><p>The SIM will be converted within 24 hours</p>
</li>
<li><p>When the old Jazz SIM loses it's signal that means the Zong SIM is now ready.</p>
</li>
<li><p>When the new SIM have signals, I should dial *10# which would do some necessary things.</p>
</li>
</ul>
<p>I hope this helps!</p>
<p>Best,</p>
<p>Junaid</p>
]]></content:encoded></item><item><title><![CDATA[Setting up your system (Ubuntu 18.04) to run different versions of Python & Django]]></title><description><![CDATA[I started this guide as a cheat sheet for myself for the times when I needed to created Django project or when I needed to run multiple Python versions. This is an all-rounder guide towards having multiple Python versions even if we don’t need Django...]]></description><link>https://blog.junaidahmed.dev/setting-up-your-system-ubuntu-18-04-to-run-different-versions-of-python-django-5f25c5ca47a5</link><guid isPermaLink="true">https://blog.junaidahmed.dev/setting-up-your-system-ubuntu-18-04-to-run-different-versions-of-python-django-5f25c5ca47a5</guid><category><![CDATA[Ubuntu]]></category><category><![CDATA[Python]]></category><category><![CDATA[setup]]></category><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Fri, 17 Apr 2020 11:13:25 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1666156152164/cYWGXYdz0.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I started this guide as a cheat sheet for myself for the times when I needed to created <strong>Django</strong> project or when I needed to run multiple <strong>Python</strong> versions. This is an all-rounder guide towards having multiple Python versions even if we don’t need Django.</p>
<p>Ubuntu 18.04 comes pre installed with python version 3 &amp; 2. To check those two, write <strong><em>python</em></strong> or <strong><em>python3</em></strong> in your terminal.</p>
<p>junaid@johnny:~$ python</p>
<p>Python 2.7.17 (default, Nov 7 2019, 10:07:09)<br />[GCC 7.4.0] on linux2<br />Type “help”, “copyright”, “credits” or “license” for more information.<br />&gt;&gt;&gt;</p>
<p>junaid@frt-eh:~$ python3</p>
<p>Python 3.6.9 (default, Nov  7 2019, 10:44:02)<br />[GCC 8.3.0] on linux<br />Type "help", "copyright", "credits" or "license" for more information.<br />&gt;&gt;&gt;</p>
<p>How to install softwares from tar/tgz files (.tar.gz or simply .tar)</p>
<p>[<strong>What is a tar.gz File, and How Do I Open It?</strong><br /><em>A tar file, often called a tarball, is a collection of files wrapped up in one single file for easy storage. Rather…</em>www.howtogeek.com](https://www.howtogeek.com/362203/what-is-a-tar.gz-file-and-how-do-i-open-it/ "https://www.howtogeek.com/362203/what-is-a-tar.gz-file-and-how-do-i-open-it/")<a target="_blank" href="https://www.howtogeek.com/362203/what-is-a-tar.gz-file-and-how-do-i-open-it/"></a></p>
<p><a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-ubuntu-18-04-quickstart">https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-ubuntu-18-04-quickstart</a></p>
<p><a target="_blank" href="https://hackersandslackers.com/multiple-versions-python-ubuntu/">https://hackersandslackers.com/multiple-versions-python-ubuntu/</a></p>
<p>[<strong>How to Upgrade to Python 3.7 on Ubuntu 18.04/18.10</strong><br /><em>Disclaimer Edited: 2020-03-10 15:54:45 UTC Instead of using below method please consider adding a new/multi python…</em>tech.serhatteker.com](https://tech.serhatteker.com/post/2019-09/upgrade-python37-on-ubuntu18/ "https://tech.serhatteker.com/post/2019-09/upgrade-python37-on-ubuntu18/")<a target="_blank" href="https://tech.serhatteker.com/post/2019-09/upgrade-python37-on-ubuntu18/"></a></p>
<p>[<strong>How to Upgrade to Python 3.7 on Ubuntu 18.04/18.10</strong><br /><em>Disclaimer Edited: 2020-03-10 15:54:45 UTC Instead of using below method please consider adding a new/multi python…</em>tech.serhatteker.com](https://tech.serhatteker.com/post/2019-09/upgrade-python37-on-ubuntu18/ "https://tech.serhatteker.com/post/2019-09/upgrade-python37-on-ubuntu18/")<a target="_blank" href="https://tech.serhatteker.com/post/2019-09/upgrade-python37-on-ubuntu18/"></a></p>
<p><strong>Virtual Environment &amp; pip</strong></p>
<p><a target="_blank" href="https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/26/python-virtual-env/">https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/26/python-virtual-env/</a></p>
<p>[<strong>How to Install Pip on Ubuntu 18.04</strong><br /><em>Pip is a package management system that simplifies installation and management of software packages written in Python…</em>linuxize.com](https://linuxize.com/post/how-to-install-pip-on-ubuntu-18.04/ "https://linuxize.com/post/how-to-install-pip-on-ubuntu-18.04/")<a target="_blank" href="https://linuxize.com/post/how-to-install-pip-on-ubuntu-18.04/"></a></p>
<h3 id="heading-how-to-create-django-project"><strong><em>How to create Django project</em></strong></h3>
<p><strong><em>Note:</em></strong> commands containing 3 are recommend because they use python 3 &amp; all.</p>
<p>[<strong>Starting a Django Project - Real Python</strong><br /><em>Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. In this…</em>realpython.com](https://realpython.com/django-setup/ "https://realpython.com/django-setup/")<a target="_blank" href="https://realpython.com/django-setup/"></a></p>
<ol>
<li>check (python -V or python3 -V) &amp; install your python version (if necessary)</li>
<li>install pip <strong>and/or</strong> pip3<br />sudo apt -y install python-pip<br />sudo apt -y install python3-pip</li>
<li>instal virtualenv<br /><code>sudo pip install virtualenv  
sudo pip3 install virtualenv</code><br /><strong><em>or</em></strong> venv<br /><code>***sudo apt install python3-venv***</code></li>
<li>create virtual env to for you app (create a directory &amp; execute in that folder)<br /><code>virtualenv my-project-env  
virtualenv -p /usr/bin/python2.7 .venv  
**using venv  
**python3 -m venv my-project-env</code></li>
<li>activate virtual env<br /><code>source my-project-env/bin/activate</code></li>
<li>create django project (the actual application which will contain our views &amp; controllers &amp; all)<br /> — — rest of the steps coming soon — —</li>
</ol>
<p>helpful links:</p>
<p>[<strong>How to Create Python Virtual Environments on Ubuntu 18.04</strong><br /><em>Python virtual environment is a self-contained directory tree that includes a Python installation and number of…</em>linuxize.com](https://linuxize.com/post/how-to-create-python-virtual-environments-on-ubuntu-18-04/ "https://linuxize.com/post/how-to-create-python-virtual-environments-on-ubuntu-18-04/")<a target="_blank" href="https://linuxize.com/post/how-to-create-python-virtual-environments-on-ubuntu-18-04/"></a></p>
<p>[<strong>How to install virtualenv on Ubuntu 18.04</strong><br /><em>We may face issues when our Linux distribution only offers certain versions of Python and its packages, when we…</em>dev.to](https://dev.to/serhatteker/how-to-install-virtualenv-on-ubuntu-18-04-2jdi "https://dev.to/serhatteker/how-to-install-virtualenv-on-ubuntu-18-04-2jdi")<a target="_blank" href="https://dev.to/serhatteker/how-to-install-virtualenv-on-ubuntu-18-04-2jdi"></a></p>
]]></content:encoded></item><item><title><![CDATA[ES6: How to distinguish between spread & rest operators?]]></title><description><![CDATA[This tip is for those learners who already know what spread & rest operators are but sometimes are unclear when one is being used.

When we see "..." in the code, it is either rest parameters or the spread operator.
There’s an easy way to distinguish...]]></description><link>https://blog.junaidahmed.dev/es6-how-to-distinguish-between-spread-rest-operators-272e7877c5a1</link><guid isPermaLink="true">https://blog.junaidahmed.dev/es6-how-to-distinguish-between-spread-rest-operators-272e7877c5a1</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Fri, 13 Sep 2019 01:05:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/YyFwUKzv5FM/upload/v1666156766989/ok9iFYPCO.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p>This tip is for those learners who already know what spread &amp; rest operators are but sometimes are unclear when one is being used.</p>
</blockquote>
<p>When we see <code>"..."</code> in the code, it is either rest parameters or the spread operator.</p>
<p>There’s an easy way to distinguish between them:</p>
<ul>
<li>When <code>...</code> is at the end of function parameters, it’s “rest parameters” and gathers the rest of the list of arguments into an array. I also like it call it the receiving end.</li>
<li>When <code>...</code> occurs in a function call or alike, it’s called a “spread operator” and expands an array into a list.</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Programming Challenges]]></title><description><![CDATA[Programming Challenges
Hungary for programming challenges, then stay tuned to this series to get articles containing those challenges along with solutions.]]></description><link>https://blog.junaidahmed.dev/programming-challenges-80761a5490af</link><guid isPermaLink="true">https://blog.junaidahmed.dev/programming-challenges-80761a5490af</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Sun, 04 Aug 2019 17:32:06 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-programming-challenges">Programming Challenges</h3>
<p>Hungary for programming challenges, then stay tuned to this series to get articles containing those challenges along with solutions.</p>
]]></content:encoded></item><item><title><![CDATA[Hey Mani, I’ve one question here, my media URLs doesn’t have the keyword “media” in them.]]></title><description><![CDATA[Hey Mani, I’ve one question here, my media URLs doesn’t have the keyword “media” in them. This is what I’m gettinghttps://my-bucket.s3.amazonaws.com/logo/bg-default.jpg.“logo” keyword is the model’s “upload_to” string. Is this how it should be or am ...]]></description><link>https://blog.junaidahmed.dev/hey-mani-ive-one-question-here-my-media-urls-doesn-t-have-the-keyword-media-in-them-769f5c979967</link><guid isPermaLink="true">https://blog.junaidahmed.dev/hey-mani-ive-one-question-here-my-media-urls-doesn-t-have-the-keyword-media-in-them-769f5c979967</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Fri, 10 May 2019 07:34:34 GMT</pubDate><content:encoded><![CDATA[<p>Hey Mani, I’ve one question here, my media URLs doesn’t have the keyword “media” in them. This is what I’m getting<br /><a target="_blank" href="https://locl-assets.s3.amazonaws.com/media/logo/bg-default_vzNVrj5.jpg">https://my-bucket.s3.amazonaws.com/logo/bg-default.jpg</a>.<br />“logo” keyword is the model’s “upload_to” string. Is this how it should be or am I doing something wrong.</p>
]]></content:encoded></item><item><title><![CDATA[Django management command with arbitrary optional params]]></title><description><![CDATA[Looking for a management command which accepts optional parameters, then you are in luck.
import logging  
from django.core.management.base import BaseCommandfrom locl.locations.models import Locationfrom locl.locations.tasks import fetch_metrics_for...]]></description><link>https://blog.junaidahmed.dev/django-management-command-with-arbitrary-optional-params-b976073958b9</link><guid isPermaLink="true">https://blog.junaidahmed.dev/django-management-command-with-arbitrary-optional-params-b976073958b9</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Tue, 30 Apr 2019 15:53:26 GMT</pubDate><content:encoded><![CDATA[<p>Looking for a management command which accepts optional parameters, then you are in luck.</p>
<p><strong>import</strong> logging  </p>
<p><strong>from</strong> django.core.management.base <strong>import</strong> BaseCommand<br /><strong>from</strong> locl.locations.models <strong>import</strong> Location<br /><strong>from</strong> locl.locations.tasks <strong>import</strong> fetch_metrics_for_location  </p>
<p>logger = logging.getLogger(__name__)  </p>
<p><strong>class</strong> Command(BaseCommand):<br />    help = **'Fetch Location Data'  </p>
<pre><code>def** add\_arguments(self, parser):  
    *\# Optional argument* parser.add\_argument(**<span class="hljs-string">'-ids'</span>**, **<span class="hljs-string">'--location\_ids'</span>**, type=str, nargs=**<span class="hljs-string">'+'</span>**, help=**<span class="hljs-string">'Debug location data fetch from google'</span>**)  

**def** handle(self, \*args, \*\*kwargs):  
    location\_ids = kwargs\[**<span class="hljs-string">'location\_ids'</span>**\]
</code></pre><p>This management command can be run using any of these terminal commands. I’m using location_stats as my file has this name. use your own file name in which you would place the above code</p>
<p><strong>python manage.py location_stats</strong></p>
<p><strong>python manage.py location_stats -ids value1</strong></p>
<p><strong>python manage.py location_stats -ids value1 value2</strong></p>
]]></content:encoded></item><item><title><![CDATA[Amazfit Bip not connecting]]></title><description><![CDATA[source: https://www.reddit.com/r/amazfit/comments/8o1eq4/bip_will_not_pair_screen_stuck_on_watchphone/
The very first time that I paired my watch to Mi Fit iOS app it was easy and I had no problems but one day, after an update app logged me out and I...]]></description><link>https://blog.junaidahmed.dev/amazfit-bip-not-connecting-e32162b6aa9a</link><guid isPermaLink="true">https://blog.junaidahmed.dev/amazfit-bip-not-connecting-e32162b6aa9a</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Thu, 25 Apr 2019 06:22:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1663953350512/UFYJcsMtf.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>source: <a target="_blank" href="https://www.reddit.com/r/amazfit/comments/8o1eq4/bip_will_not_pair_screen_stuck_on_watchphone/">https://www.reddit.com/r/amazfit/comments/8o1eq4/bip_will_not_pair_screen_stuck_on_watchphone/</a></p>
<p>The very first time that I paired my watch to Mi Fit iOS app it was easy and I had no problems but one day, after an update app logged me out and I had to login and connect the watch again. Frankly it took some time as, even though it was showing me that I have previously paired a watch but it kept saying “Bring the watch closer”. Long story short I was able to connect after few tries.</p>
<p>Now few weeks or maybe updates later the same phenomenon occurred but this time it took me around 40 minutes to finally resolve the issue. Here is what I did.<br /><strong><em>First I followed the steps given on this</em></strong> <a target="_blank" href="https://support.amazfit.com/hc/en-us/articles/360001979093-I-can-t-connect-my-Amazfit-Bip-What-should-I-do-"><strong><em>official amazfit support entry</em></strong></a> <strong><em>but I wasn’t successful</em></strong> then <strong>I just factory reset my watch and tried pairing like I did the very first time &amp; it worked</strong>. Good luck to you, I wish I have helped in any way.</p>
]]></content:encoded></item><item><title><![CDATA[How To Set Up Password Authentication with Apache on Ubuntu 14.04, 16.04 & 18.04]]></title><description><![CDATA[Prerequisites
I followed this guide for my Ubuntu 18.04 server and opted the virtual host method (there are two methods to setup Apache auth, one is Virtual Host Definition and other one requires .htaccess file), I opted the first one namely the Virt...]]></description><link>https://blog.junaidahmed.dev/how-to-set-up-password-authentication-with-apache-on-ubuntu-14-04-16-04-18-04-f6ee88dde11e</link><guid isPermaLink="true">https://blog.junaidahmed.dev/how-to-set-up-password-authentication-with-apache-on-ubuntu-14-04-16-04-18-04-f6ee88dde11e</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Mon, 04 Feb 2019 13:51:57 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-prerequisites">Prerequisites</h3>
<p>I followed this <a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-apache-on-ubuntu-16-04">guide</a> for my Ubuntu 18.04 server and opted the virtual host method (there are two methods to setup Apache auth, one is Virtual Host Definition and other one requires <code>.htaccess</code> file), I opted the first one namely the <strong>Virtual Host Definition.</strong> I followed the guide but config file in the guide didn’t worked for me so I had to improvise :). This is my config file that worked for me.</p>
<br />     ServerAdmin <br />     DocumentRoot <br />     ServerName 

<br />        Options +FollowSymlinks<br />        AllowOverride All<br />        Require all granted<br />     

<br />        AuthType Basic<br />        AuthName "Restricted Content"<br />        AuthUserFile /etc/apache2/.htpasswd<br />        Require valid-user<br /> 



<p>Checkout this <a target="_blank" href="https://websiteforstudents.com/protect-directories-with-apache2-http-basic-authentication-on-ubuntu-16-04-lts/">link</a> for more.</p>
]]></content:encoded></item><item><title><![CDATA[How to Add Bootstrap to an Angular CLI project]]></title><description><![CDATA[Follow the link to view the tutorial.
https://loiane.com/2017/08/how-to-add-bootstrap-to-an-angular-cli-project/#3-importing-the-css]]></description><link>https://blog.junaidahmed.dev/how-to-add-bootstrap-to-an-angular-cli-project-fb64728c41a1</link><guid isPermaLink="true">https://blog.junaidahmed.dev/how-to-add-bootstrap-to-an-angular-cli-project-fb64728c41a1</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Tue, 25 Sep 2018 12:04:58 GMT</pubDate><content:encoded><![CDATA[<p>Follow the link to view the tutorial.</p>
<p><a target="_blank" href="https://loiane.com/2017/08/how-to-add-bootstrap-to-an-angular-cli-project/#3-importing-the-css">https://loiane.com/2017/08/how-to-add-bootstrap-to-an-angular-cli-project/#3-importing-the-css</a></p>
]]></content:encoded></item><item><title><![CDATA[Angular CLI SASS options]]></title><description><![CDATA[When you are creating your project with angular cli try this:
ng new My_New_Project --style=sass
This generates all your components with predefined sass files.
If you want scss syntax create your project with :
ng new My_New_Project --style=scss
If y...]]></description><link>https://blog.junaidahmed.dev/angular-cli-sass-options-97565031d8c7</link><guid isPermaLink="true">https://blog.junaidahmed.dev/angular-cli-sass-options-97565031d8c7</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Tue, 25 Sep 2018 11:52:32 GMT</pubDate><content:encoded><![CDATA[<p>When you are creating your project with angular cli try this:</p>
<pre><code>ng <span class="hljs-keyword">new</span> My_New_Project --style=sass
</code></pre><p>This generates all your components with predefined sass files.</p>
<p>If you want scss syntax create your project with :</p>
<pre><code>ng <span class="hljs-keyword">new</span> My_New_Project --style=scss
</code></pre><p>If you are changing your existing style in your project</p>
<pre><code>ng set defaults.styleExt scss
</code></pre><p>Cli handles the rest of it.</p>
<h3 id="heading-for-latest-versions"><strong><em>For Latest Versions</em></strong></h3>
<p>For Angular 6 to set new style on existing project with CLI:</p>
<pre><code>ng config schematics.@schematics/angular:component.styleext scss
</code></pre><p>Or Directly into angular.json:</p>
<pre><code><span class="hljs-string">"schematics"</span>: {  
      <span class="hljs-string">"@schematics/angular:component"</span>: {  
      <span class="hljs-string">"styleext"</span>: <span class="hljs-string">"scss"</span>  
    }  
}
</code></pre>]]></content:encoded></item><item><title><![CDATA[Show/hide password in Ionic]]></title><description><![CDATA[Directive:
import {Directive, ElementRef, HostListener, Input} from '@angular/core';

*/**
* Generated class for the PasswordToggleDirective directive.
*
* See https://angular.io/api/core/Directive for more info on Angular
* Directives.
*/
*@Directiv...]]></description><link>https://blog.junaidahmed.dev/show-hide-password-in-ionic-8233e43db3e6</link><guid isPermaLink="true">https://blog.junaidahmed.dev/show-hide-password-in-ionic-8233e43db3e6</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Wed, 05 Sep 2018 10:52:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/vFhsyAMbHkE/upload/e848ebf9e4c2d20f93fa379f47b588c2.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Directive:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> {Directive, ElementRef, HostListener, Input} <span class="hljs-keyword">from</span> <span class="hljs-string">'@angular/core'</span>;

*<span class="hljs-comment">/**
* Generated class for the PasswordToggleDirective directive.
*
* See https://angular.io/api/core/Directive for more info on Angular
* Directives.
*/</span>
*<span class="hljs-meta">@Directive</span>({
selector: <span class="hljs-string">'[passwordToggle]'</span> *<span class="hljs-comment">// Attribute selector</span>
*})
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> PasswordToggleDirective {
<span class="hljs-meta">@Input</span>(<span class="hljs-string">'appTargetInput'</span>) targetInput: <span class="hljs-built_in">any</span>;

<span class="hljs-keyword">constructor</span>(<span class="hljs-params">el: ElementRef</span>) {
}

<span class="hljs-meta">@HostListener</span>(<span class="hljs-string">'click'</span>) onMouseEnter() {
<span class="hljs-keyword">let</span> inType = (<span class="hljs-built_in">this</span>.targetInput._native.nativeElement.type == <span class="hljs-string">'text'</span>)? <span class="hljs-string">'password'</span>: <span class="hljs-string">'text'</span>;
<span class="hljs-built_in">this</span>.targetInput._native.nativeElement.type = inType;
}

}
</code></pre>
<p>Usage:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">ion-item</span> <span class="hljs-attr">no-margin</span> <span class="hljs-attr">no-padding</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"clear-item-inner"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">ion-label</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">ion-icon</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"md-lock"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">ion-icon</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">ion-label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">ion-input</span> #<span class="hljs-attr">toggleInput</span> <span class="hljs-attr">formControlName</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"half-inp half-border-inp"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Password"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">ion-input</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"showhidePass"</span> <span class="hljs-attr">color</span>=<span class="hljs-string">"light"</span> <span class="hljs-attr">ion-button</span>             <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span> <span class="hljs-attr">clear</span> <span class="hljs-attr">item-end</span> <span class="hljs-attr">passwordToggle</span>     [<span class="hljs-attr">appTargetInput</span>]=<span class="hljs-string">"toggleInput"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">ion-icon</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"eye"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">ion-icon</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">ion-item</span>&gt;</span>
</code></pre>
<p>Pass template reference variable to ‘<em>appTargetInput</em>’ of passwordToggle directive. I have passed it toggleInput which is the reference variable for ion-input above it.</p>
]]></content:encoded></item><item><title><![CDATA[Email regex]]></title><description><![CDATA[This regex will validate emails of this format
any-normal-email-chars@anydomain.c.c.c
/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/]]></description><link>https://blog.junaidahmed.dev/email-regex-e7236d13bab6</link><guid isPermaLink="true">https://blog.junaidahmed.dev/email-regex-e7236d13bab6</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Tue, 04 Sep 2018 16:01:46 GMT</pubDate><content:encoded><![CDATA[<p>This regex will validate emails of this format</p>
<p>any-normal-email-chars@anydomain.c.c.c</p>
<p><strong>/^[a-zA-Z0-9.!#$%&amp;’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/</strong></p>
]]></content:encoded></item><item><title><![CDATA[Owl Carosel StagePadding a.k.a next & previous slide half preview]]></title><description><![CDATA[OwlCarousel StagePadding
Setup:
$('.owl-carousel').owlCarousel({stagePadding: 50,loop:true,margin:10,nav:true,responsive:{0:{items:1},600:{items:3},1000:{items:5}}})
HTML
  1  2  3  4  5  6  7  8  9  10  11  12

Also check out this official owlCarous...]]></description><link>https://blog.junaidahmed.dev/owl-carosel-stagepadding-a-k-a-next-previous-shown-half-preview-26920724a65b</link><guid isPermaLink="true">https://blog.junaidahmed.dev/owl-carosel-stagepadding-a-k-a-next-previous-shown-half-preview-26920724a65b</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Tue, 28 Aug 2018 13:32:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1663953448043/pFRAGCbFn.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1663953448043/pFRAGCbFn.jpeg" alt /></p>
<p>OwlCarousel StagePadding</p>
<p>Setup:</p>
<p>$('.owl-carousel').owlCarousel({<br />stagePadding: 50,<br />loop:<strong>true</strong>,<br />margin:10,<br />nav:<strong>true</strong>,<br />responsive:{<br />0:{<br />items:1<br />},<br />600:{<br />items:3<br />},<br />1000:{<br />items:5<br />}<br />}<br />})</p>
<p>HTML</p>
<div class="owl-carousel owl-theme"><br />  <div class="item"><h4>1</h4></div><br />  <div class="item"><h4>2</h4></div><br />  <div class="item"><h4>3</h4></div><br />  <div class="item"><h4>4</h4></div><br />  <div class="item"><h4>5</h4></div><br />  <div class="item"><h4>6</h4></div><br />  <div class="item"><h4>7</h4></div><br />  <div class="item"><h4>8</h4></div><br />  <div class="item"><h4>9</h4></div><br />  <div class="item"><h4>10</h4></div><br />  <div class="item"><h4>11</h4></div><br />  <div class="item"><h4>12</h4></div><br /></div>

<p>Also check out this <a target="_blank" href="https://owlcarousel2.github.io/OwlCarousel2/demos/stagepadding.html">official owlCarousel demo</a></p>
]]></content:encoded></item><item><title><![CDATA[Simultaneously write/update to multiple locations in Firebase]]></title><description><![CDATA[According to google docs:
To simultaneously write to specific children of a node without overwriting other child nodes, use the update() method.
When calling update(), you can update lower-level child values by specifying a path for the key. If data ...]]></description><link>https://blog.junaidahmed.dev/simultaneously-write-update-to-multiple-locations-in-firebase-45aac569926b</link><guid isPermaLink="true">https://blog.junaidahmed.dev/simultaneously-write-update-to-multiple-locations-in-firebase-45aac569926b</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Mon, 27 Aug 2018 08:18:31 GMT</pubDate><content:encoded><![CDATA[<p>According to google docs:</p>
<p>To simultaneously write to specific children of a node without overwriting other child nodes, use the <code>update()</code> method.</p>
<p>When calling <code>update()</code>, you can update lower-level child values by specifying a path for the key. If data is stored in multiple locations to scale better, you can update all instances of that data using <a target="_blank" href="https://firebase.google.com/docs/database/web/structure-data#fanout">data fan-out</a>.</p>
<p>For example, a social blogging app might create a post and simultaneously update it to the recent activity feed and the posting user’s activity feed using code like this:</p>
<p>function writeNewPost(uid, username, picture, title, body) {<br />  // A post entry.<br />  var postData = {<br />    author: username,<br />    uid: uid,<br />    body: body,<br />    title: title,<br />    starCount: 0,<br />    authorPic: picture<br />  };</p>
<p>  // Get a key for a new Post.<br />  var newPostKey = firebase.database().ref().child('posts').push().key;</p>
<p>  // Write the new post's data simultaneously in the posts list and the user's post list.<br />  var updates = {};<br />  updates['/posts/' + newPostKey] = postData;<br />  updates['/user-posts/' + uid + '/' + newPostKey] = postData;</p>
<p>  return firebase.database().ref().update(updates);<br />}</p>
<p>This example uses <code>push()</code> to create a post in the node containing posts for all users at <code>/posts/$postid</code>and simultaneously retrieve the key. The key can then be used to create a second entry in the user's posts at <code>/user-posts/$userid/$postid</code>.</p>
<p>Using these paths, you can perform simultaneous updates to multiple locations in the JSON tree with a single call to <code>update()</code>, such as how this example creates the new post in both locations. Simultaneous updates made this way are atomic: either all updates succeed or all updates fail.</p>
<p>Read further here to get an overview of how to <a target="_blank" href="https://firebase.google.com/docs/database/web/read-and-write#updating_or_deleting_data">Read and Write Data</a> and <a target="_blank" href="https://firebase.google.com/docs/database/admin/save-data">Save Data</a> in firebase.</p>
]]></content:encoded></item><item><title><![CDATA[Ionic multiple same sided menus]]></title><description><![CDATA[An application can have multiple menus on the same side. In order to determine the menu to control, an id should be passed. In the example below, the menu with the authenticated id will be enabled, and the menu with the unauthenticated id will be dis...]]></description><link>https://blog.junaidahmed.dev/ionic-multiple-same-sided-menus-147f6c33acdb</link><guid isPermaLink="true">https://blog.junaidahmed.dev/ionic-multiple-same-sided-menus-147f6c33acdb</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Fri, 17 Aug 2018 12:30:42 GMT</pubDate><content:encoded><![CDATA[<p>An application can have multiple menus on the same side. In order to determine the menu to control, an <code>id</code> should be passed. In the example below, the menu with the <code>authenticated</code> id will be enabled, and the menu with the <code>unauthenticated</code> id will be disabled.</p>
<pre><code><span class="hljs-string">`&lt;**ion-menu** id="***authenticated***" side="left" [content]="mycontent"&gt;  
`</span>&lt;**ion-header**\&gt;  
  &lt;**ion-toolbar**\&gt;  
    &lt;**ion-title**\&gt;Pages&lt;<span class="hljs-comment">/**ion-title**\&gt;  
  &lt;/**ion-toolbar**\&gt;  
&lt;/**ion-header**\&gt;  

&lt;**ion-content**\&gt;  
  &lt;**ion-list**\&gt;  
    &lt;**button menuClose ion-item \*ngFor="let *p* of pages" (click)="openPage(*p*)"**\&gt;  
      {{***p***.**title**}}  
    &lt;/**button**\&gt;  
  &lt;/**ion-list**\&gt;  
&lt;/**ion-content**\&gt;  
`&lt;/**ion-menu**&gt;`</span>
</code></pre><pre><code><span class="hljs-string">`&lt;**ion-menu** id="***unauthenticated***" side="left" [content]="mycontent"&gt;put second menus code here&lt;/**ion-menu**&gt;  
&lt;**ion-nav** #mycontent [root]="rootPage"&gt;&lt;/**ion-nav**&gt;  
`</span>
</code></pre><pre><code><span class="hljs-comment">//and call this method according to your logic  </span>
enableAuthenticatedMenu() {  
  **<span class="hljs-built_in">this</span>**.menuCtrl.enable(<span class="hljs-literal">true</span>, <span class="hljs-string">'authenticated'</span>);  
  **<span class="hljs-built_in">this</span>**.menuCtrl.enable(<span class="hljs-literal">false</span>, <span class="hljs-string">'unauthenticated'</span>);  
}
</code></pre><p>Note: if an app only has one menu, there is no reason to pass an <code>id</code>.</p>
]]></content:encoded></item><item><title><![CDATA[Invalid key hash. The key hash does not match any stored key hashes]]></title><description><![CDATA[This is how i solved this problem
Download your APK to your PC in java jdk\bin folder
bin folder might look like this
C:\Program Files\Java\jdk1.7.0_121\bin
go to java jdk\bin folder and run cmd thencopy the following command in your cmd
keytool -lis...]]></description><link>https://blog.junaidahmed.dev/invalid-key-hash-the-key-hash-does-not-match-any-stored-key-hashes-5aeb81539d64</link><guid isPermaLink="true">https://blog.junaidahmed.dev/invalid-key-hash-the-key-hash-does-not-match-any-stored-key-hashes-5aeb81539d64</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Thu, 16 Aug 2018 12:56:16 GMT</pubDate><content:encoded><![CDATA[<p>This is how i solved this problem</p>
<p>Download your APK to your PC in java jdk\bin folder</p>
<p>bin folder might look like this</p>
<p>C:\Program Files\Java\jdk1.7.0_121\bin</p>
<p>go to java jdk\bin folder and run cmd then<br />copy the following command in your cmd</p>
<p>keytool -list -printcert -jarfile yourapkname.apk</p>
<p>Copy the SHA1 value, which looks like this</p>
<p>CD:A1:EA:A3:5C:5C:68:FB:FA:0A:6B:E5:5A:72:64:DD:26:8D:44:84</p>
<p>and open <a target="_blank" href="http://tomeko.net/online_tools/hex_to_base64.php">http://tomeko.net/online_tools/hex_to_base64.php</a> to convert your SHA1 value to base64.<br />This is what Facebook requires. Copy base64 value and paste it in key hashes under settings-&gt;Basic -&gt; Key hashes</p>
]]></content:encoded></item><item><title><![CDATA[Change ion-input value programmatically]]></title><description><![CDATA[@ViewChild('googlePlace') googlePlace;
Define in template variable like this
<ion-input #googlePlace class="rounded-inp single-inp" type="text" placeholder="Location"></ion-input>
//set values like this;this.googlePlace._native.nativeElement.value \=...]]></description><link>https://blog.junaidahmed.dev/change-ion-input-value-programmatically-ad7915f23185</link><guid isPermaLink="true">https://blog.junaidahmed.dev/change-ion-input-value-programmatically-ad7915f23185</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Thu, 16 Aug 2018 11:14:46 GMT</pubDate><content:encoded><![CDATA[<p>@ViewChild(<strong>'googlePlace'</strong>) <strong>googlePlace</strong>;</p>
<p>Define in template variable like this</p>
<p>&lt;<strong>ion-input #googlePlace class="rounded-inp single-inp" type="text" placeholder="Location"</strong>&gt;&lt;/<strong>ion-input</strong>&gt;</p>
<p><strong>//set values like this;<br />this</strong>.<strong>googlePlace</strong>.<strong>_native</strong>.<strong>nativeElement</strong>.<strong>value</strong> \= <strong>''</strong>;<br /><strong>this</strong>.<strong>googlePlace</strong>.<strong>value</strong> \= <strong>''</strong>;</p>
]]></content:encoded></item><item><title><![CDATA[Ionic resolve file url]]></title><description><![CDATA[Uploading an image in ionic is a tedious job which have caused me troubles over time. Using base64 data is easy but that can lead to app crashes as base64 string is large string which mobile has to process and app crashes occur in some lower tier pho...]]></description><link>https://blog.junaidahmed.dev/ionic-resolve-file-url-6d90bf4820af</link><guid isPermaLink="true">https://blog.junaidahmed.dev/ionic-resolve-file-url-6d90bf4820af</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Thu, 16 Aug 2018 08:35:28 GMT</pubDate><content:encoded><![CDATA[<p>Uploading an image in ionic is a tedious job which have caused me troubles over time. Using base64 data is easy but that can lead to app crashes as base64 string is large string which mobile has to process and app crashes occur in some lower tier phones.<br />But if I am not using base64 and instead I’m using FILE_URI then there is an issue where we don’t have actual file to send to the server. To resolve this issue I use this method with few other helper methods to get a file and also do few more things like checking file size before sending to the server.</p>
<p>So first of all install ‘File’ from ionic native and import File and DomSanitizer like this</p>
<p><strong>import</strong> {File} <strong>from "@ionic-native/file"</strong>;<br /><strong>import</strong> {DomSanitizer} <strong>from "@angular/platform-browser"</strong>;</p>
<p>Pass file_uri data to this method and inside this method you can assign values to your form or variable and do your other processing you want.</p>
<p>resolveFile(imageData) {<br />  <strong>let</strong> context = <strong>this</strong>;<br />  <strong>this</strong>.file.resolveLocalFilesystemUrl(imageData).then(<strong>function</strong> (fileEntry: <strong>any</strong>) {  </p>
<pre><code>fileEntry.file(**<span class="hljs-function"><span class="hljs-keyword">function</span>** (<span class="hljs-params">file</span>) </span>{  
  **<span class="hljs-keyword">if</span>** ((file.**size** <span class="hljs-regexp">/ 1024 /</span> <span class="hljs-number">1024</span>) &gt; <span class="hljs-number">5</span>) {  
    context.presentAlert(**<span class="hljs-string">'Cannot upload the image'</span>**,  
      **<span class="hljs-string">'The image exceeds the max allowed size of 5 MB'</span>**)  
  }  

  context.**stepOneDataCpy**.patchValue({  
    **image**: imageData,  
  });  
  context.**imagePlaceholder** \= context.sanitizer.bypassSecurityTrustUrl(*normalizeURL*(imageData));  
  context.**loader**.dismiss();  
});  
</code></pre><p>  });<br />}</p>
]]></content:encoded></item><item><title><![CDATA[ionic multiple select reactive form]]></title><description><![CDATA[ion-select multiple="true [formControl]="registerForm.controls.locations">  <ion-option value="f">Female</ion-option>  <ion-option value="m">Male</ion-option></ion-select>
buildForm() {  this.registerForm \= this.formBuilder.group({    'contact': [''...]]></description><link>https://blog.junaidahmed.dev/ionic-multiple-select-reactive-form-a3acd330bd6d</link><guid isPermaLink="true">https://blog.junaidahmed.dev/ionic-multiple-select-reactive-form-a3acd330bd6d</guid><dc:creator><![CDATA[Junaid Ahmed]]></dc:creator><pubDate>Wed, 15 Aug 2018 07:22:30 GMT</pubDate><content:encoded><![CDATA[<p><strong>ion-select multiple="true [formControl]="registerForm.controls.locations"</strong>&gt;<br />  &lt;<strong>ion-option value="f"</strong>&gt;Female&lt;/<strong>ion-option</strong>&gt;<br />  &lt;<strong>ion-option value="m"</strong>&gt;Male&lt;/<strong>ion-option</strong>&gt;<br />&lt;/<strong>ion-select</strong>&gt;</p>
<p>buildForm() {<br />  <strong>this</strong>.<strong>registerForm</strong> \= <strong>this</strong>.formBuilder.group({<br />    <strong>'contact'</strong>: [<strong>''</strong>, [Validators.<em>required</em>]],<br />    <strong>'agree'</strong>: [<strong>true</strong>, Validators.<em>requiredTrue</em>],<br />    <strong>'categories'</strong>: <strong>this</strong>.formBuilder.array([]),<br />    <strong>'locations'</strong>: [[], Validators.<em>required</em>],  });<br />}</p>
]]></content:encoded></item></channel></rss>