teleren/devto huggingface dataset:
A day with Linux-2: How to undo apt-get autoremove 
Published: 2021-01-02 14:38:22

Well i am trying to install gh cli in my ubuntu 20LTS but get dpkg error because there is a name conflict between `gh` and `gitsome` and in this [issue](https://github.com/cli/cli/issues/2360) they suggest me to remove gitsome (if i am not using it), so when i 
`sudo apt remove gitsome` i accidentally type `sudo apt autoremove` which remove most of my python3 package.Then i realize what i have done,so to recover my python3 package i run the following command
```
echo '#!/bin/bash' > restore
echo sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'` >> restore
chmod +x restore 
./restore
```
Reference:https://askubuntu.com/questions/738984/how-to-undo-apt-get-autoremove
Starting My Career as a Software Engineer & Feeling Magical!
Tags: devjournal, career, webdev, codenewbie
Published: 2021-01-02 14:32:26

_This post was originally published on January 2, 2021 on [my blog] (https://alexlsalt.github.io/blog)._

In this moment, it's 3pm on the dot and I'm sitting in the lounge chair with a fire on the living room TV. Thanks YouTube for the makeshift coziness.

I swear, it works absolute wonders. And I'm not just saying that because the lounge chair is also right next to our radiator.

I can't believe I'm going to start my new career as a Software Engineer in two days - on Monday!

It seriously feels magic. I can't really articulate so well what that means but I seriously feel like this is only the beginning, like there is so, so much to learn and to do and to experience.

It's that bountiful abundance you always hear about, but to feel it in your chest - expanding, expanding, expanding to the point where it feels like it might burst. And yet that bursting wouldn't be a problem or a painful moment, but instead as though you'd just continue expanding into the universe around you.

No limitation. No border. No barrier.

You'd just keep going because that's how life is. And the more you fall in love with it, the more you continue to keep getting out of it. The days that turn into miracles and the moments where you might just feel the need to pinch yourself because it's all so... magical.

And it's only the beginning. We're in it for the long haul, and this is the start (or, better, the continuation) of a very beautiful journey.

-------

P.S. I'm launching a new course - *Crafting Your Come-Up* - for early-career developers to set themselves apart along their coding journey! 

[Sign up here for updates!](https://www.ladiescodecollective.com/cohorts)

![Craft Your Come-Up course announcement](https://dev-to-uploads.s3.amazonaws.com/i/dcfucbhptmsgymqtg6nx.png)
VueOverlayTools (Vue 3)
Tags: vue, vue3, vuex, utility
Published: 2021-01-02 14:13:04

I like Vue, but latest release (Vue 3) is working only with new vue-devtools version and there is no Vuex at this moment. And I must to create a temporary solution for this problem - `vuex-overlay-tool`.

**Vuex Overlay Tool** plugin for **Vue 3** provides monitoring of the state in the store with feature from `vue-devtools` - **time-travel**.

After installation you will have a button on the page
![](https://camo.githubusercontent.com/9e7544ac98ba611fd842a454ca43c886abd982900500035e2684237bc5fd1d7e/68747470733a2f2f692e696d6775722e636f6d2f59634464764a732e706e67)

when you click on this button, the overlay-panel will open for you

### Previews
###### `State Overview`
![](https://camo.githubusercontent.com/f94a03a2264e24d3d467ecdbd3c12eb8d3db0f624a122aaa8ed1490082e2be1f/68747470733a2f2f692e696d6775722e636f6d2f4378464c3244762e676966)

###### `Getters Overview`
![](https://camo.githubusercontent.com/624fcdc38abc9b0db9b1c62259665ca9c2c636088fecafaf6cb04f8714613f1f/68747470733a2f2f692e696d6775722e636f6d2f664a42576f37332e706e67)

###### `Mutations History`
![](https://camo.githubusercontent.com/fee7cfca4d06918d1dc1750ca6d16cc2fb4f0c03c31c514799e6d46e807ae63f/68747470733a2f2f692e696d6775722e636f6d2f467869426a4b4a2e706e67)

[Link to package](https://www.npmjs.com/package/vuex-overlay-tools)
Useful SQL Server sys table queries and stored procs
Tags: database, sql, sqlserver
Published: 2021-01-02 14:10:59


**List of tables in a schema with schema name**
```
select s.name + '.' + o.name
from sys.objects o
inner join sys.schemas s on s.schema_id = o.schema_id
where s.name = '<schema name>'
and [type] = 'U';
```

**List of tables which has the column**
```
SELECT      
	TABLE_SCHEMA AS 'Schema',
	COLUMN_NAME AS 'ColumnName',
           TABLE_NAME AS  'TableName'
FROM        INFORMATION_SCHEMA.COLUMNS
WHERE       COLUMN_NAME LIKE '%ColumnName%'
ORDER BY    TableName
            ,ColumnName;
```

**Recently modified objects**
```
select [type] OBJ_TYPE, s.name + '.' + o.name, *
from sys.objects o
inner join sys.schemas s on s.schema_id = o.schema_id
where 1=1
and [type] IN ('P','IF', 'FN', 'TF', 'V')
and o.create_date > '2023-06-05 11:07:31.187' --replace with required date
and s.name in ('dbo') -- modify / add schemas to include
ORDER BY [type], s.name, o.create_date
```


**Create a new table with columns copied from an existing table (without data)**
```
select top 0 * into NewTable 
from ExistingTable;
```

**Delete all tables in all schema in a database**
```
EXEC sp_MSForEachTable 'DISABLE TRIGGER ALL ON ?'
GO
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
GO
EXEC sp_MSForEachTable 'DELETE FROM ?'
GO
EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
GO
EXEC sp_MSForEachTable 'ENABLE TRIGGER ALL ON ?'
GO
```

**Find objects (Stored proc, function etc.,) that contain the given text**
```
SELECT DISTINCT
    o.name AS object_name,
    o.type_desc AS object_type,
	s.name
FROM sys.objects AS o
JOIN sys.sql_modules AS m ON o.object_id = m.object_id
JOIN sys.schemas AS s ON s.schema_id = o.schema_id
WHERE m.definition LIKE '%ReplaceWithTextToSearch%'
```

**LIKE operation on an XML column**
We can't do a like operation on an XML column in SQL Server. As a work around, just cast the column to varchar.
```
select *
from schema.table
where CAST(xml_col_nm as nvarchar(max)) like '%search_term%'
```

**Stats**
Check when stats was last updated for tables in a given schema
```
SELECT OBJECT_NAME(st.object_id) AS [ObjectName]
      ,st.[name] AS [StatisticName]
      ,STATS_DATE(st.[object_id], [stats_id]) AS [StatisticUpdateDate]
FROM sys.stats st
inner join sys.objects o on o.object_id = st.object_id
inner join sys.schemas s on s.schema_id = o.schema_id
where s.name = '<schema name>';
```
Write github reviews comments from vim
Tags: github, nvim, review
Published: 2021-01-02 14:04:11

---
title: Write github reviews comments from vim
series: git tools
published: true
tags: github, nvim, review 
---

[Critiq](https://github.com/AGhost-7/critiq.vim) is a neovim plugin to review github pull requests. 

To setup Critic you have to set environment variables in your shell. 
Be aware - if you want to use it in a corporate field, you access token should authorized the sso from your organization.

Usually you are doing it in exporting this in you shell rc file. 
In my case it is the `~/.zshrc` in bash it is in the `~/.bashrc`

```bash
export GH_PASS="Your github token generated [here](https://github.com/settings/tokens)"
export GH_USER="YourGithubUsername"
```

With `:Critiq` you get an separated buffer with all the open pull requests. 

With enter, you will open the diff which belongs to the pr.
With `:CritiqCommentLine` you can right away commenting on the line. It will open a separated split buffer. With `:CritiqSubmitComment` 
it will post your comment on github. 

In the case that you are satisfied with the PR, you can also use `CritiqApprove` to approve the request.

Sadly this extension is not touched for a long time. It will still do the work, but occasionally you will facing some error, if you want to open a pr. But in general you are able to work with that extension.

This are the main feature in my opinion. 

But there are a lot more possibilities if we take a look on the Commands:

``` 
:CritiqApprove
:CritiqBrowsePr
:CritiqCheckout
:CritiqComment
:CritiqCommentLine
:CritiqDeleteBranch
:CritiqEditLabels
:CritiqListComments
:CritiqListCommits
:CritiqLoadMorePrs
:CritiqMerge
:CritiqOpenFile
:CritiqOpenPr
:CritiqPull
:CritiqRequestChanges
:CritiqSubmitComment
:CritiqSubmitReview
:CritiqToggleLabel
```

I will try to adapt my workflow and figuring out if this will feel comfortable, but it looks promising.
Expo RN Boilerplate - React Navigation & Redux
Tags: reactnative, expo, mobile, javascript
Published: 2021-01-02 13:56:23

Sometimes my customers want me to build an app and all of these projects, I create everything from scratch. So I decided to build a boilerplate that includes `Expo`, `React Navigation` and `Redux` 🤓

I built a little counter app and I think it's okey for start 🥳

You can check it out on Github and if you want to make it better, just hit the pull request button for the sake of community ✊🏻

[Expo Boilerplate](https://github.com/lahmacun/expo-boilerplate)
Open Source Web/API Monitoring Tool - Developed based on DDD principles
Tags: monitoring, devops, csharp, opensource
Published: 2021-01-02 13:51:11

Ketum is a cross-platform and open-source application that enables you to easily test and monitor your website’s health.

[source code](https://github.com/berkansasmaz/ketum)

Monitor your Website and APIs from your on-premises server and never miss any problem on your website with our E-mail notifications.

## Features
**WEBSITE TESTING**
Our convenient platform allows you to monitor the health of your website effortlessly. The testing process is quick, reliable, and simple. You can receive your results in no time so that you don’t have to wonder about the status of your site!

**TRACK HEALTH**
Ketum provides you with simple and easy-to-read charts that track your website’s health, and you will have access to charts displaying your uptime, response time, and other test results.

**Instant Notifications**
Never miss any problem on your website with our E-mail notifications.
What programming languages are great to learn how to grow to be a device analyzing engineer?
Tags: machinelearning, machinelearningtrainingonline, healthydebate
Published: 2021-01-02 13:40:40

Python and R are the most well-known programming languages for system studying, data era, and analytics, consistent with a Nuggets survey. Python had a 66% share of residents who used the tool in 2018--an increase of 11% from 2017. Meanwhile, R had a forty nine% proportion in 2018, down 14% from 2017.
Check Out <a href="https://www.igmguru.com/machine-learning-ai/machine-learning-certification-training/">Best Machine Learning course</a>
An IBM document ranked Python, Java, and R due to the fact the top languages for device analyzing engineers, located via way of manner of C++, C, JavaScript, Scala, and Julia
When developing device mastering programs, the education and operational ranges for algorithms are unique, as stated with the beneficial aid of our sister internet website ZDNet. Therefore, a few human beings use one language for the education segment and each unique one for the operational segment.
"For 'everyday machine studying,' it does not matter what language you operate," Luiz Eduardo Le Masson, facts technological information chief at Stone Co., instructed ZDNet.
Mapping historic market data
Tags: crypto, blockchain, javascript
Published: 2021-01-02 13:33:57

---
title: 'Mapping historic market data'
tags:
  - crypto
  - blockchain
  - javascript
cover_image: https://cri.dev/assets/images/posts/market-data.png
published: true
canonical_url: https://cri.dev/posts/2017-12-11-Mapping-historic-market-data/
---

**Originally posted on [cri.dev](https://cri.dev/posts/2017-12-11-Mapping-historic-market-data/)**


Market data is generally represented as an array of arrays, and each entry is a data point that represents a "snapshot" of the market in a given period of time.


Each data point contains information like the timestamp, open/close price, high/low price and the volume of transactions in this period.

![market data](https://cri.dev/assets/images/posts/market-data.full.png)

Here is a recent sample of a few data points for the currency pair `LTC-EUR` on the market [`gdax`](https://www.gdax.com/):

```js
const marketData = [
  [
    1513025761,     // time
    161,            // low
    163.11,         // high
    162.98,         // open
    162.67,         // close
    823.99626973    // volume
  ],
  [
    1513024062,
    157.22,
    164.01,
    157.5,
    163,
    5343.671050650007
  ]
]
```

## map to array of objects

To get a more pleasant array of objects to work with, you can map the array structure to an Object with named property like this:

```js
marketData.map(h => ({
  time: h[0],
  low: h[1],
  high: h[2],
  open: h[3],
  close: h[4],
  volume: h[5]
}))
```

And the result would be the following:

```json
[
  {
    "time": 1513025761,
    "low": 161,
    "high": 163.11,
    "open": 162.98,
    "close": 162.67,
    "volume": 823.99626973
  },
  {
    "time": 1513024062,
    "low": 157.22,
    "high": 164.01,
    "open": 157.5,
    "close": 163,
    "volume": 5343.671050650007
  }
]
```

## Map to array of objects grouped by key

It can also be interesting to have the data grouped by key.

You can achieve this, reducing each key to an array of the corresponding values:

```js
Object.keys(marketData[0]) // ['time','low','high','open','close','volume']
.reduce((acc, key => ({
  ...acc,
  [key]: marketData.map(data => data[key]) // returns an array of values for each key
}), {})
```

```json

{
  "time": [1513024062, 1513025761],
  "low": [157.22, 161],
  "high": [164.01, 163.11],
  "open": [157.5, 162.98],
  "close": [163, 162.67],
  "volume": [5343.671050650007, 823.99626973]
}
```

---

Discuss these thoughts with me on [twitter](https://twitter.com/christian_fei)!


**Originally posted on [cri.dev](https://cri.dev/posts/2017-12-11-Mapping-historic-market-data/)**
➜  christian-fei.github.io git:(master)
Functional JavaScript: Write your own negate/not function
Tags: javascript, node, tutorial
Published: 2021-01-02 13:32:36

---
title: "Functional JavaScript: Write your own negate/not function"
tags:
  - javascript
  - nodejs
  - tutorial
  - javascript
published: true
canonical_url: https://cri.dev/posts/2015-05-09-Functional-JavaScript-write-your-negate-not-function/
---

**Originally posted on [cri.dev](https://cri.dev/posts/2015-05-09-Functional-JavaScript-write-your-negate-not-function/)**

Let's say you want to filter odd numbers from a list of numbers, like `[1,2,3,4,5,6]` should become `[1,3,5]`.

One way to solve this problem in a functional fashion is to provide an `odd` filter function, that is internally composed by a negation of an `even` filter on those numbers.

So, let's define these functions step by step:

```
function odd(number){
  return not(even)
}

function not(predicate){
  return function(){
    return !predicate.apply(this, arguments)
  }
}

function even(number){
  return number % 2 == 0
}
```

The `even` function needs no explaination, where the `functional magic ®` happens is in the `odd` and `not` functions.

`odd` takes a number and uses the `even` filter, by negating it with `not`, to determine whether a number is odd or not.

`not` just wraps the `predicate` function passed in and negates its application. Note that this application makes sense with functions that return boolean values, thus the name `predicate`.

---

One use case could be in combination with `Array.prototype.filter`:

```
[1,2,3,4,5,6].filter(not(even))

// or

[1,2,3,4,5,6].filter(odd)
```


**Originally posted on [cri.dev](https://cri.dev/posts/2015-05-09-Functional-JavaScript-write-your-negate-not-function/)**
➜  christian-fei.github.io git:(master)
Old website, new design
Tags: wordpress, webdev, website, discuss
Published: 2021-01-02 13:31:25

I'm using **WordPress** for the website and I added this year(2021) a new design on it. Is still **WordPress** a good choice in 2021 ? I would love to have some feedback about **WordPress**, **design** and the **blog** part.

Website: https://stefaniq.com/
My twitter: https://twitter.com/StefanCraciun5

Thank you!
How your work as a web/software developer/designer have helped your clients and their business? 
Tags: discuss, wevdev
Published: 2021-01-02 13:26:46

---
title: How your work as a web/software developer/designer have helped your clients and their business? 
published: true
description: 
tags: discuss, wevdev
//cover_image: https://direct_url_to_image.jpg
---
Has your work helped the clients increase their revenue, help them cut down costs, increase their customers etc?
Rust is very fun
Tags: rust
Published: 2021-01-02 13:20:48

---
title: Rust is very fun
published: true
description: 
tags: Rust
//cover_image: https://direct_url_to_image.jpg
---

I read books about Haskell.
I thought its type system was great.
However, I couldn't get used to the ML-like syntax.
And side effects in Haskell are too difficult for me.
I am a C/C++ user.

I have found Rust to be a good programming language with a type system similar to Haskell and a C-like syntax.
I tried writing [some programs](https://github.com/search?l=Rust&q=user%3ASaitoAtsushi&type=Repositories) in Rust.
Very fun.
I am frustrated that I do not have the English ability to convey this fun.
YouTube Video |React hooks 4 - useEffect only once & useEffect with cleanup
Tags: react, javascript, webdev, youtube
Published: 2021-01-02 13:15:42

In this video we will continue with the useEffect hook. We will learn the useEffect only once & useEffect with cleanup case.

{% youtube oLUGSIcwAN4 %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video |React hooks 3 - useEffect after render & Conditional useEffect
Tags: react, javascript, webdev, youtube
Published: 2021-01-02 13:10:42

In this video we will learn to use the useEffect hook after render & also to conditionally run useEffect.

{% youtube zSv1IylhI0s %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video |React Hooks 2 - useState with previous state, object, array
Tags: react, javascript, webdev, youtube
Published: 2021-01-02 13:06:33

In this video we will learn to use the useState hook with previous state, then object and last with array.

{% youtube 8T34wNQTi6Y %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video |React Hooks 1 - Introduction and useState Hook
Tags: react, javascript, webdev, youtube
Published: 2021-01-02 13:02:23

In this video we will get an introduction to React Hooks. We will also learn to use the most important hook i.e. useState hook .

{% youtube 7PukNGgvMI8 %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
Daily Developer Jokes - Saturday, Jan 2, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-01-02 13:00:06

---
title: "Daily Developer Jokes - Saturday, Jan 2, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Saturday%2C%20Jan%202%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12593d119ae.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
There are 10 types of people in this world, those who understand binary and those who don't.
 -->
Codewars 6 kyu I Roman Numerals Decoder
Tags: javascript
Published: 2021-01-02 12:57:07

```
function solution(roman) {
  const value = { I: 1, V: 5, X: 10, L: 50, C: 100, D: 500, M: 1000 };
  const splitted = roman.split("");
  let result = 0;
  for (let i = 0; i < splitted.length; i++) {
    if (value[splitted[i]] < value[splitted[i + 1]]) {
      result -= value[splitted[i]];
    } else result += value[splitted[i]];
  }
  return result;
}
```
Interesting/ Useful Topics for posts.
Tags: python, machinelearning, discuss, firstpost
Published: 2021-01-02 12:55:54

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e5tao55fzeruy4x1adw7.jpg)
Hello [Dev.to](dev.to) community members!

I am just starting my [Dev.to](dev.to) journey! So I'm interested to write some posts to share my knowledge but want to do a little survey first.

1. What specific topics will you want to read about among the following broad areas?
  * Rest, gRPC, MQTT, Socket
  * OOPs
  * Python 
  * Design Patterns
  * Data Structures 
  * Algorithms
  * System Design (High Level)
  * Reinforcement Learning
  * Databases (SQL/NoSQL)
  * Machine Learning

2. What should be the content level? 
  * Beginner
  * Intermediate
  * Advanced

3. What are the things which you feel missing or lacking in the posts here?

Also, I would love to receive links/suggestions which will be helpful for me to create awesome posts.

Connect with me on Twitter! [@shreyansh_ag](https://twitter.com/shreyansh_ag)
Currency Converter | Javascript Build
Tags: javascript, webdev, 100daysofcode, beginners
Published: 2021-01-02 12:52:38

### 3rd Project for Javascript Build.

![Converter Mockup](https://dev-to-uploads.s3.amazonaws.com/i/i62wdoc7eq9bdsj2sdtf.jpg)
# [Live Demo](https://vaishnavme.github.io/builds-Javascript/Currency-Converter/)

{% github vaishnavme/https://github.com/vaishnavme/builds-Javascript no-readme %}

#### learnings
- Special way to work with promises <b>[Async/Await](https://javascript.info/async-await)</b>.

- Adding option to `HTML select` using Javascript.

-----------------------

If you built your version of them please tag me, I would love to try them out.

Find any bugs or have any suggestion please Write to me.

#### Let's Connect 😄

[<img src="https://img.shields.io/badge/linkedin%20-%230077B5.svg?&style=for-the-badge&logo=linkedin&logoColor=white"/>](https://www.linkedin.com/in/vaishnav-chandurkar/)[![Generic badge](https://img.shields.io/badge/DEV-black.svg?style=for-the-badge)](https://dev.to/vaishnavme)[<img src="https://img.shields.io/badge/Twitter%20-%231DA1F2.svg?&style=for-the-badge&logo=Twitter&logoColor=white"/>](https://twitter.com/vaishnav21_?s=09)
Running TYPO3 11 with ddev
Tags: typo3, ddev, nginx, apache
Published: 2021-01-02 12:43:26

I recently started a new Project with TYPO3 11 and ddev, there a two things your should be aware of. 

1. Make sure to use ddev 1.16.5 or never.
2. Add the default `.htaccess` to you `public`-folder, otherwise the backend Route will not work.

My setup is as you see, with `apacehe-fpm`. 

When Running with `nginx-fpm` no additional configuration is needed besides `ddev 1.16.5` or never. 

```config
RewriteEngine On

RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|uploads/) - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} ^/typo3/.*$
RewriteRule ^typo3/(.*)$ %{ENV:CWD}typo3/index.php [QSA,L]
```
Codewars 5 kyu I Where my anagrams at?
Tags: javascript
Published: 2021-01-02 12:43:22

```
function anagrams(word, words) {
  let result = [];
  const sortedWord = word.split("").sort().join("");
  for (let i = 0; i < words.length; i++) {
    let sortedWords = words[i].split("").sort().join("");
    if (sortedWord === sortedWords) {
      result.push(words[i]);
    }
  }
  return result;
}
```