teleren/devto huggingface dataset:
Half-Day Builds!
Tags: cpp, python, javascript, dart
Published: 2020-10-27 07:41:40

Hi 🖐,
This post is about the half-day builds! These projects will never be featured anywhere, So why not create a combined thread for them.


<br>**Draw Graphs in C++**
I was looking for a graphics.h project, One day my friend asked me "Did you ever come across any code which Draws the given input graph?", I replied... wait-for-it!
Link: https://github.com/ra101/graphical-representation-of-graphs-in-cpp


<br>**Pinger** (Python)
One of my deployed college project got shut down. This Script executes at startup, starts a headless browser, and open the various sites declared within. All in the background.
Link:https://github.com/ra101/pinger


<br>**lbry VLC Extension** (Lua)
I was looking for a dark theme for VLC and I found out that people can create extensions that can be attached to the final build binary! This extension enables us to network streams free lbry.tv videos.
Link: https://github.com/ra101/lbry.tv-VLC-Playlist-Parser


<br>**Text to Morse Code** (Dart)
A Flutter Trial App, It changes Text to Morse Code and then allows to vibrate the phone or to flicker torch accordingly.
Link: https://github.com/ra101/txt_mrs_vib


<br>**DuckDuckGo Chrome-Ext** (JavaScript)
A Chrome-Extension that adds a button to open the current search with DuckDuckGo. You can also attach a Key-Binding to use it.
Link: https://github.com/ra101/DuckDuckGo-Chrome-Ext
SmartContract on Asset Transfer on XinFin XDC Network
Tags: blockchain
Published: 2020-10-27 07:37:11

Today Tried a #smartcontract on Asset Transfer on XinFin Hybrid Blockchain Network. 
Check the remix.xinfin.network 👇

