小编mak*_*kki的帖子

未调用ui-router嵌套路由控制器

我试图调用一个控制器,它应该与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)

angularjs angular-ui-router

44
推荐指数
2
解决办法
2万
查看次数

DynamicDrawable以编程方式没有animation-list xml

我处于一种我希望从动态图像列表中显示动画的情况.我想为此目的使用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)

android android-animation

13
推荐指数
2
解决办法
2万
查看次数

拒绝可排序列表中的无效可排序项

我尝试了很多但没有成功的事情:(我有两个相互连接的可排序列表.事情是列表'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)

请指导我错在哪里,谢谢

html css jquery jquery-ui

5
推荐指数
1
解决办法
2197
查看次数

通过JavaScript SDK在Facebook中无法使用电子邮件权限

我正在尝试这个脚本:

FB.login({scope: 'email'},function(response){
                if(response.status == 'connected'){
                    alert('I am connected')
                }
            });
Run Code Online (Sandbox Code Playgroud)

但它不是要求用户给予电子邮件权限.. :(

我尝试了范围和烫发作为参数.

参考文献:

javascript api facebook

2
推荐指数
1
解决办法
6592
查看次数

mysql,通过codeigniter进行区分大小写的比较

我想通过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)

codeigniter

1
推荐指数
1
解决办法
1万
查看次数

1
推荐指数
1
解决办法
5445
查看次数

无法将文件写入Windows 7中的Application.StartupPath

我创建了一个winform应用程序,然后创建了该应用程序的设置.此应用程序在Application.StartupPath中记录文件中的一些信息.不幸的是,当我尝试写入"访问被拒绝"文件时,我遇到了异常.请指导我如何摆脱它..

谢谢

c# installation uac exception winforms

1
推荐指数
2
解决办法
2068
查看次数