teleren/devto huggingface dataset:
Signing Modules with mokutil
Tags: linux, mokutil, nvidia
Published: 2021-09-29 05:22:04

This blog focuses on installing Nvidia driver and few other drivers using the mokutil signing functionality.

### 1. Create a pair of key on system to sign the modules.
```
openssl req -new -x509 -newkey rsa:2048 -keyout /home/user/Nvidia.key -outform DER -out /home/user/Nvidia.der -nodes -days 36500 -subj "/CN=Graphics Drivers"
```
### 2. Add the key (Enroll using mok)
First command will ask for a password. After reboot enter the same password. (** Prompt will ask for characters in specific position of the password. Do not enter the whole password. **)
```
sudo mokutil --import /home/user/Nvidia.der
sudo reboot
```
Check if keys are enrolled
```
sudo mokutil --list-enrolled # or sudo mokutil --list-enrolled | grep -i Graphics
```

### 3. Update the dkms sign file if adding using dkms
Updated the /etc/dkms/sign_helper.sh. Add/update the line with the newly created key paths.
> /lib/modules/"$1"/build/scripts/sign-file sha512 /home/user/Nvidia.priv /home/user/Nvidia.der "$2"

Update /etc/dkms/framework.conf Uncomment the line where sign_tool is mentioned
> sign_tool="/etc/dkms/sign_helper.sh"

If you have already added dkms modules before changing the sign file, first remove and then add them again.
```
sudo dkms status # Check status of dkms module
sudo dkms remove <module>/<version> -k <kernel_version>
Eg. sudo dkms remove hid-asus-rog/1.0.2 -k 5.10.0-8-amd64
sudo dkms status # Check uninstalled again
sudo dkms add . # in the cloned directory of dkms module
sudo dkms build <module>/<version>
sudo dkms install <module>/<version>
```
###4. Installing Nvidia driver
For installing Nvidia driver using the .run file and enrolled keys. [Get-the-Driver-here](https://www.nvidia.com/en-in/geforce/drivers/)
```
sudo sh ./NVIDIA-Linux-x86_64-460.73.01.run -s --module-signing-secret-key=/home/user/Nvidia.key --module-signing-public-key=/home/user/Nvidia.der
```

If this does not work try removing -s from the command above.
Install Debian Series (Part -2 )
Published: 2021-09-29 05:13:27

### Introduction
The series focuses on installing Debian as a primary OS and removing Windows/ formatting Windows.

Part - 2 focuses on **installing debian on a laptop with Windows 10.** Use the bootable drive created as mentioned in [Part-1] (https://dev.to/shreyashah1903/install-debian-series-part-1-creating-recovery-drive-and-a-bootable-drive-8d8)

### Steps
### 1. Learn to enter in BIOS utility for Windows 10.
`Insert the bootable drive`
`Press Windows + S. Search for Settings`
`Click on **Updates and Security**`
`On the left pane, click on **Recovery**`
`On the right pane, under advanced startup - click on **Restart Now**`

### 2. Inside BIOS utility, change/add the boot option.
`Go under advanced setup and then under boot tab.`
`Select the bootable drive as the first boot option.`
`Save and Exit.`

### 3. System will boot up from the USB drive
* `Connect your LAN to access internet during installation process`
* Fast forward to 7.25
{% youtube 5puYlsS8yW8 %}
* Boot up the laptop with the new OS installed.
Install Debian Series (Part -1 Creating Recovery drive and a bootable drive)
Tags: linux, install, windows, debian
Published: 2021-09-29 05:11:10

### Introduction

The series focuses on installing Debian as a primary OS and removing Windows/ formatting Windows.

Part - 1 focuses on **creating a recovery drive and a bootable drive.**

### Prerequisites

* Wired Internet connection (Wired is preferred as the wireless drivers have to be added as part of installation)
* One USB flash drive (atleast 16 GB in size) if you want to create a Windows 10 recovery drive
* One USB flash drive for creating a bootable media to load the Debian OS.
* Of course a laptop.

### 1. Creating a Windows Recovery Drive / System Repair disc

The recovery drive will store Windows OS with the system files which will allow you to reinstall Windows again at a later point in time. Consider the recovery drive as a factory reset/Wipe data option in a mobile phone nowadays.

**Any personal files or applications will not be backed up in the recovery drive.** For that, you need to do a system image backup which will backup everything. System Image Backup will require an external hard drive as it is a large file. For eg. If you have a 1TB hard drive with 100 GB of used size, the system image backup will almost be about 100 GB in size.

#### Steps
1. Insert the **formatted/clean** USB flash drive which is at least 16 GB in size. The steps below are done for Windows 10. It might change a little bit for other versions of Windows.

2.  ` Press Windows button + S. Type Recovery Drive.`
    ` Back up system files to the recovery drive checkbox. Keep it checked.`
    ` Select the USB drive once it appears. Click next. `
3. Get a snack, this will take sometime to finish.
4. Click finish and store the USB at a safe place.

### 2. Creating a bootable USB flash drive for Debian

1. Download required ISO (*.iso) file for Debian from the [here.](https://cdimage.debian.org/cdimage/weekly-builds/)

2. Download the Rufus software from [here.](https://rufus.ie/en_US/) This is a helper software to create a bootable media.

3. Insert a **formatted** USB flash drive and open Rufus.

4. ` Select the USB flash drive in device.`
   ` Select the ISO file. `
   ` [optional] Give an appropriate Volume label (flash drive name). ` 
   ` Keep everything else as default option. `
   ` Click start and click close once it is ready.`

#### We are now ready to start the setup process. Go to [Install Debian Series (Part-2)] ()
Collapse Bootstrap with History :)
Tags: tutorial, javascript, bootstrap, jquery
Published: 2021-09-29 01:59:43

One day I was working on a web project, with the collapse feature of bootstrap, I use this feature for product facets/category content. Since there were many collapses, five to be precise, there was a problem I encountered and this is the purpose of this script to work.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/63npjgvcmwgq3ed7uquf.png)

### Purpose
Create a collapse hide/show based on the previous treatment.

### Prerequire
- Bootstrap class collapse; `aria-expanded` for status collapse and `data-bs-target` for target id collapse
- Javascript; each, if statement, understanding in localStorage
- Jquery; selection and on click

### Script
```js
 let collFilter = $('.accordion-button');
 collFilter.each(function(){
     let collapse = ($(this).attr('data-bs-target'));
     let viewColl = $(this).attr('data-bs-target').replace('#',''); 
    
     //set first time check
      let cek = localStorage.getItem(viewColl);
      if (cek == 'false'){ 
        $(`#${viewColl}`).removeClass('show');
        $(`[data-bs-target="${collapse}"]`).attr('aria-expanded', 'false')
        $(`[data-bs-target="${collapse}"]`).addClass('collapsed')
      }

     //handle store status collapse
     $(`[data-bs-target="${collapse}"]`).on('click', function(){
        let stat = $(this).attr('aria-expanded')
        localStorage.setItem (viewColl, stat);
     });
 });

