问题列表 - 第20555页

无法打开应用程序,因为缺少可执行文件

我有一个我已经开发了一段时间的应用程序.最近通过双击启动应用程序会显示一个对话框,显示"您无法打开应用程序RepoWatch,因为它可能已损坏或不完整."

通过打开./RepoWatch.app启动应用程序让我"无法打开应用程序,因为它的可执行文件丢失了."

我通常通过./RepoWatch.app/Contents/MacOS/RepoWatch启动应用程序只是出于习惯(工作正常),所以我不确定这种情况发生了多长时间,或者事先发生了什么变化.最可能的变化是我放入cp Info.plist ./RepoWatch.app/Contents/我的make文件以便版本Info.plist而不对.app包中的所有内容进行版本控制.

我多次查看Info.plist并且找不到任何错误.该文件使用Property List Editor打开,没有任何错误.从属性列表编辑器保存不会使文件"工作"(如果首先要责备它).

据我所知,权限看起来也很健全:

$ ls -l
./RepoWatch.app/Contents/Info.plist
-rw-rw-r--@ 1 dgrace  staff  789 Feb  1 23:20 ./RepoWatch.app/Contents/Info.plist
$ ls -l
/Applications/Adium.app/Contents/Info.plist
-rw-rw-r--  1 dgrace  staff 5750 Aug 21 15:41 /Applications/Adium.app/Contents/Info.plist
Run Code Online (Sandbox Code Playgroud)

我不知道下一步该尝试什么.

以下是Info.plist的内容(尽管在很长一段时间内没有真正改变):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>RepoWatch</string>
    <key>CFBundleIdentifier</key>
    <string>com.doomstick.RepoWatch</string>
    <key>CFBundleName</key>
    <string>RepoWatch</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>LSMinimumSystemVersion</key>
    <string>10.6</string>
    <key>CFBundleVersion</key>
    <string>Beta26</string>
    <key>NSMainNibFile</key>
    <string>MainMenu</string>
    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud)

macos cocoa objective-c osx-snow-leopard

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

如何更改putty中的提示

当我在服务器上启动putty时,我得到如下提示:

hpbl802!benjaminb:~ [22]>
Run Code Online (Sandbox Code Playgroud)

如何将此提示更改为

benjamin:~ [22]>
Run Code Online (Sandbox Code Playgroud)

unix shell prompt

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

如何在PLT Scheme中打印结构以显示其字段?

我想这样的代码:

(define-struct thing (a b c))
(define th (make-thing 1 2 3))
Run Code Online (Sandbox Code Playgroud)

打印这样的东西:

(make-thing 1 2 3)
Run Code Online (Sandbox Code Playgroud)

当我在DrScheme或MzScheme repl中键入"th"时.我在DrScheme中使用"非常大"的语言,输出样式设置为"构造函数".这就是我在DrScheme中得到的:

(make-thing ...)
Run Code Online (Sandbox Code Playgroud)

(我真的得到三个点)

在MzScheme:

#<thing>
Run Code Online (Sandbox Code Playgroud)

scheme racket data-structures

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

寻找用于运行我的博客的django应用程序

我正在寻找一个django博客应用程序来运行我的博客.

我找到了以下选项:

  • Django的基本-博客
  • Byteflow

你能分享一下你的推荐吗?

我的基本要求是: - 易于定制 - 具有基本的博客功能

django blogs

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

围绕阅读小文件的python风格问题

在命名文件中读取最pythonic的方法是什么,剥离为空的行,仅包含空格,或者将#作为第一个字符,然后处理剩余的行?假设它很容易适合记忆.

注意:这样做并不难 - 我要问的是最蟒蛇的方式.我一直在写很多Ruby和Java,但我已经失去了感觉.

这是一个稻草人:

file_lines = [line.strip() for line in open(config_file, 'r').readlines() if len(line.strip()) > 0]
for line in file_lines:
  if line[0] == '#':
    continue
  # Do whatever with line here.
Run Code Online (Sandbox Code Playgroud)

我对简洁感兴趣,但不是以难以阅读为代价.

python coding-style idioms

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

从beginSheetModalForWindow获取URL:

我正在使用OpenPanel来获取文件路径URL.这有效:

[oPanel beginSheetModalForWindow:theWindow completionHandler:^(NSInteger returnCode)
{
 NSURL *pathToFile = nil;

 if (returnCode == NSOKButton)
     pathToFile = [[oPanel URLs] objectAtIndex:0];
}];
Run Code Online (Sandbox Code Playgroud)

这不会导致"只读变量的赋值"错误:

NSURL *pathToFile = nil;
[oPanel beginSheetModalForWindow:theWindow completionHandler:^(NSInteger returnCode)
{
 if (returnCode == NSOKButton)
     pathToFile = [[oPanel URLs] objectAtIndex:0];
}];
return pathToFile;
Run Code Online (Sandbox Code Playgroud)

通常,任何从oPanel上下文中提取pathToFile的尝试都失败了.对于小情况来说,这不是什么大问题,但随着我的代码的增长,我不得不在不适当的区域内填充所有内容 - XML解析,核心数据等.我该怎么做才能提取pathToFile?

谢谢.

cocoa asynchronous nsopenpanel objective-c-blocks

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

DateTime.Now.ToShortDateString(); 替换月和日

我需要改变格式

this.TextBox3.Text = DateTime.Now.ToShortDateString();
Run Code Online (Sandbox Code Playgroud)

所以它返回(例如)25.02.2012,但我需要02.25.2012

如何才能做到这一点?

.net datetime datetime-format

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

C拼图:printf的输出应始终为"5"

我在C aptitude论文中发现了这个难题.

void change()
{
    //write something in this function so that output of printf in main function
    //should always give 5.you can't change the main function
}

int main()
{
    int i = 5;
    change();
    i = 10;
    printf("%d", i);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

任何解决方案.?

c puzzle

18
推荐指数
9
解决办法
3087
查看次数

是否可以免费'void*'?

struct foo
{
    int a;
    int b;
};

void* p = (void*)malloc(sizeof(struct foo));
((foo*)p)->a;//do something.
free(p);//Is this safe?
Run Code Online (Sandbox Code Playgroud)

c

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

在Objective-c/iPhone中创建自定义类可序列化?

如何使自己的自定义类可序列化?我特别想把它写到iPhone上的文件中,只是plist而你的类只是一个简单的实例类,只是NSStrings而且可能是NSUrl.

iphone serialization objective-c xml-serialization

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