teleren/devto huggingface dataset:
Why does a PHP Developer need to use codeigniter framework?
Tags: php, codeigniter, programming, framework
Published: 2022-04-15 11:29:56

Codeigniter is a PHP Framework with a small footprint and is used to build dynamic web applications using the elegant toolkit, libraries, and helpers provided in it.

Why does a PHP Developer need to use this framework?

1) Small Foot Print
Codeigniter comes with a small footprint that is 1.2MB download and a user guide of 6MB, and its folder structure is very easy to understand and maintain for dynamic web applications.

2) Performace
Codeigniter gives us a better performance on run time as it contains a small footprint and was built on PHP Programming Language which is more popular and old.

3) Security
Codeigniter is highly secure as it supports CSRF and XSS which are very commonly used in web applications to prevent the application from attacks.

4) Clear cut Documentations and Support
Codeigniter has very clear documentation and for one who downloads the Codeigniter by default, it contains the user guide. Codeigniter has vast support across various platforms such as StackOverflow and GitHub as it has a great number of contributors and developers.

For more information about features and architecture visit the link [https://fsh.org.in/blog-details/Frameworks/Codeigniter+Framework/11](https://fsh.org.in/blog-details/Frameworks/Codeigniter+Framework/11)
How to create a VSC Snippet
Published: 2022-04-15 11:21:46

It is very handy to use snippets in VSC such as
"rfce" and press tab to create :

```
import React from 'react'

function test() {
  return (
    <div>test</div>
  )
}

export default test;
```

I will show you how you can easily create your own custom snippets.For this example i want to create a user snippet which provides a react native function component

**1. go to your settings and to "User snippets"**

![settings->user snippets](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dkucap4knltan4cay2u.png)

**2.Create the snippet**

Use double quotes to wrap the JSON properties  and Array items, but single quotes for the strings in your code snippets.

Take a quick look at my example:

```
{
  "Function Component": {
    "prefix": "rnfc",
    "body": [
      "import React from 'react';",
      "import { View, StyleSheet } from 'react-native';",
      "",
      "function ${TM_FILENAME_BASE}(props){",
      "  return <View style={styles.container}>$0</View>;",
      "};",
      "",
      "const styles = StyleSheet.create({",
      "  container: {},",
      "});",
      "",
      "export default ${TM_FILENAME_BASE};"
    ]
  }
 
```

Now lets see what we got here

- "prefix": "rnfc" This is your new shorthand
- with "" you can define empty lines
- ${TM_FILENAME_BASE} creates the file with the name of the file 
-$0 will tell VSC where the cursor should be after creating the code block


So from now on you can always just type rnfc and press tab and you will get the code block you created.
How long does it take to learn Javascript for Beginners
Tags: javascript, programming, coding, beginners
Published: 2022-04-15 11:15:10

In this blog, you will discover all there is to know about How long does it take to [learn Javascript](https://www.codeavail.com/JavaScript-Assignment-Help).

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

If you're new to coding, you might be wondering if you can learn a programming language in a few of weeks. The answer is a resounding nay. In such a short period of time, gaining expert knowledge of all the programming languages in demand and landing a junior developer position is nearly impossible.

Many firms, fortunately, will recruit young devs who are still learning in-demand languages. JavaScript is one of such languages. The most used language for building interactive webpages is JavaScript. You'll want interactive elements on your website to really attract the interest of visitors.

## What Is Javascript?

Web programming is done in JavaScript. You should be familiar with it if you plan to create web apps. There isn't a way around it. Without a working understanding of JavaScript, knowing [HTML language](https://www.codeavail.com/HTML-Assignment-Help)or CSS is useless. You need also know JavaScript if you want to study any front-end framework such as React, Angular, or Vue. It is a must-have.

## How long does it take to learn Javascript

If you've worked with any of the programming languages before. That signifies you've mastered the fundamentals of programming. Now all you have to do is figure out what [JavaScript programming](https://www.codeavail.com/JavaScript-Homework-Help) is and why we need it. Also, familiarise yourself with the syntax.

It shouldn't take you more than a week to become familiar with syntactical concepts if you work 2 to 4 hours every day. Then you'll need to learn advanced concepts like closures, web APIs, event loops, prototype chains, and so on. This is going to take a while. From a few weeks to a few months. It all depends on how committed you are to learning new things.

Also, when you apply these notions to a brand-new application, everything becomes a lot clearer.

## Final Words

Simply keep reading to find out. How long does it take to learn Javascript? It is not required to be familiar with Java, C++, or [C programming](https://www.codeavail.com/C-Programming-Assignment-Help) to learn JavaScript; you may learn JavaScript without being familiar with these programming languages.

We covered all there is to know about How long does it take to learn Javascript in today's lesson. As a result, we hope that you will find our blog to be really useful, and that any reservations you may have about it will be removed.
How to Start writing Python 3 Program
Tags: python, beginners, shriekdj, programming
Published: 2022-04-15 11:11:17

Now this post is about how you can write programs in **python 3 programming language**.

The Information will be provided in this with an **Hello World Program In Python**.

---

## Hello World Program in Python Terminal

To Start an Python Terminal You Can Just Open `python.exe` from start menu of windows or just write `python` in Command Line Shell Like Command-prompt, Powershell, Git Bash or Terminal of Microsoft Windows Operating System.

For Linux or Mac OS the Command Is Same but sometime they comes with `python2` installed already so for correct python running try `python3` command instead of `python` if it does not work.

Given Below is Program we are gonna write `print("Hello World")` for displaying Hello World.

```bash
$ python
Python 3.10 (default, June 4 2019, 09:25:04)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>print("Hello World")

Hello World
```

Unlike othet language it does not need any semicolon at last and neither the `main` function is mandatory everywhere.

---

## Hello World Program In Python File

For Running python Program from File just create an text file named `main.py` with python program in it, Here we will write `print("Hello World")` In It.

and for running the program just run given below commands.

```bash
$ python main.py
Hello World
```

There are some additional configuration for file also like for making the python program file as executable and able to run under Operating Systems Like Mac OS We Can Do Below Steps.

By Default the python encodes the Python Text files in utf-8 encoding which you can change if wanted just add `# -*- coding: encoding_name -*-` at start of file and also need to add an `Unix shebang line` (`#!/usr/bin/env python3.9`) before that for running as executable python script if any issue occurred.

Like New file Will Look Like Below

```python
#!/usr/bin/env python3.9
# -*- coding: utf-8 -*-
print("Hello World")
```

and also before running the file change permissions of file with commands `chmod +x main.py`.

---

I Know I Maybe Wrote too Much thing for an Hello World Program of Python But Most of the Given Details I Found on <https://docs.python.org/3/tutorial/interpreter.html>

***

## Conclusion

If you found this useful then please share this and follow me! Also check out Buy Me A Coffee if you want to support me on a new level!

[![Buy me a coffee](https://cdn.buymeacoffee.com/buttons/default-yellow.png)](https://www.buymeacoffee.com/shriekdj)

Thanks for reading until here.

Bye 👋.
Delete git branch not in remote
Tags: git
Published: 2022-04-15 11:09:36

---
title: Delete git branch not in remote
published: true
description: 
tags: git
//cover_image: https://direct_url_to_image.jpg
---
I'm not sure where I received the information, but it was most likely from stackoverflow.

```shell
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d
```

Update 2022-08-02

```shell
git checkout develop && git branch --merged | grep -v 'main' | grep -v 'develop' >/tmp/merged-branches && vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches
```
Ref: https://stackoverflow.com/questions/7726949/remove-tracking-branches-no-longer-on-remote
How to publish a CLI tool on NPM
Tags: npm, javascript, tooling, showdev
Published: 2022-04-15 11:07:26

**Hello Developers 🙌🙌🙌**

Recently I wanted to create a CLI tool, but I only know JavaScript, so I researched and found out that we can create CLI applications using JavaScript. I published my CLI tool named _track-task_ and will show you how to publish a package in NPM. You can download and use it.

```npm
npm i -g track-task
```

### How to publish NPM package?

**Step 1:-** Initialize _npm_ by `npm init -y`
It will create a default package.json file, which will look something like

```json
{
  "name": "track-task",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
```

Points to note here

- Name should be unique, otherwise it will throw error while publishing.
- Start with version 1.0.0 and remember to update to version whenever you make changes to your code.
- Add a bin as `" bin "./index.js"` from this point your code will run.
- Add keywords and author name to stand out.

**Step 2:-** Code your application.
Code your whole application and test it out locally and make sure to add `#! /usr/bin/env node`, it makes your file executable.

**Step 3:-** Add more info to package.json.
Add repository, bugs and homepage urls
```json
{
  ...
  "repository": {
    "type": "git",
    "url": "git+https://github.com/shareef99/task-tracker.git"
  },
  "bugs": {
    "url": "https://github.com/shareef99/task-tracker/issues"
  },
  "homepage": "https://github.com/shareef99/task-tracker/#readme",
}
```

**Step 4:-** Publishing your CLI tool

- Create _npm account_.
- Login into npm account from terminal.
```npm
npm login
```
- Enter the username and password.
- Make sure you are ready to publish.
- Publish your package.
```npm
npm publish
```

**_Congratulations ✨✨✨ You have published the npm package._**

**Step 5:-** Updating package.
Don't forget to change the version of in package.json file after update your code. Once you are done with the coding, run `npm publish`.

**Thanks and Happy Coding**

Closing here 👋👋👋

> This is **Shareef**.
> My [Portfolio](https://portfolio.shareef.vercel.app/)
> Twitter [ShareefBhai99](https://twitter.com/shareefBhai99)
> [Linkedin](https://www.linkedin.com/in/nadeem-shareef-7a8394182/)
> My [other Blogs](https://dev.to/shareef)
Question about a process of building a real world web...
Published: 2022-04-15 11:04:13

I'm curious about the process of building a real web app.

because I'm trying to build a web application (management system) right now, I'm not sure I'm not certain which part of entire code i should start first.

Should I create the front-end design and interaction first, or create a back-end function first?

Or do I have to do both at the same time with each function part like login, register, upload etc.?
Top Flutter App Development Companies
Tags: flutter, webdev, apps, mobile
Published: 2022-04-15 10:57:48

Why are top web development companies using flutter for app development? Web development companies want to design apps that support both android and iOS. Flutter is a cross-platform tool used for developing apps for desktop, mobile, and web. It has a single codebase. Businesses are deploying this technology to get most out of it. 

## Why Flutter Has Become the Most Preferred Platform

No matter how well we optimize applications using React Native it’s not smooth. There is always a limitation to fit within a confined framework. It has a lot of constraints because of internal design and code management. Flutter operates with UI rendering components, device APIs, and a plethora of libraries. With many tools and technologies, it improves experience and performance of apps.

Flutter brings developer's projects to life. It simplifies development life cycle, speeds up development, and lowers costs. It provides a canvas for Flutter designers to create high-end user experiences. Here’s a trend of flutter vs react native -

Flutter’s built-in widget catalog focuses on delivering high-performance, exciting application elements. Creating UIs with complex interfaces is effortless with Flutter.

Flutter apps need less time for testing as there is only a single codebase set to review and test. Also, single codebase works for both platforms (Android and iOS). It reduces chances of bugs in coding. We have explained mobile application development framework and comparison of flutter with its competitors in detail. You can find all this information in why one should consider Flutter for developing mobile apps.

Take a look at **[top companies using flutter for building apps](https://www.clariontech.com/blog/top-flutter-app-development-companies-in-india)**.
Exploring TypeScript
Tags: typescript, programming
Published: 2022-04-15 10:43:41

According to the **typescript** website

> "TypeScript is JavaScript with syntax for types.

> TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale."

That's all that does mean. In this case, no matter what you're working with, like javascript, react, angular or etc., that concerns javascript, you gotta go with typescript. It saves time and makes you more confident in finding bugs and errors.

It has some excellent capabilities, like a throwing compiling error. It continuously monitors your code, whether you edited it or not; if edited, what is the type issue and many more things.
Typescript is really easy to learn. It is a superset of javascript. That's all that it says, meaning it can hold all the javascript valid code along with its features.

In javascript, we define a variable like

```
const abc = "Hello world!"
```

But in typescript, we have to define its type, whether it is a string, number, etc.

```
const abs:string = "Hello world!"
```

Typescript itself has so may advantages like:

- Support for modern JavaScript features
- Advanced type system
- Developer tooling support
- Optionally static typing and type inference
- Enhanced IDE support
- Strict null checks
- Compilation
- JavaScript interoperability
- Converting from JavaScript to TypeScript

_To be continued._
Project Two (Python): Connect Four
Tags: python, programming, beginners, opensource
Published: 2022-04-15 10:49:57

## Why?
Hello, this is my second posted project. This project was created with the intention of exposing myself to Python, stack overflow, GitHub workflow, and developer tools.

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

## How
This project uses a list data structure to keep track of multiple pieces. 

## Conclusion
I hope you enjoy this part of my learning process.
[GitHub](https://github.com/shiahalan/connect-four.git)
## Advice?
Advice is greatly appreciated (post in comment section).
It's better together..
Tags: python, beginners
Published: 2022-04-15 10:48:08

Last couple of days were some of the most fun I've had programming. A friend of mine recently got an internship after his masters in Digital Marketing and he caught an interest in data analysis and website scrapers. So he started learning Selenium and asked me for help.

I bet that, to a more experienced coder, figuring out and integrating Selenium's webdriver basic functionalities would take no time at all; but it was a challenge to us. But luckily we were going through it together, and each time we'd find something in the documentation that was cool that we could use, we'd rush to tell the other and try it out.
Lots of errors and breakpoints later, we got it to work! The script goes through a restaurants reviews, changes pages, exports to a .csv. And the best part is, it can be made better in so many ways.

The secret to this really was cooperation. Brainstorming, going through ideas, putting them to pseudo-code, getting errors and figuring out what tools Selenium had in place to prevent those errors, etc. It all came together much more easily because there were two of us, and importantly, because we were at the same skill level.

Sometimes it's easy to think "I can't do this, it's too complicated" but all you need is a fresh set of eyes to give you a different point of view!
8 Major Reasons of Mobile App Failure and How to Avoid Them
Tags: android, ios, flutter, react
Published: 2022-04-15 10:44:22

We all can now agree to the fact that mobile application is that one thing that can give your business that much-needed push towards growth. This fact has led to the development of millions of applications per year. But there is a sad fact hidden in these statistics; only 1% of the applications are said to be successful. Isn't that shocking?

App failure is not just about an unsolved bug or a defect, there are deeper problems that can probably cause an app failure. Therefore, it is crucial to be informed about the reasons that can affect and crush your dreams of having a perfectly successful mobile application.

We will talk about the major reasons that can cause mobile app failure. In addition, we will also tell you how to avoid them.

Let's dive in then!

**[Major reasons for mobile application failure](https://www.clariontech.com/blog/8-major-reasons-of-mobile-app-failure-and-how-to-avoid-them)**
This week’s newsletter is out! (15-04-2022) - Midweek Special - Minimal commentary link dump! [Parental Advisory: Mind buffet]
Tags: javascript, tech, webdev, discuss
Published: 2022-04-15 10:40:00

---
title: This week’s newsletter is out! (15-04-2022) - Midweek Special - Minimal commentary link dump! [Parental Advisory: Mind buffet]
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Midweek Special - Minimal commentary link dump! [Parental Advisory: Mind buffet]

https://markjgsmith.substack.com/p/mark-smiths-newsletter-15-04-2022?s=w

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
TypeScript Basics
Tags: javascript, react, typescript
Published: 2022-04-15 10:38:41

## **TypeScript vs JavaScript**
TypeScript is a superset of JavaScript. That means TypeScript has some extra features to JavaScript. In JavaScript, we don't need to define the type but in TypeScript, we have strictly followed the type. As a result, the chance of bugs will be lower.

## **Basic Types**
Some common types are - `number`, `string`, `boolean`,  `undefined`,  `null`, `unknown`, `any`.

**Number**
In TypeScript, a variable that will store a decimal number the type of the variable should be defined as type `number`. While big integer gets the type `bigint`

```
const total: number = 1000;
const discount: number = 1000*0.1;
const max: bigint = 10n ** 9n;
```
**String**
In TypeScript a variable that will store textual data, the type of the variable should be defined as type `string`

```
const name: string = "Pranta";
const position: string = "Frontend Developer";
```
**Boolean**
This is one of the basic types which contains `boolean` value `true` or `false`
```
const loading: boolean = true|false;
```
**Array**
We can define a type of array in three ways. The First two ways have explicitly defined the types. The third way simplifies the task by using an `interface` or `type`
```
First way -
const numbers: number[] = [1, 2, 3]
const products: string[] = ["bag", "laptop", "mobile"]
```

```
Second way -
const numbers: Array<number> = [1, 2, 3]
const products: Array<string> = ["bag", "laptop", "mobile"]
```
If we have an array of objects then we can use the `type` keyword or define an `interface` specifying the type of all properties in an object. Best way to use `interface`.
```
const IProducts {
   name: string;
   price: number;
}
const products: IProducts[] =[{ name: "Mobile", price: 10000}, { name: "Mobile", price: 10000 }];

```
**Any**
The `any` type is rarely used. It helps to work with the existing JavaScript code. When all the data types are not known then we can assume it as `any` type.

```
const looselyTypedVariable: any = {};
console.log(looselyTypedVariable.name); //don't give any error
```
But, there are some drawbacks to using `any` type. With `any` type TypeScript will not give any error whether we are accessing a property that doesn't exist in that object.

```
const strictlyTypedVariable: {name: string} = {name:"Pranta"};
console.log(strictlyTypedVariable.age); //show error
```
Without using `any` we can use `unknown` type as well which is more meaningful. We should try to avoid using `any` when not necessary as it doesn't ensure the type safety.
Integrate Apple Pay and Google Pay With Stripe on MemberPress
Tags: stripe
Published: 2022-04-15 10:38:21



Stripe Checkout is a free payment gateway for our MemberPress Basic, Plus, or Pro plans. If you don’t already have a Stripe account, you’ll need to create one here.

1. Navigate to MemberPress > Settings > Payments page and add a new gateway. OR, if you’re updating your existing Stripe Checkout, skip to step 8 below. 

2. Click on the blue Connect with Stripe button.

3. Authenticate your MemberPress account by entering your username and password.

4. Next, you’ll be redirected to authenticate your Stripe account. If you’re not logged into Stripe, click Sign in at the top right corner.

5. Select your Stripe Account and click the Connect my Stripe account button.

6. Note: If your Stripe account has not been fully set up and enabled for “Live mode”, you will not be able to connect until you have verified your account.

7. After connecting, you’ll be redirected back to your MemberPress dashboard.

8. Locate your new Stripe gateway in the MemberPress Settings and check the Enable Stripe Checkout checkbox.

9. Save the MemberPress Settings.

That’s it! You’ve successfully added (or updated) Stripe Checkout.  
To learn more about how to configure your MemberPress site with Stripe Checkout, take a look at our Stripe Checkout Integration Support Docs.

**Reference Blog**
[Integrate Apple Pay and Google Pay With Stripe on MemberPress](https://www.gomahamaya.com/apple-pay-google-pay-stripe-memberpress/)
Python string | swapcase()
Tags: python, beginners, webdev, dulah
Published: 2022-04-15 10:34:23

The string swapcase() method converts all uppercase characters to lowercase and vice versa of the given string and return it.

**Syntax:**


**string_name.swapcase()**

Here *string_name* is the string whose case are to be swapped.


**Parameter:**The swapcase() method does not take any parameter

**Return value:**
The swapcase() method returns a string with all the case changed.

Below is the python implementation of the swapcase() method 

```
# Python program to demonstrate the use of
# Swapcase() method

string = "wORldGREAtestday"

# Print after swapping all case 
print(string.swapcase())

string = "python"
print(string.swapcase())

```
Output:

```
WorLDgreaTESTDAY
PYTHON
```