teleren/devto huggingface dataset:
State management And Redux
Published: 2023-02-12 11:35:30

React state management is a process for managing the data that React components need in order to render themselves. This data is typically stored in the component's state object. When the state object changes, the component will re-render itself. React state management is basically half of a React app.


People also ask
What is state management in Redux?
Do you need state management in React?
Managing your data is very important in frontend applications for better performance and efficiency. If you want to make quick decisions in the project you need to know the data well. If you want to make an efficient app you need to design data well. Data is scattered everywhere without state management.

**How to Manage State in React**

React state management is basically half of a React app. It includes all the data. The other half is the presentation including the HTML, CSS, and formatting. State and state management is relied on by presentation part of the app. The only time a React app will re-rendered is when state changes.

**What is Redux?**

Redux is a pattern and library for managing and updating application state, using events called "actions". It serves as a centralized store for state that needs to be used across your entire application, with rules ensuring that the state can only be updated in a predictable fashion.

**Why Should I Use Redux?**

Redux helps you manage "global" state - state that is needed across many parts of your application.

The patterns and tools provided by Redux make it easier to understand when, where, why, and how the state in your application is being updated, and how your application logic will behave when those changes occur. Redux guides you towards writing code that is predictable and testable, which helps give you confidence that your application will work as expected.

**Redux Libraries and Tools**

**React-Redux**
Redux can integrate with any UI framework, and is most frequently used with React. React-Redux is our official package that lets your React components interact with a Redux store by reading pieces of state and dispatching actions to update the store.

**Redux Toolkit**
Redux Toolkit is our recommended approach for writing Redux logic. It contains packages and functions that we think are essential for building a Redux app. Redux Toolkit builds in our suggested best practices, simplifies most Redux tasks, prevents common mistakes, and makes it easier to write Redux applications.

**Redux DevTools Extension**
The Redux DevTools Extension shows a history of the changes to the state in your Redux store over time. This allows you to debug your applications effectively, including using powerful techniques like "time-travel debugging".
An Overview Of The Regulatory Structure For Fintech Companies In The United States And Europe
Tags: technicalwriting, writing
Published: 2023-02-09 15:54:29

The fintech industry has seen rapid growth in recent years, with companies offering innovative solutions for financial services. However, with this growth comes the need for regulatory oversight to ensure the safety and security of consumers and the financial system. Throughout this article, I will present an overview of the regulatory landscape for fintech companies in the United States and Europe.

In the US, the regulatory landscape for fintech companies is complex and varies by state. The primary federal regulator for fintech companies is the Consumer Financial Protection Bureau (CFPB), which is responsible for enforcing consumer protection laws and regulations. The Federal Reserve and the Office of the Comptroller of the Currency (OCC) also regulate fintech companies, particularly those that provide banking services. Additionally, the Securities and Exchange Commission (SEC) and the Commodity Futures Trading Commission (CFTC) regulate fintech companies that deal in securities and commodities.

In Europe, the regulatory landscape for fintech companies is also complex, with different regulations for different fintech services. The European Banking Authority (EBA) is responsible for developing regulatory technical standards for payment services and electronic money. While the European Securities and Markets Authority (ESMA) is responsible for securities markets. The General Data Protection Regulation (GDPR) also applies to fintech companies, as it sets out strict rules for protecting personal data.

One of the key differences between the US and the EU is the regulatory sandbox concept. A regulatory sandbox is a framework for testing new fintech products and services under the guidance and supervision of regulators. The UK was one of the first countries to establish a regulatory sandbox and many other countries like Singapore, Australia, and Malaysia have followed suit. The US takes a more state-by-state approach, with only a few states having a regulatory sandbox.

In conclusion, the regulatory landscape for fintech companies in the US and Europe is complex and constantly evolving. Fintech companies must navigate a variety of regulations and oversight from different agencies and regulators. Fintech companies need to stay informed about the latest rules and work closely with regulators to ensure compliance and protect consumers.
What technologies to use for a scalable backend & SEO friendly.
Published: 2023-02-09 16:47:58

