<?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 Farhan Aslam on Medium]]></title>
        <description><![CDATA[Stories by Farhan Aslam on Medium]]></description>
        <link>https://medium.com/@farhanaslam910?source=rss-2debcd1ccccc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a__hUhuy3O2RAAgcjmY40Q.jpeg</url>
            <title>Stories by Farhan Aslam on Medium</title>
            <link>https://medium.com/@farhanaslam910?source=rss-2debcd1ccccc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:44:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@farhanaslam910/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[Mastering Subnetting & NetID: A Simple, Concrete Guide]]></title>
            <link>https://medium.com/@farhanaslam910/mastering-subnetting-netid-a-simple-concrete-guide-a425776ddce6?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a425776ddce6</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[subnet]]></category>
            <category><![CDATA[subnetting]]></category>
            <category><![CDATA[subnet-mask]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 18:43:03 GMT</pubDate>
            <atom:updated>2025-07-22T18:43:03.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phz_zth99q97fBoGoU_OsQ.png" /></figure><p>If you’ve ever looked at an IP address and wondered, <strong>“How do I find its subnet or NetID?”</strong>, you’re not alone.</p><p>As an IT engineer, I’ve worked with subnetting daily — and I promise, once you learn a few key tricks, <strong>it’s much simpler than it seems</strong>.</p><p>Here’s a <strong>concise, practical guide</strong> combining the essential theory, the standard method, shortcut hacks, and a handy cheat sheet — all in one place.</p><h3>🏡 What Is Subnetting and NetID?</h3><p>An <strong>IP address</strong> (like 192.168.1.10) has two parts:</p><ul><li><strong>NetID (Network ID):</strong> identifies the network.</li><li><strong>HostID:</strong> identifies the device inside that network.</li></ul><p>A <strong>subnet mask</strong> (like 255.255.255.0) tells you <strong>how much is NetID</strong> and <strong>how much is HostID</strong>.</p><p>For example:</p><pre>IP: 192.168.1.10  <br>Mask: 255.255.255.0 → /24<br>NetID: 192.168.1.0</pre><p>Subnetting divides big networks into smaller pieces — called subnets — for <strong>better management, security, and performance</strong>.</p><h3>🛠️ Standard Method to Find NetID/Subnet</h3><p>1️⃣ <strong>Write down the IP and subnet mask.</strong><br> Example: 192.168.1.10 / 255.255.255.0</p><p>2️⃣ <strong>Convert both to binary.</strong></p><pre>192.168.1.10 → 11000000.10101000.00000001.00001010  <br>255.255.255.0 → 11111111.11111111.11111111.00000000</pre><p>3️⃣ <strong>Apply bitwise AND (keep IP bits where mask is 1, set to 0 where mask is 0).</strong></p><pre>11000000.10101000.00000001.00001010  <br>AND  <br>11111111.11111111.11111111.00000000  <br>=  <br>11000000.10101000.00000001.00000000</pre><p>4️⃣ <strong>Convert back to decimal.</strong><br> Result → 192.168.1.0 → This is your <strong>NetID/subnet address</strong>.</p><h3>⚡ Shortcut Hack (Block Size Method)</h3><p>1️⃣ <strong>Get block size:</strong><br> Subtract the mask’s last octet from 256.<br> Example: 255.255.255.192 → 256–192 = <strong>64</strong></p><p>2️⃣ <strong>Divide IP’s last octet by block size, round down.</strong><br> Example: 10.10.5.65 → 65 / 64 = 1 (ignore decimal)</p><p>3️⃣ <strong>Multiply back:</strong><br> 1 * 64 = <strong>64</strong></p><p>4️⃣ <strong>Resulting subnet:</strong><br> 10.10.5.64/26</p><p>✅ Done — no binary needed!</p><h3>🔥 Real-World Example</h3><blockquote><strong><em>IP:</em></strong><em> 10.0.3.145 / 255.255.255.240</em></blockquote><ul><li>Block size → 256–240 = 16</li><li>Last octet → 145 / 16 = 9.06 → 9</li><li>9 * 16 = 144</li></ul><p><strong>Subnet:</strong> 10.0.3.144/28</p><p>This covers IPs 10.0.3.145–10.0.3.158, with 10.0.3.159 as the broadcast.</p><h3>💡 Final Takeaways</h3><p>✅ <strong>NetID</strong> = network address, calculated by masking the host bits.<br> ✅ <strong>Standard method</strong> = binary AND.<br> ✅ <strong>Shortcut</strong> = block size trick (faster, no binary).<br> ✅ <strong>Why care?</strong> For IP planning, firewall rules, VLANs, and better traffic management.</p><h3>🚀 Pro Tip</h3><p>Always check:</p><ul><li>Where does the IP fall? → Calculate subnet.</li><li>How many hosts do you need? → Choose CIDR accordingly.</li></ul><p>If you enjoyed this article or have any questions, feel free to connect with me — I’m always happy to talk networks, IT tips, or share knowledge!</p><p>👉 <strong>Connect with me on LinkedIn:</strong> <a href="https://www.linkedin.com/in/farhanch1/">Farhan Aslam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a425776ddce6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to generate a vCard QR with Company logo using Python]]></title>
            <link>https://medium.com/@farhanaslam910/how-to-generate-a-vcard-qr-with-company-logo-using-python-9178c726e94c?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9178c726e94c</guid>
            <category><![CDATA[vcard-generator-qr-code]]></category>
            <category><![CDATA[qr-code-generator-app]]></category>
            <category><![CDATA[python-automation]]></category>
            <category><![CDATA[bulk-qr]]></category>
            <category><![CDATA[qrcodegenerator]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Thu, 23 Nov 2023 10:54:16 GMT</pubDate>
            <atom:updated>2023-11-23T10:54:16.017Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Folks,</p><p>Being a corporate slave, we all are hanging our honorable company cards on our neck all the time. In this digital era, you may have seen people are using vCard to share their contact information. vCard is a digital business card which contain someone personal information like contact, email etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YucYrok8srMdIz8iYNU0dA.png" /><figcaption>Generate vCard QR’s in Bulk</figcaption></figure><p>In this blog we will learn how we can create a vCard and turn it into a scannable QR code with our custom company logo. I will be using python programming language.</p><p>We need python install on our system to run this code else we can use any cloud IDE like jupyter notebook, Google Colab. Now need to install pandas, qrcode and Image library.</p><pre>//Run follwing commands to install required dependencies<br>pip install pandas<br>pip install qrcode<br>pip install Image</pre><p>You need to have a employee data excel sheet with all information you want to add in vCard, in this example we will be using employee name, email and phone.</p><pre>//Code file to create QR codes<br><br>import pandas as pd<br>import qrcode<br>from PIL import Image<br><br>def generate_vcard_qr_code_with_resized_logo(name, email, phone, logo_path, output_path, max_logo_size=(60, 60)):<br>    vcard_data = f&quot;BEGIN:VCARD\nVERSION:3.0\nFN:{name}\nEMAIL:{email}\nTEL:{phone}\nEND:VCARD&quot;<br>    <br>    qr = qrcode.QRCode(<br>        version=1,<br>        error_correction=qrcode.constants.ERROR_CORRECT_L,<br>        box_size=10,<br>        border=4,<br>    )<br>    qr.add_data(vcard_data)<br>    qr.make(fit=True)<br><br>    img = qr.make_image(fill_color=&quot;#61418E&quot;, back_color=&quot;transparent&quot;)<br>    <br>    # Open and resize the logo image<br>    logo = Image.open(logo_path)<br>    logo.thumbnail(max_logo_size)<br>    <br>    # Calculate the position to center the logo on the QR code<br>    logo_position = ((img.size[0] - logo.size[0]) // 2, (img.size[1] - logo.size[1]) // 2)<br>    <br>    # Paste the resized logo onto the QR code<br>    img.paste(logo, logo_position)<br>    <br>    # Save the final image<br>    img.save(output_path)<br><br>def read_employee_data(excel_file):<br>    df = pd.read_excel(excel_file)<br>    return df<br><br>def main():<br>    excel_file = &#39;employee_data.xlsx&#39;<br>    output_folder = &#39;qr_codes/&#39;<br>    logo_path = &#39;company_logo.png&#39;  # Replace with the actual path to your company logo<br><br>    import os<br>    os.makedirs(output_folder, exist_ok=True)<br><br>    employee_data = read_employee_data(excel_file)<br><br>    for index, row in employee_data.iterrows():<br>        generate_vcard_qr_code_with_resized_logo(<br>            row[&#39;Name&#39;], <br>            row[&#39;Email&#39;], <br>            row[&#39;Phone&#39;], <br>            logo_path, <br>            f&quot;{output_folder}{ row[&#39;Name&#39;]}.png&quot;<br>        )<br><br>    print(&quot;vCard QR codes with resized logo generated successfully!&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>You need to add this file and you employee data sheet and company logo in the same directory. Also make sure to conform that your sheet and logo name is same as in the code and you sheet data contain the Column names as used in code. (Name, Email, Phone) … If you want to add any other information you can add and edit code accordingly. Also make sure to use a small size logo must be transparent.</p><p>You can even mention your own QR code colors in the code. Sometime your QR scan doesn’t work if you use a large size logo.</p><p>If you find any issue, feel free to ask.</p><p>We can connect on <a href="https://www.linkedin.com/in/farhan-aslam-software-engineer/">LinkedIn </a>too.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9178c726e94c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to play custom sound FCM notification in Flutter]]></title>
            <link>https://medium.com/@farhanaslam910/how-to-play-custom-sound-fcm-notification-in-flutter-471016bf8760?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/471016bf8760</guid>
            <category><![CDATA[custom-sound]]></category>
            <category><![CDATA[fcm]]></category>
            <category><![CDATA[custom-notification]]></category>
            <category><![CDATA[fcm-push-notification]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Wed, 22 Nov 2023 13:05:37 GMT</pubDate>
            <atom:updated>2024-03-20T17:49:25.541Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Folks,</p><p>Notifications are a great way to engage your users. Almost every single app uses notifications to stay connected to the user. Every app has its unique sound of notifications and in this blog, we will learn how to add custom notification sound in a Flutter app.</p><p>We can play anything in the foreground because we are in the app and can trigger any part of the code. As a flutter developer, we all bear the pain when it comes to dealing with something when the app is not running in such cases, we need to use method channels to communicate with the native API and even in some cases need to write native code.</p><p>To play a custom sound in the background and kill the state we need to create a notification channel on Android using the <a href="https://pub.dev/packages/flutter_notification_channel">flutter_local_notification </a>package.</p><pre>static Future&lt;void&gt; showBigTextNotification(String? title, String body, NotificationBody? notificationBody, FlutterLocalNotificationsPlugin fln) async {<br>  BigTextStyleInformation bigTextStyleInformation = BigTextStyleInformation(<br>    body, htmlFormatBigText: true,<br>    contentTitle: title, htmlFormatContentTitle: true,<br>  );<br>  AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails(<br>    &#39;channel_id&#39;, &#39;channel_name&#39;, importance: Importance.max,<br>    styleInformation: bigTextStyleInformation, priority: Priority.max, playSound: true,<br>    sound: RawResourceAndroidNotificationSound(&#39;notification&#39;),<br>  );<br>  NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);<br>  await fln.show(0, title, body, platformChannelSpecifics, payload: notificationBody != null ? jsonEncode(notificationBody.toJson()) : null);<br>}</pre><p>As in the above code snippet, I created a sample notification channel. The important thing here is <em>channel_id </em>and also the sound file name <em>notification </em>make sure to add your sound file in the res/raw folder of Android.</p><p>That was the half part now your Android app is ready to play custom sound but while sending the notification you have to include the Android channel ID. As shown in the below Firebase notification API body:</p><pre>{<br>  &quot;to&quot;: &quot;fcm_token&quot;,<br>&quot;notification&quot;: {<br>    &quot;title&quot;: &quot;My First Notification&quot;,<br>    &quot;body&quot;: &quot;Hello, I&#39;m push notification&quot;<br>},<br>&quot;data&quot;: {<br>    &quot;title&quot;: &quot;My First Notification&quot;<br>},<br><br>//Always include this part to play the custom sound<br>&quot;android&quot;: {<br>    &quot;notification&quot;: {<br>        &quot;channel_id&quot;: &quot;channel_id&quot; // NOTIFICATION CHANNEL ID WITH CUSTOM SOUND REFERENCE HERE<br>     }<br>  }<br>}</pre><p>Now your FCM notifications will trigger your custom sound whenever you send a notification with the configured channel_id.</p><p>You can also do it by adding the below code to your native Android code in the Kotlin folder create a new Kotlin file:</p><pre>package com.test_package.app_name<br><br>import android.app.Notification<br>import android.app.NotificationChannel<br>import android.app.NotificationManager<br>import android.content.Context<br>import android.os.Build<br>import androidx.core.app.NotificationCompat<br>import android.media.AudioAttributes;<br>import android.net.Uri;<br><br>object Notifications {<br>    const val NOTIFICATION_ID_BACKGROUND_SERVICE = 1<br><br>    private const val CHANNEL_ID_BACKGROUND_SERVICE = &quot;test_channel&quot;<br><br>    fun createNotificationChannels(context: Context) {<br>        if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {<br><br>            val soundUri: Uri = Uri.parse(<br>                &quot;android.resource://&quot; +<br>                        context.packageName +<br>                        &quot;/raw/long_notification_sound&quot;)<br><br>            val audioAttributes = AudioAttributes.Builder()<br>                .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)<br>                .setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE)<br>                .build()<br><br>            val channel = NotificationChannel(<br>                CHANNEL_ID_BACKGROUND_SERVICE,<br>                &quot;Background Service&quot;,<br>                NotificationManager.IMPORTANCE_HIGH<br>            )<br><br>            channel.setSound(soundUri, audioAttributes)<br><br>            val manager =<br>                context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager<br>            manager.createNotificationChannel(channel)<br>        }<br>    }<br><br>    fun buildForegroundNotification(context: Context): Notification {<br>        return NotificationCompat<br>            .Builder(context, CHANNEL_ID_BACKGROUND_SERVICE)<br>            .setSmallIcon(R.mipmap.ic_launcher)<br>            .setContentTitle(&quot;Background Service&quot;)<br>            .setContentText(&quot;Keeps app process on foreground.&quot;)<br>            .build()<br>    }<br>}</pre><p>Don’t forget to add your sound file in your res/raw folder as in the code.</p><p>update your MainActivity file to execute this code:</p><pre> override fun onCreate(savedInstanceState: Bundle?) {<br>        super.onCreate(savedInstanceState)<br>        Notifications.createNotificationChannels(this)<br>    }</pre><p>if you face any problems feel free to ask.</p><p>We can connect on <a href="https://www.linkedin.com/in/farhan-aslam-software-engineer/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=471016bf8760" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build a career as a Flutter Developer?]]></title>
            <link>https://medium.com/@farhanaslam910/how-to-build-a-career-as-a-flutter-developer-923f2e45a53b?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/923f2e45a53b</guid>
            <category><![CDATA[flutter-developer]]></category>
            <category><![CDATA[fluttercareer]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[learn-flutter]]></category>
            <category><![CDATA[flutter-roadmap]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Thu, 24 Aug 2023 05:45:57 GMT</pubDate>
            <atom:updated>2023-08-24T05:45:57.688Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Folks,<br> In this blog, we will discuss the career of a Flutter Developer. I have been developing mobile applications with Flutter for the past few years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPCaYcb367Uv5Zv8OYr_Bw.png" /><figcaption>Career as a Flutter Dev</figcaption></figure><p>In the beginning, when we are learning a new technology it’s always very exciting and satisfactory. We explore something new, learn it, and improve ourselves. This thing keeps boosting our dopamine which increases our desire to learn and grow. But after a few years when we start repeatedly using these techniques, our dopamine doesn’t boost anymore we start getting bored from doing one thing for years.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o7TKEP6YngkCKFofC%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o7TKEP6YngkCKFofC%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExN282bmR6cWp4Y3RkdGdzOW9sbm1seXF5OXRlOGtyY2E0OWplZ25ubSZlcD12MV9naWZzX2dpZklkJmN0PWc%2F3o7TKEP6YngkCKFofC%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="328" frameborder="0" scrolling="no"><a href="https://medium.com/media/afb6b9740b42f6ea895220040c234c8a/href">https://medium.com/media/afb6b9740b42f6ea895220040c234c8a/href</a></iframe><p>So Flutter is just a tool from a number of other tools that will be part of your career path If someone is working with Flutter probably he is looking for a career in the mobile applications world where we need to learn native platforms too like Android native, iOS native, etc. That’s how you can build a career as a Mobile application developer.</p><p>Stop Stop, It does not end here. Actually, before jumping into Flutter, I let you to aware of your journey. There is not a career in Flutter but it’s a tool that you can learn like many others tool.</p><p>To learn Flutter there are three major pathways depending on your previous experience.</p><ul><li>Beginner</li><li>Intermedia</li><li>Advance</li></ul><p>These three are well defined with some very helpful official videos and articles that can pave your path to learn flutter. Choose your path and start learning with official documentation.</p><p><a href="https://flutter.dev/learn">Learn</a></p><p>Keep learning and keep shining If you have any questions or queries feel free to ask. We can even connect on Linkedin too.</p><p><a href="https://www.linkedin.com/in/farhan-aslam-software-engineer/">https://www.linkedin.com/in/farhan-aslam-software-engineer/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=923f2e45a53b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add Custom Markers on Google map in the flutter mobile app]]></title>
            <link>https://medium.com/@farhanaslam910/how-to-add-custom-markers-on-google-map-in-the-flutter-mobile-app-5cb3c3f186c0?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cb3c3f186c0</guid>
            <category><![CDATA[google-map-marker]]></category>
            <category><![CDATA[marker]]></category>
            <category><![CDATA[google-map-api]]></category>
            <category><![CDATA[custom-marker]]></category>
            <category><![CDATA[flutter-maps]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Mon, 20 Mar 2023 04:47:29 GMT</pubDate>
            <atom:updated>2023-03-20T04:47:29.597Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Folks,</p><p>Most of these days apps use user location and maps to locate the location of their service or point their rider&#39;s location in case of delivery/rider apps. Google map comes up with a default marker but it doesn’t help much when we need to point to different types of markers with different symbols as per marker type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lc1OmfZZO48T_Jyy16LS9Q.png" /><figcaption>Marker Example:</figcaption></figure><p>As we can see in the above example we need to show custom markers and each marker have a specific type. We need to follow a few important steps to add markers to our flutter mobile app.</p><p>Steps are:</p><ul><li>Install <a href="https://pub.dev/packages/google_maps_flutter">google_maps_flutter</a> package</li><li>Prepare your markers list</li><li>Add your custom BitmapDescriptor</li></ul><p>After installing the google map package and adding your KEYS you are able to use the google map widget in your flutter app.</p><p>These days most apps are data-driven which means we need to request your server to access the required data. When your request is successful you have your response in your model class instance.</p><p>Now extract your list of markers data from the model class which must include lat-lng.</p><pre>Marker(<br>    markerId: MarkerId(index.toString()),<br>    position: LatLng(lat, lng),<br>    onTap: (){<br>    //ontap logic if need to perform a specific task<br>    },<br>    //info window should be shown on tap of the markers<br>    infoWindow: InfoWindow(title: &#39;test&#39;,snippet: &#39;desciption for test&#39;),<br>    icon: BitmapDescriptor.defaultMarker)</pre><p>When we are preparing our markers list we need to make sure to use our custom function to return the icon passed in the marker instead of the default marker and the info window is used to show the detail of the marker.</p><pre>Future&lt;BitmapDescriptor&gt; getCustomMarkerIcon(input) async {<br>    late BitmapDescriptor customIcon;<br>    await getBytesFromAsset(KImagesPath.markerList, 140)<br>        .then((value) =&gt; customIcon = BitmapDescriptor.fromBytes(value));<br>    return customIcon;<br>}</pre><p>Here we are using a function named getBytesFromAsset which is responsible for converting our asset files into bytes.</p><pre>Future&lt;Uint8List&gt; getBytesFromAsset(String path, double width) async {<br>  ByteData data = await rootBundle.load(path);<br>  ui.Codec codec = await ui.instantiateImageCodec(data.<br>  buffer.asUint8List(),targetWidth: width.toInt());<br>  ui.FrameInfo fi = await codec.getNextFrame();<br>  return (await fi.image.toByteData(format: ui.ImageByteFormat.png))!<br>          .buffer.asUint8List();<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cb3c3f186c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to find outliers & Data Susing Box Plot | Numerical]]></title>
            <link>https://medium.com/@farhanaslam910/how-to-find-outliers-data-susing-box-plot-numerical-9da55c736b11?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9da55c736b11</guid>
            <category><![CDATA[data-distribution]]></category>
            <category><![CDATA[normalization]]></category>
            <category><![CDATA[outliers]]></category>
            <category><![CDATA[skewed-data]]></category>
            <category><![CDATA[box-plot]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Mon, 07 Nov 2022 06:43:26 GMT</pubDate>
            <atom:updated>2022-11-07T06:43:26.138Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to find outliers &amp; Data Skewed using Box Plot | Numerical</h3><p>Hi Folks,</p><p>While working with the data it’s an important part to identify and remove outliers for better model training and predictions. In this blog, we will understand how we can identify outliers in our data using boxplot with an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8SYQibQEGRfKCRBYoQx0gw.png" /></figure><blockquote>Boxplot: used to check data skewed.</blockquote><p>Suppose we have a data set:</p><pre>data = 18,34,76,29,15,41,46,25,54,38,20,32,20,32,42,22</pre><pre>#First of all sort your data and remove duplicates</pre><pre>clean_data = 15,18,20,22,25,29,32,34,38,41,43,46,54,76</pre><p>Now we have cleaned and sorted the data, Now we need to find the median:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ZanPI37OxqOrb1zMLQHAg.png" /><figcaption>Median Formula: Google</figcaption></figure><p>In our case, we have an even number of data we will take the sum of centered two values and divide by 2.</p><pre>#Median<br>med = 32+34/2<br>med = 33</pre><p>Now we need to find the Q1 and Q3:</p><pre>#Quartile<br>#the median of the left half(Q1) and right half is (Q2):</pre><pre>left_half = 15,18,20,22,25,29,32<br>Q1 = 22</pre><pre>right_half = 34,38,41,43,46,54,76<br>Q3 = 43</pre><p>Here we need to find the IQR (Q2):</p><pre>#interquartile range<br>IQR = Q2 - Q1</pre><pre>IQR = 43 - 22</pre><pre>IQR = 21</pre><p>Now we need to find the Outlier Bound:</p><pre>Outlier Bound = [Q1-1.5*IQR, Q3+1.5*IQR]</pre><pre>Outlier Bound = [-9.5,74.5]</pre><p>Any data lower than -9.5 or higher than 74.5 is an outlier in our data:</p><p>As per our calculations, 76 is an outlier in our given dataset.</p><p>Data distribution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*8HS3-ySU6ZpFz_dUob1YEw.png" /><figcaption>Data Distribution</figcaption></figure><p>Our final graph with calculated values:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HTtWUyeJgKmuvNzjm2psKg.png" /><figcaption>Final Graph with values</figcaption></figure><p>If you still have any queries or confusion feel free to ask.</p><p>We can connect on <a href="https://www.linkedin.com/in/farhan-aslam-949121154/">Linkedin</a> too.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9da55c736b11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predict Your GPA using Machine Learning | Linear Regression | Numerical]]></title>
            <link>https://medium.com/@farhanaslam910/predict-your-gpa-using-machine-learning-linear-regression-numerical-57691e65f66d?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/57691e65f66d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[predictions]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[linear-regression-python]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Mon, 31 Oct 2022 04:48:36 GMT</pubDate>
            <atom:updated>2022-10-31T04:48:36.984Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Folks,</p><p>If you are learning Data Science and tired of house price prediction datasets, let’s make it a little interesting for you guys to learn with a practical example of your surrounding datasets. We will be using GPA data with respect to Study-Hours to train our model and will predict the GPA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zAh3gYJLeyqMei_P9trYdA.png" /><figcaption>Linear Regression from Scratch</figcaption></figure><p>The model we are using to predict our GPA is the Linear Regression model one of the well-known models used to predict continuous values also known as Line Fitting. We fit a line on our training dataset and predict values using a line equation.</p><p><strong>y=mx+b </strong>Where m is the slope of the line and b is the point of intercept of the line. Let’s find m and b where <strong>m</strong> = <strong>Σ(xn — x̄)(yn — y(mean))/Σ(xn — x̄) </strong>and b = <strong>y(mean) — m(x̄).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pBTBLgam8qSGxK0K3Cw3FA.png" /><figcaption>Our dataset and calculated values for equations</figcaption></figure><p>Now put extracted values in the given equations to find the slope and point of intercept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jic8dJ3LkTQIqym_wn5DfQ.png" /><figcaption>Predicted for X=15</figcaption></figure><p>That’s how a linear regression model works under the hood. It finds the best-fitting line in our data to make predictions.</p><p>In our next blog, we will code a linear regression model in python from scratch and then try it using the scikit-learn library in python.</p><p>If you have any questions or confusion feel free to ask, soon we will do a numerical Multiple Linear regression to predict a value on the base of multiple features instead of one.</p><p>We can connect on Linkedin too.</p><p><a href="https://www.linkedin.com/in/farhan-aslam-949121154/">https://www.linkedin.com/in/farhan-aslam-949121154/</a></p><p>If you are interested in learning through visual content you can check my youtube channel too.</p><p><a href="https://www.youtube.com/channel/UCXlwKSaagmp7Z2okxzj9-KQ">Beta Coder</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57691e65f66d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Selling 40 Hours a Week, A Good Deal or we need to Rethink!]]></title>
            <link>https://medium.com/@farhanaslam910/selling-40-hours-a-week-a-good-deal-or-we-need-to-rethink-adccee2fb76b?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/adccee2fb76b</guid>
            <category><![CDATA[40-hour-workweek]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[worklife-balance]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[goal-setting]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Wed, 19 Oct 2022 06:05:58 GMT</pubDate>
            <atom:updated>2022-10-19T06:05:58.276Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Folks,</p><p>You all are doing great and reading all of this sitting on the chair of your office (or from anywhere in the globe). It’s a thought, or argument and can be a question from all!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OoGZPGef3-ZNz9xW5pAYCA.png" /><figcaption>Selling 40 Hours/Week</figcaption></figure><p>Being a part of this 9 to 5 job culture have you ever felt how short is life!! What’s the most precious thing we all have in our life is time and what we are doing we are selling our time right?</p><p>Still, we are not able to afford the luxury, like after selling the most precious thing in our life we all are fighting to meet our needs.</p><p>Rethink, Work hard to get rid of selling your time.</p><p>Work hard for others to achieve their dreams but don’t forget your own destiny. Set your goals and track your progress if you can make it possible for someone else you can be that someone who is enjoying on a sunny beach being an owner of a tech joint.</p><p>There are a number of companies doing great to ease their employees through a hybrid work model. This helps us to maintain a balanced work-life but still remember we are selling our time the most precious thing in our life.</p><p>I will appreciate knowing your thoughts and opinions in the comment section.</p><p>We can connect on Linkedin too.</p><p><a href="https://www.linkedin.com/in/farhan-aslam-949121154/">https://www.linkedin.com/in/farhan-aslam-949121154/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adccee2fb76b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to extract(Query Parameters) data from a HTTP link in dart]]></title>
            <link>https://medium.com/@farhanaslam910/how-to-extract-query-parameters-data-from-a-http-link-in-dart-95c3d160bac2?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/95c3d160bac2</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[query-parameters]]></category>
            <category><![CDATA[dart-code]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[string-operations]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Wed, 12 Oct 2022 12:49:28 GMT</pubDate>
            <atom:updated>2022-10-12T12:49:28.657Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to extract(Query Parameters) data from an HTTP link in dart</h3><p>Hi Folks,</p><p>While implementing backend API there are a number of cases when we need to extract useful information from HTTP links. Recently when I was working with a payment method it return a URL in case of success and failure responses where I get it solved using string operations to get the desired information from the URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b4TKwHAc80PBOJVVaPElCQ.png" /><figcaption>URI parsing in Dart</figcaption></figure><p>It works very well unless in my next URL I got a number of parameters to deal with, where handling each of the parameters in a separate variable is not a good approach then I get to know about the URI parsing which solves my problem in one line of code.</p><p>First, you need to URI.parse your URL string.</p><pre>final string url = &quot;<a href="https://www.test.com/?id=5&amp;name=test">https://www.test.com?id=5&amp;name=test</a>;</pre><pre>final parsedUrl =  Uri.parse(url);</pre><p>Now we can get the params of the parsed URL using built-in functions like queryParameters. In a case, if a queryparam has more than one value or list you can get it too by using queryParametersAll.</p><pre>print(parsedUrl.queryParameters)<br>// {&quot;id&quot;:5,&quot;name&quot;:&quot;test&quot;}</pre><pre>print(parsedUrl.queryParametersAll)<br>// {&quot;id&quot;:[5],&quot;name&quot;:[&quot;test&quot;]}</pre><p>It offers a number of other helpful methods to play with a URL. If you face any issues or have a query feel free to ask.</p><p>We can connect on <a href="https://www.linkedin.com/in/farhan-aslam-949121154/">Linkedin</a> too.</p><p><a href="https://www.linkedin.com/in/farhan-aslam-949121154/">https://www.linkedin.com/in/farhan-aslam-949121154/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95c3d160bac2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Object Equality in Dart | hashmap concept | Solution Using equitable Package]]></title>
            <link>https://medium.com/@farhanaslam910/object-equality-in-dart-hashmap-concept-solution-using-equitable-package-e82ac38ca896?source=rss-2debcd1ccccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/e82ac38ca896</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[equatable]]></category>
            <category><![CDATA[dart-programming-language]]></category>
            <category><![CDATA[hashcode]]></category>
            <dc:creator><![CDATA[Farhan Aslam]]></dc:creator>
            <pubDate>Fri, 07 Oct 2022 06:07:57 GMT</pubDate>
            <atom:updated>2022-10-07T06:07:57.600Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Folks,</p><p>Developers often use equality operators to apply conditions in their programs but have you ever tried to compare two non-const constructor class objects with the same values you will wonder to know that it will give you a false answer even if both objects are initialized with the same inputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RoQrkkkbsyFms97uN_bZZQ.png" /><figcaption>Equatable in Dart</figcaption></figure><p>As in the above example, we created a class Test with <strong>a </strong>variable and in the main function, we created a class with a non-const constructor and created two instances of the class with the same values. Then next when we compare these two values as you can see it returns false.</p><p>We can resolve this issue by using a const constructor to some extent for the compile time values but still, it’s not the best solution because there are a number of values that need to be initialized on runtime.</p><p>We can also override the built-in equality operator (==) as per our requirements and can manage to get the equality result as per our expectations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-zikTs9sOjfmuFwcZsIJg.png" /><figcaption>Equality Operator override</figcaption></figure><p>It works very well and provides the results as expected but still, it becomes very complex to manage in the case of a class with a large number of variables, Here we need the best solution which is an <a href="https://pub.dev/packages/equatable"><strong>equatable</strong></a> package of the dart.</p><p>Equatable makes work easier to install this package in your app, add this to your pubspec.yaml file:</p><pre>dependencies:<br>  equatable: ^2.0.0</pre><p>Now run pub get to fetch this package, Now extend your class with the equatable package and override List&lt;Object&gt; containing all of your variables in your class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E0jtke6g4lQesyZ8VE5JnA.png" /><figcaption>Using Equatable</figcaption></figure><p>That’s how you get your problem resolved using a package and single line add in your class.</p><p>If you want to learn more about this concept you can check the flutter official video.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDCKaFaU4jdk%3Fstart%3D36%26feature%3Doembed%26start%3D36&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDCKaFaU4jdk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDCKaFaU4jdk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a48b5c9105eeafd3d0597b0e4aebb505/href">https://medium.com/media/a48b5c9105eeafd3d0597b0e4aebb505/href</a></iframe><p>We can connect on Linkedin too, I am always sharing helpful content for the community.</p><p><a href="https://www.linkedin.com/in/farhan-aslam-949121154/">https://www.linkedin.com/in/farhan-aslam-949121154/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e82ac38ca896" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>