teleren/devto huggingface dataset:
Can my program help teach financial literacy?
Tags: charts, cashflow, financial, forecasting
Published: 2021-04-07 16:04:26

The New York Times Business section on April 3, 2021, had an article in the "Your Money Advisor" column by Ann Carrns titled "Pandemic Spurs Interest in Teaching Financial Literacy". Reading this article made me think that my program could be helpful. It's a work in progress at the moment.

I'm converting my legacy Windows program into a web app that can work with modern browsers using a mouse or touch screen on desktops, notebooks, tablets, or smart phones. The new program is named **MoneyPlan** and it helps you organize and manage your financial planning. 


####Organize And Manage Your Plans.
Your financial data is shown in easily understood diagrams and tables. Assets such as bank accounts, IRAs, and insurance policies are easily defined and modified. You can quickly change assumed tax rates, inflation rates, and rates of return. You also create transaction instructions such as deposits or transfers which are used during a MoneyPlan calculation run. 

*Tree View Of Your Assets & Planned Transactions.*
![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fr9mslrcovj923j26pe1.PNG)

By varying your assumptions of parameters such as tax rates, inflation rates, rates of return, and legal arrangements such as trusts, you can use MoneyPlan to visualize and understand the year by year cash flow of different financial planning strategies.

####Simulated Asset Performance.
You define your financial assets and your plans for managing them over the life of your plan. Then run MoneyPlan to simulate the results.


*Yearly Cash Flow in Charts & Tables*
![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hhxnum9zk3drzwprx8v3.PNG)

---

####Current Status

There's still work to be done. A prototype demonstrating the current state can be seen at [MoneyPlan.guru](https://moneyplanstaticpage.z13.web.core.windows.net/).

---

