问题列表 - 第11039页

修改Git Diff文件

大约6个月前,我们分拆了主要项目.在那个时候,主分支已经添加或删除了100,000多行代码.另一方面,我们添加或更改了大约50,000行代码.它目前合并的时间,所以我们制作了分支A的副本,并将其分支B中的变化合并到其中并将其称为分支C.

现在我们想要在分支C中进行所有合并更改并将其合并回原始分支A.但是我们希望能够安全地防止出现可怕的错误,因此我们希望使用preproccesor启用它或根据我们的禁用它产品发布测试版或发布版.

例如.

#if _BETA_CODE
....他们的新代码.(合并)
#else
...我们的旧代码.
#万一

有没有人知道一个工具可以采用两个项目的差异(分支A和beta分支C)并将它们合并在一起,但使用#ifdef #else #endif命令标记更改?

c c++ git diff

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

.htm vs .html

我应该为HTML文件选择哪个扩展名?为什么?

html file-extension naming-conventions

195
推荐指数
7
解决办法
10万
查看次数

Rails路由和URI片段标识符

当我使用一些基本教程开发我的RoR技能时遇到了问题.我想要实现的是拥有属于帖子的评论,没有单独的索引或个人视图.这部分很简单.

这是艰难的一个.我想post_comment_url片段标识符返回地址:http://example.com/posts/2#comment-4.它允许我使用redirect_to它最简单的形式,没有:anchor参数(这将违背红宝石的方式保持简单).

怎么做?

routing ruby-on-rails

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

在C#中继承并使用覆盖函数Y()调用base.X()

我需要了解C#中的继承性.我有一个如下所示的课程:

Class BaseClass
{
    public void X()
    {
        //Some code here
        Y();
    }

    public void Y()
    {
        //Some code here
    }
}
Run Code Online (Sandbox Code Playgroud)

现在我想创建另一个派生自BaseClass的类(ChildClass).问题是我想以某种方式覆盖ChildClass中的Y()函数,并且当调用base.X()函数时,我希望X()函数在ChildClass中使用重写的Y()函数.

有人建议我在覆盖时使用'delegate'关键字作为Y函数.但是,我不太确定这会起作用.

这可能吗?有什么建议?

c# inheritance

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

捕获活动窗口的截图?

我正在制作一个屏幕截图应用程序,一切都很顺利.我需要做的就是捕获活动窗口并截取此活动窗口的屏幕截图.有谁知道我怎么做到这一点?

c# screenshot active-window

163
推荐指数
7
解决办法
28万
查看次数

WCF:maxConcurrentCalls已经用尽了

我正在对在某个时刻挂起的WCF服务进行故障排除.服务行为如下:

[ServiceBehavior( InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple )]
Run Code Online (Sandbox Code Playgroud)

限制参数是:

<serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="50" maxConcurrentInstances="50" />
Run Code Online (Sandbox Code Playgroud)

以下是从挂起转储中获取的服务状态:

