teleren/devto huggingface dataset:
InMemory, Columnar database - DuckDb integration with Qt for data analytics
Tags: cpp, database, qt, duckdb
Published: 2020-10-30 06:22:58

For the complete repository download link, visit: https://github.com/chilarai/qt-duckdb

How DuckDB fits the role in OLAP processing

1. In data analytics, Columnar databases help with Online Analytical Processing (OLAP) workloads since the queries touch across a subset of columns but a large number of rows for those columns. 
2. Also often, an embeddable database is needed that can be integrated into the program without any dependencies, just like Sqlite (a dynamic library and a header file are the only things needed to integrate with your application). 
3. It supports SQL syntax for data query
4. Lastly, if the database can reside inside memory (ie, in the system's RAM), a lot of time in I/O ops is saved, and hence it's fast.

## Qt5 project integration

This demo project will cover the compilation on **Mac** only. However, it will not be very difficult to compile on other platforms. All that is needed is to download the required binaries (linked libraries, eg, .dll, .so files) for the respective platforms.

Link to the required binaries: https://duckdb.org/docs/installation/

**The following steps are already done inside the project. This is only required for fresh projects.** After downloading, the following configuration needs to be done.

* Copy the `libduckdb.dylib` & `duckdb.hpp` files in the Qt project root.

* Adjust the `.pro` file to add the library. The following line needs to be added in the file for **Mac**

```
macx: LIBS += -L$$PWD/./ -lduckdb
```

The path can be adjusted in **-L\$\$PWD/./**.

For other platforms, follow the instructions on https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

* Import `duckdb.hpp` file in the project

## The `DuckCRUD` class
This class contains all the methods to connect to an InMemory instance of DuckDb and perform CRUD operations

* Import `duckdb.hpp` file

```
    #include "duckdb.hpp"
```
* Contains `Q_INVOKABLE` methods for **CRUD** operations

```
    Q_INVOKABLE void insertData();
    Q_INVOKABLE QStringList readTableData();
    Q_INVOKABLE void updateData();
    Q_INVOKABLE void deleteData();
```

* A signal to notify if data is updated in the class. This signal is received on the QML code to update the view

```
signals:
    void dataUpdated();
```

* Instantiate `duckdb` object and a connection

```
private:
    duckdb::DuckDB db;
    duckdb::Connection con;
```

* In the constructor, default in-memory database, connection are defined. Also, a default table with some data is created

```
DuckCRUD::DuckCRUD(QObject *parent) : QObject(parent),
    db(nullptr), con(db), counter(1)
{

    // Create a table in the constructor and insert some default values

    con.Query("CREATE TABLE people(id INTEGER, name VARCHAR)");
    con.Query("INSERT INTO people VALUES (0,'Mark'), (1, 'Hannes')");
}
```

That's it. It was easy, wasn't it?
First 6 pull requests DONE!
Tags: hacktoberfest, react, javascript, github
Published: 2020-10-30 06:09:31


### Hey guys
I am Akaash, a software developer from Pune, India. I like working in frontend and previously I have worked on custom Alexa skill kits and machine learning POCs. I joined DEV community to keep myself updated about technology which I love and what's new going on in the world. That's how I came across #hacktoberfest and decided to participate.   
 
### New to open source

I have been using open source tool for quite few years now and I want to give back to the community. Taking part in Hactoberfest gave me the opportunity to do that and I will continue to do so hence forth. 
[**My first PR**](https://github.com/thamara/time-to-leave/pull/380) was for for [Time-to-leave](https://github.com/thamara/time-to-leave) application had an window alignment issue, though it was minor changes figuring out what is causing that issue was challenging. Fixed the issue with CSS and submitted the PR.

### Current Hacktoberfest status
Now I have successfully submitted 6 PRs, all of them accepted by maintainer. Four PRs passed the review period and counted toward completing the Hacktoberfest challenge! Remaining 2 will be accepted in next few hours. 
#### Links to my PRs:
1. [Preference window alignment issue fixed](https://github.com/thamara/time-to-leave/pull/380) for **time-to-leave**
2. [Sum of AP](https://github.com/ahampriyanshu/algo_ds_101/pull/738) in JS for **algo_ds_101**
3. [Personal card](https://github.com/zero-to-mastery/CSS-Art/pull/157) with flip animation using pure HTML and CSS for **CSS-Art** 
4. [ReactJs NavBar](https://github.com/codeclassifiers/react30_8_header/pull/4) for **react_headers**
5. Made UI changes for [olWebsite-React](https://github.com/oneleif/olWebsite-React) and then I was invited to join Oneleif organization!
6. Added feature: [Alert user before closing tab/window](https://github.com/s-katte/Sketchify/pull/16) for [**Sketchify**](https://github.com/s-katte/Sketchify)


### In the end
My Hacktoberfest 2020 experience been awesome! Got chance to work on some exciting stuff and I will continue to participate in coming years. Even though #Hacktoberfest2020 is officially over, this wont stop me from contributing to open source, will continue to do it all round the year.

Do check out my [**Github profile**](https://github.com/akaash11) and live a star if you like it.
Follow me for interesting facts on Javascript, ReactJS.

Happy hacking!
JavaScript Array.flat()
Tags: javascript
Published: 2020-10-30 05:49:50

Arrays with embedded sub arrays can be concatenated using `Array.flat()`

```js
const array = [1, 2, 3, 4, [5, 6]]
const flatArray = array.flat() // [1, 2, 3, 4, 5, 6]
```

The depth can be specified using an argument. `Array.flat(depth)`

```js
const array = [1, 2, 3, 4, [[[5, 6]]]]
const flatArray = array.flat(1) // [1, 2, 3, 4, [[5, 6]]]
```

```js
const array = [1, 2, 3, 4, [[[5, 6]]]]
const flatArray = array.flat(3) // [1, 2, 3, 4, 5, 6]
```
Svelte 컴포넌트 런타임 API
Tags: javascript, svelte, korean
Published: 2020-10-30 05:06:34

컴포넌트 내에서 this 를 사용할 수 없다.
추출 당시 버전: Svelte 3.19.4

- `$$invalidate`: 
- `$$props`: 컴포넌트 속성
  - `$$scope`: 런타임 스코프 가이드
    - `ctx`: 바인딩 컨텍스트 (전역속성)
  - `$$slots`: 컴포넌트 슬롯 구조
    - `[default|name]`: 슬롯 정의 명칭. 생성한 순으로 배열 기록
      - 각 속성의 배열 길이로 컴포넌트 하위 슬롯 포함 여부만 알 수 있음.
- `$$scope`: 런타임 스코프 가이드 (전역, $$props.$$scope 내용과 동일)
- `$$self`: 컴포넌트 인스턴스 (`import { current_component } from 'svelte/internal'` 선언 결과와 동일)
  - 컴포넌트에 선언한 prop 이 있다.
  - `$$` 인스턴스에서 각 기능 선언에 대한 런타임 속성
    - `after_update`: 컴포넌트 내 선언한 `afterUpdate` 콜백 모음
    - `before_update`: 컴포넌트 내 선언한 `beforeUpdate` 콜백 모음
    - `bound`: 
    - `callbacks`: `onclick` 같은 이벤트 바인딩 함수 구조
    - `context`: Context API로 선언한 컴포넌트 컨텍스트
    - `ctx`: 사용 불가
    - `dirty`: 
    - `fragment`: 
    - `not_equal(a,b)`: `<svelte:options immutable>` 적용에 따른 검증 함수
    - `on_destroy`: 컴포넌트 내 선언한 `onDestroy` 콜백 모음
    - `on_mount`: 컴포넌트 내 선언한 `onMount` 콜백 모음
    - `props`: 런타임에서 관리하는 컴포넌트 속성
    - `skip_bound`: `Boolean`
    - `update`: 런타임 내 컴포넌트 업데이트 함수. 사용불가
- 각종 `let` 및 `const` 등으로 선언한 변수/상수들
- `slots`: 런타임 슬롯 생성 함수 (`$$props.$$slots` 속성과 동일하며 각 슬롯명 내 배열 길이로 슬롯 내용 여부 판단만 가능)
- `this`: `undefined`
- `writable_props`:
How to get the profile picture of a GitHub account
Tags: howto, markdown, github, programming
Published: 2020-10-30 07:54:57

---
title: How to get the profile picture of a GitHub account
published: true
date: 2020-10-30 05:00:00 UTC
tags: Howto,markdown,GitHub,Programming
canonical_url: https://10xlearner.com/2020/10/30/how-to-get-the-profile-picture-of-a-github-account/
---

Hello ! I’m Xavier Jouvenot and in this small post, we are going to see how to get the profile picture of a GitHub account.

_Self promotion_: You can find other articles on my [website](www.10xlearner.com) 😉

## Small Backstory

When following a [GitHub Learning Lab course](https://lab.github.com/), I ended up creating a portfolio using [Markdown](https://github.com/Xav83/markdown-portfolio).

During this course, I wanted to integrate my GitHub profile picture, and not have to update it, if, in the future, I update it (the photo is 8 years old, so I should probably update it 😆).

## Solution

When digging on the internet to find a solution to this problem, I found out that GitHub gives you access to a lot of information, if you want to invest the time to get it.

But regarding the profile picture, it is actually really easy to get. All you have to do is to access the following url, and you will have access to the profile picture of the account of you choice:

```
https://github.com/<github_username>.png
```

Using this url, I have been able to integrate my profile picture in the markdown file like so:

```
![GitHub profile picture](https://github.com/Xav83.png)
```

And just like that, I have been able to access dynamically to my GitHub profile picture and to include it in my markdown portfolio.

* * *

Thank you all for reading this article, And until my next article, have a splendid day 😉
What is GitHub Code Scanning?
Tags: github, devops, devsecops, codequality
Published: 2020-10-30 04:54:27

One year ago, GitHub welcomed Semmle. Now, thanks to the thousands of developers in the community who tested and gave feedback, GitHub code scanning is generally available.

And today we take a first look at it.

### Intro

So, what is GitHub Code Scanning?

Code scanning is a feature that you can use to __analyze the code in a GitHub repository to find security vulnerabilities and coding errors__.

![Code Scanning](https://dev-to-uploads.s3.amazonaws.com/i/1eaxuqce2orwi6loq6pi.png)

If code scanning finds a potential vulnerability or error in your code, GitHub displays an alert in the repository. And after you fix the code that triggered the alert, GitHub closes the alert.

### The Video

Let's see how to enable and use it.

Enjoy the watch!

{% youtube A8SERCUE-i4 %}

([Link to the video: https://youtu.be/A8SERCUE-i4](https://youtu.be/A8SERCUE-i4))

### Availability

As a final note, Code scanning is __free for public repositories__.

For private repositories, instead, code scanning is available in GitHub Enterprise through Advanced Security.

### Conclusion

What do you think of Code Scanning? I think it is a __very cool feature__, and I'm already using it in all my repos.

Let me know in the comment section below if you want me to go deeper into this topic and create a longer video about it.
HACKTOBER FEST 2020
Tags: hacktoberfest, firstyearincode, opensource, github
Published: 2020-10-30 04:53:37

Hey!👋 Dev fam,
I am a second year c.s.e undergrad at VVCE, Mysore. I also work as the Head of Social Media in an Ed-tech startup.

I've been learning Web-dev since past couple of months and have done a Microsoft Technology Associate certification:HTML5 Application Development Fundamentals.

I came to know about Hacktoberfest last year in the month of November when I saw one of my classmate wearing the Hacktoberfest T-shirt. I got to know about open source from O.S.L, VVCE.        I knew that I wanted to explore what was it all about.

I'm glad to share that all my pull requests passed the review period today at 12:29 a.m.

Contributions:
1. https://github.com/osl-vvce/open-hack-sprint/pull/21 to osl-vvce/open-hack-sprint
2. https://github.com/osl-vvce/open-hack-sprint/pull/33 to osl-vvce/open-hack-sprint
3. https://github.com/CodeMacrocosm/HacktoberFest2020/pull/112 to CodeMacrocosm/HacktoberFest2020
4.https://github.com/CodeMacrocosm/HacktoberFest2020/pull/113 to CodeMacrocosm/HacktoberFest2020

I look forward to more contributions and learnings from the open source community.

HACKTOBER FEST 2020,this has been my first time but will not be my last time for sure. I insist everyone to spread the word too. as there are many aspiring developers who don't know about this Fest yet. The journey has been wonderful

Nikhil Mishra
Understand How VRF Systems Work 
Published: 2020-10-30 04:44:53

Variable Refrigerant Flow (VRF) Systems exhibit heat recovery capabilities along with simultaneous heating and cooling. The VRF technology (an HVAC technology) systems popularly used, have benefits like individual temperature control, the requirement of minimized ductwork etc. VRF technology has a single outdoor condensing unit, multiple indoor units that serve many zones, refrigerant piping with branch selectors, speed modulation, and has zoning capabilities. These properties make VRF Systems about 20-30% more efficient than conventional HVAC systems. 

VRFs use refrigerant as the cooling and heating medium. The refrigerant is conditioned by outdoor condensing units (single or multiple) and then circulated within the area to be cooled to multiple units. Because of the feature of speed control, VRF units perform only as per the required rate. This results in tremendous savings on energy at load conditions. The property of heat recovery helps the individual indoor units to heat or cool as needed. 

It is seen that VRFs are available in two system formats – 2 pipes and 3 pipes systems. All zones will either be in cooling or in heating through the two-pipe system. The heat recovery systems can heat some zones and cool others, all at the same time. This can be achieved through a three-pipe system. 

Bin Dasmal Contracting provides reliable installation, testing & commissioning of VRF units. One of their key projects was with the Al Maktoum Hospital. Bin Dasmal Contracting has over four decades of experience in Civil and MEP services with MEP contracting and MEP maintenance.

Bin Dasmal Contracting is known to provide guaranteed [VRF system maintenance in Dubai](https://www.bindasmalcontracting.com/air-conditioning-plumbing-services-uae/). The Company has its team of experts and a deep commitment to providing the best service to its clients. The Company is committed to providing 24x7 customer care, quality services, timely delivery and quick service to its clients.
DIY GIPHY app for Microsoft Teams
Tags: webdev, javascript, devrel, github
Published: 2020-10-30 04:37:34

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

I love building apps for Microsoft Teams and it has gotten even easier with the VSCode extension [Microsoft Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension/?WT.mc_id=m365-9320-rwilliams)

Did you know you can create

- Tab
- Bot
- Messaging extensions

for Microsoft Teams using this toolkit?

[Search based messaging extensions](https://docs.microsoft.com/en-gb/microsoftteams/platform/messaging-extensions/how-to/search-commands/define-search-command?WT.mc_id=m365-9118-rwilliams) are fun to build. You search from an external system (via an API), get response in a list/grid and then do some action with the selected item.

So when I was thinking; what is the best way to demo this in an easy fun way? and the answer was GIPHY (one of the most used messaging extension in my chats)

I am one of those people who does not shy away from using GIFs in an informal chat. And basically it is a search based messaging extension app so I knew I had to try build this.

You can also have more control over the search API for GIPHY this way.

Here is how it looks 😁

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

Now, do you want to build this? Do you want to build an app for Microsoft Teams? 🚀

[Step by step process to re-create your own GIPHY app using the Teams Toolkit](https://rabiawilliams.com/teams/search-msgext-giphy/)

The [sample](https://github.com/pnp/teams-dev-samples/tree/master/samples/msgext-search-giphy?WT.mc_id=m365-9118-rwilliams) is also available in PnP Microsoft Teams Samples here in [aka.ms/teams-samples](aka.ms/teams-samples)
3 Tips for Better Code Reviews
Tags: codequality, tutorial, programming, career
Published: 2020-10-29 21:51:13

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

# Introduction

Just like death and taxes, code reviews are simply a part of life. We've all had them, and some of us have even given them. Why is it then, that many of us are so bad at it?

The purpose of a code review is simple: to ensure that the code being merged into the codebase is up to a certain standard. On paper it sounds easy, but it becomes a lot more complicated when you factor in the interpersonal dynamics at work.

The secret is that code reviews can be done well, and without a great deal of pain. In this post, I will outline some guidelines and tips for enabling a better code review process within your organisation.

## Leave your ego at the door

Code reviews are not an opportunity for the people you work with to criticise you through the medium of code. If a colleague points out an improvement to make to your code, it is almost never because they hate you.

On the other side of the table: code reviews are not a time for you to mercilessly rip into someone because they bruised your ego in a meeting or took the last doughnut.

Code reviews are an opportunity to collectively make better software, and should be seen as nothing else.

## Automate what you can

Code reviews can be a time consuming exercise, especially when we have our own work to be doing too. A lot of time can be wasted on flagging up typos, dead code- not to mention the political hand grenade that is naming conventions.

Luckily, most of us are using build tools nowadays and we can add things like unit test runners and  linters such as ESLint for JavaScript/TypeScript into the build process. This allows us to focus on more important things in a code review, such as verifying that the code actually solves the business problem.

Also, by automating these checks you are delegating checking for simple bugs and stylistic errors to an automatic process, and you can't argue with a machine. Most of these checks can be run before every commit too, so offending code never actually makes it into the repository in the first place.

## Good is better than perfect

Code can always be improved, but anything past good code is diminishing returns. As much as we all want to think that we write flawless code, there is almost always some improvement that can be made.

Sometimes you will encounter a piece of code that passes all of the tests and is by all accounts good code, but you think of something that would make it better. Unless your change would make the code objectively better i.e. more efficient or more readable, just leave it.

It's easy to disappear down a rabbit hole, and at the end you've spent an extra 2 days refactoring the code but it adds no further value to the product, and at the end of the day that's the most important thing.
Website does not load in the WeChat internet browser
Published: 2020-10-30 04:13:33

Good night:

I am in China and I have a WordPress website, hosted on a Colombian server (I am Colombian).

I am trying to access my website through a shared link through a WeChat conversation, but the system does not load the page for me.

I would like to know what I have to do for my website to load in the WeChat Internet browser.

I share a short video where I show the situation:
http://jlaoshi.com.co/wp-content/uploads/2020/10/WeChat_20201030120446.mp4

Thank you for your answers in advance.
AP TWSH Assessment Results 20 20
Tags: aptwsh
Published: 2020-10-30 04:02:08

<a href="http://resultsguru.in/ap-sbtet-typewriting-shorthand-exam-results/">AP SBTET</a> Typewriting & Shorthand Exam Results 20 20: Andhra Pradesh noun country plank is conducted that the AP Typewriting & Shorthand Tests for Recruiting the Typewriting & Shorthand candidates. For those who find themselves Following completion of their Typewriting & Shorthand exams according to the timetable of ap sbtet Exams. After completion of exams, the Board starts the Paper correction after completion of answer newspaper test process of AP SBTET Typewriting & Shorthand results date is likely to be announced.

Shorthand Exam Results

AP TWSH Assessment Results 20 20

AP SBTET TW & SH (Higher & Lower-grade ) Exam Results 20 20:
Name of the Authority: AP State Board of Technical Education & Training
Assessment Name: Shorthand & Typewriting (Higher & Lower-grade )
Shorthand Exam: Feb 2020
Typewriting Assessment: Feb 2020
Category: Results
Status: Not Yet Published (Soon)
How to consequences APSBTET Results 20 20:
Here we provided just how to check AP SBTET Typewriting Outcomes and AP SBTET Shorthand Results after completion of the board and examination start the paper test after which results dates are upgraded.

Click on the website we’ve provided below and goto the next step
Afterward the open a fresh page and put in your Application number
Click on Get Outcomes Button
Take a print out and send into your mail for further usage.
AP SBTET Short-hand / Typewriting Results of Feb 20 20
Students those who have attended their exams on Feb month to AP SBTET Typewriting
and AP SBTET Shorthand Tests and keep update to check your AP SBTET TWSH<a href="http://resultsguru.in/">results</a>
and AP SBTET Typewriting & Short Hand Effects.

AP SBTET Typewriting & Short Hand Exam Timetable Aug/Sep 20 20

AP SBTET Typewriting & shorthand Assessment Centers List July/Aug 20 20
[Redis] How To: Remove Redis Keys without TTL (in Ruby)
Tags: ruby, redis, howto, rails
Published: 2020-10-30 03:55:14

## Background
Going to update our caching Redis Server config
to have `maxmemory-policy` become `volatile-ttl`
Doc: https://redis.io/topics/lru-cache

Since we use `allkeys-lru` before and have keys without TTL set ([`TTL key` would return `-1`](https://redis.io/commands/ttl))

Those keys are required to be removed or they will never be evicted after config update

## Code
```ruby
::Rails.application.config.cache_store.redis.with do |c|
  cursor = "0"
  count = 0
  # Fetch keys in batches using SCAN to avoid blocking the Redis server.
  begin
    cursor, keys = c.scan(cursor, count: 1000)
    all_key_count = c.dbsize

    puts("cursor: #{cursor}")
    puts("#{count}/#{all_key_count} keys scanned")

    keys_del = keys.each_with_object([]) do |key, keys_to_be_del|
      # Won't expire
      if !key.match?("sprockets|sidekiq|sessions") && c.ttl(key) == -1
        keys_to_be_del.push(key)
        puts("to be deleted: <#{key}>")
      end
    end
    c.del(*keys_del) unless keys_del.empty?

    count += keys.size
    puts("#{count} keys scanned")
  end until cursor == "0"
end

```

`cursor, keys = c.scan(cursor, count: 1000)`
[`SCAN` is good, `KEYS` is bad](https://redis.io/commands/keys)

`!key.match?("sprockets|sidekiq|sessions")`
This is due to I am testing my code in development and the Redis server is used for sprockets caching, (rack?) sessions, sidekiq and caching
Feel free to remove it if you want

`puts("to be deleted: <#{key}>")`
Just another debugging code
I actually commented this code when running on production

`c.del(*keys_del) unless keys_del.empty?`
[Time complexity: O(N)](https://redis.io/commands/del)
You can choose to collect all keys then remove the keys in batches
Start Project npm install --save bootstrap jquery popper.js axios With Vuejs Cli Project
Tags: vue
Published: 2020-10-30 03:13:56

```npm
npm install --save axios bootstrap jquery popper.js
```

```javascript
/* Bootstrap CSS */
import 'bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css';

/* jQuery */
import JQuery from 'jquery'
window.$ = JQuery
```