teleren/devto huggingface dataset:
Top 5 ways to start off your week for maximum productivity
Tags: motivation, tip, productivity, 100daysofcode
Published: 2022-10-03 09:47:35


The key to being productive is having a clear goal and executing on it. But if you're not starting your week off right, then how can you expect to achieve anything? In this blog post we will explore five habits that can help you start off your week for maximum productivity:

##Habit 1: drinking water

Water helps increase energy levels, which is a great way to start your day off right!

##Habit 2: meditation

Meditation is a great way to start your day off with a clear mind. It can also be used as an effective form of relaxation, giving you time to think about what you're going to accomplish that day and how it will benefit both yourself and others.

Meditation is one of the most simple yet effective ways to improve productivity on any given day because it allows you to focus on one thing at a time without being distracted by other things around you (such as emails or phone calls).

##Habit 3: meal prepping

Meal prepping is the number one way to ensure that you are eating healthy and getting all of your nutrients.

It's a great way to cut corners on food costs, especially when used in conjunction with meal planning.

Meal prepping also reduces waste, which not only keeps your wallet happy but also helps reduce pollution as well!

##Habit 4: exercise

Exercise is an excellent way to start your day. It helps you feel energized, motivated and ready for a productive day.

If you have a busy schedule, exercise can be done as part of your morning routine or after work; whatever works best for you!

##Habit 5: journaling

Journaling is a great way to reflect on your day and get clarity. It's also an excellent way to start the week off right, because it forces you to be present with yourself and your feelings.

I recommend taking a few minutes each day (or more if you have time) after getting up, washing up and making breakfast/lunch/dinner etc., before starting whatever task has been assigned to you for the day in order for it not be forgotten about at all!

###Conclusion

Start your week off right with these habits. It’s time to get your productivity on!
Hacktoberfest : contribute to Lenra, the app creation game-changing platform !!
Tags: hacktoberfest, rust, docker, mongodb
Published: 2022-10-03 09:41:30

Lenra is an open source framework to create your app using any language,  and deploy it without any Ops scale, built on ethical values.

Check our website www.lenra.io for more info !

We are thrilled to share our project during HacktoberFest, and hope you'll find a way to contribute to any part of the platform you want. 
- **Data lover ?** With the migration of data management, from postgres to mongoDB, we have some changes to make in the application to be compatible here : 

https://github.com/lenra-io/Lenra/issues/143

- **Rust fan** ? Create a dev interactive command in lenra_cli. The dev command builds  the app, starts it and displays the app logs when you run it. It's here : 

https://github.com/lenra-io/Lenra/issues/144

- **Go, Python, Ruby, Elixir, V** ... As we create a platform usable in any langage, you can participate in developing any template here : 

https://github.com/lenra-io/Lenra/issues/142

Hope you'll have fun !!
Hacktoberfest is started, give your contribution!
Tags: hacktoberfest, opensource, github, githunt
Published: 2022-10-03 09:40:23

*The Hacktoberfest is started, give your contribution!*

As a developer and Hacktoberfest partecipant you can contribute to Open Source Projects and get involved in the community of Open Source Developer.

In this article I will show you my repo that partecipates to the **Hacktoberfest 2022**.

My main project, that partecipates for the second year to the Hacktoberfest, is the **CXXGraph**:

*Header-Only C++ library for Graph Representation and Algorithms with a simple interface.*

{% github ZigRazor/CXXGraph %}

Then I have some side projects someone that partecipate to the Hacktoberfest for the first time. The projects are in C++ and Python, but you can contribute also with documentation Pull Request or other things that gives values to the projects.
The project are the followings:

*A C++ Library that give microservice framework ( Server / Client ) upon 0mq framework.*

{% github ZigRazor/CXXMicroservice %}

*A Python implementation of simply configurable State Machines.*

{% github ZigRazor/PyStateMachine %}

*A library in C++ to manage multi threading and parallel applications.*

{% github ZigRazor/MTL %}

*A C++ Library to which implements the structures and algorithms for finite automata, pushdown automata, and Turing machines.*

{% github ZigRazor/CXXAutomata %}

