小编GS *_*ica的帖子

如何从命令行为 Borland C++ Builder 5 构建项目文件和包?

如何从命令行构建 Borland C++ 项目文件 (bpr) 和包文件 (bpk)?项目组(bpg)显然是 make 文件,可以使用 make 进行编译。但 bpks 和 bprs 是基于 xml 的,导出到 Makefile 无法使用 make 进行编译。如果我将项目放入 bpg 中,make 似乎无法找到 bpg 中指定的任何文件,因为它们似乎都是相对引用。我更改了对绝对值的引用并生成报告: Fatal: Unable to open makefile

command-line c++builder

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

为什么尾部调用优化需要垃圾收集?

为什么尾部调用优化需要垃圾收集?是因为如果你在一个你想要进行尾调用的函数中分配内存,那么就没有办法进行尾调用并重新获得那个内存?(因此必须保存堆栈,以便在尾调用后,可以回收内存.)

garbage-collection programming-languages tail-call-optimization

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

Haskell范围错误

formatBill :: BillType -> String
formatBill bill = merge' [pname ++ dots ++ show pprice | (pname, pprice) <- bill]
    where
    dots = ['.' | x<-[1..(lineLength - length pname - length (show pprice))]]
Run Code Online (Sandbox Code Playgroud)

这是我的代码 - formatBill是一个必须返回的函数String.

它应该返回的一个例子:

Product name.................. PRICE
Other product................. 4555
Run Code Online (Sandbox Code Playgroud)

merge' 只是 [String] -> String

type BillType = [(String, Int)] -- BillType definition
lineLength = 30 -- length of row
Run Code Online (Sandbox Code Playgroud)

这些是我得到的错误:

code.hs:69:51:不在范围内:`pname'

code.hs:69:72:不在范围内:`pprice'

haskell

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

使用p4api.net,我无法加载p4bridge.dll

使用p4api.net,我无法加载p4bridge.dll.

我无法将其添加为解决方案的参考,而不会收到以下错误:

在此输入图像描述

如果我不包含它,我会得到以下运行时异常:

测试方法CFTT.Business.Test.GeneralTests.ddddd抛出异常:System.DllNotFoundException:无法加载DLL"p4bridge.dll":指定的模块找不到.(来自HRESULT的异常:0x8007007E)

如果我手动将DLL复制到构建输出目录没有明确提到它我也得到得到上面的错误,虽然我跑这个扔了单元测试,所以它可能是一个侧路径荷兰国际集团的问题.

以上是32位,如果我尝试使用64位(我宁愿),我也得到与p4bridge.dll相同的错误,但在运行时,我得到:

测试方法CFTT.Business.Test.GeneralTests.ddddd抛出异常:System.BadImageFormatException:无法加载文件或程序集"p4api.net,版本= 2013.2.66.1822,文化=中性公钥= f6b9b9d036c873e1"或它的一个依赖.尝试加载格式不正确的程序.

有没有人有这些问题的经验?

c# perforce p4api.net

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

无法将bool转换为IO Bool

我正在尝试做一个返回true或false的函数.

owlFile = ".+\\.owl"

testOwlFile src = src =~ owlFile :: Bool

我需要在我的阻止上使用:

main = do
       [src] <- getArgs
       resTestOwlFile <- testOwlFile
       if resTestOwlFile
            then do ontology <- runX(readDocument [withValidate no,withRemoveWS yes ] src >>> getontology)
            else print "error"
Run Code Online (Sandbox Code Playgroud)

但我有一个错误 Couldn't match excepted type IO BOOL with actual type Bool In the return type of a call of "testOwlFile"

我该怎么办?

haskell

0
推荐指数
2
解决办法
978
查看次数

程序在64位系统中崩溃

以下代码在64位系统中崩溃.如果文件名长度小于3,则发生下溢'len'.但是该程序在32位系统中没有显示任何分段错误.但我在64位系统中遇到分段故障.为什么这个程序在32位系统中没有显示任何分段错误?

 DIR * dirp = opendir(dirPath);
 struct dirent * dp;
 while(dirp)
 {
   if((dp = readdir(dirp)) != NULL)
   {
    unsigned int len = strlen(dp->d_name);
    //underflow happens if filename length less than 3
    if((dp->d_name[len - 3] == 'j'))
    }
  }
Run Code Online (Sandbox Code Playgroud)

c c++ gdb

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

将数组转换为字符串然后返回数组

我建立了一个presenter类,其唯一的工作就是将给定的数组转换为字符串。我正在测试解决方案的驱动程序,因此我从开始做起,"[nil, nil, nil]"nil最终每个都将替换为letter。该功能由另一个类处理。

我现在正在尝试构建一个接口,其唯一的工作就是将该字符串转换回数组。因此,我需要将例如转换"[\"a\", \"b\", nil]"["a", "b", nil]。但是我被困住了。

例如,我想转换

"[nil, nil, nil]"
Run Code Online (Sandbox Code Playgroud)

 [nil, nil, nil]
Run Code Online (Sandbox Code Playgroud)

我该怎么办?

ruby arrays string

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