西维蜀黍

【Software Testing】Software Testing

Software Testing

A test case is a repeatable execution situation of a software system that produces recordable outcomes. A test is a particular attempt of a test case:

  • the outcomes may be expected
    • specified in advance, e.g., we expect passing 1+1 to a calculator to return 2
    • generally boolean outcoms (pass or fail)
  • the outcomes may be measurement results
    • e.g., we want to find the time it takes to compute 1+1
  • the outcomes should testify to some software quality
    • e.g., correctness, but also efficiency, usability, etc
  ...


【Engineering】Software Quality

Defect

A defect in a software system is a quality level that is not acceptable.

Quality levels need to be elicited and negotiated.

  ...


【OOP】Kind of Relations in OOP

  1. Is A (Inheritence)
  2. Has A (Composition)
  3. Works With (Collaboration)

Is A (Inheritence)

In object-oriented programming, the concept of IS-A is a totally based on Inheritance, which can be of two types Class Inheritance or Interface Inheritance.

It is just like saying “A is a B type of thing”. For example, Apple is a Fruit, Car is a Vehicle, etc. Inheritance is uni-directional. For example, House is a Building. But Building is not a House.

It is a key point to note that you can easily identify an IS-A relationship. Wherever you see an extends keyword or implements keyword in a class declaration, then this class is said to have IS-A relationship.

  ...


【Database】Relationship between Tables

Relationship

One-to-one relationship

In a one-to-one relationship, one record in a table is associated with one and only one record in another table. For example, in a school database, each student has only one student ID, and each student ID is assigned to only one person.

  ...


【XML】XML Schema

A Reference to an XML Schema

This XML document has a reference to an XML Schema:

<?xml version="1.0"?>

<note
xmlns="https://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.w3schools.com/xml/note.xsd">
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
  ...


【XQuery】Learning XQuery

XQuery is About Querying XML

XQuery is a language for finding and extracting elements and attributes from XML documents.

Here is an example of what XQuery could solve:

“Select all CD records with a price less than $10 from the CD collection stored in cd_catalog.xml”

XQuery for XML is like SQL for databases.

  ...


【XPath】Learning XPath

The XML Example Document

We will use the following XML document in the examples below.

<?xml version="1.0" encoding="UTF-8"?>

<bookstore>

<book>
  <title lang="en">Harry Potter</title>
  <price>29.99</price>
</book>

<book>
  <title lang="en">Learning XML</title>
  <price>39.95</price>
</book>

</bookstore>
  ...


【XML】XML DOM

According to the XML DOM, everything in an XML document is a node:

  • The entire document is a document node
  • Every XML element is an element node
  • The text in the XML elements are text nodes
  • Every attribute is an attribute node
  • Comments are comment nodes

The XML DOM Node Tree

The XML DOM views an XML document as a tree-structure. The tree structure is called a node-tree.

All nodes can be accessed through the tree. Their contents can be modified or deleted, and new elements can be created.

The node tree shows the set of nodes, and the connections between them. The tree starts at the root node and branches out to the text nodes at the lowest level of the tree:

  ...


【XML】Learning XML

The Difference Between XML and HTML

XML and HTML were designed with different goals:

  • XML was designed to carry data - with focus on what data is
  • HTML was designed to display data - with focus on how data looks
  • XML tags are not predefined like HTML tags are
  ...


【WordPress】WordPress安全性设置

自动安全扫描

安装安全插件 如 WordFence。安全插件能做的事,除了自动扫描还有很多,可以仔细查看插件配置页面。

  ...