加载中
UVA 104 - Arbitrage

这道题的题意是:给出n种国家的货币汇率,一定金额的某种货币经过一系列汇率变换后再换成原来货币,金额增加了,求出这样的一个变换,要求变换步数最少。 由于数据量不大,我们可以直接用动规...

JFinal源码解析--render

1. JFinal类     private void initRender() {         RenderFactory renderFactory = RenderFactory.me();//工厂设计模式、单例         renderFactory.init(co...

2014/05/19 15:28
107
JFinal源码解析--从请求到处理返回流程

JFinalFilter类doFilter 请求入口 将请求交由Handler链处理 public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletEx...

JFinal 源码解析--Handler

1. JFinal类 初始化Handler private void initHandler() {     Handler actionHandler = new ActionHandler(actionMapping, constants);//将ActionMaping平封装成一个Handler     handl...

2014/05/15 15:27
221
JFinalFilter源码解析--初始化

web.xml <filter>         <filter-name>jfinal</filter-name>         <filter-class>com.jfinal.core.JFinalFilter</filter-class>         <init-param>     ...

JFinal源码解析--ActionMapping,Interceptor

1. JFinal类 初始化ActionMapping private void initActionMapping() {         actionMapping = new ActionMapping(Config.getRoutes(), Config.getInterceptors());//将配置...

JFinal源码--获取表单数据

使用request获取表单中数据的方法 <input type="text" name="user.name"/> String name = request.getParameter("user.name"); User user = new User(); user.setName(name); 1.JFinal中可以...

2014/05/14 10:19
165
JFinal 源码--类映射解析

1.User类 import com.jfinal.plugin.activerecord.Model; /** * user model. */ @SuppressWarnings("serial") public class User extends Model<User> { public static final User dao...

设计模式 结构与角色

汇总了常见设计模式的UML图和图中各个角色的职责,方便记忆,回顾。参考了很多博客就不一一列举了。

打印日志的10个建议

打印日志的10个建议

2016/01/08 11:01
709
【LeetCode OJ】Single Number

Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement i...

【LeetCode OJ】Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. /**  * Definit...

【LeetCode OJ】Same Tree

Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same ...

【LeetCode OJ】Best Time to Buy and Sell Stock II

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 public class Solution {     public int reverse(int x) {         i...

【LeetCode OJ】Best Time to Buy and Sell Stock II

Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as ...

【LeetCode OJ】Unique Binary Search Trees

Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's.    1        ...

【LeetCode OJ】Linked List Cycle

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? /**  * Definition for singly-linked list.  * class ListNod...

【LeetCode OJ】Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3},    1     \      2     /    3 return [1,2,3...

【LeetCode OJ】Linked List Cycle

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? /**  * Definition for singly-linked list.  * class ListNod...

【LeetCode OJ】Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3},    1     \      2     /    3 return [1,3,2]....

没有更多内容

加载失败,请刷新页面

返回顶部
顶部