RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-243367

Alexandr's questions

Martin Hope
Alexandr
Asked: 2020-01-06 21:12:57 +0000 UTC

angular8 将对象传递给 router.navigate 上的组件

  • 0

UPD 新的 editCustomer 方法

  editCustomer(editCustomer: Customer) {
    this.router.navigate(['edit-customer'], { state: {id: editCustomer.id, name: editCustomer.name,
      address: editCustomer.address, phones: editCustomer.phones } });
  }
但是快照中的组件是空的

export class EditCustomerComponent implements OnInit {

  editCustomerForm: FormGroup;

  constructor(private formBuilder: FormBuilder, private customersClient: CustomersClient,
              private router: Router, private activatedRoute: ActivatedRoute) {
    this.editCustomerForm = this.formBuilder.group({
      name: [this.activatedRoute.snapshot.paramMap.get('name'), Validators.required],
      address: [this.activatedRoute.snapshot.paramMap.get('address'), Validators.required],
      phones: [this.activatedRoute.snapshot.paramMap.get('phones'), Validators.required]
    });
   }
   // остальной код
  }

必须将对象传递给组件才能执行其修改。我希望将表中的对象传递给负责编辑它的组件。

到目前为止,我已经这样做了:

要传递到的组件的 TS(ctor 中的客户变量)

import { Component, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { CustomersClient, Customer } from 'src/app/api-service.service';
import { Router } from '@angular/router';

@Component({
  selector: 'app-edit-customer',
  templateUrl: './edit-customer.component.html',
  styleUrls: ['./edit-customer.component.scss']
})
export class EditCustomerComponent implements OnInit {

  editCustomerForm: FormGroup;

  constructor(private formBuilder: FormBuilder, private customersClient: CustomersClient, private customer: Customer,
              private router: Router) {
    this.editCustomerForm = this.formBuilder.group({
      name: [customer.name, Validators.required],
      address: [customer.address, Validators.required],
      phones: [customer.phones, Validators.required]
    });
   }

  ngOnInit() {
  }

  editCustomer() {
    this.customersClient.putCustomer(this.customer.id, this.editCustomerForm.value).subscribe(data => {
      console.log('yspex');
    });
  }

  toCustomerList() {
    this.router.navigate(['list-customer']);
  }
}

从我想传输的地方看起来像什么

import { element } from 'protractor';
import { HttpClient } from '@angular/common/http';
import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
import { CustomersClient, Customer } from 'src/app/api-service.service';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { MatPaginator } from '@angular/material/paginator';
import { Router } from '@angular/router';

@Component({
  selector: 'app-list-customer',
  templateUrl: './list-customer.component.html',
  styleUrls: ['./list-customer.component.scss']
})
export class ListCustomerComponent implements AfterViewInit, OnInit {
  customers = new MatTableDataSource<Customer>();
  displayedColumns: string[] = ['id', 'name', 'address', 'phones', 'actions'];
  paginator: MatPaginator;
  sort: MatSort;


  constructor(private customersClient: CustomersClient, private router: Router) { }

  // ... другой код

  editCustomer(customer: Customer) {
    this.router.navigate(['edit-customer']);
  }

}

实际上,它在 UI 中的外观。这个想法是这样的 - 根据用户单击“编辑”的对象,该对象被转移到组件,而不需要对数据库的新请求 在此处输入图像描述

frontend
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-07-25 02:46:22 +0000 UTC

typescript + angular:集合更新后的方法执行

  • 0

简要总结:当通过集线器接收到新数据(或至少只是集合中的任何更改)时,我无法弄清楚如何执行该方法 更多细节:有一个集线器接收数据(单元格)的集合。该集线器(shot-hub 文件)用于渲染这些单元的服务(battlefield-service 文件)。问题是更新后,还需要调用这个集合的所有单元格的方法。来自以下集线器和服务的代码:

射击中心

import { Injectable } from '@angular/core';
import { HubConnection, HubConnectionBuilder } from '@aspnet/signalr';
import { Cell } from 'src/app/models/cell';
import { BehaviorSubject, Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})

export class ShotHubService {

  private hub: HubConnection;
  public subject: BehaviorSubject<Cell[]>; //эту коллекцию я планирую передавать (но еще не понимаю с каким типом и как ее передать)

  constructor() {
    this.subject = new BehaviorSubject(Array<Cell>());
    this.hub = new HubConnectionBuilder().withUrl('http://localhost:54708/shothub').build();
    this.hub.start().then(() => console.log('Hub connected'))
    .catch(err => console.error(`Error for hub connection ${err}`));
    this.hub.on('getShots', (cells: Cell[]) => {
      this.subject.next(cells);
    });
   }