![XinFin Remix](https://dev-to-uploads.s3.amazonaws.com/i/kqpa89ppvk1xn8t33pz7.PNG)
Tests Granularity
Tags: testing
Published: 2020-10-27 07:36:18

In two previous posts ([Why You Should Write Automated Tests](https://www.innoq.com/en/blog/why-you-should-write-automated-tests/) and [Anatomy of a Good Test](https://www.innoq.com/en/blog/anatomy-of-a-good-test/)) we discussed the benefits of automated tests and the properties of a good test. So far we were trying to avoid differentiating the tests in any way. This time we want to address one way how tests can be classified: [Tests Granularity](https://www.innoq.com/en/blog/tests-granularity/).
Blockchain & Supply Chain — A Far - Reaching Duo
Tags: blockchain, blockchaindevelopmentservice, bitcoin
Published: 2020-10-27 07:36:03

Almost all the big companies around the world have advanced supply chain management software to run the system smoothly. From departmental connections to data sharing and product tracking, all the companies have computerized systems yet companies have limited insights to products and data.

The faults, in most of the cases, are the gaps that exist between the huge data and traditional computerized systems. These systems are able to transfer data only one step down the supply chain. They were suitable, almost 40 years ago, when companies used to have static supply chains, however, they do not sync with the modern supply chain management systems.
https://mobylogix.com/blog/blockchain-supply-chain-a-far-reaching-duo/
Weekly Challenge 084
Tags: perl, weeklychallenge, perlweeklychallenge
Published: 2020-10-27 07:33:46

[Challenge 084](https://perlweeklychallenge.org/blog/perl-weekly-challenge-084/)

# TASK #1 › Reverse Integer

Let's start with the easy bit. To reverse the digits, I split the string into a sign and numbers. I then use the [reverse](https://perldoc.pl/functions/reverse) function to generate the new number.

I couldn't think of an obvious way to figure out if the value was definitively able to be stored as a 32-bit integer, especially since I have a 64-bit OS. For this task, it also doesn't really make sense, since at no time do I actually do arithmetic on that number.

In any case, I check that the new number is within the bounds `>= -( 2**31 )` and `<= 2**31 - 1`, and will return '0' if it is not.

## Examples

```
» ./ch-1.pl 1234
4321

» ./ch-1.pl -1234
-4321

» ./ch-1.pl 1231230512
0
```

# TASK #2 › Find Square

This is very similar to the [Lonely X task](https://perlweeklychallenge.org/blog/perl-weekly-challenge-077/#TASK2) from Challenge 077, but we use '0' and '1', rather than 'X' and 'O'. In fact, I even found a bug in code for that task.

The first step is to slurp the input into an array of arrays with zeros and ones. To make life easy I remove anything in the string that isn't one of these characters. I check that there is at least two rows and two columns, and that the column size is equal for all rows.

I then go through each row and column, except for the last one, as the top left corner of a square cannot be on the right column or bottom row.

If that cell is '0', then we move on to the next row/column as no square would be found. Otherwise I work out the maximum size (the minimum of the remaining rows or columns). For each size, I add to the `@squares` array if all three remaining corners are true (i.e. '1').

Finally, I display the output as well as the matching squares found (if any).

## Examples

» ./ch-2.pl "0 1 0 1" "0 0 1 0" "1 1 0 1" "1 0 0 1"
Output: 1 (row 1 col 2 size 3)

» ./ch-2.pl "1 1 0 1" "1 1 0 0" "0 1 1 1" "1 0 1 1"
Output: 4 (row 1 col 1 size 2; row 1 col 1 size 4; row 1 col 2 size 3; row 3 col 3 size 2)

» ./ch-2.pl "0 1 0 1" "1 0 1 0" "0 1 0 0" "1 0 0 1"
Output: 0
```
5 Productivity Tools for Mobile App Developers
Tags: android, showdev, productivity
Published: 2020-10-27 07:19:36

Developing mobile apps is not easy, and it may take much time and effort. In order to be productive as a mobile app developer, here are some tools that you can use. They help you keep your team on track while providing a useful roadmap for expected due dates.

1. Git (https://git-scm.com/)
Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. This allows you to manage your codes and files about web pages and apps. The Git feature that stands out the most is its branching model; you can use multiple branches for your ideas, test them, and easily backtrack if they don't work.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0k5s6uyqbg3pmdsrcypq.png)

2. Android Studio (https://developer.android.com/studio)
Android Studio provides the fastest tools for building apps on every type of Android device. It has a visual layout editor, an AKY analyzer, and an intelligent code editor, and realtime profilers. Also, it provides a fast emulator to test and run your apps faster than with a physical device and simulate different configurations and features.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/38bmy9gq27rs4zjebqqp.png)

3. Codeshare (https://codeshare.io/)
This is a tool that allows you to share codes with developers. After finishing writing codes, you can use Codeshare to share the copy with your colleagues or developer team, then pair program and troubleshoot together.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/izl00y40iy3ucfzhdx08.jpg)

4. LetsView (https://letsview.com/)
This is a screen mirroring tool that allows you to test your mobile app on PC, including its configurations, features, and performances, thus to know how well it works. You can use this tool to stream your mobile app to a large screen and share it with your developer team for a presentation. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/pobzfoasonghxzq4voii.jpg)

5. Overflow (https://overflow.io/) 
Design is also an important part of a mobile app, and Overflow makes it easy to turn your designs into beautiful user flows. It works with Adobe XD, Figma, Sketch, and Photoshop. It is easy to navigate and interact with your user flows to show the user journey. Besides, it has a cloud sharing feature that enables you to share your user flows and receive feedback, keeping all stakeholders in sync as the project develops.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mltk4yapfx42zdf78etm.jpg)
Need help with testing and build system resources
Tags: beginners, testing, javascript, help
Published: 2020-10-27 07:15:40

I’m a newbie frontend developer. While I’m comfortable with developing applications, I’m struggling with 2 things.

1. Build Systems: I leverage create react app and it’s typescript template while developing applications. I understand how things work at a high level. I struggle with configuring things from scratch. Do you have any resources that would help create a mental model of how things work when it comes to build systems in general?

2. Testing: This is something I’m clueless about. I’m struggling with below aspects.

    a. How is testing different for FrontEnd?
    b. How does one test UI aspects of frontend vs the functionality?


Note: I’m new to Dev.to as well, please let me know if there is a different forum to ask for suggestions/recommendations.
Useful PDF Tools
Tags: ubuntu, pdftools
Published: 2022-06-02 00:41:34

---
title: Useful PDF Tools
published: true
date: 2020-10-27 07:01:06 UTC
tags: Ubuntu,pdftools,ubuntu
canonical_url: 
---

As you probably know, the web standard for sending documents to another party online while preserving the exact style layouts / fonts etc, is by printing documents as a PDF.  
PDF – stands for Portable Document Format, and is owned by Adobe – the same makers of Photoshop.

Most people on the web however don’t use it as often as they should – instead, they assume that everyone owns a copy of Microsoft Word, or PowerPoint, and thus forward you the word document or PowerPoint document.  This is great if you own one of those Microsoft Applications – but if you don’t you will need a plugin to open the document.  This is where the PDF format comes in handy.  Rather then sending a Word or PowerPoint document, when you press print, users can select “Print to PDF”, and then send the resulting PDF instead.

I always scold my sister for sending me Word / PowerPoint Documents because I run an Ubuntu Linux machine as my primary workstation.

If you are interested in starting to use PDF documents however, as a way to send documents that preserve the formatting, then it is helpful to have a few useful tools in your tool-set:

# Tools for Windows / Mac / Linux Users

**A PDF Compressor**  
Sometimes when you create a PDF, it may be too big to send via GMAIL.  To compress it to a smaller size, I found this tool online, straight from Adobe  [https://www.adobe.com/acrobat/online/compress-pdf.html](https://www.adobe.com/acrobat/online/compress-pdf.html)

# PDF tools for Ubuntu (Linux) users only

**A PDF Rotator**  
After creating a presentation on Ubuntu, using Open Office, I found that the resulting PDF printed was all in Portrait mode.  This meant that my presentation, once viewed as an email attachment, was on its side!  This made it very hard to read while on a computer.  I needed some way to rotate each page of the PDF. To do this, I found a very neat linux program that rotates all pages with the following command:

```
java -jar pdftk.jar in.pdf cat 1-endwest output out.pdf
```

pdftk is a free java program you can install on ubuntu by following these steps: [https://askubuntu.com/questions/1028522/how-can-i-install-pdftk-in-ubuntu-18-04-and-later](https://askubuntu.com/questions/1028522/how-can-i-install-pdftk-in-ubuntu-18-04-and-later)

If you know of any other useful PDF tools, please let me know.  I will update this post with more PDF tools that I find.

 

 

 

The post [Useful PDF Tools](https://b3dmultitech.com/useful-pdf-tools/) appeared first on [Paul Preibisch](https://b3dmultitech.com).
Launch youtube videos in mpv with qutebrowse
Tags: automation, qutebrowser, mpv, youtube
Published: 2020-10-27 06:45:14

---
title: Launch youtube videos in mpv with qutebrowse
published: true
tags: automation, qutebrowser, mpv, youtube
---

I am a heavy vim user, so I search for vim bindings for my browser to get a mouse-less browsing and navigation experience. Firefox and Chrome have quite good extensions, but still it was not enough for a pure mouseless experience. So after some search I stumble over [qutebrowser](https://qutebrowser.org/) and I became very soon my main browser.

One of the main feature of qutebrowser is, among the other things, the possibility to launch other processes or scripts via a self defined shortcut. 
I configured my browser in that way, that it fills a playlist, open a playlist in mpv and open a specific video URL in mpv directly. In combination with [yt-dlc](https://github.com/blackjack4494/yt-dlc) I can start any youtube video via broser with mpv.

Usually you would use youtube-dl, but thanks to the DMCA takedown, we have to use a fork, which seams a better alternative because the original Repo experienced a slowdown in development. 

A small disclaimer here: The youtube-dl and there forks are not Abel to download, or stream DRM protected content at all. We will have to wait what will happen to the project and there fork and if the takedown is valid.

```python
config.bind('<Ctrl-Shift-p>', 'hint links spawn --verbose --detach /home/maren/dotfiles/i3/script/fillplaylist.sh push {hint-url}')

config.bind('<Ctrl-Shift-o>', 'spawn --verbose --detach /home/maren/dotfiles/i3/script/fillplaylist.sh play')

config.bind('<Ctrl-Shift-d>', 'hint links spawn --verbose --detach mpv {hint-url} --input-ipc-server=/tmp/mpvsocket')
```

To fill and start a playlist, I wrote a small helper script: 

```bash
#!/bin/bash

if [ $1 == "play" ]; then
echo "play mpv"
    mpv --playlist=/tmp/playlist --input-ipc-server=/tmp/mpvsocket
    rm -f /tmp/playlist
fi 


if [ $1 == "push" ]; then
    echo $2 >> /tmp/playlist
fi 

```
داکر
Published: 2020-10-27 06:15:19

یک مشکلی که خیلی از برنامه نویس ها دارن اینه برنامه ی خودشون رو مینویسن ، تست میکنن ، ران میکنن و نرم افزار به خوبی کار میکنه و هیچ مشکلی دیده نمیشه ! 
روز بعد که برنامه نویس برنامه رو میده به ادمین سیستم  یا کاربر نهایی با یک مشکلی روبرو خواهیم شد اونم این مشکل که نرم افزار ارور داره یا اصلا کار نمیکنه 
خب تو اکثر مواقع این مشکل به خاطر اینه که منابع و کانفیگ های سیستم برنامه نویس با سیستم کسی که میخواد از برنامه استفاده کنه تفاوت داره ! 
و شخص مصرف کننده باید خیلی از وابستگی های و منابع رو دانلود و نصب کنه تازه با همون ورژنی که برنامه نویس روی کامپیوتر خودش داشته ! 

خب برای حل این مشکل یک راه حل بسیار عالی وجود داره و اون هم استفاده از داکر هست ! 
به این صورت که داکر برای شما روی سیستم خودتان قابلیت ایجاد container 
رو میده و میتونید در اون کانتینر برنامه خودتون رو داشته باشید و در نهایت هم از اون کانتینر خروجی به صورت 
image 
بگیرید و به کسی که میخواد از برنامه استفاده کنه تحویل بدید با این کار در حقیقت شما از  تمام اون وابستگی ها هم یک نسخه تهیه کردید به همراه برنامه 
image 
گرفتید 
اگر بخوام بیشتر توضیح بدم باید بگم که شما در واقع می تونید یک ماشین مجازی روی سیستم خود داشته باشید با این تفاوت که دیگ داکر مثل نرم افزار های دیگه مثل 
vm ware 
یک سیستم عامل جدید روی همان سیستم شما بالا نمی اورد و اگر منابع مشترکی بین ماشین مجازی داکر و کامپیوتر شما وجود داشته باشد از همان به صورت اشتراکی استفاده میکند
Take Windows 10 to Next Level with PowerToys 🔥
Tags: tutorial, showdev, discuss, windows
Published: 2020-10-27 05:45:08

I'm a lifetime windows 10 user, not because I like it. It's because I can only afford this. But Windows has never been an issue for me. I really like its aesthetics and features. in this article I'll show you how you can take your windows 10 to next level.

# What is PowerToys?

In a nutshell, PowerToys is a collection of some tools that makes your experience better, and yeah it's by Microsoft.

# Installation

The installation is pretty easy,
Go to the [this](https://github.com/microsoft/PowerToys/releases/) link and download and install the latest version.

This is the first screen you'll see when you open it for the first time.

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

It has 8 features

1. ColorPicker
2. FancyZones
3. File Explorer Add ons
4. Image Resizer
5. Keyboard Manager
6. PowerRename
7. PowerToys Run
8. Shortcut Guide

## 1.ColorPicker

When you hover your mouse cursor over the color you would like to copy, press the left mouse button. If you want to see the area around your cursor in more detail, scroll up to zoom in. The copied color will be stored in your clipboard in the format that is configured in the settings (HEX by default)

![gif](https://raw.githubusercontent.com/wiki/microsoft/PowerToys/images/colorpicker/ColorPicker.gif)

## 2. FancyZones

FancyZones takes the multitasking experience to a whole new level. Basically what is do is you can split your screen into portions of fixed width and height. All the apps will be auto-scaled to that size.

For example, I'm going to split my screen into 3 portions.


![s2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1603715138531/_RYmhY7KD.png)

To use this feature simply press `shift` and drag the window and throw it into the box you want 

## 3. File Explorer Add ons

It allows us to see the previews of SVG and MD files 

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

## 4. Image Resizer

It allows us to resize images of our choice by simply right-clicking on the image 

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

## 5. Keyboard Manager

It helps to remap keys and shortcuts 

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


## 6. PowerRename

It enables us to bulk rename files


![s6.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1603714786435/eBZ14woBz.png)

## 7. PowerToys Run

This is my favorite feature, it allows us to use Windows search from any screen without covering the entire screen. It is similar to Spotlight on Macs. And the best thing is you can customize it to any key combination


![Annotation 2020-10-26 170534.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1603714963563/5jaDX1bj0.png)

## 8. Shortcut Guide

It shows all the shortcuts when the windows key is pressed 

![ha](https://raw.githubusercontent.com/wiki/microsoft/PowerToys/images/shortcut_guide/usage.png)
Let's get more women into tech!
Tags: discuss
Published: 2020-10-27 04:53:18

Good morning!😊 Let's get more women into tech! What you can do as a dev:
👩‍💻Show what you are doing to your female friends and family 
🎬Talk/film/write about what you learn
👩‍💻Organize workshops
💪Encourage and support
What are your ideas?
3 Ways to Redirect a User and Common Pitfalls
Tags: javascript, html, webdev
Published: 2020-10-27 04:48:55

When I was thinking about this post, I thought it would be very short and straightforward. However, it looks like there are at least 3 different ways with pros and significant pitfalls. 

In general, there are 3 ways you can make a redirect.

## HTML meta

```
<meta http-equiv="refresh" content="5; url = https://bit.ly/3okeOK4" />
```

## JavaScript

```
<script type="text/javascript">
    window.location.href = "https://bit.ly/3okeOK4" 
</script>
```

## Server-side redirects

```
# Apache
Redirect 301 / http://www.new-website.com
RedirectMatch 301 /blog(.*) http://www.new-website.com$1
Redirect 301 /page.html http://www.old-website/new-page.html
```

So if you'd like to know their differences and decide which one to use and when then I hope you enjoy this video.

{% youtube iI9fb-nKatY %}

Source code and references:
* [HTML redirect example](https://github.com/FSou1/SeasonedDeveloper/tree/main/html/redirect-to-a-page)
* [JavaScript redirect examples](https://github.com/FSou1/SeasonedDeveloper/tree/main/javascript/redirect-to-a-page)
* [301 & 302 redirect examples](https://github.com/FSou1/SeasonedDeveloper/tree/main/other/redirect-to-a-page)
* [How to Redirect a Web Page](https://css-tricks.com/redirect-web-page/)
* [http-equiv="refresh"](https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh)
How are AWS sandbox playground implemented
Tags: aws
Published: 2020-10-27 04:40:53

---
title: How are AWS sandbox playground implemented
published: true
description: Want to know how are the sandbox like playground implemented to learn cloud service.


tags: aws
//cover_image: https://direct_url_to_image.jpg
---

How are the website like acloudguru implementing the aws/cloud sandbox in their website? 

The only solution coming to my mind is automating the process of creating AWS Organization unit for each users as a separate environment but AWS OU has the quotas limitation. Anyone, tried this?

Are they using the service like https://localstack.cloud/ which allows to test aws cloud services locally.
Meet the Building the Next Digital World Hackathon Winner 
Tags: hackathon, blockchain, ethereum
Published: 2020-10-27 04:23:57

The Building the Next Digital World Hackathon (also the Hacktober festival) has come to an end. The theme for the hackathon was about projects that focus on helping people during this difficult time and beyond. We encouraged all kinds of builders to join us and create a reciprocal world, with the power of blockchain technology.

Builders from countries across Asia and Europe coming together to launch something innovative or create unique solutions for real-life problems. We were truly impressed with all of the projects that came out of this hackathon.

Now it’s time to announce the winners!

<h1>🏆 Most Social Value: Intoo TV</h1>
<b>P2P live streaming platform powered by the blockchain</b>
We often see YouTube or Facebook users being judged on their content by the company itself. That’s why we need decentralized alternatives. If you’re familiar with Instagram, YouTube, or Facebook Live, you’re no stranger to Intoo TV. Unlike the centralized platforms, [Intoo TV](https://devfolio.co/submissions/intoo-tv) is an Ethereum-based live streaming platform that allows you to design, share, and monetize your real-life experiences — you can literally earn ETH every time you go live.

“Love the handsome idea that can already be implemented and offer a social aspect we all need in times of pandemic,” our judge said in the comment.

<h1>🏆 Most Potential: VerityNet</h1>
<b>Fairness apps and architectures for DeFi</b>
In many ways, 2020 is the year of DeFi (or shall we say DeFi-ned or DeFi’ed the year?). [VerityNet](https://devfolio.co/submissions/cellarnet) is trying to solve the problem in the decentralized financial world by building fairness apps and architectures with the help of Aave, zkSnark, zkRollups, and Chainlink Oracle. People can use VerityNet to verify whether the loans are tokenized based on valid proofs, and much more. Also, people can swap between NFT collateral backed loans and fungible collateral backed loans in a seamless manner on VerityNet.

VerityNet is currently on Matic testnet and we can’t wait to see it go live on the mainnet.

<h1>🏆 Best Speculative Design: XPLOR</h1>
<b>A user-owned satellite with a crypto twist</b>
As a satellite-as-a-service platform, [XPLOR](https://devfolio.co/submissions/xplor) empowers a community of people to create satellites or gathering accurate weather data from higher altitudes where users can get precise weather data and be able to forecast weather.

Here’s how it works: With the help of XPLOR app and a relatively small cost (around 0.04 ETH as of October 22), you can launch your personal satellite and monitor weather data. You can also choose to make the weather data public or private.


Huge thanks to all of you who signed up, crafted ideas, built the projects, and embraced the challenges during the 47 days hackathon, you are incredible💪

See you next year! 

---
If you'd like to check out more hackathon projects, please head over [here](https://medium.com/ethplanet/building-the-next-digital-world-hackathon-winner-announced-3f490ec6c999).
Redux Concept and Term
Published: 2020-10-27 04:07:27

Định nghĩa:
Action: có 1 trường Type. Action như là một sự kiện xảy ra. type: "todos/addToDo" payLoad: "Buy Milk"
Reducer: nhận 1 state and 1 action => quyết định nào nên cập nhật và cho ra 1 newState
 -Quy trình: kiểm tra xem reducer có care action không. Nếu có thì copy state và cập nhật cho ra 1 new State. Nếu không thì không thay đổi
Store: là một state live được tạo bằng cách chuyển vào 1 reducer. nó có methold getState để gọi current state. dispatch dùng để update state và pass 1 action vào