teleren/devto huggingface dataset:
How I install RocksDB
Tags: rocksdb, installation
Published: 2022-03-14 08:06:48

---
title: How I install RocksDB 
published: true
description: 
tags: RocksDB,installation
//cover_image: https://direct_url_to_image.jpg
---

I want to install a specific version of RocksDB across different machines with different operating systems. Thus I can't rely on APT or other package management systems. I followed INSTALL.md by running make on the bundled Makefile, but last Saturday, I found that RocksDB couldn't read Snappy compressed data, although I installed the "libsnappy-dev" package. I tried many different ways to enable Snappy support. Then I decided to use CMake, which appeared only once in INSTALL.md. Now it works. My install script looks like this:

```Shell
#!/bin/bash 
wget https://github.com/facebook/rocksdb/archive/refs/tags/v6.15.5.tar.gz -O - \ 
   | gzip -d \ 
   | tar -xf - \ 
   && pushd rocksdb-6.15.5 \ 
   && cmake -DWITH_SNAPPY=YES -DCMAKE_INSTALL_PREFIX=$MTDIR . \ 
   && DEBUG_LEVEL=0 PREFIX=$MTDIR make -j $(nproc) \ 
   && DEBUG_LEVEL=0 PREFIX=$MTDIR make install \ 
   && popd
```

$MTDIR is a target directory for installing RocksDB. DEBUG_LEVEL=0 and  PREFIX=$MTDIR are perhaps not necessary.
Web URl issue getting minified text on live flutter web
Tags: flutter
Published: 2022-03-14 10:17:11


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

help me to solve this issue, why i am getting this minified text with URI, when i reload my page, getting error of 404 page not found because of minified text, ????
Features for Your Inventory Management System
Tags: webdev, android, ios, developer
Published: 2022-03-14 10:10:09

Get the best possible features for managing your inventory. You can get your hands on the best possible solutions designed specifically for you. You have to think about the right kind of combination to make your inventory heroic.

You always keep an eye on your inventories. You are always on the edge when you deal with it. You like to check how much stock you are supposed to order and when. It’s a race and you are aiming for the bull, it is tiring to keep up with supply and demand.

It steals all your attention from other tasks. You want to focus on the good practice of ensuring your stock is full while your customers are happy with timely deliveries. There are a lot of companies out there; you do not want to lose out to them.

So why not fast forward this lengthy process of supply chain management? You have realized that time is too precious. You want to avoid risking stock outs and manual errors. It is time you get a developer, automate, and score a knockout.

> In SMEs, inventory is the most vital element in nearly 60% to 70% of the total capitals used for existing resources.” – according to a study published on Allen Institute’s Simantic scholar.

Which are the Best Features That Can Make Your Inventory Invincible?

**Here is a list of some features that you might regret not having in the future:** -

- Get Inventory Control
- You Track Your Inventory
- Optimizing Your Inventory
- Machine Learning and AI
- Cloud Inventory
- Automated Order Management
- Lot Tracking
- Inventory Alert
- Security and Backup

