我是mongodb的新手并且正在尝试学习Mongodb查询
{
"_id" : ObjectId("59815d4704ca1760a45957ca"),
"userEmail" : "lk@gmail.com",
"expenseAmount" : 200,
"expenseRemark" : "aa",
"expenseCategory" : "billing",
"entryTime" : ISODate("2017-08-02T05:03:57Z"),
"__v" : 0
}
{
"_id" : ObjectId("59815d5404ca1760a45957cb"),
"userEmail" : "lk@gmail.com",
"expenseAmount" : 300,
"expenseRemark" : "ff",
"expenseCategory" : "transport",
"entryTime" : ISODate("2017-08-02T05:04:11Z"),
"__v" : 0
}
{
"_id" : ObjectId("5980191d04ca1760a45957cd"),
"userEmail" : "lk@gmail.com",
"expenseAmount" : 100,
"expenseRemark" : "rr",
"expenseCategory" : "billing",
"entryTime" : ISODate("2017-08-01T06:00:46Z"),
"__v" : 0
}
{
"_id" : ObjectId("5980192604ca1760a45957ce"),
"userEmail" : "lk@gmail.com",
"expenseAmount" : 200, …Run Code Online (Sandbox Code Playgroud) 我正在学习Angular6 Http和拦截器。
我创建了一个拦截器
@Injectable()
export class HttpsRequestInterceptor implements HttpInterceptor {
intercept(
req: HttpRequest<any>,
next: HttpHandler
): Observable<HttpEvent<any>> {
console.log(req);
if(req.url == 'https://abcd.azure.net/api/v1/getPendinList') {
// return Observable.empty();
console.log('hello')
}
const dupReq = req.clone({
headers: req.headers.set('Consumer-Secret', 'some sample key')
});
return next.handle(dupReq);
}
}
Run Code Online (Sandbox Code Playgroud)
每当我点击时,我都会获得console.log,这很好https://abcd.azure.net/api/v1/getPendinList。我要尝试实现的是,如果我点击此URL,我想将此URL更改为其他名称,例如abcd.api.com/search。这样我的url从新端点获取数据。
这可能吗?
我在 VBA 中有一个字符串- Hello how are you。
我想-用别的东西代替。我怎样才能做到这一点?我从 VBA 开始。需要帮忙。
我有一个大阵列,例如 aa=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
我有另一个数组,它根据需要分块的大数组来保存索引值.例如cc=[10,16]
我希望将数组aa分成新的数组
dd [] = [从0到cc [0]索引]
ee [] = [从cc [0]索引到cc [下一个值]索引]
例
dd[] = [1,2,3,4,5,6,7,8,9,10]
ee[] = [11,12,13,14,15,16]
Run Code Online (Sandbox Code Playgroud)
等等,直到cc[]有索引
如果有人能帮助我,我无法弄清楚逻辑.
我已经用密钥和机密配置了无服务器。
当我尝试运行无服务器部署时,它说:
ServerlessError: AWS provider credentials not found. Learn how to set up AWS provider credentials in our docs here:.
Run Code Online (Sandbox Code Playgroud)
请帮我怎么办
我在 ngOnInit 中调用了一个函数,
ngOnInit() {
this.isSubscribable();
}
Run Code Online (Sandbox Code Playgroud)
我想像这样对此 ngOnInit 进行单元测试:
it('Check isSubscribable is called from ngOnInit', async(async() => {
spyOn(component, 'isSubscribable').and.callThrough();
fixture.detectChanges();
await fixture.whenStable();
expect(component.isSubscribable).toHaveBeenCalled();
}))
Run Code Online (Sandbox Code Playgroud)
这是行不通的。我需要一些帮助。
我在使用react-redux-notify时收到此警告
index.js:1 Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of CSSTransitionGroupChild which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: ---/react-strict-mode-find-node
in div (created by Notification)
in Notification (created by Notify)
in CSSTransitionGroupChild (created by TransitionGroup)
in div (created by TransitionGroup)
in TransitionGroup (created by CSSTransitionGroup)
in CSSTransitionGroup (created by Notify)
in div (created by Notify)
in Notify (created by …Run Code Online (Sandbox Code Playgroud) strict-mode reactjs deprecation-warning react-redux react-redux-notify
我在 NX monorepo 中,它在 Angular 上工作。
我已经按照链接上给出的预先说明安装了 Ionic 。Ionic 工作正常,但我无法使用类似命令ionic generate page --project=sales-app,我收到类似错误,An unhandled exception occurred: Schematic "page" not found in collection "@nrwl/angular".
请帮忙,如何解决这个问题。
我对 Node+Typescript 比较陌生,我有一个使用这样导入另一个文件模块的文件import { IS_PRODUCTION } from '@/config/config';,我无法理解它是如何通过@符号导入的。
需要一些帮助来理解这一点。
谢谢
[编辑]:这是 tsconfig.json
{
"compilerOptions": {
"esModuleInterop": true,
"target": "es2018",
"noImplicitAny": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"sourceMap": true,
"outDir": "build",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@@/*": ["./*"]
},
"module": "commonjs",
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["build", "node_modules"]
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试实现 Capacitor LocalNotification 插件。
\nimport { Plugins, CameraResultType } from '@capacitor/core';\nconst { LocalNotifications } = Plugins;\nRun Code Online (Sandbox Code Playgroud)\n在下面的代码中就像
\n schedule() {\n console.log('----')\n LocalNotifications.schedule({\n notifications: [\n {\n title: "aaaa",\n body: "Body",\n id: 1,\n smallIcon: 'house',\n actionTypeId: 'OPEN_PRODUCT',\n \n schedule: {\n every: "minute"\n },\n\n extra: null\n }\n ]\n });\n }\nRun Code Online (Sandbox Code Playgroud)\n我正在 ios 模拟器上进行测试,该方法被调用,在 Xcode-debug 中我得到这样的结果:
\n To Native -> LocalNotifications schedule 1850642\n\xe2\x9a\xa1\xef\xb8\x8f TO JS {"notifications":[{"id":"1"}]\nRun Code Online (Sandbox Code Playgroud)\n但模拟器中未显示通知。
\n我在这个项目中没有使用 cordova/ionic-native 。如果我需要运行一些 npm 包等才能使其正常工作,请提供帮助。
\nangular ×4
typescript ×2
aggregate ×1
arrays ×1
aws-lambda ×1
capacitor ×1
excel ×1
express ×1
jasmine ×1
javascript ×1
mongodb ×1
monorepo ×1
node.js ×1
nomachine-nx ×1
react-redux ×1
reactjs ×1
strict-mode ×1
vba ×1