Time of Update: 2018-08-21
在系統中,會經常用到Form表單來提交資料等。 其中:Action是Form的屬性;onsubmit是事件。 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4
Time of Update: 2018-08-21
SpringMVC整合Tiles3,基於Maven構建,Bootstarp做前台頁面呈現儘管做的相對簡陋。菜單可以切換兩種布局方式(用繼承以及覆蓋解釋如何換湯不換藥) 下面的項目實戰我們也用到了萬用字元以簡化定義,在普通的springMVC整合Tiles工程裡萬用字元的使用可能類似下面這樣: <definition name="tiles/*" extends="base.definition"> <!-- {1}:萬用字元方式簡化定義 -->
Time of Update: 2018-08-21
Spring Boot 的定時任務: 第一種:把參數配置到.properties檔案中: 代碼: package com.accord.task;import java.text.SimpleDateFormat;import java.util.Date;import org.springframework.scheduling.annotation.Scheduled;import org.springframework.stereotype.Component;/** *
Time of Update: 2018-08-21
已經完成許可權管理功能 1、 模組添加 、列表查詢 2、 功能點添加 、查詢 3、 角色添加 、為角色授予許可權 4、 為使用者授予角色 ---------------- 全面測試。將返回json異常修複 將bos功能許可權資訊.sql 匯入到資料庫 功能路徑,參考menu.json 、 Action中業務方法 **** <constant
Time of Update: 2018-08-21
1、 最簡易的許可權管理模型 (javaweb) 適用於: 使用者種類不多,系統功能不是特別複雜 在使用者表中添加角色欄位,用欄位區分使用者屬於哪類角色 好處: 使用起來方便,編碼量不大 缺點: 管理粒度比較粗 ,維護不方便 ,不夠靈活 --- 不可複用 ============ 角色和資源路徑關係,固定在程式,通過設定檔 xml/txt 2、 標準許可權管理模組 功能表
Time of Update: 2018-08-21
選擇排序 思想:每一次從待排序的資料元素中選出最小的或者最大的,直到全部待排序的元素排序完成。 待排序的元素:int[] arr = {6,5,4,3,2,1}; 運行截圖: 步驟:每一趟我們找出來的最小值使用加粗黑體表示 第幾趟 6 5 4 3 2 1 0 1 5 4 3 2 6 1 1 2 4 3 5 6 2 1 2 3 4 5 6 3 1 2 3 4 5 6 4 1 2 3 4 5 6 5 1 2 3 4 5 6
Time of Update: 2018-08-21
SSH整合中各版本為:Struts2、Hibernate4、Spring4 整合中在web.xml中加入了OpenSessionInViewFilter的過濾器,具體如下: <!-- 配置Struts2的過濾器 --><filter> <filter-name>struts2</filter-name>
Time of Update: 2018-08-21
廣播操作(Broadcasting operation) 一種用numpy-style broadcasting來保證tensor參數的形態相容的操作。 Devices 一塊可以用來運算並且擁有自己的地址空間的硬體,比如GPU和CPU。 eval Tensor 的一個方法,返回 Tensor 的值。觸發任意一個圖計算都需要計算出這個值。只能在一個已經啟動的會話 的圖中才能調用該 Tensor 值。 Feed TensorFlow 的一個概念:把一個 Tensor
Time of Update: 2018-08-21
摘要: 本文介紹一下Apache Tiles的基本概念及相關的組件,對Tiles有個充分的瞭解。 1、概述 對於一個新的技術,瞭解其基本的概念和和原理是學好該技術的基礎。 2、Tiles的概念 Tiles 是複合視圖模式(Composite View
Time of Update: 2018-08-21
文檔轉換效能測試 在財務系統中使用了兩種PDF轉換組件 一種是com.artofsolving,也是系統第一次引用的組件: <!-- https://mvnrepository.com/artifact/com.artofsolving/jodconverter--> <dependency> <groupId>com.artofsolving</groupId>
Time of Update: 2018-08-21
安裝freemarker外掛程式並設定myeclipse使用該外掛程式的步驟: 1. 開啟http://sourceforge.net/projects/freemarker-ide/files/ 下載最新版本,最新版本是:freemarker-ide-0.9.14.zip
Time of Update: 2018-08-21
comment_list = models.Comment.objects. filter (news_id = new_id) ret = [] # 最終拿到的資料 comment_list_dict = {} # 構建的中間字典 for row in comment_list: #
Time of Update: 2018-08-21
(1)註解配置 一、Servlet3.0介紹 Servlet3.0是Java EE6規範的一部分,Servlet3.0提供了註解(annotation),使得不再需要在web.xml檔案中進行Servlet的部署描述,簡化開發流程。 二、開發Servlet3.0程式的所需要的環境 開發Servlet3.0的程式需要一定的環境支援。MyEclipse10和Tomcat7都提供了對Java EE6規範的支援。若用低版本時需要手動設定環境
Time of Update: 2018-08-21
冒泡排序 思想: 小的總是向前冒大的總是向後冒。 步驟: 1.比較相鄰元素,如果第一個比第二個大,就交換他兩的順序 2.就這樣對第0個資料到第N-1個資料進行一次遍曆,最大的一個資料就沉到了第N-1位置 3.N=N-1,如果N不為0就重複起前面二步,否則排序完成。 我們來看一下啟動並執行效果圖: 例如數組{3,2,10,5,7,2,4,6}; 相鄰兩個元素 比較大小然後如果前一個大於後一個則進行交換順序。我們對其使用冒泡後的步驟如下:
Time of Update: 2018-08-21
動畫的實現用到了pop 動畫 pod 'pop','~> 1.0.9' /// 第一個點 @property (nonatomic,strong)CAShapeLayer *firstLayer; /// 第二個點 @property (nonatomic,strong)CAShapeLayer *secondLayer; /// 第三個點 @property (nonatomic,strong)CAShapeLayer
Time of Update: 2018-08-21
class MySelectPic extends BaseAdapter { @Override public int getCount() {// if (resul.size() == 9) {// return resul.size();// } else { return resul.size() + 1;// } }
Time of Update: 2018-08-21
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
Time of Update: 2018-08-21
在NC介面的時候,需要把String字串轉換成XML格式,同時也需要把XML格式的檔案轉換成String字串; package com.accord.test;import java.io.ByteArrayInputStream;import java.io.File;import java.io.FileWriter;import java.io.IOException;import org.dom4j.Document;import
Time of Update: 2018-08-21
String password = new String((char[])token.getCredentials()); 以上:這個可以正常通過測試。 String password = token.getCredentials().toString(); 報錯: org.apache.shiro.authc.IncorrectCredentialsExceptionat com.accord.shiro01.MyRealm1.getAuthenticationInfo(
Time of Update: 2018-08-21
druid-1.0.16.jar 阿里巴巴的開來源資料串連池 jar包 純文字密碼+私密金鑰(privateKey)加密=加密密碼 加密密碼+公開金鑰(publicKey)解密=純文字密碼 程式碼如下: package com.t1;import com.alibaba.druid.filter.config.ConfigTools;public class DruidTest { public static void main(