   public receiveShots(): Observable<Cell[]> {
     return this.subject.asObservable();
   }

战场服务

import { ShotHubService } from './shot-hub.service';
import { FormGroup } from '@angular/forms';
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Cell } from 'src/app/models/cell';
import { Ship } from 'src/app/models/ship';
import { CellStatus } from 'src/app/models/cellStatus';
import { Subscription } from 'rxjs/internal/Subscription';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class BattlefieldService {

  shipField: Cell[][];
  ships: Ship[];
  shots: Cell[];
  subscription: Subscription;
  N = 10;
  constructor(private http: HttpClient, public shotHub: ShotHubService) {
    this.shipField = this.createField();
    this.ships = new Array<Ship>();
    this.shots = shotHub.shotsEnemy; //тут будет присвоено начальное значение коллекции выстрелов, затем по обновлению это коллекции должен (по моей логике) выполняться код метода drawShot для всех элементов

}

  private createField(): Cell[][] {
    let field = [];
    for (let i = 0; i < this.N; i++) {
      field[i] = [];
      for (let j = 0; j < this.N; j++) {
         field[i][j] = new Cell(i, j, CellStatus.None);
      }
    }
    return field;
  }

  getShipField(): Cell[][] {
    return this.shipField;
  }

  private drawShip(ship: Ship) {
    ship.cells.forEach(cell => {
      this.shipField[cell.y][cell.x].status = cell.status;
    });
  }

  // этот метод должен отрисовать полученные выстрелы
  private drawShot(shot: Cell) {
    this.shipField[shot.y][shot.x].status = shot.status;
  }
 }
typescript
  • 2 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-07-24 15:52:32 +0000 UTC

bootstrap:居中对齐表头

  • 0

有这张图:在此处输入图像描述

如何将 h2 标题与表格中心对齐?我尝试将其设置为样式,作为类,将其添加到单独的row. 居中文本仅以特定分辨率出现。如果您全屏打开页面,则文本总是“移出”。

html代码

    <div class="col-md-6">
      <h2 class="text-center">Выстрелы</h2>
      <table class="table" id="shipField">
        <thead>
            <th class="cell no_border" *ngFor="let letter of alphabet" >{{ letter }}</th>
        </thead>
        <tr *ngFor="let row of this.battleFieldService.shipField; let i = index" >
          <td class="cell no_border">{{ i }}</td>
          <td *ngFor="let cell of row">
              <app-cell [status]=cell.status [x]=cell.x [y]=cell.y></app-cell>
          </td>
        </tr>
      </table>
    </div>

更新

<table class="table" id="shootField">
          <thead>
            <tr>
              <thead>
                <th class="text-center" colspan="11">Выстрелы</th>
              </thead>
            </tr>
              <th class="cell no_border" *ngFor="let letter of alphabet" >{{ letter }}</th>
          </thead>
          <tr *ngFor="let row of this.shootService.shotField; let i = index">
              <td class="cell no_border">{{ i }}</td>
              <td *ngFor="let cell of row">
                <app-cell id="cell" [status]=cell.status [x]=cell.x [y]=cell.y (click)="shoot(cell)"></app-cell>
            </td>
          </tr>
        </table>

在此处输入图像描述

html
  • 2 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-07-04 19:54:34 +0000 UTC

Angular:如何在游戏“战舰”中为带有船只的表格标记列和行号?

  • 0

我正在学习 Angular,我决定制作一个海战游戏,但我坚持以下问题 - 如何标记列和行?“美丽”只设法签署了专栏,但用线条 - 麻烦。事实证明,桌子离开了。

如何在里面放一张桌子?

代码: https ://stackblitz.com/edit/angular-fkpsca 可用结果

typescript
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-08-08 18:14:07 +0000 UTC

asp.net mvc 5 如何在页面上向用户显示数据库视图中的数据

  • 0

问题:我需要从视图中向用户显示数据。在我的实现中,它打印正确的行数,但数字始终为 0,标题为空。

请求在数据库中创建视图

CREATE VIEW ProductOrderCountView AS
SELECT P.Name AS [Название продукта],
   dbo.funcOrderCountProduct(P.Id) AS [Количество заказов]
FROM Products AS P

代表的类

public class ProductOrderCountView
{
    [DisplayName("Название продукта")]
    public string Name { get; set; }
    [DisplayName("Количество заказов")]
    public int Count { get; set; }

    public static List<ProductOrderCountView> LoadProductOrderViewCount()
    {
        BakeryContext context = new BakeryContext();
        var result = context.Database.SqlQuery<ProductOrderCountView>("SELECT * FROM ProductOrderCountView;").ToList();
        return result;
    }
}

查看标记

@using Bakery.Models.ForDBView
@model IEnumerable<Bakery.Models.ForDBView.ProductOrderCountView>

@{
ViewBag.Title = "Статистика по количеству проданных продуктов";
}

<h2>Статистика по количеству проданных продуктов</h2>

<table class="table">
<tr>
    <th>
        @Html.DisplayNameFor(model => model.Name)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.Count)
    </th>
</tr>
@foreach (var item in Model.OrderBy(o => o.Count))
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Count)
        </td>
    </tr>

}
</table>
c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-08-07 00:54:55 +0000 UTC

asp.net mvc 5 将记录添加到带有导航字段的表中

  • 0

简短描述:向数据库添加条目时,模型被标记为无效,但代码调用

return View(order);

属性的验证错误(未填写,带有 Id 的字段已填写): public Product Product { get; set; } public Employee Employee { get; set; } public Customer Customer { get; set; }

查看代码

@using Bakery.Models
@model Bakery.Models.Order

@{
ViewBag.Title = "Добавить заказ";
}

