我想按月分组一些帐户,我能用Realm.io做这个吗?
public class Account extends RealmObject {
.....
private Date date;
}
RealmResults accounts = realm.where(Account.class)
.beginGroup()
.equalTo("date", "MONTH(date)")//<----- wrong code
.endGroup()
.findAll();
Run Code Online (Sandbox Code Playgroud)
谢谢
我正在开发一个AngularJs应用程序,它在视图中集成了fb-like.它只适用于第一次,如果我也刷新浏览器,当我导航到其他视图并回来时插件不起作用.
我已经创建了一个指令.
angular.module('myApp.directives', []).directive('fbLike',['$timeout', function($timeout) {
return {
restrict: 'A',
scope: {},
template: "<div class=\"fb-like-box\" data-href=\"{{page}}\" data-width=\"{{width}}\" data-show-faces=\"{{faces}}\" data-height=\"{{height}}\" data-show-border=\"{{border}}\" data-stream=\"{{stream}}\" data-header=\"{{header}}\"></div>",
link: function($scope, $element, $attrs) {
var working, _ref, _ref1;
$scope.page ="https://www.facebook.com/company_name";
$scope.border = false;
$scope.height = (_ref = $attrs.fbHeight) != null ? _ref : '260';
$scope.faces = $attrs.fbFaces != null ? $attrs.fbFaces : 'false';
$scope.stream = $attrs.fbStream != null ? $attrs.fbStream : 'true';
$scope.header = $attrs.fbHeader != null ? $attrs.fbHeader : 'false';
$scope.width = (_ref1 = $attrs.fbWidth) != …Run Code Online (Sandbox Code Playgroud) 我有一个具有不同内容的ng-switch,其中一个是Gallery,我必须在切换ng-switch-when = gallery内容准备好之后将JQuery事件设置为所有图像,但不幸运,因为它正在触发事件之前内容已加载.
画廊是第三个ng-switch-when所以我不能用ng-init设置事件.
那么,ng-switch是否有内容加载的事件或指令?
<a href="" ng-click="menuSelection='gallery';loadLibraryGallery();">GALERÍA</a>
Run Code Online (Sandbox Code Playgroud)
调节器
$scope.loadLibraryGallery = function(){
//I have to set this event to childrens after ng-switch-when=gallery is loaded
$('.popup-gallery').magnificPopup();
};
Run Code Online (Sandbox Code Playgroud)
任何的想法.求求你了,谢谢你.
我有一个ListView和它的适配器类扩展BaseAdapter.
我想为列表视图中的一个自定义部分设置动画.
我有部分动画,从右到左滑动 - 这是第一次非常好.
在适配器的方法中,与所示类似,为简洁起见:
public View getView(){
Animation an = AnimationUtils.loadAnimation(mContext, R.anim.transladar);
an.reset();
vi.startAnimation(an);
return vi;
}
Run Code Online (Sandbox Code Playgroud)
看起来不错,但是当我添加一个项目 chatAdapter.notifyDataSetChanged();被触发时刷新我的所有项目并重新启动动画.
我只想动画适配器本身的最后一项.
我希望你能帮助我.
android android-animation android-listview notifydatasetchanged