问题列表 - 第16726页

每个配置文件只能出现一次!为什么?

我得到以下例外:"每个配置文件只能出现一次.请参阅帮助主题以了解异常."

我的配置文件如下所示:

<configSections>
    <sectionGroup name="point.System">
        <section name="singleInstanceCache"
            type="xyz.Point.System.Configuration.SingleInstanceCache, Point.System" />
    </sectionGroup>
    <sectionGroup name="point.Services">
        <sectionGroup name="xServices" type="xyz.Point.Messaging.PointServiceConfiguration.PointServices, Barcap.FIA.Point.Messaging">
            <section name="xService"
                type="xyz.Point.Messaging.PointServiceConfiguration.PointService, Barcap.FIA.Point.Messaging" />
        </sectionGroup>
    </sectionGroup>
</configSections>

<point.Services>
    <xServices>
        <xService name="Service1" type="IService" >
            <endpoints>
                <endpoint aliasName="incoming" endpointName="Subscriber"/>
                <endpoint aliasName="outgoing" endpointName="Publisher"/>
            </endpoints>
        </xService>
        <xService name="BlobService" type="IPortfolioService" >
            <endpoints>
                <endpoint aliasName="incoming" endpointName="Subscriber"/>
                <endpoint aliasName="outgoing" endpointName="Publisher"/>
            </endpoints>
        </xService>
    </xServices>
</point.Services>
Run Code Online (Sandbox Code Playgroud)

这是我加载它的代码:

public class PointServices : ConfigurationSection
{
    public static PointServices Get()
    {
        var t = (PointServices)ConfigurationManager.GetSection("point.Services/xServices");

        return null;
    }

    //<summary>
    //Declares a collection …
Run Code Online (Sandbox Code Playgroud)

c# configuration app-config configurationsection

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

抓取基于登录的网站的最佳方式是什么?

我要从网站自动化文件下载活动(类似于,比方说,yahoomail.com).要访问具有此文件下载链接的页面,我要登录,从页面跳转到页面以提供日期等参数,最后单击下载链接.

我在考虑三种方法:

  1. 使用WatIN并开发一个Windows服务,定期执行一些WatiN代码遍历页面并下载文件.

  2. 使用AutoIT(没什么好主意)

  3. 使用简单的HTML解析技术(这里有几个问题,例如,如何在登录后维护会话?如何在执行后退出?

c# python watin web-crawler html-parsing

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

是否可以在ajax调用中指定端口

我正在尝试使用jQuery在特定端口上运行AJAX查询:

$(document).ready(function() {
        $.ajax({
        url: "http://test_serve:666/test.php",

        type: "GET",
        data: ({value_test: 'true'}),
        dataType: "html"

    });
})
Run Code Online (Sandbox Code Playgroud)

这不起作用:没有进行AJAX调用,我在Firebug中没有任何异常.如果我没有指定端口,它确实有效.有谁知道为什么?

ajax jquery

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

如何检测Android ListView滚动停止?

我想OnScrollListener#onScrollStateChanged(SCROLL_STATE_IDLE)在滚动停止后做一些事情.所以,我尝试使用来检测滚动停止的时间(或者TOUCH_SCROLL or FLING)(在1.5时它按预期运行).但是当它在2.0上运行时,onScrollStateChanged在释放finger之后无法接收到该事件.是否有任何回调或者无论如何都要检测到该事件?

android listview scroll

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

Erlang DETS有多大,如果它太小,该怎么办?

我需要的只是Erlang中的一个大型持久查找表,而dets似乎就是这样的东西,虽然我需要一个明确的答案:

  • 表中二进制文件的总大小可以是多大.
  • 每个条目有多大
  • 如果第一个问题的答案小于100G该怎么办

erlang dets

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

从Eclipse菜单窗口 - >显示视图中删除视图名称

我需要从Window-> Show View菜单中删除我创建的视图的名称/快捷方式,并将它们添加为单独的菜单.

有没有办法从Window-> Show View菜单中隐藏/删除它的条目.

eclipse plugins view

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

好的,这很有效.究竟是什么?

我刚刚从一个网站上提取了这个片段,事实证明这正是我特定问题所需的解决方案.

我不知道它是什么(特别是委托和返回部分),并且消息来源没有解释它.

希望SO可以启发我.

myList.Sort(  delegate(KeyValuePair<String, Int32> x, KeyValuePair<String, Int32> y) 
              { 
                return x.Value.CompareTo(y.Value); 
              }
            );
Run Code Online (Sandbox Code Playgroud)

c# list anonymous-methods

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

为什么要取消分配此对象?

我正在开发一个iPhone应用程序,我正试图将视图推入导航控制器,我之前做了很多次,但是,我对这个特定的应用程序有一些问题.我有一个表视图,当用户选择一行时,新视图被推入控制器:

DataWrapper *row=[[self.rows objectAtIndex:[indexPath section]] objectAtIndex:[indexPath row]];
DataViewController *nextController=[[DataViewController alloc] initWithNibName:@"Data" bundle:[NSBundle mainBundle]];
[nextController setInfo:row];
[nextController setRow:[indexPath row]];
[nextController setParent:self];
[self.navigationController pushViewController:nextController animated:YES];
[nextController release];
Run Code Online (Sandbox Code Playgroud)

它很顺利,直到用户点击后退按钮,我得到一个例外,并使用NSZombieEnabled得到这个:

-[DataViewController respondsToSelector:]: message sent to deallocated instance 0x4637a00
Run Code Online (Sandbox Code Playgroud)

所以我试图删除[nextController release],事实上它工作,但为什么???? 我分配了nextController,所以我应该发布它,对吧?如果有类似这样的东西,我觉得发布这个应用程序是不对的,我觉得它会失败.请让我知道你的想法.

iphone memory-management exception objective-c

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

Java .getText与Hard Coded String不返回相同的结果

我完全被这个困扰了...

如果我使用以下内容调用以下函数:

搜索(SearchTextField.getText()); //(输入玻璃纤维)

搜索( "玻璃纤维"); //硬编码

我得到以下结果:

玻璃纤维10不在这里

发现玻璃纤维10串!

相同的String传递的长度相同,结果不同.怎么会这样?是的我在==的两边修剪它没有运气.

我在失去理智,任何帮助都会受到赞赏.

Test[] array = new Test[3];
array[0] = new RowBoat("Wood", "Oars", 10);
array[1] = new PowerBoat("Fiberglass", "Outboard", 35);
array[2] = new SailBoat("Composite", "Sail", 40);




    public void Search(String searchString) {

    boolean found = false;
    System.out.print(searchString + " " + searchString.length() + " ");

    for (int i = 0; i < array.length; i++) {

        if (searchString == array[i].getBoatMaterial()) {
            found = true;
            break;
        }
    }
    if (found) {
        System.out.println("String found!");
    } …
Run Code Online (Sandbox Code Playgroud)

java arrays swing

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

如何在stackoverflow.com上创建页面顶部的搜索栏?

我需要在页面顶部设置搜索栏,例如stackoverflow.com在其网站中.我需要一些jsp/servlet的示例代码来执行搜索操作.在搜索栏中写一些内容时它提供了什么操作.我想只搜索我的网站.

请给我一些想法......

谢谢

jsp servlets

-5
推荐指数
2
解决办法
2914
查看次数