private should be used when something is not used outside of a given class
for methods and fields - when they are used only within the same class
for classes - only on nested classes, when used in the same class
protectedshould be used when
for methods and field - when you need to make them accessible to subclasses only
for classes - again only nested classes, accessible by subcalsses
public is used when something is accessible by every other class
static is used when you don’t need an instance of a class (i.e. object) to use it:
for fields - when you want to have a global field
for methods - when you need utility functions that do not depend on object state
for nested classes - when you want to access them without an instance of the enclosing class.
abstract when you don’t want to provide implementations in the current class:
on methods - when subclasses have to provide the actual implementation, but you want to invoke these methods (no matter how they are implemented) in this class.
on classes - to denote that the class may have abstract methods.
final when you don’t want something to change.
on fields, when you want to assign the value only once. It is useful when you want to pass a local variable to an inner class - you have to declare it final.
on classes and methods - when you don’t want subclasses to be able to extend / override them.
select * from Employee as e1 where3 > (selectcount(distinct e2.Salary) from Employee as e2 where e1.Salary < e2.Salary and e1.DepartmentId = e2.DepartmentId)
将 Employee 和 Department 合并
1 2
select d1.Name as Department, e1.Name as Employee, e1.Salary as Salary from Employee as e1, Department as d1 where e1.DepartmentId = d1.Id and3 > (selectcount(distinct e2.Salary) from Employee as e2 where e1.Salary < e2.Salary and e1.DepartmentId = e2.DepartmentId)
mstsc (Microsoft terminal services client) 创建与终端服务器或其他远程计算机的连接,编辑现有“远程桌面连接(.rdp)”配置文件,并将 Windows XP 连接,迁移到新的 .rdp 文件中。Microsoft Telnet Screen Control ,即“微软远程桌面控制”。
创建考勤用户-用户ID设置下拉菜单
数据库表与 model 对应。在创建考勤用户时,只显示未成为 atd_user 的 student 的 username. 在 dbis_user_student 表中取出所有 use_id,在 atd_user 表中取出所有的 uid, 求差集。得到 useId 的集合,到 user 表中查得 user 对象,将 userId 和 userName 存入数组,用 DropList 展示数据。
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN set N=N-1; RETURN ( # Write your MySQL query statement below. select ifnull( (select distinct Salary from Employee order by Salary desc limit N,1), null) ); END
Request URL: http://exploit.nkdbis.cn/article/8 Request Method: GET Status Code: 404 Not Found Remote Address: 39.106.204.28:80 Referrer Policy: strict-origin-when-cross-origin
Request URL: http://exploit.nkdbis.cn/index Request Method: GET Status Code: 404 Not Found Remote Address: 39.106.204.28:80 Referrer Policy: strict-origin-when-cross-origin
SSH是指 Struts2 Spring Hibernate三个框架。SSM是指SpringMVC Spring MyBatis。对于MVC框架,SSH是Structs2做controller,hibernate负责持久化层;SSM是SpringMVC做controller,MyBatis负责持久化层。Structs2是Action级别,SpringMVC是方法级别,更容易实现RESTful风格。