@helper FIOEmployee(List<Employee> empCollection)
{ 
<select id="EmployeeId" name="EmployeeId">
    @foreach (var item in empCollection)
    {
        <option value="@item.Id">@string.Format("{0} {1} {2} {3}", item.IdentificationNumber, item.Surname, item.Name, item.Patronymic)</option>
    }
</select>
    }

    <h2>Добавить заказ</h2>

    @using (Html.BeginForm()) 
    {
    @Html.AntiForgeryToken()

<div class="form-horizontal">
    <h4>Order</h4>
    <hr />
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    <div class="form-group">
        @Html.LabelFor(model => model.ProductId, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownListFor(model => model.ProductId, ViewBag.Products as SelectList)
            @Html.ValidationMessageFor(model => model.ProductId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.CustomerId, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownListFor(model => model.CustomerId, ViewBag.Customers as SelectList)
            @Html.ValidationMessageFor(model => model.CustomerId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.EmployeeId, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @FIOEmployee(ViewBag.Employees as List<Employee>)
            @Html.ValidationMessageFor(model => model.EmployeeId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Count, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Count, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Count, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Price, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Price, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Price, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="Create" class="btn btn-default" />
        </div>
    </div>
</div>
 }

<div>
@Html.ActionLink("Назад к списку", "Index")
</div>

控制器代码:

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using System.Net;
using System.Web;
using System.Web.Mvc;
using Bakery.Models;

namespace Bakery.Controllers
{
public class OrderController : Controller
{
    private BakeryContext db = new BakeryContext();

    // GET: Orders
    public async Task<ActionResult> Index()
    {
        var orders = db.Orders.Include(p => p.Product).Include(p => p.Customer).Include(p => p.Employee);
        return View(await orders.ToListAsync());
    }

    // GET: Orders/Create
    public ActionResult Create()
    {
        SelectList products = new SelectList(db.Products, "Id", "Name");
        var employees = db.Employees.ToList();
        SelectList customers = new SelectList(db.Customers, "Id", "Name");
        ViewBag.Products = products;
        ViewBag.Employees = employees;
        ViewBag.Customers = customers;
        return View();
    }

    // POST: Orders/Create
    // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
    // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> Create([Bind(Include = "Id,Product,ProductId,Employee,EmployeeId,Customer,CustomerId,Count,Price")] Order order)
    {
        SelectList products = new SelectList(db.Products, "Id", "Name");
        var employees = db.Employees.ToList();
        SelectList customers = new SelectList(db.Customers, "Id", "Name");
        ViewBag.Products = products;
        ViewBag.Employees = employees;
        ViewBag.Customers = customers;
        order.Customer = db.Customers.Find(order.CustomerId);
        order.Employee = db.Employees.Find(order.EmployeeId);
        order.Product = db.Products.Find(order.ProductId);
        if (ModelState.IsValid)
        {
            order.Id = Guid.NewGuid();
            db.Orders.Add(order);
            await db.SaveChangesAsync();
            return RedirectToAction("Index");
        }

        return View(order);
    }

    // GET: Orders/Edit/5
    public async Task<ActionResult> Edit(Guid? id)
    {
        if (id == null)
        {
            return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
        }
        Order order = await db.Orders.FindAsync(id);
        if (order == null)
        {
            return HttpNotFound();
        }
        return View(order);
    }

    // POST: Orders/Edit/5
    // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
    // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> Edit([Bind(Include = "Id,Count,Price")] Order order)
    {
        if (ModelState.IsValid)
        {
            db.Entry(order).State = EntityState.Modified;
            await db.SaveChangesAsync();
            return RedirectToAction("Index");
        }
        return View(order);
    }

    // GET: Orders/Delete/5
    public async Task<ActionResult> Delete(Guid? id)
    {
        if (id == null)
        {
            return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
        }
        Order order = await db.Orders.FindAsync(id);
        if (order == null)
        {
            return HttpNotFound();
        }
        return View(order);
    }

    // POST: Orders/Delete/5
    [HttpPost, ActionName("Delete")]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> DeleteConfirmed(Guid id)
    {
        Order order = await db.Orders.FindAsync(id);
        db.Orders.Remove(order);
        await db.SaveChangesAsync();
        return RedirectToAction("Index");
    }

    protected override void Dispose(bool disposing)
    {
        if (disposing)
        {
            db.Dispose();
        }
        base.Dispose(disposing);
    }
}
}

型号代码

using System;
using System.Collections.Generic;
using System.ComponentModel; 
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Bakery.Models
{
public class Order
{
    public Order()
    {

    }

    public Order(Employee employee, Product product, Customer customer, Double count, Double price)
    {
        Id = Guid.NewGuid();
        Employee = employee;
        Product = product;
        Customer = customer;
        Count = count;
        Price = price;
    }

    /// <summary>
    /// Код
    /// </summary>
    [Key]
    public Guid Id { get; set; }

    /// <summary>
    /// Сотрудник
    /// </summary>
    [DisplayName("Сотрудник")]
    [Required]
    public Employee Employee { get; set; }
    [System.Web.Mvc.HiddenInput(DisplayValue = false)]
    public Guid? EmployeeId { get; set; }

    /// <summary>
    /// Изделие
    /// </summary>
    [DisplayName("Изделие")]
    [Required]
    public Product Product { get; set; }
    [System.Web.Mvc.HiddenInput(DisplayValue = false)]
    public Guid? ProductId { get; set; }

    /// <summary>
    /// Заказчик
    /// </summary>
    [DisplayName("Покупатель")]
    [Required]
    public Customer Customer { get; set; }
    [System.Web.Mvc.HiddenInput(DisplayValue = false)]
    public Guid? CustomerId { get; set; }

    /// <summary>
    /// Количество заказанных изделий
    /// </summary>
    [DisplayName("Количество изделий (шт.)")]
    [Required]
    [Range(1, Double.MaxValue, ErrorMessage = "Количество не может быть меньше 1")]
    public double Count { get; set; }

    /// <summary>
    /// Цена
    /// </summary>
    [DisplayName("Цена (руб.)")]
    [Required]
    [Range(0.1, Double.MaxValue, ErrorMessage = "Цена не может быть меньше 0.1")]
    public double Price { get; set; }

}
}
c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-08-06 23:07:08 +0000 UTC

asp.net mvc 5 将多个对象字段输出到一个表格单元格中

  • 0

我有以下问题:我有一个订单表,其中包含订购的商品、客户、员工、价格和数量。对于产品和买家,应该只显示属性Name,所以没有问题,但是对于我想显示属性的员工Surname,Name并且Patronymic

我写了这段代码,但它根本没有输出任何东西

@model IEnumerable<Bakery.Models.Order>

@{
ViewBag.Title = "Список заказов";
}

<h2>Список заказов</h2>

<p>
@Html.ActionLink("Добавить", "Create")
</p>
<table class="table">
<tr>
    <th>
        @Html.DisplayNameFor(model => model.Product)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.Customer)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.Employee)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.Count)
    </th>
    <th>
        @Html.DisplayNameFor(model => model.Price)
    </th>
    <th></th>
</tr>

@foreach (var item in Model) {
<tr>
    <td>
        @Html.DisplayFor(modelItem => item.Product.Name)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.Customer.Name)
    </td>
    <td>
        @Html.Display(string.Format("{0} {1} {2}", item.Employee.Surname, item.Employee.Name, item.Employee.Patronymic))
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.Count)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.Price)
    </td>
    <td>
        @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
        @Html.ActionLink("Delete", "Delete", new { id=item.Id })
    </td>
