问题列表 - 第49902页

"设置为起始页"和index.html

如果我将页面"MyPage.aspx"设置为起始页面,是否还需要index.html文件?

谢谢.

asp.net

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

animate的回调函数(完成)在开始时执行?

我正在使用jQuery 1.5.1这是我的代码:

$('.cellcontent').animate({
   left: '-=190'}, {
   easing: alert('start ani'),
   duration: 5000,
   complete: alert('end ani')});
Run Code Online (Sandbox Code Playgroud)

动画开始前我都收到了警报!?我希望在动画结束后启动完整的功能.有什么想法吗?

jquery

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

绑定到2个字符串元素?

WPF中是否可以绑定到2个元素?

例如,我想在文本框中显示类似myserver.com:80的内容.所以为了做到这一点,我想绑定到Host字段,然后添加一个":"然后绑定到我的对象中的端口字段全部用于相同的标签内容.

c# data-binding wpf binding

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

Rails 3中的Ajax回调与Prototype,而不是jQuery

我正在将应用程序从Rails 2升级到3并正在重新设计所有远程功能以使用Unobtrusive Javascript.我正在努力的是在UJS中处理ajax回调.

我发现有很多资源可以展示如何使用jQuery实现这些回调,但对于原型来说并不多.也许你可以帮我解决这个问题.

在Rails 2中,我有这个:

<% remote_form_for @foo, {:loading => "loading_function()", :complete => "complete_function()" } do |f| %>
 ...
<% end %>
Run Code Online (Sandbox Code Playgroud)

在Rails 3中,我有这个:

<%= form_for @foo, :remote => true do |f| %>
 ....
<% end %>
Run Code Online (Sandbox Code Playgroud)

从我到目前为止所知(可能是错误的),我需要将旧的加载/完成函数附加到表单,以便它们将被Rails.js中的handleRemote函数触发.我只是不确定该怎么做.

再一次,我在Prototype中这样做.因此,非常感谢特定于该框架的答案.

unobtrusive-javascript prototypejs ruby-on-rails-3

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

帮助,IE7抢劫了我的divs,现在他们正在屏幕上跑!

我的网站http://hivechatter.com/对于Firefox,Chrome,IE8来说非常性感,你可以这么说:

在此输入图像描述

但接下来的是IE7,它将她的div很糟糕,以至于他们几乎跑掉了屏幕!无论出于何种原因,div中的内容都集中在一起.到底发生了什么事?这似乎与IE7解释左边的方式有关:百分比边距,但我无法弄清楚.

在此输入图像描述

为了方便和后人的缘故,下面是我的CSS的相关部分,删除了文本格式和其他废话.#container是整个页面容器,#blue_box是主要内容框,#left和#right是蓝色框中的列,#diviv是分隔它们的白线,#links是在#blue_box下面悬停的浅蓝色导航.

#background {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -9999;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: no-repeat #222933;
    overflow: hidden;
}    

#container {
    position: relative;
    left: 34%;
    top: 10%;
    width: 50%;
    min-width: 450px;
    max-width: 700px;
    overflow: auto;
    padding: 0;
}

