teleren/devto huggingface dataset:
Pardus 19 üzerinde PostgreSQL 11 kurulumu
Tags: postgres, pardus, database
Published: 2020-09-02 14:21:07

Pardus 19 üzerinde PostgreSQL 11 kurabilmek için Pardus 19'un kendi depoları yeterlidir. Bunun için aşağıdaki komut ile temel kurulum işlemine başlayabilirsiniz:

```bash
sudo apt install postgresql-11 postgresql-client-11
```

Bu işlem sonucunda PostgreSQL kurulmuş olması gerekmekte. Fakat kontrol için aşağıdaki komut çalıştırılabilir:

```bash
pg_isready
```

Bu komut çıktısında aşağıdaki gibi bir sonuç görmeniz gerekmektedir: Çıktıdan anlaşıldığı üzere postgresql'in kullandığı port ve bağlantının açık olup olmadığı gözükmektedir.

```
/var/run/postgresql:5432 - accepting connections
```

Servisin ayakta olup olmadığını kontrol etmek için aşağıdaki komut ile **active** yazısı görünmelidir.

```bash
sudo systemctl status postgresql
```

Temel ayarların yapılabilmesi için öncelikle postgres kullanısının parolasını düzenlemeniz gerekmektedir. Aşağıdaki komut sonucunda 2 kere parola girerek parola tanımlayabilir veya değiştirebilirsiniz:

```bash
sudo passwd postgres
```

Bu adımdan sonra postgre kullanıcısına geçip onunla birlikte Postgresql'i yönetmeye başlayabiliyoruz. Bunun için Linux sistem üzerinde postgres kullanıcısı ile giriş yapıp, postgres kullanıcısına DB üzerinde zor bir parola belirlemek gerekmekte.

```bash
su - postgres
psql -c "ALTER USER postgres WITH PASSWORD 'ZorPar0la';"
```

İstemci üzerinden  giriş yaparken varsayılan ayarlarda bir problem bulunmaktadır. Bunun düzeltilmesi için **/etc/postgresql/11/main/pg_hba.conf** dosyasını nano veya vim gibi bir editör ile açıp, alttaki satır yerine, diğer alttaki şekilde düzenleme yapılması gerekmektedir. 3. sutundaki all yerine postgres yazan bir satır varsa orada da peer yerine md5 düzenlemesi yapılabilir.

```
local   all             all                                     peer
```

```
local   all             all                                     md5
```

Bu düzenleme sonrasında servisi yeniden başlatabilirsiniz.

```bash
systemctl restart postgresql
```

Ve artık en temel şekilde veritabanı kullanmaya başlayabilirsiniz.

***

Transit umbra, lux permanet
Why do you do challenges?
Tags: discuss, webdev, challenge
Published: 2020-09-02 14:10:39

Last weeks, I'm trying to change work ways

I think when I do things all time, I'm a robot can't think just write code or copy past library.

I'm a freelancer most project clients want to use WordPress. I don't think it's better all time to use it. In my opinion, I forget How to code? 

So, I start searching for challenges or team to join to start new projects, talking with developers, and discuss new technologies to use it. 


I find

