问题列表 - 第28608页

在设计模式下显示WinForm并在其上显示自定义控件时出错

我有一个UserControl,它是类库的一部分.我从我的解决方案中引用这个项目.这会将引用项目的控件添加到我的工具箱中.我将控件添加到表单中.一切看起来都很好,我编译并运行.完善...

但当我关闭.frm控件并重新打开它时,我收到此错误.代码继续运行.

它可能与名称空间有关.原始命名空间只是"设计",这是模棱两可和冲突,所以我决定重命名它.我想那是我的问题开始的时候.

    To prevent possible data loss before loading the designer, the following errors must be resolved:   



    2 Errors   

  Ignore and Continue   
    Why am I seeing this page?   





   Could not find type 'Besi.Winforms.HtmlEditor.Editor'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.     




Instances of this error (1)  

1. …
Run Code Online (Sandbox Code Playgroud)

visual-studio-2010 winforms

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

如何检测网址是否包含Feed?

我在一些浏览器中看到过(例如Firefox),只有当页面包含RSS/Atom提要时才会激活RSS提要图标.浏览器如何检测页面是否包含Feed?

browser rss feeds atom-feed

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

在完美的图表中寻找最大集团

一种快速算法,用于在完美图形中找到最大团的大小(这个具有至少1个和弦的奇数周期),具有大约100个顶点?

还有比蛮力更简单的方法,因为这是一个完美的图形,应该有一个多项式时间解决方案.但我无法找到算法.

贪婪着色是否能在所有完美图形中实现最佳着色?

c++ algorithm graph clique

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

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

如何查看 DLL 中的函数?

有没有办法打开和查看 DLL 中的代码(即,查看函数/方法、签名以及这些函数或方法中的代码?)

有没有办法查看 DLL 中的任何标题以及 DLL 的作者信息?

dll reverse-engineering header

3
推荐指数
1
解决办法
6772
查看次数

SQLAlchemy - 如何映射只读(或计算)属性

我正在试图弄清楚如何映射一个简单的只读属性,并在我保存到数据库时触发该属性.

一个人为的例子应该让这个更清楚.首先,一个简单的表:

meta = MetaData()
foo_table = Table('foo', meta,
    Column('id', String(3), primary_key=True),
    Column('description', String(64), nullable=False),
    Column('calculated_value', Integer, nullable=False),
    )
Run Code Online (Sandbox Code Playgroud)

我想要做的是设置一个具有只读属性的类,当我调用session.commit()时,该属性将插入到calculated_value列中...

import datetime
def Foo(object):  
    def __init__(self, id, description):
        self.id = id
        self.description = description

    @property
    def calculated_value(self):
        self._calculated_value = datetime.datetime.now().second + 10
        return self._calculated_value
Run Code Online (Sandbox Code Playgroud)

根据sqlalchemy文档,我认为我应该这样映射:

mapper(Foo, foo_table, properties = {
    'calculated_value' : synonym('_calculated_value', map_column=True)
    })
Run Code Online (Sandbox Code Playgroud)

这样做的问题是,在您访问calculated_value属性之前,_calculated_value为None.似乎SQLAlchemy在插入数据库时​​没有调用该属性,所以我得到一个None值.映射这个的正确方法是什么,以便将"calculated_value"属性的结果插入到foo表的"calculated_value"列中?

好的 - 我正在编辑这篇文章以防其他人有同样的问题.我最终做的是使用MapperExtension.让我给你一个更好的例子以及扩展的用法:

class UpdatePropertiesExtension(MapperExtension):
    def __init__(self, properties):
        self.properties = properties

    def _update_properties(self, instance):
        # We simply need to access our …
Run Code Online (Sandbox Code Playgroud)

python sqlalchemy properties readonly

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

如何找到连接蓝牙设备的信号强度

在我的一个应用程序中,我需要显示与我的手机配对的所有wi-fi和蓝牙设备,以及它们的信号强度.有了wi-fi,我可以显示信号强度(RSSI).但我的蓝牙问题.我搜索了一些适合这项任务的方法; 我找到了一种方法:

intent.getShortExtra(BluetoothDevice.EXTRA_RSSI, Short.MIN_VALUE);
Run Code Online (Sandbox Code Playgroud)

但它只显示未与我的手机配对的新设备RSSI.是否有任何想法让所有蓝牙设备RSSI?

android bluetooth rssi

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

C++带接口的多重继承?

问候所有,

我来自Java背景,我在多重继承方面遇到困难.

我有一个名为IView的接口,它有init()方法.我想派生一个名为PlaneViewer的新类,实现上面的接口并扩展另一个类.(QWidget的).

我的实现如下:

IViwer.h(只有头文件,没有CPP文件):

#ifndef IVIEWER_H_
#define IVIEWER_H_

class IViewer
{
public:
  //IViewer();
  ///virtual
  //~IViewer();
  virtual void init()=0;
};

#endif /* IVIEWER_H_ */
Run Code Online (Sandbox Code Playgroud)

我的派生类.

PlaneViewer.h

#ifndef PLANEVIEWER_H
#define PLANEVIEWER_H

#include <QtGui/QWidget>
#include "ui_planeviewer.h"
#include "IViewer.h"
class PlaneViewer : public QWidget , public IViewer
{
    Q_OBJECT

public:
    PlaneViewer(QWidget *parent = 0);
    ~PlaneViewer();
    void init(); //do I have to define here also ?

private:
    Ui::PlaneViewerClass ui;
};

#endif // PLANEVIEWER_H
Run Code Online (Sandbox Code Playgroud)

PlaneViewer.cpp

#include "planeviewer.h"

PlaneViewer::PlaneViewer(QWidget *parent)
    : QWidget(parent)
{
    ui.setupUi(this);
}

PlaneViewer::~PlaneViewer() …
Run Code Online (Sandbox Code Playgroud)

c++ virtual inheritance multiple-inheritance

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

LINQ以多种条件加入C#

我在C#中有一个LINQ Joining语句,有多个条件.

var possibleSegments = 
    from epl in eventPotentialLegs
    join sd in segmentDurations on 
        new { 
            epl.ITARequestID, 
            epl.ITASliceNumber, 
            epl.DepartAirportAfter, 
            epl.AirportId_Origin, 
            epl.AirportId_Destination 
        } 
        equals 
        new { 
            sd.ITARequestId, 
            sd.SliceIndex, 
            sd.OriginAirport, 
            sd.DestinationAirport 
        }
    where
        epl.DepartAirportAfter > sd.UTCDepartureTime 
        and 
        epl.ArriveAirportBy > sd.UTCArrivalTime
    select new PossibleSegments{ ArrivalTime = sd.arrivalTime };
Run Code Online (Sandbox Code Playgroud)

加入无法正常工作.我究竟做错了什么?

c# linq join multiple-conditions

54
推荐指数
2
解决办法
9万
查看次数

是否有可能在PHP应用程序中有太多的功能?

PHP应用程序可以有太多功能吗?执行大量PHP函数会占用内存和资源吗?我的WordPress主题开发中有很多功能(当我完成时可能超过100个)而且我担心我可能会有太多功能.

php function

6
推荐指数
3
解决办法
2268
查看次数