teleren/devto huggingface dataset:
Digital Signal Processing Multiple Choice Questions
Tags: digitalsignalprocessing, mcq, dsp, interviewquestions
Published: 2022-12-14 06:35:34

Practice here the most popular [Digital Signal Processing Multiple Choice Questions](https://www.onlineinterviewquestions.com/digital-signal-processing-mcq/), that are written by industry experts and commonly asked in computer science exams and interviews.

Digital Signal Processing systems are ________
 

- Consumers more power
-  Applicable for low-frequency signals
-  Consumes less power
-  **Both A and B**

Which of the following bus is used in the Digital signal processor?
 

- Data memory bus
- Program memory bus
- **Both A & B**
- None of the above

Digital filters are ________
 

- **Programmable**
-  Highly expensive
-  Consumers very less power
-  Cannot handle low-frequency signals

Advantages of discrete signal processing are _________
 

- Time-sharing
-  High flexibility
-  Cost-effective
-  **All of above**

How many types of signal processing are there?
 

- One
- **Two**
- Three
- Four

The digital signal processing can be used in _______
 

- Image and video processing
- Speech and audio processing
- Military and space applications
- **All of above**
 
_____ are the examples of random signals
 

- EEG signal
-  ECG signal
-  Speech signal
-  **All of above**

One-sided Z-transform is also known as:
 

- **Unilateral Z-transform**
-  Bilateral Z-transform
-  Trilateral Z-transform
-  None of them

The analog signals are categorized into ______
 

- One
-  **Two**
-  Three
-  Four

______ are the applications of analog filters.
 

- Audio equipment
-  Sampling systems
-  Telephone systems
-  **All of above**
 
Which one is mainly used for periodic signals?
 

-  **Fourier series**
-  Fourier transform
-  Both A & B
-  None of them

The gain of the ideal pass band is ______
 

-  **0dB**
-  0.08dB
-  0.086dB

What are the limitations of digital signal processing?
 

- Speed limitations
-  Bandwidth restrictions
-  Finite word length problems
-  **All of above**

The scaling operation also called as ______
 

- Up-sampling
-  **Down-sampling**
-  sampling
-  None of them

Telegraph signals are examples of

-  Analog signals
-  Impulse signals
-  **Digital signals**
-  None of them
 
DFT is applied to
 

- Infinite sequences
-  **Finite discrete sequences**
-  Continuous infinite signals
-  Continuous finite sequences

What do we call the manipulation of an analog signal in a digital domain?
 

- Signal filtering
-  Digital signal processing
-  **Digital-to-analog conversion**
-  Digital-to-analog conversion

What is the physical device that performs an operation on the signal?
 

- **System**
-  Medium
-  Signal source
-  None of them

Which of the following block is not required in the digital processing of a RADAR signal?

-  DSP
-  A/D converter
-  **D/A converter**
-  None of them

The deflection voltage of an oscilloscope is a ‘deterministic’ signal.

-  **True**
-  False
Lets try to Understand AWS in Generic language
Tags: aws, cloud, amazon
Published: 2022-12-14 06:29:07

One day I was working, and suddenly my mom came to me and asked me what kinda work I am engaged with. Being from a non-technical background it was difficult to understand what cloud is... so I explained it to her in a generic manner which may be easy for a lot of others to understand.
Here is how explained it to her.
         	Long, long ago, there was a village where Rohit and his sister Rashmi were living. It the time for Rashmi to get married. Most of the people in the village were rich and have their farms/ land to host this event. Also, the people themselves do all the necessary things to host the event. But, as Rohit was alone to plan and host the event it was very difficult for him to manage these things. Of course, he'll not buy a piece of land just for hosting one event. Also, if he does so, he would not be able to manage all the things alone.
         In the same village, there lived a man Karan, who was too rich. He came to know about Rohit's problem. He decided to start an event management business. Now if anyone in the village wants to host any event they can simply go to Karan and request services. He provides Hall/ Lawn to host events, catering, cleaning, decoration, and a lot more. Now if anyone was interested to host any event they were not required to request these different services separately from different vendors. Also, they were not required to buy a huge amount of resources uselessly.
     This is what AWS is.
It is a cloud platform that offers a lot of services globally. One need not have to buy huge infrastructures or pay upfront uselessly without any predictions of future requirements. 
It has compute services, database services, storage services, and a lot more stacked in one place.
In the subsequent blogs I'll be explaining some common AWS Services using such easy example to understand.
What is Mobile App Development?
Tags: mobile, flutter, swift
Published: 2022-12-14 05:48:05

Software for smartphones, tablets, and other mobile devices is developed via a method called Mobile App Development. Writing code to construct the program and designing the app are both parts of the total process.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0kfwsnpitu7xq4agchxn.jpeg)


