teleren/devto huggingface dataset:
#1 Dummy Content Generator for WordPress and woocommerce
Tags: wordpress, plugin, programming, webdev
Published: 2022-05-30 14:59:37

Are you a wordPress developer looking for a plugin with which you can generate dummy data. There might be a case that you are creating a custom theme or module which needs some dummy posts, dummy users, dummy custom post data or even dummy woocommerce products.

If you have such requirement then this free plugin can help you alot and make your development faster with few clicks.

Try this free plugin:

https://wordpress.org/plugins/wp-dummy-content-generator/

If you have any query suggestion then you can head to the review section and raise your ticket.

https://wordpress.org/support/plugin/wp-dummy-content-generator/

Review the plugin to support the future development.

https://wordpress.org/plugins/wp-dummy-content-generator/#reviews
comment je choisis un système d'authentification quand j'ai un projet pour laravel ?
Published: 2022-05-30 14:59:19

Pour le début on avait le gros laravel ui qui est un peu abandonné actuellement donc je refoule ☺ . 
1 )**<u> Laravel breeze  </u>**
Laravel breeze fait partie de l'écosystème laravel pour l'authentification . Pour moi il a été conçu spécialement pour remplacer laravel ui , au passage je ne suis pas le seul à raconter .  Je choisis laravel breeze lorsque je sens un projet basique c'est-à-dire nom ,prénom,email,password après on peut customiser à notre goût mais ça reste pour moi l'arme utile pour les projets assez simple . 

2 )**<u> Laravel Jetstream </u>**
Laravel jetstream , c'est le bulldozer . je choisis d'utiliser jetstream dans un projet pour une raison  . Lorsque je pense que le projet est de grand taille et que je souhaite pas écrire forcement une Api pour  consommer ensuite avec un front vue ou react . après on doit faire attention à respecter les best praticice qui recommande d'écrire des apis et ne pas tomber dans l'amour de jetstream pour la faciliter. 


3 )**<u> Laravel fortify </u>**
Jetstream n'offre pas de stack api comme breeze où lors de l'installation vous pouvez décider d'aller sur un projet complet ou juste api . On aborde donc Laravel fortify . 
Laravel fortify c'est le frère jumeau de Laravel jetstream pour moi . Je choisis pour les mêmes raisons , seulement lorsque je pense consommer le front avec vue , react ou autre . Pour ceux qui savent déjà , c'est la raison principale de fortify ( de faciliter l'authentification des grosses applications avec déjà des préconfigurations établies) . 

4 )**<u> Laravel sanctum</u>**
Pour utiliser laravel sanctum , je me base sur les critère définis sur le site de laravel (v9 actu) <u>https://laravel.com/docs/9.x/sanctum</u> . N'hésitez pas à consulter
Using Curl on VS Code
Tags: curl, api, rest
Published: 2022-05-30 14:57:00

## Making GET Requests with Curl
`Curl`, short for Client for URLs, is a command line tool that allows us to transfer data to and from a server. It is free and open-sourced. It supports multiple protocols, including HTTP. Find out more at [curl documentation](https://curl.se/) or their [source code](https://github.com/curl/curl)

### Why use Curl?
`Curl` provides an easy way to make requests to a server from the command line or from inside a script. It is especially helpful for testing APIs while building applications because making a request with curl allows you to hit endpoints for which the corresponding user interfaces do not yet exist.

We can easily use curl on any CLI.
```
curl http://www.google.com
```

Or we can install extensions for better visualization:
## Steps:
###1. Install REST Client 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/asvqfuh2v0alpuipiiv1.png)

###2. Create/Open a new File
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gu2bxs58zwlvz02h4q80.png)

###3. Ctrl+Shift+P and Change Language Mode to HTTP
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3sp6r1oa3xevp3dewip9.png)
 
