2014年02月

Question

If a trustor is declared incompetent by doctors, does it have mandatory review by a court in California?



Answer

Only if you ask for it by filing the right paperwork.



Answer

Some trusts provide for a successor trustee to take over if the Settlot/Trustor is no longer competent to act and often that is determined by having declarations from 2 doctors. The question is what is your role in this trust? If you are the trustor and feel that the trust is being taken from you improperly, then you might want to take one path of action; whereas, if you are the successor trustee then you might do something else. Finally, if you are a residual beneficiary, you may be entitled to accountings and other information going forward based on the trustor's incompetency. You need to meet with an attorney who can review the actual trust instrument and tell you what rights the various parties have.





Container view and click

I tried to use the library on GitHub :
https://github.com/mluton/EmbeddedSwapping



that allows me to have a container and put in the view controller .



I tried to put in a view controller a map , and I noticed that there is no recognized gesture or click, I also tried to put a button but it is as if there is a layer in front .



How can I do to make it interactive box ?



Thanks.





Code:



@interface AppuntamentiViewController ()
@property (nonatomic, weak) ContainerViewController *containerViewController;
@end

@implementation AppuntamentiViewController

@synthesize view_testata,btnCalendario,btnMappa,tabella,pickerData;

- (void)viewDidLoad {
[super viewDidLoad];

[AstColor setHeader:self.navigationController];
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"embedContainer"]) {
self.containerViewController = segue.destinationViewController;
}
}

- (IBAction)mappa:(id)sender
{
[self.containerViewController swapViewControllers:1];
}

- (IBAction)calendario:(id)sender
{
[self.containerViewController swapViewControllers:2];
}

@end




@interface ContainerViewController ()

@property (strong, nonatomic) NSString *currentSegueIdentifier;
@property (strong, nonatomic) MapViewController *firstViewController;
@property (strong, nonatomic) CalendarioViewController *secondViewController;
@property (assign, nonatomic) BOOL transitionInProgress;

@end

@implementation ContainerViewController

- (void)viewDidLoad
{
[super viewDidLoad];

self.transitionInProgress = NO;
self.currentSegueIdentifier = SegueIdentifierFirst;
[self performSegueWithIdentifier:self.currentSegueIdentifier sender:nil];
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{

// Instead of creating new VCs on each seque we want to hang on to existing
// instances if we have it. Remove the second condition of the following
// two if statements to get new VC instances instead.
if ([segue.identifier isEqualToString:SegueIdentifierFirst]) {
self.firstViewController = segue.destinationViewController;
}

if ([segue.identifier isEqualToString:SegueIdentifierSecond]) {
self.secondViewController = segue.destinationViewController;
}

// If we're going to the first view controller.
if ([segue.identifier isEqualToString:SegueIdentifierFirst]) {
// If this is not the first time we're loading this.
if (self.childViewControllers.count > 0) {
[self swapFromViewController:[self.childViewControllers objectAtIndex:0] toViewController:self.firstViewController];
}
else {
// If this is the very first time we're loading this we need to do
// an initial load and not a swap.
[self addChildViewController:segue.destinationViewController];
UIView* destView = ((UIViewController *)segue.destinationViewController).view;
destView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
destView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
[self.view addSubview:destView];
[segue.destinationViewController didMoveToParentViewController:self];
}
}
// By definition the second view controller will always be swapped with the
// first one.
else if ([segue.identifier isEqualToString:SegueIdentifierSecond]) {
[self swapFromViewController:[self.childViewControllers objectAtIndex:0] toViewController:self.secondViewController];
}
}

- (void)swapFromViewController:(UIViewController *)fromViewController toViewController:(UIViewController *)toViewController
{

toViewController.view.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);

[fromViewController willMoveToParentViewController:nil];
[self addChildViewController:toViewController];

[self transitionFromViewController:fromViewController toViewController:toViewController duration:1.0 options:UIViewAnimationOptionTransitionCrossDissolve animations:nil completion:^(BOOL finished) {
[fromViewController removeFromParentViewController];
[toViewController didMoveToParentViewController:self];
self.transitionInProgress = NO;
}];
}

- (void)swapViewControllers :(int) numero
{

if (self.transitionInProgress) {
return;
}


self.currentSegueIdentifier = ([self.currentSegueIdentifier isEqualToString:SegueIdentifierFirst]) ? SegueIdentifierSecond : SegueIdentifierFirst;

if (numero == 1 && ([self.currentSegueIdentifier isEqualToString:SegueIdentifierFirst]) && self.firstViewController) {
self.transitionInProgress = YES;
if(!self.firstViewController)
[self performSegueWithIdentifier:self.currentSegueIdentifier sender:nil];
else
[self swapFromViewController:self.secondViewController toViewController:self.firstViewController];
return;
}

if (numero == 2 && ([self.currentSegueIdentifier isEqualToString:SegueIdentifierSecond])) {
self.transitionInProgress = YES;
if(!self.secondViewController)
[self performSegueWithIdentifier:self.currentSegueIdentifier sender:nil];
else
[self swapFromViewController:self.firstViewController toViewController:self.secondViewController];
return;
}
}

@end




#import "MapViewController.h"

@interface MapViewController ()

@end

@implementation MapViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}




#import "CalendarioViewController.h"

@interface CalendarioViewController ()

@end

@implementation CalendarioViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end




sort a vector of vectors in c++ by size of each vector [duplicate]

This question already has an answer here:




Sorting a vector of custom objects

7 answers

Answers

You just need to specify a predicate:



vector<vector<int>> vecs;
vecs.push_back(vector<int>(4));
vecs.push_back(vector<int>(2));
vecs.push_back(vector<int>(1));
vecs.push_back(vector<int>(3));

std::sort(vecs.begin(), vecs.end(), [](const vector<int> & a, const vector<int> & b){ return a.size() < b.size(); });


This code sorts the vectors by smallest to largest.





Cloudinary Change Public ID

I have been using Cloudinary to store images, and I want to change the public ID scheme I've been using. Is there any way to update the current public IDs to new ones using the admin API?



For example, if I have an image with a public ID of 1, can I change it to 2 without re-uploading the photo?



Answers

You can accomplish this by using the rename API.
For more information (in Rails):
http://cloudinary.com/documentation/rails_image_upload#rename_images





Get keyboard shortcut entered in Revit

I have a Revit plug in that gets the command that a user activated from the ribbon bar. I now need to do the same when the user types a shortcut sequence. What event should I be using to intercept this?



Answers

don't believe that will be possible using Revit API, but you may track the keys events for the shortcut you need...





↑このページのトップヘ