一,总体概要1,笔者浅谈顾名思义单例模式并不难理解,是产生一个类的唯一实例,在我们实际开发中也会使用到这种模式,它属于创建模式的一种,基于JS语言本身的语法特征,对象直接量“{}”,也可以作为单例模式的一种表现形式,如下代码参考 1 function Foo(){ 2 this.bar = ...
分类:
Web程序 时间:
2014-12-24 13:25:36
阅读次数:
207
最近信用办项目要将有关统计的平面柱状图改为立体柱状图,用了jfreechart。简单例子,分享一下。
1,首先,引入IText-2.1.5.jar jcommon-1.0.17.jar jfreechart-1.0.14.jar
2,代码
柱状图:
import java.awt.Font;
import java.io.File;
import org.jfree.chart....
分类:
其他好文 时间:
2014-12-23 22:43:41
阅读次数:
415
转载自http://www.cnblogs.com/xinyus/p/3422198.html主要介绍 Visifire 常用属性的设置,用来生成不同样式的图例设置Chart的属 //设置title的值 // 创建一个标题的对象 Title title = new Title(); // 设...
分类:
其他好文 时间:
2014-12-23 12:18:48
阅读次数:
193
添加在页面的第一个scrollView或者tabview,它会在自己的顶部预留空白,假如使用navigation自带的bar,那么会预留状态栏和navigationBar的高度,也就是64像素,如果隐藏了navigationBar就只会预留status的高度,也就是20像素所以,其他添加到scrol...
分类:
其他好文 时间:
2014-12-22 11:05:01
阅读次数:
188
Highchart折线图代码 $(function () {
var chartLine = new Highcharts.Chart({
chart: {
type: 'line',
renderTo: 'container2'
},
ti...
分类:
Web程序 时间:
2014-12-22 09:34:10
阅读次数:
2298
Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to tr...
分类:
移动开发 时间:
2014-12-21 21:51:30
阅读次数:
234
Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to tr...
分类:
移动开发 时间:
2014-12-20 16:49:47
阅读次数:
159
1. 条形图(Bar Chart)需要的数据格式类型如下:["Luke Skywalker", "Darth Vader", "Yoda", "Princess Leia"][2, 4, 1, 1]2. Bar Chart代码示例:$(function () { $('#container')...
分类:
其他好文 时间:
2014-12-19 11:44:22
阅读次数:
190
思路:如果时间复杂度要求是O(n 2 )的话,解法比较多也比较好理解。比如可以遍历,对于当前 i 位置上的立柱,计算出以这个i 立柱结尾的最大矩形,然后求出总的最大矩形。
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, f...
分类:
编程语言 时间:
2014-12-18 22:18:58
阅读次数:
219