You can visit the issues pages of each projects to see the open issues and you can ask me all you need to understand the project goal, the issue problem, or anything you need to contribute.

In the next days I will open some other issues on the projects, that can be important to improve the projects and give the possibility to get involved also to the novice of the Open Source.

For any info you can contact me at zigrazor@gmail.com
If you want open an issue on the projects feel free to do it.
**All contributiuons are appreciated.**

Happy Coding! 💻
Create VSCode Snippets For Effector
Tags: effector, javascript, webdev, dx
Published: 2022-10-03 09:34:46

`Event`, `effect ` and `store` most often units when you use effector. So I show you how create simple snippets for it.

If you don't want to create own snippets you can use [this cool extension](https://marketplace.visualstudio.com/items?itemName=SeniaMerlin.effector-snippets) (not mine) with advanced snippets for all occasions. To learn more about creating snippets go [here](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets).


## Event
First of all create event snippet:
```js
// 'Code/User/snippets/effector.code-snippets'
"Create event": {
  "scope": "javascript",
  "prefix": ["event"],
  "body": [
    "const ${1} = createEvent()", 
    "${0}"
  ]
},
```
In the example above:

- **Create event** is the snippet name.
- scope defines js files
- prefix word **event** defines trigger that display the snippet in IntelliSense.
- body is one or more lines of content, which will be joined as multiple lines upon insertion. Newlines and embedded tabs will be formatted according to the context in which the snippet is inserted.

I use one placeholder `${1}` for event name. 
`${0}` denotes the final cursor position.

### In practice
Type `event` and press **Tab**, then write event name, press **Tab**. Simple, right?


## Store
Snippet for store looks same, but we add default value:

```js
"Create store": {
  "scope": "javascript",
  "prefix": ["store"],
  "body": [
    "const $${1} = createStore(${2})", 
    "${0}"
  ]
}
```

## Effect
For effect I create two snippets, one with handler and second without it.

```js
"Create effect": {
  "scope": "javascript",
  "prefix": ["effect"],
  "body": [
    "const ${1}Fx = createEffect()",
    "${0}"
  ]
},

"Create effect with handler": {
  "scope": "javascript",
  "prefix": ["fx"],
  "body": [
    "const ${1}Fx = createEffect(${2})",
    "${0}"
  ]
},
```
Type `effect` to create effect only and type `fx` to create effect with handler.

## Sample
I also decide to add snippet for `sample` with clock and target, since I use this `sample` variant very often.

```js
"Create sample": {
  "scope": "javascript",
  "prefix": ["clock"],
  "body": [
    "sample({",
    "\tclock: ${1},",
    "${2:\tsource: ${3},}",
    "${4:\tfilter: ${5},}",
    "${6:\tfn:(${7}) => ${8},}",
    "\ttarget: ${10},",
    "})",
    "${0}"
  ]
},
```

1. Type `clock` and press **Tab**
2. Write clock trigger name and press **Tab**
3. If you need source, press **Tab** and write source, else delete line and press **Tab**
4. Same for filter
5. Same for fn
6. Write target and press **Tab**

In this way you can create snippets for yourself or use [extension](https://marketplace.visualstudio.com/items?itemName=SeniaMerlin.effector-snippets) if it suits you.
Adobe illustrator logo in Python
Tags: python, chiki1601, adobe, illustrator
Published: 2022-10-03 09:33:47

Hello friends...

I created Adobe illustrator logo using Python...

which is shown below:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tyvrbxilogvb25dellrg.png)

I am glad that I am implementing Python turtle graphics by making various logos🥳🥳🥳🥳🥳
The best roadmap to becoming a full stack developer....
Tags: html, css, javascript, github
Published: 2022-10-03 09:16:06



1. _HTML and CSS_
2. _CSS Framework(Bootstrap/Tailwind)_
3. _JavaScript_ 
4. _Git and Github_
5. _React,Vue or Angular_
6. _Node(JS),Django(PYTHON)_
7. _MongoDB,mysql_

<u>Resources to learn</u>