```
### The principle of this script
Retrieve attribute data contained in data-bs-target then to do `each` to handle all collapses at once. After that use the `localStore` js function to save the collapse state contained in `aria-expanded`. When it is saved, window will check all localStore which is `false`, if `false` script will handle css to uncollapse (in my case default collapse is open/show) 

### Bonus
Make my collapse automatic close in mobile view; like in [archive.org](archive.org).

```js
if (window.screen.width <= 768) {
  $('.accordion-collapse').removeClass('show');
}
```
5 Common HTML Mistakes you should avoid.
Tags: javascript, html, beginners, webdev
Published: 2021-09-29 04:59:11

## 1. Semantic Header and Footer
Divs have no semantic structure. Instead of using divs to create headers or footer structures, use "header" and "footer" elements.

Don't do this
```html
<div id="header">
...
</div>
<div id="footer">
...
</div>
```

Do this
```html
<header>
...
</header>
<footer>
...
</footer>
```

## 2. Use Figure Element 
If you need to add a caption to your image, use the "figure" element combined with the "figcaption" element.

Don't do this
```html
<img src="image url" alt="image description" />
<p> Lorem Ipsum Description </p>
```
Do this
```html
<figure>
<img src="image url" alt="image description" />
<figcaption>
         <p> Lorem Ipsum Description </p>
