我是node.js的新手,我已经做了我的研究没有成功,所以这是我的问题:
可以将Node.js与Oracle 9i数据库一起使用吗?如果是这样,我在哪里可以找到一些相关的东西?
提前致谢!
是否有 api 可以从Activity类中调用方法?我需要调用finish()我的应用程序,但在文档中找不到任何相关内容。
更具体地讲,我想finish()的MainActivity从我的index.android.jsx,当特定TouchableHighlight被按下。
[更新]
现在我finish()从我的 NativeModule公开一个方法,但也许有更好的方法来做到这一点。
我正在尝试将 *this 函数转换为 Dart,但到目前为止尚未成功。我对正则表达式的部分有点困惑。我的实现使用 regExp.allMatches***(url)***aways 返回整个 url。
JavaScript 版本:
function youtube_parser(url){
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
var match = url.match(regExp);
return (match&&match[7].length==11)? match[7] : false;
}
Run Code Online (Sandbox Code Playgroud)
WIP Dart 版本:
RegExp regExp = new RegExp(
r'.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*',
caseSensitive: false,
multiLine: false,
);
final match = regExp.allMatches(url);
Run Code Online (Sandbox Code Playgroud)
有人能帮我吗?
编辑:
输入网址:
final urls = [
'http://www.youtube.com/watch?v=0zM3nApSvMg&feature=feedrec_grec_index',
'http://www.youtube.com/user/IngridMichaelsonVEVO#p/a/u/1/QdK8U-VIH_o',
'http://www.youtube.com/v/0zM3nApSvMg?fs=1&hl=en_US&rel=0',
'http://www.youtube.com/watch?v=0zM3nApSvMg#t=0m10s',
'http://www.youtube.com/embed/0zM3nApSvMg?rel=0',
'http://www.youtube.com/watch?v=0zM3nApSvMg',
'http://youtu.be/0zM3nApSvMg',
];
Run Code Online (Sandbox Code Playgroud)
每个 getYoutubeVideoId(url) 的输出应该是0zM3nApSvMg
提前致谢,
费利佩
javascript ×2
android ×1
dart ×1
node.js ×1
oracle ×1
oracle9i ×1
react-jsx ×1
react-native ×1
youtube ×1