草庐IT

declarative

全部标签

ios - xcode 4.6 中的 "Receiver type for instance messages is a forward declaration"

我想在我的ViewController中调用C++类。所以我创建了一个这样的类:你好.h#import@interfaceHello:NSObject{classNewHello{private:intgreeting_text;public:NewHello(){greeting_text=5;}voidsay_hello(){printf("Greeting_Text=%d",greeting_text);}};NewHello*hello;}-(void)sayHellooooo;@end你好.mm#import"Hello.h"@implementationHello-(voi

ios - xcode 4.6 中的 "Receiver type for instance messages is a forward declaration"

我想在我的ViewController中调用C++类。所以我创建了一个这样的类:你好.h#import@interfaceHello:NSObject{classNewHello{private:intgreeting_text;public:NewHello(){greeting_text=5;}voidsay_hello(){printf("Greeting_Text=%d",greeting_text);}};NewHello*hello;}-(void)sayHellooooo;@end你好.mm#import"Hello.h"@implementationHello-(voi

iphone - iOS 错误 : No visible @interface for 'Project' declares the selector 'alloc'

我正在像这样初始化一个对象:Project*Project=[[Projectalloc]init];这是项目类的代码:Project.h#import@interfaceProject:NSObject{}@property(nonatomic,assign)intprojectID;@property(nonatomic,strong)NSString*name;@endProject.m#import"Project.h"@implementationProject@synthesizeprojectID,name;@end我遇到错误Novisible@interfacefor'

iphone - iOS 错误 : No visible @interface for 'Project' declares the selector 'alloc'

我正在像这样初始化一个对象:Project*Project=[[Projectalloc]init];这是项目类的代码:Project.h#import@interfaceProject:NSObject{}@property(nonatomic,assign)intprojectID;@property(nonatomic,strong)NSString*name;@endProject.m#import"Project.h"@implementationProject@synthesizeprojectID,name;@end我遇到错误Novisible@interfacefor'

Failed to load plugin ‘@typescript-eslint‘ declared in ‘.eslintrc.js‘: Cannot find module ‘typescrip

今天遇到这个报错搞了一下午,网上百度的很多方法都不适合。现在问题解决了,就把解决方法记录一下。我是在编译代码(npmrundev)的时候抛出了异常信息,提示自己插件加载失败,找不到对应的模块,介绍下自己的环境,用vscode+vue2,eslint版本6.8.0接下来列举下自己的摸索的解决方法:1、eslint版本过低不匹配,升级eslint版本,但是对我遇到问题无效,升级了版本也不行。参考文档:https://www.saoniuhuo.com/question/detail-2415706.html2、升级自己的node版本,询问了可以成功运行项目的同事,推荐升级node版本,我这边又将n

python - 声明式 SQLAlchemy 在内存表中创建 SQLITE

这是我为应用程序设置数据库的方式(在Flask中):fromsqlalchemy.engineimportcreate_enginefromsqlalchemy.ormimportscoped_session,create_sessionfromsqlalchemy.ext.declarativeimportdeclarative_baseengine=Nonedb_session=scoped_session(lambda:create_session(bind=engine,autoflush=False,autocommit=False,expire_on_commit=True

python - 声明式 SQLAlchemy 在内存表中创建 SQLITE

这是我为应用程序设置数据库的方式(在Flask中):fromsqlalchemy.engineimportcreate_enginefromsqlalchemy.ormimportscoped_session,create_sessionfromsqlalchemy.ext.declarativeimportdeclarative_baseengine=Nonedb_session=scoped_session(lambda:create_session(bind=engine,autoflush=False,autocommit=False,expire_on_commit=True

vscode:配置@路径提示,并解决Cannot find module ‘@/utils/xxx‘ or its corresponding type declarations.

背景在使用vue3+ts的时候,使用alias配置了@路径vite.config.jsresolve:{alias:{"@":path.resolve(__dirname,"src")},}这时候发现填写路径的时候没有代码提示import{getDate}from'@/utils/date';配置路径提示下载插件PathIntellisense或者PathAutocomplete这里我们以第一个为例{"path-intellisense.mappings":{"@":"${workspaceFolder}/src"//Aliasforabsolutepathtodirectory.}}效果:解

微信小程序调定位失败或提示 chooseLocation:fail the api need to be declared in the requiredPrivateInfos field in

只要是微信小程序的定位问题解决方法都是一样的,看此篇文章都可以一次性解决,调取定位时会报错:chooseLocation:failtheapineedtobedeclaredintherequiredPrivateInfosfieldinapp.json/ext.json有的可能是前面的api名不一样但是后面的报错都是一样的如下图:解决方式都是一样的第一步:打开manifest.json选择源码视图,找到mp-weixin节点,添加requiredPrivateInfos的配置,源码如下图:代码如下(因为我就用到了这两个api所以就写了两个。如果你们用到的api跟我不一样或者比我多就直接更换或

ios - 错误 : Initializers may only be declared within a type

这是我的代码extensionUIImage{convenienceinit(color:UIColor,size:CGSize=CGSizeMake(1,1)){letrect=CGRectMake(0,0,size.width,size.height)UIGraphicsBeginImageContext(rect.size)letcontext=UIGraphicsGetCurrentContext()CGContextSetFillColorWithColor(context,color.CGColor)CGContextFillRect(context,rect)letima