首页 \ 问答 \ 我必须放弃Visio 2013中的遗留ERD图吗?(Must I abandon legacy ERD diagrams in Visio 2013?)

我必须放弃Visio 2013中的遗留ERD图吗?(Must I abandon legacy ERD diagrams in Visio 2013?)

我有几个ERD图,我一直在Visio中维护几个版本。 它们并不是真正的大,但如果我不得不从头开始重新创建,它们将比我想投入更多的努力。 制作拼写错误的可能性非常高。

Visio 2013不支持编辑这些文档。 有没有办法将Visio 2010版本的ERD转换为Visio 2013允许我编辑的内容?


I have several ERD diagrams that I have been maintaining in Visio for several versions. They are not real big but would represent more effort than I want to invest if I had to recreate them from scratch. The potential of making typos is pretty high.

Visio 2013 doesn't support editing these documents. Is there a way I can convert the Visio 2010 version of the ERD to something that Visio 2013 will allow me to edit?


原文:https://stackoverflow.com/questions/19082412
更新时间:2022-05-31 09:05

最满意答案

为您的要求做

if (InSet(value)(GetValue1(), GetValue2(), GetValue3()))
{
   // Do something here...
}

尝试这个:

template <typename T>
class InSetHelper
{
     const T &Value;
     void operator=(const InSetHelper &);
public:
     InSetHelper(const T &value) : Value(value) {}

     template<class Other, class Another>
     bool operator()(const Other &value1, const Another &value2) const
     {
         return Value == value1 || Value == value2;
     }
     template<class Other, class Another, class AThird>
     bool operator()(const Other &value1, const Another &value2, const AThird &value3) const
     {
         return Value == value1 || Value == value2 || Value == value3;
     }
};

template <typename T> 
InSetHelper<T> InSet(const T &value) { return InSetHelper<T>(value); }

不过这个语法可能更清晰:

if (MakeSet(GetValue1(), GetValue2(), GetValue3()).Contains(value))
{
   // Do something here...
}

template <typename T, typename U, typename V>
class Set3
{
    const T& V1;
    const U& V2;
    const V& V3;
    void operator=(const Set3 &);
public:
    Set3(const T &v1, const U &v2, const V &v3) : V1(v1), V2(v2), V3(v3) {}

    template <typename W>
    bool Contains(const W &mp;v) const
    {
        return V1 == v || V2 == v || V3 == v;
    }
};

template <typename T, typename U>
class Set2 
{ 
     // as above 
};

template <typename T, typename U, typename V>
Set3<T, U, V> MakeSet(const T &v1, const U &v2, const V &v3)
{
    return Set3<T, U, V>(v1, v2, v3);
}

template <typename T, typename U>
Set3<T, U> MakeSet(const T &v1, const U &v23)
{
    return Set3<T, U, V>(v1, v2);
}

如果这些值真的是树或链表的一部分,那么你已经有了你的集合/容器,而你最好的选择就是使用一些递归:

parent.ThisOrDescendantHasValue(value);

您只需将它添加到属于父类和子类的任何类别中:

class Node
{
public: 
    Value GetValue();
    Node *GetChild();
    bool ThisOrDescendantHasValue(const Value &value)
    {
        return GetValue() == value
           || (GetChild() && GetChild->ThisOrDescendantHasValue(value));
    }
};

For your request to do

if (InSet(value)(GetValue1(), GetValue2(), GetValue3()))
{
   // Do something here...
}

Try this:

template <typename T>
class InSetHelper
{
     const T &Value;
     void operator=(const InSetHelper &);
public:
     InSetHelper(const T &value) : Value(value) {}

     template<class Other, class Another>
     bool operator()(const Other &value1, const Another &value2) const
     {
         return Value == value1 || Value == value2;
     }
     template<class Other, class Another, class AThird>
     bool operator()(const Other &value1, const Another &value2, const AThird &value3) const
     {
         return Value == value1 || Value == value2 || Value == value3;
     }
};

template <typename T> 
InSetHelper<T> InSet(const T &value) { return InSetHelper<T>(value); }

This syntax might be more clear though:

if (MakeSet(GetValue1(), GetValue2(), GetValue3()).Contains(value))
{
   // Do something here...
}

template <typename T, typename U, typename V>
class Set3
{
    const T& V1;
    const U& V2;
    const V& V3;
    void operator=(const Set3 &);
public:
    Set3(const T &v1, const U &v2, const V &v3) : V1(v1), V2(v2), V3(v3) {}

