1. 突然项目中要用到图表,所以就用了百度的echarts,然后就是网上搜了一下,由于本人的JS不是很熟悉,但是研究了一下还是做出来了,其实也不是很难
  2. 最后做的效果大概如下图这种,由于界面上没调整,所以粗糙了一点
  3. 不多说 前端的代码如下
  4. <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" /> <title>ECharts</title>
    <!-- 引入 echarts.js -->
    <script src="echarts.js"></script>
    <script type="text/javascript" language="javascript">
    var title = "";
    var subtext = "";
    var legendData;
    var xAxisData;
    var valueDate;
    var valueDateA;
    var valueDateB;
    var valueDateC;
    var subType;
    var series;
    var myChart = null;
    var option; function setLegendData(legendDat) {
    legendData = legendDat;
    }
    function setXAxisData(xAxisDat
    ){
    xAxisData = xAxisDat;
    }
    function setValueDate(valueDat){
    valueDate = valueDat;
    }
    function setValueDateA(valuedatA){
    valueDateA = valuedatA;
    }
    function setValueDateB(valuedatB){
    valueDateB = valuedatB;
    } function setValueDateC(valuedatC){
    valueDateC = valuedatC;
    } function setSubType(type) {
    if(type == "I"){
    legendData = new Array('A相电流','B相电流','C相电流');
    series = [{
    name:legendData[0],
    type:'line',
    data:valueDateA
    },
    {
    name:legendData[1],
    type:'line',
    data:valueDateB
    },
    {
    name:legendData[2],
    type:'line',
    data:valueDateC
    },
    ];
    title = "电流曲线";
    subtext = "单位(A)"
    }else if(type == "U"){
    legendData = new Array('A相电压','B相电压','C相电压');
    series = [{
    name:legendData[0],
    type:'line',
    data:valueDateA
    },
    {
    name:legendData[1],
    type:'line',
    data:valueDateB
    },
    {
    name:legendData[2],
    type:'line',
    data:valueDateC
    },
    ];
    title = "电压曲线";
    subtext = "单位(V)"
    }else if(type == "P"){
    legendData = new Array('总有功功率','A相有功功率','B相有功功率','C相有功功率');
    series = [{
    name:legendData[0],
    type:'line',
    data:valueDate
    },
    {
    name:legendData[1],
    type:'line',
    data:valueDateA
    },
    {
    name:legendData[2],
    type:'line',
    data:valueDateB
    },
    {
    name:legendData[3],
    type:'line',
    data:valueDateC
    }
    ]; title = "有功功率曲线";
    subtext = "单位(kW)"
    }else if(type == "Q"){
    legendData = new Array('总无功功率','A相无功功率','B相无功功率','C相无功功率');
    series = [{
    name:legendData[0],
    type:'line',
    data:valueDate
    },
    {
    name:legendData[1],
    type:'line',
    data:valueDateA
    },
    {
    name:legendData[2],
    type:'line',
    data:valueDateB
    },
    {
    name:legendData[3],
    type:'line',
    data:valueDateC
    }
    ]; title = "无功功率曲线";
    subtext = "单位(kVar)"
    }else if(type == "S"){
    legendData = new Array('总视在功率','A相视在功率','B相视在功率','C相视在功率');
    series = [{
    name:legendData[0],
    type:'line',
    data:valueDate
    },
    {
    name:legendData[1],
    type:'line',
    data:valueDateA
    },
    {
    name:legendData[2],
    type:'line',
    data:valueDateB
    },
    {
    name:legendData[3],
    type:'line',
    data:valueDateC
    }
    ];
    title = "视在功率曲线";
    subtext = "单位(kW)" }else if(type == "cos"){
    legendData = new Array('总功率因数','A相功率因数','B相功率因数','C相功率因数');
    series = [{
    name:legendData[0],
    type:'line',
    data:valueDate
    },
    {
    name:legendData[1],
    type:'line',
    data:valueDateA
    },
    {
    name:legendData[2],
    type:'line',
    data:valueDateB
    },
    {
    name:legendData[3],
    type:'line',
    data:valueDateC
    }
    ];
    title = "视在功率曲线"; }
    } function update() {
    // 指定图表的配置项和数据
    option = { title: {
    // text: title,
    subtext:subtext
    },
    toolbox: {
    show: true,
    feature: {
    dataZoom: {
    yAxisIndex: 'none'
    },
    }
    },
    tooltip: {
    trigger: 'axis'
    },
    legend: {
    data:legendData
    }, xAxis: {
    type: 'category',
    boundaryGap: false,
    data: xAxisData
    },
    yAxis: {
    type: 'value',
    axisLabel: {
    formatter: '{value}'
    }
    },
    series: series
    };
    myChart = echarts.init(document.getElementById('main'));
    myChart.setOption(option);
    } </script>
    </head>
    <body>
    <div id="main" style="width: 100%;height:230px;"></div>
    <script type="text/javascript" language="javascript"> </script> </body>
    </html>

    json 文件代码如下

  5. {
    "status": "",
    "message": "成功",
    "data": [
    {
    "p": "",
    "qb": "",
    "q": "",
    "qc": "",
    "ia": "",
    "fixTimeDate": "",
    "s": "",
    "cosb": "",
    "cos": "",
    "ib": "",
    "ua": "",
    "ub": "",
    "ic": "",
    "devId": "8a3ae71e5ac56347015ac6520afd0002",
    "uc": "",
    "id": "418A48AEDFAA4236854388B4F38D41F6",
    "pa": "",
    "recTime": "",
    "sa": "",
    "cosc": "",
    "pb": "",
    "sb": "",
    "pc": "",
    "sc": "",
    "cosa": "",
    "qa": ""
    },
    {
    "p": "",
    "qb": "",
    "q": "",
    "qc": "",
    "ia": "",
    "fixTimeDate": "",
    "s": "",
    "cosb": "",
    "cos": "",
    "ib": "",
    "ua": "",
    "ub": "",
    "ic": "",
    "devId": "8a3ae71e5ac56347015ac6520afd0002",
    "uc": "",
    "id": "418A48AEDFAA4236854388B4F38D41F6",
    "pa": "",
    "recTime": "",
    "sa": "",
    "cosc": "",
    "pb": "",
    "sb": "",
    "pc": "",
    "sc": "",
    "cosa": "",
    "qa": ""
    },
    {
    "p": "",
    "qb": "",
    "q": "",
    "qc": "",
    "ia": "",
    "fixTimeDate": "",
    "s": "",
    "cosb": "",
    "cos": "",
    "ib": "",
    "ua": "",
    "ub": "",
    "ic": "",
    "devId": "8a3ae71e5ac56347015ac6520afd0002",
    "uc": "",
    "id": "418A48AEDFAA4236854388B4F38D41F6",
    "pa": "",
    "recTime": "",
    "sa": "",
    "cosc": "",
    "pb": "",
    "sb": "",
    "pc": "",
    "sc": "",
    "cosa": "",
    "qa": ""
    },
    {
    "p": "",
    "qb": "",
    "q": "",
    "qc": "",
    "ia": "",
    "fixTimeDate": "",
    "s": "",
    "cosb": "",
    "cos": "",
    "ib": "",
    "ua": "",
    "ub": "",
    "ic": "",
    "devId": "8a3ae71e5ac56347015ac6520afd0002",
    "uc": "",
    "id": "418A48AEDFAA4236854388B4F38D41F6",
    "pa": "",
    "recTime": "",
    "sa": "",
    "cosc": "",
    "pb": "",
    "sb": "",
    "pc": "",
    "sc": "",
    "cosa": "",
    "qa": ""
    }
    ]
    }

    这里做的只是一个测试项目 ,所以json 里面的数据都是一样的

  6. 控制器中设立了一个表格 然后读取本地的数据
  7. #import "ViewController.h"
    #import "HistoryDateCell.h"
    #import "HistoryDateModel.h"
    #import "MJExtension.h"
    @interface ViewController ()<UITableViewDelegate,UITableViewDataSource>
    /** 表格 */
    @property(strong,nonatomic) UITableView *tableView;
    @property(strong,nonatomic) NSArray *historyArray; @end @implementation ViewController
    static NSString *HistoryDateCellID = @"HistoryDateCellId"; - (void)viewDidLoad {
    [super viewDidLoad];
    [self setupTableView];
    [self initJson]; } #pragma mark - JSON 解析
    -(void)initJson{
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"json"];
    NSData *jdata = [[NSData alloc]initWithContentsOfFile:filePath]; NSDictionary *hisDict = [NSJSONSerialization JSONObjectWithData:jdata options:kNilOptions error:nil];
    self.historyArray = [HistoryDateModel mj_objectArrayWithKeyValuesArray:hisDict[@"data"]];
    } #pragma mark - 设置表格
    -(void)setupTableView{
    self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    for (UIView *subView in self.tableView.subviews) {
    if ([subView isKindOfClass:[UIScrollView class]]) {
    ((UIScrollView *)subView).delaysContentTouches = NO;
    }
    }
    self.tableView.delaysContentTouches = NO; self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([HistoryDateCell class]) bundle:nil] forCellReuseIdentifier:HistoryDateCellID]; [self.view addSubview:self.tableView]; }
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return ;
    }
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    HistoryDateCell *cell = [tableView dequeueReusableCellWithIdentifier:HistoryDateCellID];
    cell.historyDate = self.historyArray;
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
    }
    -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return ; } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    } - (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    } @end

    然后 话折线图的代码 都放在自定义cell 的代码里面,具体如下,我这里是对传入的参数进行了分类 真正测试的话不会有这个复杂,并且我用的是wkwebview,这个的内存泄露没UIwebview那么严重,所以就用了这个