I have a tour booking web app made on Vanilla JS. As the project is working well, now my priority is to make it super scalable.

For now, the info about the activity is static. My plan is to add a scalable backend, so the guides can create their own tours, change the info, upload the images, etc.

The website needs to have:

- Static site generation (most of the users come from SEO). That's why React is not an option.

- Scalable Backend. The only programming language I know is JS, but I am able to learn whatever I need to.

This is the project: https://freetourmilan.net/

Any idea of what technologies could I use for this purpose? I will be thankful for any suggestion that you can give me.
Cracking Your Technical Interview with LeetCode: A Step-by-Step Guide
Tags: leetcode, develop
Published: 2023-02-10 16:30:00

If you're using LeetCode to prepare for a technical interview, here are some tips to make the most of your practice:

**Start with the basics**: Before jumping into more advanced problems, make sure you have a solid understanding of the fundamentals of computer science and programming, such as algorithms, data structures, and software design patterns. LeetCode offers a wide range of basic to advanced problems, so you can start with the easy and medium-level questions and gradually move on to the more challenging ones.

**Practice regularly**: Consistency is key when it comes to preparing for a technical interview. Set aside some time every day to solve LeetCode problems and try to stick to this schedule as much as possible. This will help you build your skills and develop your problem-solving abilities over time.

**Focus on a variety of topics**: During a technical interview, you may be asked questions on a wide range of topics, such as algorithms, data structures, databases, and system design. Make sure to practice solving questions on different topics so that you have a well-rounded understanding of the material.

**Review solutions**: After you've solved a problem, take the time to review the solutions and understand the thought process behind them. This will help you learn new approaches and techniques, and give you a better understanding of the problem.

**Practice under pressure**: In a real-life technical interview, you'll be under a time constraint, so it's important to practice solving problems within a specific time frame. LeetCode offers a timer feature that allows you to set a time limit for solving a problem, which can help you get used to the pressure of a real interview.

**Collaborate with others**: Working with other people who are also preparing for a technical interview can be a great way to improve your skills and learn from others. You can collaborate with classmates, join study groups, or participate in online forums to discuss LeetCode problems and solutions.

**Learn from your mistakes**: When you make a mistake, take the time to reflect on what went wrong and how you can improve in the future. This will help you avoid making the same mistake again and give you a deeper understanding of the material.

By following these tips and using LeetCode regularly, you'll be well on your way to cracking your technical interview and landing your dream job.
Migrating Password Managers ?
Published: 2023-05-24 23:30:27

---
title: Migrating Password Managers ?
published: true
date: 2023-02-10 10:47:38 UTC
tags: 
canonical_url: https://blog.mandraketech.in/migrating-password-managers
---

Recently, LastPass, my favourite password manager until then, reported a leak. It got me thinking. Do I need another "paid" service, or have the "other" providers caught up?

So, I went down the track of evaluating Bitwarden and iCloud. Between these two services, I have all my family members covered.

It was not a "simple" decision. Because everyone's use case is different.

The younger members of the family are on Windows (and iPhone, of course), while I am on the Apple ecosystem. The Spouse uses only the phone, so does not care. I have a lot of Credit cards and other "secure" information that I keep in my notes. The others do not need that, yet.

I tried using Bitwarden and realised that the integration with the Apple ecosystem, especially the Card filling and the TOTP handling, are not so good. So, leaving the rest of the family to use Bitwarden, I started my journey of migrating to iCloud. That is when I realised, that no tool gives a "complete" migration.

Being the engineer that I am, I created a tool for exporting a **#Bitwarden** exported JSON to **#iCloud**  **#Keychain** importable CSV(for password), and Apple Notes importable txt files (For notes).

You can access that at:

