我有一个列表,其中包含另一个值列表id,start,finish,value。我希望得到一个只有值的数组。我怎么能在python中做到这一点?
示例列表:
Application.directive('rangepicker', function() {
return {
restrict: 'A',
require: 'ngModel', // added the ngmodel requirement
scope : {
ngModel: "="
}, // also added this, which if i understood well
// makes the 2 way data binding possible
link: function(scope, element, attrs) {
$(element).datepicker({
format: 'yyyy-mm-dd'
});
$(element).on('changeDate', function(){
var values = $(element).find('input');
var interval = {
start : values[0].value,
end : values[1].value
}
scope.$apply(function(){
// and here i update the given model scope (packer.selected.data)
scope.ngModel = interval;
});
})
}
};
});
想要:
[[id, start, finish, value], [id, start, finish, value], [id], [start], [finish], [value]]
答案 0 :(得分:3)
view = MKPinAnnotationView(annotation: annotation, reuseIdentifier: identifier)
view.canShowCallout = true
view.calloutOffset = CGPoint(x: -5, y: 5)
view.rightCalloutAccessoryView = UIButton.buttonWithType(.DetailDisclosure) as! UIView
}
view.image = UIImage(named:"your_image")
view.frame.size = CGSize(width: 30.0, height: 30.0) //not necessary but just to give you an idea how to resize just in case it is too large.