#import "HistoryDateCell.h"
#import "HistoryDateModel.h"
#import <WebKit/WebKit.h>
#import "TimeTools.h" #define BTN_BACKCOLOR JdryRGBColorAlpha(25, 180, 212, 0.2)
#define SELECTBTN_BACKCOLOR JdryColorFromHex(0xFFFFFF)
/* 颜色进行宏定义 */
#define JdryColorFromHex(s) [UIColor colorWithRed:(((s & 0xFF0000) >> 16))/255.0 green:(((s &0xFF00) >>8))/255.0 blue:((s &0xFF))/255.0 alpha:1.0]
#define JdryRGBColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define JdryRGBColorAlpha(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a];
#define BACK_COLOR JdryColorFromHex(0xE8F0F2)
#define BLUE_COLOR JdryColorFromHex(0x19B5D4)
#define RED_COLOR JdryColorFromHex(0xF95656) /* 获取设备屏幕的大小 */
#define JdryScreeWidth [UIScreen mainScreen].bounds.size.width
#define JdryScreeHeight [UIScreen mainScreen].bounds.size.height
#define JdryScreeBounds [UIScreen mainScreen].bounds
@interface HistoryDateCell ()<WKNavigationDelegate>
@property (weak, nonatomic) IBOutlet UIButton *dayBtn;
@property (weak, nonatomic) IBOutlet UIButton *monthBtn;
@property (weak, nonatomic) IBOutlet UIButton *yearBtn;
/** echart */
@property(strong,nonatomic) WKWebView *wkWebView;
/** xAxisData */
@property(strong,nonatomic) NSString *xAxisData;
/** 总 */
@property(strong,nonatomic) NSMutableString *valueDat;
/** A */
@property(strong,nonatomic) NSMutableString *valueDatA;
/** B */
@property(strong,nonatomic) NSMutableString *valueDatB;
/** C */
@property(strong,nonatomic) NSMutableString *valueDatC;
/** X轴 */
@property(strong,nonatomic) NSMutableString *xAxis; @end @implementation HistoryDateCell - (void)awakeFromNib {
[super awakeFromNib]; self.xAxis = [NSMutableString string];
[self setEcharts:self.webContentView];
} -(void)setHistoryDate:(NSArray *)historyDate{
_historyDate = historyDate;
self.subType = @"cos";
self.timeType = @"";
[self selectSubType:self.subType timeType:_timeType];
} -(void)selectSubType:(NSString *)subType timeType:(NSString *)timeType{
self.valueDat = [NSMutableString string];
self.valueDatA = [NSMutableString string];
self.valueDatB = [NSMutableString string];
self.valueDatC = [NSMutableString string]; if ([subType isEqualToString:@"I"]) {
for (HistoryDateModel *model in _historyDate) {
[_valueDatA appendString:[NSString stringWithFormat:@"'%@',",model.ia]];
[_valueDatB appendString:[NSString stringWithFormat:@"'%@',",model.ib]];
[_valueDatC appendString:[NSString stringWithFormat:@"'%@',",model.ic]];
}
}else if ([subType isEqualToString:@"U"]){
for (HistoryDateModel *model in _historyDate) {
[_valueDatA appendString:[NSString stringWithFormat:@"'%@',",model.ua]];
[_valueDatB appendString:[NSString stringWithFormat:@"'%@',",model.ub]];
[_valueDatC appendString:[NSString stringWithFormat:@"'%@',",model.uc]];
}
}else if ([subType isEqualToString:@"P"]){
for (HistoryDateModel *model in _historyDate) {
[_valueDat appendString:[NSString stringWithFormat:@"'%@',",model.p]];
[_valueDatA appendString:[NSString stringWithFormat:@"'%@',",model.pa]];
[_valueDatB appendString:[NSString stringWithFormat:@"'%@',",model.pb]];
[_valueDatC appendString:[NSString stringWithFormat:@"'%@',",model.pc]];
}
}else if ([subType isEqualToString:@"Q"]){
for (HistoryDateModel *model in _historyDate) {
[_valueDat appendString:[NSString stringWithFormat:@"'%@',",model.q]];
[_valueDatA appendString:[NSString stringWithFormat:@"'%@',",model.qa]];
[_valueDatB appendString:[NSString stringWithFormat:@"'%@',",model.qb]];
[_valueDatC appendString:[NSString stringWithFormat:@"'%@',",model.qc]];
}
}else if ([subType isEqualToString:@"S"]){
for (HistoryDateModel *model in _historyDate) {
[_valueDat appendString:[NSString stringWithFormat:@"'%@',",model.s]];
[_valueDatA appendString:[NSString stringWithFormat:@"'%@',",model.sa]];
[_valueDatB appendString:[NSString stringWithFormat:@"'%@',",model.sb]];
[_valueDatC appendString:[NSString stringWithFormat:@"'%@',",model.sc]];
}
}else if ([subType isEqualToString:@"cos"]){
for (HistoryDateModel *model in _historyDate) {
[_valueDat appendString:[NSString stringWithFormat:@"'%@',",model.cos]];
[_valueDatA appendString:[NSString stringWithFormat:@"'%@',",model.cosa]];
[_valueDatB appendString:[NSString stringWithFormat:@"'%@',",model.cosb]];
[_valueDatC appendString:[NSString stringWithFormat:@"'%@',",model.cosc]];
}
} for (HistoryDateModel *model in _historyDate) {
if ([timeType isEqualToString:@""]) {
[_xAxis appendString:[NSString stringWithFormat:@"'%@',",[TimeTools timeWithDateAndHourAndMIn:model.fixTimeDate]]];
}else if ([timeType isEqualToString:@""]){
[_xAxis appendString:[NSString stringWithFormat:@"'%@',",[TimeTools timeWithDayAndMonthString:model.fixTimeDate]]];
}else if ([timeType isEqualToString:@""]){
[_xAxis appendString:[NSString stringWithFormat:@"'%@月',",[TimeTools timeWithDateAndMonth:model.fixTimeDate]]];
} } if (![subType isEqualToString:@"I"] && ![subType isEqualToString:@"U"]) {
[_valueDat deleteCharactersInRange:NSMakeRange(_valueDat.length -, )];
}
[_valueDatA deleteCharactersInRange:NSMakeRange(_valueDatA.length -, )];
[_valueDatB deleteCharactersInRange:NSMakeRange(_valueDatB.length -, )];
[_valueDatC deleteCharactersInRange:NSMakeRange(_valueDatC.length -, )];
[_xAxis deleteCharactersInRange:NSMakeRange(_xAxis.length -, )];
} #pragma mark - 设置echarts
-(void)setEcharts:(UIView *)contentView{
NSString *path = [[NSBundle mainBundle] pathForResource:@"HistoryData" ofType:@"html"];
self.wkWebView = [[WKWebView alloc] initWithFrame:CGRectMake(, , JdryScreeWidth - , )];
if(path){
if ([[UIDevice currentDevice].systemVersion floatValue] >= 9.0) {
NSURL *fileURL = [NSURL fileURLWithPath:path];
[self.wkWebView loadFileURL:fileURL allowingReadAccessToURL:fileURL];
} else {
NSURL *fileURL = [self fileURLForBuggyWKWebView8:[NSURL fileURLWithPath:path]];
NSURLRequest *request = [NSURLRequest requestWithURL:fileURL];
[self.wkWebView loadRequest:request];
}
}
self.wkWebView.navigationDelegate = self;
[contentView addSubview: self.wkWebView];
} - (NSURL *)fileURLForBuggyWKWebView8:(NSURL *)fileURL {
NSError *error = nil;
if (!fileURL.fileURL || ![fileURL checkResourceIsReachableAndReturnError:&error]) {
return nil;
}
// Create "/temp/www" directory
NSFileManager *fileManager= [NSFileManager defaultManager];
NSURL *temDirURL = [[NSURL fileURLWithPath:NSTemporaryDirectory()] URLByAppendingPathComponent:@"www"];
[fileManager createDirectoryAtURL:temDirURL withIntermediateDirectories:YES attributes:nil error:&error]; NSURL *dstURL = [temDirURL URLByAppendingPathComponent:fileURL.lastPathComponent];
// Now copy given file to the temp directory
[fileManager removeItemAtURL:dstURL error:&error];
[fileManager copyItemAtURL:fileURL toURL:dstURL error:&error];
// Files in "/temp/www" load flawlesly :)
return dstURL;
} -(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{ [self.wkWebView evaluateJavaScript:[NSString stringWithFormat:@"setValueDate([%@])",_valueDat] completionHandler:^(id dict, NSError * error) {
NSLog(@"%@",error); }]; [self.wkWebView evaluateJavaScript:[NSString stringWithFormat:@"setValueDateA([%@])",_valueDatA] completionHandler:^(id dict, NSError * error) {
NSLog(@"%@",error); }]; [self.wkWebView evaluateJavaScript:[NSString stringWithFormat:@"setValueDateB([%@])",_valueDatB]completionHandler:^(id dict, NSError * error) {
NSLog(@"%@",error); }]; [self.wkWebView evaluateJavaScript:[NSString stringWithFormat:@"setValueDateC([%@])",_valueDatC] completionHandler:^(id dict, NSError * error) {
NSLog(@"%@",error); }]; [self.wkWebView evaluateJavaScript:[NSString stringWithFormat:@"setXAxisData([%@])",_xAxis]
completionHandler:^(id dict, NSError * error) {
NSLog(@"%@",error); }]; [self.wkWebView evaluateJavaScript:[NSString stringWithFormat:@"setSubType('%@')",self.subType]
completionHandler:^(id dict, NSError * error) { NSLog(@"%@",error); }];
[self.wkWebView evaluateJavaScript:@"update()" completionHandler:^(id dict, NSError * error) {
NSLog(@"%@",error); }]; } -(void)setFrame:(CGRect)frame{
frame.origin.y = frame.origin.y += ;
frame.size.height = frame.size.height -= ; [super setFrame:frame];
} - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated]; // Configure the view for the selected state
}
- (IBAction)selectDay:(UIButton *)sender {
sender.backgroundColor = SELECTBTN_BACKCOLOR;
self.monthBtn.backgroundColor = BTN_BACKCOLOR;
self.yearBtn.backgroundColor = BTN_BACKCOLOR;
} - (IBAction)selectMonth:(UIButton *)sender {
sender.backgroundColor = SELECTBTN_BACKCOLOR;
self.dayBtn.backgroundColor = BTN_BACKCOLOR;
self.yearBtn.backgroundColor = BTN_BACKCOLOR;
} - (IBAction)selectYear:(UIButton *)sender {
sender.backgroundColor = SELECTBTN_BACKCOLOR;
self.monthBtn.backgroundColor = BTN_BACKCOLOR;
self.dayBtn.backgroundColor = BTN_BACKCOLOR;
} @end

