问题列表 - 第29500页

没有重启服务器重启应用程序?

有没有办法重新启动ColdFusion应用程序而无需重新启动整个服务器?

在服务器上运行两个ColdFusion应用程序,我只想重新启动其中一个.

coldfusion

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

在vim中以制表符分隔的文本文件中重新排列列的最佳方法是什么?

我已经知道如何做到这一点

:%s/\(\S\+\)^I\(\S\+\)/\2^I\1/
Run Code Online (Sandbox Code Playgroud)

但我觉得我正在输入很多东西.有更干净,更快捷的方法吗?

vim

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

按钮单击事件Ext JS

我有简单的形式:

   myForm = new Ext.form.FormPanel({
      width:'100%',
      frame:false,
      items: [
         new Ext.form.TextArea({
            id:'notes',
  name: 'notes',
  hideLabel: true,
            width:350,
            height:200
         })
      ],
      buttons: [
         {
    text:"Save",
    click: function (b,e) {
     alert('x');
    }
  }
      ]
   });
Run Code Online (Sandbox Code Playgroud)

但是我无法使按钮的单击事件生效.按以下方式创建的按钮是否具有与Ext.Button相同的功能?

javascript extjs

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

C#比较不同大小写的字符串

我正在读一个用户名,然后检查是否存在于另一个数据库表中,问题是虽然用户名是相同的,但情况可能不同,并阻止它找到匹配示例jsmith和JSmith或JSMITH.

我怎样才能解决这个问题?我应该在写入第一个数据库时降低大小写,还是在我比较这两个数据库时可以改变下面的代码?

drUser["Enrolled"] = 
    (enrolledUsers.FindIndex(x => x.Username == (string)drUser["Username"]) != -1);
Run Code Online (Sandbox Code Playgroud)

更新:

仍在努力解决这个问题,下面的代码编译但没有给出正确的结果,在查看注册用户时,我看到那些未注册的用户,在查看未注册的用户时,我看到1已注册,但他们的用户名案例是在每个数据库中都相同.我是否正确格式化了下面的代码?

drUser["Enrolled"] = (enrolledUsers.FindIndex(x => x.Username.Equals((string)drUser["Username"], StringComparison.OrdinalIgnoreCase)));
Run Code Online (Sandbox Code Playgroud)

谢谢杰米

c# string comparison case-insensitive

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

如何防止Ext JS使用restful商店在DELETE请求中包含实体主体?

当Ext JS从restful商店发出DELETE请求时,它包含一个实体主体.虽然HTTP规范似乎没有禁止这样,但Google App Engine不接受此类请求.所以我想知道是否有办法阻止Restful商店在DELETE请求中包含冗余实体主体.

细节:

使用此示例作为参考:http: //www.sencha.com/deploy/dev/examples/restful/restful.html

这就是商店的定义方式:

var store = new Ext.data.Store({
    id: 'user',
    restful: true,     // <-- This Store is RESTful
    proxy: proxy,
    reader: reader,
    writer: writer
});
Run Code Online (Sandbox Code Playgroud)

按下"删除"按钮后,这是Ext JS发送的请求:

DELETE http://www.sencha.com/deploy/dev/examples/restful/app.php/users/6 HTTP/1.1
Host: www.sencha.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; pt-BR; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-br,pt;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://www.sencha.com/deploy/dev/examples/restful/restful.html
Content-Length: 10
Cookie: bb_sessionhash=8d75f5e42d576fb695a02bf1d24c9ff1; …
Run Code Online (Sandbox Code Playgroud)

rest extjs

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

什么是C++中错误处理的正确方法

一种是使用C++异常:尝试catch块.但是,当引发异常时,释放动态内存将成为一个问题.

第二种是使用C风格:errno变量

第三个是在错误时返回-1,在成功时返回0 :)

应该选择哪种方式进行中型项目?为什么?还有其他更好的方法..?

c++ error-handling

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

从Word发送带有VBA的HTTP请求

我正在尝试将Word文档中的数据发送到网页.我找到了一些代码,将其粘贴到一个新模块中并保存.当我运行它时,我得到"编译错误,用户定义的类型未定义"

我的代码:

Sub http()

  Dim MyRequest As New WinHttpRequest

    MyRequest.Open "GET", _
    "http://www.google.com"

    ' Send Request.
    MyRequest.Send

    'And we get this response
    MsgBox MyRequest.ResponseText

End Sub
Run Code Online (Sandbox Code Playgroud)

vba ms-word httprequest

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

这个c ++反向字符串函数有什么问题

void reverse (char s[]){
int len = strlen(s);
int j = len - 1;
for (int i = 0; i < j; i++,j--){
    cout << s[i];
    char ch = s[i];
    s[i] = s[j]; //error line - giving exception, cannot write to the memory
    s[j] = ch;
    }
}
Run Code Online (Sandbox Code Playgroud)

我正在使用Visual Studion 2008,我无法理解这里的问题是什么..:s ..我没有C++实践:$.

c++ string

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

SQL查询连接问题

如何针对以下情况进行SQL查询?假设您有两个表:table1和table2,其中table1中的每个条目在table2中可以有多个对应的条目.我想要的查询的伪代码是:

for each $row in table1
   $rows = find all rows in table2 that corresponds to $row with $row.id == table2.foreign_id
   # $rows is an array of corresponding row in table2
   if all rows in $rows meet some condition 
   then 
     return $row
   else
     continue
   end
end
Run Code Online (Sandbox Code Playgroud)

编辑:注意在上面的伪代码中,我只希望table1中的行在TABLE2中具有满足某些条件的所有关系,而不仅仅是table1中的某些条件.

PS:我想在SQL中这样做,因为我可能会遇到效率问题.

非常感谢.

mysql sql

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

在使用SqlDataAdpater.Update()之前是否需要调用SqlCommandBuilder.GetUpdateCommand()?

当我使用一个SqlCommandBuilder推更新/插入/删除服务器,我需要打电话.GetUpdateCommand(),.GetInsertCommand().GetDeleteCommand()

using (var adapter = new SqlDataAdapter("select * from MyTable", _connection))
using (var builder = new SqlCommandBuilder(adapter))
{
    adapter.Fill(dt);

    //Magic happens        

    builder.GetUpdateCommand(); //is this line necessary
    builder.GetInsertCommand(); //is this line necessary
    adapter.Update(dt);
}
Run Code Online (Sandbox Code Playgroud)

我看到有关正确程序的相互矛盾的 例子.我知道没有它可行,但我不知道它是否在幕后做了一些特别的事情.这是必要的还是货物编程?

c# sqlcommandbuilder

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