为什么我收到此错误:
infinite.c:5:12: error: use of undeclared identifier 'true'
while (true) {
1 error generated.
make: *** [infinite] Error 1
Run Code Online (Sandbox Code Playgroud)
...当我尝试为无限循环编译这个简单的代码时?
#include <stdio.h>
int main(void) {
int x = 0;
while (true) {
printf("%i\n", x);
}
}
Run Code Online (Sandbox Code Playgroud) 我得到一个Data argument not used by format string当我运行下面的代码错误:
- (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
NSString *colour = ([colourArray objectAtIndex:row]);
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:(colour) forKey:@"colour"];
NSLog(@"NSString =", colour);
NSLog(@"NSUserDefaults =", [defaults objectForKey:@"colour"]);
}
Run Code Online (Sandbox Code Playgroud)
我在两NSLog行都得到了错误.此外,这是日志所说的内容:
2011-10-25 09:01:50.260 Random[35636:b303] NSString =
2011-10-25 09:01:50.260 Random[35636:b303] NSUserDefaults =
Run Code Online (Sandbox Code Playgroud)
谢谢,亚瑟
如何创建UIImageView代码,而不是在我的xib文件中创建它?
可能重复:
带有浮点数的Python舍入错误
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> 4.2 - 1.8
2.4000000000000004
>>> 1.20 - 1.18
0.020000000000000018
>>> 5.1 - 4
1.0999999999999996
>>> 5 - 4
1
>>> 5.0 - 4.0
1.0
Run Code Online (Sandbox Code Playgroud)
为什么Python的数学错误?
可能重复:
找到最接近列表中未完全排序的值的项目的索引
我在Python([237, 72, -18, 237, 236, 237, 60, -158, -273, -78, 492, 243])中有一个正数和负数的列表.我想找到最接近0的数字.我该怎么做?
Objective C中有哪些内容? @"%@" @"%d" @"%i"
我正在使用Yahoo Finance API,如下所示:
http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=l1
这给了我目前的英镑 - >欧元汇率.
但我如何才能列出所有可用的货币?
http://download.finance.yahoo.com/d/quotes.csv?s=X&f=n0和http://download.finance.yahoo.com/d/quotes.csv? s= X & f= c4`是一个开始,但我不能比这更进一步.
文档:http://code.google.com/p/yahoo-finance-managed/wiki/csvQuotesDownload
我是iOS编程的新手.
我"Incompatible integer to pointer conversion sending 'int' to parameter of type 'NSString *'"尝试运行以下代码时收到错误:
- (IBAction)oneToSix {
int rNumber = arc4random() % 6;
[result setImage:[UIImage imageNamed: rNumber]];
}
Run Code Online (Sandbox Code Playgroud) 如何检查文件是否是AppleScript或shell脚本中的图像.我知道这个file命令,但它没有说是否是一个图像.
为什么这个简单的 Applescript 片段不起作用?
\n\nset x to 0\nset thePath to "~/Pictures/party hard/b93-" + x + ".png"\nRun Code Online (Sandbox Code Playgroud)\n\n我收到错误:
\n\nCan\xe2\x80\x99t make "~/Pictures/party hard/b93-" into type number.\nRun Code Online (Sandbox Code Playgroud)\n\n我尝试过很多其他的事情,比如(x as string)。
这么简单,我不明白为什么它不起作用。
\n我有一个 Web 服务,它有一个水晶报告,它从我的数据库生成发票,然后将水晶导出到PDF, 到流中,然后在 Web 方法上作为字符串返回。
在客户端,我有一个C#调用此 Web 服务的 Winforms 应用程序。我希望能够PDF在客户端自动打印,而无需打开 Acrobat Reader。
我最好不想保存其中PDF任何一个,因为目前我必须保存PDF然后使用一个过程来打开 Acrobat Reader,然后打印PDF.
objective-c ×4
ios ×3
numbers ×3
applescript ×2
cocoa-touch ×2
python ×2
string ×2
xcode ×2
algorithm ×1
api ×1
bash ×1
c ×1
c# ×1
cocoa ×1
csv ×1
currency ×1
file ×1
list ×1
math ×1
nsstring ×1
pdf ×1
shell ×1
uiimageview ×1
uipickerview ×1
web-services ×1
winforms ×1
yahoo ×1