*The legacy program is [RetirementForecaster](https://forecaster4website.azurewebsites.net/).*
Day 99 Of 100DaysOfCode:Centering and scaling in a pipeline
Tags: wecoded, womenintech, 100daysofcode, codenewbie
Published: 2021-04-07 15:51:18

This is my 99th day of #100daysofcode and #python learning journey.  Approximately I am in terminal point. Now I feel I am champion. Talking about today's progress I keep learning from DataCamp. I also did some exercises there. Did some codes on the random topic.
# Centering and Scaling In a Pipeline
```python
# Import the necessary modules
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline

# Setup the pipeline steps: steps
steps = [('scaler', StandardScaler()),
        ('knn', KNeighborsClassifier())]
        
# Create the pipeline: pipeline
pipeline = Pipeline(steps)

# Create train and test sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# Fit the pipeline to the training set: knn_scaled
knn_scaled = pipeline.fit(X_train, y_train)

# Instantiate and fit a k-NN classifier to the unscaled data
knn_unscaled = KNeighborsClassifier().fit(X_train, y_train)

# Compute and print metrics
print('Accuracy with Scaling: {}'.format(knn_scaled.score(X_test, y_test)))
print('Accuracy without Scaling: {}'.format(knn_unscaled.score(X_test, y_test)))
```
The output of above code is,
```python
Accuracy with Scaling: 0.7700680272108843
Accuracy without Scaling: 0.6979591836734694
```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 99 Of <a href="https://twitter.com/hashtag/100daysofcode?src=hash&amp;ref_src=twsrc%5Etfw">#100daysofcode</a> and <a href="https://twitter.com/hashtag/python?src=hash&amp;ref_src=twsrc%5Etfw">#python</a> <br>Centering and scaling in a pipeline from DataCamp<br> One more day to reach in a terminal point. Finally I am going to complete 100daysofcode.<a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> <a href="https://twitter.com/hashtag/WomenWhoCode?src=hash&amp;ref_src=twsrc%5Etfw">#WomenWhoCode</a> <a href="https://twitter.com/hashtag/DEVCommunity?src=hash&amp;ref_src=twsrc%5Etfw">#DEVCommunity</a> <a href="https://t.co/crjxj5Fzuy">pic.twitter.com/crjxj5Fzuy</a></p>&mdash; Durga Pokharel (@durgacodes) <a href="https://twitter.com/durgacodes/status/1379821079087116288?ref_src=twsrc%5Etfw">April 7, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Gradient Animation Text Effects In CSS
Tags: uiweekly, webdev, codenewbie, css
Published: 2021-04-07 15:42:37

For Make Animation Text is too easy with the help of CSS keyframe animation rules. Here we made simple Gradient Animation Text Effects In CSS and HTML.

In this effect, we used gradient background color, and also for animate we used CSS animation properties with the infinite move. To make text effects we used background-clip and text-fill CSS properties with filter rotate for the definition and Usage.
 
Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[Source Code](https://w3hubs.com/gradient-animation-text-effects-in-css/)
JavaScript Interview Question #30: Reject inside resolve
Tags: webdev, javascript, beginners, codenewbie
Published: 2021-04-07 15:41:33

![js-test-30](https://learn.coderslang.com/js-test-30.png)

What will be logged to the console? Will the `finally` block be executed?

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

To analyze this code snippet, I'll start with the things that are clear:

- the `.then(console.log)` function will not be executed and there’s a rejection inside of the `Promise.resolve()`
- the `catch` block won’t be able to catch the rejection as it happens asynchronously

So, we’re left with the `finally` block. There’s a single call to the `console.log` and it’s the first message the will be printed on the screen.

Then, the unhandled rejection will happen as we haven’t provided the error handler to the promise chain in line 2.

---

**ANSWER**: The string `finally` will be logged to the console followed by the `UnhandledPromiseRejectionWarning: -1`

[Learn Full-Stack JavaScript](https://js.coderslang.com/sign-in)
Scary Keyword In JavaScript
Tags: javascript, tutorial
Published: 2021-04-07 15:36:49

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yb8v6fkc555ewrvhu7rb.png)

Yes i call `this` key word in JavaScript the most scariest keyword because it kept confusing me for long time even though i was already a JavaScript developer, i encountered this key word when i started my journey as a React developer, let us see how we can make it easier to understand.

> Impoorrtant : `this` keyword behaves differently when we use it in function  and and object methods.

let us create a simple file called `thisKeyWord.js` and add the following line of code 
```
console.log(this) // {}
```
**Inside the regular functions**

let us create a function and do the following
```
function myFunction(){
	console.log(this);
}

myFunction();
```
in the console we can see that its an **global window object**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/428tkomz7gogkmfdken4.png)
 

**Inside the object methods**

let us add the following code in the file 

```
let person = {
	name : "Guru",
	age : 29,
	gender : "male",
	getDetails() {
			console.log(this);
	}
	
};

person.getDetails();
```
in the console we can see that its the **object** itself

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7jaj3rp1fabrlsncvp9c.png)

**Summary**
1. Inside the regular functions , `this` keyword is an global object
2. Inside the object methods its the defined object itself

I have explained in my youtube video also , please like, share and subscribe to my youtube cahnnel if you like my content

{% youtube RmSou_74p-I %}
4 RxJS operators explained with 3D GIFs
Tags: javascript, beginners
Published: 2021-04-07 15:34:48

1. RxJS: distinctUntilChanged
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d7asr3s1jv9gnk0hzmjn.gif)
More: [distinctUntilChanged](https://summonthejson.com/blogs/tips/rxjs-distinctuntilchanged-explained)

2. RxJS: filter
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ea3mdp3lic4dratb4wub.gif)
More: [filter](https://summonthejson.com/blogs/tips/rxjs-filter-explained)

3. RxJS: debounce
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5kh5pfd20gelxc178l7.gif)
More: [debounce](https://summonthejson.com/blogs/news/rxjs-debounce-explained)

4. RxJS: throttle
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k74ikzc8f16mjqevqt6q.gif)
More: [throttle](https://summonthejson.com/blogs/news/rxjs-throttle-explained)

[![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6i1ukg2lm73xiugtwll8.jpg)](https://tomasz-smykowski.com/fantasy-rxjs/)

Like and follow for more!
the Best way to use Laravel with Nosql Mongodb
Tags: laravel, mongodb, php
Published: 2021-04-07 15:13:19

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7i5b71x4zqbxqc7c5zs.png)


1 -The first step we need to sure we installed Mongodb in the global environment on the PC.

2 - Installation

if ready I will be run in my project this command

     "$ composer require jenssegers/mongodb"

3-Laravel 

In case your Laravel version does NOT autoload the packages, add the service provider to config/app.php:

    Jenssegers\Mongodb\MongodbServiceProvider::class,

4- Configuration

You can use MongoDB either as the main database, either as a side database. To do so, add a new MongoDB connection to config/database.php:

         'mongodb' => [
            'driver' => 'mongodb',
            'host' => env('MONGO_DB_HOST','localhost'),
            'port' => env('MONGO_DB_PORT'),
            'database' => env('MONGO_DB_DATABASE'),
            'username' => env('MONGO_DB_USERNAME'),
            'password' => env('MONGO_DB_PASSWORD'),
            'options' => []
         ],

if need to used DSN :

        'mongodb' => [
            'driver' => 'mongodb',
            'dsn' => env('MONGO_DB_DSN'),
            'database' => env('MONGO_DB_DATABASE'),
        ]

5 - env File   '.env'

         MONGO_DB_HOST=127.0.0.1
         MONGO_DB_PORT=27017
         MONGO_DB_DATABASE={my_db}
         MONGO_DB_USERNAME={my_user}
         MONGO_DB_PASSWORD={my_password}

if need to used DSN :

        MONGO_DB_DSN= {my_link_dsn}
Looking for Ways to Style React Tables 
Tags: react, table, css, style
Published: 2021-04-07 15:12:59

I have created a table in AWS with an associated Lambda function and API gateway.  I'm learning React so I have written a simple page to display the table data. A quick note on this I have not solved the CORS issue with the API gateway so I installed a plugin in Chrome to turn of the CORS security.

I'm trying to style the table but I can't seem to get anything to work....

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/okzoryp9fsfjhuuubv6p.png)
 