</tr>
}

订单类本身

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Bakery.Models
{
public class Order
{
    public Order()
    {

    }

    public Order(Employee employee, Product product, Customer customer, Double count, Double price)
    {
        Id = Guid.NewGuid();
        Employee = employee;
        Product = product;
        Customer = customer;
        Count = count;
        Price = price;
    }

    /// <summary>
    /// Код
    /// </summary>
    [Key]
    public Guid Id { get; set; }

    /// <summary>
    /// Сотрудник
    /// </summary>
    [DisplayName("Сотрудник")]
    [Required]
    public Employee Employee { get; set; }
    [System.Web.Mvc.HiddenInput(DisplayValue = false)]
    public Guid? EmployeeId { get; set; }

    /// <summary>
    /// Изделие
    /// </summary>
    [DisplayName("Изделие")]
    [Required]
    public Product Product { get; set; }
    [System.Web.Mvc.HiddenInput(DisplayValue = false)]
    public Guid? ProductId { get; set; }

    /// <summary>
    /// Заказчик
    /// </summary>
    [DisplayName("Покупатель")]
    [Required]
    public Customer Customer { get; set; }
    [System.Web.Mvc.HiddenInput(DisplayValue = false)]
    public Guid? CustomerId { get; set; }

    /// <summary>
    /// Количество заказанных изделий
    /// </summary>
    [DisplayName("Количество изделий (шт.)")]
    [Required]
    [Range(1, Double.MaxValue, ErrorMessage = "Количество не может быть меньше 1")]
    public double Count { get; set; }

    /// <summary>
    /// Цена
    /// </summary>
    [DisplayName("Цена (руб.)")]
    [Required]
    [Range(0.1, Double.MaxValue, ErrorMessage = "Цена не может быть меньше 0.1")]
    public double Price { get; set; }

}
}
c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-11-19 23:46:42 +0000 UTC

当 ItemsSource 为空时图表的 WPF 工具包外观

  • 0

问题是这样的:当还Chart没有数据时,它看起来像这样 初次登场的样子

但是,如果你画一个图表并清除它,它会变成这样

在此处输入图像描述

