我尝试推送本地提交时遇到问题,可能是Android Studio崩溃时发生了。这是错误:
ref'refs / remotes / origin / master'的update_ref失败:无法锁定ref'refs / remotes / origin / master':无法解析引用refs / remotes / origin / master:无效的参数
$git stash说,这HEAD是我最近的承诺。
我仍然是git的初学者,不知道如何解决它。我该怎么办?
可以像这样缓存查询结果:
$users = DB::table('users')->remember(10)->get();
Run Code Online (Sandbox Code Playgroud)
但是我如何缓存列表结果。这不起作用:
$roles = DB::table('roles')->lists('title'); // Works, but not cached.
$roles = DB::table('roles')->remember(10)->lists('title'); // Not working.
Run Code Online (Sandbox Code Playgroud)
抛出错误:
exception 'BadMethodCallException' with message 'Call to undefined method Illuminate\Database\Query\Builder::remember()'
Run Code Online (Sandbox Code Playgroud) 我有一个Web应用程序,它通过appendChild()功能使用JavaScript添加HTML元素(如div)。当我使用Firebug检查(添加div之后)时,它显示了新添加的div。但是,当我在浏览器中看到源代码时,它并不能反映所做的更改。
我的问题是:如何使用JavaScript或jQuery将新添加的div以及其他HTML元素另存为HTML文件?
源代码:
<html>
<head>
<title>Page title</title>
<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<script>
$(document).ready(function() {
$('#btnAddtoList').click(function(){
if( $('#inputAddtoList').val() == '' ) {alert("please enter some value."); }
var text = $('#inputAddtoList').val();
var newDiv = $('<div class="listing"><h4>' + text + '</h4></div>');
$('body').append(newDiv);
$('#inputAddtoList').val('');
});
});
</script>
</head>
<body>
Enter Question: <BR/><textarea id="inputAddtoList" rows="5" cols="50" placeholder="Enter Question Here..." autofocus></textarea>
<button id="btnAddtoList">Add Question</button>
<BR /><BR />
<strong>Question :</strong>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)