问题列表 - 第30350页

如何在Silverlight中将Textbox.Width设置为100%?

如何设置文本框的宽度以编程方式填充容器?例如,如果我对文本框有以下声明,则在xaml中:

<TextBox Height="23"  Name="TextBox1" VerticalAlignment="Top" Width="50" />
Run Code Online (Sandbox Code Playgroud)

如何设置宽度,使其在按钮单击处理程序中填充容器?

.net c# silverlight silverlight-4.0

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

如何在不复制的情况下获取std :: stringstream的长度

如何获得字符串流的字节长度.

stringstream.str().length();
Run Code Online (Sandbox Code Playgroud)

将内容复制到std :: string中.我不想复制.

或者,如果任何人都可以建议另一个在内存中工作的iostream,可以通过写入另一个ostream来传递,并且可以轻松地获得它的大小我将使用它.

c++

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

如何将powerpoint幻灯片嵌入网页

有什么干净的方式可以在所有浏览器中使用吗?

c# asp.net-mvc powerpoint

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

在iPhone上绘制几行和圆圈时,CGContextStrokePath性能不佳

我需要在我的视图上绘制几百行和圆圈,并且他们继续通过计时器功能,我调用[myView setNeedsDisplay]来更新视图.

我从UIView子类(myView)并实现drawRect函数来执行以下操作...

-(void) drawRect:(CGRect)rect {
   CGContextRef context = UIGraphicsGetCurrentContext();

   CGFloat red[4] = { 1, 0, 0, 1};

   CGContextSetLineWidth(context, 1);
   CGContextSetShouldAntialias(context, NO);
   CGContextSetLineCap(context, kCGLineCapSquare);
   CGContextSetStrokeColor(context, red);

   // rects is an array of CGRect of size ~200
   for (int i = 0; i < N; i++) {
      CGContextAddEllipseInRect(context, rects[i]);
   }
   // points is an array of CGPoint of size ~100
   CGContextAddLines(context, points, N);

   CGContextStrokePath(context, color);
}
Run Code Online (Sandbox Code Playgroud)

但这是狗慢.这里有什么我想念的吗?完成一次完整绘图需要大约1秒钟

iphone graphics performance xcode

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

使用javascript阻止表单从重定向/刷新提交

我有一个页面,您可以在一系列texbox(从PHP生成)和2个按钮,GetData和SaveData中输入数据.我希望能够在编辑texbox时按Enter键,它将执行与单击SaveData按钮相同的操作(onclick ="onSave();").我可以通过执行以下操作来实现此目的:

<form id="editForm" name="editForm" action="onSave();">
Run Code Online (Sandbox Code Playgroud)

但当我按回车键时,页面被重定向到页面,没有php帖子(例如:www.mypage.com/index.php,而不是www.mypage.com/index.php?edit_data=true)

我如何实现我想要的目标?

html forms submit

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

Excel:使用2个单元格创建1个更大的单元格

我有3个单元格,我想用作1条注释行.有没有办法将它们组合成1个单元格,这样我就可以写出整个句子?

例:

| 内容| 内容| 内容|

我想把它变成一个没有那些细胞分离器的细胞:

| 内容内容|

excel

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

jqGrid在尝试加载json时给出异常

我的网站上有以下html:

<link type="text/css" href="/Styles/ui-lightness/jquery-ui-1.8.2.custom.css" rel="Stylesheet" />
<link type="text/css" href="/Styles/ui.jqgrid.css" rel="Stylesheet" />
<script type="text/javascript" src="/Scripts/jquery-1.4.2.min.js" ></script>
<script type="text/javascript" src="/Scripts/jquery-ui-1.8.2.min.js" ></script>
<script type="text/javascript" src="/Scripts/grid.locale-en.js" ></script>
<script type="text/javascript" src="/Scripts/jquery.jqGrid.min.js" ></script><link type="text/css" rel="Stylesheet" href="Styles/Site.css" />

...

<script type="text/javascript">
    $(document).ready(function () {
        jQuery("#tblScheduledReleases").jqGrid({
            url: '/Release/GetScheduledReleases',
            datatype: "json",
            mtype: 'POST',
            colNames: ['Id', 'Version', 'Name', 'Scheduled Date'],
            colModel: [
                { name: 'id', width: 55 },
                { name: 'version', width: 90 },
                { name: 'name', width: 100 },
                { name: 'date', width: 90 }
                  ],
            autowidth: true,
            sortname: …
Run Code Online (Sandbox Code Playgroud)

jquery json jqgrid

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

Git桥到Mercurial

我主要使用Git工作,并在github上有很多代码.我也想在Bitbucket上使用它,对于使用mercurial的人,但更重要的是因为我想在我的domian上有代码,而BItbucket支持Cnames用于托管代码.

那么有没有办法让我主要与Git合作,但也能够推向HG.

Github在其他方向创建了一个项目,(对于HG repos to git),但是我正在寻找一个方向.

git mercurial github bitbucket

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

类似'%Query%'的性能与全文搜索CONTAINS查询

我有一种情况,我想搜索一个单词.

对于那种情况,从性能的角度来看哪个查询会很好?

Select Col1, Col2 from Table Where Col1 Like '%Search%'
Run Code Online (Sandbox Code Playgroud)

要么

Select Col1, Col2 from Table Where Col1 CONTAINS(Col1,'Search')
Run Code Online (Sandbox Code Playgroud)

sql database performance full-text-search sql-like

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

如何在C#中创建包含多个大小/图像的图标文件

如何创建包含多个尺寸的图标文件?

我知道我使用位图创建了一个图标Icon.FromHandle()但是如何为该图标添加另一个图像/大小?

编辑:我需要在我的应用程序中执行此操作,因此我无法执行外部应用程序来进行组合.

c# icons bitmap

7
推荐指数
2
解决办法
7022
查看次数