我已经开始使用git了.我已经在我的本地系统上克隆了主人.我在本地机器上进行更改并使用git push更新主机.它工作正常.
我快速查询如何从主服务器更新我的克隆.我试过GIT远程更新.它不起作用,不会出现新的变化.我只是想确保在上班之前我有最新的主人副本.我如何更新克隆.
我感谢任何帮助.
我找到了这样的查询.
$this->paginate('Article', array('Article.status !=' => 'Inactive', 'Article.user_id !=' => $blocked_ids, 'Article.tags LIKE' => "%" . trim($this->params['url']['tag']) . "%"))
Run Code Online (Sandbox Code Playgroud)
其中$ blocked_ids是一个id数组.它抛出一个错误
SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= ('170')
Run Code Online (Sandbox Code Playgroud)
当我删除!=它工作正常.没有错误
我感谢任何帮助.
我正在使用D3 JavaScript库将数据显示为强制定向标记.它工作正常.但我无法将点击事件添加到圈子中.所以当我点击圆圈时,我会得到圆圈的详细分析并将其显示在一个模态框中.
var links = [{source: "x", target:"y", type: "paid"},......]';
var nodes = {};
// Compute the distinct nodes from the links.
links.forEach(function(link) {
link.source = nodes[link.source] || (nodes[link.source] = {name: link.source});
link.target = nodes[link.target] || (nodes[link.target] = {name: link.target});
});
var w = 950,
h = 500;
var force = d3.layout.force()
.nodes(d3.values(nodes))
.links(links)
.size([w, h])
.linkDistance(60)
.charge(-300)
.on("tick", tick)
.start();
var svg = d3.select("#graph").append("svg:svg")
.attr("width", w)
.attr("height", h);
// Per-type markers, as they don't inherit styles.
svg.append("svg:defs").selectAll("marker")
.data(["suit", "licensing", …Run Code Online (Sandbox Code Playgroud) 我有一个包含iframe的页面.iframe中的链接应该打开colorbox.它工作正常.
但是它会打开iframe中的颜色框.是否可以在父窗口上打开iframe.
我感谢任何帮助.
$(function() {
$('#ajax').colorbox({iframe: true });
});
Run Code Online (Sandbox Code Playgroud) 我正在使用scrollTop滚动浏览内容div
var container = $('#content');
container.scrollTop(
$('#topic-' + id).offset().top - container.offset().top
);
container.scrollTop(
container.scrollTop() + $('#topic-' + id).offset().top - container.offset().top
);
Run Code Online (Sandbox Code Playgroud)
有用.但滚动很难看.有没有办法缓解过渡.
我感谢任何帮助.
我可以选择让用户分享视频.我使用filepicker.io来处理我的上传.我正在使用zend gdata插件,它适用于存储在我服务器上的视频.但它不适用于亚马逊s3服务器上保存的视频.我可以将s3上的视频上传到youtube.
我感谢任何帮助.
我是cakephp的新手.我试图将json输出保存为webroot中的文件.我也想把文件读成数组.
我知道我们可以使用json_encode($ array)将数组作为json对象输出.但我很难创建并将json文件读入数组.
我感谢任何帮助.
我有用户模型和文章模型.用户有很多文章.因此,当我查询用户时,将检索文章表的所有字段.我想限制它只是文章的标题.
$user = $this->User->find('all', array('conditions' => array('User.id' => $id), 'fields' => array('User.firstName', 'Article.title')));
Run Code Online (Sandbox Code Playgroud)
这些字段适用于用户模型.但它不适用于相关模型.抛出错误
SQL Error: 1054: Unknown column 'Article.title' in 'field list'
Run Code Online (Sandbox Code Playgroud)
我感谢任何帮助.
我有复选框.如果选中复选框,我想切换包含复选框的div的样式.
<label for="ids">
<div>
<img src="img/87_1180.jpg">
<h4>Name</h4>
<input name="ids" id="ids" type="checkbox">
</div>
</label>
Run Code Online (Sandbox Code Playgroud)
当用户单击标签时,将选中该复选框.如果选中复选框,我想添加类.
我感谢任何帮助.
javascript ×5
cakephp ×4
php ×4
cakephp-1.3 ×3
jquery ×3
colorbox ×1
d3.js ×1
force-layout ×1
git ×1
json ×1
modal-dialog ×1
scroll ×1
youtube-api ×1