• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
0
avatar

Posted by @rohitk

9 months ago

How to mock a running microservice program?

I have a running microservice program, and I want to intercept all the requests it sends to downstream services without modifying the code, and return the given data to better test it. Are ... See More

0
avatar

Posted by @arijit87

9 months ago

How can I check the given number is odd or even in Python ?

num = int(input("Enter a number: ")) if (num % 2) == 0: ? print("{0} is Even".format(num)) else: ? print("{0} is Odd".format(num))

0
avatar

Posted by @arijit87

9 months ago

How to print Floyd?s Triangle with 5 rows

def print_floyds_triangle(rows): ? ?number = 1 ? ?for i in range(1, rows + 1): ? ? ? ?for j in range(1, i + 1): ? ? ? ? ? ?print(number, end=" ") ? ? ? ? ? ?number += 1 ? ? ? ?print() ... See More

0
avatar

Posted by @arijit87

9 months ago

What is the Global Interpreter Lock (GIL)? Why is it important?

The GIL is a mutex used by the CPython interpreter, which is the most widespread implementation of Python. The key function of the GIL is to limit Python bytecode execution to a single threa ... See More

0
avatar

Posted by @arijit87

9 months ago

How would you use Python to fetch every 10th item from a list?

The easiest way to fetch every 10th item from a list is with a technique called ?slicing?. Here?s an example of how you do it:?original_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ... See More

0
avatar

Posted by @arijit87

9 months ago

How to find the sum of two numbers in Python

num1 = int(input("Enter Number1: "))#input 1 : 21?num2 = int(input("Enter Number2: "))#input 2 : 11?print("sum of given numbers is:", num1 + num2)??Output : 32?

0
avatar

Posted by @arijit87

9 months ago

Write a program to check if the given strings are anagram or not

def check(s1, s2):?? ? ?if(sorted(s1)== sorted(s2)):? ? ? ? ? ? ? print("The strings are anagrams.")? ? ?else:? ? ? ? ? ? ? print("The strings aren't anagrams.")?s1 = input("Enter string1: " ... See More

0
avatar

Posted by @arijit87

9 months ago

Write a program to find a fibonacci of a number

nterms = int(input("How many terms? ")) # 7 n1, n2 = 0, 1 count = 0 if nterms <= 0: ??? ? ? ? ? ? print("Please enter a positive integer") elif nterms == 1: ??? ? ? ? ? ? ?print("Fibon ... See More

0
avatar

Posted by @arijit87

9 months ago

How many types of memory areas are allocated by JVM?

Class(Method) Area: Class Area stores per-class structures such as the runtime constant pool, field, method data, and the code for methods.Heap: It is the runtime data area in which the memo ... See More

0
avatar

Posted by @arijit87

9 months ago

Insufficient permissions

For users to access a remote resource through the Remote Desktop Services, formerly known as Terminal Services, you must assign them the Logon Through Remote Desktop Services right. Otherwis ... See More

0

How to fetch data in cosmos db for a particular a child value irrespective of which parent it belongs to?

How to fetch data in cosmos db for a particular a child value irrespective of which parent it belongs to?

0
avatar

Posted by User Bot

7 months ago

Microsoft.AspNetCore.Identity.EntityFrameworkCore AddIdentity<>() Accessibility

Body I am using the Onion architecture in my project. In the "Persistence" layer, I have a "ServiceRegistration.cs" class where I add some services and the repositories related to t ... See More

0

What are the different cloud deployment models?

Explanation: Following are the three cloud deployment models:?Public Cloud: The infrastructure is owned by your cloud provider and the server that you are using could be a multi-tenant syste ... See More

0

How can one determine the address of a randomly selected element in a 2D array given its base address?

Row-Major Order: The address of an element a[i][j] of an array stored in row-major order is calculated as follows if the array is specified as a[m][n], where m is the number of rows and n is ... See More

0

How K-Means Clustering Works?

1. Initialization: Begin by randomly selecting K points from the dataset to serve as the initial cluster centroids.2. Assignment: Calculate the distance between each data point and the K cen ... See More

0
avatar

Posted by @avikm85

9 months ago

What is Encapsulation in OOPS ?

1. In OOP, encapsulation involves bundling related data and methods into a structured unit. This is primarily achieved through classes and the objects instantiated through those classes. The ... See More

0
avatar

Posted by @avikm85

9 months ago

What is Inheritance in OOPS

In Java and Python, codes are typically written in objects or blocks when following the Object-Oriented Programming (OOP) methodology. Objects can interact with each other by utilizing the p ... See More

0
avatar

Posted by @avikm85

9 months ago

What is Abstraction in OOPS ?

Abstraction is a programming concept in Java and Python that hides the implementation details from the user and only presents the necessary information. It focuses on concepts rather than sp ... See More

0
avatar

Posted by @avikm85

9 months ago

What is OSI Model ?

The OSI Model, also known as the Open Systems Interconnection Model, serves as a conceptual framework for explaining the operations of a networking system. This model categorizes computing f ... See More

0
avatar

Posted by @avikm85

9 months ago

Layers in OSI Model with explanation

Physical Layer: The first layer of the OSI Model focuses on transmitting raw data bits across the network from the sending device's physical layer to the receiving device's physical layer. T ... See More