CASIO fx-95计算器上的M里面的资料怎么删除?
CASIO fx-95计算器上的M里面的资料怎么删除?
删去的话就变成0,上面的M会消失
方法一:
恢复出厂设定(用这种方法模式以及ABCDEFXYM表示的数都会恢复(0))
shift+9
3
方法二:
ALPHA+M+(M)
shift+M+(M-)
方法三:
清空资料(用这种方法模式以及ABCDEFXYM表示的数都会恢复(0))
shift+9
2
怎么删除plist里面的资料
主要操作:
1.获得plist路径 -(NSString*)getPlistPath;
2.判断沙盒中名为plistname的档案是否存在 -(BOOL) isPlistFileExists;
3.读取沙盒中Document资料夹下的BookList.plist档案
[NSMutableDictionarydictionaryWithContentsOfFile:plistPath];
4.写入档案 if ([plistDictionary writeToFile:plistPath atomically:YES])
WBBooksManager.m档案:
#import "WBBooksManager.h"
@implementation WBBooksManager
static WBBooksManager *g_instance = nil;
+ (WBBooksManager *)sharedInstance
{
@synchronized(self) {
if ( g_instance == nil ) {
g_instance = [[self alloc] init];
}
}
return g_instance;
}
获得plist路径
-(NSString*)getPlistPath{
沙盒中的档案路径
NSArray *storeFilePath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *doucumentsDirectiory = [storeFilePath objectAtIndex:0];
NSString *plistPath =[doucumentsDirectiory stringByAppendingPathComponent:@"WBBooks.plist"]; 根据需要更改档名
return plistPath;
}
判断沙盒中名为plistname的档案是否存在
-(BOOL) isPlistFileExists{
NSString *plistPath =[[WBBooksManager sharedInstance]getPlistPath];
NSFileManager *fileManager = [NSFileManager defaultManager];
if( [fileManager fileExistsAtPath:plistPath]== NO ) {
NSLog(@"not exists");
return NO;
}else{
return YES;
}
}
-(void)initPlist{
NSString *plistPath = [[WBBooksManager sharedInstance] getPlistPath];
如果plist档案不存在,将工程中已建起的plist档案写入沙盒中
if (! [[WBBooksManager sharedInstance] isPlistFileExists]) {
从自己建立的plist档案 复制到沙盒中 ,方法一
NSError *error;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *bundle = [[NSBundle mainBundle] pathForResource:@"WBBooks" ofType:@"plist"];
[fileManager copyItemAtPath:bundle toPath:plistPath error:&error];
方法二
NSString *path = [[NSBundle mainBundle] pathForResource:@"WBBooks"ofType:@"plist"];
NSMutableDictionary *activityDics = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
[activityDics writeToFile:plistPath atomically:YES];
}
}
判断key的书是否存在
-(BOOL)isBookExistsForKey:(NSString*)key{
NSString *plistPath = [[WBBooksManager sharedInstance] getPlistPath];
NSMutableDictionary *WBBooksDictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
根目录下存在名为bookname的字典
if ([WBBooksDictionary objectForKey:key]) {
return YES;
}else{
return NO;
}
}
根据key值删除对应书籍
-(void)removeBookWithKey:(NSString *)key{
NSString *plistPath = [[WBBooksManager sharedInstance] getPlistPath];
NSMutableDictionary *WBBooksDictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
[WBBooksDictionary removeObjectForKey:key];
[WBBooksDictionary writeToFile:plistPath atomically:YES]; 删除后重新写入
}
删除plistPath路径对应的档案
-(void)deletePlist{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *plistPath = [[WBBooksManager sharedInstance] getPlistPath];
[fileManager removeItemAtPath:plistPath error:nil];
}
将dictionary写入plist档案,前提:dictionary已经准备好
-(void)writePlist:(NSMutableDictionary*)dictionary forKey:(NSString *)key{
NSMutableDictionary *plistDictionary = [[NSMutableDictionary alloc]init];
如果已存在则读取现有资料
if ([[WBBooksManager sharedInstance]isPlistFileExists]) {
plistDictionary = [[WBBooksManager sharedInstance]readPlist];
}
增加一个数据
[plistDictionary setValue:dictionary forKey:key]; 在plistDictionary增加一个key为...的value
NSString *plistPath = [[WBBooksManager sharedInstance] getPlistPath];
if([plistDictionary writeToFile:plistPath atomically:YES]){
NSLog(@"write ok!");
}else{
NSLog(@"ddd");
}
}
-(NSMutableDictionary*)readPlist{
NSString *plistPath = [[WBBooksManager sharedInstance] getPlistPath];
NSMutableDictionary *resultDictionary = [[NSMutableDictionary alloc]initWithContentsOfFile:plistPath];
return resultDictionary;
}
读取plist档案内容复制给dictionary 备用
-(void)readPlist:(NSMutableDictionary **)dictionary{
NSString *plistPath = [[WBBooksManager sharedInstance] getPlistPath];
*dictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
}
更改一条资料,就是把dictionary内key重写
-(void)replaceDictionary:(NSMutableDictionary *)newDictionary withDictionaryKey:(NSString *)key{
[[WBBooksManager sharedInstance]removeBookWithKey:key];
[[WBBooksManager sharedInstance]writePlist:newDictionary forKey:key];
}
-(NSInteger)getBooksCount{
NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init];
dictionary = [[WBBooksManager sharedInstance] readPlist];
return [dictionary count];
}
CASIO FX-95 型号的计算器怎么去除sci功能?
SHIFT,9,3,=,AC
CASIO卡西欧计算器fx-95的“DEG”和“SCI”怎么消?
你把计算器清屏看看
SHIFT +MODE +3 =
casio fx 5800p里面的ifend怎样输计算器
在程式设计模式中依次按键:FUNCTION----3(PROG)----- 6(IfEnd)
云服务里面的资料怎么删除
你好!储存在云服务的内容是安全的,如需删除,你需要覆盖备份才可以的。
CASIO fx-95 计算器的小数位数如何设定?
同事按下SHIFT键CLR键数字键2和等于号=就可以了
CASIO FX-95 型号的计算器怎么去除上面的“?”和萤幕中的几个字母?
无法去除,系统自带的。
CASIO计算器型号FX-350MS上的M怎么消除?
先按ALPHA(左上方第二个)+M+这个键,再按SHIFT+M+这个键就好了
2024-09-04 广告