###4. Type in curl commands and start requesting!
```
curl --request GET www.google.com
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l5ieyixx9c37g20wwc06.png)

###5. Other Alternatives
- [Thunder Client](https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/55dgopwnqqaq6n0qotuz.png)
Someone wrote a nice article [here](https://developers.refinitiv.com/en/article-catalog/article/how-to-test-http-rest-api-easily-with-visual-studio-code---thund)
- [Postman](https://www.postman.com/)
- [Insomnia](https://insomnia.rest/)
Ng-News: Episode 22/21
Tags: angular, javascript, webdev, programming
Published: 2022-05-30 14:52:01

This is a weekly posting, covering the latest updates from the Angular community.

{% embed https://youtu.be/qr9B2g33mhw %}

## Angular's Vision for the Future

Madleina Scheidegger from the Angular team published an article where she summarized all the latest developments and gave an outlook for the near future.

As already mentioned in former episodes, after typed forms and standalone components are available, the Angular team will improve SSR and provide content about MicroFrontends.

{% embed https://twitter.com/angular/status/1529205600315375620 %}

[Link to the Article on medium.com](https://blog.angular.io/angulars-vision-for-the-future-3cfca5e7b448)

## Angular Internationalization

Mark Thompson, also from the Angular team, released a video on YouTube about internationalization.

This is an interesting topic because the build-in or the official feature does it during the compilation time and community libraries like Transloco or ngx-translate follow a runtime approach.

According to Mark, Angular chose the "compilation strategy" because users will not change the language often, the bundle size is smaller, and it doesn't decrease Angular's performance during the runtime.

{% embed https://youtu.be/KNTN-nsbV7M %}

## This is Angular guides

In the last episode, I missed mentioning the release of "This is Angular guides". This new website covers quite a lot of topics around Angular and already contains a collection of articles about the upcoming Standalone API.

{% embed https://twitter.com/Thisis_Angular/status/1407658458535677953 %}

[Direct Link](https://this-is-angular.github.io/angular-guides/)

## TypeScript 4.7

TypeScript got a minor version upgrade to 4.7. Most of the new features center around support for ES Modules. From an application developer's perspective, the main addition was the improved support of type inference for accessing properties via indexed keys. With a type guard place, TypeScript 4.7 infers the type correctly.


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


[Release Notes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/)
Clojure Tutorial Part 2 -- 四則演算
Tags: clojure
Published: 2022-05-30 14:33:54


## 参考

https://clojure.org/guides/repl/basic_usage

Clojure 公式の基本的な使い方のページの前半。

---

# 数値計算

## clojure の四則演算の特徴

https://clojure.org/guides/repl/basic_usage#_evaluating_clojure_expressions

+, -, * , / の四則演算が Java や JS とは大きく異なる

足し算の例だと

( + 数値A 数値B 数値C 数値D ... )

の形で

((( 数値A + 数値B ) + 数値C ) + 数値 D ...)

という計算になる

https://alraku.com/calculation/2454/

> 先頭の引数を残りの引数で割った数値が返り値となります。

このような Lisp と同じ計算方法が使われる。

https://github.com/clojure/clojure/blob/clojure-1.10.1/src/clj/clojure/core.clj#L984

なお、JS などの算術演算子のように見えるが
ソースコードを見ると defn で定義されているように、
**実態は可変長の引数をとる関数**である

---

## 単体の数値出力

```clj
user=> (+ 1)
1
```

` + ` で加算計算することを宣言し
空白を開けて数値を渡す。

```clj
( + -4 )
-4
```

マイナスの数値を渡すこともできる。

```clj
( + )
0
```

加算、乗算なら数値は渡さなくてもエラーにならない
減算、割算はエラーになる。

---

## エラーになる出力

```clj
( 1 )
```

数値のみではエラーになる。数値計算の宣言が必要。

```clj
( +1 )
```

足し算宣言と数値の間に空白が入っていないのでエラーになる。

---

## 加算 -- (((A+B)+C)+D) 

```clj
( + 1 2 3)
6
```

数値を増やしていけば、全て加算してくれる。

しかし内部的には `( 1 + 2 ) + 3 ) = 6` になっている

---

## 減算 -- (((A-B)-C)-D) 

### ( 1 - 2 ) - 3 をするために

```clj
( - 1 2 3)
-4
```

`-1 -2 -3 = -6` になるかと思いきや
`( 1 - 2 ) - 3 =  -1 -3 = 4 ` になっている

```clj
( - 1 2)
-1
```

順番に計算していく

### -1 -2 -3 をするために

```clj
( - -1 2 3 )
-6
```

最初の引数さえ -n にすれば全て減算できる

```clj
( - 1 - 2 )
Execution error (ClassCastException)
at user/eval5 (REPL:1).
```

マイナスと 1 の間を離すとエラーになる。

1-1+2-2 のような計算は一度にはできない。

---

## 掛け算 -- ( A x B ) x C )

```clj
( * 2 3 )
6
```

`2 x 3 = 6`

```clj
( * 2 3 3 )
18
```

`( 2 x 3 ) x 3 ) = 18`

になる。

---

## 割り算 -- ( A ÷ B ) ÷ C )

```clj
( / 2 3 )
2/3
```

`2 ÷ 3 = 2/3`

```clj
( / 2 3 3)
2/9
```

`( A ÷ B ) ÷ C ) = 2/9`

準に割る処理をしていく。

引き算と同じロジック。
Selenium Testautomation on Windows Desctop App with Winium (Java)
Tags: selenium
Published: 2022-05-30 14:27:37

 


https://github.com/2gis/Winium 

Winium = Windows + Selenium
open source
works with all WebDriver compatible languages (Java, Python, ..) 
only for client-based applications on Windows (not IOS or Linux) 


##Prerequisites

Microsoft .NET Framework 4.5.1
Winium.Desktop.Driver.exe

Some other dependencies that are downloaded using the Maven file, as mentioned in the POM file below:

[add dependencies to pom-file ](https://github.com/2gis/Winium/tree/master/java) 

[download winuiumDriver from github](https://github.com/2gis/Winium.Desktop/releases)
appPath:put it somewhere in the windows explorer 

##Code
By initiating the Winium driver using the Winiumdriver class, we are passing the Winium server URL and the path of our desktop application on which automation is intended to be carried out.

The server URL is obtained by clicking on the Winium.desktop.driver.exe that was downloaded.

```java
... throws MalformedURLException