XAML 图表

        <!--Chart column-->
    <chartingToolkit:Chart Grid.Row="1"
                           Grid.ColumnSpan="12"
                           Margin="5"
                           Padding="0"
                           Name="chartColumn"
                           Visibility="{Binding ColumnSeriesVisibility}">
        <chartingToolkit:ColumnSeries ItemsSource="{Binding DataSource}"
                                      DependentValuePath="Value"
                                      IndependentValuePath="Key"
                                      Name="Column">
            <chartingToolkit:ColumnSeries.DataPointStyle>
                <Style TargetType="chartingToolkit:ColumnDataPoint" BasedOn="{StaticResource {x:Type chartingToolkit:ColumnDataPoint}}">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="chartingToolkit:ColumnDataPoint">
                                <Grid>
                                    <Rectangle Fill="{StaticResource myColor}"  Stroke="Black"/>
                                    <Grid Margin="0 -20 0 0" HorizontalAlignment="Center" VerticalAlignment="Top">
                                        <TextBlock Text="{TemplateBinding FormattedDependentValue}" Margin="2"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </chartingToolkit:ColumnSeries.DataPointStyle>
        </chartingToolkit:ColumnSeries>
        <chartingToolkit:Chart.LegendStyle>
            <Style TargetType="datavis:Legend">
                <Setter Property="Width" Value="0" />
            </Style>
        </chartingToolkit:Chart.LegendStyle>
        <chartingToolkit:Chart.Template>
            <ControlTemplate TargetType="chartingToolkit:Chart">
                <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                    <Grid Margin="3">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <datavis:Title Content="{TemplateBinding Title}" Style="{TemplateBinding TitleStyle}" />

                        <!-- Use a nested Grid to avoid possible clipping behavior resulting from ColumnSpan+Width=Auto -->
                        <Grid Grid.Row="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <datavis:Legend x:Name="Legend" Title="{TemplateBinding LegendTitle}" Style="{TemplateBinding LegendStyle}" Grid.Column="1" />
                            <chartingprimitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}">
                                <Grid Canvas.ZIndex="-1" Style="{TemplateBinding PlotAreaStyle}" />
                                <Border Canvas.ZIndex="10" BorderBrush="#FF919191" BorderThickness="1" />
                            </chartingprimitives:EdgePanel>
                        </Grid>
                    </Grid>
                </Border>
            </ControlTemplate>
        </chartingToolkit:Chart.Template>
    </chartingToolkit:Chart>

在清理命令中,以下代码

DataSource = null;

你需要像图1那样做。

c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-11-12 23:48:33 +0000 UTC

MVVM WPFToolkit Chart 1 个组件中的多种图表类型

  • 0

问题是:实现这一点的最佳方法是什么?

有1个选项:

1)我们取 3 个图表并将它们放在网格中的 1 个位置,根据用户的选择,我们显示所需的

2)创建几个Series,根据结果,显示想要的

在我看来,只有这两种选择都像拐杖。如果这些都不是拐杖,那么哪个更好?

标记代码:

<Controls:MetroWindow x:Class="ExpansesCalculation.ReportChart"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:ExpansesCalculation"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"  
    xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    mc:Ignorable="d"
    Title="Графики"
    Height="600" 
    Width="800"
    MinHeight="600"
    MinWidth="800"
    Background="#FFF0EAEA" 
    WindowStartupLocation="CenterScreen">
<Grid>
    <!--Rows and columns definition-->
    <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
        <ColumnDefinition/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="90"/>
        <RowDefinition/>
        <RowDefinition Height="90"/>
    </Grid.RowDefinitions>

    <!--Chart Types-->
    <GroupBox Header="Тип графика"
              Grid.ColumnSpan="7"
              VerticalAlignment="Center"
              HorizontalAlignment="Center">
        <StackPanel Orientation="Horizontal"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center">
            <RadioButton GroupName="gt"
                         Name="rbLinear"
                         Margin="5"
                         IsChecked="{Binding IsLinear}">Линейный
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Checked">
                        <i:InvokeCommandAction Command="{Binding UpdateComboBoxCommand}" CommandParameter="MyParam"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </RadioButton>
            <RadioButton GroupName="gt"
                         Name="rbRound"
                         Margin="5"
                         IsChecked="{Binding IsRound, Mode=TwoWay}">Круговой
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Checked">
                        <i:InvokeCommandAction Command="{Binding UpdateComboBoxCommand}" CommandParameter="MyParam"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </RadioButton>
            <ComboBox Name="cbChartTypes"
                      Margin="5"
                      Width="200"
                      ItemsSource="{Binding ComboBoxContent}"/>
        </StackPanel>
    </GroupBox>

    <!--Date filter-->
    <GroupBox Header="Период"
              Grid.ColumnSpan="5"
              Grid.Column="7"
              VerticalAlignment="Center"
              HorizontalAlignment="Center">
        <StackPanel Orientation="Horizontal"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center">
            <TextBlock Margin="5"
                       Text="C"
                       VerticalAlignment="Center"/>
            <DatePicker Margin="5"
                        Width="110"/>
            <TextBlock Margin="5"
                       Text="По"
                       VerticalAlignment="Center"/>
            <DatePicker Margin="5"
                        Width="110"/>
        </StackPanel>
    </GroupBox>

    <!--Categoryes-->
    <GroupBox Name="gbCategory"
              Header="Категории"
              Margin="5"
              Grid.Column="9"
              Grid.ColumnSpan="3"
              Grid.Row="1"
              Content="{Binding CheckBoxContent}">
    </GroupBox>

    <!--Buttons-->
    <StackPanel Grid.Row="2"
                Grid.Column="9"
                Grid.ColumnSpan="3"
                VerticalAlignment="Center">
        <Button Name="btnApply"
                Margin="5"
                Command="{Binding ShowGraphic}">Применить</Button>
        <Button Name="btnCancel"
                Margin="5">Очистить</Button>
    </StackPanel>

    <!--Chart-->
    <chartingToolkit:Chart Grid.Row="1"
                           Grid.RowSpan="2"
                           Grid.ColumnSpan="9"
                           Margin="5">
        <chartingToolkit:ColumnSeries ItemsSource="{Binding DataSource}"
                                      DependentValuePath="Value"
                                      IndependentValuePath="Key">
        </chartingToolkit:ColumnSeries>
    </chartingToolkit:Chart>

