原题地址:https://oj.leetcode.com/problems/maximum-product-subarray/解题思路:主要需要考虑负负得正这种情况,比如之前的最小值是一个负数,再乘以一个负数就有可能成为一个很大的正数。代码:class Solution: # @param A...
分类:
编程语言 时间:
2014-10-11 20:28:16
阅读次数:
238
安装rac10g,出现如下错误:
[root@rac2 oracle]# /u01/product/crs/root.sh
WARNING: directory '/u01/product' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does no...
分类:
其他好文 时间:
2014-10-11 17:29:05
阅读次数:
241
从之前一个机种向现在要开发的机种移植遥控按键,发现总是有部份的功能键无作用。执行dumpsys input查看当前的按键的kl, 发现KeyLayoutFile居然是默认的Generic.kl,而不是我希望映射的Vendor_xxxx_Product_xxxx.kl这类的文件。
会映射到默认的Generic.kl通常是因为driver中的verdor/product/version没有指...
分类:
其他好文 时间:
2014-10-11 11:40:05
阅读次数:
636
Intuitively there must a O(n) solution.First I tried a bottom-up DP solution but it had a TLE:class Solution {public: int maxProduct(int A[], int n...
分类:
其他好文 时间:
2014-10-11 08:50:25
阅读次数:
141
Problem:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique lo...
分类:
其他好文 时间:
2014-10-11 02:20:24
阅读次数:
227
//信号量---线程间通信//“生产者消费者” 问题#include#include#include#include#include#define msleep(x) usleep(x*1000)#define PRODUCT_SPEED 3 //生产速度#define CONSUM_SPEED 1...
分类:
其他好文 时间:
2014-10-10 23:51:04
阅读次数:
222
Struts中报错the request was rejected because its size (***) exceeds the configured maximum (2097152)最新解决方案是在struts.xml中设置http://bioubiou.iteye.com/blog/1...
分类:
Web程序 时间:
2014-10-10 21:03:54
阅读次数:
166
//处理时间部分,将ISODate("2014-10-09T18: 37: 50.0Z") 转换成 2014-10-09 18:37:50这种格式
//最多处理6层树形结构数据,当多维数组中的key,包含数组$product_date_col中的任意一个字符,那么就会被处理。
public static function processMongoGetDate($product){
for...
分类:
数据库 时间:
2014-10-10 20:36:14
阅读次数:
434
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.Brute Force的做法,N个点两两可以构成N(N-1)/2条线,我们可以找这N(N-1)/2条线...
分类:
其他好文 时间:
2014-10-10 10:39:54
阅读次数:
167
问题:网页没显示,甚至登录账号的表单都没有。解决目标:能访问到http://localhost:1158/em/console 的登录表单,今儿成功登录简单概括原因:C:/oracle/product/10.2.0/db_1/oc4j/j2ee 下文件夹名称OC4J_DBConsole__orcl ...
分类:
数据库 时间:
2014-10-10 00:25:01
阅读次数:
7227