teleren/devto huggingface dataset:
Top 5 Website Design Trends for Businesses in 2022
Tags: webdev, design
Published: 2022-08-25 05:00:16

For businesses, the importance of having a user-friendly, information-rich and easily accessible corporate website is immense. The quality of the website matters in a big way as well – with nearly 6 out of every 10 internet users unlikely to recommend or interact with businesses that have poorly designed websites. In order to ensure a fully optimised user-experience (UX), the website design concepts and technologies are constantly evolving.

Over here, we will take a look at the web design trends that are set to dominate in 2022. Read full story from here- [https://brandwizz.com/thought-leadership/top-5-website-design-trends-2022/](https://brandwizz.com/thought-leadership/top-5-website-design-trends-2022/)
How To Use Activity Result API To Parse Information Between 3 Activities - In Kotlin.
Published: 2022-08-25 04:44:00


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

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

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

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

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9cqrjk7d7w18q9iv2iyf.png)
**_Source code here: https://github.com/kemicky/How-To-Use-ActivityResult-API-To-Parse-Information-Between-3-Activities-In-Kotlin-Tutorial.git_**
**_Watch the video tutorial here: stay tuned coming soon_**
My first i3 rice
Tags: linux, rice, i3wm, vim
Published: 2022-08-25 04:40:56

# My first rice, an i3 dracula themed setup, not nearly finished but ready to show off!

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

Lord knows I've spent hours and hours hacking at this setup, and being that it's my first rodeo using a tiling wm, it's certainly been a learning experience! I still have a few more major enhancements in the works, soon the setup will be compliant with sway and work on wayland as well as X11, and I'm also working on a much more advance setup with my bars.

