teleren/devto huggingface dataset:
HEIC I Hardly Knew Ye
Tags: powershell, tutorial, productivity
Published: 2022-08-18 03:59:00

I’d be amiss if I told you I knew exactly how the HEIC image format worked. It’s higher quality with a smaller file size or something, but I digress. I’m sure it has its benefits, but for me, your average guy who just sends you a picture of his dog every now and then, I don’t really see them. I’m also not a guy who gets pedantic about what file format he stores his dog pictures in; I don’t think about it. And that’s where HEIC crossed me: it made me think about it. 

You see, the iPhone camera app defaults to saving images and videos in HEIC formats nowadays, which isn’t that big of a deal until you try and do something complex, like, I don’t know, try and upload an HEIC image you took on your iPhone to iCloud on the web. 


![iCloud HEIC error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7l4nj6xip6wtx260enl.png)

This kind of pissed me off as I was trying to upload a few hundred photos I pulled off an old iPhone to iCloud. This process turned out to be kind of a headache, which, to be fair, is more a failing of Apple than HEIC, but it was caught in the crossfire anyway. Ragging on Apple aside, Windows 10 also requires you install some codecs from the Microsoft Store for HEIC photos and videos to properly integrate with the operating system. 

For future reference, if you want to avoid this headache and just bypass HEIC until it’s garnered more software support you can tell your iPhone to just save in JPG and MOV again by going to Settings -> Camera -> Formats -> Most Compatible. But, if you’re like me, and have already taken an annoying number of photos that were saved in HEIC format, I have a PowerShell script for you. 

```powershell
[CmdletBinding()]
param (
    [parameter(mandatory = $true, position = 1)]
    [string]$convertFromDir
)

$files = Get-ChildItem -Path $convertFromDir -Filter *.heic

$convertedDir = New-Item -Name HEIC2JPG -Path $convertFromDir -ItemType directory

foreach($file in $files) {
    $newJPGFile = $file -Replace '\.heic$', '.jpg'
    magick $convertFromDir\$file $convertedDir\$newJPGFile
    Write-Host "Converted $file to HEIC2JPG\$newJPGFile"
}
```

You’ll need to have ImageMagick installed and in your path to do the conversions. The script takes one argument: a directory path containing the .heic files you’d like to convert. Once run the script will find all .heic files in the provided directory, convert them to JPG with ImageMagick, and put them in an “HEIC2JPG” folder. 

For example:
`./Convert-HEIC2JPG.ps1 c:\users\ethan\downloads\photos\`

Hopefully this saves you some headache.
How to build complex UIs with Flutter for beginners
Tags: flutter, mobile, android, dart
Published: 2022-08-18 03:52:34


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aeu1fw9fxk236iql7piq.png)
Understanding how to build UIs in flutter can be very confusing for beginners.

In my opinion, Flutter is the easiest framework for building UIs, though there are no drags and drops, every component is coded. I think this is where most beginners find it difficult.

We will be explaining how every single component is built, how to understand UI structures and draw them. We will also make sure they are responsive, that is they can fit to different mobile screens.

We will not be drawing for the web in this series. We will also do a YouTube series on it. I encourage you to stay with us on this series, at the end you will be able to comfortably draw complex UIs on your own.

As we begin the series, you can ask your questions, github link will be made available for download. We will start with a simple screen to complex ones.

Thanks for reading, we will start in the next article.
An info on my upcoming blogs
Tags: general, information
Published: 2022-08-18 03:36:00

Hi all. 👋
I have been writing blogs ✍️ for sometime now and I've decided 🤔 to use my own blogging site to host my blogs. I hope the community would be supportive enough to visit my site. 🤗
I will keep uploading posts with their title and links to my blogging site here on **Dev** though. 👀
I've already migrated my existing blogs on my site. You can check the site my visiting this link. 👇️
[https://biplabdutta.com.np/](https://biplabdutta.com.np/)
Sherlock and the Valid String
Tags: javascript, hackerrank
Published: 2022-08-18 03:35:00

```
function isValid(s) {
  let hash = {};

  for (let i = 0; i < s.length; i++) {
    let key = s[i];
    if (hash[key]) {
      hash[key]++;
    } else {
      hash[key] = 1;
    }
  }

  let frequencies = [];
  for (let key in hash) {
    frequencies.push(hash[key]);
  }

  frequencies.sort();
  let first = frequencies[0];
  let second = frequencies[1];
  let secondLast = frequencies[frequencies.length - 2];
  let last = frequencies[frequencies.length - 1];

  // If first and last are same, then all frequencies are same
  if (first == last) {
    return "YES";
  }
  // If first is 1, and all other characters have 1 frequency
  if (first == 1 && second == last) {
    return "YES";
  }
  // If all are same and last character has just 1 extra count
  if (first == second && second == secondLast && secondLast == last - 1) {
    return "YES";
  }
  // else NO
  return "NO";
}