DesktopOptions desktopOptions = new DesktopOptions();
desktopOptions.setApplicationPath(configFileReader.getAppPath());	desktopOptions.setKeyboardSimulator(KeyboardSimulatorType.BasedOnWindowsFormsSendKeysClass);
//winiumDriver with URL:: localhost:9999, every call we make goes through this driver .... 
winiumDriver = new WiniumDriver(new URL("http://localhost:9999"), desktopOptions);

```

By initiating the Winium driver using the Winiumdriver class, we are passing the Winium server URL and the path of our desktop application on which automation is intended to be carried out.

## 3 conditions
[path to winium driver and setup](https://github.com/2gis/Winium.Desktop#quick-start)
start winium driver (dobbleclick) 
run tests



##how to inspect the Desctop Desctop Elements (or Java Forms based)? 

inspect.exe to identify the element locators in Windows applications.
https://kb.froglogic.com/squish/howto/getting-information-toolkits-gui-controls-windows/
We can identify the element using the name, ID and xpath.

all in all: 
[The] (https://www.xoriant.com/blog/winium-automation-testing-tool-for-windows-desktop-apps) main difference between Selenium and Winium is that selenium automatically creates its session on localhost with a unique port, but in Winium, we have to create sessions manually through its exe file. Besides this, running an automation service through Winium needs the user to run a local server that supports the script, i.e., Winium server, whereas automating windows applications using Selenium does not require such efforts. The driver it will open by default with port 9999 which acts as a server.

Internally this server will communicate through JSON Wireless Protocol

[![Winium Way to Webside](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p3nd59v9vfz142ydoy2f.png)](https://www.zucisystems.com/blog/winnium-a-step-by-step-guide/)
How to remove empty lines in Visual Studio Code?
Tags: tutorial, beginners, programming, productivity
Published: 2022-05-30 14:26:18

In this article, I will teach you how to remove extra empty lines of your code in Visual Studio Code.

I had a long json file with lots of extra white spaces in it and I wanted to remove all the whitespace from the json file. So, I searched a bit on the internet and found a cool trick to remove all the whitespace from your code.

So, to remove all the whitespace you need to find `\n\n+` and run `replace all` to replace it with `\n` and you removed all of the whitespaces in the file.


![replace whitespace](https://cdn.hashnode.com/res/hashnode/image/upload/v1653915756586/K1IDXgis7.png)

> Note: Make sure to select the `Use Regular Expression` option

![regex_option select](https://cdn.hashnode.com/res/hashnode/image/upload/v1653915908753/otGe1tBaR.png)

### Let's Connect

- Twitter - [@codewithsnowbit](/twitter)
- GitHub - [@codewithsnowbit](/github)
- [Support my work](/supportme)
Summary of Flutter vs Tauri
Published: 2022-05-30 14:24:37

Last week we posted [a discussion on the selection of Flutter and Tauri on GitHub](https://link.zhihu.com/?target=https://github.com/rustdesk/rustdesk/discussions/533), and we are glad that both the author of Tauri and the author flutter_rust_bridge have participated. In the end, the voting score of Tauri is higher. Although we favored Tauri originally, but we still choose Flutter for the time being due to the poor IPC performance of Tauri. I will summarize the discussion, hope it can help you choose between Flutter and Tauri in your future job.

## Pros of Tauri:

- Tauri ecosystem is richer, with massive resources of html/css/js
- Tauri community is awesome
- Tauri is based on the browser kernel which is more mature than Flutter in the desktop environment
- Tauri is simpler, easier to build, easier to learn, and easier to get more contributors
- Simpler integration with Rust, even you can call Rust async functions (I haven't tried it)
- Smaller application after compilation

## Cons of Tauri:

- IPC performance is not good (The author of Tauri mentioned the reasons for discarding shared memory support mentioned in the discussion, as well as the problems of IPC, and incomming optimizations, but I can not find it any more)
- Due to the use of the browser kernel, bigger memory footprint. There are also browser compatibility issues on different platforms.
- Win7 without WebView installed is a trouble. You can make a big package yourself, or you can install it online, which are not very friendly.
- Not support mobile. The author mentioned that the mobile version will be launched this year. It is said to be based on EGUI, but there is still a long way to reach stable version.

## Pros of Flutter:

- The ecosystem is also rich
- Desktop + mobile
- Good FFI performance
- Supported by Google

## Cons of Flutter:

- 32-bit Windows are not supported, Google has explicitly stated that they won't support 32-bit Windows.
- Building, debugging, and integration with Rust is a bit more complicated
- The final package is slightly larger, a `hello world` under Windows is 20MB, after zip compression it is 8.36MB, similar size under Linux
- No static link library
Transforming business with IoT
Tags: iot, technology
Published: 2022-05-30 14:22:11

The adoption of the [**Internet of Things (IoT)**](https://ai-techpark.com/iot/)  is continuously accelerating. How do you leverage this technology for your business?

Technology is now ingrained in our daily lives, influencing everything we do. We are all entering an Internet of Things (IoT) world that benefits everyone by assisting our daily lives and keeping us connected to the things and people that matter to us. The Internet of Things is offering smart technologies to make our lives easier. It has a critical role to play in improving corporate procedures.

Are you curious about how the Internet of Things is changing businesses? Dive in to gain insights! 

**IoT offers a variety of benefits to businesses. Here are a few of them:
**
**1) IoT boosts productivity and efficiency** - IoT collects data about processes in any industry, allowing them to improve rapidly. Business leaders can use IoT to connect a company’s operations and get a holistic view of the consequences of combined activities.

**2) IoT reduces expenses and downtime** - The Internet of Things links devices and keeps business-critical data flowing through networks. It enables smart inventory management, waste management, and cost reduction.

**3) IoT boosts asset tracking and reduces waste reduction** - Whether items are stacked in warehouses or are on the move, IoT has a lot of potential for waste minimization and asset tracking. Businesses may then track assets and regulate machinery using smart sensors.

**4) IoT offers better Business Insights and Customer Experience** - A higher volume of data is being streamed with more linked devices and equipment in numerous industries, with the possibility for enhanced analytics.

Read More On Website @ [**Transforming business with IoT**](https://ai-techpark.com/transforming-business-with-iot/)
O que são Higher Order Functions?
Tags: javascript, beginners, braziliandevs
Published: 2022-05-30 14:16:20

**Higher order functions(funções de ordem superior) são funções** que aceitam outra função como paramêtro(callback) ou retornam uma função.

## Callback
Funções callback são as funções passadas como paramêtro.

Um método de arrays chamado forEach() aceita callbacks:

```js
const numbers = [5, 25, 50]
function sumArray() {
    // declarando variável acumuladora
    let sum = 0
    numbers.forEach(element => {
        // função callback
        // element é cada elemento do array numbers
        sum+=element
        // que vai ser somado e guardado na variável sum
    });
    console.log(`\nTotal: ${sum}\n`)
}
```
Outra higher order funtcion importante é o setInterval()
```js
setInterval(sumArray, 3000)
```
A cada 3 seg o setInterval ira executar o callback sumArray

## Retornando uma função como valor
Exemplo 1:

```js
function higherOrderFunction() {
    console.log("Hello!");
    return function (y){
        console.log("Good bye!");
    }
}
```
Se chamamos a função normalmente:
```js
higherOrderFunction();
// vai imprimir apenas "Hello!"
```
Podemos armazenar em uma variavel para **guardar o retorno da função**
```js
const higherOrder = higherOrderFunction();
console.log(higherOrder());
// Hello!
// Good bye!
```

Exemplo 2:
```js
function higherOrderFunction(x) {
    return (y) => y + x;
    // retornando uma função arrow que faz a soma com os argumentos
}
```

Aqui o primeiro paramêtro pertence a higherOrderFunction e o segundo é da função que está sendo retornada:
```js
higherOrderFunction(1)(2);
// 3
```
ou
```js
const higherOrder = higherOrderFunction(1)(2);
```



<br><br>
**Isso é tudo, até a proxima!**
What, Why! Always know the "What" and "Why".
Tags: programming
Published: 2022-05-30 14:14:02

Sometimes we as programmers tend to just do stuff for the sake of completing a task which is fine in most cases but sometimes we do something without enough knowledge and break our production servers. Yes, sad but true, we do that sometimes.

In today's quick blog post I just want to emphasise on one thing: Always, always know what are you doing and why are you doing that.

I will try to paint the picture with some real life examples.

In our day to day work we sometime encounter ourselves where we have to use a software and tweak it's configurations according to our needs. These configs are generally a common place where we seem to just bypass and do what we find first.


![What, why?](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5f525qhj6tnmt5qdt9o.jpg)

The most common example I can think of right now is configuring a web server according to your needs. Usually we tend to just goolge for our needs and copy-paste the first stackoverflow result.

For example tweak a lot of configs for an nginx [FastCGI](https://en.wikipedia.org/wiki/FastCGI) to name a few buffers, it's size param etc etc. But before you touch that piece of code make sure you know what FastCGI is, what buffers are and what does it really mean to change these configs.

Another example, supervisor configs.

If you have ever used supervisor (if not read [here](http://supervisord.org/)) you'll know we have to configure it how it should consumer or run a command. And we can provide options like:

- --limit = X
- --memory-limit = Y
- --time-limit = Z

All these configurations actually have a very meaningful impact on how supervisor should treat a command.

So before you try to tweak anything in your configurations make sure you give it a few minutes to read about it and you should know why you are doing it.
Roman to Integer
Published: 2022-04-06 02:51:38

This one is similar to the Integer to Roman one, but it has some differences.

Let's begin by creating a map of our values as we will need to be able to reference these later. When we have this map handy, we can reference it when looking at every letting in the string. Here's a few string examples to keep in mind too: XIX, 	XI which is 19 and 11. 

```
function romanToInteger(string) {
 let map = {
     I: 1,
     V: 5,
     X: 10,
     L: 50,
     C: 100,
     D: 500,
     M: 1000,
 }
```
Next we will loop through the string and assign each letter as either current or next. 

In XI, or 11, the current is X and the next is I.

If the current letter is greater than the next, we can add it to our result normally.

In the case of XI, we can add 10 and then next, which is 1 and get 11. 

If the current letter is less than the next one, as is the case in 20, XIX, we want to subtract the next element by the current element.

So, imagine this. Looking at XIX, current is X and next is I. Since X is greater then I, we add X. Then we look at I and X, the current isn't greater than the next, so we add the values of next minus the current or 10 - 1. 

This gets up to 19.

```
function romanToInteger(string) {
 let map = {
     I: 1,
     V: 5,
     X: 10,
     L: 50,
     C: 100,
     D: 500,
     M: 1000,
 }
  let result = 0
  for (let i = 0; i < string.length; i++) {
   let current = map[string.charAt(i)]
   let next = map[string.charAt(i+1)]
    if (current > next) {
   result += current
  } else {
   result += next - current
   }
  }
}
```
This should handle most cases except for the last case, which is when we are at the end of the string and there are no more next elements to review.

In this case, we wrap all the if statements under a new if statement, that says as long as there is a next statement, run these if statements.

```
function romanToInteger(string) {
 let map = {
     I: 1,
     V: 5,
     X: 10,
     L: 50,
     C: 100,
     D: 500,
     M: 1000,
 }
  let result = 0
  for (let i = 0; i < string.length; i++) {
   let current = map[string.charAt(i)]
   let next = map[string.charAt(i+1)]

    if (next) {
    if (current > next) {
   result += current
  } else {
   result += next - current
   }
  }
 } else {
  result += current
 }
return result
}
```

And there we've got it folks.
Dear New Developer,
Tags: beginners, devops, webdev, programming
Published: 2022-05-30 14:08:51

I will tell the some few points,
Don't try the copy of anyone it's not help to server on this world make your own content
When starting out in tech, understand that your work or what you've built won't be perfect. Sometime it's heard to understand the concept but you will have to try and increase your self knowledge Hence, when you outgrow every stage, you'd always look back and see the mistakes you made starting out. Lots of time we are doing mistake but still we have to try and lean for our mistake.