teleren/devto huggingface dataset:
TOP 3 BOOKS ON DIGITAL TRENDS 2021-2023
Tags: books, marketing
Published: 2021-01-14 01:19:22

#1 Envisioning Holograms Design Breakthrough Experiences for Mixed Reality 
PDF > https://urlzs.com/oZtMK

Introduction “Reality is what you want it to be.” – M. Pell One thing you notice right away when talking with people in the high- tech industry – they are very particular about terminology. Complete strangers will correct you immediately, with disdain, if you use a term they care about incorrectly.

Call it a geek power trip, lack of social graces, I don’t know. Whatever the reason, it’s uncomfortable to be called out for using a term incorrectly. That said, there’s often sufficient grey area in what these terms refer to that we’re often redefining things to fit our perspective. At the end of the day, it’s just people splitting hairs with semantics to make their position known. Which leads me to make a terminology assertion here before you even start reading this book.

#2 The Digital Transformation Playbook Rethink Your Business for the Digital Age
PDF > https://urlzs.com/q8w3Q

Five Domains of Strategy That Digital Is Changing If electrification was transformative because it changed the fundamental constraints of manufacturing, then the impact of digital is even bigger because it changes the constraints under which practically every domain of business strategy operates.

Digital technologies change how we connect and create value with our customers. We may have grown up in a world in which companies broadcast messages and shipped products to customers. But today the relationship is much more two-way: customers’ communications and reviews make them a bigger influencer than advertisements or celebrities, and customers’ dynamic participation has become a critical driver of business success. 


#3 DroneDeploy State of the Drone Industry Report 2021
PDF > https://urlzs.com/q8w3Q

2020 has been a year filled with fluctuating degrees of anxiety and uncertainty. Thousands of companies worldwide have felt the effects of COVID-19, the economic downturn, and a tumultuous political landscape. Rarely has something proved itself “business as usual.” But through these challenging times, industries have adapted. Whether adopting new technologies, increasing spend on different programs, or promoting a remote-first work culture, we have seen an influx of companies looking at alternatives to traditional methods to improve their operations and streamline their workflows. Two staples of these “alternatives” are drone utilization and capitalizing on visual data. As these technologies advance and become more accessible, more and more companies are reaping the benefits.

This year, DroneDeploy surveyed more than 600 users across 20+ industries spanning over 40 countries. The goal was to determine how vital drone technology is –
and has become – to their operations and how the industry will evolve in the coming years. Even during the pandemic, and amongst the uncertainty, the results are surprising.
Elixir ต่อฐานข้อมูลด้วย Ecto ตอนที่ 1
Tags: elixir, ecto
Published: 2021-01-14 00:35:29

เริ่มตอนแรกด้วยการสร้าง Repo สำหรับเชื่อมต่อกับ DB

สำหรับบทความชุดนี้จะสมมติว่าคนอ่านนั้นสามารถสร้าง mix project เป็นแล้ว

เริ่มแรกเราเพิ่ม dependencies ให้กับ mix project ของเราก่อน

```elixir
  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      {:ecto, "~> 3.5.5"},
      {:ecto_sql, "~> 3.5.3"},
      {:myxql, "~> 0.4.5"}
    ]
  end
```

มี 3 dependencies หลักๆคือ `:ecto`, `:ecto_sql` และ `:myxql` ที่เป็น adapter library ในการเชื่อมต่อกับ MySQL

จากนั้นให้เราสร้าง repository module ขึ้นมา โดยที่เราจะ use Ecto.Repo เพื่อทำให้ module นี้เราเป็น repository module พร้อมกับ configure ว่าให้ Repo ไปอ่านค่า config จาก otp app อะไร และใช้ adapter ไหนในการเชื่อม

ตัวอย่างโค้ดเป็นแบบนี้

```elixir
defmodule EctoSample.Repo do
  use Ecto.Repo,
    otp_app: :ecto_sample,
    adapter: Ecto.Adapters.MyXQL
end
```

