Question: Which of the following cases affirmed a defendant's right to have a competency evaluation before trial: Aptheker v. Secretary of State or Dusky v. United States?

Context articles: Pepper v. United States
Adjudicative competence
Ajaxo Inc. v. E*Trade Financial Corp.
Clark v. Arizona
Drope v. Missouri
Dusky v. United States
Holmes v. South Carolina
Aptheker v. Secretary of State
People v. Marsden
Competency evaluation (law)

Pepper v. United States, 562 U.S. 476 (2011), is a decision by the Supreme Court of the United States concerning whether a United States District Court properly handled the sentencing of a former methamphetamine dealer.
 He was originally sentenced to 24 months in prison, far shorter than what federal guidelines generally specify for crimes of that nature.
 Prosecutors appealed the case to the United States Court of Appeals for the Eighth Circuit, which remanded the case back to the United States District Court for the Northern District of Iowa, which affirmed the original sentence after testimony relating the defendant's rehabilitation.
 The case was appealed to the Eighth Circuit again, and was again remanded.
 A different District Court judge gave him a 65-month sentence.
 The defendant then brought the case back to the Eighth Circuit, which confirmed the later ruling, and to then to the Supreme Court.
 Sonia Sotomayor wrote the opinion of the court, which ruled in favor of the defendant.
Adjudicative competence, also referred to as competence to stand trial, is a legal construct describing the criminal defendant's ability to understand and participate in legal proceedings.
 This includes the defendant's current ability to participate in various pleas and waivers of rights.
 It is unrelated to any possibility of an insanity plea.
 It is also unrelated to the ability of the defendant to represent himself, or to any evaluation of mitigation factors.
 The definition of adjudicative competence was provided by the United States Supreme Court in Dusky v. United States.
Ajaxo Inc. v. E*Trade Financial Corp., 187 Cal.App.4th 1295 (2010), is the second appeal on a dispute dated back to 1999.
 During the original 2000 case, defendant E*Trade, an online financial services company, was found liable for maliciously and willfully misappropriating trade secrets pertaining to wireless stock trading technology acquired from the plaintiff, Ajaxo.
 Under the Uniform Trade Secrets Act E*Trade was required under a mutually signed Non-disclosure agreement (NDA) to keep Ajaxo’s trade secrets confidential.
 After a jury trial in 2003, E*Trade was fined $1.3 million to be paid to Ajaxo for the misappropriation and breach of NDA.
 The court denied Ajaxo’s request for additional damages.
 All parties appealed.
 In 2005 the California courts of appeal affirmed the original ruling but remanded the case back to the trial court to determine additional damages.
 A jury verdict in 2008 rejected claims raised and demands for royalty damages from Ajaxo.
 In trade secret cases it is common for a plaintiff to seek royalty damages when they are unable to show an actual loss or that the defendant received some inequitable benefit from the misappropriation.
 In this case the court refused to allow evidence of royalty damages, claiming there were no net damages.
 Ajaxo appealed.
 In 2010 the California courts of appeal once again remanded the case back to the trial court reasoning that in such cases an exact quantitative measure of wrongful enrichment damages incurred by the plaintiff might not be sufficient to reject the claim of reasonable royalties based damages
Clark v. Arizona, 548 U.S. 735 (2006) , is a United States Supreme Court case in which the Court upheld the constitutionality of the insanity defense used by the State of Arizona.
 The ruling affirmed the murder conviction of a man with paranoid schizophrenia, for the killing of a police officer.
 The man had argued that his inability to understand the nature of his acts at the time they were committed should be a sufficient basis for showing he lacked the requisite mental state required as an element of the charged crime.
 The Court upheld Arizona's restriction of admissible mental health evidence only to the issue of insanity.
 Arizona does not allow mental health evidence to show that the defendant did not possess the required mental intent level necessary to satisfy an element of the crime.
 The evidence is only admissible if used to show that the defendant was insane at the time of the crime's commission.
 In this case, the defendant knew right from wrong so he could not qualify under Arizona's insanity defense.
Drope v. Missouri, 420 U.S. 162 (1975) , is a United States Supreme Court case in which the court decided whether a trial court deprived a defendant of due process by failing to order a competency examination after he was hospitalized following an attempted suicide and as a result missed a portion of his trial for a capital offense.
Dusky v. United States, 362 U.S. 402 (1960) , was a landmark United States Supreme Court case in which the Court affirmed a defendant's right to have a competency evaluation before proceeding to trial.
 The Court outlined the basic standards for determining competency.
Holmes v. South Carolina, 547 U.S. 319 (2006), was a decision by the United States Supreme Court involving the right of a criminal defendant to present evidence that a third party instead committed the crime.
 The Court vacated the rape and murder conviction in South Carolina of a man who had been denied the opportunity to present evidence of a third party's guilt, because the trial court believed the prosecutor's forensic evidence was too strong for the defendant's evidence to raise an inference of innocence.
 The Court ruled unanimously that this exclusion violated the right of a defendant to have a meaningful opportunity to present a complete defense, because the strength of a prosecutor's case had no logical relationship to whether a defendant's evidence was too weak to be admissible.
Aptheker v. Secretary of State, 378 U.S. 500 (1964) , was a landmark United States Supreme Court case on the right to travel and passport restrictions as they relate to Fifth Amendment due process rights and First Amendment free speech, freedom of assembly and freedom of association rights.
 It is the first case in which the US Supreme Court considered the constitutionality of personal restrictions on the right to travel abroad.
People v. Marsden is a 1970 California Supreme Court decision that held it was error for the trial court to deny a defendant's motion to relieve his court-appointed counsel without holding a hearing to allow the defendant to explain his grounds.
 The trial court had denied the motion based on the trial judge's own observations of the proceedings and belief that the attorney was providing effective representation.
 Criminal defendants in the United States have the right to appointed counsel if they cannot afford to hire an attorney under the Sixth Amendment as interpreted by the United States Supreme Court case Gideon v. Wainwright.
In the United States criminal justice system, a competency evaluation is an assessment of the ability of a defendant to understand and rationally participate in a court process.