Friday, November 10, 2023

Functional Interface

Generic Functional Interface:
package LambdaGenericsExample1;
@FunctionalInterface
public interface FunctionalGenerics {
	R execute(T t);
}
Here,
  R -> Return type
  T -> Takes a string as a parameter
  
It's having abstract method execute. It takes a String and returns a string.

Wednesday, August 23, 2023

python substring output "jkl-mno-test" from string "abc:def:ghi::jkl-mno-test"

python substring output "jkl-mno-test" from string "abc:def:ghi::jkl-mno-test" To extract the substring "jkl-mno-test" from the string "abc:def:ghi::jkl-mno-test" in Python, you can use slicing. Here's how you can do it:
original_string = "abc:def:ghi::jkl-mno-test"
substring = original_string.split("::")[-1]
print(substring)
In this code, split("::") breaks the original string into parts using "::" as the delimiter and returns a list of parts. Since you're interested in the last part, you can use [-1] to access the last element of the list, which will be "jkl-mno-test". The output will be:
jkl-mno-test

Tuesday, October 18, 2022

Character Generator Online

https://www.blindtextgenerator.com/lorem-ipsum

PyCharm Location

Pycharm Location 1. C:\Users\{username}\AppData\Roaming\JetBrains\PyCharm2020.2\eval --> evaluation key R 2. C:\Users\{username}\AppData\Roaming\JetBrains\PyCharm2020.2\options --> others.xml R

Wednesday, September 28, 2022

Python Cheatsheet

1. End users can download and install any package into their Python environment. Typically this is done with pip, using a command like:
python3 -m pip install package-name
2. Uninstall Packages
python -m pip uninstall package-name
3. List Installed Packages
python -m pip list
and
python -m pip freeze

Saturday, August 14, 2021

Palindrome Number in Python(With Code)

 What is palindrome Number?

A palindromic number is a number (such as 16461) that remains the same when its digits are reversed.

 Python Code:

 

Resource Link:   

  1. https://en.wikipedia.org/wiki/Palindromic_number
  2.  https://github.com/rizvi/python-tpoint/blob/master/Palindrome.py


Monday, April 26, 2021

Chanakya Neeti - 1

 চাণক্যের একটি কথা আছে, ‘চাঁদ নক্ষত্রসমূহের সৌন্দর্য বৃদ্ধি করে, একজন সুশাসক পৃথিবীর সৌন্দর্য বৃদ্ধি করেন, স্বামী-স্ত্রী সম্পর্ক পরিবারের সৌন্দর্য বৃদ্ধি করে।