จากนั้นเราก็ต้อง configure ค่าต่างๆเกี่ยวกับการ connect DB ที่ `config/config.exs` โดยให้ configurations อยู่ภายใต้ application environment ของ OTP App เราคือ `:ecto_sample` โค้ดที่คีย์ของ configuration คือ repository module เช่น

```elixir
import Config

config :ecto_sample, EctoSample.Repo,
  database: "test",
  username: "root",
  password: "password",
  hostname: "localhost",
  port: 3306
```

ส่วนข้อมูลที่เรากำหนดก็เป็น keyword list ที่ประกอบไปด้วย ชื่อ database, username, password, hostname และ port ที่เราต้องการเชื่อมต่อ

ต่อไปเราต้องเพิ่มให้ repository module นั้น start process ภายใต้ application's supervisor หลักโดยที่เปิดไฟล์ application module ขึ้นมา เพิ่ม EctoSample.Repo ไปเป็น children spec อีกอันแบบนี้

```elixir
defmodule EctoSample.Application do
  @moduledoc false

  use Application

  @impl true
  def start(_type, _args) do
    children = [
      EctoSample.Repo
    ]

    opts = [strategy: :one_for_one, name: EctoSample.Supervisor]
    Supervisor.start_link(children, opts)
  end
end
```

เท่านี้เราก็ได้ repository module ที่พร้อมจะ connect กับ DB และส่ง query แล้ว ทดสอบส่ง query ดูโดยรัน iex ขึ้นมาแบบนี้ `iex -S mix` แล้วเรียกฟังก์ชัน EctoSample.Repo.query แบบนี้

```
iex(1)> EctoSample.Repo.query("SHOW TABLES")

07:32:22.702 [debug] QUERY OK db=2.3ms queue=6.1ms idle=1461.2ms
SHOW TABLES []
{:ok,
 %MyXQL.Result{
   columns: ["Tables_in_test"],
   connection_id: 767,
   last_insert_id: nil,
   num_rows: 0,
   num_warnings: 0,
   rows: []
 }}
```

ตอนแรกจบไว้เท่านี้ ต่อไปเดี๋ยวมาดูเรื่อง migration กัน

<a href="https://www.buymeacoffee.com/weerasak" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Ruby On Rails İle Hotwire Nasıl Kullanılır
Tags: rails, hotwire
Published: 2021-01-14 00:01:16

# Hotwire Nedir?

> ### Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire.

