问题列表 - 第12126页

div的左半部分和右半部分的背景颜色不同

我有一个居中的div布局.背景中div的左侧应为白色,右侧应为绿色.两者都应扩展到无穷大.

我认为它应该很简单,但我现在还没有理解.任何简单的方案?谢谢!

-----------------------------------------------------
(div 1)     __________________________ 
           |(div 2)         |         |
           |                |         |
           |                |         |
<- white   |     white      |  green  |   green  ->
           |                |         |
           |                |         |
           |________________|_________|

------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)

html css background center

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

.NET:使用AppDomains引发和处理事件的问题

这是我的问题的基本要点:

  1. 我的主要Window类实例化了A类.
  2. A类在辅助AppDomain中实例化B类.
  3. B类引发事件,A类成功处理事件.
  4. A级引发了自己的事件.

问题:在第4步中,当A类从捕获B类事件的事件处理程序方法引发自己的事件时,会引发该事件; 但是,从不调用Window类中的订阅处理程序.

没有例外被抛出.如果我删除辅助AppDomain,事件处理没有问题.

有谁知道为什么这不起作用?有没有其他方法可以在不使用回调的情况下完成这项工作?

我认为,如果有的话,问题将发生在第3步而不是第4步.

这是一个真实的代码示例来说明问题:

Class Window1

    Private WithEvents _prog As DangerousProgram    

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click    
        _prog = New DangerousProgram()
        _prog.Name = "Bad Program"  
    End Sub

    Private Sub MyEventHandler(ByVal sender As Object, ByVal e As NameChangedEventArgs) Handles _prog.NameChanged
        TextBox1.Text = "Program's name is now: " & e.Name
    End Sub

End Class


<Serializable()> _    
Public Class DangerousProgram

    Private _appDomain As AppDomain …
Run Code Online (Sandbox Code Playgroud)

.net events appdomain event-handling

8
推荐指数
2
解决办法
5691
查看次数

使用Resharper时关闭Visual Studio建议?

我刚开始玩ReSharper,我想我知道为什么人们现在喜欢它:)

我正在使用Vs2008 TS并注意到我目前在编辑器中有2个建议:
一个来自VS的标准,另一个来自ReSharper ......

例如,当我进入以下内容时:

int a = CalculateMe ( 10 );
Run Code Online (Sandbox Code Playgroud)

(注意:还没有定义CalculateMe方法)
所以,我可以看到VS的"生成方法存根的选项(shift + Alt + F10"
和RS的"创建方法CalculateMe")

我只想看看ReSharper的建议(关闭VS的) - 这可能吗?

resharper refactoring visual-studio-2008

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

在ASP.NET中拒绝用户时,'CustomIdentity'上的SerializationException

我尝试在现有数据库的基础上实现ASP.NET身份验证和授权.我们有一个网站调用webservice来获取其数据.要使用Web服务,我需要提供用户名和密码.知道这一点,我决定实施IIdentity和IPrincipal来存储加密的密码,并能够在执行webservice调用时提供它.在将来,我们可能希望使用更多asp.net的内置安全性,因此我实现了成员资格和角色提供程序并覆盖了我需要的内容(ValidateUser和GetRoles)尽管在验证用户之后感谢会员提供商实现我仍然将自己的CustomIdentity设置为Context.User,以便能够在需要时检索其密码.

只要允许用户访问该页面,它就能正常工作.但是当用户被拒绝时,框架会在我的CustomIdentity上抛出序列化异常,而不是抛出AccessDeniedException.我发现了一个非常相似的行为,此链接中描述了更多细节,但没有回复.

我的例外情况与上面的链接完全相同


Type is not resolved for member'CW.CustomAuthentication.CWIdentity,CW.CustomAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.Serialization.SerializationException: Type is not resolved for member 'CW.CustomAuthentication.CWIdentity,CW.CustomAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of …
Run Code Online (Sandbox Code Playgroud)