For more information about [features of inventory management system](https://www.clariontech.com/blog/10-essential-features-for-your-inventory-management-system)
Fullstack Ethereum Development Course
Tags: web3, blockchain, webdev, typescript
Published: 2022-03-14 10:09:09

_TLDR: Check out this [playlist][playlist-link] to learn how to build a Full-stack Ethereum dApp._


Hi everyone👋

Web3/blockchain is one of the hottest topics right now, and a lot of developers want to get into this field. So if you're one of them, then keep reading.

I made a YouTube series where I build NFT Marketplace from scratch, and here are the steps I followed (what you will learn):

1. Write the Ethereum smart contract using Solidity.
2. Write integration tests for the smart contract, with the help of Hardhat.
3. Deploy the smart contract to Rinkeby using Hardhat.
4. Create and deploy a subgraph (The Graph protocol) to index the smart contract.
5. Build a front-end using Next.js and Tailwindcss:
   - Use ethers.js to send Ethereum transactions (Create NFT, list NFT for sale, cancel NFT sale, buy NFT).
   - Use Apollo to query the subgraph GraphQL API endpoint and fetch NFT data.

The Tech Stack:

1. **Solidity** for writing the smart contract.
2. **Hardhat** as the Ethereum Development Environment.
3. **Typescript**, **Next.js** and **Tailwindcss** for the front-end.
4. **Ethers.js** for interacting with the blockchain from the front-end.
5. **The Graph protocol** for indexing the smart contract.
6. **Apollo**, both for querying the GraphQL endpoint, and as a CLI to generate Typescript interfaces for our queries.

The videos are heavily technical (lots of code), but I still explain everything I do, in detail.

Check out this [playlist][playlist-link] to start learning.
Here is the [project repo][project-repo].
And here's a [hosted version][hosted] of the dApp.

Happy coding!😇

[playlist-link]:https://www.youtube.com/playlist?list=PLClcacTLMggPDj8g7vfxZeW6F9gB1VDhA
[project-repo]:https://github.com/aouahib/nft-marketplace
[hosted]:https://nft-marketplace-phi-opal.vercel.app/
Building a responsive website? Start with mobile first!
Tags: webdev, css, html
Published: 2022-03-14 10:06:01

When designing a new [responsive layout](https://savvas.me/explained/responsive-design), which one do you do first, desktop or mobile? Here, I'll show you why it's best to develop the mobile version first and desktop second.

Two main reasons:

## 1. Start simple, enhance gradually

Take a look at the two layouts below, the left is mobile and the right is desktop:

![Comparison of mobile and desktop layout. The mobile layout follows the default browser flow layout while the desktop implements a grid layout](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kvi4nl2tdelhkakd4xyd.png)
 

Which one of the two looks easier to build? 

The mobile follows the "default" layout applied by all browsers without any special [CSS](https://savvas.me/explained/css), which is the "flow layout". So to keep things simple, start with the mobile layout and *enhance* to a grid for screen sizes that allow it:

```css

#gallery{
    /* enter basic CSS to style the gallery here */
}

@media (min-width: 600px){
    #gallery{
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}
```

## 2. More people will visit your site on a phone than on a desktop

More and more people visit the Internet using their mobile devices, and there's a good chance that the same is true for your website.

![Bar chart showing the growing trend of visiting the web with a mobile device. 2020 is at over 50%.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1xz0d7xluwzqrs1mk4k0.png)
 

Designing for mobile first, means you are developing for the growing majority of your visitors. You can later enhance for your desktop audience from that point on.

Thanks for reading. Do you build responsive layouts mobile first or desktop first? Why?
How To Create API For QR Code?
Published: 2022-03-14 10:00:14

Hey Everyone, 

Lately, many developers have been inquiring us about how to integrate QR Codes on their website programmatically on their website. So, here we came up with an API-based solution.

Our team of experts has compiled a detailed guide on how QR Codes via API can ease out in document authentication, creating coupons, v-cards for your business in bulk.

Here’s a link on where you can get a sneak peek through a quick read:
https://scanova.io/blog/qr-code-api/
Sennheiser HD 450BT review
Tags: review
Published: 2022-03-14 09:59:22

I had the opportunity to get these headphones through American Express reward points.
I took this new headphones because my "old" Microsoft Headphones were at the end of their life.
I used them a lot during the day, to listen music, make some calls and listening podcasts.
Thank you for your service. :)

First of all, the HD 450BT are cheaper than other Sennheiser models but they are good if you want to use them for traveling or as a remote workers for conference calls.
The active noise cancelling is good but not the best.
You can hear noises in the background but the quality is good (at least for this price).

What is very impressive is the battery life. I test them for few days and I always obtain more or less 26 to 28 hours (with music and ANC enabled).

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

You can connect two devices at the same time, but you can receive notifications only for one of them.

I don't like very much the design of the controls on the headphones.
There are a lot of mechanical buttons and it's not easy to remember which button you are pressing or switching.

{% embed https://www.youtube.com/watch?v=Ih262kc15Zw %}

There is no fast charging support and the headphones needs more or less 2 hours for a full charging.

## Conclusion

I am pretty happy about this headphones.
Especially for the sound quality and the battery life.
I am not happy about the low quality of the case to bring them around and the buttons layout.

If you want a cheap headphones but with a good quality, buy this product :)
Pagination with Django and Bootstrap 5
Tags: django, python, bootstrap
Published: 2022-03-14 09:56:32

{% embed https://www.youtube.com/watch?v=HPpgPwTWhxM %}

In this recipe, we will use [Django pagination](https://docs.djangoproject.com/en/4.0/topics/pagination/) to display a paginated list of `Item`s and add [Bootstrap 5](https://getbootstrap.com/) styles. Replace the `Item` class with any Django model in your own project.

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

## Create the paginated list

In the View, such as in the `get_context` method of a class-based view:

```py
# Add these imports at the top of your View file
from django.core.paginator import (
    Paginator,
    EmptyPage,
    PageNotAnInteger,
)

# Then, in the view, such as the get_context method:

# Get page number from request, 
# default to first page
default_page = 1
page = request.GET.get('page', default_page)

# Get queryset of items to paginate
items = Item.objects.all()

# Paginate items
items_per_page = 10
paginator = Paginator(items, items_per_page)

try:
    items_page = paginator.page(page)
except PageNotAnInteger:
    items_page = paginator.page(default_page)
except EmptyPage:
    items_page = paginator.page(paginator.num_pages)

# Provide filtered, paginated library items
context["items_page"] = items_page
```

## Render the paginated items and paginator widget

Once you have passed the paginated items to the template, render the items along with a paginated [button group](https://getbootstrap.com/docs/5.0/components/button-group/).

```django
{% if items_page %}
    {% for item in items_page %}
        <div class="card mb-1">
            <div class="card-body">
              <p class="card-title">{{ item.title }}</p>
            </div>
        </div>
    {% endfor %}
    
    {% if items_page.has_other_pages %}
    <div class="btn-group" role="group" aria-label="Item pagination">
        {% if items_page.has_previous %}
            <a href="?page={{ items_page.previous_page_number }}" class="btn btn-outline-primary">&laquo;</a>
        {% endif %}

        {% for page_number in items_page.paginator.page_range %}
            {% if items_page.number == page_number %}
                <button class="btn btn-outline-primary active">
                    <span>{{ page_number }} <span class="sr-only">(current)</span></span>
                </button>
            {% else %}
                <a href="?page={{ page_number }}" class="btn btn-outline-primary">
                    {{ page_number }}
                </a>
            {% endif %}
        {% endfor %}

        {% if items_page.has_next %}
            <a href="?page={{ items_page.next_page_number }}" class="btn btn-outline-primary">&raquo;</a>
        {% endif %}
    </div>
    {% endif %}
{% else %}
    <p>No items found.</p>
{% endif %}
```
Backup your files to S3, Google Drive, .etc using Rclone
Tags: backup, devops, linux, cloud
Published: 2022-03-14 09:51:18

Rclone is a command line program to manage files on cloud storage. Over 40 cloud storage products support rclone including S3, Google Drive, and more.

###### To install rclone on Linux/macOS/BSD systems, run:
`curl https://rclone.org/install.sh | sudo bash`

For Windows and other formats can be downloaded at https://rclone.org/downloads/

## How to use

First you need to create a config using the `rclone config` command.

After that do sync files using the command `rclone sync source:path dest:path` [flags], an example is `rclone sync /backup-folder google-drive:folder-name`.

Additional commands for displaying upload progress using `-P` or other commands can be found at https://rclone.org/commands/.

Basically you can make automatic backups using cron jobs or schedule tasks.

Thank you for reading this article, keep your files safe using backup👾
Top free and paid resources to learn coding (part 2)
Published: 2022-03-14 09:37:30

In this list i will give you more great resources to learn coding bot paid and free

**Java and Spring Boot free resources**
- [Amigoscode youtube channel](https://www.youtube.com/c/amigoscode)
- [Spring Boot Tutorial for Beginners (Java Framework)](https://www.youtube.com/watch?v=vtPkZShrvXQ&t=1238s&ab_channel=freeCodeCamp.org)
- [Spring Boot and Angular Tutorial - Build a Reddit Clone (Coding Project)](https://www.youtube.com/watch?v=DKlTBBuc32c&t=8443s&ab_channel=freeCodeCamp.org)

**Java and Spring Boot paid resources**
- [amigoscode website](https://amigoscode.com/)

**Nestjs framework free resources**
- [NestJs Course for Beginners - Create a REST API](https://www.youtube.com/watch?v=GHTA143_b-s&t=7085s&ab_channel=freeCodeCamp.org)

**Nestjs framework paid resources**
- [NestJS: The Complete Developer's Guide](https://www.udemy.com/course/nestjs-the-complete-developers-guide/)

**Docker free resources**
- [Docker Tutorial for Beginners | Full Course [2021]](https://www.youtube.com/watch?v=p28piYY_wv8&t=6146s&ab_channel=Amigoscode)
- [Docker Tutorial for Beginners - A Full DevOps Course on How to Run Applications in Containers](https://www.youtube.com/watch?v=fqMOX6JJhGo&t=627s&ab_channel=freeCodeCamp.org)
- [Learn Docker - DevOps with Node.js & Express](https://www.youtube.com/watch?v=9zUHg7xjIqQ&t=915s&ab_channel=freeCodeCamp.org)

**Docker paid resources**
- [Docker & Kubernetes: The Practical Guide [2022 Edition]](https://www.udemy.com/course/docker-kubernetes-the-practical-guide/)
- [Docker Mastery: with Kubernetes +Swarm from a Docker Captain](https://www.udemy.com/course/docker-mastery/)
- [Docker and Kubernetes: The Complete Guide](https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide/)

feel free to add more resources in the comments
AWS Exception: PolicyLengthExceededException
Tags: beginners, aws, cloud, webdev
Published: 2022-03-14 09:36:48

The other day we'd an issue at work, where we were getting a PolicyLengthExceededException for our lambda permissions, which we were attaching programmatically during the runtime, every-time we were creating a resource. This wasn't a recurring issue but rather an intermittent one.

Upon further debugging, I came to know that the resource based policy for a lambda function is limited at 20KB. 
The policy we were creating was overshooting the limit by 20 bytes. It's not much, but we've to abide by the limits set. 

To my astonishment, the parameters being passed on to the policy were more or less same as compared to those from the other policies that we'd earlier attached to the same lambda. 

So I'd now 2 genuine concerns:
- If there was really any limit breach, this wouldn't have been an intermittent issue.

- How did the earlier policies get added?

Upon some further R&D, found out that the policy size limit wasn't something that was being checked very rigorously. Instead the same was only being checked once you'd a large chunk of policies with similar names, performing similar jobs and which could have otherwise been clubbed into one using wildcards.

## Solution:

Added an aws_lambda_permission component to our terraform script which creates the corresponding permission every-time the lambda function is created.

Note that I've generalised the ***source_arn*** using wildcard so that we don't have to create a policy every-time we create a resource and thus solving the problem of too many duplicate/similar policies.

<code>
resource "aws_lambda_permission" "allow_event_bridge_rule_permission" {
  statement_id  = "AllowLambdaInvocationFromEventBridge"
  action        = "lambda:InvokeFunction"
  function_name = "${var.func_name}"
  principal     = "events.amazonaws.com"
  source_arn    = "arn:aws:events:${var.aws_region}:${var.aws_account_id}:rule/model_*_name"
}
</code>

***Note:*** Even after adding the above code to the tf script, still we were getting the same exception while executing the script. I removed all the existing duplicate policies and re-ran the script and it went fine.

Even if you're manually creating the policies from the console/CLI its the best practice to use wildcards in the source_arn so as to minimise the number of policies attached to a resource.

Hope this helps you!
New in 10.1 – Introduction to the Any Type
Tags: apama, streaminganalytics
Published: 2022-03-21 09:56:13

---
title: New in 10.1 – Introduction to the Any Type
published: true
date: 2022-03-14 09:18:21 UTC
tags: Apama, Streaminganalytics
canonical_url: https://tech.forums.softwareag.com/t/new-in-10-1-introduction-to-the-any-type/255214
---

 

In Apama 10.1, we introduced a new type **`any`** to EPL, which can hold a value of any concrete EPL type (equivalent to `Object` type in Java or `auto` in C++). This means it is now possible to write EPL applications in much more generic ways. In this blog, we shall explore some of new possibilities, code simplifications and other benefits that the **`any`** type gives us. To get the full story on how **`any`** functions (what actions are available on it and similar) please refer to the [samples](https://downloads.apamacommunity.com/apama-core/10.2.0.1/apama_core_10.2.0.1_samples.zip) or [doc](https://documentation.softwareag.com/apama/). For now, let’s look at some **interesting code** in the [original post](https://tech.forums.softwareag.com/t/new-in-10-1-introduction-to-the-any-type/255214) in the Software AG Tech Community!
What is NodeJS?
Tags: beginners, node
Published: 2022-03-14 09:14:53

I've been studying nodejs half a year but I was just implementing APIs without understanding the foundation of tools I use.
I decided to write this post to check the foundation stuff of NodeJS! :)

___

NodeJS is an runtime environment that is built on V8 engine ( which compiles javascript codes into native machine codes).

NodeJS has some special features like event-driven, non-blocking(asynchronous) programming.

1. What is Event driven programming?

> Event driven programming in NodeJS means that events occurred by opening file or network communication, like request and response ,are handled via callback functions. here's some example.

> File System

```js
import fs from 'fs';

fs.readFile('/example/test.txt', (err, data) => {
  if (err) throw err;
  console.log(data);
});
```
> Network event
```js
app.get('/', (req, res) => {
  res.send("hello world");
});
```
**NOTE!**
This is not supported by NodeJS!
Because NodeJS takes only V8 engine parts. and DOM API is provided by Web browser thus it's not possible to access DOM API on Nodejs.
so the following code is a wrong example as nodejs example!
```js
divTag.addEventListener('click', clickHandler);
```

You can see that those events are handled through callback
functions. Events are processed by Event Loop. and the Event loop
processes the Phases and these Phases have Queues. Event loops
will choose phases with Round Robin scheduling method.

> A round robin is an arrangement of choosing all elements in a group equally in some rational order, usually from the top to the bottom of a list and then starting again at the top of the list and so on.

2. Non-Blocking
NodeJS supports a single thread programming. This means every process in NodeJS lives in a thread. But since it's single thread if the first process is working long time then next processes should wait until the first process ends. But NodeJS is Non-Blocking. So, Even tho the first process didn't end yet, next processes can be executed. This will make your app still working even tho there's heavy data being processed.

3. Cross-Platform runtime environment.
Your Nodejs codes will work on different operating systems like OSX, MacOS, Windows!

> If you have some advice, please share it via comments!
Thanks for reading my post!
Innovation Week Results
Tags: apma, streaminganalytics
Published: 2022-03-17 11:23:56

---
title: Innovation Week Results
published: true
date: 2022-03-14 09:05:31 UTC
tags: Apma, StreamingAnalytics
canonical_url: https://tech.forums.softwareag.com/t/innovation-week-results/255213
---

 

Last week, SoftwareAG held a cross-company innovation event, where engineers from across the globe came together to create cool new systems and technologies. For one team in Apama, that of course meant playing around with RaspberryPi devices. Community members might recall our [previous internal hackathon](https://github.com/CallumAttryde/apama_GPIO) which produced an EPL plug-in for interfacing Apama with the on board GPIO system, and we are happy to report that this project has made a lot of progress in the past few days. We wanted this plugin to be ready for both public use and development; as such we’ve taken care to make both as quick and easy as possible for community members. So what exactly has changed? Let’s find out!

## New Functionality

Leveraging the wiringPi library already in use, the plugin now boasts both software emulated **PWM** and the ability to interact with **SPI** based devices. Additionally, after integrating with [an existing C++ wrapper](https://github.com/markhorsburgh/cpp-sense-hat) for RTIMULib, we can now also communicate with **senseHAT** devices. There’s still plenty of room for contribution, especially in the very much under construction sense-hat-cpp library, so please feel free to get involved.

## Testing

Using our favourite testing framework [PySys](https://sourceforge.net/projects/pysys/), we have created a series of tests for checking both the basic functionality of the plugins, as well as more involved cases involving helper EPL and even a few samples/tutorials of complex systems. Where possible, these tests run without the need to set up external hardware, circuits and the like, nor manual input from the user; merely run the test and see the result! We hope that this will make future development a pain free and expedient process.

We are also investigating a continuous integration solution for integration into the GitHub repo – however the infrastructure challenges for this effort are somewhat tricky. Please stay tuned for further details.

## Next Steps

After a bit of tidying up, we’d like to extend our current offering of helper EPL. This will mean that users can easily get started with a range of components with a minimum of amount of work – less coding but more results!

All the projects mentioned are completely open for contribution; we hope that the more active community members can find something they are interested in. As always, please feel free to leave a comment or post on the forum!

https://github.com/CallumAttryde/apama_GPIO

– The Apama Community Team


[Original post](https://tech.forums.softwareag.com/t/innovation-week-results/255213)