<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kashif Raza</title>
    <description>The latest articles on DEV Community by Kashif Raza (@kashifraza).</description>
    <link>https://dev.to/kashifraza</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F191595%2Fb9d0e885-399f-4dbd-a5a2-b180ed11bfb8.jpeg</url>
      <title>DEV Community: Kashif Raza</title>
      <link>https://dev.to/kashifraza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kashifraza"/>
    <language>en</language>
    <item>
      <title>Could not connect to development server on android emulator and on real device</title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Sat, 19 Nov 2022 01:26:15 +0000</pubDate>
      <link>https://dev.to/kashifraza/could-not-connect-to-development-server-on-android-emulator-and-on-real-device-486</link>
      <guid>https://dev.to/kashifraza/could-not-connect-to-development-server-on-android-emulator-and-on-real-device-486</guid>
      <description>&lt;p&gt;Have the same problem only on real android device.&lt;br&gt;
Solution:&lt;/p&gt;

&lt;p&gt;Add file android/app/src/main/res/xml/network_security_config.xml&lt;br&gt;
&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;
&lt;br&gt;
    &lt;br&gt;
        localhost&lt;br&gt;
    &lt;br&gt;
&lt;br&gt;
Add line to android/app/src/main/AndroidManifest.xml&lt;br&gt;
&amp;lt;application&lt;br&gt;
    ...&lt;br&gt;
    android:networkSecurityConfig="@xml/network_security_config"&lt;br&gt;
    ...&lt;/p&gt;

&lt;blockquote&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>Mixin Approaches for Media Queries with Sass </title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Tue, 06 Oct 2020 12:57:03 +0000</pubDate>
      <link>https://dev.to/kashifraza/mixin-approaches-for-media-queries-with-sass-27d5</link>
      <guid>https://dev.to/kashifraza/mixin-approaches-for-media-queries-with-sass-27d5</guid>
      <description>&lt;p&gt;Sass mixins give us the ability to create reusable chunks of code they reduce repetition, promote dry code &amp;amp; allow for ease of maintenance. Writing media queries as mixins to inject into your stylesheets, wherever they’re required — makes a whole lot of sense! Lets take a look at an example..&lt;/p&gt;

&lt;p&gt;Setup mixins&lt;/p&gt;

