小编Zoe*_*oef的帖子

Howto convert JsonArray to Hashmap

I've been able to get a jsonarray from a json string, but don't know how to put it in a Hashmap with a String that shows the type of cargo and an Integer showing the amount.

The string:

"cargo":[   
    {"type":"Coals","amount":75309},        
    {"type":"Chemicals","amount":54454},        
    {"type":"Food","amount":31659},     
    {"type":"Oil","amount":18378}
]
Run Code Online (Sandbox Code Playgroud)

java arrays json

6
推荐指数
1
解决办法
2万
查看次数

仅当WindowState最大化时,MDI子项才可见

我为我的mdi孩子制作了一个自定义边框.Mdi子表单属性:

  • FormBorderStyle =无
  • Controlbox = False
  • 文字=""
  • WindowState =最大化

首先,当我将Windowstate的属性设置为Normal时,我的mdi孩子将不会显示,我猜它的大小为0;然后是0.我尝试在Form_Load方法中设置大小,但仍然没有改变.当我将FormBorderStyle更改为FixedSingle时,我可以看到非常小的形式,只需要足够的空间来双击标题栏.然后表格真的最大化了.

我只是不明白,这一切都让人很困惑.并且由于windowstate最大化,我无法使用函数在屏幕上拖动表单,因为它认为它已经最大化了....

在此输入图像描述

vb.net size zero formborderstyle

5
推荐指数
1
解决办法
1856
查看次数

拆分appcomponent后,Angular 2 Tour of Heroes项目无效

我一直在学习Angular 2的教程,一切顺利,直到我不得不将appcomponent拆分为heroescomponent和appcomponent.

这里的任何人有同样的问题或者可以看到问题吗?

app.component.ts

import { Component }       from 'angular2/core';
import { HeroService }     from './hero.service';
import { HeroesComponent } from './heroes.component';
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router';
import {DashboardComponent} from './dashboard.component';
import {HeroDetailComponent} from "./hero-detail.component";

@Component({
    selector: 'my-app',
    template: `
        <h1>{{title}}</h1>
        <nav
            <a [routerLink]="['Dashboard']">Dashboard</a>
            <a [routerLink]="['Heroes']">Heroes</a>
        </nav>

        <router-outlet></router-outlet>
      `,

    styleUrls: ['app/app.component.css'],
    directives: [ROUTER_DIRECTIVES],
    providers: [
        ROUTER_PROVIDERS,
        HeroService
    ]
})

@RouteConfig([
    {
        path: '/heroes',
        name: 'Heroes',
        component: HeroesComponent
    },
    {
        path: '/dashboard',
        name: 'Dashboard',
        component: DashboardComponent,
        useAsDefault: true
    },
    { …
Run Code Online (Sandbox Code Playgroud)

typescript angular

2
推荐指数
1
解决办法
2928
查看次数

标签 统计

angular ×1

arrays ×1

formborderstyle ×1

java ×1

json ×1

size ×1

typescript ×1

vb.net ×1

zero ×1