Java Servlet and Swing Code Examples

Result Servlet

This servlet generates random numbers and forwards to Guess.html.


import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@WebServlet(

Read More

Billing System: Data, Processes, and Meter Management

Billing System Reference Data

Overview of Billing System

Description of flow of information amongst various modules belonging to the Billing System.

Description of Customer Account modelling + table design.

Category, Supply Type association determining Tariff

Association between accounts – Bulk Meter, Docker’s Flat

Description of Living Quarters

Grouping of Accounts by walks, sections, areas for meter reading.

Flags: Bill NOT Bill, Disconnection Flag

Description of views: bil_vat_categories, bil_item,

Read More

Memory Interleaving and Cache Memory Optimization

(2.4) Interleaved Memory: Idea: Divide the memory into independent modules to allow simultaneous access to several words in different modules (interleaving).Efficiency condition: references to memory modules are distributed equitably, with a distribution key. • Ideal Location: The width of the memory access band is multiplied by # d modules. • Total Memory = N = 2n words / / No. of Modules = M = 2m. Schemes – There are 2 schemes, and with either, M parallel words can be obtained with each

Read More

CSS Properties, Selectors, Syntax and Usage

CSS (Cascading Style Sheets) in one page

Contents:
Templates: Style sheet into the document, Link to an external style sheet, Syntax;
Main elements: Media types, Selectors, Properties;
Properties: Box, Show boxes (Controlling box generation), Visual superposition of boxes (Positioning schemes), Visual effects, Colors, Background, Fonts, Text, Generated content, Automatic counters and numbering, Lists, Tables;
Supplemental information: Units, Box model;
Other: Appendix “CSS Property
Read More

XML Structure: Elements, Attributes, and Syntax

1.0″ encoding=”UTF-8” standalone=”no“?>XML Declaration
White space characters (space, carriage return, line feed, tab, etc)
Comments
your_documents_css.css”?>External style sheet for browse your xml document
<?word document=”test.doc” ?>Processing Instruction
root_element [ root_element (#PCDATA)> ]>Internal DOCTYPE Declaration, and/or
root_element SYSTEM “your_documents_dtd.dtd“>External DOCTYPE Declaration
root_element>Open tag of “root_element
subElement>Open tag
Read More

Software and Systems: Types, Development, and UML Diagrams

Software and Systems

Main Categories

  • Center: SOFTWARE
  • Left: SOFTWARE APPLICATION – Performs information processing tasks for end-users.
  • Left/Left: GENERAL-PURPOSE APPLICATION PROGRAMS
  • Left/Right: SPECIFIC APPLICATION PROGRAMS
  • Center Right: SOFTWARE SYSTEMS – Manages and supports operations of network computing systems.
  • Right/Left: PROGRAM MANAGEMENT SYSTEMS
  • Right/Right: SYSTEMS DEVELOPMENT PROGRAMS

Software Analysis and Design

  • Software Analysis: Investigation of the problem, defining *what* the system should
Read More