0:000> !mdt 0000000000c9f270 -r
0000000000c9f270 (System.ServiceModel.Dispatcher.ServiceThrottle)
   calls:0000000000c9f3d8 (System.ServiceModel.Dispatcher.FlowThrottle)
      capacity:0x32 (System.Int32)
      count:0x32 (System.Int32)
      mutex:0000000000c9f418 (System.Object)
         <NO FIELDS>
      release:0000000000c9f398 (System.Threading.WaitCallback)
         _target:0000000000c9f270 (System.ServiceModel.Dispatcher.ServiceThrottle)
            <RECURSIVE>
         _methodBase:NULL (System.Reflection.MethodBase)
         _methodPtr:0000064273dddf30 (System.IntPtr)
         _methodPtrAux:0000000000000000 (System.IntPtr)
         _invocationList:NULL (System.Object)
         _invocationCount:0000000000000000 (System.IntPtr)
         <NO FIELDS>
      waiters:0000000000c9f430 (System.Collections.Generic.Queue`1[[System.Object, mscorlib]])
         _array:0000000028d73e70 (System.Object[], Elements: 16)
         _head:0x1 (System.Int32)
         _tail:0xA (System.Int32)
         _size:0x9 (System.Int32)
         _version:0x22 (System.Int32)
         _syncRoot:NULL (System.Object)
      propertyName:0000000000c9f2b8 (System.String: "MaxConcurrentCalls")
      configName:0000000000c9f358 (System.String: "maxConcurrentCalls")
   sessions:0000000000c9f508 (System.ServiceModel.Dispatcher.FlowThrottle)
      capacity:0x32 (System.Int32)
      count:0x9 (System.Int32)

....

   instanceContexts:000000000105ffc8 …
Run Code Online (Sandbox Code Playgroud)

performance wcf

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

在JAX-WS中编组多态对象

我正在创建一个JAX-WS类型的Web服务,其操作返回一个对象WebServiceReply.WebServiceReply类本身包含Object类型的字段.根据操作,各个操作将使用几种不同的数据类型填充该字段.

发布WSDL(我正在使用Netbeans 6.7),并获得一个ASP.NET应用程序来检索和解析WSDL很好,但是当我尝试调用一个操作时,我会收到以下异常:

javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: class [LDataObject.Patient; nor any of its super class is known to this context.]
Run Code Online (Sandbox Code Playgroud)

如何在DataObject.Patient类中标记注释,以及WebServiceReply类以使其工作?我无法根据目标类中的注释来编组关于编组的权威资源,所以如果有人能够指出我也会很好.

WebServiceReply.java

@XmlRootElement(name="WebServiceReply")
public class WebServiceReply {


    private Object returnedObject;
    private String returnedType;
    private String message;
    private String errorMessage;

    .......... // Getters and setters follow

}
Run Code Online (Sandbox Code Playgroud)

DataObject.Patient.java

@XmlRootElement(name="Patient")

public class Patient {

    private int uid;
    private Date versionDateTime;
    private String name;
    private String identityNumber;

    private List<Address> addressList;
    private List<ContactNumber> contactNumberList;
    private List<Appointment> appointmentList;
    private List<Case> caseList;
} …
Run Code Online (Sandbox Code Playgroud)

java web-services jax-ws jaxb

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

Visual C++浏览信息

我试图弄清楚浏览信息(.sbr文件)的用途,但只查找引用如何创建它.那有什么用呢?

谢谢迪马

visual-studio visual-c++ browse-information

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

具有多个选择的WPF TreeView

标准WPF 树视图不支持多个选择.

如何添加支持多个选择的树视图到我的WPF应用程序?商业产品很好(我目前知道一个商业实施 - http://www.telerik.com/products/wpf/treeview.aspx)

wpf treeview multi-select

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

单击时如何更改SlidingDrawer句柄上的图标

我试图打开滑动抽屉时试图改变手柄上的图标.当我从视图中提取句柄并设置onclicklistener或ontouchlistener时,似乎永远不会获得trigget.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    SlidingDrawer drawer = (SlidingDrawer)findViewById(R.id.drawer_landscape);

    ImageView handle = (ImageView)findViewById(R.id.handle_l);
    handle.setFocusable(true);

    handle.setOnClickListener(new OnClickListener(){


        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            Log.i("test","onClick");
        }

    });


}
Run Code Online (Sandbox Code Playgroud)

还有我的XML

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:id="@+id/base_frame_layout"
     android:layout_gravity="bottom"
     >        
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
        <TextView  
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:text="@string/hello"
            />
    </LinearLayout>

        <SlidingDrawer
             android:id="@+id/drawer_landscape"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:handle="@+id/handle_l"
             android:content="@+id/content"
             android:orientation="vertical"
             android:visibility="visible"
        >

            <ImageView
                android:id="@+id/handle_l"
                android:layout_height="50px"
                android:layout_width="64px"
                android:padding="0px"
                android:src="@drawable/icon"
            />

            <TextView
                android:id="@+id/content" 
                android:text="content" 
                android:layout_height="50px"
                android:layout_width="64px"
            />                  

         </SlidingDrawer>       

</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

我希望这段代码应该记录"onClick"消息,但事实并非如此.

有任何想法吗?

android slider

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