iOS 中集成百度echarts3.0的更多相关文章

  1. AngularJS进阶(十九)在AngularJS应用中集成百度地图实现定位功能

    在AngularJS应用中集成百度地图实现定位功能 注:请点击此处进行充电! 前言 根据项目需求,需要实现手机定位功能,考虑到百度业务的强大能力,遂决定使用百度地图第三方服务. 添加第三方模块的步骤与 ...

  2. 【军哥谈CI框架】之CI中集成百度UEditor

    Hello,各位亲,新的一周来临啦,很高兴这么快又跟大家伙见面!话说上一回,军哥带大家用JQuery写了一个城市级联菜单的例子 ,不知道亲们学会了多少,是否自己可以独立写出来了呢. 军哥很是期待大家学 ...

  3. Android Studio 项目中集成百度地图SDK报Native method not found: com.baidu.platform.comjni.map.commonmemcache.JNICommonMemCache.Create:()I错误

    Android Studio 项目中集成百度地图SDK报以下错误: java.lang.UnsatisfiedLinkError: Native method not found: com.baidu ...

  4. IOS中使用百度地图定位后获取城市坐标,城市名称,城市编号信息

    IOS中使用百度地图定位后获取城市坐标,城市名称,城市编号信息 /**当获取到定位的坐标后,回调函数*/ - (void)didUpdateBMKUserLocation:(BMKUserLocati ...

  5. 如何在ios中集成微信登录功能

    在ios中集成微信的登录功能有两种方法 1 用微信原生的api来做,这样做的好处就是轻量级,程序负重小,在Build Settings 中这样设置 然后设置 友盟的设置同上,但是要注意,加入你需要的所 ...

  6. iOS开发---集成百度地图完善版

    一.成为百度的开发者.创建应用 http://developer.baidu.com/map/index.php?title=首页 (鼠标移向 然后选择你的项目需要的功能 你可以在里面了解到你想要使用 ...

  7. iOS开发---集成百度地图

    由于iOS MapKit框架很多情况并不能满足我们的需求,我们可以选择集成百度地图,那该如何操作呢? 申请Key 登录百度API管理中心申请Key http://lbsyun.baidu.com/ap ...

  8. iOS中集成ijkplayer视频直播框架

    ijkplayer 是一款做视频直播的框架, 基于ffmpeg, 支持 Android 和 iOS, 网上也有很多集成说明, 但是个人觉得还是不够详细, 在这里详细的讲一下在 iOS 中如何集成ijk ...

  9. iOS开发---集成百度地图,位置偏移问题

    iOS 集成百度SDK 请参考 百度地图官方文档 ,这里不就多啰嗦了 本文介绍的是在百度地图上根据经纬度,自定义气泡时,气泡位置的偏移,在我们天朝这种事是很常见的,也见怪不怪了,在项目中使用的百度地图 ...

随机推荐

  1. udhcp源码详解(五) 之DHCP包--options字段

    中间有很长一段时间没有更新udhcp源码详解的博客,主要是源码里的函数太多,不知道要不要一个一个讲下去,要知道讲DHCP的实现理论的话一篇博文也就可以大致的讲完,但实现的源码却要关心很多的问题,比如说 ...

  2. 【bzoj1015】【JSOI2008】【星球大战】【并查集+离线】

    Description 非常久曾经.在一个遥远的星系,一个黑暗的帝国靠着它的超级武器统治者整个星系.某一天,凭着一个偶然的机遇,一支反抗军摧毁了帝国的超级武器.并攻下了星系中差点儿全部的星球.这些星球 ...

  3. 嵌入式开发之davinci--- mcfw框架介绍

    整体上mcfw框架如下图 从中可见其层次是清楚的,link实在基本的驱动之上的,而mcfw是在link之上的api,是通过link来实现相应的功能.可见link是框架中承上启下的层次,通过link来实 ...

  4. RabbitMQ常用命令、管理界面

    1.运行CMD,cd切换到RabbitMQ安装目录sbin下E:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.2\sbin 执行 rabbitm ...

  5. VS创建Web项目提示配置IISExpress失败

    开发服务器VS2013,新建Web项目提示: 打开Web项目提示: 解决方法:控制面板,找到IISExpress,右键 选择修复,解决问题..

  6. 基于 IOCP 的通用异步 Windows Socket TCP 高性能服务端组件的设计与实现

    设计概述 服务端通信组件的设计是一项非常严谨的工作,其中性能.伸缩性和稳定性是必须考虑的硬性质量指标,若要把组件设计为通用组件提供给多种已知或未知的上层应用使用,则设计的难度更会大大增加,通用性.可用 ...

  7. AppDomain加载与释放dll

    AppDomain加载与释放dll 几年前写过同名随笔,但今天应不大适用了.但还有几个朋友留言关注,我重新发布相关代码. 首先我们的目的就是运行期间更新dll,并应用dll.这个过程需要应用 AppD ...

  8. 《JAVA与模式》之解释器模式

    解释器模式是类的行为模式.给定一个语言之后,解释器模式可以定义出其文法的一种表示,并同时提供一个解释器.客户端可以使用这个解释器来解释这个语言中的句子. 解释器模式的结构 下面就以一个示意性的系统为例 ...

  9. Asp.net MVC 中Code First 迁移使用

    如果模型类(数据库上下文类Context和POCO类)发生改变,与数据库中的结构不一致,系统默认会抛出一个异常.可以考虑使用代码优先迁移. 代码优先迁移执行UpSert数据库操作,它在每一次更新数据库 ...

  10. Linux 系统管理命令 - mpstat - CPU信息统计

    命令详解 重要星级: ★★★★☆ 功能说明: mpstat 是 Multiprocessor Statistics 的缩写,是一种实时系统监控工具.mpstat 命令会输出 CPU 的一些统计信息,这 ...