小编Ami*_*ble的帖子

从客户端运行EXE

我需要从客户端运行exe文件.Exe文件存在于我的C:\ Directory中.我需要从我的WEB站点运行这个exe文件.

我该怎么办呢?

client exe

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

谷歌应用引擎运行可执行文件

是否可以在谷歌应用引擎中运行可执行文件?喜欢使用Runtime.exec?

谷歌应用引擎文档中有白名单列出了可以使用的类,但没有指定类中的函数/.

google-app-engine executable file whitelist

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

仅在调试版本上使用UIFileSharingEnabled

我正在寻找一种方法来只为调试变体启用UIFileSharingEnabled标志 - 所以我可以更改文档文件夹的内容 - 但我不希望最终用户做同样的事情.

我想我可以使用运行脚本来执行此操作,但不确定如何将活动配置名称添加到脚本中.

xcode ios

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

在Ubuntu中使用./运行二进制文件

我决定学习C++(我在C中编写程序),我一直在阅读一些教程(以及Stack Overflow上的大量帖子).好的,所以我输入标准的C++"hello word",在我的Ubuntu机器上用GCC编译为"test".

然后我尝试通过输入"test"并按Enter键来运行它.没有.事实证明我必须用"./test"运行它.好的,好的,我会从现在开始这样做.但为什么?"./"只是说我应该运行的是当前目录...当操作系统搜索要运行的东西时,当前目录不总是PATH的一部分吗?我可以这样做吗?

linux

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

在ASP.NET中运行shell命令

我如何在asp.net中运行shell命令?

我基本上想要的东西system("netstat -an");

我不希望输出显示给用户.只想运行一些维护命令.

.net c# asp.net shell

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

从 VBA (Excel) 执行内置函数

我需要能够从 VBA (MS Excel) 执行任何类型的内置函数(例如“sum”或“len”)。

我的限制之一是我不能将单元格范围作为参数传递给这些函数。相反,我应该能够使用严格的值。

我希望能够使用以下表达式 SUM(1, 2) ,它应该返回 3,而以下版本 SUM("A1:A2") 对我不起作用。

我设法开发了一些函数来解析我之前的输入并使其包含一个值列表(例如上面的示例,它使用户输入的“A1:A2”看起来像一个由两个值组成的数字数组)。

那么,任何人都可以给我一个使用接收值列表(而不仅仅是单元格范围)的内置函数的示例吗?

我尝试了以下代码,但由于某种未知的原因,我无法让它工作(我不断收到 1004 错误,说:无法运行宏“SUM”。该宏可能在此工作簿或所有工作簿中不可用)宏可能被禁用。):

Application.Run "SUM", 2, 2
Run Code Online (Sandbox Code Playgroud)

一些有助于找到解决此问题的宝贵建议将不胜感激。

excel vba evaluate

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

.NET DLLs冲突

我已经为一些Sharepoint WSS3功能制作了测试程序,但我遇到了一个奇怪的例外.

public XmlNode GetListsCollection()
{
    XmlNode nodeLists;

    ShareLists.Lists lists = new ShareLists.Lists(); // <--- Exception causing line
    lists.Credentials = CredentialCache.DefaultCredentials;

    return nodeLists = lists.GetListCollection();
}
Run Code Online (Sandbox Code Playgroud)

//这里出现异常(Settings.Designer.cs)

[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
[global::System.Configuration.DefaultSettingValueAttribute("http://uk-tr-dsf/_vti_bin/Lists.asmx")]
public string SharepointWeb_ShareLists_Lists {
    get {
        return ((string)(this["SharepointWeb_ShareLists_Lists"]));
    }
}
Run Code Online (Sandbox Code Playgroud)

当我将项目从.NET 4更改为.NET 3.5时发生此错误,这是修复"PlatformNotSupportException"所必需的.

所以我无法改回来.

System.Configuration.ConfigurationErrorsException was unhandled
  Message=An error occurred creating the configuration section handler for applicationSettings/SharepointWeb.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. …
Run Code Online (Sandbox Code Playgroud)

.net c# sharepoint .net-3.5

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

如何在默认应用程序中从 Notepad++ 运行当前打开的文件?

我正在编辑 JSFL 文件,我想在保存它们后快速运行它们。

是否可以将 Notepad++ 配置为使用键盘快捷键在其默认应用程序中打开当前文件(正在编辑)?(在本例中为 Adob​​e Flash Pro CS6)。

如果可以有一个足够通用的运行命令作为“在默认应用程序中运行”操作,而不是必须将每个单独的文件类型配置为各自的默认应用程序,那将是最好的解决方案。

有任何想法吗?

default notepad++

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

twisted使用进程

我正在学习使用twisted(最新的12.3.0版本),作为一种为移动应用程序进行简单服务器端处理的方法.

我的第一个主要是在日志文件上运行'tail'命令,并将后处理的找到的行传递给移动应用程序.那应该很容易......

现在在TwistedMatrix网站上的文档中有一个"使用进程"页面,我在其中获得以下代码:


from twisted.internet import protocol, utils, reactor
from twisted.python import failure
from cStringIO import StringIO

class CommandRunner(protocol.Protocol):

    #command = "ls /"
    command = "tail -n 100 /var/log/system.log"

    def connectionMade(self):
        output = utils.getProcessOutput(self.command)
        output.addCallbacks(self.writeResponse, self.noResponse)

    def writeResponse(self, resp):
        self.transport.write(resp)
        self.transport.loseConnection()

    def noResponse(self, err):

        print err
        self.transport.write("Houston, we have an error!\n")
        self.transport.loseConnection()


if __name__ == '__main__':
    f = protocol.Factory()
    f.protocol = CommandRunner
    reactor.listenTCP(10999, f)
    reactor.run()
Run Code Online (Sandbox Code Playgroud)

它与"简单易行"下的已发布代码片段的99.9%完全相同.唯一的变化是扭曲应该执行的shell命令(在我的Mac上我似乎没有fortune命令).

当我尝试使用telnet从第二个终端连接10999端口时启动示例代码后,我收到此错误:

[失败实例:回溯(没有帧失败)::得到了stderr:'在execvpe tail -n 100 /var/log/system.log [\'tail -n 100 /var/log/system.log \']中环境ID 4315532016 \n:Traceback(最近一次调用最后一次):\n文件"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.3.0-py2.7 -macosx-10.6-intel.egg/twisted/internet/process.py",第420行,在_fork …

process twisted

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

在多个条件下比较列表

public class ConsumableThreshold
{
    public int ThresholdType { get; set; }
    public int ManufacturerID { get; set; }
    public int ModelID { get; set; }
    public int ConsumableVariantID { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

我正在尝试检查共享属性的两个对象列表.我需要根据以前的比赛结果检查各种其他属性.

例如,如果ThresholdType匹配,那么我需要检查第二个属性,如果匹配,我需要检查ModelID.

我有这个查询,它有效地做了我想要的但是它有问题主要是我进一步向下钻,可读性将会降低.

var query= existingThresholds.Where(
    e => defaultThresholds.Any(
        d => d.ThresholdType == e.ThresholdType)).Where(
             e => defaultThresholds.Any(
                d => d.ManufacturerID == e.ManufacturerID)).ToList();
Run Code Online (Sandbox Code Playgroud)

我想这样做join但它不支持&&运营商.

var query2 = from e in existingThresholds
             join d in defaultThresholdson 
             e.ThresholdType equals d.ThresholdType &&
             e.ManufacturerID equals d.ManufacturerID
             select e; …
Run Code Online (Sandbox Code Playgroud)

c# linq

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