<?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: kode eazy</title>
    <description>The latest articles on DEV Community by kode eazy (@bugsanalyze).</description>
    <link>https://dev.to/bugsanalyze</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%2F900955%2F7f7a665c-ccd6-4439-bb00-409470f0cf97.png</url>
      <title>DEV Community: kode eazy</title>
      <link>https://dev.to/bugsanalyze</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bugsanalyze"/>
    <language>en</language>
    <item>
      <title>How to replace whitespaces in A String with underscore without using replace function in python?</title>
      <dc:creator>kode eazy</dc:creator>
      <pubDate>Tue, 09 Aug 2022 11:20:17 +0000</pubDate>
      <link>https://dev.to/bugsanalyze/how-to-replace-whitespaces-in-a-string-with-underscore-without-using-replace-function-in-python-5gab</link>
      <guid>https://dev.to/bugsanalyze/how-to-replace-whitespaces-in-a-string-with-underscore-without-using-replace-function-in-python-5gab</guid>
      <description>&lt;p&gt;In this blog we will discuss on how to replace all occurrences of whitespaces with underscore in a &lt;em&gt;string&lt;/em&gt; in python .&lt;br&gt;
I have a string as below.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;string = 'Lets start coding in python'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To replace the particular &lt;em&gt;character&lt;/em&gt; like &lt;em&gt;empty space&lt;/em&gt; of all occurrences in a &lt;em&gt;String&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;loop through the characters of the string and check for the &lt;em&gt;empty space&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If found &lt;em&gt;empty space&lt;/em&gt; at particular &lt;em&gt;index&lt;/em&gt; replace the &lt;em&gt;character&lt;/em&gt; by dividing into substrings and appending &lt;em&gt;underscore&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Below is the example syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;string = string[:pos] + '_' + string[pos+1:]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above syntax &lt;em&gt;pos&lt;/em&gt; is the index at which we replace empty space with _.&lt;/p&gt;

&lt;p&gt;Below is the example code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;string = 'Lets start coding in python'
for pos in range(0, len(string)):
if(string[pos]==' '):
        string = string[:pos] + '_' + string[pos+1:]
print(string)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Lets_start_coding_in_python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Related Blogs&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://kodeazy.com/python-replace-character-in-string/"&gt;https://kodeazy.com/python-replace-character-in-string/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Originally Published at&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://kodeazy.com/"&gt;https://kodeazy.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow us &lt;a href="https://dev.toclick%20here"&gt;https://twitter.com/bugsanalyze&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>string</category>
      <category>index</category>
      <category>forloop</category>
    </item>
    <item>
      <title>How to convert file object to path object in Java?</title>
      <dc:creator>kode eazy</dc:creator>
      <pubDate>Thu, 04 Aug 2022 16:11:00 +0000</pubDate>
      <link>https://dev.to/bugsanalyze/how-to-convert-file-object-to-path-object-in-java-1l2g</link>
      <guid>https://dev.to/bugsanalyze/how-to-convert-file-object-to-path-object-in-java-1l2g</guid>
      <description>&lt;p&gt;To convert file object to path object we use toPath() function by importing import java.nio.file.Path class.&lt;/p&gt;

&lt;p&gt;Below is the syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Path path=myObj.toPath();

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

&lt;/div&gt;



&lt;p&gt;Below is the sample Program to convert File object to Path object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
class FileExample{
public static void main(String args[]) throws Exception{
     File myObj = new File("fileExample.txt");
     Path path=myObj.toPath();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>java</category>
      <category>files</category>
      <category>path</category>
      <category>exceptionhandling</category>
    </item>
    <item>
      <title>How to enable blocked webcam after installation of k7totalsecurity in windows?</title>
      <dc:creator>kode eazy</dc:creator>
      <pubDate>Wed, 03 Aug 2022 09:15:06 +0000</pubDate>
      <link>https://dev.to/bugsanalyze/how-to-enable-blocked-webcam-after-installation-of-k7totalsecurity-in-windows-4lo6</link>
      <guid>https://dev.to/bugsanalyze/how-to-enable-blocked-webcam-after-installation-of-k7totalsecurity-in-windows-4lo6</guid>
      <description>&lt;p&gt;In this blog we will be discussing on how to enable or disable webcam option in &lt;strong&gt;K7TotalSecurity&lt;/strong&gt; anti virus.&lt;/p&gt;

&lt;p&gt;To enable &lt;strong&gt;webcam&lt;/strong&gt;, open &lt;strong&gt;K7TotalSecurity&lt;/strong&gt; and click on the &lt;strong&gt;details&lt;/strong&gt; option as shown in the below image circled in red colour.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZGrgdi5y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pofuivblzbdr8y1z6lqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZGrgdi5y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pofuivblzbdr8y1z6lqw.png" alt="Image description" width="860" height="630"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROTECTION&lt;/strong&gt; page will be opened in &lt;strong&gt;thek7totalsecurity&lt;/strong&gt; application.&lt;br&gt;
Now scroll down you can find Webcam &lt;strong&gt;Protection option&lt;/strong&gt; as shown in below image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AmUwxZwQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uh95ykmtf39c5kf6917.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AmUwxZwQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uh95ykmtf39c5kf6917.png" alt="Image description" width="861" height="615"&gt;&lt;/a&gt;&lt;br&gt;
Now &lt;strong&gt;toggle&lt;/strong&gt; switch to off on webcam Protection option.&lt;/p&gt;

</description>
      <category>k7totalsecurity</category>
      <category>antivirus</category>
      <category>windows</category>
      <category>camera</category>
    </item>
    <item>
      <title>How to access private s3 files using URI</title>
      <dc:creator>kode eazy</dc:creator>
      <pubDate>Sun, 31 Jul 2022 16:11:35 +0000</pubDate>
      <link>https://dev.to/bugsanalyze/how-to-access-private-s3-files-using-uri-2i43</link>
      <guid>https://dev.to/bugsanalyze/how-to-access-private-s3-files-using-uri-2i43</guid>
      <description>&lt;p&gt;In AWS S3 bucket is mainly used to store files.&lt;br&gt;
To access S3 bucket files follow below steps.&lt;br&gt;
Provide access configuration using AWS.config() method as below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AWS.config.update({
region: "us-east-2",
signatureVersion: 'v4',
credentials: new AWS.Credentials(AccessKey, AccesSecreteKey, token)
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Later intitialize s3 variable using new AWS.S3()&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var s3 = new AWS.S3();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get access URI of the file we use getSignedUrl() method of s3 bucket Here we have three parameters&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bucket:Name&lt;/strong&gt; of the Bucket&lt;br&gt;
&lt;strong&gt;Key&lt;/strong&gt;: Path inside the Bucket&lt;br&gt;
&lt;strong&gt;Expires&lt;/strong&gt;: No of seconds the required to enable the URI(maximum 1 week)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var presignedURI = s3.getSignedUrl('getObject', {
   Bucket: "Bucket_Name",
   Key: "FIle_Path",
   Expires: seconds
});
console.log(presignedURI);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here presignedURI variable provides the URL,we can access the file using this URL&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>s3</category>
      <category>aws</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
