我有一些看起来像20110525的字符串.
如何在NSString变量中添加' - 'caracters?让日期看起来像2011-05-25?我的第二个问题是如何对日期进行排序以使表格看起来像20110525然后20110526?请帮助.谢谢
你好我只想问一下如何在Haskell中创建一个矩形区域.这是我的代码
main = do
putStrLn"Enter base"
base <- getLine
putStrLn"Enter height"
height <- getLine
putStrLn("The area is: " ++ (height * base) /2)
Run Code Online (Sandbox Code Playgroud)
错误在声明中:
putStrLn("The area is : " ++(height *base) /2)
Run Code Online (Sandbox Code Playgroud) 这是我用字符串保存音频文件的代码.之后,我添加数组.但是仍然没有在这里工作..这里有任何选项存储documentdictionary后存储音频文件的数组.
fileArray = [[NSMutableArray alloc] initWithContentsOfURL:recordedTmpFile];
fileArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [fileArray objectAtIndex:0];
NSMutableDictionary *recordDictionary = [NSDictionary dictionaryWithContentsOfFile:documentsDirectory];
NSFileManager *fileManager = [NSFileManager defaultManager];
for(int i= 0; i<fileArray.count;i++)
{
NSString *recorded = [fileArray objectAtIndex:i];
NSString *filePath = [recordDictionary stringByAppendingPathComponent:recorded];
newArray = [fileManager fileExistsAtPath:filePath];
}
Run Code Online (Sandbox Code Playgroud)
如果我遗漏的任何代码比建议我一些具体的想法.Plz给出一些回应..
我得到了NSString http://maps.apple.com/maps?saddr=41.447910,-74.357881&daddr=719 Old Route 9 North, Wappingers Falls, NY 12590
但是我需要将上面的字符串转换为这个用于在地图中显示位置的字符串
http://maps.apple.com/maps?saddr=41.447910,-74.357881&daddr=719+Old%20Route+9+North%2CWappingers+Falls%2CNY+12590
请告诉我.
我想跳转到tabcontroller中的第三个选项卡.我在谷歌搜索但没有找到任何帮助.
如果有人可以提供帮助,我将不胜感激.