#blue_box {
    position: relative; /* so that divider has appropriate height */
    width: 94%;
    padding: 3%;
    overflow: auto; /*needed so that div stretches with child …
Run Code Online (Sandbox Code Playgroud)

css internet-explorer-7

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

我应该更喜欢"是"还是"作为"运算符?

可能重复:
使用CLR中的'as'关键字进行转换

foreach (MyClass i in x)
{
        if (i is IMy)
        {
                IMy a = (IMy)i;
                a.M1();
        }
}
Run Code Online (Sandbox Code Playgroud)

要么

foreach (MyClass i in x)
{
        IMy a = i as IMy;
        if (a != null)
        {
                a.M1();
        }

}
Run Code Online (Sandbox Code Playgroud)

c#

5
推荐指数
3
解决办法
1159
查看次数

MVVM:实现ViewModel而不更新其Model实例的类

所以我一直在尝试MVVMWPF具有以下结构的简单应用程序中实现该模式:

模型

public class Foobar
{
    public string Foo { get; set; }
    public string Bar { get; set; }

    public string DoSomethingWithFoo()
    {
        return "The quick brown fox";
    }

    public string DoSomethingWithBar()
    {
        return "jumps over the lazy dog.";
    }
}
Run Code Online (Sandbox Code Playgroud)

查看模型(基础)

public abstract class ViewModel : INotifyPropertyChanged
{
    [Conditional("DEBUG")]
    [DebuggerStepThrough]
    public void VerifyPropertyName(string propertyName)
    {
        if (TypeDescriptor.GetProperties(this)[propertyName] == null)
        {
            Debug.Fail("Invalid property name: " + propertyName);
        }
    }

    protected virtual void OnPropertyChanged(string propertyName)
    { …
Run Code Online (Sandbox Code Playgroud)

c# wpf mvvm inotifypropertychanged

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

如何编写冒充不同用户的测试?

我的Winforms应用程序根据当前进程中找到的组成员身份设置权限.

我刚刚在MSTEST进行了单元测试.

我想以其他用户身份运行它,以便我可以验证预期的行为.

这就是我的拍摄方式:

    [TestMethod]
    public void SecuritySummaryTest1()
    {
        Impersonate(@"SomeDomain\AdminUser", password);
        var target = new DirectAgentsSecurityManager();
        string actual = target.SecuritySummary;
        Assert.AreEqual(
            @"Default=[no]AccountManagement=[no]MediaBuying=[no]AdSales=[no]Accounting=[no]Admin=[YES]", actual);
    }
    [TestMethod]
    public void SecuritySummaryTest2()
    {
        Impersonate(@"SomeDomain\AccountantUser", password);
        var target = new DirectAgentsSecurityManager();
        string actual = target.SecuritySummary;
        Assert.AreEqual(
            @"Default=[no]AccountManagement=[YES]MediaBuying=[no]AdSales=[no]Accounting=[YES]Admin=[NO]", actual);
    }
Run Code Online (Sandbox Code Playgroud)

c# impersonation mstest winforms

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

水印使用John Myczek的课程

嘿,我尝试实施John制作Watermark的课程.

我被困住了,想知道是否有人可以帮助我....在wpf中添加了提到的2个类:

<AdornerDecorator>
        <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,184,664,0" x:Name="cbVideoDevices" VerticalAlignment="Top" Width="316" Initialized="cbVideoDevices_Initialized" SelectionChanged="cbVideoDevices_SelectionChanged">
            <Controls:WatermarkService.Watermark>
                <TextBlock>Type here to search text</TextBlock>
            </Controls:WatermarkService.Watermark>
        </ComboBox>
    </AdornerDecorator>
Run Code Online (Sandbox Code Playgroud)

无论我尝试什么,我都会因控制不存在而不断出现错误,或者财产不会退出.我在他的课程中没有错误,所以我认为引用很好,但在我看来System.Windows.Control丢失了....但我找不到它添加它...

任何帮助,非常感谢.

编辑:在Liz的帮助下,我让这个工作,但让任何人都知道,谁使用这个.

  • AdornerDecorator为所有东西创建一个盒子.....
  • 为AdornerDecorator创建边距并将其移动到所需位置
  • 边缘和对齐螺钉与水印显示的位置....

c# wpf watermark

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

fileinfo函数PHP

有人可以给我一个如何使用的示例fileinfo,以替换一段代码,例如:

($_FILES["fileToUpload"]["type"] == "image/gif"
|| $_FILES["fileToUpload"]["type"] == "image/jpeg"
|| $_FILES["fileToUpload"]["type"] == "image/png")
Run Code Online (Sandbox Code Playgroud)

php fileinfo

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