teleren/devto huggingface dataset:
5 Reasons To Choose PHP Web Development For Business Website Development
Tags: php, development, websit, top
Published: 2022-04-21 05:42:20

PHP has grown in prominence in recent years as a web design and development platform that is both adaptable and easy to maintain. PHP is a widely used server-side programming language that is used to create feature-rich websites with superior functionality. The benefits of creating interactive, dynamic, safe, dependable, and effective web sites are several. For any PHP web development project, you must first find the most user-friendly PHP [Website Development Company](https://www.websitedevelopmentcompany.org/).

PHP has several advantages that not only save time and money in web development, but also make things easier. Let's look at the top five reasons why using PHP for web development is the best option.

5 Reasons To Choose PHP Web Development For Business Website Development :

- Simple to Maintain
- Reliable
- It takes less time.
- Scalable and well-documented
- PHP hosting with good support


**1.Simple to Maintain:**

PHP code has a readable syntax that makes it easy to modify over time. As a result, it's a lot easier to maintain and update PHP code. This is even more potent because it is critical for businesses to incorporate the latest features for improved client engagement, and PHP is a fantastic option for web development to keep up with it.

**2.Reliable**
PHP is a powerful and safe programming language that allows your website to run smoothly without any bottlenecks or hiccups. PHP has long been a favourite among web developers, thanks to its error handling module, increased support for Object-Oriented Programming, MySQL extensions, data processing through iterators, and interoperability with IIS and Apache.

It operates on most platforms because it is platform-independent, making it an excellent choice for web development.

**3.It takes less time.**

Because of the reusability of PHP code, it takes less time to develop. PHP's support for Object-Oriented Programming makes some code portions reusable. Because the time spent on web development in PHP is less, the ROI (return on investment) is higher, as you may build your online portal more quickly.

**4.Scalable and well-documented**

PHP is a well-documented programming language that gives developers additional options for learning and references to utilise throughout the development process, making it more efficient.

Apart from that, PHP is incredibly scalable, allowing businesses to grow online over time. As a result, PHP web development is extremely advantageous to organisations.

**5.PHP hosting with good support**

PHP is one of the most widely used programming languages among web hosting companies. Because they provide web hosting services for PHP, the majority of reputable web hosting providers support it. Apart from the standard hosting fee, which includes a domain name and unlimited resource allocation, these PHP hosting solutions come at no extra cost.
Share Link
Published: 2022-04-21 05:41:33

[bit.ly/GcamApk](https://bit.ly/GcamApk)
[bbs.now.qq.com/?1882459](https://bbs.now.qq.com/?1882459)
[www.theverge.com/users/icha02](https://www.theverge.com/users/icha02)
[www.mixcloud.com/icha02](https://www.mixcloud.com/icha02/)
[slashdot.org](https://slashdot.org/submission/15556441/cari-dan-temukan-aplikasi-gcam-android)
[pastebin.com/u/icha02](https://pastebin.com/u/icha02)
[flipboard.com/@ichaannisa202](https://flipboard.com/@ichaannisa2022/gcam-apk-rr5ofen2y)
[telegra.ph](https://telegra.ph/Kumpulan-GCam-APK-Android-02-27)
[www.artstation.com/ichaannisa7](https://www.artstation.com/ichaannisa7)
[seekingalpha.com/user/56035397](https://seekingalpha.com/user/56035397/comments)
[coub.com/ichaannisa](https://coub.com/ichaannisa)
[www.instapaper.com/read/1486843189](https://instapaper.com/read/1486843189)
[pbase.com/topics/icha02/cari_dan_temukan](https://pbase.com/topics/icha02/cari_dan_temukan)
[www.authorstream.com/ichaa02](http://www.authorstream.com/ichaa02/)
[list.ly/icha02](https://list.ly/icha02)
[peatix.com/user/11437998/view](https://peatix.com/user/11437998/view)
[devpost.com/ichaannisa](https://devpost.com/ichaannisa)
[www.empowher.com/users/icha02](www.empowher.com/users/icha02)
[ello.co/icha02](https://ello.co/icha02)
[www.gta5-mods.com/users/icha02](https://www.gta5-mods.com/users/icha02)
[www.longisland.com/profile/icha02](https://www.longisland.com/profile/icha02)
[icha02.livejournal.com/profile](https://icha02.livejournal.com/profile)
[www.skillshare.com/profile/Icha-Annisa/198492950](https://www.skillshare.com/profile/Icha-Annisa/198492950)
How to speed up your python program….. with basics
Tags: python, programming, beginners
Published: 2022-04-21 05:27:12

Some people are inappropriately obsessed with python like me. Here, are some guidelines you can use them in daily coding.

- String concatenation is best done with ''.join(list) which is an O(n) process. In contrast, using the '+' or '+=' operators can result in an O(n**2).

- Use built-in functions
(https://www.w3schools.com/python/python_ref_functions.asp) to avoid loops and used these functions like set(): to identify duplicates, del: to delete/remove multiple items for a list/array(eg: del arr[2:5]).

- In functions, local variables are accessed more quickly than global variables.

-  If the body of your loop is simple, try to use map(), filter() or reduce() to replace an explicit for loop.

- List comprehensions run a bit faster than equivalent for-loops. Avoid inside loop, write "x=3" instead of "x=1+2".

- While using FOR loops and conditions(if/else), use "break" to come out of the loop.

- Use numpy and pandas to convert large data into small chucks. Therefore, load in small chunks, process the chunk of data, and save the result is one of the most useful techniques to prevent memory error.

- Multiple assignment is slower than individual assignment. For example "x,y=a,b" is slower than "x=a; y=b". However, multiple assignment is faster for variable swaps. For example, "x,y=y,x" is faster than "t=x; x=y; y=t".

- Chained comparisons are faster than using the "and" operator. Write "x < y < z" instead of "x < y and y < z".

- At last, always try to write less time complexity code.
Tech Hacks discovered dailly
Tags: javascript, webdev, react, css
Published: 2022-04-21 04:35:19

List of all Tech hacks I find dailly while reading a blog or while reviewing code of peers.

Mostly will be related JavaScript, React JS, Node JS, Angular, TypeScript, GIT , HTML and CSS

Just making a list:

1) axios setting deafault header for all request
axios.defaults.headers.common["authorization"] = encodedToken;

2) Function Declarations get Hoisted to Top of the context, where as classes declarations and function Expressions are not Hoisted.

3) Way to round a number  
x = -3.45
console.log(~~x) // -3
console.log(x | 0) // -3
console.log(x << 0) // -3

4)How JS can find an element in a Map object in one step?

Map uses a hashtable (or a similar mechanism) as specified in the spec. Therefore, when an object is requested a hash is calculated. Then the specific location in an internal table is located. This is the basic theory about hash tables and why they are usualy O(1). Do note, that if there are many collisions performance can move towards O(N).

5)
The CSS @import directive has a major drawback due to performance issues; it creates an extra HTTP request each time you call it. However, the Sass @import directive includes the file in the CSS; so no extra HTTP call is required at runtime!

6) which is faster ifelse or switch in js
Compiler is better in optimizing switch-statement then if-else because of the order of evaluation in if is not stacked based on importance but in switch it knows the clause to be evaluated together and with more efficient order.
-> Stats http://www.blackwasp.co.uk/speedtestifelseswitch.aspx
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8p6x9048xvhhlnyyvpu9.png)

7)  Object.is() vs === 
Object.is it for comparing 2 values and default is true
null and null
undefined and undefined 
are equal
but in non primitive data type if not referencing to same instance in memory then not not equal like
Object.is({},{}) or Object.is([],[])

but then what is the difference between === and Object.is()
the difference is signed 0 and Nan
so 
 a) Object.is(NaN,Nan) => true
    NaN === NaN => false
 b) Object.is(NaN,0/0) => true
    NaN === 0/0 => false
 c) Object.is(NaN,Number.NaN) => true
    NaN === Number.Nan => false
I have built a Next.js + MongoDB + Tailwind + TypeScript template Have a look and guide for using it.
Tags: mongodb, nextjs, beginners, productivity
Published: 2022-04-21 04:19:34

## Next.js + MongoDB + Tailwind + TypeScript template

[`Next.js + MongoDB + Tailwind + TypeScript template 📄`](https://github.com/theabhayprajapati/Next.js-TailwindCSS-MongoDB-TS "Next.js")


## 🤔💭 Reason for making this template

Actually, I don't like to do **configuration** of my project, again and again, which leads me to go out and find a template and I got one, which was officially from MongoDB.

[`template`](https://github.com/vercel/next.js/tree/canary/examples/with-mongodb) from [`MongoDB`](https://mongodb.com)

### Why I am not using that?

The template which was configured for [`Next.js`](https://github.com/vercel/next.js/) + MongoDB;
but not for [`TypeScript`](https://github.com/microsoft/TypeScript) and [`Tailwind`](https://github.com/tailwindlabs/tailwindcss).

And then what I got and 💡 for making one for myself, at that moment i don't know to make a template; 
**but it is very easy to make one thanks [`Github`](https://github.com)**.


### 📝 How to use it ?.

```bash
npx create-next-app -e https://github.com/theabhayprajapati/Next.js-TailwindCSS-MongoDB-TS with-mongo-tail-app
```

**Folder Structure 🗿**

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


***Pay attention to lib folder [`Lib`](https://github.com/theabhayprajapati/Next.js-TailwindCSS-MongoDB-TS/blob/main/lib/mongodb.ts)***

it includes [`MongoDB.ts`](https://github.com/theabhayprajapati/Next.js-TailwindCSS-MongoDB-TS/blob/main/lib/mongodb.ts)


### 👷🏾‍♂️ What does the MongoDB.ts do?
The Main function of this file is to get your MongoDB URL and make a function that can use anywhere where you need MongoDB access.

**But in most cases you don't need to touch it; it has been 🧑🏾‍💻 configured for you.**

## Things you need to 😜 perform to make use of it.

**go to [`env.local.example`](https://github.com/theabhayprajapati/Next.js-TailwindCSS-MongoDB-TS/blob/main/.env.local.example) add your MongoDB_URI; which you can easily get from MongoDB.**


1. After adding your MongoDB_URI, you need to run `npm run dev` to make sure that it works.

2. Change the name of file [`env.local.example`]([https://](https://github.com/theabhayprajapati/Next.js-TailwindCSS-MongoDB-TS/blob/main/.env.local.example)) to **env.local**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/scil6w2i78mmdhmar7m3.png)
 
## Congo 🎊, It works.

now you can easily work with MongoDB, in Next.js



Got any issues or suggestions ?
**🤝🏾Connect me on:**
**Twitter**: 🕊️[`@Abhayprajapati_`](https://twitter.com/Abhayprajapati_)
**Github**: 🐧[`@theabhayprajapati`](https://github.com/theabhayprajapati)
**Linkedin**: 📌[`@abhayprajaapati`](https://www.linkedin.com/in/abhayprajaapati/)
**Youtube**: 📺[`@Abhayprajapati`](https://www.youtube.com/channel/UCUrQHSjXEAyboKLN_M0w0Mg)
Tab/window management with titles
Tags: shell, iterm2, misc, unix
Published: 2022-04-21 04:16:12

Do you get lost managing multiple tabs or windows in your terminal emulator? If so, this trick might be handy to your shell toolbox. 

Define a function like this in your shell profile

```
function title {
    echo -ne "\033]0;"$*"\007"
}
```

And then when you open your all important terminal window or tab, call the function and pass a string to it like so:

```
$ title <title string>
```

Viola, you have a handy way of identifying your terminal window/tab and not be lost in a forest of tabs or windows. 

Isn't this neat?


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

Now, let's explain this function a bit. `echo` needs no introduction. `-n` stands tells echo not to print a new-line after the message. `-e`tells echo to interpret escape sequences. 

The trick that makes this work is the text flanked by xterm escape sequences and sequences themselves.

`\033` Escape
`\077` Bell
`]0;`  Identifier for window title and icon
`"$*"` String that contains all arguments passed to echo

Most terminal emulators support these xterm sequences. I tested in iterm and it works beautifully. Go ahead, try it out and help yourself navigate the terminal tab/window maze.

References:

https://tldp.org/HOWTO/Xterm-Title-3.html
Stackoverflow threads on this topic.
จด react lifecycle
Published: 2022-04-21 04:15:05

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmsajpjlowgmsld2kbu9.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ybj47q5mcpejn7lewq1.png)
  
https://microbenz.in.th/%E0%B8%AA%E0%B8%A7%E0%B8%B1%E0%B8%AA%E0%B8%94%E0%B8%B5%E0%B8%84%E0%B8%A3%E0%B8%B1%E0%B8%9A-%E0%B8%9C%E0%B8%A1%E0%B8%A1%E0%B8%B5%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%A7%E0%B9%88%E0%B8%B2-react-3e8fd72ccdbb
Integrating Tailwind into an ASP.NET Core Project
Tags: tailwindcss, core, webdev, programming
Published: 2022-04-21 04:09:51

We use [Visual Studio 2022 Community](https://visualstudio.microsoft.com/vs/community/).
You can find out codes at [Gem.NetTailwind](https://github.com/gemcloud/Gem.NetTailwind)

## 1. Create ASP.NET Core 6.0 empty web application:

and add razor page structure.

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

## 2. Add npm support to our project: The file "package.json" added into our project. 

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

## 3. Install tailwind by "Package Manager Console":
```
PM> cd Gem.NetTailwind
PM> npm install -D tailwindcss cross-env
PM> npx tailwindcss init
```
The "node_modules" was installed.
The "tailwind.config.js" file was created.

## 4. To config the tailwind:

- update the tailwind.config.js file to include all your .razor and .cshtml files.
- create the Tailwind input stylesheet Styles\input.css
```
@tailwind base;
@tailwind components;
@tailwind utilities;
```
- Finally, update the package.json file to add this script section:
```
"scripts": {
    "tailwind": "cross-env NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./Styles/input.css -o ./wwwroot/css/output.css --watch"
  },
```

## 5. Add [Tailwind.Extensions.AspNetCore](https://github.com/Practical-ASP-NET/Tailwind.Extensions.AspNetCore) into our project;
 to install the Tailwind AspNetCore NuGet package.
to Program.cs and add this code before app.Run();
if (app.Environment.IsDevelopment())
{
    app.RunTailwind("tailwind", "./");
    // or
app.RunTailwind("tailwind", "../Client/");
}
 add this using statement on Program.cs
using Tailwind;

## 6. Integrating NPM into an ASP.Net Core project to use the "MSBuild"
and modify your *.csproj file.
```
<PropertyGroup>
 ...
 <NpmLastInstall>node_modules/.last-install</NpmLastInstall>
</PropertyGroup>
...
<!-- Check whether npm install or not! -->
<Target Name="CheckForNpm" BeforeTargets="NpmInstall">
 <Exec Command="npm -v" ContinueOnError="true">
  <Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
 </Exec>
 <Error Condition="'$(ErrorCode)' != '0'" Text="You must install NPM to build this project" />
</Target>

<!-- install package.json package auto "node_modules" -->
<Target Name="NpmInstall" BeforeTargets="Compile" Inputs="package.json" Outputs="$(NpmLastInstall)">
<Exec Command="npm install" />
<Touch Files="$(NpmLastInstall)" AlwaysCreate="true" />
</Target>
```

Next step we will add Theme features into our project.
stay tune!
OpenBB is hiring Junior Python Developers and Senior Software Engineers passionate about the future of finance!
Tags: opensource, python, career, devops
Published: 2022-04-21 04:04:18

We are growing; come grow with us!

![There are 4 continents represented at OpenBB, looking at you, Antarctica!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2261vcgochm2bw9mdfs.png)

I know there's some talented MOFO's lurking here, maybe also looking for path for career growth. Are you a Python developer who is also a degenerate options day trader? Are you a Senior Software Engineer wanting to break free from the shackles of Big Fintech? We want to talk to you!

If you're here, it's quite likely that you have been pitched startups like it was 1998, so I'll save that for later. 

[Apply here!](https://openbb.co/company/careers#open-roles)

![Why OpenBB?](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojqeivgqflbuwlag5o5u.png)

If a picture can say a thousand words, a star can inspire millions more.

![<3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awn7n0c2qhkelqpxjrcy.png)
How to generate random EMOJIs
Tags: random, emoji, fun, tools
Published: 2022-04-21 03:45:46

![Random Emoji Generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m1a1qbit2mx3oxbb9o05.png)

IF you've got wandered onto this article trying to find random emojis, you've got come to the proper place. I have identified  the Random Emoji Generator with the specific reason of making lists of random emojis. Using this loose on line device is easy. Simply imply the wide variety of emojis you need to be displayed, then click on at the generate button. The wide variety of emojis you asked will immediately appear.

While trying to find random emojis is not some thing this is usually carried out via way of means of maximum people, there are some of motives a person can also additionally need to do this. Below you may discover a few of the extra not unusual place motives others have used this generator withinside the past.

Here is a tool which helps to generate the Random Emojis.

[Random Emoji Generator](https://codebeautify.org/random-emoji-generator )

![10 Random Generated Emojis](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qipp7d0zuvw6tvqeudqf.png)

It's fun to play with emojis. https://codebeautify.org/random-emoji-generator
A Mail Command in Python - 03 Standard Input
Tags: python, beginners, tutorial
Published: 2022-04-21 03:33:00

Welcome back! At this point we have our command line flags all ready to go. The next thing we need is to be able either pipe in input from stdin or enter it in manually. Both of these things are the same thankfully.

Python has an input function that we can use like:
```python
anything = input()
print(anything)
```

This will take in one line of text. However we want to feed in any number of lines into our program. To do this, we can read from stdin from python through the sys module.

```bash
#!/usr/bin/env python3
import argparse
import sys

def main():
    ...
    args = parser.parse_args()

    body = []
    for line in sys.stdin:
        body.append(line)
    body = "".join(body)

    print(args)
    print(body)
```

Here we will loop through the standard input until a ctrl D. The ctrl D is a character that will trigger a flush of the input and will let our program continue.

We read each line into an array and then join it together. You should notice that we delimit our array with a null string, this is because the new line characters will be part of input already, so don't need to add it in manually.

Now we can do the following:
```bash
> ./pymail -s "A body" -c test@example.com -c another@example.com -r nivethant@example.com -t another_to@example.com nivethan@test.com
Hi!
Namespace(attachment=[], cc_address=['test@example.com', 'another@example.com'], from_address='nivethant@example.com', html_flag=False, subject='A body', to_address=['another_to@example.com', 'nivethan@test.com'])
Hi!
```

This let's us supply a body where we run out python mail application. We use the ctrl D to finish our input.

We can also run our program by piping in the body:

```bash
> echo "Hi!" | ./pymail -s "A body" -c test@example.com -c another@example.com -r nivethant@example.com -t another_to@ex
ample.com nivethan@test.com
Namespace(attachment=[], cc_address=['test@example.com', 'another@example.com'], from_address='nivethant@example.com', html_flag=False, subject='A body', to_address=['another_to@example.com', 'nivethan@test.com'])
Hi!
```

Voila! We can now have an e-mail body. The next step is to write our mail function. Once we do that we can glue our main function which is our command processor and our mail function which handles the actual mailing of things.

Onwards!
How view branches sorted by date in specific format and order
Tags: git, github, webdev, tutorial
Published: 2022-04-21 03:13:20

**This a short tutorial from a git tricks series**.

Let's know how we can list all branches sorted by date.


### View branch sorted by date

display a list of all local branches and sort them based on the date of their last commit.

    # sort desc (-committerdate)
    git branch --sort=-committerdate

    # sort asc (committerdate)
    git branch --sort=-committerdate

If you’d like to make a custom format you can use `for-each-ref` with `--sort ` option and `--format` option to write your format.

    git for-each-ref --sort='-committerdate' --format='%(refname)%09%(committerdate)' refs/heads

In the above command, I print the refname first then commitdate in --format option the output will be like this

    refs/heads/branch_name commitdate
    refs/heads/branch_name2 commitdate

    # real output
    refs/heads/new_design   Wed Apr 20 12:24:21 2022 +0200

    refs/heads/design_assets        Wed Apr 20 11:30:30 2022 +0200

If you want to print the `date` first then `refname`, the option format will be like this `--format='%(committerdate)%09%(refname)%'`

Let’s say you don’t want to print refs/heads and want print just the **branch** name each time, how we can do this? by using `sed `.

    git for-each-ref --sort='-committerdate' --format='%(refname)%09%(committerdate)' refs/heads | sed 's-refs/heads/--'

    #output
    branch_name commitdate
    branch_name2 commitdate

    #real output
    new_design      Wed Apr 20 12:24:21 2022 +0200

    design_assets   Wed Apr 20 11:30:30 2022 +0200

I find these commands incredibly helpful when returning to work from a weekend or just jumping from project to project. Hopefully, you can use these commands too!
 
If you found this post useful please share it with your friends 😍

Let’s connect on [LinkedIn](https://www.linkedin.com/in/abdlrahmansaber/), [Twitter](https://twitter.com/Abdlrahmansabe4)