    template <typename W>
    bool Contains(const W &v) const
    {
        return V1 == v || V2 == v || V3 == v;
    }
};

template <typename T, typename U>
class Set2 
{ 
     // as above 
};

template <typename T, typename U, typename V>
Set3<T, U, V> MakeSet(const T &v1, const U &v2, const V &v3)
{
    return Set3<T, U, V>(v1, v2, v3);
}

template <typename T, typename U>
Set3<T, U> MakeSet(const T &v1, const U &v23)
{
    return Set3<T, U, V>(v1, v2);
}

If those values are really part of a tree or a linked list, then you have your set/container already, and your best bet is to just use some recursion:

parent.ThisOrDescendantHasValue(value);

You'd just add this to whatever class parent and child belong to:

class Node
{
public: 
    Value GetValue();
    Node *GetChild();
    bool ThisOrDescendantHasValue(const Value &value)
    {
        return GetValue() == value
           || (GetChild() && GetChild->ThisOrDescendantHasValue(value));
    }
};

相关问答

更多
  • 假设student::name是一个char数组或一个指向char的指针,如下表达式 sName==Student.name 将char char[28] sName衰减到char*之后比较指向char指针。 鉴于你想比较这些数组中的字符串容器,一个简单的选择是将名称读入std::string并使用bool operator== : #include // for std::string std::string sName; .... if (sName==Student.name) ...
  • 这是一个标准问题,因为计算机如何存储浮点值。 在这里搜索“浮点问题”,你会发现大量的信息。 简而言之,浮点/双精度不能精确地存储0.1。 它永远是一点点。 您可以尝试使用以十进制格式存储数字的decimal类型。 因此,0.1将精确表示。 你想知道原因: 浮动/双倍存储为二进制分数,而不是十进制分数。 为了显示: 12.34十进制格式(我们用的)是指1 * 10 1 + 2 * 10 0 + 3 * 10 -1 + 4 * 10 -2 。 计算机以相同的方式存储浮点数,除了使用基数2:10.01表示1 * ...
  • 不是100%肯定你的代码,但可能: var equal = responses.SequenceEqual(Person.PersonDetails.Select(PD => PD.correct); Not 100% sure of your code, but maybe: var equal = responses.SequenceEqual(Person.PersonDetails.Select(PD => PD.correct);
  • 使用RowEnter事件: private void DataGridView1_RowEnter(object sender,DataGridViewCellEventArgs e) { btnUpdate.Enabled=!DataGridView1.Rows[e.RowIndex].Cells[10].Value.ToString().Equals("Completed") ; } 也许,在填充gridview之后需要以下内容(我不记得在初始化时是否引发了RowEnter事件)。 btnUp ...
  • 我不直接从pdf知道,但你可以将pdf转换为cdf(通过积分),然后使用逆变换采样 。 这假设您有一种技术可以在[0, 1]生成随机数u (例如Java中的Math.random() )。 一旦你生成了这样的u ,找到一个x使得cdf(x) = u 。 那个x是你想要的值。 I don't know about directly from a pdf, but you can convert a pdf to a cdf (by integrating) and then use inverse trans ...
  • 可以尝试DataRelation类。 它在DataSet中的两个DataTable之间创建外键/连接。 using System.Data; using System.Text; public int GetMatches(DataTable table1, DataTable table2) { DataSet set = new DataSet(); //wrap the tables in a DataSet. set.Tables.Add(table1); set ...
  • 不,这不行。 类型转换运算符的优先级高于乘法运算符。 这意味着A[i]和B[i]在被乘以1e7之前将被转换为整数(并被截断)。 2.25和2.5将最终等于你的代码。 你可以通过将乘法放在圆括号中来解决这个问题: (int)(A[i]*k) 此外,由于您依赖截断而不是四舍五入,最终可能会得到不正确的结果(取决于您的期望)。 1.0e-7和1.9e-7将相等( 1 == 1 ),而1.9e-7和2.1e-7不会( 1 != 2 )。 我建议找到一个功能,可以根据您的行为进行适当的调整。 此外,您的比较不处理有效 ...
  • 为您的要求做 if (InSet(value)(GetValue1(), GetValue2(), GetValue3())) { // Do something here... } 尝试这个: template class InSetHelper { const T &Value; void operator=(const InSetHelper &); public: InSetHelper(const T &value) : Value( ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。