小编mar*_*vin的帖子

如何获得真正的MySQL数据库大小?

我想知道我的MySQL数据库使用了多少空间,以便选择一个Web主机.我发现命令SHOW TABLE STATUS LIKE 'table_name'所以当我进行查询时,我得到这样的东西:

Name       | Rows | Avg. Row Length | Data_Length | Index Length
----------   ----   ---------------   -----------   ------------
table_name   400          55            362000        66560
Run Code Online (Sandbox Code Playgroud)
  • 数字四舍五入.

那么这张表有362000 或400*362000 = 144800000字节的数据吗?索引长度是什么意思?谢谢 !

mysql database size storage byte

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

在另一个图像中查找图像

我正在尝试构建一个解决谜题的应用程序(尝试开发图形算法),我不想一直手工输入样本输入.

编辑: 我不是想建立一个游戏.我正在尝试建立一个扮演游戏"SpellSeeker"的经纪人

假设我在屏幕上有一个图像(见附件),上面有数字,我知道这些框的位置,我有这些数字的确切图像.我想要做的只是告诉相应的盒子上有哪个图像(数字).

数字http://i46.tinypic.com/3089vyt.jpg

所以我想我需要实施

bool isImageInsideImage(Bitmap numberImage,Bitmap Portion_Of_ScreenCap) 或类似的东西.

我试过的是(使用AForge库)

public static bool Contains(this Bitmap template, Bitmap bmp)
{
    const Int32 divisor = 4;
    const Int32 epsilon = 10;

    ExhaustiveTemplateMatching etm = new ExhaustiveTemplateMatching(0.9f);

    TemplateMatch[] tm = etm.ProcessImage(
        new ResizeNearestNeighbor(template.Width / divisor, template.Height / divisor).Apply(template),
        new ResizeNearestNeighbor(bmp.Width / divisor, bmp.Height / divisor).Apply(bmp)
        );

    if (tm.Length == 1)
    {
        Rectangle tempRect = tm[0].Rectangle;

        if (Math.Abs(bmp.Width / divisor - tempRect.Width) < epsilon
            &&
            Math.Abs(bmp.Height / divisor - tempRect.Height) …
Run Code Online (Sandbox Code Playgroud)

c# search image aforge

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

我可以将EventHandler添加到String吗?

我只是想知道当变量的值(如int,string等)发生变化时是否可以"触发"某些东西?

假设我有一个TextBox tb显示值的String MyString.所以我想做的是这样的:

MyString.ValueChanged += new EventHandler(UpdateTextBox);

public void UpdateTextBox(object sender, EventArgs e)
{
tb.Text = MyString;
}
Run Code Online (Sandbox Code Playgroud)

为了不必更新多行文本框.有没有办法做到这一点?谢谢 !

c# events updates event-handling

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

标签 统计

c# ×2

aforge ×1

byte ×1

database ×1

event-handling ×1

events ×1

image ×1

mysql ×1

search ×1

size ×1

storage ×1

updates ×1