</figcaption>
</figure>
```

## 3. Don't use bold or italic tags
The "b" and "i" tags are presentational tags, and have no semantic meaning, instead either change the font-weight/font-style in the CSS or use the "strong" or "em" element.

Don't do this
```html
<b>Bold</b>
<i>Italics</i>
```
Do this
```html
<strong>Bold</strong>
<em>Italics</em>
```

## 4. Using descriptive links
A link’s text should be explicit and convey where is redirecting the user to, both users and search engines can more easily understand your content and how it relates to other pages.

Don't do this
```html
<a href="url">
Check our pricing...
</a>
```
Do this
```html
Check our <a href="url"> pricing </a>
```

## 5. Using inline styles
Writing inline styles violates the principle of having the structure (HTML) separate from the presentation (CSS). Instead write the styles in a stylesheet.

Don't do this
```html
<h1 style="font-size: 24">
 Header
</h1>
```

Do this
```css
h1 {
font-size: 24
}
```

## Thanks for reading!!

Subscribe to my newsletter to never miss out on my blogs, tech news and hot product launches.

[Abhiraj's Dev-letter](https://getrevue.co/profile/abhiraj)

Until next time,
Abhiraj
mPDF generate data only one page
Tags: php
Published: 2021-09-29 04:17:52




How to setting mPDF generate all data only in one page? I already create function to generate my data to pdf file like

$fileName = "installment_".generateUuid().".pdf";
$pdf = LARAVELPDF::loadView('invoice.invoice-wa', $this->strukData);
$pdf->save(storage_path('app/public/'.$fileName));
I used https://github.com/niklasravnsborg/laravel-pdf

And my code output 2 page like
[free template] App UI package for Food ordering
Tags: design, template, uiset, beginners
Published: 2021-09-29 03:44:40

As social distancing spread globally, we saw a surge of demand in developing food ordering websites and apps. Unfortunately, there have some ambiguities in concept and features deterring companies from defining what they really want.

Accordingly, today we give you a small step of what a realistic app should be? Despite spending money buying UI design in ThemeForest or other design marketplaces, we give you FREE.

##Ready-to-used template for everyone
We offer a full set of 15 app screens of featured delivery app, specialize in user apps. It contains interfaces for user login, placing orders, and tracking orders.

| Screens       | Description   |
| ------------- |:-------------:|
| Log-in/sign-up screen| For users access|
| Profile management screen| Payment, notification, languages, and more|
| Home Screen | Dishes and drinks exploring|
| Store screen| Menus and information display|
| Order and Payment| Order review and placing payment|

##Completed UI design for ordering app
As developers, you intend to explore the fundamental feature set to be applied in an app development project. In fact, each project has its own architecture and UI depending on the unique requirement of product owners. However, in terms of [Food ordering apps](https://adamosoft.com/food-beverage-software-development), some common authorism could be shared.

As a UX/UI designer, it is a rare opportunity for you to capture a completed package UI for FREE. Our latest UI template comes from experienced designers who contributed to many real projects. As [software outsourcing companies](https://adamosoft.com/dedicated-software-development-team), we have a chance to execute several projects related to on-demand Food ordering and on-demand food delivery, which turned into a valued experience.

As a client planning a new project regarding food orders to your business, our template would give you the initial concept before talking further.
[Solved]: non-default argument follows default argument
Tags: python, help, errors, solved
Published: 2021-09-29 03:59:09

Once in your life, you must have faced this error in `Python`

**non-default argument follows default argument**

## Why?

In Python, normally you can't define `non-default` arguments after `default` arguments in a function, method or class.

- non-default arguments

``` python
def greet(name):
    return f"Welcome {name}"
```

- default arguments

``` python
def greet(name='Rajesh'):
    return f"Welcome {name}"
```

So, a combination of both of these looks something like this

``` python
def greet(name, place='Home'):
    return f"Welcome {name}, to {place}"
```

The above code is 100% correct. It works great.

**But**

``` python
def greet(name='Rajesh', place):
    return f"Welcome {name}, to {place}"
```

Executing this code will log, **non-default argument follows default argument**.

## Solution?

The solution is very simple, just use `*` at 0th index in the definition.

Example

``` python
def greet(*, name='Rajesh', place):
    return f"Welcome {name}, to {place}"
