我试图调用一个控制器,它应该与home.category 路由链接,但它没有被调用.这有什么不对?
$stateProvider
.state("home", {
// Use a url of "/" to set a states as the "index".
url: "/",
templateUrl: APP_CONFIG.baseUrl +
'partials/layouts/home.html',
controller: 'MainCtrl'
})
.state("home.category", {
// Use a url of "/" to set a states as the "index".
url: "c/:categoryId/:categorySlug",
controller: function($stateParams) {
alert($stateParams.categoryId);
}
})
Run Code Online (Sandbox Code Playgroud) 我处于一种我希望从动态图像列表中显示动画的情况.我想为此目的使用AnimationDrawable,但不幸的是我被困... :(我的代码是
ImageView globe = (ImageView) findViewById(R.id.globe);
AnimationDrawable animation = new AnimationDrawable();
animation.setOneShot(true);
Resources res = this.getResources();
while (from <= to) {
String name = "globe_" + String.format("%03d", from);
int globeId = res.getIdentifier(name, "drawable",
this.getPackageName());
animation.addFrame(res.getDrawable(globeId), 200);
from++;
}
globe.setBackgroundDrawable(animation);
globe.post(new Runnable(){
@Override
public void run() {
animation.start();
}
});
Run Code Online (Sandbox Code Playgroud) 我尝试了很多但没有成功的事情:(我有两个相互连接的可排序列表.事情是列表'A'可以接受其中的任何列表项.但是列表'B'只能接受一个具有class ='abc'的项目
代码是
<ul id='A'>
<li>item A1</i>
<li>item A2</i>
<li class='abc'>item A3</i>
</ul>
<ul id='B'>
<li class='abc'>item A1</i>
</ul>
Run Code Online (Sandbox Code Playgroud)
我正在尝试的jquery代码是
$('#A').sortable({revert: true, connectWith: '#B'})
$('#B').sortable({revert: true, connectWith: '#A', over: function(event, ui){
if(!ui.item.hasClass('abc')){
ui.placeholder.addClass('ui-state-error');
ui.sender.sortable('cancel');
}
}})
Run Code Online (Sandbox Code Playgroud)
请指导我错在哪里,谢谢
我正在尝试这个脚本:
FB.login({scope: 'email'},function(response){
if(response.status == 'connected'){
alert('I am connected')
}
});
Run Code Online (Sandbox Code Playgroud)
但它不是要求用户给予电子邮件权限.. :(
我尝试了范围和烫发作为参数.
参考文献:
我想通过codeigniter的db helper类编写以下查询,引导我plz
SELECT * FROM table where column like binary "abc";
Run Code Online (Sandbox Code Playgroud)
我试过了
$this->db->select("*");
$this->db->from("table");
$this->db->like("column","binary abc");
$this->db->get();
Run Code Online (Sandbox Code Playgroud)
但它产生了
SELECT * FROM table WHERE column like '%binary abc%'
Run Code Online (Sandbox Code Playgroud) 我创建了一个winform应用程序,然后创建了该应用程序的设置.此应用程序在Application.StartupPath中记录文件中的一些信息.不幸的是,当我尝试写入"访问被拒绝"文件时,我遇到了异常.请指导我如何摆脱它..
谢谢