</Grid>

c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-09-16 22:23:41 +0000 UTC

正则表达式。条件 5 从 1 到 5 的非重复数字

  • 2

您需要检查字符串是否满足条件。那些。线条必须看起来像 12345、52413、12543 等。

第 11234 行(重复)、12347 行(7 不在 1-5 范围内)被认为是错误的。

我的解决方案只检查所有内容是否在给定范围内且长度为 5 个字符。

[1-5]{5}

c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-08-25 18:24:08 +0000 UTC

MySQL没有工作外键

  • 1

你好!诸如此类的问题:创建了 2 个表 - “组”和“学生”。将它们绑定到组字段。添加数据时,不检查完整性,即可以将学生添加到不在“组”表中的组中 表的SQL代码

CREATE TABLE `gruppa` (


`grup_num` int(11) NOT NULL AUTO_INCREMENT,
  `spec` varchar(70) DEFAULT NULL,
  `curator` varchar(70) DEFAULT NULL,
  PRIMARY KEY (`grup_num`)
) ENGINE=InnoDB

CREATE TABLE `student`(
`id` int auto_increment not null,
`FIO` varchar(70) DEFAULT NULL,
`num_gruppa` INT NOT NULL,
primary key(`id`),
foreign key (`num_gruppa`) references gruppa(`grup_num`)
ON UPDATE RESTRICT
ON DELETE RESTRICT
)
ENGINE = InnoDB

可能是什么问题呢?

请求示例:

INSERT INTO student VALUES ('1','1','1')

带组的表 - 空

mysql
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-05-31 15:52:22 +0000 UTC

MVVM 模式应该在哪里处理输入数据?

  • 4

一个任务:

有这样一个添加数据的窗口(姓氏和名字不能为空,年龄是一个适当范围内的数字,性别必须选择)

添加数据

单击OK时,有必要显示有关用户所犯的所有错误的信息。

对以下内容感兴趣(是的,我知道 1 个问题 - 1 个主题):

  1. 在模型或视图中验证?
  2. 如果在模型中 - 如何显示有关错误的信息?
  3. 是否可以在模型中使用 MessageBox?
  4. 如果在视图中 - 这是否违反了模式的逻辑?
  5. 什么时候需要使用IDataErrorInfo验证,什么时候不用get;set;

UPD 项目 github链接

该农场位于 2 个文件中:

1)在这里我没有想出比将数据验证推入模型本身更好的东西

2)在这个视图中,我也通过审查得到了一条错误信息

作为解决所有这些问题的一种选择,我看到了一种方法:StudentWindow创建一个单独的模型,但即使是我也无法想象在其中写什么。

c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-05-25 21:00:34 +0000 UTC

MVVM WPF 删除多个选定项目

  • 4

是ListBox的,有汽车清单

<ListBox x:Name="autoList" Grid.Column="0" ItemsSource="{Binding Auto}"  
         SelectedItem="{Binding SelectedAuto}">

我有一个包含数据库中数据的集合ObservableCollection<Auto> Auto;

如何删除列表框中选中的多辆汽车?删除 1 auto 使用以下代码

public RelayCommand DeleteCommand
    {
        get
        {

            return deleteCommand ??
                   (deleteCommand = new RelayCommand((selectedItem) =>
                   {
                       MessageBoxResult result = MessageBox.Show("Вы действительно желаете удалить элемент?", "Удаление", MessageBoxButton.YesNo, MessageBoxImage.Question);
                       if (selectedAuto == null || result == MessageBoxResult.No) return;
                       // получаем выделенный объект
                       Auto auto = selectedAuto as Auto;
                       db.Autos.Remove(auto);
                       db.SaveChanges();
                       OnPropertyChanged("HasAuto");
                   }, CanEditOrDeleteAuto));
        }
    }

该类Auto看起来像这样(数据库表看起来一样)

class Auto : INotifyPropertyChanged
{
    private string model;
    private string marka;
    private int cost;
    private int maxSpeed;

    public int Id { get; set; }

    public string Model
    {
        get
        {
            return model;
        }

        set
        {
            model = value;
            OnPropertyChanged("Model");
        }
    }

    public string Marka
    {
        get
        {
            return marka;
        }

        set
        {
            marka = value;
            OnPropertyChanged("Marka");
        }
    }

    public int Cost
    {
        get
        {
            return cost;
        }

        set
        {
            cost = value;
            OnPropertyChanged("Cost");
        }
    }

    public int MaxSpeed
    {
        get
        {
            return maxSpeed;
        }

        set
        {
            maxSpeed = value;
            OnPropertyChanged("MaxSpeed");
        }
    }

    public event PropertyChangedEventHandler PropertyChanged;

    public void OnPropertyChanged([CallerMemberName]string prop = "")
    {
        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs(prop));
    }
}

我得到这样的数据库