```
Incredibly Useful Ruby on Rails You Need to Know
Tags: ruby, rails, webdev, programming
Published: 2022-08-18 03:33:19

There are many kinds of technology to build websites and mobile applications. One of the simple and easy to use is Ruby on Rails. Ruby on Rails is an open-source web application framework. It extends the Ruby Programming language. This is well known for RoR. The Ruby-based framework is five to 10 times faster than comparable Java-based frameworks. Thus, many developers and programmers enjoy using RoR. Big and famous companies use this technology to develop their products. Let’s say Zendesk, Github, Shopify, Ask.fm, and SoundCloud.

## Ruby’s History

In 1955, Ruby was created by Yukihiro Matsumoto in Japan. He made Ruby in order to deliver programming more productive and fun by putting human needs than computer needs. In 2004, Ruby became familiar worldwide. Furthermore, Ruby has a Model View Controller structure and three developments that are quite handy for website developers. Here is another incredibly useful RoR you need to know.

## Suitable for all business types

Startup business, small and medium enterprises, enjoy using Ruby on Rails. It is because of its speedy and agility of website development. Ruby on Rails is a full-stack framework that covers both front- and back-end design. It is designed for general purpose needs. Ruby on Rails is easy to use to develop an eCommerce site, education site, content management, and fintech website and mobile application. Hence, RoR is suitable for any type of business industries.

## Multi-language support

Although RoR is based on Ruby, it has multiple language support in its backends such as HTML, CSS and JavaScript, RoR can perform smoothly across multiple web formats without fail.

## Test automation

Another reason that Ruby on Rails is a good recommendation is it has test automation. This test automation helps the developer to do testing. Ruby and Rails are also simple platforms to debug and customize the existing code. Thus, it supports test automation.

## Having a large community

A community helps your work, whether it is online or offline. There is a big community of Ruby on Rails developers. Hence, you don’t have to worry about difficulty in learning and solving your RoR’s work. You can google it, and you will find a hundred solutions. It ensures the RoR keeps updating.

In sum, Ruby on Rails is not only easy to use but also has other language support to help the backend developers. Besides, it has a community that allows you to have a discussion with others. You can also implement this RoR on all business types.

More resources:
[Flutter vs React Native: Draw or Lose?
](https://www.emveep.com/blog/flutter-vs-react-native-future/)[Best Web Development Guide in 3 Minutes
](https://www.emveep.com/blog/best-web-development-guide-in-3-minutes/)[Programming Languages: Android & iOS Apps Development](https://www.emveep.com/blog/most-used-programming-languages-2022/)
考古--operator 為什麼翻譯為『運算子』
Tags: 翻譯, c, cpp, python
Published: 2022-08-18 03:29:00

大部分的程式設計教材都會將 operator 翻譯為『運算子』, 我自己對於『子』一直覺得很疑惑, 倒底是什麼意思？有些人會說這個『子』就跟『帽子』、『鞋子』等等中的『子』一樣是個語尾綴詞, 沒有什麼意思, 不過運算子的『子』讀音『ㄗˇ』, 而不是語尾綴詞的『ㄗ˙』, 並不是同一個意思。

因為不得其解的緣故, 所以過去我個人偏好將 operator 翻譯為『運算器』, 取 er、or 字尾為做什麼事情的『人』或『器具』的意思, 但因為這樣的譯法和一般通用的『運算子』不同, 所以也有不少人表達無法接受的意見, 但卻也說不出翻譯為『運算子』的理由。

最近查閱《遠流中文活用大辭典》, 發現[在『子』字的解釋](https://lib.ctcn.edu.tw/chtdict/content.aspx?TermId=14428)中, 有這樣一條：

>  名  （05）稱某種職業之人。例：學子、舟子。

其中『學子』是大家廣為熟知的詞, 在[《國語辭典簡編本》中的解釋](https://dict.concised.moe.edu.tw/dictView.jsp?ID=28518&q=1)就是：

> 學生、求學的人。

而『舟子』可能大家並不一定聽過, 在[《重編國語辭典修訂本》中的解釋](https://dict.revised.moe.edu.tw/dictView.jsp?ID=115700)如下：

> 船夫、梢公、水手

也就是操舟的人。因此, 『子』字在漢文中本來就有『做什麼事的人』的意思, 依此脈絡, 將 operator 譯為『運算子』就很合理了。

不過到了現代, 大部分人 (像我就是) 可能已經不知道『子』的意思, 所以程式語言中比較近代才出現或是流行的語彙, 就不大會用『子』字, 舉例來說, Python 中常常出現的 iterator 和 generator, 通用的譯法為『迭代器』(簡體字的世界有人譯為『迭代子』) 與『生成器』, 是用『器』字, 而不是用『子』字。藉由『子』和『器』的區別, 也可以大概知道這個詞彙的年代遠近。

瞭解『運算子』的可能源由後, 回頭過來看 operand 譯為『運算元』的『元』字, 我想比較合理的說法可以參考[《遠流中文活用大辭典》裡的這個條目](https://lib.ctcn.edu.tw/chtdict/content.aspx?TermId=4925)：

>  形  （04）基本的。例：元素。

『運算元』應該是取用來運算的『元素』之意。在日文中, 將 operator 與 operand 譯為『[演算子](https://ja.wikipedia.org/wiki/%E6%BC%94%E7%AE%97%E5%AD%90)』和『[被演算子](https://ja.wikipedia.org/wiki/%E8%A2%AB%E6%BC%94%E7%AE%97%E5%AD%90)』, 沒有幫 operand 另創一詞, 也算是很直白的譯法, 簡單明瞭, 就是『被拿來運算的東西』, 不過中文除了現在大家流行的『被自殺』、『被消失』這些新興詞彙外, 很少用『被』字, 否則偷懶一點的譯法就是把 operand 譯為『被運算子』了。
React A JavaScript library for building user interfaces update
Tags: react, javascript
Published: 2022-08-18 03:03:56

<p><em>React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.</em></p><h3><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HwZXWekg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--cX1JQzsu--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_880/https://sharing-news-project.s3.amazonaws.com/cover-post/1654972522921.jpg" alt="React A JavaScript library for building user interfaces" height="937" width="880">Component-Based</h3><p>Build encapsulated components that manage their own state, then compose them to make complex UIs.</p><p>Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the&nbsp;DOM.</p><h3>Learn&nbsp;Once, Write&nbsp;Anywhere</h3><p>We don’t make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code.</p><p>React can also render on the server using Node and power mobile apps using&nbsp;<a href="https://reactnative.dev/" rel="noopener noreferrer" target="_blank">React Native</a>.</p>
Arity Of a Function
Tags: elixir, programming, tutorial, beginners
Published: 2022-08-18 02:53:00

Hey, Devs!

### Do you know what an arity of a function is?

In math, the arity of a function represents the number of arguments of a function.

On programming is not different, an arity is also the representation of the number of its positional params.

When we have a function:

- With **No arguments**, we say it has the arity 0 and can be called a **Nullary** function.

- With only **1 argument**, we say it has the arity 1 and can be called a **Unary** Function.

- With **2 arguments**, we say it has the arity 2 and can be called a **Binary** function.

- With **3 arguments**, we say it has the arity 3 and can be called a **Ternary** function.

- With **more than 3 arguments**, now we can be called according to the quantity of the arguments post-fixed with ``ary``.
Eg.: ``4-ary``, ``5-ary``, ``6-ary``.

Let's code with Elixir...

```Elixir
defmodule Example do
  def say(), do: "Hey I am here!"
  def say(name), do: "Hey #{name}, I am here!"
  def say(first_name, last_name), do: "Hey #{first_name} #{last_name}, I am here!"