```

This was introduced in `Python 3.4`

Don;t forget to pass required keyword arguments while calling the function, method or class

``` python
>>> greet(place='School')
Welcome Rajesh, to School
```

Thank you
Cheers
what is software services? Learn more about the software development services?
Tags: softwaredevelopmentservices, healthcaresoftwaredevelopement, software, whatissoftwareservices
Published: 2021-09-29 03:53:45

we offer software development services using the latest cutting edge technologies in each and every domain that increases the productivity and reduces business risk.

M-FILES

Intelligent information management.
M-Files increases the productivity of knowledge workers, ensures a seamless digital experience, strengthens collaboration, enables business continuity, and reduces business risk.

Automated debt collection software.

CashMount is a cost-effective web-based debt collecting software that automates and simplifies the management of debt collections and accounts receivables. Cash Mount provides the efficiency, insights, workflow and transparency required for collection operations enabling a 360-degree view of collectables. It integrates with the ERP system eliminating any major data entry.

TELEHEALINGS

Talk to expert doctors at comfort of your home.
Telehealings offer immediate and hassle-free attention to all your medical emergencies. This platform provides you with the ability to browse through a list of registered doctors, specialized across various medical disciplines, who are available to consult over an online platform.

MEDITAGG

Fully integrated EMR software for hospitals.
MEDITAGG Software is specifically created to fully accommodate all aspects of clinical workflow, including storage, retrieval, and modification of digital patient records plus prescription writing, clinical annotation, ordering laboratory, and imaging tests, and viewing test results.

PAPPAD — FOOD DELIVERY APP

Get your food delivered to your doorstep.
M-Files increases the productivity of knowledge workers, ensures a seamless digital experience, strengthens collaboration, enables business continuity, and reduces business risk.

EASY MERGER

Consolidation software.

The use of financial consolidation software is a requirement for larger and more complex companies seeking to minimize the time and resources needed to close their books, with Easy Merger companies of all sizes and industries can report faster, and analyze better — transforming business performance in ways never imagined.
Get in touch with us to know more about how does software development work .

Read this blog for reference - https://infoskies.com/products/
What materials are needed to launch an open source project?
Tags: opensource, unity3d, discuss, virtualreality
Published: 2021-09-29 03:52:11

Hey everyone,

I'm preparing to open source several 3D live streaming tools and I don't really know what materials I should prepare for the "launch".

Do I need anything outside of the github repo and an associated discord channel? I see most open source projects out there have a ton of material like a logo/website/web tutorials etc.

Here is the [repo](https://github.com/6dv/6dv) without the code. Any/All feedback is appreciated!

## Context

The project is a new file format and a series of tools for live streaming 3D generated media to standalone VR/AR headsets. You can see an [example here](https://parched-seat.surge.sh/?s=097aef) that works on your computer/phone

There are about 6 repositories I plan to open source that are accompanied with the project. My plan is to release the core part of the project that people can build off of first, then open source the other tools in separate repositories over the next few months(There is plenty of code to cleanup in the other repos).

I've been jamming on this project for almost a year now so any guidance would be greatly appreciated. Thank you!
Week 3 - Part 2
Tags: spo600
Published: 2021-09-29 03:45:44

This time we learnt about Jumps, Branches, and Procedures.

Jumps literally means jump to another part of the code. Using this you can actual make conditional statements using compare instructions. 

i.e. if accumulator = 6 jmp to label 'print'

Branches (which we used previously to create the week two lab you, you can view my blog post about it [here](https://dev.to/mljbrackett/week-2-part-1-2klg)) but in you can pretty much stop execution and 'branch' off to a different part. This is specifically useful in loops where you can check to see if the accumulator is equal to something, if it is you continue, if not you go back to the starting of the loop

Lastly you can use procedures, which are basically methods. You can use the instruction JSR to 'Jump to subroutine' and go to a different part of the code, once that executes it will return back to where the JSR instruction is and continue the execution there.


I think these three principles + the define and DCB would make working on the Week 2 lab a lot easier (And hopefully next weeks lab 'Pong' super easy)

It's a bit of a short blog this week but there wasn't a lot carried for this part of the lesson, next week while I'm working on the pong application I'm sure there is going to be A TON.
Tasks in Hardhat For Everything
Tags: javascript, ethereum, dapps
Published: 2021-09-29 02:13:35

I'm using the **[Hardhat](https://hardhat.org)** when implementation of the **Smart contract**.  
When we implement the smart contracts, there are many things to do. For example, test, deploy, mint, etc...  

In fact, I think it's much easier to do that with **[Hardhat Task](https://hardhat.org/guides/create-task.html)** than creating `deploy.js` or `mint.js` in some cases.  By the way, `npx hardhat test` is the easiest way for testing. 

For example, add `task()` functions in **`hardhat.config.js`** to mint your token:  

```javascript
// hardhat.config.js