public class ApplicationContext : DbContext
{
    public ApplicationContext() : base("DefaultConnection")
    {
    }
    public DbSet<Auto> Autos { get; set; }
}

视图模型

ObservableCollection<Auto> autos;
    private Auto selectedAuto;
    public ObservableCollection<Auto> Autos
    {
        get { return autos; }
        set
        {
            autos = value;
            OnPropertyChanged("Autos");
        }
    }

    public Auto SelectedAuto
    {
        get
        {
            return selectedAuto;
        }

        set
        {
            selectedAuto = value;
            OnPropertyChanged("SelectedAuto");
        }
    }
    public ApplicationViewModel()
    {
        db = new ApplicationContext();
        db.Autos.Load();
        Autos = db.Autos.Local;
    }

UDP2 标记

<Button Content="Удалить" Margin="10" Command="{Binding DeleteCommand}" Style="{StaticResource InformButton}"
                CommandParameter="{Binding SelectedItems, ElementName=autoList}"  />

虚拟机代码

public ICommand DeleteCommand => new RelayCommand(o => Delete((Collection<object>)o));

    private void Delete(Collection<object> o)
    {
        List<Auto> list = o.Select(e => (Auto)e).ToList();
        list.ForEach(auto => Autos.Remove(auto));
    }
c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-05-25 18:10:43 +0000 UTC

如果列表为空,MVVM WPF 更改 DataTemplate

  • 3

有ListBox

<ListBox x:Name="autoList" Grid.Column="0" ItemsSource="{Binding Auto}"  
             SelectedItem="{Binding SelectedAuto}">

汽车是从基地装载的。如何做到这一点,如果基地是空的(所有元素都被删除或尚未填充)ListBox它被替换为这个

<TextBlock Text="Список пуст. Введите данные" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
c#
  • 3 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-05-10 00:41:54 +0000 UTC

MVVM 事件 celleditend。数据未更新

  • 1

组件代码

       <DataGrid Name="dgMain" Grid.Row="1" Grid.ColumnSpan="3"
              Margin="10"
              ColumnWidth="100"
              SelectionUnit="Cell"
              dataGrid2D:ItemsSource.ColumnHeadersSource="{Binding ColumnHeaders}"
              dataGrid2D:ItemsSource.RowHeadersSource="{Binding RowHeaders}"
              dataGrid2D:ItemsSource.RowsSource="{Binding Data, UpdateSourceTrigger=PropertyChanged}">
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="CellEditEnding">
                <i:InvokeCommandAction Command="{Binding ParseValue, UpdateSourceTrigger=PropertyChanged}"/>
            </i:EventTrigger>
        </i:Interaction.Triggers>
    </DataGrid>

命令码

 public ICommand ParseValue { get; }

    private void Eval()
    {
        for (int i = 0; i < columnCount; i++)
        for (int j = 0; j < rowCount; j++)
            if (Data[i][j] != null)
            {
                Data[i][j] = RM(Data[i][j]);
                OnPropertyChanged(nameof(Data));
            }
    }

    private string RM(string dataString)
    {
        return dataString.Remove(0,1);
    }

几个问题一次:

  1. 数据在变化,但变化没有显示在窗体上
  2. 每次都跑遍整个 string[][] 数据不是一个很有趣的想法
  3. 目前尚不清楚如何准确获取已更改的单元格
c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-05-08 02:08:54 +0000 UTC

MVVM 将二维字符串数组绑定到数据网格

  • 0

您需要使用二维字符串数组填充 dataGrid。如果没有模式,一切都会很简单。

我会听取所有的建议 PS 如果作为实施的结果,将有可能给出标题列的名称最终给出顶部

c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-05-06 22:07:35 +0000 UTC

从文件中读取结构向量

  • 1

有一个结构

struct Record
{
      int Score;
      UnicodeString Name;
};

有一个向量

    std::vector<Record> list;

将结构写入文件的代码

std::ofstream out("output.txt", std::ios::out | std::ios::binary);
std::vector<Record>::size_type size = list.size();
out.write((char*)&list, sizeof(size));
out.write((char*)&list[0], list.size() * sizeof(Record));
out.close();

要阅读的代码

std::ifstream is("output.txt", std::ios::in | std::ios::binary);
std::vector<Record>::size_type size = 0;
is.read((char*)&size, sizeof(size));
list.resize(size);
is.read((char*)&list[0], list.size() * sizeof(Record));
is.close();

问题是数据要么没有被写入(虽然文件中有变化,但由于它是二进制的,所以很难确定写入了什么),或者它不可读(这更有可能是因为新向量有一个大小为 0)

UnicodeString- 字符串类型(所有组件通常在文本属性中接受/返回此类型)。我正在 RAD Studio 10.2 中制作一个项目

c++
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-04-23 22:54:45 +0000 UTC

MahApps.Metro 演示应用程序如何运行

  • 1

从这里https://github.com/MahApps/MahApps.Metro克隆了存储库, 但该项目无法编译。错误数量太多无法修复(几乎没有任何错误。我更有可能做错事)我正在寻找描述中的应用程序 在此处输入图像描述

下面其实是一个问题:如何编译工程?(或者如果它不在存储库中,那么在哪里可以找到它)

c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-04-17 14:59:55 +0000 UTC

C# BinaryFormatter 序列化

  • 0