end
```
The arity can be represented like that: **function/number of arity**

Eg.: When we executed the function ``Example.say/0``

```Elixir
Example.say()
--> "Hey I am here!"
# Arity: say/0
# -------------------
```

Eg.: When we executed the function ``Example.say/1``

```Elixir
Example.say("Diego")
--> "Hey Diego, I am here!"
# Arity: say/1
# -------------------
```

Eg.: When we executed the function ``Example.say/2``

```Elixir
Example.say("Diego", "Novais")
--> "Hey Diego Novais, I am here!"
# Arity: say/2
```

I hope that makes sense to you! And see you in the next content.

**Contacts**
Email: contato@diegonovais.com.br
Linkedin: https://www.linkedin.com/in/diegonovais/
Twitter: https://twitter.com/diegonovaistech
Bypassing Git Hooks
Tags: git, programming
Published: 2022-08-18 02:43:22

Git hooks are a useful mechanism for performing code quality checks in your local development environment before committing that code or pushing it up to a remote branch. A common quality check that a git hook can perform is running the project's code linter, such as [eslint](https://eslint.org/).

While it can be good practice to have these hooks configured within a project, at times they can be annoying when you're trying to share a work-in-progress branch with a team mate by pushing the changes to a remote branch. In such situations, they can feel like they're an impediment towards getting meaningful work done. 

A workaround to this (until you're able to come back and address those issues), is the `--no-verify` flag, which bypasses these hooks.

It's worth noting that because the use of `--no-verify` is not able to be suppressed entirely (as far as I'm aware), it's good practice to have the same checks that are performed by the git hooks also be performed as part of a continuous integration/continous delivery pipeline. Doing so will guarantee that code violating quality checks run by configured git hooks are always (eventually) addressed.
My Ubuntu essentials
Tags: ubuntu
Published: 2022-08-18 02:29:00

Here are my software essentials that I install immediately after a fresh Ubuntu installation:

- `baobab`: GNOME disk usage analyzer
- `curl`: command line tool for transferring data with URL syntax
- `deborphan`: program that can find unused packages, e.g. libraries
- `ffmpeg`: tools for transcoding, streaming and playing of multimedia files
- `flameshot`: Powerful yet simple-to-use screenshot software
- `jpegoptim`: utility to optimize jpeg files
- `jstest-gtk`: joystick testing and configuration tool
- `gimp`: GNU Image Manipulation Program
- `git`: fast, scalable, distributed revision control system
- `gitk`: revision tree visualizer
- `gparted`: GNOME partition editor
- `hardinfo`: Displays system information
- `htop`: interactive processes viewer
- `keepassxc`: Cross Platform Password Manager
- `localepurge`: eclaim disk space by removing unneeded localizations
- `locate`: maintain and query an index of a directory tree
- `meld`: graphical tool to diff and merge files
- `neofetch`: Shows Linux System Information with Distribution Logo
- `optipng`: advanced PNG (Portable Network Graphics) optimizer
- `remmina`: GTK+ Remote Desktop Client
- `simplescreenrecorder`: Feature-rich screen recorder for X11 and OpenGL
- `vim`: Vi IMproved - enhanced vi editor
- `vlc`: multimedia player and streamer

```
apt install baobab curl deborphan ffmpeg flameshot jpegoptim jstest-gtk gimp git gitk gparted hardinfo htop keepassxc localepurge locate meld neofetch optipng remmina simplescreenrecorder vim vlc
```
Life Of A 17 Year Old Techie🥂
Tags: beginners, productivity, career, devjournal
Published: 2022-08-18 02:11:00

MEET PRECIOUS😊
![Precious](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1fo3pv8wqtytc38nocg.jpg)



My name is Precious, I'm a front-end developer and social media manager. I’m seventeen years old, and I’m based in Lagos, Nigeria.

I have a lot of interests aside from coding some of which include: football, basketball, reading, singing, etc. I'm a PSG fan (because of Messi🐐), and my best basketballer is Giannis Antetokounmpo.

My tech career began on the 11th Of January 2022 
![journey](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eizivif6oxog77yhbcww.jpg)

but the first line of code I ever wrote was on the 3rd of November 2021 but I was not serious then😩.
![journey](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tg9dxxb2ameh5bu192qk.jpg)

After finishing secondary school last year, I was advised by my sister, Makuo who is a UI/UX designer to learn a tech skill. At first, I was reluctant but I later gave in. I didn't know what skill I wanted to learn at that point, so my sister asked if I would like to learn UI/UX but to me, it looked hard so I declined.

Then in December last year, she was making a website countdown to Christmas and that got my attention, then she told me about front-end development and I was interested in it. So anytime she wasn't using her laptop I took it to watch tutorial videos and practice too. This was in January and at that time Agba Akin was teaching front-end development on Twitter and I followed up with that.

Then along the line, I started going for JAMB lessons and so I practiced less. I told my best friend about tech and she is currently on her front-end journey while Zita another friend of mine is on her UI/UX career path.

Now let me talk about my social media management career👩‍💻 I applied for an internship at a company and I got accepted. I was assigned the role of handling their social media account and I had no idea how to do that but I was coached on how to go about it, so far it has been going well.

I want to start a career path in technical writing and within a few weeks, I'll write articles helping people to choose the right tech path and all that.

It could be hard to figure out the right path to take in tech and I hope to help you guys discover it in a few weeks.

Feel free to contact me via email: chibundumozia@gmail.com
Displaying asterisks when typing your password
Tags: ubuntu, linux
Published: 2022-08-18 02:06:00

I hate how some distros (Ubuntu) hides the typical asterisks character when typing passwords. On one hand it's more secure, but on the other the lack of feedback when typing is just too annoying.

To change it, run:

```
$ sudo visudo
```

On the open file, change from:

```
Defaults env_reset
```

To:

```
Defaults env_reset,pwfeedback
```
Separate the Numbers
Tags: javascript, hackerrank
Published: 2022-08-18 02:03:45

```
function separateNumbers(s) {
  let subString = "";
  let isValid = false;
  if (s.length === 1) {
    console.log("NO");
  } else {
    for (let i = 1; i <= s.length / 2; i++) {
      subString = s.substring(0, i);
      let num = BigInt(subString);
      let validString = subString;
      while (validString.length < s.length) {
        validString +=BigInt(++num);
      }
      if (s === validString) {
        isValid = true;
        break;
      }
    }

    if (!isValid) {
      console.log("NO");
    } else {
      console.log("YES", subString);
    }
  }
}
```
Rust For Big Data!
Tags: programming, bigdata, opensource, showdev
Published: 2022-08-18 02:01:16

The Rust Language Integration to Big Data Solutions!

Rust is a language empowering everyone to build reliable and efficient software.

"All the documentation, the tooling, the community is great - you have all the tools to succeed in writing Rust code." - Antonio Verardi, Infrastructure Engineer.

This publication on Medium is an accumulation of possibilities to use the Rust programming language with alternative solutions in Big Data scenarios.

To know more:

https://jlgjosue.medium.com/rust-for-big-data-40fc48df9703

Thanks for reading; share this post! :)
Serious SQL during Summer 2022 & free
Tags: sql, docker, beginners, tutorial
Published: 2022-08-18 01:39:00

I was looking to improve my SQL and I found this gem that I want to share. This is in a nutshell:

**SQL to work with: ranking, join & data mining.**


First Step: 
https://8weeksqlchallenge.com/getting-started/

This website I agree is not the most easy to navigate, but browse to the link and search for **"Case Study #1 - Danny’s Diner"**. Click on the article and you will see the **"DB Fiddle"** which emulate a real SQL database.

E.g.
Week 1: https://8weeksqlchallenge.com/case-study-1/
DB Fiddle: https://www.db-fiddle.com/f/2rM8RAnq7h5LLDTzZiRWcd/138


For those that want to load data on their own, I create a docker server where you can **import** a CSV, **build** a SQL database and **create** SQL queries.

Last Step: 
Go on the **8weeksqlchallenge** website and load the example into the docker-compose server


Here is my repository if that helps some!

**Repository**: https://github.com/poboisvert/docker_sql_csv_loader


Your CSVs will be there
- https://github.com/poboisvert/docker_sql_csv_loader/tree/main/data

Your SQL tables will be there
- https://github.com/poboisvert/docker_sql_csv_loader/tree/main/sql

Docker server settings is there
- docker-compose.yml

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/op7d97djzk5lvid91mlj.png)
Starting Coding Bootcamp Soon
Tags: beginners, bootcamp, programming, webdev
Published: 2022-08-18 01:37:38

Last night I finished signing up for the Rutgers Coding Bootcamp.  I'm super excited to learn new things.

Additionally, I've started the "pre-work" modules.  I have a feeling that I will finish them quickly.  I'm enjoying myself too much.

## Today was all about:
- Adopting a "Growth Mindset"
- Connecting with the developer community
- Practicing Computational Thinking
- Learning about Agile Software Development
- Setting up the appropriate software/online profiles

I'm going to blog about this at the suggestion of the bootcamp pre-work instructions.  I want to better understand how to create new content/programs/apps and plan on discussing what I'm learning as I go along.  Hopefully this will increase my comprehension of the materials and help me as I look back on what will happen in the next 6 months.

I will probably dive into the details soon, but I just wanted to start here with this first post.  

## Its something.  It's a start.
Typescript boilerplate test configuration with mocha, chai and sinon
Tags: typescript, testing, tutorial, javascript
Published: 2022-08-18 01:25:23

## Hi, Devs!

Let's configure tests with [mocha](https://www.npmjs.com/package/mocha), [chai](https://www.npmjs.com/package/chai) and [sinon](https://www.npmjs.com/package/sinon) on Typescript in a few steps.

---

Lets' start the project:

```
npm init -y
```

Now, let's install the packages. Here we also install the types (@types) of each library because we need to use them on Typescript. Usually we need to test some elements that returns one promise, so we need do install chai-as-promised.

```
npm i -D mocha @types/mocha chai @types/chai 
npm i -D sinon @types/sinon
npm i -D chai-as-promised @types/chai-as-promised
```

We need to use _ts-node_ library to run our tests, because using Typescript we have to transpile the code. So let's install typescript and ts-node.

```
npm i -D typescript ts-node
```

Now put on your package.json the necessary script to run the tests:

```
"scripts": {
  ...
  "test": "mocha --require ts-node/register tests/**/*.spec.ts --exit"
}
```

Create one folder with the name _tests_, into a file with _testfirst.spec.ts_ name and create a simple case:

```
import { describe } from "mocha";
import { expect } from 'chai';
import chaiAsPromised from 'chai-as-promised';

chai.use(chaiAsPromised);
const expect = chai.expect;

describe('Testing the configuration', () => {
  it('should pass', () => {
  
  });
});
```

After you could run:

```
npm run test
```

**That' all!**

**Contacts**
Email: luizcalaca@gmail.com
Instagram: https://www.instagram.com/luizcalaca
Linkedin: https://www.linkedin.com/in/luizcalaca/
Twitter: https://twitter.com/luizcalaca