Posts
#python #inheritance #java Python Support Multiple Inheritance at class...
- Get link
- X
- Other Apps
#java #javaprogramming #interface How many ways of Interface Method Imp...
- Get link
- X
- Other Apps
#java #interface #javaprogramming Interface Method Implementation
- Get link
- X
- Other Apps
ISTQB Problems on Equivalence Partitioning And Boundary Value Analysis
- Get link
- X
- Other Apps
Q 1: In an Examination, a candidate has to score a minimum of 24 marks in order to clear the exam. The maximum that he can score is 40 marks. Identify Valid Equivalence values if the student clears the exam. a) 22,23,26 b) 21,39,40 c) 29,30,31 d) 0,15,22 Solution: The classes will be as follows: Class I: values < 24 => invalid class Class II: 24 to 40 => valid class Class III: values > 40 => invalid class We need to identify Valid Equivalence values. Valid Equivalence values will be there in a Valid Equivalence class. All the values should be in Class II. The answer is ‘C’ Q 2: One of the fields on a form contains a text box that accepts alphanumeric values. Identify the Valid Equivalence class. a) BOOK b) Book c) Boo01k d) Book Solution: Alphanumeric is a combination of alphabets and numbers. Hence we have to choose an option which has both of these. A valid equivalence class will consist of both alphab...
#java #exceptionhandling #javaprogramming #faq Exception Propagation/Ch...
- Get link
- X
- Other Apps
#java #abstract #interface Difference between abstract class and interface
- Get link
- X
- Other Apps
TOP 20 Commands : Git/GitHub Cheat Sheet
- Get link
- X
- Other Apps
TOP 20 Commands Git/GitHub Cheat Sheet Git and GitHub: Git is the actual version control system. It is an open source DVCS (distributed version control system) that runs in the command line. This basically means it saves the entire history of the project. GitHub, commonly confused with Git, is actually a repository hosting service. Installation of GIT & Creating A/C on GITHUB: Download GIT for window/Mac(depends upon OS) Use Git Bash, which is available when you install Git Once git is installed go ahead and create a free account to GitHub. Cheat Sheet Command-1: git init This will create a .git repository in your project. A repository or “repo” is a collection of all the changes you’ve made to your project over time and will build a history of these changes. This is the first thing you want to do with a new project. Command-2: git config --global user.name "Your Name" git config --global user.email " yourEmail@mail.com " This sets up you...
Find Middle three characters in a String #python #pythonprogramming
- Get link
- X
- Other Apps
#commands #doscommand Cool DOS Commands will Amaze You!!
- Get link
- X
- Other Apps
#git #github Git Merge Conflicts | How Merge Conflicts Happen? | How to ...
- Get link
- X
- Other Apps
Why String is Immutable or Final in Java
- Get link
- X
- Other Apps
The String objects are cached in the String pool, and it makes the String immutable The cached String literals are accessed by multiple clients. So, there is always a risk, where action performs by one client affects all other clients. For example, if one client performs an action and changes the string value from vds to VDS , all remaining clients will also read that value. For the performance reason, caching of String objects was important, so to remove that risk, we have to make the String Immutable. String is immutable because of multiple reason: Security: parameters are typically represented as String in network connections, database connection URLs, usernames/passwords etc. If it were mutable, these parameters could be easily changed. Synchronization and concurrency: making String immutable automatically makes them thread safe thereby solving the synchronization issues. Caching: when compiler optimizes your String objects, it sees that if two objects...
#java #class #immutable How to create an Immutable class ?
- Get link
- X
- Other Apps
How to create an Immutable class ?
- Get link
- X
- Other Apps
What is an immutable class in Java? Immutable objects are instances whose state doesn’t change after it has been initialized. There are many immutable classes like String, Boolean, Byte, Short, Integer, Long, Float, Double etc. In short, all the wrapper classes and String classes are immutable. We can also create our own immutable class by creating a final class that has final data members. How to create an Immutable class ? Rules for creating Immutable class in Java− Make class final − class should be final so that it cannot be extended. Make each field final & private − Each field should be final so that they cannot be modified after initialization. Create a getter method for each field. − Create a public getter method for each field. fields should be private. No setter method for each field. − Do not create a public setter method for any of the fields. Create a constructor − Such a constructor will be used to initialize properties once. Please refer video: How to create an Immu...
#string #java #stringbuffer #immutable #mutable How to Reverse a String ...
- Get link
- X
- Other Apps
#java #faq #jarray #multidimensionalarray Jagged Array in Java
- Get link
- X
- Other Apps
#parameter #pathparameter #queryparameter API TERMINOLOGY : Part-2
- Get link
- X
- Other Apps
Why java is Platform Independent?
- Get link
- X
- Other Apps
How is Java platform independent? Platform means → H/W+S/W+OS(Windows, Mac, Linux etc.) Java is a platform-independent language. In other words, once you write your code then run it anywhere, on any platform that provides the environment to run it. This environment is the Java Virtual Machine (JVM). The JVM should be present to execute the code. The JVM is different for each platform. In the case of Java, platform independence does not mean that you can run the code anywhere, you can run it wherever the environment is provided. To run a program on any machine you need to convert it to the machine language so that the specific machine can understand it. In Java the source code is not directly converted into the machine code. It is first converted into the byte code by the compiler. In Java, the byte code is interpreted by the JVM and converts it into the machine specific code. So the Java Vir...
API TERMINOLOGY : Part-1
- Get link
- X
- Other Apps
API TERMINOLOGY Q1: What is a Resource? Resource is a physical or virtual component, which supports/extends/represents/constructs a system. Consider a real time example of a Vehicle . Wheels, brakes, headlight, fuel tank etc all are resources of a Vehicle . All resources have names, location and identifiers. Take another example of Google. Now append “/gmail” in the last of the base url “https://www.google.com/” as "https://www.google.com/gmail". Google will launch Gmail Page: https://www.google.com Base URL: https://www.google.com Resource: /gmail/about/# Q2: What are Collections? Collections are simply groups of resources. You’ll find that we don’t mention any collections in the API documentation. That is because we offer singleton resources, which are independent and exist outside of any collections Q3: What is Endpoints/BaseUrl? API endpoint is the point of entry in a communication channel when two systems are interacting....
Converting Pdf Text in to Audio Files
- Get link
- X
- Other Apps
Converting Pdf Text in to Audio Files: Libraries:- PyPDF , is a library in python that is used to read text from a pdf file. PyPDF2 · PyPI Pyttsx3 , is a text-to-speech convert library. pyttsx3 · PyPI Here we are using PyPDF library to read text from the pdf file and then we are converting the text into speech and save it as an audio file. Program: import pyttsx3 , PyPDF2 pdfrReader=PyPDF2.PdfFileReader( open ( 'File_1.pdf' , 'rb' )) audio=pyttsx3.init() for page_num in range (pdfrReader.numPages): text=pdfrReader.getPage(page_num).extractText() cleanText=text.strip().replace( ' \n ' , ' ' ) print (cleanText) audio.say(cleanText) audio.save_to_file(cleanText , 'File_1.mp3' ) audio.runAndWait() audio.stop() THANKS!!
How will you check if a class is a child of another class?
- Get link
- X
- Other Apps
- This is done by using a method called issubclass() provided by python. The method tells us if any class is a child of another class by returning true or false accordingly. - We can check if an object is an instance of a class by making use of isinstance() method: Example: class Parent (): pass class b (Parent): pass print ( issubclass (b , Parent)) #true print ( issubclass (Parent , b)) #False obj1=b() obj2=Parent() print ( "=======" ) print ( isinstance (obj2 , b)) #False print ( isinstance (obj2 , Parent)) #True THANKS!!
Introduction of Python
- Get link
- X
- Other Apps
Introduction of Python What is Python? Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for: web development (server-side),software development, mathematics, system scripting. What can Python do? Python can be used on a server to create web applications. Python can connect to database systems. It can also read and modify files. Python can be used to handle big data and perform complex mathematics. Python can be used for rapid prototyping, or for production-ready software development. Why Python? Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as ...
GIT BRANCH DETAILS
- Get link
- X
- Other Apps
GIT BRANCH COMMANDS: ======================= git checkout branch_name git branch branch_name git checkout branch_name git checkout -b branch_name git branch --list git branch git branch -r git push origin -delete branch_name git checkout - git branch -m B1 TestB1 git branch -d branch_name OR git branch -D branch_name git push origin --delete branch_name
Python self Variable
- Get link
- X
- Other Apps
Python self Variable Python self variable is used to bind the instance of the class to the instance method. We have to explicitly declare it as the first method argument to access the instance variables and methods. This variable is used only with the instance methods. In most of the Object-Oriented programming languages, you can access the current object in a method without the need for explicitly having it as a method parameter. For example, we can use “this” keyword to access the current object in Java program. But, in Python we have to explicitly declare the object instance as “self” variable Example1: class Emp : def __init__ ( self , name , empid ): self .name = name self .empid = empid print ( id ( self )) def e1 ( self ): print ( "Name of Emp: " , self .name) print ( "Emp id is : " , self .empid) e = Emp( 'VDS' , 100 ) print ( id (e)) e.e1() POINTS TO REMEMBER: Python self variable is not a reserved key...