teleren/devto huggingface dataset:
Apptron Demo: Shell Scriptable Native APIs
Tags: showdev, html, devops
Published: 2022-08-05 21:45:03

---
title: "Apptron Demo: Shell Scriptable Native APIs"
published: true
description: "In this demo I show off the rest of the Apptron CLI, which exposes most of the cross-platform APIs as commands."
tags: showdev, html, devops
cover_image: "https://i3.ytimg.com/vi/UHFS4STFYXM/maxresdefault.jpg"
---
{% embed https://www.youtube.com/watch?v=UHFS4STFYXM %}

In this demo I show off the rest of the [Apptron](https://progrium.com/blog/apptron-announcement/) CLI, which exposes most of the cross-platform APIs as commands. These commands make great shell scriptable utilities, and you can see how they've been designed to facilitate this. By the end, we'll have created an app indicator (systray) icon and menu that's created and driven by a shell script.

There is a whole class of power users that doesn't always want to take the time to "write a program," let alone learn how. Since the functionality is right there, why not expose it in a way that's useful for these folks? Sysadmins and devops engineers often spend most of their time at a command prompt, so this feature goes out to all of them.

It turns out having a CLI interface to the APIs also makes it easy to do basic regression testing for the project. It also provides a kind of accessible listing of functionality. And! It helps with our polyglot primitive goal, working as a stopgap before having native library support for a language, since nearly all languages can "shell out". 

As I mentioned in the video, this is a strategy I like to use when making generative primitives: maximize utility by providing multiple ways to access features. Like being language agnostic, this helps meet users where they are, and reach users you might not otherwise. There's also often a dominant context people think of for some functionality, so showing it in a new or surprising context helps break people out of existing thought patterns and imagine new possibilities. 

Let's see what possibilities open up with the next demo! In the meantime, [join early access](https://tractor.dev/apptron/) to explore Apptron on your own.

-jeff
VIDEO: How to conduct an employee survey in 3 clicks?
Published: 2022-08-05 21:39:00

In this video, you will find about the best survey tool Ace that will help you to conduct employee survey in just 3 clicks, get free employee survey template, and questions to ask during a survey. 

🔗USEFUL LINKS: 
🎯Free employee survey template https://www.getace.io/templatesutm_source=devto&utm_campaign=templates_promo#test-and-survey
🚀Start 1st survey with Ace - SIGN UP: https://bit.ly/3yiLycy

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

00:35 - What do you mean by employee survey
00:43 - Why employee surveys are important?
01:20 - Free employee survey template 
01:31 - How do I make an employee survey? employee engagement survey 
01:40 - What should be included in employee survey
02:34 - What questions should I ask in an employee survey?

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

Help your team grow with Ace!

FREE ebooks for engineering management & tech leads: https://www.getace.io/ebooks?utm_source=devto&utm_campaign=ebook_promo
Ace's blog: https://blog.getace.io/
Grow This Grow That podcast: https://community.getace.io/
Instagram: https://cutt.ly/vectorly_inst
Twitter: https://twitter.com/VectorlyHQ
✨Web Developement Quotes | Developer Slangs
Tags: webdev, codingslangs, developerquotes
Published: 2022-08-05 21:38:56

“If you think math is hard, try web design.”
-*Trish Parr*

“Design is not just what it looks like and feels like. Design is how it works.”
-*Steve Jobs*

“If you think good design is expensive, you should look at the cost of bad design.”
-*Ralf Speth*

“If you do good work for good clients, it will lead to other good work for other good clients. If you do bad work for bad clients, it will lead to other bad work for other bad clients.”
-*Michael Bierut*

“A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.”
-*Antoine de Saint-Exupéry*

“Digital design is like painting, except the paint never dries.”
-*Neville Brody*

“Socrates said, “Know thyself.” I say, “Know thy users.” And guess what? They don’t think like you do.”
-*Joshua Brewer*

“I want to make beautiful things, even if nobody cares, as opposed to ugly things. That’s my intent.”
-*Saul Bass*

“Good design is all about making other designers feel like idiots because that idea wasn’t theirs.”
-*Frank Chimero*

“I strive for two things in design: simplicity and clarity. Great design is born of those two things.”
-*Lindon Leader*

“Content precedes design. Design in the absence of content is not design, it’s decoration.”
-*Jeffrey Zeldman*

“There is no such thing as a boring project. There are only boring executions.”
-*Irene Etzkorn

“Websites promote you 24/7: No employee will do that.”
-*Paul Cookson*

“It’s not how good you are, it’s how good you want to be”
-*Paul Arden*

“Great web design without functionality is like a sports car with no engine.”
-*Paul Cookson*

“Good design is obvious. Great design is transparent.”
-*Joe Sparano*

“Websites should look good from the inside and out.”
-*Paul Cookson*

“The idea of waiting for something makes it more fascinating”.
-*Andy Warhol*

Get Random Quotes Here: [Stacksjar Quotes](https://stacksjar.com/quotes)
How to Solve nCr%p
Tags: dsa
Published: 2022-08-05 21:12:32

## Problem Statement
We are given three integers n, r, and p, we have to find the value of nCr%p. Here p is a natural number greater than n and nCr is the Binomial Coefficient.

## Examples
**Input**: n = 10, r = 2, p = 13

**Output**: 6

**Explanation**: 10C2 is 45 and 45 % 13 is 6.

Well, there are many ways of solving this problem, but in this blog, we will only discuss 3 of them as according to us they are the easier ones to understand among all.

## Brute Force Approach
The brute force approach is very simple just find the nCr of the given number and take the mod of that number with p and print the result.

We will be using one of the properties of Combinations to solve nCr.

`nCr = n-1Cr-1 + n-1Cr`
The below code is the implementation of the brute force approach using recursion.

```
package com.Tekolio.Extras
// solve nCr%p
public class solve_cobnimatrics_1 {
    public static void main(String[] args) {
        int n = 5;
        int r = 2;
        int p = 13;
       System.out.print("Value of "+n+"C"+r+" % "+p+" is "+solve(n, r, p));
    }
    public static int solve(int A, int B, int C) {
        if (B > A) // the value of r can never be greater than n
            return 0;
        if (B == 0 || B == A) // 0C0 = 1 & nCn = 1
            return 1;
        return (solve(A - 1, B - 1, C)%C + solve(A - 1, B, C)%C)%C;
    }
}
```

## Output
Value of 5C2 % 13 is 10

**Time Complexity**: O(n*max(r ,n-r))

**Auxiliary Space**: O(n*max(r, n-r))

But there is one problem with this code. This code is well suited to find the value of nCr only when the values of n and r are small like in our example. As soon as we try this code for a bigger value of n and r like n=50 and r=40, the result overflows and we didn’t even get a chance to take the mod of that value.

There is another problem that we can encounter with this code. This problem is not as big as the above problem but still is a problem that we should keep in mind. While doing recursion sometimes the function computes the same sub-problem again and again. See the image below

![Binomial Coefficients Recursion tree for C(5,2)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lqo9a3ta3y86y59dc3yr.png)
 
As you can see from the above image, we have 3C1 two times and 2C1 three times making it the solution to overlapping subproblems.

To deal with this overlapping and also to find an efficient solution we will use dynamic programming.

[Read More](https://tekolio.com/how-to-calculate-the-value-of-ncrp/)…
CVS Receipt
Tags: codepen
Published: 2022-08-05 20:43:56

<p>CVS is notorious for their receipts, so I decided to share my experience with a simple CodePen. </p>

<p>With some quick and dirty HTML, CSS, and JavaScript - I present you with the never-ending CVS receipt. I even made a crappy web scrapper to get real product names from their site (<a href="https://github.com/garrettbear/CVScraper" target="_blank">https://github.com/garrettbear/CVScraper</a>) </p>

{% codepen https://codepen.io/garrettbear/pen/JzMmqg %}
Do you know about Layout thrashing?
Tags: javascript, webdev, beginners, programming
Published: 2022-08-05 20:15:13

With all new fancy frameworks and libraries devs used to forget about the most common performance problem og the web applications, especially for SPA - “layout thrashing”.

Layout is where the browser figures out the geometric information for elements - their size and location in the page. Each element will have explicit or implicit sizing information based on the CSS that was used, the contents of the element, or a parent element. The process is called Layout in Chrome.

When you change styles the browser checks to see if any of the changes require layout to be calculated, and for that render tree to be updated. Changes to “geometric properties”, such as widths, heights, left, or top all require layout. Keep in mind and avoid layout as possible.

Layout is almost always scoped to the entire document. If you have a lot of elements, it’s going to take a long time to figure out the locations and dimensions of them all.

If it’s not possible to avoid layout then the key is to once again use Chrome DevTools to see how long it’s taking, and determine if layout is the cause of a bottleneck. Firstly, open DevTools, go to the Timeline tab, hit record and interact with your site. When you stop recording you’ll see a breakdown of how your site performed.

Let's look at the example: [Optimize loop task](https://codesandbox.io/s/optimize-loop-forked-qelkpu)

I have found a really good task to test the understanding how layout thrashing works (all resources will be provided at the end).

let's open the performance tab first:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77ud45jbh1flld8r49i8.png)

We have a script that makes a drops with a number, so we want to make a drop using setInterval, and here what we can see...


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y7ygond90k2i3sbe8kof.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4f3g4umx022u8d17ixnk.png)

Recalculation of styles makes the website much slower and the most consuming part is "Layout".

But if we change just a several lines of code, we will get a completely different picture:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ghznpxgdjqz6mal352cw.png)

Rendering time is significantly shorter than in the inital example, but what have changed? Take a look and try to guess: 
 [Optimized solution](https://codesandbox.io/s/optimize-loop-solution-forked-rs0nnk)

You have to be aware of what exactly forces layout/reflow and more about it you can find [here](https://gist.github.com/paulirish/5d52fb081b3570c81e3a).
The inspiration for this post - [this great article](https://web.dev/avoid-large-complex-layouts-and-layout-thrashing/) and [the video by JavaScript.Ninja](https://www.youtube.com/watch?v=tFjDuHeDLmo&ab_channel=JavaScript.Ninja).

Spare a bit more time for the research and you will be rewarded.

This is my first post, I hope it can be a useful clue for you,
Thank you for you time and farewell!
Reduct Storage Client SDK for JavaScript 0.6.0 was released
Tags: javascript, typescript, news, opensource
Published: 2022-08-05 20:15:00

This is a little update for people who follow news about Reduct Storage and its ecosystem.

Few days ago, we released Reduct Client SDK for JavaScript [v0.6.0](https://github.com/reduct-storage/reduct-js/releases/tag/v0.6.0). It supports Reduct Storage [HTTP API v0.7](https://docs.reduct-storage.dev/). Now you can iterate data for a time interval without asking a long list of timestamps:

```javascript
for await (const record in bucket.query("entry-1", start_time, stop_time)) {
  consol.log(record.ts, record.size);
  const content = await record.read();
  // or use pipe
  const fileStream = fs.createWriteStream(`ts_${record.size}.txt`);
  record.pipe(fileStream);
}
```

Read more about it [here](https://github.com/reduct-storage/reduct-js/issues/36).

You can install the new version with npm:

```
npm i reduct-js
```

And try it with our demo server - https://play.reduct-storage.dev (API token is `reduct`).
Stop Memorizing Code
Tags: productivity, codenewbie, discuss, career
Published: 2022-08-05 19:47:33

## Stop Memorizing Code

> Never Memorize what you can look up in Books
>

> ~Einstein.
>

If you are trying to memorize code then you are doing it wrong. Instead, you need to **focus on learning concepts**. Programming is too **vast** to memorize every function and variable, but you can memorize all the **important concepts** of Programming.

You don't need to remember all the functions rather you should focus on the concepts i.e **how the function works, how to invoke them or how to use them, and how to create your own function**.

There is a lot of Documentation Outside From where you can Search Different methods Like **MDN, Stack overflow**.

Orr, Rather you can google it like **` Function Which can join two different data types as a "String".`** and from there you got the function.

**`Code is Ever Evolving`**. You only Focus on Constant Learning Rather than learning the Codes that you will forget.

**`Programming is Something like Learning Math.`**

**Programming is not a Subject like History Where you have to learn Every Event That has Happened**. **It's a Logical Subject and also all the Things**(How the Methods\Functions Works) in the are Fixed. not like History where All the people have their Own Opinion.

Remember your Early days of learning +,-,*,/

1) **You do not Practice the Addition, Subtraction, Multiplication, or Divison of Every Single Number**.

2) You just Understood the core concept of How to add 2 Numbers and Practice it.

3) **For Harder Calculation like 45*67 We do not Do this by own rather we use Calculator**.

**`Learn how to read and use any documentation.`**

`You will learn best by Doing and Implementing it. Do Some Projects and All the main (or most used Functions ) You will remember by doing that.

**What Do You Think About this ??**
**Comment Down Your Thoughts **
Day 2 (06/08/2022) - The Procrastination
Tags: beginners, programming, productivity, todayilearned
Published: 2022-08-05 19:37:00

Aah! Today procrastination got the good outta me! Still I'm fired up to make up for all the time I wasted. Did a simple code-chef problem and completed a one shot Go video. Will be doing some simple Go projects from tomorrow. And since university exams are coming up, time's getting a bit crammed, along with that, my flask skills pleading me to spare it at  least a glance and the backend integration of college admin page. PS: A friend did almost all the UI work, who am I to complain :')
What was your win this week?
Tags: discuss, weeklyretro
Published: 2022-08-05 19:35:22

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey there! 


Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Trying a new recipe 👩🏽‍🍳 

---

Have a wonderful weekend!


![Bunnies cheering for the weekend](https://media.giphy.com/media/l2JhBoNin9yhqSDLO/giphy.gif)
Learn C# with interactive challenges (free - open source project)
Tags: beginners, csharp, opensource, github
Published: 2022-08-05 19:27:34

This year I was a presenter at [That Conference 2022](https://that.us/). We discussed teaching kids programming as a way to have fun and spend time with our kids.  You can see my power point and notes [here](https://github.com/kevmoens/ThatConference2022).  

While preparing for That Conference I was looking for a way to have fun yet still get concepts taught to my daughters.  I found a couple sites that gave simple challenges that introduced programming concepts.  Each of them required me to pay a subscription fee to use their site after so many challenges.  

Since I am a developer I set out to make my own version of a challenge based site.  I wanted to make a site that I didn't have to pay for hosting or any other fees. I wanted it open source so anyone can request features and add their own challenges.  

We then got started on Ellabit (modeled after Edabit).  It is a GitHub repo [Ellabit](https://github.com/kevmoens/Ellabit)
To get started we created a new repo using a Blazor WebAssembly project that runs as a [PWA (Progressive Web App)](https://docs.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/). 

If this project interests you or you want to use it for your kids great, visit the running app [here](https://kevmoens.github.io/Ellabit/).  

If you enjoy the project login to GitHub and leave a star on the project or submit issues and/or pull requests.

--Kevin Moens
Lisa's Workbook
Tags: programming, python, discuss, tutorial
Published: 2022-08-05 19:17:28

Lisa just got a new math workbook. A workbook contains exercise problems, grouped into chapters. Lisa believes a problem to be special if its index (within a chapter) is the same as the page number where it's located. The format of Lisa's book is as follows:

- There are _n_ chapters in Lisa's workbook, numbered from _1_ to _n_.

- The _ith_ chapter has _arr[i]_ problems, numbered from _1_ to _n_.

- Each page can hold up to _k_ problems. Only a chapter's last page of exercises may contain fewer than _k_ problems.

- Each new chapter starts on a new page, so a page will never contain problems from more than one chapter.

- The page number indexing starts at 1.

Given the details for Lisa's workbook, can you count its number of _special problems_?

**Example**
        
```
arr = [4,2]
k=3
```
For example, Lisa’s workbook contains `arr[1]=4` problems for chapter `1`, and `arr[2]=2` problems for chapter `2`. Each page can hold `k=3` problems. The first page will hold `3` problems for chapter `1`. Problem `1` is on page `1`, so it is _special_. Page `2` contains only Chapter `1`, Problem `4`, so no special problem is on page `2`. Chapter `2` problems start on page `3` and there are `2` problems. Since there is no problem `3` on page `3`, there is no _special problem_ on that page either. There is special problem in her workbook.

**Function Description**
Complete the workbook function in the editor below. It should return an integer that represents the number of special problems in the workbook.

workbook has the following parameter(s):

`n`: an integer that denotes the number of chapters
`k`: an integer that denotes the maximum number of problems per page
`arr`: an array of integers that denote the number of problems in each chapter

**Input Format**

The first line contains two integers `n` and `k`, the number of chapters and the maximum number of problems per page.
The second line contains `n` space-separated integers `arr[i]` where `arr[i]` denotes the number of problems in the `ith` chapter.

**Output Format**

Print the number of _special problems_ in Lisa’s workbook.

**Sample Input**

```
5 3 
4 2 6 1 10
```

**Sample Output**

```
4
```

**Solution- ### Python**

```
def readInts():
    return map(int, raw_input().strip().split(' '))

n, k = readInts()
ts = readInts()

# n = 5
# k = 3
# ts = [4, 2, 6, 1, 10]

ans = 0
pageNum = 1
for chapter, problems in enumerate(ts):
    pageLeft = k
    for problemId in xrange(1, problems+1):
        if pageNum == problemId:
            ans += 1
        pageLeft -= 1
        if pageLeft == 0:
            pageLeft = k
            pageNum += 1
    if pageLeft < k:
        pageNum += 1

print ans
```
Big Data Vs Small Data
Tags: bigdata, smalldata, hadoop, datamining
Published: 2022-08-05 19:02:00

The word **big Data** invent when the top MNCs like <u>Google</u>, <u>Facebook</u>, <u>Amazon</u> came into happening. Before this, we normally deal with normal data or now called as Small Data after the invention of Big Data. 

The main difference between Big Data and small data is their Size and Volume. No doubt as the size of data increase, their way of storing space also increase Exponentially. 

The company uses Big Data to Fetch useful insights. They use Big Data for Data Mining, Data Analysis, and Data Science. [Know more about [Data Science](https://dev.to/zapeeosheikh/difference-between-data-engineer-and-data-scientist-58fj)]


![Small Data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fs5wbpawzf64bvf56c00.jpg)


**What is Small Data ?**
Small is mostly Structured in form. It may be in tables, XML, or Graph Format. The maximum size of Small Data contains a Terabyte of data. TB is the maximum size that a Structural Format like SQL or Oracle stores.

As the size of data is small so we use Nodes to crawl into the small data. 90% of Small data is Public to use. We can use small data for other project insights but In the case of Big Data, it is not public.


![Big Data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24q56qenwl3iohc4zxvt.jpg)

**What about Big Data:**
Big Data is Mostly Unstructured and have Petabyte, ExaByte, ZetaByte, and YottaByte of data volume. If you think how is it possible to generate such a big amount of data? 

Let me tell you 
**_Facebook generates 4PB of data every day. This data includes allthrecordssd of your image, likes, or videos that you have posted on that day_**

_Also Facebook have more than 400PB of Data according to rough calculations_

**Fact:** 90% of Data in the world is generated after 2010.

Big Data can't be gathered in a single place. This data can be distributed globally. Moreover, we use multicluster to crawl into the massive data. In Big Data, we mainly use Hadoop, Spark, or pyspark to store PB, EB, ZB, and YB of data.