**FrontEnd Mentor** [visit site](https://www.frontendmentor.io)

There're many challenges for a newbie, intermediate, and advanced.
You'll get more ideas and you can develop it as a side project.

**Chingu-Solo** [visit site](https://chingu.io/)
Boost your career with a team. I like this statement
I like to work with a team and use new web technologies. 

**CSS challenge** [visit site] (https://100dayscss.com/)
I like it every day there's a new CSS challenge. you can improve your skills if you try to do this challenge. submit your project to share knowledge 


**Codier** [visit site](https://codier.io/)
This put simple projects and I think there are new projects to do. But it'll good if you start

I'm in day 3 [100DaysOfCode] (https://twitter.com/hashtag/100DaysOfCode?src=hashtag_click)

If anyone has a challenge or team work site, please leave a comment to share knowledge.

Github account: https://github.com/EsraaNasr92
Twitter account: https://twitter.com/Esraa_nasr92
Website: http://webmaco.net/
How to add an SSH key to an existing DigitalOcean droplet
Tags: ssh, digitalocean, tutorial, droplet
Published: 2020-09-02 14:10:21

This is a quick and easy method to **add the SSH key of your current machine to an existing droplet.**
This tutorial is written for Linux users, but you can map the terminal commands to Windows or MacOS commands easily.
* * *
### (1) Retrieve and save your current **public** key to a text file

**(a) Generate keypair** (OPTIONAL)
**In case your RSA keypair is not generated yet** or you want to generate new keys, simply enter this and follow the instructions:
```bash
ssh-keygen -t rsa
```

**(b) Save SSH key to a separate file**
Enter the following commands in your terminal:
```bash
cd ~
cat ~/.ssh/id_rsa.pub > key.txt
```

### (2) Upload the SSH key to a file sharing service

```bash
curl https://bashupload.com/key.txt --data-binary @key.txt
```
This will give you a link that you can use to download the key. Copy the link and keep it somewhere safe. 


### (3) Reset your droplet's password

**(a) Reset droplet password**

If you don't have your droplet's password (which will be the case if you kept SSH as the default access mechanism) then you can reset it.

Sign in to DigitalOcean > Open the droplet > Click Access > Reset root password

Your password will be mailed to you. Keep the email open so you can look at the password and type it in on the next step.

**(b) Set a new password**
Click on "Console" on the top right to open the droplet's console. Enter "root" in the terminal, and then carefully type in the password specified in the email. The DigitalOcean console does not allow you to copy-paste so this operation is a little annoying.

> Follow the instructions in the terminal to set a new UNIX password (and keep this password somewhere safe).

### (4) Add SSH key to droplet
**(a) Run commands as specific user** (OPTIONAL)
If you want to add the SSH key for a specific user, you will have to type in the following to execute commands as that user. 
```bash
su - <username>
```

**(b) Append SSH key to droplet**
> You will need the link obtained in **Step 2** now.

```bash
cd ~/.ssh
wget <link-from-step-2>
cat key.txt >> authorized_keys
```
Make sure you use **>>** so the new key is appended to the authorized_keys file.

* * *
You can now open your terminal and type in 
```bash 
ssh <user>@<ip>
``` 
and you should be able to access your DigitalOcean droplet normally.

* * *
I faced this issue because I switched to a new laptop recently and forgot to add the new key using the old laptop. It's even more annoying because I have like 7 droplets running on DigitalOcean and I have to do these steps for all of them. C'est la vie!
What is your design process?
Tags: design, figma
Published: 2020-09-02 13:59:45

### It is important to have a workflow that works for both you and the client
  
##  What are the stages to your design process?
#### Discovery
It is important to establish the scope of the project and also to gain insight of the company you are designing for. Ideally, a face-to-face meeting before work commences will help to ensure that you and your client's visions are aligned. Due to the global pandemic, a phone call and email questionnaire can also be used.

At this stage it is essential that you are happy with your relationship with your client. As with all relationships, if you get a bad feeling then it probably isn't worth persuing. Refund the deposit and say farewell!

#### Plan
At this stage a sitemap is submitted and discussed so that each party is happy with the general structure of the pages, and also the rough content that will be displayed. Next up, the designing can start.

#### Wireframe
I usually create black and white wireframes at this point. This will put down on paper the general layout and visual structure of the pages. I break these into components that can be reused, to ensure a consistent look throughout the whole site.

#### Mockup
Components can now be created fully in design software and the finer details can be discussed, such as colour, hover animations, button animations and visual prompts. Of course, some people trust your judgement ( that is why you have the job ) and this may not be required, or wanted!

#### Full Page Visual
Once everything is appoved, then we are free to create a homepage visual. This is one of my favourite stages in the process, and it is important to get correct. This will be the first real visual that the client will get, and sets the tone for the rest of the site. I usually spend a lot of time tweaking at this stage, ensuring that the site fit in perfectly with the company's branding. 

#### Presentation
It is usually best to present the homepage design proposal to the client in person. You can gauge their reaction and also explain the decisions you have made. Why have you not put a giant chat window in the corner? Why can I not get every page from the navigation bar? Why have you not used the low resolution picture from my facebook page that has my mum in it? 
Alternatively, present the visuals as responsive pages so the client can see a desktop and mobile version of the homepage.

If you have been thorough with the previous stages, then 9 times out of 10 there will be no changes required. You've nailed it. You can crack on with the code!

### That's my process, what is yours?

[You can find more articles on my website - www.mctweb.co.uk](https://www.mctweb.co.uk)
React Virtual DOM 
Tags: javascript, react
Published: 2020-09-02 13:54:26

If you are working with React or have ever used React in your projects, you might have come across the term **React Virtual DOM** quite often. In this blog, I'll talk a bit about what Virtual DOM is and why did developers at Facebook employ such a concept while creating React. I'll try to keep it as precise and concise as possible :)

# What is DOM?

Document Object Model or DOM is a tree structure of various elements. It's an API for HTML and XML documents and defines the way a document is accessed and manipulated. Everytime there is a change in the state of your application UI, the DOM gets updated to represent that change. However, frequently manipulating the DOM affects performance since it has to continuously re-rendered to update the application, making it slow. This slowness is made worse by the fact that most JS frameworks update the DOM much more than they actually should.

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

# Enter React, the virtual DOM

To address the above issue, React popularized something called the Virtual DOM. The virtual DOM is only a virtual representation of the actual DOM. For every DOM object, there is a corresponding Virtual DOM object. Everytime the state of our application changes, the virtual DOM gets updated instead of the real DOM. A virtual DOM object has the same properties as the real DOM object, although it lacks the ability to directly change what's displayed on the screen. Also, manipulating virtual DOM is much faster than manipulating the real DOM.

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

# How is virtual DOM faster?🤔

When virtual DOM gets updated, React compares it with a virtual DOM snapshot that was taken right before the update. It then compares the new virtual DOM with the previous virtual DOM and figures out which objects have changed. This is called **diffing**. Once React knows which virtual DOM objects have changed, it updates only those objects on the real DOM and other elements don't get updated as opposed to what the real DOM normally does. This is how virtual DOM works behind the scenes, making it much faster!


If you found this insightful, share it with others as well!
Daily Challenge #284 - Remove K
Tags: challenge
Published: 2020-09-02 13:45:44

---
title: Daily Challenge #284 - Remove K
published: true
series: Daily Challenge
description: Find the smallest integer n such that with any amount of elements removed from the set, one can still find k distinct numbers among the remaining elements
tags: challenge
//cover_image: https://direct_url_to_image.jpg
---
####Task
Given a number k, find the smallest integer n such that if any k elements are removed from the set {1, 2, ..., n}, one can still find k distinct numbers among the remaining elements with sum of n.

[input] integer k
The number of elements to be removed.

[set] 2 ≤ k ≤ 10000

[output] an integer
The smallest value of n.

####Example
For k = 2, the output should be 7.

The initial set is {1, 2, 3, 4, 5, 6, 7}.

No matter what 2 elements you remove, (1, 6), (2, 5), or (3, 4) will sum up to 7.

Why isn't the result 6? Because: In set {1, 2, 3, 4, 5, 6}, if we remove 2 elements (1,2), or (4,5) the remaining elements do not contain 2 elements that sum up to 6.

####Tests
`removeK(2)`

`removeK(3)`

`removeK(10)`

`removeK(25)`

Good luck!

***
_This [challenge](https://www.codewars.com/kata/5919237fcdee8ddd25000082) comes from myjinxin2015 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Highlight of my day
Tags: watercooler
Published: 2020-09-02 13:45:29

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

That bowl of yummy goodness wasn't exactly it. I made that from a recipe given to me by Bibi. Someone who I collaborated on the GFTW Hackathon with.

The highlight is intact that I've got dev.to store credits and I'm planning on ordering a t-shirt 😁.
Helping Underserved Kids find their own success in STEM
Published: 2020-09-02 13:29:33

We are Y STEM and Chess Inc. We teach underserved children chess, math, and coding to empower them to pursue STEM majors/professions using STEM professionals to teach. http://ystemandchess.com. We provide Internet, Computers, Mentoring, College Application help, and Financial Aid guidance.

Problem: 
Empower underserved kids to pursue STEM.

Solution: 
Online STEM program that is free to underserved kids that builds STEM skills using chess, math, and coding to prepare them for success.

Current Facts: 
Teaching in-person classes with over 600 students.
4 schools with a total of about 200 students in India.
Boise Schools in Idaho to signup 12 Title 1 schools.

Some of our students. 
The Redlich family, right to left is Stanley, 7, June, 9, and Shirley 13. June has been in the program for 2 years and our first state chess Champion in 2018. June moved onto learning algebra to prepare for learning to code soon. June’s focus is on becoming a software engineer ASAP to help support her family. Stanley started the program in 2019. He started winning tournament games consistently. Shirley started the program recently. Shirley is a GATE student. She skipped the 6th grade and is learning algebra right now. 

What we need:
We need a CTO to guide development. 
We need engineers in Javascript, typescript, HTML and DevOps to help refine the website. See https://github.com/YSTEMandChess/app.ystemandchess.com
We need community partners (i.e Shelters, Boys and Girls Clubs, etc) to scale to new communities. 
We need computers to give to our students.

Want to donate or sponsor a child, https://donorbox.org/y-stem-and-chess-inc-learning-platform.

Follow us: IG: stemwithstemy TW: @ystemandchess FB: ystemandchess LI: linkedin.com/in/ystemandchessinc.Email at devin@ystemandchess.com
Adding Scripts to Next.js
Tags: node, javascript, nextjs
Published: 2020-09-02 13:23:28

I needed to add a queue processing script to my Next.js app, and really wanted to use the Next.js compilation chain to build it so that I wouldn't have to set up an additional build chain for just one script. It turns out that it's pretty easy to do.

Adding an extra entry to the webpack configuration will cause an extra script to be output during the build process. My script's name was `src/queue.js`. I added it to my entries by modifying `next.config.js`.

```js
module.exports = webpack(config, {isServer}) {
  if (isServer) {
    return {
      ...config,
      entry() {
        return config.entry().then(entry => {
          return Object.assign({}, entry, {
            queue: "./src/queue.js"
          });
        });
      }
  }

  return config;
});
```

Adding this will allow the queue script to be built with `next build` and output to `.next/server/queue.js`. Unfortunately the script doesn't run with `next dev`, but I decided to simply run my queue jobs async on call in development and cut that part of the dev environment out, knowing I can test queues in staging and don't have to really change that code very often anyway.

To run the queue processor, run `node .nextjs/server/queue.js`. The script has been processed through webpack just like any server code under Next.js.

This technique can be expanded to any scripts by adding entries like `queue: "./src/queue.js"` in the configuration above. I could certainly imagine adding something to detect all the scripts in a specific directory and processing them all in that way to allow for expansion of migration scripts and other useful production server-side tasks.
New Client: Inspired Healthcare Capital -PHXA
Published: 2020-09-02 13:20:30

With the growing sophistication of alternative real estate funds and the increased regulatory compliance they require, advanced operational solutions have become critical to the success of today’s fund sponsors. Phoenix American has combined the most efficient systems and back office processes in alternative investments since its origin as a fund sponsor in 1972. The Company’s industry leading STAR-XMS <a href="https://www.phxa.com/transfer-agency">transfer agent system</a> is the result of the Company’s direct experience as a fund sponsor as well as decades of experience as a <a href="https://www.phxa.com/">third party fund administrator</a> for alternative investment funds.

<b>Read More</b><a href="https://www.phxa.com/press-releases/inspired-healthcare-capital/">Phoenix American Financial Services
Announces New Client Partnership with Inspired Healthcare Capital</a>

<b>Contact Details:</b>
415-485-4500

<b>Visit Reference Profile Websites:</b>
<a href="https://bit.ly/3jQfFPZ">https://bit.ly/3jQfFPZ</a>
<a href="https://bit.ly/2QNk0qp">https://bit.ly/2QNk0qp</a>
<a href="https://bit.ly/32MgF0x">https://bit.ly/32MgF0x</a>
<a href="https://bit.ly/2Z0wTSq">https://bit.ly/2Z0wTSq</a>
<a href="https://bit.ly/3hStjkS">https://bit.ly/3hStjkS</a>
<a href="https://bit.ly/3gWolC9">https://bit.ly/3gWolC9</a>
<a href="https://bit.ly/32OcRfc">https://bit.ly/32OcRfc</a>
<a href="https://bit.ly/3hRTYhv">https://bit.ly/3hRTYhv</a>
<a href="https://bit.ly/3jD85b3">https://bit.ly/3jD85b3</a>
<a href="https://bit.ly/3517FXZ">https://bit.ly/3517FXZ</a>
<a href="https://bit.ly/34W5qFm">https://bit.ly/34W5qFm</a>
<a href="https://bit.ly/31VFojT">https://bit.ly/31VFojT</a>
<a href="https://bit.ly/32NnbUu">https://bit.ly/32NnbUu</a>
<a href="https://bit.ly/32Oxlod">https://bit.ly/32Oxlod</a>
<a href="https://bit.ly/3bgZWGz">https://bit.ly/3bgZWGz</a>
<a href="https://bit.ly/2YTEClb">https://bit.ly/2YTEClb</a>
<a href="https://bit.ly/3bfAMId">https://bit.ly/3bfAMId</a>
<a href="https://bit.ly/2CFd8Ic">https://bit.ly/2CFd8Ic</a>
<a href="https://bit.ly/2YgFqAj">https://bit.ly/2YgFqAj</a>
<a href="https://bit.ly/3gdl3tW">https://bit.ly/3gdl3tW</a>
<a href="https://bit.ly/3kZnVyf">https://bit.ly/3kZnVyf</a>
<a href="https://bit.ly/3aDj80I">https://bit.ly/3aDj80I</a>
<a href="https://bit.ly/34exPGv">https://bit.ly/34exPGv</a>
Convert var string struct key to struct key
Tags: go
Published: 2020-09-02 13:02:01

Hello

I have a map (string) of "tag" to convert "words" into a text
this list of "Tags" must be replaced by values coming from a structure

sample:
`var users struc {
         login String `json:" options "`
         passwd String `json:" options "`
}
var folders struc {
     arch String `json:" folders "`
     dest String `json:" folders "`
}

var TAGS = map [string] string {
"{login}": "users.login",
"{passwd}": "users.passwd",
"{archive}": "folders.arch",
"{dest}": "folders.dest",
}`

To do something like this:
`var test = "Name = {login} archive = {archive} destination = {dest} / {login}"
var realTest = ReplaceTag (test, & TAGS)
`
I don't know how to convert the strings from the value to the real value of the structure.
I know how to do it directly but not when it is in the form of a string

thank you in advance
Checkout only certain files
Tags: actionshackathon
Published: 2020-09-02 13:01:55


### My Workflow

`Bhacaz/checkout-files` is useful to only pull specific files from a repository instead of the hold project with the well known `actions/checkout`. Some project can be very heavy to pull when what you need it’s just 2 or 3 files.

It can be useful if you only need package config files like `package.json` or `Gemfile` to setup a Github Action environment, since popular action like `ruby/setup-ruby` look for the `.ruby-version` to automatically determine which version to setup and the `Gemfile.lock` to install the right version of `bundler`. I personally use it along with an other script to run `bundle outdated` on a Ruby project. For more details have a look on my other post. {% link https://dev.to/bhacaz/automatically-keep-tracks-of-outdated-gems-in-a-github-issue-55n1 %}

### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)

**Wacky Wildcards**. Because it's a very general action that can be use for multiple case.

### Yaml File or Link to Code

{% github Bhacaz/checkout-files %}

### Additional Resources / Info

You can find an example of usage in this Ruby on Rails project of mine. [Bhacaz/democraylist-be.github/workflows/outdated_gems.yml](https://github.com/Bhacaz/democraylist-be/blob/master/.github/workflows/outdated_gems.yml)
9 Best IDE And Tools For Flutter App Development
Tags: flutter, android, apps
Published: 2020-09-02 12:51:00

Flutter is one of the widely used cross platform frameworks to develop cross-platform applications. It develops efficient cross platform apps that can seamlessly work on both iOS and Android platforms. Some of the features of Flutter framework like Hot Reload, Widget catalog helps developers to develop effective and efficient applications. Flutter lets you choose from multiple IDEs to develop an app. It makes coding easy and faster for developers. Flutter IDEs and tools are an unparalleled ally in terms of visual assistance, code completion and debug the code. Here we have listed the 9 best IDE and ools for Flutter app development. Let us dive to the details of each.

#9 Best IDE And Tools For Flutter App Development-
**1. Visual Studio Code-**
It is one of the most popular IDE in market because of the support of trusted company Microsoft and hence its level of growth is higher than others. Web app developers prefer this IDE for Flutter Application Development for various reasons. Some of them  include Git control & terminal, debugging, plugins that simplify the development process. A simple Dart plugin makes development possible in 10 minutes or less.

*Important points-*
* Free
* Syntax highlighting
* Code completion
* Realtime errors/warnings/TODOs
* Documentation in hovers/tooltips
* Pub Get Packages command
* Pub Upgrade Packages command
* Type Hierarchy

**2. Panache-**
Panache is a developer trusted and considered as the best Flutter Development tool. It helps you to create custom material themes for your Flutter applications. You can customize the colors, shapes and other theme properties and export it as .dart file to your Google drive folder. One of the best way to create attractive themes and materials for your software is- use this to customize and download the theme as you want. More than 40 million developers and testers using this theme and you can review the codes once you have completed the whole coding structure. 

**3. Codemagic-**
Know more at- [https://solaceinfotech.com/blog/9-best-ide-and-tools-for-flutter-app-development/]