- CodeCademy 
- W3School 
- FreeCodeCamp 
- Traversey Media(YouTube
ReactNative, Autofocus Next TextInput
Tags: reactnative
Published: 2022-10-03 09:03:45

##The Problem
By default ReactNative doesn't support focusing next `<TextInput/>` on submit.

##Hack

> Inspired by [this StackOverflow answer](https://stackoverflow.com/a/32753780/10060294)

Use a [Context](https://reactjs.org/docs/context.html) named `FormContext` that will create a [LinkedList](https://en.wikipedia.org/wiki/Linked_list) out of **mounted** `<TextInput/>`.
Wrap a `<TextInput/>` in a component, which will find and focus next `<TextInput/>` from `FormContext`.

Here is how the `FormContext` and `FormContextProvider` will look like.
```jsx
// form.context.js

export const FormContext = createContext({});

let inputsLL = null;
let lastInput = null;

const FormContextProvider = ({ children }) => {

  useEffect(() => {
    inputsLL = null;
    lastInput = null;
  }, []);

  return (
    <FormContext.Provider
      value={{
        actions: {
          addInput(name, ref) {
            ref.name = name;
            if (!inputsLL) {
              inputsLL = ref;
              lastInput = ref;
            } else if (lastInput) {
              lastInput.next = ref;
              lastInput = ref;
            }
          },
          removeInput(name) {
            if (inputsLL) {
              let node = inputsLL;
              let parent = null;
              do {
                if (node.name === name) {
                  if (parent && node.next) {
                    parent.next = node.next;
                  } else if (parent && !node.next) {
                    parent.next = null;
                  } else if (!parent && node.next) {
                    inputsLL = node.next;
                  } else if (!parent && !node.next) {
                    inputsLL = null;
                  }
                  break;
                }
                parent = node;
                node = node.next;
              } while (node);
            }
          },
          focusNext(name) {
            if (inputsLL) {
              let node = inputsLL;
              do {
                if (node.name === name) {
                  if (node.next) {
                    node.next.focus();
                  } else node.blur();
                }
                node = node.next;
              } while (node);
            }
          },
        },
        inputs: inputsLL,
      }}
    >
      {children}
    </FormContext.Provider>
  );
};

export default FormContextProvider;
```
Here is a `<TextInput/>` wrapper implementation
```jsx
// wrapped-input.js

export default function WrappedInput(props) {
 let reference = useRef(null);

  const { actions } = useContext(FormContext);

  useEffect(() => {
    //label must be unique
    actions.addInput(props.label, reference);

    return () => {
      actions.removeInput(props.label);
    };
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [reference]);

  return (
    <TextInput
      ref={(r) => (reference = r)}
      blurOnSubmit={false}
      onSubmitEditing={() => {
        actions.focusNext(props.label);
      }}
    />
  )
}
```
Contributing to #hackoberfest as a Flutter Developer 💙💙💙
Tags: flutter, hacktoberfest, fest, github
Published: 2022-10-03 08:52:14


So Hackoberfest is now in full swing and began on September 29, 2022, and will last throughout the entire month of October. In essence, hackoberfest is a month-long event where developers can get involved with the Open Source project and receive recognition for their work.

##How to participate.

It's very simple to sign up and begin participating in the Hackoberfest challenge.

###1. Read the Guidelines
Every contributor to Hackoberfest must abide by the rules and requirements in order for their contribution to be recognized or to avoid being flagged off. The rules were developed to prevent contributors from spamming, and they are very simple to follow. [participation rules](https://hacktoberfest.com/participation/)

###2. Signup to participate
You must sign up at [Signup](https://hacktoberfest.com/auth/) in order to participate in the Hacktober challenge. In order for your contributions to be easily recognized and for you to access the to open source projects

###3. start contributing 💃💃💃
You can now begin contributing to any of the participating github or gitlap repositories.
PRs that are in a repository with the hacktoberfest topic and have been merged, accepted by a maintainer, or marked as hacktoberfest-accepted will count toward your participation.
Make a PR request before October 31st to qualify for an incredible reward.


##Contrubuting as flutter developer
This year's Hackotberfest is particularly noteworthy for us Flutter developers as a result of the collaboration between guys at Invertase and the Flutter community to organize an exciting month for Flutter and Dart developers worldwide.

And it's incredibly simple to participate in the special edition for flutter developers; all you need to do is sign up on Invertase.io (https://invertase.io/community/hacktoberfest). and you gain entry to View the program's list of available eligible issues.

###Reqirement for a succesfull Pr
* Successful Hacktoberfest Pull Requests
* Mentions issues with the hacktoberfest and/or hacktoberfest-special tag
* Merged and tagged with hacktoberfest-accepted
Submitted between 29th September and 31st October
Meaningful, adds value, and contribute to the success of the repository
* Avoid spamming! You will be blocked from the program if you repeat this!
* Do not send small tweak PR for a repository such as fixing typos!
* Passes all CI checks and is approved and merged by a maintainer


##Rewards 🎁
![alt text](
 https://invertase.io/hacktoberfest/swags.jpg
)
In addition to the fantastic prize you receive for participating in the hackotoberfest, the guys at Invertase have a special prize for those who participate in the flutter edition.
💙 Dash
💙 Zappy
💙 Google Home
💙 FlutterVikings goodies
💙 Cool stickers box
[check out the special prize](https://invertase.io/community/hacktoberfest)

So what are you waiting for start hacking your way into the month hackotoberfest 👍.
Lattice Framework Introduction
Published: 2022-10-03 08:33:25

# Lattice Framework Introduction

Lattice is a powerful, lightweight business extension invoke framework. By using the Lattice framework, complex business customization can be efficiently organized and managed.

The main ideas of Lattice's architecture design are:

* **The plug-in architecture that separates the business package from the platform:** The platform provides a plug-in package registration mechanism to realize the registration of the business-side plug-in package during runtime. The business code is only allowed to exist in the plugin package and is strictly separated from the platform code. The code configuration library of the business package is also separated from the code library of the platform, and is provided to the container for loading through the second-party package.
* **Unified business identity across the full-chain:** The platform needs to have the ability to logically isolate business from business according to "business identity", rather than the traditional SPI architecture that does not distinguish between business identities and simply filters. How to design this business identity has also become the key to the isolation architecture between businesses.
* **Separation of management domain and running domain:** Business logic cannot rely on dynamic calculation at run time, but can be defined and visualized at static time. The rules that appear in the business definition are superimposed and conflicted, and conflict decisions are also made in the static device. During the runtime, it is executed strictly according to the business rules and conflict decision policies defined by the static device.

# Development Guide

* [Quickstart Guide](https://github.com/hiforce/lattice/wiki/Quickstart-Guide)
* [Business Overlay Product](https://github.com/hiforce/lattice/wiki/Business-Overlay-Product)
* [Register Business Configuration](https://github.com/hiforce/lattice/wiki/Register-Business-Configuration)
* [Load Local Configuration](https://github.com/hiforce/lattice/wiki/Load-Local-Configuration)
* [Reduce Strategy](https://github.com/hiforce/lattice/wiki/Reduce-Strategy)
* [UseCase Precipitation and Reuse](https://github.com/hiforce/lattice/wiki/UseCase-Precipitation-and-Reuse)
* [RPC Invoke Extension](https://github.com/hiforce/lattice/wiki/RPC-Invoke-Extension)

# Key Concepts

* [Business](https://github.com/hiforce/lattice/wiki/Key-Concept---Business)
* [Ability](https://github.com/hiforce/lattice/wiki/Key-Concept--%E2%80%94%E2%80%94-Ability)

Github: https://github.com/hiforce/lattice
Step to get started
Published: 2022-10-03 08:20:35

1. Install Git, Node , VS Code
2. Install plugin from VS Code - Prettier
3. VS Code configuration - Setting -setting.jason

Add line
add this line:-

```
{
    "[javascript]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[javascriptreact]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    }
}

```

4. VS Code Terminal - yarn install
5.
Prettier Configuration on VS Code
Published: 2022-10-03 08:15:40

Prettier Configuration on VS Code
First, open Visual Studio Code. Then go to extension and looking for plugin named Prettier.
Once installed, go to Preferences->Settings. Search for '@lang:javascript setting'. Click on 'edit in settings.json'

add this line:-

```
{
    "[javascript]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[javascriptreact]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    }
}
```
Prettier Configuration on IntelliJ IDEA
execute at the command line yarn global add prettier
Open IntelliJ. Look for plugin name Prettier and install
Once installed, go to setting. Search for Prettier. Select the Prettier package. Tick on the On 'Reformat Code' action and On save. Click Apply. Now you are good to go.
Building for Native is bullshit
Tags: programming, reactnative, ios, android
Published: 2022-10-03 08:13:51

My patience building for native platforms is running thin. Just spent the entire day debugging a build failure only to realise it was caused by the space in my root folder name. And the gods of native development never bothered to document this little caveat somewhere.

You never get bullshits like this building for the web. Web is easy, because nobody puts unnecessary bullshit in your way to trip you up.

But on the bright side, I guess I now know one gotcha of native development and I can lord it over junior devs (they say it's required to be considered a senior dev 😈).
Today's Daily Dose of Programming Humor
Tags: jokes, dailydeveloperjokes
Published: 2022-10-03 08:00:02

---
title: "Today's Daily Dose of Programming Humor"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125964dfaa7.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What is React's favorite movie genre?

___A:___ Suspense
 -->
How to Use Highlight Selected Text in Tailwind CSS
Tags: tailwindcss, css, webdev, tutorial
Published: 2022-10-03 07:51:12

In this section we will see how to use highlight text in tailwind css. we will see, highlight text color , highlight text background color with Tailwind CSS 3.  
[view](https://larainfo.com/blogs/how-to-use-highlight-selected-text-in-tailwind-css)
<br>
### Example 1
Tailwind CSS highlight section text color.
```html
<div class="max-w-xl selection:text-purple-900">
  <p>
    Tailwind CSS color selector lorem ipsum dolor I made my way past the breakers
    a strange calm came over me
  </p>
</div>
```
![tailwind css simple highlight selected text](https://demo.larainfo.com/screenshot/tailwindcss/tailwind-css-simple-highlight-selected-text.png)

### Example 2
Tailwind CSS highlight section background color.
```html
<div class="max-w-xl selection:bg-purple-600">
  <p>
    Tailwind CSS color selector lorem ipsum dolor I made my way past the breakers
    a strange calm came over me
  </p>
</div>
```
![tailwind css background highlight selected text color](https://demo.larainfo.com/screenshot/tailwindcss/tailwind-css-background-highlight-selected-text-color.png)

### Example 3
Tailwind CSS highlight selection background color and text color.
```html
<div class="max-w-xl selection:bg-purple-300 selection:text-purple-900">
  <p>
    Tailwind CSS color selector lorem ipsum dolor I made my way past the breakers
    a strange calm came over me
  </p>
</div>
```
![tailwind css highlight text color](https://demo.larainfo.com/screenshot/tailwindcss/tailwind-css-highlight-text-color.png)
Migrate elastic search indices
Tags: elasticsearch, opensearch
Published: 2022-10-03 07:48:55

So you want to migrate Elasticsearch indices from one installation to another. The solution presented here will need Node.js and the package `elasticdump` from NPM. You will need to set up these on a system from which you want to do the migrations. Let's start.

First make sure [Node.js](https://nodejs.org) is installed.

Then install [elasticdump](https://www.npmjs.com/package/elasticdump) by running the command.

`npm i elasticdump -g`

> Note: This `-g` will install `elasticdump` globally. If you got a permission error run with `sudo`

Now we can use this package to move an index from one es to another.

```
elasticdump \
  --input=http://i1.es.in:9200/index_1 \
  --output=http://i2.es.in:9200/index_1 \
  --type=mapping
```

`--input=` arg is the es source instance where you want to move the index from

`--output=` is the destinaation es

`--type=` has three options
1. `mapping` if you only want to move index mapping
1. `data` if you want to migrate data
1. `analyzer` includes analyzer and mapping

*Do this query to list all indices on an elastic instance*
`GET _cat/indices?v`