serialization asp.net-membership iprincipal access-denied iidentity

8
推荐指数
2
解决办法
9238
查看次数

模糊事件不会在IE7和IE6中被触发

我有一个下拉菜单,单击一个div,显示列表.

在焦点上我应该隐藏列表(即当用户点击或关注某些其他元素而不是鼠标移出时).因此,我明显的选择是onblur.

现在JavaScript似乎在Firefox中工作,但在IE中却没有,因为我的div有一个指定高度和宽度的子div.这在测试文件中是可重现的.我正在使用jQuery.

这是Internet Explorer中的已知问题吗?什么是工作?

<html>
  <head>
    <title>Exploring IE</title>
    <style type="text/css">
      /** Exploring IE**/
      .selected_option div {height:18px;}
    </style> 
    <script type="text/javascript" src="jquery-1.3.2.min9919.js"></script>
    <script type="text/javascript">
      $().ready(function(){
        $('.selected_option').blur(function(){
          alert('blurred');
        });
      });
    </script>
  </head>
  <body>
    <div class="selected_option" tabindex="0">
      <div>anywhere in the page</div>
    </div>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)

javascript jquery internet-explorer onblur

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

在Eclipse 3.5(galileo)Mac Cocoa 64bit上安装Flex Builder插件

有没有办法让Flex Builder插件运行在Mac上运行的最新Eclipse?

我已经读过Cocoa/64位版本没有希望,但有些报道它适用于Carbon版本.

我需要Mac上的64bit/cocoa版本才能通过Eclipse IAM插件中的嵌入式maven支持访问JDK6库.

apache-flex eclipse-plugin

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

重新格式化SharePoint警报的内容和外观

是否可以重新格式化(内容和外观)Sharepoint 2007发送的警报电子邮件?如果是,如何定义格式和内容?

sharepoint sharepoint-2007

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

删除孩子不工作

我正在做一个网页.因为有一个下拉列表包含一些产品,当我们选择一个项目时,它会在下面显示动态删除按钮.我的问题是,产品被正确删除但是产品ID为5的产品没有被删除?有什么问题?以下是我的代码

<script type="text/javascript>
function validate(frm_name){
var hiddenFeild = document.getElementById('product');
var addedItems = hiddenFeild.value;
var brokenItems = addedItems.split(",");
    if(isEmpty(hiddenFeild.value)){
        alert("No Product Added.");
        return false;
    }
    if(brokenItems.length < 3){
        alert("Please Add One More Product.");
        return false;
    }
    return true;
}
function removeme(id){
compareDiv = document.getElementById('compare_product');
var remDiv = document.getElementById(id);
compareDiv.removeChild(remDiv);
var hiddenFeild = document.getElementById('product');
var addedItems = hiddenFeild.value;
var brokenItems = addedItems.split(",");
hiddenFeild.value = '';
for(var i = 0 ; i < brokenItems.length-1; i++){
    if(brokenItems[i] != id){
        hiddenFeild.value = hiddenFeild.value +brokenItems[i]+','; …
Run Code Online (Sandbox Code Playgroud)

html javascript

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

如何突出显示用户用Google搜索的网页上的字词?

我注意到某些网页确实突出了我用Google搜索的字词.

示例:尝试搜索"virtualbox"并转到VirtualBox页面.现在,"virtualbox"在该页面上突出显示.

我想在我的页面上做同样的事情.我怎么知道用户正在搜索的单词?

google-search

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

用于Mac的VisualStudio IDE最适合编程.NET/C#

我大部分时间在工作中使用我的Mac.在家里有我的Windows电脑,我用Visual Studio编程.NET/C#的东西.

因为我想在外面编程,所以为我的Mac安装一个等效的IDE会很棒.

在我的情况下哪个软件是具有相同功能的类似工作场所的最佳解决方案?

我更喜欢开源,但商业软件也可以.

.net c# ide macos

51
推荐指数
4
解决办法
12万
查看次数