小编Ton*_*ony的帖子

访问Web服务的客户端的传入IP地址

我有一个Web服务(WCF)并在IIS中配置它.现在,有什么办法可以看到客户端尝试访问Web服务的IP地址(传入)吗?

谢谢.

iis wcf

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

SQL选择多个where子句

我正在尝试创建SQL Select,它根据字段返回某个字段的计数.所以,这就是我想要做的.

Select count(distinct id) as TotalCount, -- this will be the total of id
count(distinct id where type='A') as TotalA, -- this will be total when type='A'
count(distinct id where type='B') as TotalB -- This will be total when type = 'B'
from MyTable 
Run Code Online (Sandbox Code Playgroud)

基本上,TotalCount = TotalA + TotalB.

如何在SQL Select语句中实现此目的?谢谢.

sql sql-server

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

选择Where子句

我在SQL Server中进行选择并说我的Select正在拉这样的数据,

ID Col1 Col2 Col3 Col4
1   xx   xx   xx   xx
2   null null null null
3   xx   xx   null null
Run Code Online (Sandbox Code Playgroud)

我只想要那些并非所有行都是Null的记录.在上面的记录中,我不希望ID为2的行.

我怎么能在where子句中这样做?

谢谢.

sql-server

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

NServiceBus队列概念

刚开始学习NServiceBus并试图理解这个概念.当谈到队列时,我们是否在谈论发布者和订阅者的MSMQ?因此,如果我有一个生成某个事物列表的应用程序(比如动物名称),那么它会将列表转储到发布者的队列中.发布者每分钟轮询一次队列,如果队列中有某些内容,它将发布到订阅者的队列以进行进一步处理.这有意义吗?

谢谢.

nservicebus

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

不同数据库的存储过程

我可以使用存储过程从不同的数据库中选择记录(在SQL中)吗?我有一个来自每个数据库的表,我想加入它们.

谢谢.

sql-server

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

在Eclipse中共享java文件

我正在使用Eclipse开发Java程序.如果我想与其他人(也使用Eclipse)共享代码(Java文件),那么最简单的方法是什么?我们还没有设置源存储库.

java eclipse file

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

删除并将文件移动到java中的目录

我试图使用java中的renameTo()将文件从一个目录移动到另一个目录,但是renameTo不起作用(不重命名和移动文件).基本上,我想首先使用相同的文件名删除文件,然后将文件从anoter目录复制到我最初删除文件的同一位置,然后复制具有相同名称的新文件.

    //filePath = location of original file with file name appended. ex: C:\Dir\file.txt
    //tempPath = Location of file that I want to replace it to file file without the file name.  ex: C:\AnotherDir

    int pos = filePath.indexOf("C:\\Dir\\file.txt");
    //Parse out only the path, so just C:\\Dir
    String newFilePath = filePath.substring(0,pos-1);

    //I want to delete the original file
    File deletefile = new File(newFilePath,"file.txt");

    if (deletefile.exists()) {
        success = deletefile.delete();
    }


    //There is file already exists in the directory, but I am just …
Run Code Online (Sandbox Code Playgroud)

java file-io

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

正则表达式解析java中的字符串

我在java中编写一个简单的正则表达式,由于某些原因我的regx无效.

我想要实现的是解析一个字符串,

  • 从9号开始
  • 正好有10位数(包括前缀9)

我的正则表达式是(^9\\d[0-9]{10}),我想解析作为一个例子,91234567890.但它不起作用.

java regex

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

标签 统计

java ×3

sql-server ×3

eclipse ×1

file ×1

file-io ×1

iis ×1

nservicebus ×1

regex ×1

sql ×1

wcf ×1