[Hotwire](https://hotwire.dev), [Basecamp](https://basecamp.com/) ve [Hey](https://hey.com/) tarafından geliştirilen, kendi sitesindeki tanıma göre modern web uygulamaları geliştirmeye alternatif bir yaklaşım. Alıştığımız API isteklerindeki JSON yerine direkt olarak HTML göndererek daha az JavaScript kullanacağımızı vaat ediyor. Bu yaklaşım ile  sayfaların ilk yüklenmesi daha hızlı oluyor ve template rendering sunucu tarafında gerçekleşiyor. Zaten isminin açılışı da **H**tml **o**ver **t**he **wire** hani `hotwire`

Hotwire `turbo`, `stimulus` ve `strada` isminde 3 bileşenden oluşuyor ancak `strada` henüz yayınlanmadı. Basitçe bildiğimiz `iframe` ama 2021 versiyonu.

Hotwire bileşenlerine yüzeysel bir giriş yaptığım ve Ruby On Rails ile nasıl kullanabileceğimizi gösterdiğim yazıma [bloğumdan](https://dgndev.xyz/posts/ruby-on-rails-ile-hotwire-nasil-kullanilir/) ulaşabilirsiniz.
How to go 2 pages back or front in history using JavaScript?
Tags: javascript
Published: 2021-01-14 00:00:00

---
  title: How to go 2 pages back or front in history using JavaScript?
  published: true
  tags: JavaScript
  date: Thu Jan 14 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/go-2-pages-back-front-history-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-87473005bd49aa4c8662c0cdf9fd149b.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/go-2-pages-back-front-history-javascript)
  
To go back or front to a specific page in history, you can use the `go()` function in the global `history` object and pass the count as an argument to the function in JavaScript.

In our case, we want to go 2 pages back in the history. So for that, we can pass `-2` as an argument to the `history.go()` function like this,

```js
// Go 2 pages back in history
history.go(-2);
```

If we want to go 2 pages front in history, we need to omit the negative sign from the `-2`, so it may look like this

```js
// Go 2 pages front in history
history.go(2);
```

- Negative number values are used to go back to a specific page.
- Positive number values are used to go forward to a specific page.

See this example live in [JSBin](https://jsbin.com/nilunazaqo/2/edit?html,js,output).

### Feel free to share if you found this useful 😃.

---
Day 5, 6 - 100daysofcode
Tags: react, javascript, webdev, 100daysofcode
Published: 2021-01-13 23:36:50

Uploaded the simple Pokemon game to Github pages
[Live Demo](https://sanchitbhasin.github.io/Pokegame/)
Also, learned about React state, how you can set and access state and why writing it in a class constructor is necessary
and also when using components state inside of a javascript function we have to bind the **this** keyword.

Forward ⏭ will be looking into - React State Patterns and the world of React Events.
>It is not the best game and I'll be updating it in the future as my skill set grows
Laravel Package Translator Loader
Tags: opensource, php, laravel, solumdesignum
Published: 2021-01-13 23:36:28

Yarr, everybody today, releasing another awesome open-source package: Package Translator Loader into the wild world.
https://github.com/SolumDeSignum/package-translator-loader

Post Scriptum,
Hey, their reader can you please like, share, reshare, repost and spread the love further, thank you in advance, and stay safe and healthy.
Day 287 : Sunny Days
Tags: hiphop, code, coding, lifelongdev
Published: 2021-01-13 22:49:26

_liner notes_:
- Professional : Finally finished with some updates I've been working on in the documentation. This was one of the larger ones. Just have a few more smaller ones on my list. Had a meeting. Pretty good day.

- Personal : Last night, worked a little more on updating the documentation. After that, I went through tracks for the radio show. Then went straight to sleep. Also, I think I may have found a new spot to park at night.

![A beach in Ta‘ū, American Samoa with a tropical forest on the left, ocean on the right and forest covered mountains in the distance](https://dev-to-uploads.s3.amazonaws.com/i/ztfv7jq1biqzr62pgnm7.jpg)

So, I decided to try something new this morning. Instead of the normal cold shower, I boiled water and added it to the shower container. What I didn't realize was that using the induction cook stove top really drained my battery. Wouldn't be so bad normally, but it was really cloudy today. haha The rest of the week is supposed to consist of sunny days. We'll see. Tonight, going to finish updating the documentation because I want to work on my blog post for the remainder of the week.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube uG9rMnbPl8o %}
What if we had a method on arrays called `.combineWith`?
Tags: discuss, javascript, bearwithme
Published: 2021-01-13 22:45:37

---
title: What if we had a method on arrays called `.combineWith`?
published: true
description: a silly experiment. Just bear with me
tags: #discuss #javascript #bearwithme
//cover_image: https://direct_url_to_image.jpg
---

Just... you know a generic way of smashing all the items on an array into one. Like, you give it a "combiner" function to `.combineWith` and it will just apply that to everything.

Imagine this situation. You have custom data type you work with. Maybe a weird tuple to keep this example simple. You know at some point you want to combine those things, so you make a function.

```js
function combine_tuples(tuple_a, tuple_b) {
  return [
    tuple_a[0] + tuple_b[0],
    tuple_a[1].concat(', ', tuple_b[1])
  ];
};
```

Now in your awesome app you receive an array of these weird tuples. You want to smash these things together, what do you do? You use `.combineWith` and your "combiner function".

```js
const some_tuples = [
  [10, 'Awesome'],
  [4, 'Okay-ish'],
  [2, 'Oh hell no']
];

some_tuples.combineWith(combine_tuple);
// => [ 16, "Awesome, Okay-ish, Oh hell no" ]
```

To you, dear reader who thinks there is something fishy in my example (and this whole post), my question to you is this: would you think this method is so horrible that you would create a lint rule to avoid it at all cost in your codebase?

And you, dear reader who is intrigued by this "non-existent" method:

- Do you think this method does too much?
- Would you use this?
Deploying a PHP app to cPanel
Tags: php, cpanel
Published: 2021-01-13 22:16:02

Deploying a PHP web-app can be stressful for beginners who are using cPanel hosting for the first time, or who aren't conversant with the interface. Most issues encountered would be related to improper uploads, server name issues, or database errors. 

<h1>What is cPanel</h1>
cPanel is a web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site to the website owner or the "end-user".
cPanel can be used to host various software, including WordPress, Python Apps, PHP apps, Node.js apps, etc.

<h2>Deploying to cPanel</h2>
<h3>The cPanel interface</h3>
![The cPanel Interfacet](https://dev-to-uploads.s3.amazonaws.com/i/isnqbvlk1yfy3akmqhf8.png)
This is the default cPanel interface, customizable to user's taste.

<h3>Locate the File Manager</h3>
![Locate the file manager](https://dev-to-uploads.s3.amazonaws.com/i/lybvadc7z4swurnqeym0.png)

<h3>Find the <i>public_html</i> folder</h3>
![The public_html folder](https://dev-to-uploads.s3.amazonaws.com/i/pkepgf4dba5ga2yakvka.png)

<h3>Locate the <i>Upload button</i></h3>
![Upload](https://dev-to-uploads.s3.amazonaws.com/i/yzwc6fgjdrcjr7wxs91p.png)

<h3>Upload a <b>zipped folder</b> of all the site files</h3>
![Upload a zipped folder](https://dev-to-uploads.s3.amazonaws.com/i/x9q4dlh27gsbly93w79x.png)

<h3>Back to the file manager, and <b>extract</b> the files.</h3>
![Back to the file manager](https://dev-to-uploads.s3.amazonaws.com/i/t9s1993ix6at6lqbalp9.png)![Extract the content of the zipped folder](https://dev-to-uploads.s3.amazonaws.com/i/waykhmwa0tpq0qrg95rv.png)

<h3>Replace all necessary information, such as server name, username, and password, for connecting to your database</h3>

With this, your PHP app should be visible at the domain (https://website.com)

You could reach out to me on <a href="https://twitter.com/temi0x">Twitter</a> if you encounter any issues along the way
Mod 1 Project Blog
Published: 2021-01-13 16:06:21

The Mod1 project was fun to make but also required using my knowledge and resources to create my own CLI Application. I decided to use a Score Bat API so that my CLI would have access to external data.  Score Bat is a website for viewing Soccer Videos. 
The API gave me access to an array of information containing video/highlight titles, and information on videos such as a link of the video, the competitors, the date, etc. This was used in my CLI as a result of the user choosing a specific option. I started by pasting the url to the API.  Then I parsed the original API array so that my API would return a list containing only the video titles. Then I called that list in my CLI as a result of the user choosing another specific option. The last option I made possible was the exit option, which prints a goodbye message. For this option I used the sleep function and the system “clear” function. The sleep function makes the system wait however many seconds you desire before the next action occurs. System “clear” has the power to automatically clear everything in the user’s terminal prior to that action. One of the most interesting gems I found along the way is TTY-Prompt. TTY-Prompt has a wide range of functionality and you are capable of doing a lot with this gem. I used TTY-Prompt for the options and scrolling functionality of my CLI. You can view the functionality of TTY-Prompt at “https://github.com/piotrmurach/tty-prompt”. The TTY-Prompt can be found at “https://rubygems.org/”. When I first started my project I felt confident, but after running to multiple errors one after another I began to lose some confidence. With a bunch of trial and error I had finally got my project running. I am very satisfied with the result, but I do wish I had just a bit more time. Overall, I am happy with how my first project came out.
Join Bitcherry Testnet Dapp Development Contest ( 1MILLION $BCHC to be won)
Published: 2021-01-13 22:11:47

🎉📣 BitCherry Testnet Dapp Developement Contest
✅  🕕 DATE & TIME: 1 January — 28 February 2021 (GMT + 8)
✅ 🎁  Rewards：
Top1: 2000USDT
Top2: 1000USDT
Top3：800USDT

✅ JOIN BITCHERRY DEVELOPER COMMUNITY
Discord： https://discord.gg/nNY9A9tn2D

Whatsapp: https://chat.whatsapp.com/Cc71fSPytW79ozJ6OKcuMN

✅ HOW TO BUILD DApp
Smart Contract Development 

Tutorial:
http://developers.bitcherry.io/apiReferenceManual/#/apiReferenceManual

Test Token Collection Address:
http://developers.bitcherry.io/apiReferenceManual/#/testNetwork

Browser: http://blockscan.bitcherry.io/#/home

✅ DApp SUBMISSION METHOD
Participants are required to develop according to the DApp design plan. After the development is completed, the development documents shall be submitted to Pr within the specified time (up to February 20) to the Technical Team 

Email: bitcherrydapp@bitcherry.io

🎉 More details: https://medium.com/bitcherryglobal/event-bitcherry-testnet-dapp-development-contest-officially-launched-bebb4e73729d
Before You Share Your React App, Change index.html
Tags: react
Published: 2021-01-13 22:06:41



React is a great framework to get a project up and running quickly. Running npx create-react-app my-app will give you a functioning website in seconds. That being said, it’s always a good idea to change your meta data before sharing your React app widely. 

Doing so is easy! 

## Change meta data 

Navigate to **index.html** in the **public** directory and find the **head** tag.

![shows meta data in the head tag](https://dev-to-uploads.s3.amazonaws.com/i/u7tw98mzw8eczuu4808j.png)

See that text Web site created using create-react-app? Let's change it. 

In the **meta** tag, change **content="Web site created using create-react-app"** to a short description of your website. 

![Shows boilerplate content in metatags](https://dev-to-uploads.s3.amazonaws.com/i/sa2ptput4g41p1aywgbt.png)

This type of information is shared whenever you embed your website on a social media page, so creating a short and informative description will let your user know what kind of website they’ll be viewing. 

![Shows changed meta data](https://dev-to-uploads.s3.amazonaws.com/i/0p39682wqismhp4hm63h.png)

## Change the title 

At the bottom of the head tag you’ll find the title tag. This title corresponds to the text you see on the browser tab. 

![Title tag in code](https://dev-to-uploads.s3.amazonaws.com/i/oec0zqlyqy8k0hocthx2.png)

![React app title tab](https://dev-to-uploads.s3.amazonaws.com/i/q4zp17o92vnvjdgluttd.png)


Change the name of the React App to whatever you’ve named your website. 

![Changed title tag in code](https://dev-to-uploads.s3.amazonaws.com/i/xiykboykco542x7rrti3.png)

![Changed title tab](https://dev-to-uploads.s3.amazonaws.com/i/iji2a0sadhh5fc3g6cxr.png)


## Further changes 

There’s other boilerplate code you may want to modify in the index.html file and elsewhere. Personally, I find it useful to delete the image files create-react-app comes with (with exception to the favicon file). 

![public folder with favicon.ico and index.html](https://dev-to-uploads.s3.amazonaws.com/i/4k2jd7n3j0vqcrttheyx.png)


A favicon is the 16 x 16 px image next to the title of your website (usually a logo). React uses their own logo, but you can easily delete that file and replace it with your own logo. Be sure to keep the file name the same for a quick change. 

## Summary 

These quick changes can make a great impression when sharing your app. Not only are they descriptive (which is what search engines love), they also show that you pay attention to detail. The next time you share your app, be sure to make these changes.
Modern JavaScript: Preparation for React Dev (part 1)
Tags: javascript, react, functional
Published: 2021-01-13 22:03:38


These are my quick notes while reading the fantastic book from O'Reilly publishing, [Learning React, 2nd ed. by Alex Banks & Eve Porcello](https://amzn.to/2XEfEpa) 

## Stop Using var, Use const & let
I don't want to list every single reason that you should switch to let (scoping) and const (no more worries about code in another module altering your values).
Instead, I just want to say:
1. Never use var again.  Forget about it.
2. Use const everywhere you can  -- maybe initially make every variable you create const.  Then, when you go to change the value (somewhere else in code), go back and change it to let.
3. Use let where you can't use const -- because you need to change the value the item contains.

That's it.

## Template Strings
We can all stop using the addition operator (+) in JavaScript to create strings.  Now we have Template String ability.

String interpolation syntax is far prettier in other languages like C#:
```C#
$"{name} is {age} year{(age == 1 ? "" : "s")} old."
```
or Kotlin:
```Kotlin
"${name} is ${age} year${when (age == 1 ){ true -> "" false -> "s"}} old."
```
### JavaScript Uses Back-tick Char
I like those better than the way JavaScript uses the back-tick char.

```JavaScript
const name="ted";
let age = 10;
`${name} is ${age} year${(age == 1 ? "" : "s")} old.`
```

You can copy that code, open up your dev console in your browser (while you're reading this article) and paste it in and hit &lt;ENTER&gt; and it will display the following:

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

You can alter the value of age = 1 and run it again and you'll see that the "year" part of the string will be singular.  

### Line Breaks Can Be Included
It's quite amazing that you can build up a huge template string that represents HTML now, and line breaks can be included.

```JavaScript
const firstId ="mainOne";
const imageLink="/fake/notreal/fake.jpg"
const outputElement = `
<div id="${firstId}">
   <img src="${imageLink}"
</div>`
```

Again you can copy / paste this into your web browser dev console (F12 in most browsers) and you'll see the following:

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

More to come in the next article...
Fixing MacOS' SSH $PATH missing /usr/local/bin
Tags: macos, docker, ssh, path
Published: 2021-01-13 21:51:22

---
slug: macos-ssh-bash-says-docker-command-not-found
title: Fixing MacOS' SSH $PATH missing /usr/local/bin
published: true
description: Fixing MacOS' SSH PATH Problem
tags: macos,docker,ssh,path
---

>Originally published to [https://johnneyl.ee/writes/](https://johnneyl.ee/writes/)

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

# Problem: `/usr/local/bin` missing from ssh `$PATH`

>`bash: docker: command not found`

## Exec `ssh [localhost](http://localhost) docker`

Normally, your paths include your `/usr/local/bin`, however, in macos you'll find that if you SSH into [localhost](http://localhost) (or indeed any macos host), it is missing. Such is the case when setting up a docker profile with an ssh-based remote host, for example. 🙄

To fix this, we need to safely⚠️ enable an option that's disabled in your `sshd_config` called `PermitUserEnvironment`

# Solution: `/etc/ssh/sshd_config` & `PermitUserEnvironment PATH,LANG`

## Edit `sshd_config` & `~/.ssh/environment`

>`sed -i '' 's/#PermitUserEnvironment no/PermitUserEnvironment PATH,LANG/g' /etc/ssh/sshd_config`

### Bash:

 >`echo "PATH=/usr/local/bin:$PATH" >> ~/.ssh/environment`

### Fish:

 >`echo "setenv PATH /usr/local/bin:$PATH" >> ~/.ssh/environment`

# Conclusion:

🥳 `ssh [localhost](http://localhost) docker` works!🥳

Now go and cluster all your macbooks together with docker! 🥳