参考博客: https://www.cnblogs.com/guilty/p/3977016.html 在HWPF中换行符是"\013",在XWPF中是run.addBreak();也就是说word2007里面是没有直接的换行符的。 或者r3.addCarriageReturn(); ...
分类:
其他好文 时间:
2019-04-09 18:40:38
阅读次数:
197
你和你的朋友,两个人一起玩 Nim游戏:桌子上有一堆石头,每次你们轮流拿掉 1 3 块石头。 拿掉最后一块石头的人就是获胜者。你作为先手。 你们是聪明人,每一步都是最优解。 编写一个函数,来判断你是否可以在给定石头数量的情况下赢得游戏。 示例: 输入: 4 输出: false 解释: 如果堆中有 4 ...
分类:
其他好文 时间:
2019-04-09 18:33:59
阅读次数:
97
class MyCharField(models.Field): """ 自定义的char类型的字段类 """ def __init__(self, max_length, *args, **kwargs): self.max_length = max_length super(MyCharFiel... ...
分类:
其他好文 时间:
2019-04-09 18:22:01
阅读次数:
147
Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2- ...
分类:
其他好文 时间:
2019-04-09 17:04:04
阅读次数:
152
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up:Can you ...
分类:
其他好文 时间:
2019-04-09 16:55:57
阅读次数:
173
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a ...
分类:
其他好文 时间:
2019-04-09 16:44:26
阅读次数:
112
class ObjPool{ final List pool; //信号量实现限流器 final Semaphore sem; //构造方法 ObjectPool(int size,T t){ pool = new Vector(){}; for(int i=0; i func){ T t = nu... ...
分类:
其他好文 时间:
2019-04-09 15:17:10
阅读次数:
168
``` class Solution { public: int minDepth(TreeNode* root) { if (!root) return 0; if (!root->left) return 1 + minDepth(root->right); if (!root->right) ... ...
分类:
其他好文 时间:
2019-04-09 15:09:48
阅读次数:
154