Currently I'm just using i3bar, the top bar's status is provided by py3status (I'm a huge python lover), and the bottom bar is using i3blocks. With that being said, py3status actually supports i3blocks as well as it's own format, but I really just used both to familiarize myself with some of the different available options.

# Upgrades in the works..

I'll be sticking with py3status for sure, but I'll be changing the bar up, I'm playing with the possibility of using using lemonbar, with py3status, but not sure just yet. I've also toyed with the possibility of putting conky to quite a bit more work as well.

Anyway, I've posted the source to my dotfiles on on github so that hopefully the next man can get some use out of them and learn something new. If you're interested, keep your eyes out because I'll be pushing the source until I've gotten sway working properly along with wayland support as well.

### https://github.com/KarlHaines82/i3rice-dracula

Coming up next, Qtile! Being the python fanatic that I am it is perfectly suited to me and I've been having quite a bit of fun with it. It's sporting some serious performance and being that it's completely written in python it's going to be a lot of fun!

Thanks for taking a minute to check this out if you have! I'm available for feedback of any kind, advice, tell me what an idiot I am, or give me some ideas, or maybe even ask for some help!

Telegram: @ linuxkarl615

karlhaines615@yahoo.com
Contribute to Numpy
Tags: numpy, python
Published: 2022-08-25 04:19:10

Contribute to [Numpy (Contributors Guidelines)](https://numpy.org/devdocs/dev/index.html)
and [this one](https://numpy.org/contribute/)  

Contribute to [Numpy Documentation](https://numpy.org/devdocs/dev/howto-docs.html)

Tracking [issues](https://github.com/numpy/numpy/issues)

Check issues and create PR solving that issue using reference
[Reference issue](https://github.com/numpy/numpy/issues/18926) and PR solving that issue 

[Reviewer Guidelines](https://numpy.org/devdocs/dev/reviewer_guidelines.html#reviewer-guidelines)
CRUD operations using Postman.
Tags: beginners, api
Published: 2022-08-25 04:07:00

Hello! Welcome to my first post, and thank you for checking out my blog.

There are multiple ways to process data using Http, but today we will be covering to perform http requests via postman.

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

Steps:

1. Download postman from https://www.postman.com/downloads/
2. Prepare a fake REST API by following steps below or use one if you have a REST API already available 
   - create a project in vscode (New Folder)
   - Install json-server using (npm install json-server) this will give a fake REST API server for to work with if you don't have a API
   - create a file called package.json with contents below 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6x1i89669yorcex3499.jpeg)
  - create a file called db.json with contents below
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ouwrmo8yw2q8fuj4chv8.jpeg)
  - now we need to run the json server to start the fake REST API (json-server --watch db.json) from the directory where the db.json is saved. 
  - once you execute json-server --watch db.json a REST API should be available at http://localhost:3000/animals

**CRUD operations using Postman**

 - _Create (POST Request)_: To add a new animal to database, open postman then click New -> HTTP Request, it will prompt with Untitled Request Tab. Use request below and click Send.
   - Request:
     - select: POST
     - URL: http://localhost:3000/animals
     - body: animal json object

   - Response: 
     - Status: 201 Created
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kseusn3go7urgmbbw1vo.jpeg)
  
 - _Read (GET Request)_: To fetch an animal response using its id from database, open postman then click New -> HTTP Request, it will prompt with Untitled Request Tab. Use request below and click Send.
   - Request:
     - select: GET
     - URL: http://localhost:3000/animals/1
   - Response: 
     - Status: 200 OK
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8n2tw95b4r7nc288romz.jpeg)

 - _Update (Update Request)_: To update a existing animal, open postman then click New -> HTTP Request, it will prompt with Untitled Request Tab. use request below and click Send.   
   - Request:
     - select: PUT
     - URL: http://localhost:3000/animals/3
     - body: animal json object
   - Response: 
     - Status: 200 OK
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5qou8eu322h2vvh1vmh4.jpeg)

 - _Delete (DELETE Request)_: To delete animal by id open postman then click New -> HTTP Request, it will prompt with Untitled Request Tab. Use request below and click Send.
  - Request:
     - select: DELETE
     - URL: http://localhost:3000/animals/3
   - Response: 
     - Status: 200 OK
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yelmgxn2iibny253znic.jpeg)
Generate Paranthesis - I
Tags: javascript, leetcode
Published: 2022-08-25 02:14:42

```
/**
 * @param {number} n
 * @return {string[]}
 */
var generateParenthesis = function (n) {
  const open = 0;
  const close = 0;
  const tempArray = [];
  const result = [];

  backTrackParanthesis(open, close, tempArray, result, n);
  console.log(result);
};

const backTrackParanthesis = (open, close, tempArray, result, n) => {
  if (open === n && close == n) {
    tempArray = tempArray?.join("");
    result.push(tempArray);
    return true;
  }

  if (close < open) {
    tempArray.push(")");
    backTrackParanthesis(open, close + 1, tempArray, result, n);
    tempArray.pop();
  }

  if (open < n) {
    tempArray.push("(");
    backTrackParanthesis(open + 1, close, tempArray, result, n);
    tempArray.pop();
  }
};

generateParenthesis(3);

```
Switch Case vs. If Else: An Interesting Fact 😱
Tags: beginners, programming, computerscience, cpp
Published: 2022-08-25 01:27:00




Greetings! Wishing you a great day!!

While coding we generally use **if-else** or **switch-case** to work on condition checking. But do you know that although both are used for condition checking, using switch-case is more efficient than if-else?!

For switch-case, condition checking basically branch table or binary search (logarithmic time complexity) is used where for if-else, each condition is checked one by one until the condition is true.

Branch table is much like hash table. That is why when,

``` C++               
    switch(variable){
    ------------
    ------------
    }
```

When switch is used like this, the programming control for **variable** is transferred directly to the case for which it is true (without checking any other cases) and the code under that case is executed. However, for a small number of condition checking, using switch-case or if-else does not change the execution time much. ⏰

But what is more important is the readability of the code. Programmers tend to encourage the use of switch-case✔️rather than if-else. Because code with switch-case is **more comfortable** to read than if-else.

Happy Coding!! 👨‍💻

---
              

>*Follow me on* [LinkedIn](https://www.linkedin.com/in/nipun333/)
NETSDK1152 - Found multiple publish output files with the same relative path.
Tags: dotnet
Published: 2022-10-12 03:39:18

---
title: NETSDK1152 - Found multiple publish output files with the same relative path.
published: true
date: 2022-08-25 00:00:00 UTC
tags: dotnet
canonical_url: https://robearlam.com/blog/dotnet-6-view-imports-error
---

## .NET 6 View Imports Error

Our team have recently been working on a project to migrate the existing Sitecore MVP site, to run against XM Cloud. One part of this involved upgrading the version of the Rendering Host, which was previously built using ASP.NET Core 3.1 to the latest version - .NET6.

The upgrade path was a simple process and allowed us to leverage a lot of the new framework’s features, like the new [Minimal Hosting Model](https://docs.microsoft.com/en-us/aspnet/core/migration/50-to-60?view=aspnetcore-6.0&tabs=visual-studio#nhm). However, we did run into one small issue, the project was originally built following the Sitecore Helix standards which involved splitting different pieces of functionality into separate projects. This worked fine when running the application in Docker or directly from within Visual Studio, but I started getting a new error when I tried to publish the project…

```
Error NETSDK1152: Found multiple publish output files with the same relative path: 
    C:\Solutions\XM-Cloud-Introduction\src\Feature\BasicContent\rendering\Views\_ViewImports.cshtml, 
    C:\Solutions\XM-Cloud-Introduction\src\Feature\Navigation\rendering\Views\_ViewImports.cshtml, 
    C:\Solutions\XM-Cloud-Introduction\src\Feature\Social\rendering\Views\_ViewImports.cshtml, 
    C:\Solutions\XM-Cloud-Introduction\src\Feature\User\rendering\Views\_ViewImports.cshtml.

```

This was indicating there was an issue with each referenced project containing its own \_ViewImports.cshtml file. This wasn’t an issue when building the app using .NET Core 3.1, so something must have changed with the migration to .NET 6.

## .NET 6 View Imports Error Solution

A bit of googling led me to this document from Microsoft that confirmed this was a feature included in .NET 6 to stop [duplicate files being included in publish artifacts](https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/duplicate-files-in-output).

So how do we get around it, well it turns out it’s fairly simple. All we need to do is to add the following line to our Rendering Hosts project file and then everything worked again!

```
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>

```
I am here again, let's talk about the access modifiers: public private and protected.
Published: 2022-08-24 23:59:07

Public: As the name describes, there are no limitation and restrictions in accessing an attribute or function attributed to an object. If Emmanuel who's an object(student that shares the general attributes of name, age, etc) in a class of 50 student wants to access his full name(that are attributes he possess) to fill a form, all he needs to do is  to open the class register, take the names and use them in his form because they're made public. The names of everyone in that class is left open and students have ready access to their names.

The private property: 

After every exams, 30 percent and 70 percent become attributes of the students. An external person is brought into the class to calculate the 100 percent by adding the 30 and 70 together. If a student wants to access his 100 percent score, he cannot access them directly since the 30 and 70 percent score have been given to the external person who has been added to  the class to calculate. Until he releases the score to the student, no student will get access to the 100 score because the external person is the only who currently has access to the unreleased 30 and 70 percent scores of the students making the 30 percent and 70 score private attributes.

Protected:
When the private 100 percent score which is 30 and 70 score becomes protected, The external person calculating the 100 percent score protects it to himself and then can transfer the calculations to other classes that has also adopted the 30 percent and 70 percent score(basically inheritance)which he can go and calculate the hundred percent score in other similar classes.

Basically these access modifications will be implemented in a language soon.
Building the Salim Writing Blog
Tags: redishackathon, python, fastapi, programming
Published: 2022-08-24 23:23:36


### Overview of my Submission

For my submission in the Redis Hackathon, I built a Blog Service with python's fastest web framework, FastAPI and Redis OM. I was able to create a Redis database on Redis, database models with Redis-OM and then develop Restful APIs with Python FastAPI that could interact with Redis to create, retrieve and search data. FastAPI is a modern, high-performance Web framework for developing RESTful APIs in Python. It is known for being fast, easy and automatically generating swagger API docs.

The inspiration for this project is simply from how much I love to write. By virtue of how much I love to write and my curiosity as a software engineer, I have always wondered what the database architecture of blogging services would be like. 

Here is the link to the GitHub repository what I built is stored in containing a README and a MIT license.

https://github.com/salimcodes/salim-blog

### Submission Category: Wacky Wildcards

Here's a short video that explains the project and how it uses Redis:

[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/eLC8isM7iCE/0.jpg)](https://www.youtube.com/watch?v=eLC8isM7iCE)

### Language Used

I used Python for my project.

### Link to Code: GitHub repository containing a README and a MIT license

{% embed https://github.com/salimcodes/salim-blog %}

### Collaborators

Solo project

### Screenshots and Demos

![image](https://user-images.githubusercontent.com/64667212/186480601-c3b89d36-7a11-4116-a5d8-cc7758ffe4fb.png)

![image](https://user-images.githubusercontent.com/64667212/186480200-6d4d01d1-886d-4e72-91fd-61430a5bfed6.png)

![image](https://user-images.githubusercontent.com/64667212/186480270-0b4e1fcb-973f-48a0-ae6e-e40f69a6ddea.png)

![image](https://user-images.githubusercontent.com/64667212/186480338-c1832cea-6527-4ba6-9343-9fe97b01cfd7.png)



* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
Cromtit - Asynchronous Cron Jobs Runner and More
Tags: raku, cron, automation, linux
Published: 2022-08-24 23:02:55

---
title: Cromtit - Asynchronous Cron Jobs Runner and More  
published: true
description: How to run Tomtit projects as cron jobs
tags: Raku, cron, automation, linux
cover_image: http://clipart-library.com/img/1286297.gif
# Use a ratio of 100:42 for best results.
---


# TL;DR

See "Why?" section

---


Right after [Raku 2022 online conference](https://conf.raku.org/talk/172), where I presented  [Tomtit](https://www.youtube.com/watch?time_continue=23321&v=VoxWnNJ0gTI&feature=emb_logo), an idea came into my mind.

What if combine Tomtit with cron jobs? This is how [Cromtit](https://github.com/melezhik/Cromtit) was born ...


---

So, meet Cromtit - asynchronous cron job runner for Tomtit projects:

In nutshell if one has many Tomtit projects, they might run them as cron or manual jobs using [Sparky](https://github.com/melezhik/Sparky) asynchronous jobs engine.

# Quick start 

**Install** 

```bash
zef install --/test Cromtit 
```

**Step one**

Define Cromtit configuration to describe all possible jobs:

```yaml
projects:
  rakudo:
    path: ~/projects/rakudo
  r3:
    path: ~/projects/r3tool
    crontab: "30 * * * *"
    action: html-report
    options: --no_index_update
    before:
      -
        name: rakudo
        action: pull install 
```

Here we define one _main_ project - "R3" that runs blackbox tests for Rakudo built from the new commits. _Before_ this job is triggered, a dependency job - "Rakudo" gets executed - ensure that a new commit is checked out and a fresh Rakudo is built, installed and ready to test.


**Step two**

Apply configuration:

```bash
cromt
```

This step will convert Cromtit configuration into Sparky scenarios and Sparky will do it's job:

* Ensure that project "R3" will be executed every halve hour

* Reports and logs are accessible via Sparky web interface: http://127.0.0.1:4000


# More

Of course this is very informal intro into Cromtit, one can get more details on documentation pages - https://github.com/melezhik/Cromtit 

To spur more interest - some things to highlight. Cromtit allows:


* **Nested job dependencies**, where job `A` is dependent on job `B` and job `B` is dependent on job `C` and so on.

* **Passing environment variables** to jobs calls, so the same job could be called many times with different input parameters

* **Manual job runs** instead of cron style runs 


# Why?

You have a lot of local projects that you want to run as cron jobs, but without standard linux cron complexity and with some features like job dependencies and html reports.

---

That is it. Thanks for reading, comments and questions are always appreciated.
THE REAL DOM AND VIRTUAL DOM
Tags: javascript, react, webdev, beginners
Published: 2022-08-24 23:00:19

The DOM
 DOM (Document Object Model) represents the UI present in your application.
It is a structured representation of the Html element present in a Web-app, for every change in the state of the application, the Dom gets updated to reflect the change in the UI.
The downside is every time the DOM gets updated, the updated elements and children have to be rendered again in other to update the UI of our page.
Updating the Dom involves recalculating the CSS and changing the layout requires complex algorithms that affect the performance.
React makes use of Virtual DOM to make changes, which makes React faster.
Virtual DOM
React uses the virtual DOM to propagate changes to the UI, We can compare the virtual DOM to a building blueprint, after changes have been made on the blueprint, it's then propagated to the real building.
For every object in the original DOM, there is a virtual version of that object in the React Virtual object.

Scenario

1. Imagine you just added a To-do to your to-do list.

2. A new virtual DOM is created.

3. The new virtual DOM is then compared with the previous Virtual DOM before it got updated.

4. React figures out what object has changed.

5. The changed object then gets updated on the real DOM.

6. Changes on the Real Dom cause the screen to change.

Resources: 
https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction…

 https://reactjs.org/docs/faq-internals.html

Reference: https://geeksforgeeks.org/reactjs-virtual-dom/
Day 621 : Travellin' Man
Tags: hiphop, code, coding, lifelongdev
Published: 2022-08-24 22:54:06

_liner notes_:
- Professional : Today was pretty good. Had a meeting. Created slides for an upcoming conference and send it to the organizers so some things could be translated. Also did some research for a new demo application. Oh and I signed up for a lightning talk while I'm in Japan.

- Personal : So my passport/visa for Japan came in! So relieved and excited. The upcoming trip is starting to feel real. For pretty much all of next month, I'll be a travellin' man. I need to really plan more of what I'll be doing around meetings and events. Last night, I studied some Japanese, worked on my side project and watched a couple of episodes of "Sandman" on Netflix.

![View from top of a mountain looking at other grassy mountains and plains in Central Highlands, Czech Republic](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2tsocd7wn3wsps1013by.jpg)

Going to see if I can get an appointment to do a COVID test before my next work trip. Problem is that you can only book three days in advance. Weird. Going to see if I can add automatic translations for speech to text in some of my side projects. Should be helpful for upcoming events. Do more Japanese study. End the night watching a couple of "Sandman" episodes. Pretty interesting show.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube p2YUDZZV6H8 %}