Can somebody help?

```css
.HeaderAge {
    top: 0;
    left: 0;
    width: 100%;
    position: fixed;
    background: #521751;
    height: 56px;
}
```


```javascript
import React, { Component} from 'react';
import axios from 'axios'
import Table from "./Table";

import './Table.css';

class DataModelViewComponent extends Component {

    constructor(props) {
        super(props)
        this.state = {
            users: [],
            loading: true
        }
    }

    async getUsersData() {

        var config = {
            method: 'get',
            url: 'https://execute-api.eu-west-1.amazonaws.com/Prod/v1/DataModel',
            headers: {
                'x-api-key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'Access-Control-Allow-Origin': '*'
            }
        };

        const res = await axios(config)
        console.log(res.data)
        this.setState({ loading: false, users: res.data })
    }

    componentDidMount() {
        this.getUsersData()
    }

    render() {

        const columns = [
            {
                Header: 'First Name',
                accessor: 'firstName',
            },
            {
                Header: 'Last Name',
                accessor: 'lastName',
            },
            {
                Header: 'Age',
                accessor: 'age',
                className: 'HeaderAge',
            }
        ]

        return (
            <div className="App">
                <Table columns={columns} data={this.state.users} />
            </div>
        )
    }
}

export default DataModelViewComponent;
'''
Day~2 of #100DaysofCode
Published: 2021-04-07 15:04:35

Hello Everyone,

*Today is day two of the 100daysofcode challenge, but today is the worst day of the week, I was unable to create any react app it was giving me this error*
 ![1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1617807160889/l7k5h0zbP.png)

*I tried to look for a solution online they all was saying to run `npm cache clean --force` this command to clear the cache but this doesn't solve the problem. *

![2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1617807477652/fkvd7_sMY.png)

*I spent most of my time today finding a solution for this problem but I haven't got any, I have posted about this problem in reactjs  [subreddit](https://www.reddit.com/r/reactjs/comments/mlxgmz/unable_to_create_react_app/)  if I don't get any answer then tomorrow I'm going to uninstall node and npm from my system and reinstall it.*


*In my Django practice project, I have finished the template and started working on the user registration system.*
Great News For Africa Based Developers: Pluralsight Has Made It's Awesome Video Courses Free For The Month Of April
Published: 2021-04-07 15:00:53

If you are a developer, you probably have used Pluralsight before. If you haven't, Pluralsight is an online technology school.

Last year after the outbreak of the covid virus, the company made its extensive library of video courses absolutely free for new users for the month of April. If you were an old user, all you had to do was create a new account and take advantage of the offer. No credit card details needed This year the company has floated the same offer to individuals and businesses that want to upskill their workers.

If you are based in Africa and especially if you are an upcoming developer, buying online courses is relatively more expensive than buying it from European, American or some Asian countries due to a weaker currency relative to the US dollar. Products priced in USD always seem expensive once the exchange rate is factored in, especially from a country with low purchasing power.( For example the current exchange rate is 1USD = 108.60 KES). This problem can be solved if companies that price their goods in USD implemented Purchasing Power Parity to make it easier for folks from third world countries to purchase these products. This will go a long way to bring under-represented communities to the table and ultimately increase diversity in tech.

Pluralsight offering their courses for free for one month somewhat evens the field. Though one month is not long enough to learn a lot, it's enough to learn a few tech concepts. If one had a solid foundation in programming and is dedicated enough , they can learn a new programming language in a month. In future the company should think of extending the offer to 2-3 months for people from poorer countries.

I hope upcoming developers especially those from poor countries will take advantage of this wonderful offer. Just create an account on Pluralsight.com and get going. If you have never coded before, create an account then start watching the course "What is programming by Simon Allardice". It's the best course for absolute beginners in my own assessment.

Personally, since I struggle with CSS a lot, I decided to take advantage of the offer and improve my css skills. I spend a lot of time googling css concepts so I figured this would be a good opportunity to solidify my CSS skills. I created a 21 day challenge where I would use Pluralsight videos to study CSS for one hour everyday. Since I learn in public I decided to document my journey on my instagram and Twitter pages using the tag #21DaysOfCSS. You can follow my journey by following me on Instagram or Twitter.
LaTeX: Errors & Solutions
Tags: latex, codenewbie
Published: 2021-04-07 14:56:16

Hello :) 

How is it going? How are your LaTeX documents going? In this post, I am going to talk about some common `errors` in LaTeX and how you can fix them.

Sometimes when we are learning something new it is common that we have errors during the process because of many reasons, but you do not need to feel sad. Here are some errors that could have occurred 

> I am going to write the error in `this format`, the description of the error in *this format* and the possible solution in normal format

# The most common error in LaTeX

- `Extra } or forgotten endgroup`: *you have forgotten a `}` or a `\end{yourEnvironment}` at the end of the environment* just check the environments and their `}`. I talk about commands [here](https://dev.to/latexteada/halt-do-not-just-scribble-document-structure-9e6)

You need to know that if you are using a code editor that *closes* the environment automatically, rarely you will have this error

- If you have checked all the curly braces and it does not fix the error, then here are other possible errors :) 

# Other Possible Errors

Before start, you need to know that the order in which I write the errors is not relevant.

## General Error

- `LaTeX Error: Environment *** Undefined`: *you have misspelled the name of the command* check the name of the command. I talk about some commands and environments [here](https://dev.to/latexteada/a-primer-to-your-first-document-the-sheet-and-language-5b4n)

## Errors in the Preamble

- `LaTeX Error: File *** .cls not found`: *You have misspelled the name of a property in the `\documentclass{}` instruction*
    - Check the order of the commands in that instruction
    - Check if the `fontsize` or the `papersize` is permitted, I talk about that [here](https://dev.to/latexteada/a-primer-to-your-first-document-the-sheet-and-language-5b4n)
    - Check the spelling of the words

- `LaTeX Error: Can be used only in the preamble`: *You have put a command, which is permitted in the preamble only, after the `\begin{document} command`* Check what is the command which is causing the problem and move it to the preamble. [Here](https://dev.to/latexteada/halt-do-not-just-scribble-document-structure-9e6) I talk about the document structure 

- `LaTeX Error: File *** .sty not found`: *You misspelled the name of a package while importing it* Check the name of the packages that you have imported, if you are using `VSCode` and the LaTeX extension or `Overleaf` they have the *autocomplete* option to avoid these mistakes 

- `LaTeX Error: No title given` *You have put the `\maketitle` instruction inside the `\begin{document}` environment without putting `\title{}` and `\autho{}` in the preamble. I talk about that [here](https://twitter.com/latexteada/status/1351907613018107904?s=19)
Ruby Keyword Arguments
Tags: ruby, ruby3
Published: 2021-04-05 23:15:22

In Ruby 2, keyword arguments are essentially the same as a hash object at the end of the positional arguments.

Ruby 2.x:
```ruby
def test(*args)
  p args