require("@nomiclabs/hardhat-ethers");

task("mint", "Mints a token")
  .addParam("address", "The address to receive a token")
  .addParam("amount", "The amount of token")
  .setAction(async (taskArgs) => {
    // Create the contract instance
    const MyToken = await ethers.getContractFactory("MyToken");
    const myToken = await MyToken.attach("0x80c5...");

    // Mint
    await myToken.mint(taskArgs.address, taskArgs.amount);
});

module.exports = {
    // ...
}
```

After that, run the command to mint.  

```sh
npx hardhat mint --address 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --amount 10
```

I feel that it is easier to manage frequetly used things by writing them together in `hardhat.config.js` as a task.
Create a Netflix clone from Scratch: JavaScript PHP + MySQL Day 65
Tags: php, javascript, webdev, tutorial
Published: 2021-09-29 03:40:43

Netflix provides streaming movies and TV shows to over 75 million subscribers across
the globe. Customers can watch as many shows/ movies as they want as long as they are
connected to the internet for a monthly subscription fee of about ten dollars. Netflix produces
original content and also pays for the rights to stream feature films and shows.

In this video,we will be Creating the video progress timer
{% youtube FvbGFqo37UI %}



If you like my work, please consider
[![Buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jm11knj7d8zwcvo150q2.png)](https://www.buymeacoffee.com/cglikpo)
so that I can bring more projects, more articles for you

If you want to learn more about Web Development, feel free to [follow me on Youtube!](https://www.youtube.com/c/ChristopherGlikpo)
How To Create Dependent Dropdown In Laravel
Tags: laravel, php, javascript, beginners
Published: 2021-09-29 03:32:51

In this example we will see how to create dependent dropdown list in laravel using ajax or laravel dynamic dependent dropdown using ajax.

Many times we have requirments of get dynamic data or value on change of dependent dropdown in our websites or project, So, here I will show you how to get dynamic data or value using ajax in dropdown.

Here, we are using 2 tables state and city and when user will selected any state at that time in dependent dropdown automatically value has been change. So, follow below steps and get output of dependent dropdown in laravel.

We will get output like below screenshot.

![How To Create Dependent Dropdown In Laravel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yr0hohzu04pyrw04gt09.png)

---

> **_[Read More : How To Create Dependent Dropdown In Laravel](https://techsolutionstuff.com/post/how-to-create-dependent-dropdown-in-laravel)_**
Week 3 - Part 1
Tags: spo600
Published: 2021-09-29 03:22:48

Inside of week 3 we learn about math, but not just any math, math inside the 6502 emulator. We also learnt about creating the equivalent of a constant inside the 6502 which is called a Define Constant Byte (dcb).


What's actually cool about the dcb is that you can store anything inside of one. Want to store a smiley face? map out the colours and store it inside of a dcb! Blue box? Samething!

You can also store variables using the 'define' keyword. A good use case example of this is like storing a colour inside of a define keyword, something like 

```define WHITE $01```

Now onto math, I won't go super into detail about this but I think addition was pretty cool when Chris was explaining it.

Basically, we use the 'ADC' (add with carry) instruction where it will add whatever you want to the accumulator + the carry flag.

I think a good example of this is on the cdot wiki [here](https://wiki.cdot.senecacollege.ca/wiki/6502_Math)

```
LDA #$F0      ; A=$F0
CLC           ; C=0
ADC #$20      ; Result is $F0+$20+C = $110; therefore A=$10 and C=1
STA LOWBYTE
LDA #$30      ; A=$30
ADC #$01      ; Value is $30+$01+C = $32; therefore A=$32 and C=0
STA HIGHBYTE
```
Where this code adds $30F0 and $0120 together and stores it.

You may be wondering a couple of things, what is LOWBYTE/HIGHBYTE, well in a previous blog post you can find my explanation of what that does and why it's here (6502 is a little endian, my explanation is [here](https://dev.to/mljbrackett/week-2-part-1-2klg))

You might also be wondering, what dos CLC (or C) mean? that's the carry flag, when something goes above what a byte can represent you need to turn on the carry flag so that the program knows that we had somewhat of an 'overflow'

Addition is simple, but we can also do subtraction, division, multiplication which make up the basics of math operations!