我在我的离子应用程序中使用cordova-plugin-file下载图像并保存到本地.
当我在模拟器或iphone中运行它时,没有错误,但是当我在Chrome中测试时,它说, cordova is not defined当我尝试访问时cordova.file.dataDirectory
如何在chrome中运行cordova-plugin-file?
$ cat a.sh
#!/bin/bash
echo -n "apple" | shasum -a 256
$ sh -x a.sh
+ echo -n apple
+ shasum -a 256
d9d20ed0e313ce50526de6185500439af174bf56be623f1c5fe74fbb73b60972 -
$ bash -x a.sh
+ echo -n apple
+ shasum -a 256
3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b -
Run Code Online (Sandbox Code Playgroud)
最后一个是正确的.这是为什么?以及如何解决?
我对git很新,我想知道如何跟踪分支历史记录?
例如:
echo "update README in branch master" >> README.md
git commit -a -m"commit in branch master"
git checkout -b b1
echo "update README in branch b1" >> README.md
git commit -a -m"commit in branch b1"
git checkout master
git merge b1
git push
Run Code Online (Sandbox Code Playgroud)
然后有人克隆这个回购,如何显示分支历史?
git log --graph
* commit 4162ecc962aa020ec6294312e4f8eed63ca152d1
| Author: test1 <test1@adsf.com>
| Date: Fri Feb 15 14:37:43 2013 +0900
|
| commit in branch b1
|
* commit 08e80fc644fa7ebb374a601e16533a8fc3578f88
| Author: test1 <test1@adsf.com>
| Date: Fri …Run Code Online (Sandbox Code Playgroud) 我在一个名为AA的文件夹中有一个GIT存储库,我有第二个名为BB的 GIT存储库.
我想将AA存储库作为子文件夹导入BB存储库.
之前:
AA
|- .git
|- A/
|- fileA
BB
|- .git
|- B/
|- fileB
Run Code Online (Sandbox Code Playgroud)
后:
BB
|- .git # new .git with both AA and BB .git infos
|- B/
|- fileB
|- AA/ # <== no .git anymore
|- AA/A/
|- AA/fileA
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?
例如,我有一个输入文本和一个按钮
我想要两个事件,button.on click和input.on KeyEnterPress绑定到一个相同的函数
我怎样才能做到这一点?
$('#search.onClick OR $searchText.onKeyEnterPress')
Run Code Online (Sandbox Code Playgroud) 我不知道其含义for="inputEmail3",似乎与id相同,它的用途是什么?我可以删除for="inputEmail3"吗?
<form>
<div class="form-group row">
<label for="inputEmail3" class="col-sm-2 form-control-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 例如,有几大功能:User[需要开发用户控件,的usermodel,UserService],和Admin,Post,Comment.
现在你在features/post分支机构,开发与职位相关的职能.但是你遇到了一些User相关功能的错误.
那么就gitflow而言,建议的方法是什么?
添加TODO或Fix me用户相关的功能,并在完成发布后修复bug并将代码合并到master中?
存储未完成的帖子相关代码,创建fix分支,修复bug,合并到features/post,隐藏弹出未完成的帖子相关代码,然后继续?
在HTTP2中:
因此,当请求一个具有多个域(www.example.com,api.example.com ...)的html页面时,会有多个连接.
但如果这些域共享一个相同的IP呢?还有多个连接吗?
在app.js中,我有
// catch 404 and forward to error handler
app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});
Run Code Online (Sandbox Code Playgroud)
所以如果我请求一些不存在的url http://localhost/notfound,上面的代码就会执行.
在存在url之类的http://localhost/posts/:postId,我想在访问一些不存在postId或删除postId时抛出404错误.
Posts.findOne({_id: req.params.id, deleted: false}).exec()
.then(function(post) {
if(!post) {
// How to throw a 404 error, so code can jump to above 404 catch?
}
Run Code Online (Sandbox Code Playgroud) 例如,我现在在develop分支中,并且想要将远程主服务器拉到本地主服务器,我要做的是:
$ git stash
$ git checkout master
$ git pull
$ git checkout develop
$ git merge master
Run Code Online (Sandbox Code Playgroud)
问题1:在develop分支机构时,如何将远程主服务器拉到本地主服务器?
问题2:是否可以在一个命令中将远程主机与本地开发合并?目前我使用4个命令