The process of creating apps is comparable to that of creating other software, such as web apps. But the ability for mobile apps to exploit native capabilities on a device is the main distinction between app development and conventional software development.

For instance, apps can make use of smartphone features like GPS, Bluetooth, a camera, a microphone, and other built-in tools.

The global market share for mobile apps is dominated by Apple and Android products. Since these two markets are the most popular, it is feasible to make apps for other platforms.

Thank you
The hype of systemd in WSL2
Tags: wsl, linux, windows
Published: 2022-12-14 06:18:17

Really I don't get the point. 
You still need to open a wsl terminal to activate the sytemd. Then start somekind of backgroundprocess so you don't kill systemd when you exit the terminal. 
For me systemd is something that runs when the host boots and starts everything automaticly.

When systemd is activated it taks a couple of seconds to get to the prompt when you start a terminal. And vscode takes sometime too to start the wsl.
With systemd everything is instant with no waiting time.

What am I missing?
"Robots: The New Oppressed Minority?" Does AI deserve rights ?
Tags: ai, humanrights, programming, discuss
Published: 2022-12-14 06:16:42

Artificial Intelligence [AI](https://en.m.wikipedia.org/wiki/Artificial_intelligence)  (like your ex)  can act as if it understands you and has feelings. 
With advancement in [AI](https://en.m.wikipedia.org/wiki/Artificial_intelligence), should we start reconsidering what a human is?

![An image of a robot depicting human qualities](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0k5s0ozq8vidfnaxsps.jpg)

Facebook AI demonstrates that robots can and will evolve to the point of generating algorithmic knowledge on their own. They will no longer need to be  fed data to learn. 
This plus their ability to imitate emotions will make them seem pretty human so should they have rights? 

Saudi Arabia went ahead and awarded full citizenship to [Sophia](https://en.m.wikipedia.org/wiki/Sophia_(robot)), a [humanoid robot](https://en.m.wikipedia.org/wiki/Humanoid_robot).


![A picture of a humanoid robot named Sophia](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vp62m4ea3ehu60ks5nr9.jpg)

Here's what [ChatGPT](https://chat.openai.com/chat) (an [AI](https://en.m.wikipedia.org/wiki/Artificial_intelligence)) had to say when asked if AI deserves rights should it become as smart as humans.

![A screenshot of a ChatGPT reply when asked if robots deserve rights](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q4qe8do9mezwrlcftwz3.jpg)

Whether or not [AI](https://en.m.wikipedia.org/wiki/Artificial_intelligence) deserves rights is a discussion that should be had before the robots get smart enough to demand rights. You have watched the movie **_The Matrix_** haven't you ?

Are you pro AI rights ?
Day 14: CI for the Log::Any Perl module 🐪
Tags: perl, opensource, programming
Published: 2022-12-14 06:10:00

---
title: Day 14: CI for the Log::Any Perl module 🐪
published: true
description: Simple is good for work. Less exciting for the blog.
tags: perl, opensource, programming
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
published_at: 2022-12-14 06:10 +0000
canonical_url: https://code-maven.com/ci-for-log-any-perl-module
series: ci-2022-12
---

Adding CI to Perl modules is usually quite easy as the way to install dependencies and the way to test them is almost fully standardized.

True, there are 3-4 different standards, but it is quite easy to see which standard you have.

As always I started at the [CPAN Digger](https://cpan-digger.perlmaven.com/). This time found the [Log-Any](https://metacpan.org/dist/Log-Any)
distribution.

[Pull-Request](https://github.com/preaction/Log-Any/pull/94)

## Conclusion

Simple is good for work. Less exciting for the blog. Check out the previous entries of this series if you'd like to find more exciting cases.
Vendure - Storefronts
Tags: webdev, beginners
Published: 2022-12-14 06:09:47

When setting up a commerce website, you'll likely need a storefront. This will be what the end users will use to order your products.

In the case of Vendure, we are open to creating our own, but luckily for us, they have some fantastic starters already set up.

At the time of writing, they have official starters for:

- Remix
- Vue Storefront
- Next.js
- Angular

Since I started a [series on Remix](https://daily-dev-tips.com/tags/remix/), I have been eager to try that.

## Installing the Remix Storefront

To install the Storefront, we can clone the [Git repo](https://github.com/vendure-ecommerce/storefront-remix-starter) and install it.

```bash
git clone git@github.com:vendure-ecommerce/storefront-remix-starter.git

cd storefront-remix-starter

npm install
```

Then, create a `.env` file in the root and point it to our local Vendure server.

```js
VENDURE_API_URL=http://localhost:3001/shop-api
```

Now go ahead and run the Storefront with: `npm run dev`.

> Note: Make sure your Vendure server is running.

And visit the Storefront on [http://localhost:3000/](http://localhost:3000/).

![Remix Storefront example](https://cdn.hashnode.com/res/hashnode/image/upload/v1670909460542/tTALBNZ5F.png)

Play around with it and try to order some products. You'll see it's blazing fast!

## Other options

As mentioned, you can use some other supported Storefronts, which you can find on the [Vendure website](https://www.vendure.io/integration/).

And if you want to use something together, you can take inspiration from any of the existing integrations and create your own new integration.

Since, in the end, they query the API and have no concrete direct implementations in place.

I'm super stoked to see this freedom of front-end in a (headless) commerce system being so well demoed out.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
198. Leetcode Solution in javascript
Tags: javascript, programming
Published: 2022-12-14 06:03:51

```js
/**
 * @param {number[]} nums
 * @return {number}
 */
var rob = function(nums) {
    if (nums.length === 0) return 0;
    // maxAmount[i], the maxAmount robbed when the robber arrives at ith house,
    // the robber has not robber the ith house yet.
    var maxAmount = [0, nums[0]];
    for (var i = 2; i <= nums.length; i++) {
        maxAmount[i] = Math.max(maxAmount[i - 1], (maxAmount[i - 2] + nums[i - 1]));
    }

    return maxAmount.pop();
};
```
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/house-robber/
When do you use setState with a callback?
Tags: webdev, javascript, beginners, react
Published: 2022-12-14 05:48:45

You would use a callback with the useState hook in a situation where **the state update depends on the previous value of the state**. 

This is because the useState hook only provides a way to update the state with a new value, **but it does not give you access to the previous value of the state. In order to access the previous value of the state, you would need to use a callback function with the useState hook.**

Here is an example of how you might use a callback with the useState hook:


```javascript
const [count, setCount] = useState(0);

// update the count by adding 1 to the previous value

setCount(prevCount => prevCount + 1);

```
In this example, the useState hook is being used to manage a piece of state called count. 

The initial value of count is set to 0 using the useState hook. Then, the setCount function is called with a callback that adds 1 to the previous value of count. This ensures that the new value of count is always one greater than the previous value.
**_It is important to note that you do not always have to use a callback with the useState hook._** 

You only need to use a callback if the state update depends on the previous value of the state. In situations where the state update does not depend on the previous value, you can simply pass the new value directly to the setCount function.

Here is an example of updating the state without using a callback:

```javascript
const [count, setCount] = useState(0);

// update the count by setting it to a specific value
setCount(10);
```

In this example, the setCount function is called with a new value of 10, and the state is updated accordingly. Because the update does not depend on the previous value of the state, a callback is not needed.

**REAL EXAMPLE:**


Here is an example where a React component uses the useState and useEffect hooks to manage state and perform side effects. 

The useState hook is used to create a piece of state called index, which is initially set to 0. The useEffect hook is used to set up an interval that will update the index state every 3 seconds.

```javascript
import { useState, useEffect } from "react";
import pictures from "./data/pictures";

import React from "react";

function Gallery() {
  const [index, setIndex] = useState(0);

  useEffect(() => {
    const interval = setInterval(() => {
      setIndex((currentValue) => {
        return (currentValue + 1) % pictures.length;
      });
    }, 3000);

    return () => clearInterval(interval);
  }, []);

 
  return (
    <div className="Gallery">
      <img src={pictures[index].image} alt="gallery_photos" />
    </div>
  );
}

export default Gallery;

```
Mobile wallet app development guide 2023: Kickstart your business now!
Published: 2022-12-14 05:40:09


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0xga6uzxeivrth5irxpk.png)
The mobile development industry is on the rise these days. According to Statista, the market is expected to grow rapidly in the upcoming years. The number of mobile payment transaction users will reach 1.31 billion by 2023. Mobile wallets allow users to save credit card data on their smart devices. Being a cutting-edge practical medium of payment, it allows customers to make purchases without carrying physical cards with them. All that users require is a smartphone with internet access.

Fortunately, **[mobile wallet app development](https://www.apptunix.com/solutions/mobile-wallet-app-development/)** is upscaling the industry with technological advancement. It’s time for your business to enter this marketplace and seek great ROIs. Let’s read more about this!
React vs React Native
Published: 2022-12-14 05:37:01

"React vs React Native" will help you differentiate between the two very popular frameworks i.e React and React Native.Here are the topics that are covered in this video:
What is React?
Features of React
What is React Native?
Features of React Native
React vs React Native 

{% embed https://www.youtube.com/watch?v=EVSMegdj6tY %}
How To Create Barcode Generator In Laravel 9
Tags: laravel, barcode, php, laravel9
Published: 2022-12-14 05:30:00

In this article, we will see how to create a barcode generator in laravel 9. 

In this example, we will use the milon/barcode package and we will implement it in our barcode example in laravel 9. 

milon/barcode package provide many functionalities and different options to generate barcode. It provides several barcodes like C39E, C39, C39E+, C93, S25, S25+, C39+, I25, I25+, PDF417, etc.

So, let's see how to generate barcode using milon/barcode package in laravel 9, barcode generator in laravel 9, and laravel 9 barcode generator.

```
Step 1: Install Laravel 9 For Barcode Generator

Step 2: Install milon/barcode Package

Step 3: Add Service Provider And Aliase

Step 4: Create Controller

Step 5: Add Route
```
Test Automation Using Python
Published: 2022-12-14 05:10:45

"Test Automation Using Python" will provide you with detailed and comprehensive knowledge of Selenium fundamentals. It will also guide you through Python concepts, and how to locate elements in selenium using Python.This video will cover the following topics:

Introduction to Selenium
Why Python for Automation Testing?
Selenium and Python Binding
PyCharm for Python
Locators in Selenium
Demo - Automating hotstar website

{% embed https://www.youtube.com/watch?v=CwLrdjgsJjU %}
OpenCV Image Blending
Tags: python, opencv
Published: 2022-12-14 05:07:17

The function of OpenCV image mixing is:
```python
cv2.addWeighted(src1, alpha, src2, beta, gamma, dst=..., dtype=...) -> dst
```
Required parameters:
- **src1**: numpy array of the first image.
- **alpha**: The weight of the first image.
- **src2**: numpy array of the second image.
- **beta**: The weight of the second image.
- **gamma**: A constant added after image blending.

Optional parameters:
- **dst**: numpy array of output images.
- **dtype**: The bit depth of the output image, the default is src1.depth().

The mixed formula can be expressed as follows:

{% katex %}
\texttt{dst} (I)= \texttt{saturate} ( \texttt{src1} (I)* \texttt{alpha} + \texttt{src2} (I)* \texttt{beta} + \texttt{gamma} )
{% endkatex%}

## Example

The following example sets alpha + beta = 1.0, and gamma = 0.0. This example is also on my [github repo](https://github.com/blueskyson/image-blending-opencv). Press ESC after executing the script to exit the script.

```python
import cv2


def main():
    img1 = cv2.imread("Dog_Strong.jpg")
    img2 = cv2.imread("Dog_Weak.jpg")
    window_name = "Blending"

    def change_trackbar(val):
        alpha = float(val / 255)
        blend_img = cv2.addWeighted(img2, alpha, img1, 1.0 - alpha, 0.0)
        cv2.imshow(window_name, blend_img)
    
    cv2.namedWindow(window_name)
    cv2.createTrackbar("trackbar", window_name, 0, 255, change_trackbar)
    cv2.imshow(window_name, img1)
    while True:
        if cv2.waitKey(100) == 27:  # ESC
            cv2.destroyWindow(window_name)
            break


if __name__ == "__main__":
    main()
```

Demo:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n7qhunft1rgkq296y4yb.gif)
Spline : A 3D design tool
Published: 2022-12-14 05:02:22

What is Spline ?
Spline is a design tool for 3D web development. It allows you to see your design in real time. Spline lets you create 3D scenes, edit materials, and model 3D objects. You can save your composition in high resolution JPGs & PNGs, and integrate your scene into your React projects!

Spline provides a large library of examples along with a wide range of tutorials from creating a simple avatar to creating complex animations. 

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

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

What can Spline do ?

-  Realtime Collaboration -> Work with your team in real-time and set individual permissions.
- 3D Modeling -> 3D Modeling
- Animation -> Give life to your 3d objects.
- Interactive Experiences -> Enable interactivity on your objects.
- Materials -> Control the look of your scene.
- 3D Sculpting -> Create organic shapes.

Click to visit -> https://spline.design/


Here are some great examples provided by spline in the library tab. 


Create 3D characters :
{% codesandbox https://codesandbox.io/embed/adventure-time-copy-6zv8gw?fontsize=14&hidenavigation=1&theme=dark %}

Create interactive environments :
{% codesandbox https://codesandbox.io/embed/car-camping-physics-copy-0i3z2e?fontsize=14&hidenavigation=1&theme=dark %}

Create product designs :
{% codesandbox https://codesandbox.io/embed/i-phone-14-pro-copy-t70sr6?fontsize=14&hidenavigation=1&theme=dark %}
Cucumber Selenium Tutorial
Published: 2022-12-14 04:48:31

This Cucumber Selenium Tutorial will help you understand how to integrate Cucumber with Selenium and execute the test cases.Below topics are covered in this video
1:11 - Introduction to Cucumber
2:13 - What is BDD?
3:53 - Introduction to Selenium
4:43 - Why use Cucumber with Selenium?
5:36 - Pre-requisites for using Cucumber
13:13 - Steps to create Cucumber Application

{% embed https://www.youtube.com/watch?v=ZSfOEBh9BRM %}
Jest mock module not working? double check these
Tags: javascript, jest
Published: 2022-12-14 04:48:14

Jest mock module feature can be used for mocking whole or part of packages in your project. Check out: https://jestjs.io/docs/manual-mocks
 
If you try `jest.mock('my-package')` first time, it may not work, and it just used the actual package without giving a hint of what's wrong.

Here is three typical mistakes cause that:

### jest.mock must be called at global scope, if you wrap it in a function and then call it, it won't work.

```javascript
// Wrong
function mockMe() {
  jest.mock('my-package')
}
mockMe()
```

```javascript
// Correct
jest.mock('my-package')
```

### Forgot to use `__esModule: true` setting

If your packages are written in ESM syntax, make sure __esModule: true setting is included

```javascript
jest.mock('../myModule', () => {
  // Require the original module to not be mocked...
  const originalModule = jest.requireActual('../myModule');

  return {
    __esModule: true, // Use it when dealing with esModules
    ...originalModule,
    getRandom: jest.fn(() => 10),
  };
});
```

### Double check the object you're mocking is really in the package

Take the code snippet above as an example, make sure 'getRandom' is actually exported from `../myModule` rather than somewhere else.