我有以下情况:
如果汽车静止(不动),我想在每5分钟后调用位置更新api.如果汽车正在移动,我想每隔2分钟后调用位置更新api.
要么
如果汽车每隔5分钟移动2000米的距离比需要呼叫位置更新api.实际上如何检查该位置是否相同?
android locationlistener android-location android-mapview android-maps-v2
我是 ReactNative 的新手,我面临一个问题。请检查以下日志是否相同。我在尝试使用 ReactNative 项目运行时遇到了这个问题
react-native run-android
Run Code Online (Sandbox Code Playgroud)
错误日志:
错误:无法
./index从D:\ReactNativeProject\testing\node_modules\react-native\scripts/.以下位置解析模块:无法从./index中找到模块D:\ReactNativeProject\testing\node_modules\react-native\scripts/.。事实上,这些文件都不存在: *D:\ReactNativeProject\testing\node_modules\react-native\scripts\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)*D:\ReactNativeProject\testing\node_modules\react-native\scripts\index\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)在 ModuleResolver.resolveDependency (D:\ReactNativeProject\testing\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:163:15) 在 ResolutionRequest.resolveDependency (D:\ReactNativeProject\testing\node_modules\metro\src\ node-haste\DependencyGraph\ResolutionRequest.js:52:18) 在 DependencyGraph.resolveDependency (D:\ReactNativeProject\testing\node_modules\metro\src\node-haste\DependencyGraph.js:283:16) 在 D:\ReactNativeProject\ testing\node_modules\metro\src\lib\transformHelpers.js:261:42 在服务器上。(D:\ReactNativeProject\testing\node_modules\metro\src\Server.js:1038:41) at Generator.next () at asyncGeneratorStep (D:\ReactNativeProject\testing\node_modules\metro\src\Server.js:99: 24) 在 _next (D:\ReactNativeProject\testing\node_modules\metro\src\Server.
我做了什么来解决这个问题?
1)。当我在 Github 上找到解决方案时,我尝试了以下命令
react-native start --reset-cache
Run Code Online (Sandbox Code Playgroud)
2)。我试图删除node-module文件夹并重新安装,但仍然没有成功。
反应本机版本: 0.59.2
我尝试了一些领域查询,但没有得到我想要的结果
让我们考虑下面的表格(Realm表):
id Name DateTimeStamp
1 A 2017-01-01 08:00:00
2 B 2017-01-01 15:00:00
3 C 2017-01-02 08:00:00
Run Code Online (Sandbox Code Playgroud)
现在我想要所有那些与日期"2017-01-01"匹配的记录.对于这种情况,我应该从领域表中得到2条记录.现在我没有得到任何记录.
有关信息"DateTimeStamp"列数据类型是"日期".是的我需要在数据库中存储日期和时间,如您在表中看到的那样.
我试过的查询是:
long cnt = realm.where(ReservationObject.class).equalTo("DateTimeStamp",dateObject).count();
Run Code Online (Sandbox Code Playgroud)
请帮帮我...提前谢谢......