&lt;p&gt;@mixin for-size($size) {&lt;br&gt;
    @if $size == phone-only {&lt;br&gt;
      @media (max-width: 375px) { @content; }&lt;br&gt;
    }&lt;a class="mentioned-user" href="https://dev.to/else"&gt;@else&lt;/a&gt;
 if $size == mobile-small {&lt;br&gt;
        @media (max-width: 480px) { @content; }&lt;br&gt;
    }&lt;a class="mentioned-user" href="https://dev.to/else"&gt;@else&lt;/a&gt;
 if $size == max-mobile {&lt;br&gt;
        @media (max-width: 767px) { @content; }&lt;br&gt;
    }&lt;a class="mentioned-user" href="https://dev.to/else"&gt;@else&lt;/a&gt;
 if $size == tablet-landscape-up {&lt;br&gt;
        @media (max-width: 991px) { @content; }&lt;br&gt;
    }&lt;a class="mentioned-user" href="https://dev.to/else"&gt;@else&lt;/a&gt;
 if $size == tablet-landscape-up {&lt;br&gt;
        @media (max-width: 1024px) { @content; }&lt;br&gt;
    }&lt;a class="mentioned-user" href="https://dev.to/else"&gt;@else&lt;/a&gt;
 if $size == desktop-up {&lt;br&gt;
      @media (max-width: 1200px) { @content; }&lt;br&gt;
    } &lt;a class="mentioned-user" href="https://dev.to/else"&gt;@else&lt;/a&gt;
 if $size == big-desktop-up {&lt;br&gt;
      @media (min-width: 1600px) { @content; }&lt;br&gt;
    }&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;Using Mixin&lt;/p&gt;

&lt;p&gt;.header-title {&lt;br&gt;&lt;br&gt;
   font-size: 2rem;  &lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/include"&gt;@include&lt;/a&gt;
 for-size(phone-only) {&lt;br&gt;&lt;br&gt;
      font-size: 1rem; &lt;br&gt;
   }&lt;br&gt;
}&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using aria-labelledby</title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Wed, 12 Feb 2020 09:28:52 +0000</pubDate>
      <link>https://dev.to/kashifraza/using-aria-labelledby-2jp5</link>
      <guid>https://dev.to/kashifraza/using-aria-labelledby-2jp5</guid>
      <description>&lt;p&gt;Using aria-labelledby to provide a text alternative for non-text content&lt;br&gt;
The purpose of this technique is to provide a short description for an element that can be read by assistive technologies (AT) by using the aria-labelledby attribute. The aria-labelledby attribute associates an element with text that is visible elsewhere on the page by using an ID reference value that matches the ID attribute of the labeling element. Assistive technology such as screen readers use the text of the element identified by the value of the aria-labelledby attribute as the text alternative for the element with the attribute.&lt;/p&gt;

&lt;p&gt;Note: When using aria-labelledby attribute on an img element, the absence of an alt attribute will cause validation failures for HTML 4 and earlier and XHTML. If alt is provided, it must contain the same text as the aria-labelledby target. Do not use alt="", which would cause some assistive techology to ignore the image completely.&lt;/p&gt;

&lt;pre&gt;
&amp;lt; img src="sunflowers.jpg" aria-labelledby="flower_id" &amp;gt;

...

&amp;lt; span id="flower_id"&amp;gt;Van Gogh's oil painting of sunflowers&amp;lt; / span &amp;gt;
hangs in Amsterdam's Van Gogh museum.
&lt;/pre&gt;

</description>
    </item>
    <item>
      <title>Leverage browser caching, how on apache or .htaccess?
</title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Mon, 02 Dec 2019 06:12:29 +0000</pubDate>
      <link>https://dev.to/kashifraza/leverage-browser-caching-how-on-apache-or-htaccess-2abo</link>
      <guid>https://dev.to/kashifraza/leverage-browser-caching-how-on-apache-or-htaccess-2abo</guid>
      <description>&lt;pre&gt;
    &lt;code&gt;
# Enable Compression

  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain


  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*


# Leverage Browser Caching

  ExpiresActive On
  ExpiresByType image/jpg "access 1 year"
  ExpiresByType image/jpeg "access 1 year"
  ExpiresByType image/gif "access 1 year"
  ExpiresByType image/png "access 1 year"
  ExpiresByType text/css "access 1 month"
  ExpiresByType text/html "access 1 month"
  ExpiresByType application/pdf "access 1 month"
  ExpiresByType text/x-javascript "access 1 month"
  ExpiresByType application/x-shockwave-flash "access 1 month"
  ExpiresByType image/x-icon "access 1 year"
  ExpiresDefault "access 1 month"


  
  Header set Cache-Control "max-age=2678400, public"
  
  
  Header set Cache-Control "max-age=7200, private, must-revalidate"
  
  
  Header set Cache-Control "max-age=86400, public"
  
  
  Header set Cache-Control "max-age=2678400, private"
  

&lt;/code&gt;
&lt;/pre&gt;
     

</description>
      <category>leveragebrowsercaching</category>
      <category>enablecompression</category>
    </item>
    <item>
      <title>Do you know why in JavaScript is "11" + 1 = 111, but "11" - 1 = 10?
</title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Thu, 03 Oct 2019 04:32:27 +0000</pubDate>
      <link>https://dev.to/kashifraza/do-you-know-why-in-javascript-is-11-1-111-but-11-1-10-53ko</link>
      <guid>https://dev.to/kashifraza/do-you-know-why-in-javascript-is-11-1-111-but-11-1-10-53ko</guid>
      <description></description>
    </item>
    <item>
      <title>WordPress: Change Sender Name and Email Address from wp</title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Thu, 19 Sep 2019 19:41:57 +0000</pubDate>
      <link>https://dev.to/kashifraza/wordpress-change-sender-name-and-email-address-from-wp-54bn</link>
      <guid>https://dev.to/kashifraza/wordpress-change-sender-name-and-email-address-from-wp-54bn</guid>
      <description>&lt;p&gt;This code simply replaces the default WordPress sender name and email address with your custom sender name and email address.&lt;/p&gt;

&lt;p&gt;You can test this by adding a new user, changing password, or any other action that sends WordPress notification email.&lt;/p&gt;

&lt;p&gt;// Function to change email address&lt;/p&gt;

&lt;p&gt;function wpb_sender_email( $original_email_address ) {&lt;br&gt;
    return '&lt;a href="mailto:tim.smith@example.com"&gt;tim.smith@example.com&lt;/a&gt;';&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;// Function to change sender name&lt;br&gt;
function wpb_sender_name( $original_email_from ) {&lt;br&gt;
    return 'Tim Smith';&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;// Hooking up our functions to WordPress filters &lt;br&gt;
add_filter( 'wp_mail_from', 'wpb_sender_email' );&lt;br&gt;
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );&lt;/p&gt;

</description>
      <category>wordpress</category>
    </item>
    <item>
      <title>Find missing integer(s) in given an array.You know that every integer 1-N appears once in the array</title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Mon, 05 Aug 2019 06:45:50 +0000</pubDate>
      <link>https://dev.to/kashifraza/find-missing-integer-s-in-given-an-array-you-know-that-every-integer-1-n-appears-once-in-the-array-4mnk</link>
      <guid>https://dev.to/kashifraza/find-missing-integer-s-in-given-an-array-you-know-that-every-integer-1-n-appears-once-in-the-array-4mnk</guid>
      <description>&lt;p&gt;Here is solutions&lt;/p&gt;

&lt;pre&gt;
var numbers = [0,1,3,4,5,7,8]; // Missing 2,6
var missing = [];

// Find the missing array items
for ( var i = 0; i &amp;lt; numbers.length; i++ ) {

    if ( (numbers[i+1] - numbers[i]) &amp;gt; 1 ) {
        missing.push( numbers[i+1] - numbers[1] );   
    }
}

console.log( missing );
&lt;/pre&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Working with awesome tool oi.flyimg.io Fetch an image from anywhere; resize compress cache and serve...</title>
      <dc:creator>Kashif Raza</dc:creator>
      <pubDate>Sun, 07 Jul 2019 16:49:20 +0000</pubDate>
      <link>https://dev.to/kashifraza/working-with-awesome-tool-oi-flyimg-io-fetch-an-image-from-anywhere-resize-compress-cache-and-serve-20lc</link>
      <guid>https://dev.to/kashifraza/working-with-awesome-tool-oi-flyimg-io-fetch-an-image-from-anywhere-resize-compress-cache-and-serve-20lc</guid>
      <description>&lt;p&gt;Flyimg: Working with awesome tool oi.flyimg.io, Fetch an image from anywhere; resize, compress, cache and serve... and serve, and serve...&lt;/p&gt;

&lt;p&gt;Features: &lt;br&gt;
Get images from anywhere in the internet and store them locally for further operations.&lt;br&gt;
Resize an image and serve it compressed (Jpeg for JPEGs)&lt;br&gt;
Crop images to given coordinates&lt;br&gt;
Convert between some formats (Webp, JPEG, PNG, GIF)&lt;br&gt;
It can restrict the domains or IPs from where it pulls images to transform.&lt;br&gt;
It's a bunch of well know open source projects packed together for convenience.&lt;br&gt;
It includes face detection, cropping, face blurring, image rotation and many other options.&lt;br&gt;
Simple and easy to extend (our main goal).&lt;/p&gt;

&lt;p&gt;Face detection cropping:&lt;br&gt;
&lt;a href="https://oi.flyimg.io/upload/fc_1/https://oi.flyimg.io/faces.jpg"&gt;https://oi.flyimg.io/upload/fc_1/https://oi.flyimg.io/faces.jpg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Face detection blurring + resize:&lt;br&gt;
&lt;a href="https://oi.flyimg.io/upload/fb_1,w_600/https://oi.flyimg.io/faces.jpg"&gt;https://oi.flyimg.io/upload/fb_1,w_600/https://oi.flyimg.io/faces.jpg&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cacheandserve</category>
      <category>compress</category>
      <category>resize</category>
    </item>
  </channel>
</rss>