end
test(1, {y: 2}) # [1, {:y=>2}]
test(1, y: 2) # [1, {:y=>2}]
```

Ruby 2.x:
```ruby
def test2(hash={}, **kwargs)
  p [hash, kwargs]
end
test2({y: 2}) # [{}, {:y=>2}]
test2(y: 2) # [{}, {:y=>2}]
```
Though I have passed in a hash, it's actually picked up by the `kwargs`.
This... is probably not something one would expect, right?


----


So, in Ruby 3, keyword arguments are completely separated from the normal arguments (learn more [here](https://bugs.ruby-lang.org/issues/14183)).

Ruby 3.0.0:
```ruby
def test2(hash={}, **kwargs)
  p [hash, kwargs]
end
test2({y: 2}) # [{:y=>2}, {}]
test2(y: 2) # [{}, {:y=>2}]
```

**If a method has explicit keyword arguments in Ruby 3, all the callers must explicitly pass in keyword arguments (or explicitly unpack a hash as the keyword args) in order to supply the keyword args.**

Using this standard, one could write Ruby code that's compatible with both Ruby 2 and Ruby 3.

### Caveat
There’s a catch in writing Ruby 2 and Ruby 3 compatible code though:

Ruby 2.x:
```ruby
def foo; end
a = []
b = {}
foo(*a, **b) # this is okay
send(:foo, *a, **b)  # this is not okay: ArgumentError (wrong number of arguments (given 1, expected 0))
```
There is [a bug in Ruby 2](https://bugs.ruby-lang.org/issues/10856) that is causing issues when unpacking empty hashes for kwargs (fixed in Ruby 3). In some cases, we’d have to conditionally unpack the kw hashes in Ruby 2 so that the code works with both Ruby versions (unpacking empty kw hashes causes errors sometimes). As a result, the actual code would look a bit ugly (with an if statement to unpack only if the kw hash is not empty), unfortunately :sweat_smile:.

Another option is to use https://github.com/ruby/ruby2_keywords but it's better to actually fix the keyword argument passing when possible.
String in C
Tags: tutorial, discuss, beginners, computerscience
Published: 2021-04-07 14:44:30

What is a String?
A string is a 1-d character array terminated by a null(\0). The null character is used to denote string termination, characters are stored in contiguous memory locations. 

How to initialize and print a string?
To initialize and print a string there are many ways like using pointers. Three methods that I am aware of to do this are mentioned in the image.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkf7kx8c9j9lcfoq3hef.png)
Lead generation Tactics using Instagram! 

Published: 2021-04-07 14:31:39


Hope you are doing good in your life! Today we gonna through some points in this article hope it will help you to generate leads in your business! Dear users, you may be thinking about how we can generate leads using Instagram. Don't worry we will clear your fishy mind. If you have good followers in your Instagram account you can earn money as a cup of Tea. 

If you don't have good followers in your Instagram account. You can increase the followers through marketing or you can buy a new Instagram with lakhs of followers from the Internet.

As you know you can only attach a single link to your Instagram Bio. But after reading this complete article you will come to know how we can add multiple links in our Instagram Bio. There is various third party website which will help us to do this awesome task. Just we need to sign up there and that's it.  

Some of the top Third Party for Insta Bio-Link are as below!

# Linktree - 
1. You can use it anywhere say take your Linktree wherever your audience is, to help them to discover all your important content.
2. You can link to everywhere say Linktree is the launchpad to your latest video, article, recipe, tour, store, website, social post - everywhere you are online.
3. Easily Manageable we mean to say in a second you can set up your Linktree account and links by simple drag-and-drop editor to effortlessly manage your content 
4. You can believe Linktree blindly because Linktree doesn’t track any personal data on your visitors, so your Linktree remains your place on the internet.

# ShorBy - 
In Sorby, you can add unlimited links with eye-catching Themes. Similar to Linktree here also you can use the Drag Drop Option to set your accounts. You can add WhatsApp Link, Facebook Messenger Link, Telegram, Skype Username, Viber Number and many more

Wrap Up 
Dear users, we recommend you use those third-party Insta Bio-Link app to add unlimited links to your Instagram Bio. Hope you got our point on how to add Instagram multiple links in Bio! More Link you attach chance to generate more leads. Earn more money using these tactics today itself. Let check all the Bio-Link their-party apps on our website now! Thank you for reading this article. We will get back to you soon with new lead generation articles!

More Check <a href="https://deviltouch.com/how-to-create-multiple-bio-link-in-instagram/">Bio Link Instagram</a>