测试工具:

1. 基本界面实现:

# coding:utf-8
import sys
import os
import os.path
import re
import time
from PyQt4 import QtCore
from PyQt4 import QtGui
from PyQt4 import Qt msg_file_not_exists = 'Can not find config file'
msg_file_is_null = 'There is no attribute now'
project_file = 'D:\workspace\py_demo\project.py'
case_file = 'D:\workspace\py_demo\case.py'
case_seprator = '|' def get_time():
return time.strftime("%Y-%m-%d %X", time.localtime(time.time())) def _save_project(project_index, project_info, create_time, edit_time, project_detail):
all_lines = []
line_str = str(project_index) + case_seprator + project_info + case_seprator + \
create_time + case_seprator + edit_time + case_seprator + project_detail + '\n'
if os.path.exists(project_file):
if os.path.getsize(project_file):
with open(project_file, 'r') as f:
all_lines = f.readlines()
if all_lines[project_index:project_index + 1]:
all_lines[project_index] = line_str
else:
all_lines.append(line_str)
else:
all_lines.append(line_str)
else:
all_lines.append(line_str)
with open(project_file, 'w') as f:
f.writelines(all_lines) def _save_case(project_index, case_index, case_info, create_time,
edit_time, start_run_time, finish_run_time, run_type, run_script, run_result):
all_lines = []
line_str = str(project_index) + case_seprator + str(
case_index) + case_seprator + case_info + case_seprator + \
create_time + case_seprator + edit_time + case_seprator + \
start_run_time + case_seprator + finish_run_time + \
case_seprator + run_type + case_seprator + run_script +\
case_seprator + run_result + '\n'
if os.path.exists(case_file):
if os.path.getsize(case_file):
with open(case_file, 'r') as f:
all_lines = f.readlines()
if all_lines[case_index:case_index + 1]:
all_lines[case_index] = line_str
else:
all_lines.append(line_str)
else:
all_lines.append(line_str)
else:
all_lines.append(line_str)
with open(case_file, 'w') as f:
f.writelines(all_lines) class MainWindow(QtGui.QMainWindow): def __init__(self):
super(MainWindow, self).__init__() self.setWindowTitle('AutoTest')
self.resize(600, 300) self.setTool = self.addToolBar('Set')
self.setToolAction = Qt.QAction(
QtGui.QIcon('images/open.png'), u'Set', self)
self.setToolAction.setShortcut('Ctrl+S')
self.setToolAction.setStatusTip(u'Config')
self.setToolAction.triggered.connect(self.set_config_file)
self.setTool.addAction(self.setToolAction) self.newProjectTool = self.addToolBar('NewProject')
self.newProjectToolAction = Qt.QAction(
QtGui.QIcon('images/selectall.png'), u'CreateProject', self)
self.newProjectToolAction.triggered.connect(self.newproject)
self.newProjectTool.addAction(self.newProjectToolAction) self.newCaseTool = self.addToolBar('NewCase')
self.newCaseToolAction = Qt.QAction(
QtGui.QIcon('images/copy.png'), u'CreateCase', self)
self.newCaseToolAction.triggered.connect(self.newcase)
self.newCaseTool.addAction(self.newCaseToolAction) wedgit = QtGui.QWidget()
layout = QtGui.QVBoxLayout() self.tree = QtGui.QTreeWidget()
self.tree.setColumnCount(4)
self.tree.setHeaderLabels(['Step', 'Start Time','Finish Time','Result'])
# self.tree.headerItem().setStretchLastSection(True)
self.load_case() self.tree.itemChanged.connect(self.save_project)
self.tree.itemDoubleClicked.connect(self.edit_project) # self.tree.setExpanded(0,True) self.log_text = QtGui.QTextBrowser()
layout.addWidget(self.tree)
layout.addWidget(self.log_text)
wedgit.setLayout(layout)
self.setCentralWidget(wedgit) def set_config_file(self):
self.dialog = config_file()
self.dialog.show() def load_case(self):
if os.path.exists(project_file):
if os.path.getsize(project_file):
with open(project_file, 'r') as f:
all_lines = f.readlines() for i, line in enumerate(all_lines):
project_text = line.split(case_seprator)[1]
self.project = QtGui.QTreeWidgetItem(self.tree)
self.tree.setItemExpanded(self.project, True) # 设置自动扩展 self.tree.addTopLevelItem(self.project)
self.project.setText(0, project_text)
project_no = line.split(case_seprator)[0] if os.path.exists(case_file):
if os.path.getsize(case_file):
with open(case_file, 'r') as f:
case_all_line = f.readlines()
for i, line in enumerate(case_all_line):
case_project_no = line.split(
case_seprator)[0]
if case_project_no == project_no:
case_name = line.split(
case_seprator)[1]
case_result = line.split(
case_seprator)[2]
self.case = QtGui.QTreeWidgetItem(
self.project)
self.case.setText(0, case_name)
self.case.setText(0, case_result) def newproject(self):
self.tree.blockSignals(True) # 禁止itemchanged信号
self.project = QtGui.QTreeWidgetItem(self.tree)
self.tree.addTopLevelItem(self.project)
self.project.setFlags(self.project.flags() | QtCore.Qt.ItemIsEditable)
self.project.setText(0, 'Here is project information')
self.tree.blockSignals(False)
self.save_project(self.project, 0) def newcase(self):
self.tree.blockSignals(True)
check_index = self.tree.indexOfTopLevelItem(self.tree.currentItem())
if check_index > -1:
self.project = self.tree.currentItem()
else:
self.project = self.tree.currentItem().parent() self.case = QtGui.QTreeWidgetItem(self.project)
self.case.setFlags(self.project.flags() | QtCore.Qt.ItemIsEditable)
self.case.setText(0, 'Here is case name')
self.case.setCheckState(0, QtCore.Qt.Unchecked)
self.project.addChild(self.case)
self.tree.blockSignals(False)
self.save_project(self.case, 0) def save_case(self, item, column):
print 'item text', item.text(column)
print 'index', self.tree.indexFromItem(item).row()
print 'parent text', item.parent().text(0) def save_project(self, item, column):
check_index = self.tree.indexOfTopLevelItem(item)
if check_index > -1:
project_index = check_index
project_info = str(item.text(column))
create_time = get_time()
edit_time = get_time()
_save_project(project_index, project_info,
create_time, edit_time, '')
else:
project_index = self.tree.indexOfTopLevelItem(item.parent())
case_index = self.tree.indexFromItem(item).row()
case_info = str(item.text(column)) # case_index.data()
create_time=get_time()
edit_time=get_time()
_save_case(project_index, case_index, case_info,create_time,edit_time,'','','','','') print 'index', project_index
print 'text', item.text(0)
print 'column', column def edit_project(self,item,column):
current_index = self.tree.indexOfTopLevelItem(item)
print current_index
if current_index > -1:
project_dialog = project(None,current_index)
project_dialog.exec_()
if project_dialog.reply == QtGui.QMessageBox.Yes: #窗口之间传值
project_title = project_dialog.get_project_title()
item.setText(0,project_title)
else:
project_index = self.tree.indexOfTopLevelItem(item.parent())
case_index = self.tree.indexFromItem(item).row()
case_dialog = case(None,project_index,case_index)
case_dialog.exec_()
if case_dialog.reply == QtGui.QMessageBox.Yes:
case_title = case_dialog.get_case_title()
item.setText(0,case_title) class case(QtGui.QDialog): def __init__(self, parent, project_index, case_index):
super(case, self).__init__(parent)
self.project_index = project_index
self.case_index = case_index
self.setWindowTitle('Case')
self.resize(500, 300)
self.setup_ui()
self.update_flag = False def closeEvent(self, event):
if self.update_flag:
self.reply = QtGui.QMessageBox.question(
self, 'Warning', 'Some content was changed,save?', QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if self.reply == QtGui.QMessageBox.No:
# event.ignore() # 选择No直接关闭窗口,event.ignore表示保留原窗口
pass
else:
case_edit_time = get_time()
case_title = self.case_title_edit_line.text()
_save_case(self.project_index, int(self.caseNo), self.case_title_edit_line.text(
), self.case_create_time, case_edit_time,'','',self.case_run_type_edit_line.currentText (),'','pending run') def set_update_flag(self):
self.update_flag = True def get_case_title(self):
return self.case_title_edit_line.text() def setup_ui(self):
all_lines=[]
with open(case_file, 'r') as f:
for line in f.readlines():
if int(line.split(case_seprator)[0]) == int(self.project_index):
all_lines.append(line) case_info = all_lines[self.case_index]
self.caseNo = case_info.split(case_seprator)[1]
case_title = case_info.split(case_seprator)[2]
self.case_create_time = case_info.split(case_seprator)[3]
case_edit_time = case_info.split(case_seprator)[4]
case_start_time = case_info.split(case_seprator)[5]
case_finish_time = case_info.split(case_seprator)[6]
case_run_type = case_info.split(case_seprator)[7]
case_run_script = case_info.split(case_seprator)[8]
case_run_result = case_info.split(case_seprator)[9] mainlayout = QtGui.QVBoxLayout()
layout1 = QtGui.QHBoxLayout()
self.case_number_label = QtGui.QLabel('No:')
self.case_number_read_line = QtGui.QLabel(self.caseNo)
self.case_number_label.setBuddy(self.case_number_read_line)
layout1.addWidget(self.case_number_label)
layout1.addWidget(self.case_number_read_line)
layout1.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout2 = QtGui.QHBoxLayout()
self.case_title_label = QtGui.QLabel('Title:')
self.case_title_edit_line = QtGui.QLineEdit(case_title)
self.case_title_label.setBuddy(self.case_title_edit_line)
layout2.addWidget(self.case_title_label)
layout2.addWidget(self.case_title_edit_line)
layout2.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
self.case_title_edit_line.textChanged.connect(self.set_update_flag) layout3 = QtGui.QHBoxLayout()
self.case_create_time_label = QtGui.QLabel('CreateTime:')
self.case_create_time_read_line = QtGui.QLabel(
self.case_create_time)
self.case_create_time_label.setBuddy(
self.case_create_time_read_line)
layout3.addWidget(self.case_create_time_label)
layout3.addWidget(self.case_create_time_read_line)
layout3.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout4 = QtGui.QHBoxLayout()
self.case_edit_time_label = QtGui.QLabel('EditTime:')
self.case_edit_time_read_line = QtGui.QLabel(case_edit_time)
self.case_edit_time_label.setBuddy(self.case_edit_time_read_line)
layout4.addWidget(self.case_edit_time_label)
layout4.addWidget(self.case_edit_time_read_line)
layout4.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout5 = QtGui.QHBoxLayout()
self.case_start_time_label = QtGui.QLabel('Start Run Time:')
self.case_start_time_read_line = QtGui.QLineEdit(case_start_time)
self.case_start_time_label.setBuddy(self.case_start_time_read_line)
layout5.addWidget(self.case_start_time_label)
layout5.addWidget(self.case_start_time_read_line)
layout5.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout6 = QtGui.QHBoxLayout()
self.case_finish_time_label = QtGui.QLabel('Finish Run Time:')
self.case_finish_time_read_line = QtGui.QLineEdit(case_finish_time)
self.case_finish_time_label.setBuddy(self.case_finish_time_read_line)
layout6.addWidget(self.case_finish_time_label)
layout6.addWidget(self.case_finish_time_read_line)
layout6.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout7 = QtGui.QHBoxLayout()
self.case_run_type_label = QtGui.QLabel('Run Type:')
self.case_run_type_edit_line = QtGui.QComboBox(self)
self.case_run_type_edit_line.addItems(['Shell','Python'])
self.case_run_type_label.setBuddy(self.case_run_type_edit_line)
layout7.addWidget(self.case_run_type_label)
layout7.addWidget(self.case_run_type_edit_line)
layout7.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout8 = QtGui.QHBoxLayout()
self.case_run_script_label = QtGui.QLabel('Run Script:')
self.case_run_script_edit_line = QtGui.QTextEdit(case_run_script)
self.case_run_script_label.setBuddy(self.case_run_script_edit_line)
layout8.addWidget(self.case_run_script_label)
layout8.addWidget(self.case_run_script_edit_line)
layout8.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout9 = QtGui.QHBoxLayout()
self.case_run_result_label = QtGui.QLabel('Run Result:')
self.case_run_result_read_line = QtGui.QLineEdit(case_run_result)
self.case_run_result_label.setBuddy(self.case_run_result_read_line)
layout9.addWidget(self.case_run_result_label)
layout9.addWidget(self.case_run_result_read_line)
layout9.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) mainlayout.addLayout(layout1)
mainlayout.addLayout(layout2)
mainlayout.addLayout(layout3)
mainlayout.addLayout(layout4)
mainlayout.addLayout(layout5)
mainlayout.addLayout(layout6)
mainlayout.addLayout(layout7)
mainlayout.addLayout(layout8)
mainlayout.addLayout(layout9)
self.setLayout(mainlayout) class project(QtGui.QDialog): def __init__(self, parent,project_index):
super(project, self).__init__(parent)
self.project_index = project_index
self.setWindowTitle('Project')
self.resize(500, 300)
self.setup_ui()
self.update_flag = False def closeEvent(self, event):
if self.update_flag:
self.reply = QtGui.QMessageBox.question(
self, 'Warning', 'Some content was changed,save?', QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if self.reply == QtGui.QMessageBox.No:
event.accept() # 选择No直接关闭窗口,event.ignore表示保留原窗口
else:
edit_time = get_time()
project_title = self.project_title_edit_line.text()
_save_project(int(self.projectNo), self.project_title_edit_line.text(
), self.project_create_time, edit_time, self.project_detail_edit_line.toPlainText()) def set_update_flag(self):
self.update_flag = True def get_project_title(self):
return self.project_title_edit_line.text() def setup_ui(self):
with open(project_file, 'r') as f:
all_lines = f.readlines() project_info = all_lines[self.project_index]
self.projectNo = project_info.split(case_seprator)[0]
project_title = project_info.split(case_seprator)[1]
self.project_create_time = project_info.split(case_seprator)[2]
project_edit_time = project_info.split(case_seprator)[3]
project_detail = project_info.split(case_seprator)[4] mainlayout = QtGui.QVBoxLayout()
layout1 = QtGui.QHBoxLayout()
self.project_number_label = QtGui.QLabel('No:')
self.project_number_read_line = QtGui.QLabel(self.projectNo)
self.project_number_label.setBuddy(self.project_number_read_line)
layout1.addWidget(self.project_number_label)
layout1.addWidget(self.project_number_read_line)
layout1.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout2 = QtGui.QHBoxLayout()
self.project_title_label = QtGui.QLabel('Title:')
self.project_title_edit_line = QtGui.QLineEdit(project_title)
self.project_title_label.setBuddy(self.project_title_edit_line)
layout2.addWidget(self.project_title_label)
layout2.addWidget(self.project_title_edit_line)
layout2.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
self.project_title_edit_line.textChanged.connect(self.set_update_flag) layout3 = QtGui.QHBoxLayout()
self.project_create_time_label = QtGui.QLabel('CreateTime:')
self.project_create_time_read_line = QtGui.QLabel(
self.project_create_time)
self.project_create_time_label.setBuddy(
self.project_create_time_read_line)
layout3.addWidget(self.project_create_time_label)
layout3.addWidget(self.project_create_time_read_line)
layout3.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout4 = QtGui.QHBoxLayout()
self.project_edit_time_label = QtGui.QLabel('EditTime:')
self.project_edit_time_read_line = QtGui.QLabel(project_edit_time)
self.project_edit_time_label.setBuddy(self.project_edit_time_read_line)
layout4.addWidget(self.project_edit_time_label)
layout4.addWidget(self.project_edit_time_read_line)
layout4.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) layout5 = QtGui.QHBoxLayout()
self.project_detail_label = QtGui.QLabel('Detail:')
self.project_detail_edit_line = QtGui.QTextEdit(project_detail)
self.project_detail_label.setBuddy(self.project_detail_edit_line)
layout5.addWidget(self.project_detail_label)
layout5.addWidget(self.project_detail_edit_line)
layout5.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
self.project_detail_edit_line.textChanged.connect(self.set_update_flag) mainlayout.addLayout(layout1)
mainlayout.addLayout(layout2)
mainlayout.addLayout(layout3)
mainlayout.addLayout(layout4)
mainlayout.addLayout(layout5)
self.setLayout(mainlayout) class config_file(QtGui.QDialog): def __init__(self, parent=None):
super(config_file, self).__init__(parent)
self.file_name = 'D:\workspace\py_demo\NotePad\config.py'
self.separator_char = '=' self.config_table = QtGui.QTableWidget(0, 2)
self.config_table.setSelectionMode(
QtGui.QAbstractItemView.SingleSelection) # 设置为只能选中单个目标
self.config_table.setSelectionBehavior(
QtGui.QAbstractItemView.SelectRows) # 设置选中单个单元格
self.config_table.setEditTriggers(
QtGui.QAbstractItemView.NoEditTriggers) # 默认双击可以编辑,这里设置禁止编辑 self.config_table.setAlternatingRowColors(True) # 隔行改变颜色
self.config_table.setShowGrid(True) # 设置显示网格线
self.config_table.setSortingEnabled(False) # 设置禁止排序
self.config_table.setHorizontalHeaderLabels(['Attribute', 'Value']) self.load_config()
layout = QtGui.QVBoxLayout() btnlayout = QtGui.QHBoxLayout()
self.add_item_btn = QtGui.QPushButton()
self.add_item_btn.setText('Add')
self.add_item_btn.clicked.connect(self.add_config) self.edit_item_btn = QtGui.QPushButton()
self.edit_item_btn.setText('Edit')
self.edit_item_btn.clicked.connect(self.edit_config) self.delete_item_btn = QtGui.QPushButton()
self.delete_item_btn.setText('Delete')
self.delete_item_btn.clicked.connect(self.delete_config) btnlayout.addStretch()
btnlayout.addWidget(self.add_item_btn)
btnlayout.addWidget(self.edit_item_btn)
btnlayout.addWidget(self.delete_item_btn) layout.addWidget(self.config_table)
layout.addLayout(btnlayout)
self.setLayout(layout) def load_config(self):
if os.path.exists(self.file_name):
if os.path.getsize(self.file_name):
with open(self.file_name, 'r') as f:
for line_count, line in enumerate(f.readlines()):
if self.separator_char in line:
attribute = line.split(self.separator_char)[
0].strip()
value = line.split(self.separator_char)[1].strip()
self.config_table.insertRow(line_count)
self.newAttr = QtGui.QTableWidgetItem(attribute)
self.config_table.setItem(
line_count, 0, self.newAttr)
self.newValue = QtGui.QTableWidgetItem(value)
self.config_table.setItem(
line_count, 1, self.newValue)
else:
self.config_table.insertRow(0)
self.newAttr = QtGui.QTableWidgetItem(
'There is no attribute now')
self.config_table.setSpan(0, 0, 1, 2)
self.newAttr.setTextAlignment(
QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
self.config_table.setItem(0, 0, self.newAttr)
else:
self.config_table.insertRow(0)
self.newAttr = QtGui.QTableWidgetItem(msg_file_not_exists)
self.config_table.setSpan(0, 0, 1, 2)
self.newAttr.setTextAlignment(
QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
self.config_table.setItem(0, 0, self.newAttr) def add_config(self):
if str(self.config_table.item(0, 0).text()) in (msg_file_is_null, msg_file_not_exists):
current_row_index = self.config_table.currentRow()
self.config_table.removeRow(current_row_index) total_count_index = self.config_table.rowCount()
self.config_table.setEditTriggers(
QtGui.QAbstractItemView.DoubleClicked)
self.config_table.insertRow(total_count_index) def edit_config(self):
self.config_table.setEditTriggers(
QtGui.QAbstractItemView.DoubleClicked) def delete_config(self):
current_row_index = self.config_table.currentRow()
if current_row_index != -1:
reply = QtGui.QMessageBox.warning(
self, 'Warning', 'Could you confirm to delete the config', QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes:
self.config_table.removeRow(current_row_index) def closeEvent(self, event):
row_count = self.config_table.rowCount()
all_lines = []
for row in range(row_count):
if self.config_table.item(row, 0) and self.config_table.item(row, 1):
line = str(self.config_table.item(row, 0).text()) + \
self.separator_char + \
str(self.config_table.item(row, 1).text())
all_lines.append(line + '\n')
else:
QtGui.QMessageBox.information(
self, 'Error', 'Config shoud not be null')
event.ignore()
return
with open(self.file_name, 'w') as f:
f.writelines(all_lines) app = QtGui.QApplication(sys.argv)
mainwindow = MainWindow()
mainwindow.show()
app.exec_()

PyQt实现测试工具的更多相关文章

  1. Python渗透测试工具合集

    摘自:http://www.freebuf.com/tools/94777.html 如果你热爱漏洞研究.逆向工程或者渗透测试,我强烈推荐你使用 Python 作为编程语言.它包含大量实用的库和工具, ...

  2. 痞子衡嵌入式:超级好用的可视化PyQt GUI构建工具(Qt Designer)

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是PyQt GUI构建工具Qt Designer. 痞子衡开博客至今已有好几年,一直以嵌入式开发相关主题的文章为主线,偶尔穿插一些其他技术 ...

  3. python渗透测试工具集合

    作者:一起学习Python 原文链接:https://zhuanlan.zhihu.com/p/21803985 著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 在进行漏洞研究. ...

  4. 渗透测试工具BurpSuite做网站的安全测试(基础版)

    渗透测试工具BurpSuite做网站的安全测试(基础版) 版权声明:本文为博主原创文章,未经博主允许不得转载. 学习网址: https://t0data.gitbooks.io/burpsuite/c ...

  5. linux压力测试工具stress

    最近给PASS平台添加autoscaling的功能,根据服务器的负载情况autoscaling,为了测试这项功能用到了stress这个压力测试工具,这个工具相当好用了.具体安装方式就不说了.记录下这个 ...

  6. [.NET] WebApi 生成帮助文档及顺便自动创建简单的测试工具

    ==========最终的效果图========== ==========下面开始干活:生成帮助文档========== 一.创建 WebApi 项目 二.找到 HelpPageConfig.cs 并 ...

  7. RabbitMQ调试与测试工具-v1.0.1 -提供下载测试与使用

    最近几天在看RabbitMQ,所以发了两天时间写了一个调试和测试工具.方便使用. 下载地址:RabbitMQTool-V1.0.1.zip

  8. HTTP压力测试工具

    HttpTest4Net是一款基于C#实现的和HTTP压力测试工具,通过工具可以简单地对HTTP服务进行一个压力测试.虽然VS.NET也集成了压力测试项目,但由于VS自身占用的资源导致了在配置不高的P ...

  9. 微软压力测试工具 web application stress

    转自 http://www.cnblogs.com/tonykan/p/3514749.html lbimba  铜牌会员 这里给广大的煤油推荐一个web网站压力测试工具.它可以用来模拟多个用户操作网 ...

随机推荐

  1. 【一】shiro入门 之 Shiro简介

    Shiro 可以非常容易的开发出足够好的应用,其不仅可以用在JavaSE 环境,也可以用在JavaEE 环境.Shiro 可以帮助我们完成:认证.授权.加密.会话管理.与Web 集成.缓存等.这不就是 ...

  2. 苹果手机连wifi跳不出来登录网页解决办法

    1.点开要连接wifi后面的小叹号“!”,打开“自动登录” 2.打开设置,关闭SAFARI的“阻止弹窗” 3.重新连接wifi

  3. l洛谷 (水题)P4144 大河的序列

    题目戳 Solution: 这题前面都是废话,关键的一句就是本题求的是序列中连续一段的相与值(&)+相或值(|)最大,然后对这个值进行快速幂取模.考虑到两个数相与最大能得到的就是这两个数中的最 ...

  4. [JSOI2009]游戏 二分图博弈

    题面 题面 题解 二分图博弈的模板题,只要会二分图博弈就可以做了,可以当做板子打. 根据二分图博弈,如果一个点x在某种方案中不属于最大匹配,那么这是一个先手必败点. 因为对方先手,因此我们就是要找这样 ...

  5. 如何使用火狐下的两款接口测试工具RESTClient和HttpRequester发送post请求

    Chrome下有著名的Postman,那火狐也有它的左膀右臂,那就是RESTClient和HttpRequester.这两款工具都是火狐的插件,主要用来模拟发送HTTP请求,HTTP请求最常用的两种方 ...

  6. hadoop(五)HDFS原理剖析

    一.HDFS的工作机制 工作机制的学习主要是为加深对分布式系统的理解,以及增强遇到各种问题时的分析解决能 力,形成一定的集群运维能力PS:很多不是真正理解 hadoop 工作原理的人会常常觉得 HDF ...

  7. win7系统用笔记本共享wifi热点 让手机免费上网

    之前一直在用这个方法把自己的笔记本变成一个wifi热点,让手机也可以直接连wifi上网,节省网费和路由器购买费. 其实就是开启了windows 7的隐藏功能:虚拟WiFi和SoftAP(即虚拟无线AP ...

  8. 配置pdo 的用户和密码,

    注意:要进入mysql命令行来操作~~~~ grant all on *.* to pdo_root@'%' identified by 'pdo_pwd'; flush privileges

  9. TCP与UDP区别详解

    TCP协议与UDP协议的区别    首先咱们弄清楚,TCP协议和UCP协议与TCP/IP协议的联系,很多人犯糊涂了,一直都是说TCP/IP协议与UDP协议的区别,我觉得这是没有从本质上弄清楚网络通信! ...

  10. ios 虚拟机中文件下载路径

    每个人mac上的路径会有不同,你可以打印出你文件下载存放的路径,然后拷贝一下,再单击桌面空白处,最上面的导航栏上有个“前往”,然后找到“前往文件夹”,粘贴一下,就可以找到了.