we can delete the many number of branches from remote repository at a time.
Instead of deleting the branches individually we can delete multiple of branches at a time by follow my Presentation.
This is a small and easy tutorial to get started with Git and GitHub.
Some definitions:
Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
GitHub is built for developers. GitHub, Inc. is a US-based global company that provides hosting for software development version control using Git. It is a subsidiary of Microsoft, which acquired the company in 2018 for US$7.5 billion. It offers the distributed version control and source code management functionality of Git, plus its own features.
we can delete the many number of branches from remote repository at a time.
Instead of deleting the branches individually we can delete multiple of branches at a time by follow my Presentation.
This is a small and easy tutorial to get started with Git and GitHub.
Some definitions:
Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
GitHub is built for developers. GitHub, Inc. is a US-based global company that provides hosting for software development version control using Git. It is a subsidiary of Microsoft, which acquired the company in 2018 for US$7.5 billion. It offers the distributed version control and source code management functionality of Git, plus its own features.
PAGE 1Input output for a file tutorialStreams and File IOI.docxalfred4lewis58146
PAGE
1Input output for a file tutorialStreams and File I/O
In this tutorial we study the following concepts:
Text File I/O
Techniques for a file: Class File
Binary File I/O
File Objects and File Name
Note: For question 4 of the midterm you only need to look at the sections 2.2 and 2.3. I do not think you need java class: StringTokenizer. But I just added a small section about it to the end of this tutorial.
So far we learned keyboard/screen I/O. It is time to learn File I/O.
1 An Overview of stream and file I/O
A stream is an object that either outputs data or inputs data. The Java System.out is a stream object that outputs data on the screen.
As our program gets bigger and bigger we may need to enter a lot of data every time we run our program. We also may have a lot of data as the output of the program. It is not practical to enter a sizable input from the keyboard. Therefore, we save the data in a file and let our program to input from this file. Similarly, it is not practical to look at a sizable output. Moreover, we may need to save the output for further study. Therefore, we let our program to output to a file.
We have two kinds of I/O files: Text files and binary files. A text file is readable and understandable by human, but a binary file is not. The size of a text file is bigger than the size of a binary file. We can write arrays without using a loop into a binary file. We can also write objects to a binary file.
2 Text-File I/O
In this section we learn how to input from a text file and how to output to a text file. We first look at output instructions for a text file.
2.1 Text-File Output with PrintWriter class.
To be able to write to a file we need the Java class PrintWriter. This class is in JDK java.io, therefore we need to import it . Another class that we need is : FileOutputStream. This class also is in java.io. A file output stream is an output stream for writing data to a File.
Example 1. The following program to write an integer, a floating point number, a Boolean value and a string into a text file.
import java. io. PrintWriter;
import java. io. FileNotFoundException;
publicclass Main {
publicstaticvoid main( String[] args) {
PrintWriter out = null;
try {
out = new PrintWriter("out.txt");
} catch( FileNotFoundException e) {
System. out. println("Error: opening the file out.txt");
System. exit( 0);
}
out.println(-12);
out.println(25.5);
out.println(true);
out.println("John Doe.");
//Note that we also can write:
out.println(-12+"\n"+ 25.5 + "\n" + true + "\n" + "John Doe.");
out.close();
} }
The content of the file out.txt would be:
-12
25.5
true
John Doe.
-12
25.5
true
John Doe.
Description:
First we need to declare a variable that refers to and object of class PrintWriter. This class has several constructors. One of them needs the name of the output file on the hard drive (or other storages): out = new PrintWriter("out.txt")
This instruction co.
PAGE 1Input output for a file tutorialStreams and File IOI.docxalfred4lewis58146
PAGE
1Input output for a file tutorialStreams and File I/O
In this tutorial we study the following concepts:
Text File I/O
Techniques for a file: Class File
Binary File I/O
File Objects and File Name
Note: For question 4 of the midterm you only need to look at the sections 2.2 and 2.3. I do not think you need java class: StringTokenizer. But I just added a small section about it to the end of this tutorial.
So far we learned keyboard/screen I/O. It is time to learn File I/O.
1 An Overview of stream and file I/O
A stream is an object that either outputs data or inputs data. The Java System.out is a stream object that outputs data on the screen.
As our program gets bigger and bigger we may need to enter a lot of data every time we run our program. We also may have a lot of data as the output of the program. It is not practical to enter a sizable input from the keyboard. Therefore, we save the data in a file and let our program to input from this file. Similarly, it is not practical to look at a sizable output. Moreover, we may need to save the output for further study. Therefore, we let our program to output to a file.
We have two kinds of I/O files: Text files and binary files. A text file is readable and understandable by human, but a binary file is not. The size of a text file is bigger than the size of a binary file. We can write arrays without using a loop into a binary file. We can also write objects to a binary file.
2 Text-File I/O
In this section we learn how to input from a text file and how to output to a text file. We first look at output instructions for a text file.
2.1 Text-File Output with PrintWriter class.
To be able to write to a file we need the Java class PrintWriter. This class is in JDK java.io, therefore we need to import it . Another class that we need is : FileOutputStream. This class also is in java.io. A file output stream is an output stream for writing data to a File.
Example 1. The following program to write an integer, a floating point number, a Boolean value and a string into a text file.
import java. io. PrintWriter;
import java. io. FileNotFoundException;
publicclass Main {
publicstaticvoid main( String[] args) {
PrintWriter out = null;
try {
out = new PrintWriter("out.txt");
} catch( FileNotFoundException e) {
System. out. println("Error: opening the file out.txt");
System. exit( 0);
}
out.println(-12);
out.println(25.5);
out.println(true);
out.println("John Doe.");
//Note that we also can write:
out.println(-12+"\n"+ 25.5 + "\n" + true + "\n" + "John Doe.");
out.close();
} }
The content of the file out.txt would be:
-12
25.5
true
John Doe.
-12
25.5
true
John Doe.
Description:
First we need to declare a variable that refers to and object of class PrintWriter. This class has several constructors. One of them needs the name of the output file on the hard drive (or other storages): out = new PrintWriter("out.txt")
This instruction co.
In this slide show you will learn what is test complete, what can you test with it, how to create projects, tested application, create/record tests, test execution order, run tests, identify objects, checkpoints.
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docxroushhsiu
Module Six Assignment Guidelines and Rubric.html
Overview
Many Java programs that you create will receive and process user input. In order to ensure that user input is accurate, you will need to use input validation and exception handling. For example, if you ask for a zip code, you want to ensure the user inputs a five-digit number. In this activity, you are given “buggy” code for a paint program that calculates the number of cans of paint required to paint a wall, given the wall’s height and width. You will need to debug the code and improve it by adding code to validate user input and handle exceptions.
Prompt
For this assignment, you will complete the paint program by debugging the original code and adding code that validates user input and handles exceptions. Use the Uploading Files to Eclipse and the Downloading Files From Eclipse tutorials to help you with this project.DebuggingOpen the Virtual Lab by clicking on the link in the Virtual Lab Access module. Then open your IDE. Upload the Paint1.zip folder and review the code for the Paint1.java file.Find and fix the three errors in the given code.Use the input values below to test your program. If you found and fixed all errors, your output should exactly match what is below.
TIP: When you run your program in Eclipse, it will prompt you to enter input in the Console window. If you cannot find this window, go to Window, then Show View, then Console.
Input Validation and Exception HandlingReview the code, looking for the two code blocks where user input is required.Implement a do-while loop in both blocks of code to ensure that input is valid and any exceptions are handled.
TIP: Consider using a try-catch block for exception handling, but it is not required.Use the two sample invalid inputs below to test your program. Your program should respond to each by prompting the user to enter valid input. This should continue to loop until valid input is received.
THINK: Why is 0 invalid input for this problem? What is the user being asked to input?
Guidelines for Submission
Attach your completed Paint1.java file to the assignment submission page.
Module Six Assignment RubricCriteriaProficient (100%)Needs Improvement (75%)Not Evident (0%)ValueDebuggingDebugs a class so that no errors remain and calculations work correctlyMeets some “Proficient” criteria, but with errors or exclusions such as one or two remaining bugsDoes not attempt criterion30Input Validation and Exception HandlingAdds loops to validate all user input and handle exceptions so that code passes all test casesMeets most “Proficient” criteria, but with errors; areas for improvement may include ability to handle all test casesDoes not attempt criterion70Total:100%
course_documents/Uploading Files to Eclipse Tutorial.pdf
Uploading Files to Eclipse
This tutorial will guide you through the process of uploading a project into Eclipse via the STEM Lab.
1. Open the STEM Lab and select the Launch button for the Java Program ...
CS101S. ThompsonUniversity of BridgeportLab 7 Files, File.docxannettsparrow
CS101 S. Thompson
University of Bridgeport Lab 7: Files, File Choosers, and Scanners
Lab 4_2 Files, File Choosers, and Scanners
There are two ways to identify a file in Java.
1. The name of a file
2. Using the File object. This is a type of object that describes a file as it is stored on the computer's file system. The file system is the system of directories (folders) that the operating system uses to organize stored files so users can find them easily.
Here we just need to know that when you use a file chooser (which we will discuss next) to locate a file in the file system, the file chooser gives you access to the file selected by the user through a File object. You can see an example of a Java file chooser dialog in action below.
Here the user has used the JFileChooser dialog box to navigate to the Documents folder and select a file named infix.txt.
To use a JFileChooser, you need to know about the following constructor and methods:
JFileChooser()
int showOpenDialog(Component owner)
File getSelectedFile()
Using a JFileChooser
Look up the JFileChooser documentation online so you know what package to import. To use it, create a JFileChooser object and then call its showOpenDialog(). If you have a GUI application, pass it the Component you want it to appear on top of. This will generally be the JFrame for your application. If you are using a console application, just pass it null. Calling this method will cause a dialog box like the one below to appear:
The user will use the dialog to navigate to some folder and select a file, and then click on the Open button to accept the selected file. If the user changes his (or her) mind, he or she can click on Cancel. Either, way, the showOpenDialog will return an integer to your program indicating the user's choice. If the the user selected a file, the method will return the value JFileChooser.APPROVE_OPTION. At this point, you can call the getSelectedFile() to retrieve a File object that you can use to access the file.
Here is example code for using a file chooser object.
File file = null;
JFileChooser chooser = new JFileChooser();
int result = chooser.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION)
file = chooser.getSelectedFile();
else
{
JOptionPane.showMessageDialog(null, "No file selected");
System.exit(1);
}
If this code does not exit, you will have a File object named file. Next, let us look at how you can use this object to open and read a text file using a Stream object named a FileReader.
FileReader
A FileReader object is used to read text files. Text files are files that are human-readable, usually created by a text editor such as Notepad. Many applications, for example MS Word, Excel, and Access, do not create text files. Instead, they create a different type of file named a binary file. You cannot use a FileReader to read a binary file.
If you look up the documentation for the FileRea.
Django is a high-level Python web framework that enables rapid development of...ArijitDutta80
It follows the Model-View-Template (MVT) architectural pattern, providing built-in features for handling common web development tasks like URL routing, database management, authentication, and templating. Django promotes code reusability, scalability, and maintainability, making it popular among developers for building complex and feature-rich web applications efficiently.
Django follows the Model-View-Template (MVT) architectural pattern.
Model: Represents the data structure of the application. It defines the database schema and interacts with the database.
View: Handles the business logic of the application. It receives requests from the client, processes them, and returns responses.
Template: Defines the presentation layer of the application. It contains HTML files with embedded template tags and filters to render dynamic content.
Don't Repeat Yourself (DRY) Principle:
Django emphasizes the DRY principle, which promotes code reusability and reduces redundancy.
It encourages developers to write modular and reusable components, such as templates, views, and models, to avoid duplicating code.
Convention over Configuration:
Django follows the convention over configuration paradigm, providing sensible defaults and conventions to minimize the need for explicit configuration.
It reduces the amount of boilerplate code by making assumptions about the project structure and naming conventions.
Object-Relational Mapping (ORM):
Django's ORM abstracts the interaction with the database, allowing developers to work with database records using Python objects.
It simplifies database operations such as querying, inserting, updating, and deleting records by providing an object-oriented interface.
Admin Interface:
Django includes a built-in admin interface that allows developers to perform CRUD (Create, Read, Update, Delete) operations on database records without writing custom views.
It automatically generates an administrative interface based on the registered models, providing a convenient way to manage application data.
Middleware:
Middleware in Django is a framework of hooks into Django's request/response processing.
It allows developers to modify incoming requests or outgoing responses globally or selectively based on certain conditions.
Middleware is commonly used for authentication, session management, and request/response logging.
Software, Types of Software
Software Project, Application and Product
Software Business Process
SDLC
SDLC Models
Test Levels
Software Environment
Test Types
Test Design Techniques
Testing Process (STLC)
Informal Testing
Quality Standards
Software Business Domains
QTP Excel Scripting Examples;
'Objects in Excel Object Model
a) Excel Application - Excel Application Object
b Excel Workbook / File - Workbook Object
c) Excel Worksheet / sheet - Worksheet
Important Operations on Excel files for Test Automation Using QuickTest Professional (QTP)
a) Create Excel Files
b) Open Excel Files
c) Copy Excel Files
d) Delete Excel Files
e) Move Excel Files
f) Read Data
e) Read Data for Data driven Testing
f) Write Data
g) Write Test Result
h) Comparing data (One to one)
i) Comparing data (One to Many)
j) Comparing data (Many to one)
k) Comparing data (Many to Many Exact)
l) Comparing data (Many to Many Textual)
m) Searching for strings
1. Visit: http://qtp12.blogspot.com/
Ways to launch your application
Four different ways to launch your application are mentioned below:
1) SystemUtil.Run
SystemUtil.Run ( FileName, Parameters, Path, Operation )
FileName - The name of the file you want to run.
Parameters - If the specified FileName is an executable file, use the
Parameters argument to specify any parameters to be passed to the
application.
Path - The default directory of the application or file.
Operation - The action to be performed. If this argument is blank (""),
the open operation is performed.
The following operations can be specified for the operation argument
of the SystemUtil.Run method:
open - Opens the file specified by the FileName parameter. The file can
be an executable file, a document file, or a folder. Non-executable files
are open in the associated application.
edit - Launches an editor and opens the document for editing. If the
FileName argument does not specify an editable document file, the
statement fails.
explore - Explores the folder specified by the FileName argument.
find - Initiates a search starting from the specified folder path.
print - Prints the document file specified by the FileName argument. If
the specified file is not a printable document file, the statement fails.
1
2. Example:SystemUtil.Run "D:My MusicBreathe.mp3","","D:My Music
Details","open"
2) InvokeApplication
This command is now mainly used for the backward compatability ie to
use with the lower versions(below QTP 6.0) of QTP.
InvokeApplication("Full URL as Parameter")
Example:InvokeApplication "C:Program FilesInternet
ExplorerIEXPLORE.EXE http://www.yahoo.com"
3) VBscript to invoke application
1. Create a "WScript.shell" object.
2. Use the "run" object to launch the application. If the path to your
executable contains spaces, use Chr(34) to ensure the path is
contained within double quotes.
3. When done, set the shell object to nothing to release it.
Example:
Dim oShellSet oShell = CreateObject ("Wscript.shell")'
Example 1 - run a batch file:oShell.run
"F:jdk1.3.1demojfcSwingSet2.bat"'
Example 2 - run a Java jar file:oShell.run "java -jar F:jdk1.3.1demo
2
3. jfcSwingSet2SwingSet2.jar"'
Example 3 - launch Internet Explorer:oShell.Run Chr(34) &
"C:Program FilesInternet ExplorerIEXPLORE.EXE" & Chr(34)Set
oShell = Nothing
4) Trivial but useful method
If nothing works out you might try this
You can use the Start -> Run dialog of Windows.
1. Add the Windows Start button to the Object Repository using the
"Add Objects" button in Object Repository dialog.
2. Open the Run dialog (Start -> Run), and learn the "Open" edit field
and the "OK" button into the Object Repository.
3. Switch to the Expert View, and manually add the lines to open the
Run dialog.
Example:Window("Window").WinButton("Button").ClickWindow("Windo
w").Type("R")
4. Manually enter the lines to enter the information to launch the
application, and click the "OK" button of the Run dialog.
Example:
Dialog("Run").WinEdit("Open:").Type
"c:WINNTsystem32notepad.exe"
Dialog("Run").WinButton("OK").Click
3
4. If you want to keep track of further articles on QTP. I recommend you
to subscribe via RSS Feed. You can also subscribe by Email and have
new QTP articles sent directly to your inbox.
4