遇到这样的问题。有一个班级User。它有一个方法SaveUser只将 1 条记录写入文件。有一种方法LoadUsers可以返回写入文件的所有用户的列表。错误发生在注释行中。它不能将 User 转换为 User[]。如何在不重写方法的情况下解决这个问题SaveUser?

class User 
{      
    private string name;
    private string password;
    private string key;
    private static string fileName = @"Data\users.dat";
public void SaveUser()
    {
        BinaryFormatter formatter = new BinaryFormatter();
        // получаем поток, куда будем записывать сериализованный объект
        using (FileStream fs = new FileStream(fileName, FileMode.Append))
        {
            formatter.Serialize(fs, this);
        }
    }
 public static List<User> LoadUsers()
    {
        List<User> listUser = new List<User>();
        BinaryFormatter formatter = new BinaryFormatter();
        //десериализация из файла people.dat
        using (FileStream fs = new FileStream(fileName, FileMode.Open))
        {
            if (fs == null)
                return listUser;
            else
            {
                User[] deserilizeUsers = (User[])formatter.Deserialize(fs);// ошибка, нельзя преобразовать User в User[]
                foreach (User user in deserilizeUsers)
                {
                    listUser.Add(user);
                }
            }

         }
         return listUser;
     }
}
c#
  • 1 个回答
  • 10 Views
Martin Hope
Alexandr
Asked: 2020-04-06 00:45:17 +0000 UTC

拖放 WPF

  • 2

请告诉我哪里出了问题。我想使用拖放插入图片,但拖动后我得到Image一个属性Source等于 null的对象

XAML

    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="300"></ColumnDefinition>
        <ColumnDefinition Width="*"></ColumnDefinition>
    </Grid.ColumnDefinitions>
    <ScrollViewer Grid.RowSpan="2">
        <StackPanel CanVerticallyScroll="True">
            <Image Source="Resources/part1.jpg" Width="280" Height="121" Margin="0,10,0,10" MouseDown="Image_MouseDown" Stretch="UniformToFill"/>
            <Image Source="Resources/part2.jpg" Width="280" Height="121" Margin="0,10,0,10" MouseDown="Image_MouseDown" Stretch="UniformToFill"/>
            <Image Source="Resources/part3.jpg" Width="280" Height="121" Margin="0,10,0,10" MouseDown="Image_MouseDown" Stretch="UniformToFill"/>
            <Image Source="Resources/part4.jpg" Width="280" Height="121" Margin="0,10,0,10" MouseDown="Image_MouseDown" Stretch="UniformToFill"/>
            <Image Source="Resources/part5.jpg" Width="280" Height="121" Margin="0,10,0,10" MouseDown="Image_MouseDown" Stretch="UniformToFill"/>
            <Image Source="Resources/part6.jpg" Width="280" Height="121" Margin="0,10,0,10" MouseDown="Image_MouseDown" Stretch="UniformToFill"/>
        </StackPanel>
    </ScrollViewer>
    <Canvas Grid.Column="1" Margin="0,0,0,0" >
        <Image Source="Resources/part1.jpg" Width="280" Height="120" Drop="Image_Drop" DragEnter="Image_DragEnter" AllowDrop="True" Stretch="UniformToFill" Canvas.Left="156" Canvas.Top="51"/>
        <Image Source="Resources/part2.jpg" Width="280" Height="120" Drop="Image_Drop" AllowDrop="True" Stretch="UniformToFill" Canvas.Left="436" Canvas.Top="51"/>
        <Image Source="Resources/part3.jpg" Width="280" Height="120" Drop="Image_Drop" AllowDrop="True" Stretch="UniformToFill" Canvas.Left="156" Canvas.Top="170"/>
        <Image Source="Resources/part4.jpg" Width="280" Height="120" Drop="Image_Drop" AllowDrop="True" Stretch="UniformToFill" Canvas.Left="436" Canvas.Top="170"/>
        <Image Source="Resources/part5.jpg" Width="280" Height="120" Drop="Image_Drop" AllowDrop="True" Stretch="UniformToFill" Canvas.Left="156" Canvas.Top="288"/>
        <Image Source="Resources/part6.jpg" Width="280" Height="120" Drop="Image_Drop" AllowDrop="True" Stretch="UniformToFill" Canvas.Left="436" Canvas.Top="288"/>
    </Canvas>

</Grid>

C#

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }

    private void Image_Drop(object sender, DragEventArgs e)
    {
        ((Image) sender).Source = e.Source as ImageSource;
    }

    private void Image_MouseDown(object sender, MouseButtonEventArgs e)
    {
        // sender – объект, на котором произошло данное событие.
        Image lbl = sender as Image;
        // Создаем источник.
        // Копируем содержимое метки Drop.
        // 1 параметр: Элемент управления, который будет источником.
        // 2 параметр: Данные, которые будут перемещаться.
        // 3 параметр: Эффект при переносе.
        DragDrop.DoDragDrop(lbl, lbl.Source, DragDropEffects.Copy);
    }

    private void Image_DragEnter(object sender, DragEventArgs e)
    {
        e.Effects = DragDropEffects.Copy;
    }
}

git 链接https://github.com/Sechik/Puzzle

c#
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5