我正在尝试编写一些查询来从数据库中获取数据.我曾经使用With(NoLock)来阻止SQL Server在数据库上放置共享锁.最近,我的一位朋友告诉我,现在的默认行为是它不会对读取数据施加任何锁定.
但是,我找不到一个干净的解释.我还应该在SQL Server中使用With(NoLock)吗?
我需要在我的网络应用程序中使用相机。所以我想如果用户拒绝在他/她的浏览器上使用相机,我会再次要求它允许相机许可。
这是我的代码
import 'package:universal_html/html.dart' as html;
RaisedButton(
onPressed: () {
var permissions = Map<String,String>();
permissions['name']= 'camera';
html.window.navigator.permissions.request(permissions).then((value){
print((value).state);
});
},
child: Text('Grant Permission'),
)
Run Code Online (Sandbox Code Playgroud)
但是当我单击“授予权限”按钮时,它会记录此错误
html_dart2js.dart:25368 Uncaught (in promise) TypeError: this.request is not a function
at Permissions.[dartx.request] (html_dart2js.dart:25368)
at web_camera_preview_screen.dart:157
at Generator.next (<anonymous>)
at runBody (async_patch.dart:86)
at Object._async [as async] (async_patch.dart:125)
at ink_well.InkWell.new.<anonymous> (web_camera_preview_screen.dart:154)
at _InkResponseState.new.[_handleTap] (ink_well.dart:779)
at ink_well.dart:862
at tap.TapGestureRecognizer.new.invokeCallback (recognizer.dart:182)
at tap.TapGestureRecognizer.new.handleTapUp (tap.dart:504)
at tap.TapGestureRecognizer.new.[_checkUp] (tap.dart:282)
at tap.TapGestureRecognizer.new.handlePrimaryPointer (tap.dart:217)
at tap.TapGestureRecognizer.new.handleEvent (recognizer.dart:475)
at pointer_router.PointerRouter.new.[_dispatch] (pointer_router.dart:76)
at pointer_router.dart:122
at …Run Code Online (Sandbox Code Playgroud)