<?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 Sami C. on Medium]]></title>
        <description><![CDATA[Stories by Sami C. on Medium]]></description>
        <link>https://medium.com/@chsamii?source=rss-49fb6638bfc3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o4ERr_5Q3Y3kj7H0-4kSUw.jpeg</url>
            <title>Stories by Sami C. on Medium</title>
            <link>https://medium.com/@chsamii?source=rss-49fb6638bfc3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 00:52:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chsamii/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[Setting Up Custom Domains in Azure Static Web Apps]]></title>
            <link>https://chsamii.medium.com/setting-up-custom-domains-in-azure-static-web-apps-f7d2b5e3a73c?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7d2b5e3a73c</guid>
            <category><![CDATA[azure-static-web-app]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[custom-domain]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Sat, 28 Dec 2024 13:10:30 GMT</pubDate>
            <atom:updated>2024-12-28T13:10:30.632Z</atom:updated>
            <content:encoded><![CDATA[<h4>Step 1: Open the Custom Domains Page</h4><p>Go to your Azure Static Web App in the Azure Portal. From the left-hand menu, click on **Custom domains**.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTahwJEK7UNRmJ-Lm_BeQw.png" /></figure><h4>Step 2: Add a Custom Domain</h4><p>Click the **Add** button and choose the option for **Custom domain on other DNS**.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*Qiw_dPVoXkZFIa6FsyMpGg.png" /></figure><h4>Step 3: Verify Your Domain</h4><p>To verify your domain, you need to add a TXT record to your DNS provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*LqOnu2VSz13V9kfzG6uA3w.png" /></figure><p>Copy the generated TXT record value and paste it into your DNS provider’s settings. This unique value provides a valid connection between Azure and your DNS provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*Yc40THmxRBiP-XZvytdvyA.png" /></figure><p>For example, if you use Hostinger, it might look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GuL0vM7B-Lu0xz9cQxud6g.png" /></figure><h4>Step 4: Add a WWW Subdomain</h4><p>Repeat the process, but this time use **<a href="http://www.yourdomain.com**/">www.yourdomain.com**</a> instead of **yourdomain.com**.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*PPqBfdAd0SUs2cS94KV5xQ.png" /></figure><h4>Step 5: Configure CNAME Records</h4><p>In the Azure portal, select **CNAME** and click the **Add** button at the bottom of the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*tHTAGvuWcBfU03S35iuoqg.png" /></figure><p>In your DNS provider’s settings, add or edit the following CNAME records:</p><p>1. For <strong>www.yourdomain.com</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*vmSEiY89ycvQB6XLfw8Fhw.png" /></figure><p>2. For the root domain (yourdomain.com), add an alias (CNAME):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*9Bzqj95kKJgj1ooi3Aaupw.png" /></figure><p>These configurations make sure your website works with both <strong>www </strong>and without it.</p><h4>Done!</h4><p>That’s it! Your custom domain is now linked to your Azure Static Web App.</p><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7d2b5e3a73c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TestContainers in .NET with PostgreSQL and PgVector]]></title>
            <link>https://chsamii.medium.com/overview-fdbac8e9d39f?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdbac8e9d39f</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[testcontainer]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Sat, 28 Dec 2024 06:15:29 GMT</pubDate>
            <atom:updated>2024-12-28T06:23:26.515Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*W-5z-RpEuNi3VLzl5HKecQ.png" /></figure><h4>Integration testing made easy</h4><h4>What are we solving?</h4><p>How to include postgresql extension in a docker image through C# for integration tests.</p><h3>Overview</h3><p>I’m using C# with the Testcontainers.PostgreSql NuGet package, which makes it easy to spin up PostgreSQL containers for integration testing. The core idea behind this setup is to ensure that each test class gets a clean, isolated database instance. This database is used to execute integration tests and is deleted afterward.</p><blockquote>Testcontainers for .NET is a library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions. The library is built on top of the .NET Docker remote API and provides a lightweight implementation to support your test environment in all circumstances.</blockquote><h3>Container Configuration</h3><p>Here’s how I configured the PostgreSQL container:</p><pre>private const ushort Port = 5432;<br>private const string Username = &quot;postgres&quot;;<br>private const string Password = &quot;postgres&quot;;<br>private const string Database = &quot;postgres&quot;;<br>private const string Host = &quot;localhost&quot;;</pre><pre>private readonly PostgreSqlContainer _dbContainer = new PostgreSqlBuilder()<br>    .WithImage(&quot;pgvector/pgvector:pg16&quot;)<br>    .WithUsername(Username)<br>    .WithPassword(Password)<br>    .WithPortBinding(Port, true)<br> .WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(Port))<br>    .Build();</pre><p>Notice that I used the pgvector:pg16 Docker image, as it already comes configured with the pgvector extension.</p><h3>Adding PostgreSQL Extensions</h3><p>The project requires three PostgreSQL extensions:</p><pre>protected override void OnModelCreating(ModelBuilder modelBuilder)<br>{<br>    modelBuilder.HasPostgresExtension(&quot;vector&quot;);  <br>    modelBuilder.HasPostgresExtension(&quot;btree_gin&quot;);<br>    modelBuilder.HasPostgresExtension(&quot;pg_trgm&quot;);<br>}</pre><p>Using HasPostgresExtension ensures that EF Core manages these extensions as part of the migrations or schema setup process. The following SQL commands are automatically generated and executed:</p><pre>CREATE EXTENSION IF NOT EXISTS &quot;vector&quot;;<br>CREATE EXTENSION IF NOT EXISTS &quot;btree_gin&quot;;<br>CREATE EXTENSION IF NOT EXISTS &quot;pg_trgm&quot;;</pre><h3>HasPostgresExtension vs UseVector</h3><p>There is a distinction between HasPostgresExtension(&quot;vector&quot;) and using the extension directly through UseVector:</p><pre>.UseNpgsql(connectionString, o =&gt; o.UseVector())</pre><h3>Key Differences:</h3><p><strong>HasPostgresExtension(&quot;vector&quot;)</strong></p><ul><li>Ensures that EF Core includes the extension during migrations or schema updates.</li><li>Manages the database schema and ensures the extension is installed.</li></ul><p><strong>UseVector</strong></p><ul><li>Configures Npgsql to utilize the vector extension’s functionality, such as advanced type mappings and query capabilities.</li><li>Enables application-level usage, like executing vector similarity queries:</li></ul><pre>SELECT * FROM my_table ORDER BY embedding &lt;-&gt; query_embedding LIMIT 10;</pre><h3>Initializing the Database with Scripts</h3><p>In addition to setting up extensions through EF Core, I discovered an alternative method to initialize the database in the test container using a SQL script. This is achieved with WithResourceMapping:</p><pre>WithResourceMapping(&quot;./Scripts/extensions.sql&quot;, &quot;/docker-entrypoint-initdb.d&quot;)</pre><h3>What Does docker-entrypoint-initdb.d Do?</h3><p>The docker-entrypoint-initdb.d directory allows you to provide SQL or script files that PostgreSQL executes automatically during container initialization. This approach is ideal for preloading extensions or setting up other database configurations without embedding logic directly in the code.</p><h3>Conclusion</h3><p>Using EF Core with Testcontainers, I’ve set up a way to make sure each test gets a fresh and clean database. Extensions like vector, btree_gin, and pg_trgm provide useful features, and the automated setup makes it easy to get everything ready without extra work. This keeps tests reliable and maintenance straightforward.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdbac8e9d39f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling errors in ASP.NET Core Web API]]></title>
            <link>https://chsamii.medium.com/handling-errors-in-asp-net-core-web-api-162bb2dd00e4?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/162bb2dd00e4</guid>
            <category><![CDATA[error-handling]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[validation]]></category>
            <category><![CDATA[problemdetails]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Sat, 23 Oct 2021 11:44:10 GMT</pubDate>
            <atom:updated>2021-10-23T11:44:10.546Z</atom:updated>
            <content:encoded><![CDATA[<p>When creating a RESTful HTTP API, status codes can be a good way to indicate to the client if a request was successful or not. But if there was a problem, how do you tell the client specifically what was wrong?</p><p>Here’s the most common thing I usually see. Here are two made up requests responses that I made, but these are based on real API’s that I’ve used recently.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/10fdf019a1960f0120696ef03f634d7b/href">https://medium.com/media/10fdf019a1960f0120696ef03f634d7b/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/359174c2dcdc9e35d6f36ccb91dc9619/href">https://medium.com/media/359174c2dcdc9e35d6f36ccb91dc9619/href</a></iframe><p>The second example is a little different. We have a status code 200 OK; But in the actually body we have a success property which is defined as false. We are not using the status code in a meaningful way here.</p><h4>So what do these two error responses have in common?</h4><p>Well…they are errors, but beyond that, nothing, <strong>they have nothing in common</strong>, <strong>wouldn’t it be awesome if you had a standard way of defining errors from your HTTP API</strong>. Well I have some good news, it’s called the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.problemdetails?view=aspnetcore-5.0">ProblemDetails API</a>.</p><h4>ProblemDetails API</h4><p>Here is an example of a JSON carrying JSON problem details:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*lJ9Q4T8E_W_3qOoxsZDzig.png" /></figure><p>Here’s a brief explanation explanation every member:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*aguI7zaMeUMsxcBNxjQ-Kg.png" /><figcaption><a href="https://datatracker.ietf.org/doc/html/rfc7807#section-3.1">https://datatracker.ietf.org/doc/html/rfc7807#section-3.1</a></figcaption></figure><p>Extension members</p><p>It’s perfectly fine to add additional members to your ProblemDetails API. Here is an example with “balance” and “accounts” added.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/596bc692edfa0be99c7a1a507364b03a/href">https://medium.com/media/596bc692edfa0be99c7a1a507364b03a/href</a></iframe><blockquote>Clients consuming problem details MUST ignore any such extensions<br> that they don&#39;t recognize; this allows problem types to evolve and<br> include additional information in the future.</blockquote><p>Curious on how this is implemented in .NET Core?</p><p>Here’s a great tutorial by code-maze on how to implement the ProblemDetails API in .NET Core.</p><p><a href="https://code-maze.com/using-the-problemdetails-class-in-asp-net-core-web-api/">Using the ProblemDetails Class in ASP.NET Core Web API</a></p><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=162bb2dd00e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Typescript: Property ‘foo’ does not exist on type ‘Vue’]]></title>
            <link>https://chsamii.medium.com/typescript-property-foo-does-not-exist-on-type-vue-11f3157797c1?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f3157797c1</guid>
            <category><![CDATA[setter]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vue]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Tue, 12 Oct 2021 18:01:31 GMT</pubDate>
            <atom:updated>2021-10-12T18:02:02.884Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I was plagued with an annoying bug! I was banging my head for a while!</p><p>Let’s get into it! For example purposes, I will show you a snippet of how my code looked like:</p><pre>export default Vue.extend({<br>    name: &#39;justaname&#39;,<br>    data() {<br>        return {<br>            currentSlide: 0 as number<br>        };<br>    },<br>    computed: {<br>        internalOpen: {<br>            get(): boolean {<br>                return this.value;<br>            },<br>            set(val) {<br>                (this as any).$emit(&#39;input&#39;, false);<br>            },<br>        },<br>    },<br>});</pre><p>This resulted in the following error:</p><blockquote>Typescript: Property ‘currentSlide’ does not exist on type ‘Vue’</blockquote><p>When I added a type on my setter val the error was no longer present!</p><pre>set(<strong>val: boolean</strong>) {<br>  (this as any).$emit(&#39;input&#39;, false);<br>},</pre><p>Basically if your setter is missing a type you’ll get this strange error.</p><p>Hopefully this helps some people out there! 😄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11f3157797c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EF Core — IQueryable inside foreach]]></title>
            <link>https://chsamii.medium.com/ef-core-iqueryable-inside-foreach-c1a8abd67729?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1a8abd67729</guid>
            <category><![CDATA[query]]></category>
            <category><![CDATA[entityframework-core]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Tue, 12 Oct 2021 17:48:00 GMT</pubDate>
            <atom:updated>2021-10-12T17:48:00.360Z</atom:updated>
            <content:encoded><![CDATA[<h3>EF Core — IQueryable inside foreach</h3><p>Did you know that the following code will work:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4ec7c621def3a0b041627cc2957797e/href">https://medium.com/media/f4ec7c621def3a0b041627cc2957797e/href</a></iframe><p>The IQueryable&lt;Entity&gt; will attempt to load the entire query result into memory when enumerated.</p><p>I prefer to use the ToList()method to actually hit the database. In my opinion it’s a lot clearer than the example above.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e5299ae7ad19a027ce762253f2626ad/href">https://medium.com/media/9e5299ae7ad19a027ce762253f2626ad/href</a></iframe><p>Make sure to read the following documentation about EF Core if you’re interested in performance!</p><p><a href="https://docs.microsoft.com/en-us/ef/core/performance/efficient-querying">Efficient Querying - EF Core</a></p><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1a8abd67729" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Watcher doesn’t support lambda functions in Vue]]></title>
            <link>https://chsamii.medium.com/watcher-doesnt-support-lambda-functions-in-vue-25dc41a676f1?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/25dc41a676f1</guid>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[watcher]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Mon, 20 Sep 2021 17:08:11 GMT</pubDate>
            <atom:updated>2021-09-20T17:08:11.086Z</atom:updated>
            <content:encoded><![CDATA[<p>The reason that you can’t execute the following code</p><pre>watch: {     <br>    a: (val, oldVal) =&gt; {       <br>        this.executeMyMethod()     <br>    }<br>}</pre><p>is because arrow functions bind to the parent context, so ‘this’ will not be the vue context as you expect, this.executeMyMethod will be undefined.</p><p>This is how your code should look like:</p><pre>watch: {     <br>    a: function(val, oldVal){       <br>        this.executeMyMethod()     <br>    }<br>}</pre><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25dc41a676f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Watch complex property in VueJS]]></title>
            <link>https://chsamii.medium.com/watch-complex-property-in-vuejs-93b786620db5?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/93b786620db5</guid>
            <category><![CDATA[vuejs-2]]></category>
            <category><![CDATA[property]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Sun, 19 Sep 2021 14:13:18 GMT</pubDate>
            <atom:updated>2021-09-19T14:13:18.219Z</atom:updated>
            <content:encoded><![CDATA[<p>You can use a <a href="https://vuejs.org/v2/api/#watch">deep watcher</a> to properly watch for nested data:</p><pre>complexProperty = {</pre><pre>    prop1: &#39;a&#39;,</pre><pre>    prop2: &#39;b&#39;<br>}</pre><pre>watch: {<br>  complexProperty: {<br>     handler(val, oldval){<br>       // do stuff<br>     },<br>     deep: true<br>  }<br>}</pre><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93b786620db5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Static members do not get garbage collected through Depedency Injection]]></title>
            <link>https://chsamii.medium.com/static-members-do-not-get-garbage-collected-through-depedency-injection-9e92d72f1151?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e92d72f1151</guid>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[static]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Thu, 16 Sep 2021 18:41:16 GMT</pubDate>
            <atom:updated>2021-09-16T18:41:35.821Z</atom:updated>
            <content:encoded><![CDATA[<h3>TLDR</h3><p><em>Static members do not get garbage collected, even if the AddScoped&lt;MyService&gt; lifetime is used. This means that the static variable will keep the same value for every HTTP request made to the service.</em></p><p>My colleague had a question about a static variable maintaining state when a new HTTP call accessed the service. .NET Core has built in Dependency injection.</p><blockquote>For information on using dependency injection in applications other than web apps, see <a href="https://docs.microsoft.com/en-us/dotnet/core/extensions/dependency-injection">Dependency injection in .NET</a>.</blockquote><p>This is how our service was registered in the startup.cs:</p><pre>services.AddScoped&lt;MyService&gt;();</pre><p>Notice that we’ve used the scoped. When we take a look at the definition of a scoped service.</p><blockquote>In apps that process requests, scoped services are disposed at the end of the request.</blockquote><p>Take a look at the following code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e08e5589ae95f57d1fe1f71fdea6f985/href">https://medium.com/media/e08e5589ae95f57d1fe1f71fdea6f985/href</a></iframe><p>Since we’ve used a scoped service, our dictionary should always be empty when a new request gets made to <em>loadData(), </em>but this is not the case. The first call to the service will result in a Console.WriteLine(‘Dictionary is empty’), the<em> </em>successive calls will result in dictionary is full. The reason for this behavior is the ‘static’ keyword. Static variables will never get garbage collected as long as the class exists. Therefor, the static keyword will override the Scoped service lifetime defined in our startup.</p><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e92d72f1151" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ion-icon not showing in ionic vue]]></title>
            <link>https://chsamii.medium.com/ion-icon-not-showing-in-ionic-vue-d82b8ffa67d2?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d82b8ffa67d2</guid>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Wed, 05 May 2021 05:16:03 GMT</pubDate>
            <atom:updated>2021-05-05T05:16:37.304Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re using Ionic Framework, Ionicons is packaged by default, so no installation is necessary.</p><h4>So how do we get them working in a vue 3 project?</h4><p>Start by importing your ion icon:</p><pre>import {heart} from &#39;ionicons/icons&#39;;</pre><p>If you’re using the composition API, return the icon in your setup:</p><pre>setup() {</pre><pre>    return {</pre><pre>        heart</pre><pre>    }<br>}</pre><p>Last step is adding the icon in your html:</p><pre>&lt;ion-icon :icon=&quot;heart&quot;&gt;&lt;/ion-icon&gt;</pre><p>More general information can be found on: <a href="https://ionicons.com/usage">https://ionicons.com/usage</a></p><p>Hopefully this saves you some time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d82b8ffa67d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Central Banks Want To Get Into Digital Currencies]]></title>
            <link>https://chsamii.medium.com/why-central-banks-want-to-get-into-digital-currencies-725f93f76fdd?source=rss-49fb6638bfc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/725f93f76fdd</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[central-bank]]></category>
            <category><![CDATA[digital-currency]]></category>
            <dc:creator><![CDATA[Sami C.]]></dc:creator>
            <pubDate>Sat, 06 Mar 2021 08:15:59 GMT</pubDate>
            <atom:updated>2021-03-06T08:15:59.820Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6kC3PrfBQDeT_jOEJDSUg.png" /></figure><h3>Bitcoin is booming</h3><blockquote>We are going to look at cryptocurrencies and or bitcoin in terms of currency to transact ~ Uber CEO</blockquote><blockquote>We sold 17 cars, Bentleys and Rolls for bitcoin ~ Tilman Fertitta (American billionaire businessman)</blockquote><blockquote>Tesla buys $1.5 billion in bitcoin, plans to accept it as payment ~ Elon musk</blockquote><p>There&#39;s been a lot of news about digital currencies lately. Companies like tesla, square and PayPal have been getting into cryptocurrencies in a big way, with big billion dollar bets on bitcoin specifically. It’s adding mainstream credibility to cryptocurrency. <strong>All of this is forcing the countries to get more serious about their digital currency</strong>. Whether this turns bitcoin in a viable currency is that of a speculative investment or a store of value, remains to be seen.</p><h3>Governments</h3><p>Growing number of governments around the world that aren’t going to wait around. Sweden is testing an e-krona China, Europe, USA, and emerging economies have introduced pilot programs. In 2020 about 60% of the world 65 central banks surveyed that they’re experimenting with digital currencies. That’s up 18% compared to 2019. Advocates say digital money can make cross border payments easier, promote financial exclusion and payment system stability. There’s also a number of risks, as some say the surveillance and privacy issue of the central banks able to monitor every transaction. But for all we know they might be doing that already.</p><h4>China</h4><p>China is also experimenting in a very large scale with digital currency, when the world arrives in Beijing next winter for the Winter Olympics, they’re going to be using the digital RMB to shop and to stay in hotels and buy meals in restaurants. The world is going to see a functioning central bank digital currency very soon in the coming year.</p><h4>Europe</h4><p>The European central banks is working with the European commission and experiments to consider the benefits of the digital euro. It will decide whether to launch the digital euro in mid 2021.</p><h4>USA</h4><p>The U.S. is playing catch-up. In late February 2021, Fed Chairman Jerome Powell said the U.S. will engage with the public on the digital dollar this year. In terms of human and institutional engagements the United States is certainly behind the scale and scope of what china and Europe is doing. But on the other hand, being first or second is not what’s important here, it’s about doing it right.</p><h3>The risks</h3><h4>Power outage</h4><p>If we solely rely on digital currency and there is a massive power outage or a hack, it could jeopardize the entire system. That&#39;s why the central banks say that the CBDCs (central bank digital currencies) will co-exist with other forms of physical currencies.</p><h4>Paper hands</h4><p>People may be inclined to pull their money from commercial banks to place it in CDBCs. This can make the financial crisis situation more unstable.</p><h4>Privacy</h4><blockquote>Banks love the idea of having your money &amp; selling your data. Governments love it too.</blockquote><p>There is a danger that we might end up creating a central honey pot of data. Payment data is very sensitive, we usually don’t want to gather all the data in one place. That&#39;s why we should ask ourselves whether we want to collect that data at all?</p><p>Some risks explained above are mitigated by decentralization which can be found in cryptocurrencies like bitcoin, Ethereum, Cardona and so on…</p><h3>Take Away</h3><p>One thing is certain, Digital currencies will be part of our future. Central banks moving to digital currency for international transactions instead of the traditional SWIFT system is an excellent thing and a long time coming. For regular people though there isn’t really any change. I haven’t used cash more than a dozen times in total over the past 5 years. For young people (at least where I live) cash is a bit of a novelty, and it’s kind of weird to see people use it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=725f93f76fdd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>