[https://gitlab.com/mandraketech/bitwarden-to-icloud](https://gitlab.com/mandraketech/bitwarden-to-icloud)

This one uses Python.

Will do a blog post with my learnings soon.
Download Chat GPT App now from google play store. Link in the description. Check it now.
Tags: ai, chatgpt, gpt3
Published: 2023-02-10 16:05:58

Say hello to GPT - your very own personal assistant on the go! GPT AI Bot, a mobile app makes it easier than ever to keep up with all of your personal goals, whatever they may be. Ask anything you want from writing code to encouraging insights and expert advice - GPT has it all. Make 2023 the year of achieving your ambitions with GPT - now available on the Google Play. Download Now:
https://play.google.com/store/apps/details?id=com.winggs.gpt_ai_bot
Start Menu: Windows Clone
Tags: codepen, javascript, opensource, windows11
Published: 2023-02-10 16:09:23

<p>Here I have made a clone of windows start Menu. The Elements are created from an javascript object.</p>
<p> This is how I did it :<br>
I defined a class with the constructors, having all the parameters required to create the elements.
 <pre>
class FileMetadata {
  constructor(name, size, type, creationDate) {
    this.name = name;
    this.size = size;
    this.type = type;
    this.creationDate = creationDate;
  }
}
</pre>

I created an array to store the data.
<pre>
let fileMetadataArray = [];
</pre>
Then using the push option added the values.
<pre>
fileMetadataArray.push(new FileMetadata("My Computer", 1024, "https://cdn-icons-png.flaticon.com/512/2933/2933245.png", new Date()));
</pre>

Now I created a grid container, having 3 rows and 6 columns.
Now this is the parent element.


Using the function _.createElement_ .<br>
I then proceeded to create div and defined the style of those elements in for loop
<pre>

for (let i = 0; i < 3; i++) {
      let row = document.createElement("div");
      row.classList.add("row");
      row.style.display = "flex";

      for (let j = 0; j < 6; j++) {
        let dataa = fileMetadataArray[countt];
        let namee = fileMetadataArray[countt].name;
        let imgg = fileMetadataArray[countt].type;
        countt++;

        let column = document.createElement("div");
        column.style.flex = "1 1 16.666667%";
        column.style.alignItems = "center";
        column.style.justifyContent = "center";
        column.classList.add("columnn");
        row.appendChild(column);
        let img = document.createElement("img");
        img.src = imgg;
        img.style.width = "45px";
        img.style.height = "45px";
        img.classList.add("imggg");

        column.appendChild(img);
        let name = document.createElement("p");
        name.innerHTML = namee;
        name.style.textAlign = "center";
        name.style.fontSize = "12px";
        name.style.color = "white";
        column.appendChild(name);

      }
      gridContainer.appendChild(row);

    }
</pre>
</p>
<p> 
Finally adding the finishing touch with some CSS the component is made.
</p>

{% codepen https://codepen.io/shreyaanp/pen/qByzvwQ %}
Greatest Common Divisor of Strings
Tags: java, leetcode, tutorial, programming
Published: 2023-02-10 17:58:29

Sergei Golitsyn provides solutions to popular leetcode problems.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6hus4embf64t5thul3f6.jpg)

Aloha guys today we have a popular GDS problem:

## Description
For two strings s and t, we say "t divides s" if and only if s = t + ... + t (i.e., t is concatenated with itself one or more times).

Given two strings str1 and str2, return the largest string x such that x divides both str1 and str2.
 
Example 1:

Input: str1 = "ABCABC", str2 = "ABC"
Output: "ABC"
Example 2:

Input: str1 = "ABABAB", str2 = "ABAB"
Output: "AB"
Example 3:

Input: str1 = "LEET", str2 = "CODE"
Output: ""

## Solution
To solve it we need to understand, what we want to find. We need to find greatest common part of two words, and this part should divide word on 1-N the same paths. 
For example: `a = ABCABC` and `b = ABC` can be divided on `a = ABC ABC` and `b = ABC`
In the next example `a = ABABAB` and `b = ABAB` we cannot divide a on b because `a = ABAB AB` and `ABAB != AB`. That is why we should reduce divider. 
   We can do it iteratively, but what if we start with the rest of the longest string? 
`a = ABABAB` after divide a has two parts common `ABAB` and rest `AB`. Let's try to use rest. Now let's try to divide longest string on short one, `a = AB` and `b = ABAB`. b will be `AB AB`. Hm, obviously that `AB` is greatest common divisor. But how can we understand it? We need to dive bit deeper and again use rest of division. `a = ""` and `b = AB`. If one of the strings is empty, another one will be our result. Wisdom, right? 

## Code

```
    public String gcdOfStrings2(String str1, String str2) {
        int l1 = str1.length();
        int l2 = str2.length();

        // Swap the parameters when needed
        if (l1 < l2){
            return gcdOfStrings(str2, str1);
        }

        // Since we swap
        if (l2 == 0){
            return str1;
        }

        // Check if str1 starts with str2
        if (!str1.startsWith(str2)) {
            return "";
        }

        return gcdOfStrings(str1.substring(l2), str2);
    }
```
Octopress Plugins: s3_website
Tags: aws, octopress, s3
Published: 2023-02-13 21:38:44

Originally posted on [joev.me](http://blog.joev.me/blog/2013/11/25/Octopress-Plugins-s3-website/) @ 2013-11-25

I’m hosted on S3 thanks to [this blog post](http://www.robertbrewitz.com/2013/04/relaunching-the-blog-with-octopress-and-amazon-s3/) by Robert Brewitz. Do take a moment to read his post. My first swing at setup took me about a day to wrap my head around. After the next couple tries/tests, plugging-in `jeckyl-s3` felt just as easy to slap together as octopress.

While browsing the `jekyll-s3` repo, I found out that the project moved here. So I redid my octopress setup from scratch – which took < 5 min anyways (^_^). Upgrade impressions & comparisons after the break.

Luckily, Robert Brewitz’ tutorial was still mostly valid. So the config on `_config.yml` and s3 config did not need re-configuration. Huge time saver. Where the tutorial started to fall short where parts calling `s3-jeckyl` (obviously). The `s3_website` command is a bit different from jeckyl-s3, but there’s sufficient info in the README.md for you to figure it out.

## Was it worth the upgrade?

Yes. Apart from more documentation, & logical commands, `s3_website` has also included (or, at least, made more apparent) additional features (routing, ). Overall, in the 7 months’ time that Robert Brewitz blogged about s3-jeckyl, the plugin/gem/watevs has evolved much more; into a well-packaged product.

## Takeways

1. Don’t suck at s3 bucket nomenclature.

    The only reason why I had as much trouble configuring `jeckyl-s3` in the first place was because I was so stubborn in my desired routing. Don’t be stubborn. Follow the damn tute and be merry. ‘Nuff said.

2. Kinda wish I read a tutorial like [this](http://mycowsworld.com/blog/2013/08/04/setting-up-octopress-with-amazon-web-services/) prior. (read: [dd](http://www.investopedia.com/terms/d/duediligence.asp))

3. Add `_site` to `.gitignore`.

    Do this for the same reason why `public` is in `.gitignore` – it’s generated markup, typically not intended to be edited.

4. Changing destination in `_config.yml` will break `rake preview`

    This was fun… it took me months to realize this. I’m a noob at ruby. So now i keep destination stored like below and toggle the comment when pushing. Brilliant! *pats self on back*

```yaml
...
destination: public   # default; rake preview
# destination: _site  # s3_website push
...
```

Welp, I hope this serves you well in your development of a slick deployment process. This was a good icebreaker exercise to get acquainted with octopress & jeckyl. I’ve been cruising on this high of slick tweaking and have been doing some work in the asides. But more on that later.

Written with [StackEdit](https://stackedit.io/).
Redux-like state container in SwiftUI. Unidirectional flow.
Tags: swift, ios, mobile, programming
Published: 2023-02-11 15:46:13

...about data flow now. 

Every view has a read-only access to the state via store object. Views can send actions to the store object. Reducer modifies the state, and then SwiftUI notifies all the views about state changes. SwiftUI has a super-efficient diffing algorithm that’s why diffing of the whole app state and updating changed views works so fast. Let’s modify our store object to support sending actions.

```swift
final class Store<State, Action>: ObservableObject {
    @Published private(set) var state: State

    private let reducer: Reducer<State, Action>

    init(initialState: State, reducer: @escaping Reducer<State, Action>) {
        self.state = initialState
        self.reducer = reducer
    }

    func send(_ action: Action) {
        reducer(&state, action)
    }
}
```

`State -> View -> Action -> State -> View`

This architecture revolves around a strict **unidirectional** data flow. It means that all the data in the application follows the same pattern, making the logic of your app more predictable and easier to understand.

---

- [Basics](https://dev.to/sergeyleschev/redux-like-state-container-in-swiftui-basics-single-source-of-truth-2lpc)
- [Reducer and Actions](https://dev.to/sergeyleschev/redux-like-state-container-in-swiftui-basics-reducer-and-actions-flg)
- [Unidirectional flow](https://dev.to/sergeyleschev/redux-like-state-container-in-swiftui-basics-unidirectional-flow-3f2p)
- [Side effects](https://dev.to/sergeyleschev/redux-like-state-container-in-swiftui-side-effects-3l23)
- [Usage](https://dev.to/sergeyleschev/redux-like-state-container-in-swiftui-usage-k1i)

---

**Contacts**
I have a clear focus on time-to-market and don't prioritize technical debt. And I took part in the Pre-Sale/RFX activity as a System Architect, assessment efforts for Mobile (iOS-Swift, Android-Kotlin), Frontend (React-TypeScript) and Backend (NodeJS-.NET-PHP-Kafka-SQL-NoSQL). And I also formed the work of Pre-Sale as a CTO from Opportunity to Proposal via knowledge transfer to Successful Delivery.

🛩️ #startups #management #cto #swift #typescript #database
📧 Email: sergey.leschev@gmail.com
👋 LinkedIn: https://linkedin.com/in/sergeyleschev/
👋 LeetCode: https://leetcode.com/sergeyleschev/
👋 Twitter: https://twitter.com/sergeyleschev
👋 Github: https://github.com/sergeyleschev
🌎 Website: https://sergeyleschev.github.io
🌎 Reddit: https://reddit.com/user/sergeyleschev
🌎 Quora: https://quora.com/sergey-leschev
🌎 Medium: https://medium.com/@sergeyleschev
How participation in college festivals matter too besides community work
Tags: collegefests, community
Published: 2023-02-11 17:32:47

**These days, as the student fraternity continues to grow, there is a confusion for the freshers as
soon as they get admitted to a college and are introduced to a wide range of activities-either on
campus or via online forums. This blog will help them consider exploring the participation in
college festivals, as working in student communities may look good in the CV but there are a
few perks of the former that people may miss out if the opportunities are not pursued!**

1. _The aura is different here-_
There is generally no competition from non college students & there is no internship to crack
here- so the pressure is less & one can typically unwind themselves while enjoying the events
(except when one becomes a finalist of course)
Here, people explore all kinds of talents-which aren't usually there in community meetups. The
audience might be completely different with no extra push to crack a good salary towards the
end of the college, while meetups may be more job focused.
2. _Winning a competition boosts morale-_
Whether it is creative writing, singing, dancing, etc to robowars, robot soccer, aeromodelling
(among the vast range of competitions available), there is a lot to explore, learn & implement
while trying a shot to win prizes. There might be prizes from companies (read: swag) but earning
one with one's own sweat & blood, without spending hours in front of a screen, with one's own
talent is what that may drive one's confidence.
3. _There is madness-_
College fests are meant to have musical nights, with people dancing without sleep in their eyes.
Moreover, community events won't have long hours and djs (except for a few hackathons but
that is a seperate one).
4. _Opportunity to stay in other colleges and network with people-_
Meetups and events don't last too long to connect & talk to people. Hackathons too, are
designed to keep people busy in building their products. But in fests, there is always plenty of
time to do what is needed!
5. _Fests have more reach than meetups and hackathons._
People who aren't in the tech field & jobs are easily found here! Moreover, you can get
participation certificates to flex in social media posts.

> These are some of the main reasons why I attend college fests, & I think why people should
> attend fests.