text:
Q: Android Studio, Button onClick This issue was specific to an older version of ANDROID studio. But is no longer a problem for Android 0.8.1.   I may delete the question completely.
I am still experimenting with Android Studio.  I just upgraded to Version 0.2.13, which I understand had some upgrade issues.  I wrestled through them... but I have an issue with Buttons that I did not have prior to the upgrade.
The Button on Click event is giving me this error in the Properties section.
Error getting value: ContentElementType: FILE; file:HtmlFile:incognito_mode_start_page.html Boolean.TRUE.equals

Prior to this version, I would just type in what I wanted to call my click Handler and there would be no problems.  Now,  I can not even select this field in the Properties inspector.
I have also tried to Manually change the onClick handler... but AS will switch my code back to ""
this is what i have so far...
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="New Button"
    android:id="@+id/button"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:onClick="<unset>" />

WHAT I HAVE TRIED SO FAR... With no luck
I have also tried restarting AS
I have tried creating a new ACTIVITY, confirming that it has both a class and Layout file.  and working from that...
I have Manually changed the line android:onClick="<unset>" /> to android:onClick="doSomething" />
and added a doSomething function in my code.
/////////////////////////////////////
I just noticed this on startup...  I think this is related...
java.lang.AssertionError: ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false: java.lang.AssertionError: ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false
java.util.concurrent.ExecutionException: java.lang.AssertionError: ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at com.intellij.concurrency.PrioritizedFutureTask.access$301(PrioritizedFutureTask.java:32)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:79)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:115)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.AssertionError: ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false
    at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:996)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:47)
    at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:245)
    at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:236)
    at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
    at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:236)
    at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:210)
    at com.intellij.psi.stubs.StubIndex.safeGet(StubIndex.java:73)
    at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:48)
    at com.intellij.psi.impl.file.impl.JavaFileManagerBase.findClasses(JavaFileManagerBase.java:133)
    at com.intellij.psi.impl.JavaPsiFacadeImpl$PsiElementFinderImpl.findClasses(JavaPsiFacadeImpl.java:297)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.findClasses(JavaPsiFacadeImpl.java:147)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.resolveClassPreferringMyJar(ClsJavaCodeReferenceElementImpl.java:187)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.resolveElement(ClsJavaCodeReferenceElementImpl.java:182)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.advancedResolveImpl(ClsJavaCodeReferenceElementImpl.java:103)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.access$000(ClsJavaCodeReferenceElementImpl.java:40)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl$Resolver.resolve(ClsJavaCodeReferenceElementImpl.java:96)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl$Resolver.resolve(ClsJavaCodeReferenceElementImpl.java:90)
    at com.intellij.psi.impl.source.resolve.ResolveCache$2.compute(ResolveCache.java:106)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:110)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:103)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:131)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.multiResolve(ClsJavaCodeReferenceElementImpl.java:151)
    at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.advancedResolve(ClsJavaCodeReferenceElementImpl.java:141)
    at com.intellij.psi.impl.source.PsiClassReferenceType.resolveGenerics(PsiClassReferenceType.java:140)
    at com.intellij.psi.impl.source.PsiClassReferenceType.resolve(PsiClassReferenceType.java:89)
    at com.intellij.psi.impl.PsiClassImplUtil.resolveClassReferenceList(PsiClassImplUtil.java:905)
    at com.intellij.psi.impl.PsiClassImplUtil.getSupersInner(PsiClassImplUtil.java:776)
    at com.intellij.psi.impl.PsiClassImplUtil.getSupers(PsiClassImplUtil.java:734)
    at com.intellij.psi.impl.compiled.ClsClassImpl.getSupers(ClsClassImpl.java:138)
    at com.intellij.psi.impl.InheritanceImplUtil.isInheritorWithoutCaching(InheritanceImplUtil.java:170)
    at com.intellij.psi.impl.InheritanceImplUtil.isInheritor(InheritanceImplUtil.java:127)
    at com.intellij.psi.impl.InheritanceImplUtil.checkInheritor(InheritanceImplUtil.java:194)
    at com.intellij.psi.impl.InheritanceImplUtil.checkInheritor(InheritanceImplUtil.java:176)
    at com.intellij.psi.impl.InheritanceImplUtil.isInheritorWithoutCaching(InheritanceImplUtil.java:170)
    at com.intellij.psi.impl.InheritanceImplUtil.isInheritor(InheritanceImplUtil.java:127)
    at com.intellij.psi.impl.InheritanceImplUtil.isInheritor(InheritanceImplUtil.java:57)
    at com.intellij.psi.impl.source.PsiClassImpl.isInheritor(PsiClassImpl.java:650)
    at com.intellij.psi.util.InheritanceUtil.isInheritorOrSelf(InheritanceUtil.java:45)
    at com.intellij.psi.impl.ElementPresentationUtil.getClassKindImpl(ElementPresentationUtil.java:135)
    at com.intellij.psi.impl.ElementPresentationUtil.access$000(ElementPresentationUtil.java:36)
    at com.intellij.psi.impl.ElementPresentationUtil$1.compute(ElementPresentationUtil.java:107)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:200)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
    at com.intellij.psi.impl.ElementPresentationUtil.getClassKind(ElementPresentationUtil.java:112)
    at com.intellij.psi.impl.ElementPresentationUtil.getFlags(ElementPresentationUtil.java:51)
    at com.intellij.psi.impl.ElementPresentationUtil.createLayeredIcon(ElementPresentationUtil.java:63)
    at com.intellij.psi.impl.PsiClassImplUtil$2.fun(PsiClassImplUtil.java:323)
    at com.intellij.psi.impl.PsiClassImplUtil$2.fun(PsiClassImplUtil.java:314)
    at com.intellij.ui.IconDeferrerImpl.defer(IconDeferrerImpl.java:77)
    at com.intellij.psi.impl.PsiClassImplUtil.getClassIcon(PsiClassImplUtil.java:342)
    at com.intellij.psi.impl.PsiClassImplUtil.getClassIcon(PsiClassImplUtil.java:329)
    at com.intellij.psi.impl.source.PsiClassImpl.getElementIcon(PsiClassImpl.java:665)
    at com.intellij.psi.impl.ElementBase.computeIconNow(ElementBase.java:136)
    at com.intellij.psi.impl.ElementBase.access$000(ElementBase.java:52)
    at com.intellij.psi.impl.ElementBase$1.fun(ElementBase.java:62)
    at com.intellij.psi.impl.ElementBase$1.fun(ElementBase.java:56)
    at com.intellij.ui.IconDeferrerImpl.defer(IconDeferrerImpl.java:77)
    at com.intellij.psi.impl.ElementBase.computeIcon(ElementBase.java:124)
    at com.intellij.psi.impl.ElementBase.getIcon(ElementBase.java:89)
    at com.intellij.ide.JavaFileIconPatcher.replaceIcon(JavaFileIconPatcher.java:71)
    at com.intellij.ide.JavaFileIconPatcher.patchIcon(JavaFileIconPatcher.java:44)
    at com.intellij.util.IconUtil$1.fun(IconUtil.java:139)
    at com.intellij.util.IconUtil$1.fun(IconUtil.java:121)
    at com.intellij.ui.DeferredIconImpl$2$1.run(DeferredIconImpl.java:103)
    at com.intellij.ui.IconDeferrerImpl.evaluateDeferred(IconDeferrerImpl.java:112)
    at com.intellij.ui.DeferredIconImpl$2$2.run(DeferredIconImpl.java:118)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1171)
    at com.intellij.ui.DeferredIconImpl$2.run(DeferredIconImpl.java:115)
    at com.intellij.concurrency.JobLauncherImpl$2.call(JobLauncherImpl.java:139)
    at com.intellij.concurrency.JobLauncherImpl$2.call(JobLauncherImpl.java:135)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:32)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:72)
    ... 4 more

java.lang.AssertionError: ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false
    at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:996)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:47)
    at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:245)
    at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:236)
    at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
    at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:236)
    at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:210)
    at com.intellij.psi.stubs.StubIndex.safeGet(StubIndex.java:73)
    at com.intellij.psi.impl.java.stubs.index.JavaSuperClassNameOccurenceIndex.get(JavaSuperClassNameOccurenceIndex.java:49)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:107)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:104)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:939)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:104)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:48)
    at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
    at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:77)
    at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
    at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
    at com.intellij.psi.search.searches.ClassInheritorsSearch.processInheritors(ClassInheritorsSearch.java:278)
    at com.intellij.psi.search.searches.ClassInheritorsSearch.access$100(ClassInheritorsSearch.java:46)
    at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:75)
    at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:53)
    at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
    at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:77)
    at org.jetbrains.android.facet.AndroidFacet.fillMap(AndroidFacet.java:979)
    at org.jetbrains.android.facet.AndroidFacet.getInitialClassMap(AndroidFacet.java:946)
    at org.jetbrains.android.facet.AndroidFacet.getClassMap(AndroidFacet.java:892)
    at org.jetbrains.android.dom.AndroidDomElementDescriptorProvider.getDescriptor(AndroidDomElementDescriptorProvider.java:62)
    at org.jetbrains.android.dom.AndroidDomElementDescriptorProvider.getDescriptor(AndroidDomElementDescriptorProvider.java:91)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.computeElementDescriptor(XmlTagImpl.java:461)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.getDescriptor(XmlTagImpl.java:446)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.checkTagByDescriptor(XmlHighlightVisitor.java:284)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.checkTag(XmlHighlightVisitor.java:164)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.visitXmlToken(XmlHighlightVisitor.java:128)
    at com.intellij.psi.impl.source.xml.XmlTokenImpl.accept(XmlTokenImpl.java:44)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.visit(XmlHighlightVisitor.java:724)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$5.run(GeneralHighlightingPass.java:300)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:419)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:65)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$7.run(GeneralHighlightingPass.java:425)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:87)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:422)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:65)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$7.run(GeneralHighlightingPass.java:425)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:734)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:422)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:65)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$7.run(GeneralHighlightingPass.java:425)
    at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:298)
    at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:163)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:422)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:378)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:218)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:86)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:357)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1171)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:348)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:345)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:321)
    at com.intellij.concurrency.JobLauncherImpl$2.call(JobLauncherImpl.java:139)
    at com.intellij.concurrency.JobLauncherImpl$2.call(JobLauncherImpl.java:135)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:32)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:72)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:115)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)

-----------------------------------  a second stack of errors....
    ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false: ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false
java.lang.AssertionError: ContentElementType: FILE; file: HtmlFile:incognito_mode_start_page.html
    Boolean.TRUE.equals(getUserData(BUILDING_STUB)) = false
    getTreeElement() = Element(FILE)
    vFile instanceof VirtualFileWithId = true
    StubUpdatingIndex.canHaveStub(vFile) = false
    at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:996)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:47)
    at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:245)
    at com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:236)
    at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
    at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:236)
    at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:210)
    at com.intellij.psi.stubs.StubIndex.safeGet(StubIndex.java:73)
    at com.intellij.psi.impl.java.stubs.index.JavaSuperClassNameOccurenceIndex.get(JavaSuperClassNameOccurenceIndex.java:49)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:107)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher$5.compute(JavaDirectInheritorsSearcher.java:104)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:939)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:104)
    at com.intellij.psi.impl.search.JavaDirectInheritorsSearcher.execute(JavaDirectInheritorsSearcher.java:48)
    at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
    at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:77)
    at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
    at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
    at com.intellij.psi.search.searches.ClassInheritorsSearch.processInheritors(ClassInheritorsSearch.java:278)
    at com.intellij.psi.search.searches.ClassInheritorsSearch.access$100(ClassInheritorsSearch.java:46)
    at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:75)
    at com.intellij.psi.search.searches.ClassInheritorsSearch$1.execute(ClassInheritorsSearch.java:53)
    at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:43)
    at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:77)
    at org.jetbrains.android.facet.AndroidFacet.fillMap(AndroidFacet.java:979)
    at org.jetbrains.android.facet.AndroidFacet.getInitialClassMap(AndroidFacet.java:946)
    at org.jetbrains.android.facet.AndroidFacet.getClassMap(AndroidFacet.java:892)
    at org.jetbrains.android.dom.AndroidDomElementDescriptorProvider.getDescriptor(AndroidDomElementDescriptorProvider.java:62)
    at org.jetbrains.android.dom.AndroidDomElementDescriptorProvider.getDescriptor(AndroidDomElementDescriptorProvider.java:91)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.computeElementDescriptor(XmlTagImpl.java:461)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.getDescriptor(XmlTagImpl.java:446)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.checkTagByDescriptor(XmlHighlightVisitor.java:284)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.checkTag(XmlHighlightVisitor.java:164)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.visitXmlToken(XmlHighlightVisitor.java:128)
    at com.intellij.psi.impl.source.xml.XmlTokenImpl.accept(XmlTokenImpl.java:44)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.visit(XmlHighlightVisitor.java:724)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$5.run(GeneralHighlightingPass.java:300)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:419)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:65)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$7.run(GeneralHighlightingPass.java:425)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:87)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:422)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:65)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$7.run(GeneralHighlightingPass.java:425)
    at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:734)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:422)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:65)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$7.run(GeneralHighlightingPass.java:425)
    at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:298)
    at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:163)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:422)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:378)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:218)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:86)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:357)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1171)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:348)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:345)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:321)
    at com.intellij.concurrency.JobLauncherImpl$2.call(JobLauncherImpl.java:139)
    at com.intellij.concurrency.JobLauncherImpl$2.call(JobLauncherImpl.java:135)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:32)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:72)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:115)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)

A: I had the same issue, after googling around I found the answer to be simply Invalidating the cache and then restarting Android Studio. File > Invalidate Cache / Restart. Then from the dialog choose "Invalidate and restart"

A: File > Invalidate Cache / Restart. its works for me


text:
Q: jsTree search plugin and special chars I have nodes with special chars like ą š ų ū and if I search for uxx it will NOT return ūxx or ųxxx, search plugn match exact match, how to change that?
Current code snippet for searching:
$('#tree_search').keyup(function(){

        if(to) { clearTimeout(to); }

        to = setTimeout(function () {
            var v = $('#tree_search').val();
            $('#tree-wrap').jstree(false).search(v);
        },250);

    });

UPDATE: so I manage to insert callback function but in this function only last element of array working as expected ė == e so I think this is for loop issue but can't figure out what exactly...
var defaultDiacriticsRemovalMap = [
{'base':'z','letters':/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g},
{'base':'e', 'letters':/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g}
];

var tempSearchString;

for( var i = 0; i < defaultDiacriticsRemovalMap.length; i++ ) {
    tempSearchString = searchString.replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base).toLowerCase();
}

var text = node.text;

for( var i = 0; i < defaultDiacriticsRemovalMap.length; i++ ) {
    text = (node.text || '').replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base).toLowerCase();
}

return ((text || '').indexOf(tempSearchString) != -1)

A: Here is what i use in my code to escape accents (Warning: huge diacritics array) :
search_callback : function(searchString, node) {
        var defaultDiacriticsRemovalMap = [
            {'base':'A', 'letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},
            {'base':'AA','letters':/[\uA732]/g},
            {'base':'AE','letters':/[\u00C6\u01FC\u01E2]/g},
            {'base':'AO','letters':/[\uA734]/g},
            {'base':'AU','letters':/[\uA736]/g},
            {'base':'AV','letters':/[\uA738\uA73A]/g},
            {'base':'AY','letters':/[\uA73C]/g},
            {'base':'B', 'letters':/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},
            {'base':'C', 'letters':/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},
            {'base':'D', 'letters':/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},
            {'base':'DZ','letters':/[\u01F1\u01C4]/g},
            {'base':'Dz','letters':/[\u01F2\u01C5]/g},
            {'base':'E', 'letters':/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},
            {'base':'F', 'letters':/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},
            {'base':'G', 'letters':/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},
            {'base':'H', 'letters':/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},
            {'base':'I', 'letters':/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},
            {'base':'J', 'letters':/[\u004A\u24BF\uFF2A\u0134\u0248]/g},
            {'base':'K', 'letters':/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},
            {'base':'L', 'letters':/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},
            {'base':'LJ','letters':/[\u01C7]/g},
            {'base':'Lj','letters':/[\u01C8]/g},
            {'base':'M', 'letters':/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},
            {'base':'N', 'letters':/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},
            {'base':'NJ','letters':/[\u01CA]/g},
            {'base':'Nj','letters':/[\u01CB]/g},
            {'base':'O', 'letters':/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},
            {'base':'OI','letters':/[\u01A2]/g},
            {'base':'OO','letters':/[\uA74E]/g},
            {'base':'OU','letters':/[\u0222]/g},
            {'base':'P', 'letters':/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},
            {'base':'Q', 'letters':/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},
            {'base':'R', 'letters':/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},
            {'base':'S', 'letters':/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},
            {'base':'T', 'letters':/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},
            {'base':'TZ','letters':/[\uA728]/g},
            {'base':'U', 'letters':/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},
            {'base':'V', 'letters':/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},
            {'base':'VY','letters':/[\uA760]/g},
            {'base':'W', 'letters':/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},
            {'base':'X', 'letters':/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},
            {'base':'Y', 'letters':/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},
            {'base':'Z', 'letters':/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},
            {'base':'a', 'letters':/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},
            {'base':'aa','letters':/[\uA733]/g},
            {'base':'ae','letters':/[\u00E6\u01FD\u01E3]/g},
            {'base':'ao','letters':/[\uA735]/g},
            {'base':'au','letters':/[\uA737]/g},
            {'base':'av','letters':/[\uA739\uA73B]/g},
            {'base':'ay','letters':/[\uA73D]/g},
            {'base':'b', 'letters':/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},
            {'base':'c', 'letters':/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},
            {'base':'d', 'letters':/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},
            {'base':'dz','letters':/[\u01F3\u01C6]/g},
            {'base':'e', 'letters':/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},
            {'base':'f', 'letters':/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},
            {'base':'g', 'letters':/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},
            {'base':'h', 'letters':/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},
            {'base':'hv','letters':/[\u0195]/g},
            {'base':'i', 'letters':/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},
            {'base':'j', 'letters':/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},
            {'base':'k', 'letters':/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},
            {'base':'l', 'letters':/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},
            {'base':'lj','letters':/[\u01C9]/g},
            {'base':'m', 'letters':/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},
            {'base':'n', 'letters':/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},
            {'base':'nj','letters':/[\u01CC]/g},
            {'base':'o', 'letters':/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},
            {'base':'oi','letters':/[\u01A3]/g},
            {'base':'ou','letters':/[\u0223]/g},
            {'base':'oo','letters':/[\uA74F]/g},
            {'base':'p','letters':/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},
            {'base':'q','letters':/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},
            {'base':'r','letters':/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},
            {'base':'s','letters':/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},
            {'base':'t','letters':/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},
            {'base':'tz','letters':/[\uA729]/g},
            {'base':'u','letters':/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},
            {'base':'v','letters':/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},
            {'base':'vy','letters':/[\uA761]/g},
            {'base':'w','letters':/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},
            {'base':'x','letters':/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},
            {'base':'y','letters':/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},
            {'base':'z','letters':/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}
        ];
        var tempSearchString = searchString.toLowerCase();
        for(var i=0; i<defaultDiacriticsRemovalMap.length; i++) {
            tempSearchString = tempSearchString.replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base);
        }
        var text = (node.text || '').toLowerCase();
        for(var i=0; i<defaultDiacriticsRemovalMap.length; i++) {
            text = text.replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base);
        }
        return text.indexOf(tempSearchString) != -1;

    }

A bit of an explanation:
The search_callback is called on every node of the jsTree and the node itself is passed as an argument to the function.
We loop through the search text string to remove the accents first and replace them with the base.
Then we do the same for the node text and finally we can easily compare them using nodeText.indexOf(searchString). If the searchString is not in the nodeText, it returns -1.
The .toLowerCase() is facultative. In my case, we wanted to ignore the capital letters too.
edit: Forgot to mention that tempSearchString was assigned with the seachString because we use the variable itself while looping to replace the accents with their matching base.

A: Working solution:
"search" : {
            "show_only_matches" : true,
            "fuzzy" : false,
            "search_leaves_only" : true,
            search_callback: function(searchString, node) {

                var defaultDiacriticsRemovalMap = [
                    {'base':'a', 'letters':/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},
                    {'base':'c', 'letters':/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},
                    {'base':'i', 'letters':/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},
                    {'base':'s', 'letters':/[\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},
                    {'base':'u', 'letters':/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},
                    {'base':'z', 'letters':/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g},
                    {'base':'e', 'letters':/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g}
                ];

                var tempSearchString;

                for( var i = 0; i < defaultDiacriticsRemovalMap.length; i++ ) {
                    tempSearchString = searchString.replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base).toLowerCase();
                }

                var text = node.text;

                for( var i = 0; i < defaultDiacriticsRemovalMap.length; i++ ) {
                    text = text.replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base).toLowerCase();
                }

                return ((text || '').indexOf(tempSearchString) != -1)

            }
        },

redpajama_set_name: RedPajamaStackExchange


text:
Q: Not going to next activity when clicking on item in listview. I am new to android, using sqlite to insert data in database, and use these data on custom list view. The problem occurs when I edit the data with edit button in next activity show the row string but, in every row edit but show the data of 1st row string..
 by image u can esily understand:

I want the row name in new activity page while i click on edit..
delete row when i press delete .. help me..
editlist java file
public class EditLIST extends Activity {

    private AndroidSQLite mySQLiteAdapter ;
final static String EXTRA_MESSAGE = "edit.list.message";
 public void onClick (View view) {

     Intent intent = new Intent (this,display.class);
     TextView textView=(TextView) findViewById(R.id.textView1);
     String message=textView.getText().toString();

     //data.putString("thetext",text);
     intent.putExtra(EXTRA_MESSAGE,message);
     startActivity(intent);
}
  @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_edit_list);
        ListView listContent = (ListView)findViewById(R.id.listView1);

        mySQLiteAdapter = new AndroidSQLite(this);
        mySQLiteAdapter.openToWrite();
      mySQLiteAdapter.deleteAll();

       mySQLiteAdapter.insert("umesh");
       mySQLiteAdapter.insert("kalpesh");
       mySQLiteAdapter.insert("manish");

        mySQLiteAdapter.close();

        mySQLiteAdapter = new AndroidSQLite(this);
        mySQLiteAdapter.openToRead();

        Cursor cursor = mySQLiteAdapter.queueAll();
        startManagingCursor(cursor);

        String[] from = new String[]{AndroidSQLite.KEY_FNAME};
        int[] to = new int[]{R.id.textView1};

        SimpleCursorAdapter cursorAdapter =
         new SimpleCursorAdapter(this, R.layout.button, cursor, from, to);

                  listContent.setAdapter(cursorAdapter);

    }

    }

AndroidSQLite.java file
package edit.list;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class AndroidSQLite {

public static final String MYDATABASE_NAME = "abncd";
public static final String MYDATABASE_TABLE = "zxc";
public static final int MYDATABASE_VERSION = 1;
public static final String KEY_ID = "_id";
public static final String KEY_FNAME = "FNAME";

//create table MY_DATABASE (ID integer primary key, Content text not null);
private static final String SCRIPT_CREATE_DATABASE =
"create table " + MYDATABASE_TABLE + " ("
+ KEY_ID + " integer primary key autoincrement, "
+ KEY_FNAME + " text not null);";

private SQLiteHelper sqLiteHelper;
private SQLiteDatabase sqLiteDatabase;

private Context context;

public AndroidSQLite(Context c){
context = c;
}

public AndroidSQLite openToRead() throws android.database.SQLException {
sqLiteHelper = new SQLiteHelper(context, MYDATABASE_NAME, null, MYDATABASE_VERSION);
sqLiteDatabase = sqLiteHelper.getReadableDatabase();
return this;
}

public AndroidSQLite openToWrite() throws android.database.SQLException {
sqLiteHelper = new SQLiteHelper(context, MYDATABASE_NAME, null, MYDATABASE_VERSION);
sqLiteDatabase = sqLiteHelper.getWritableDatabase();
return this;
}

public void close(){
sqLiteHelper.close();
}

public long insert(String fname){

ContentValues contentValues = new ContentValues();

contentValues.put(KEY_FNAME, fname);

return sqLiteDatabase.insert(MYDATABASE_TABLE, null, contentValues);
}

public int deleteAll(){
return sqLiteDatabase.delete(MYDATABASE_TABLE, null, null);
}

public Cursor queueAll(){
String[] columns = new String[]{KEY_ID, KEY_FNAME};
Cursor cursor = sqLiteDatabase.query(MYDATABASE_TABLE, columns,
  null, null, null, null, null);

return cursor;
}

public class SQLiteHelper extends SQLiteOpenHelper {

public SQLiteHelper(Context context, String name,
  CursorFactory factory, int version) {
 super(context, name, factory, version);
}

@Override
public void onCreate(SQLiteDatabase db) {
 // TODO Auto-generated method stub
 db.execSQL(SCRIPT_CREATE_DATABASE);
}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
 // TODO Auto-generated method stub

}

}

}

display.java
public class display extends Activity {
     public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.display);

                // Get the message from the intent
                Intent intent = getIntent();
                String message = intent.getStringExtra(EditLIST.EXTRA_MESSAGE);

                // Create the text view
                EditText editText = new EditText(this);
                editText.setTextSize(40);
                editText.setText(message);

                // Set the text view as the activity layout
                setContentView(editText);
                }
     public boolean onCreateOptionsMenu (Menu menu)
        {
            MenuInflater inflater = getMenuInflater();
            inflater.inflate(R.menu.activity_edit_list,menu);
            return true;
        }

}

A: I'm not sure If I understand you correctly. As I understood when you click edit you always get the data from the first item regardless of which item you actually clicked? In that case I think the problem is here :
TextView textView=(TextView) findViewById(R.id.textView1);

You're searching for R.id.textView1 in the whole list and only the first item is being returned. You need to search only within the item clicked :
TextView textView=(TextView) view.findViewById(R.id.textView1);

Where view is the parameter to the onClick function.
As I said I'm not sure if that was the question but it looks like a problem.

A: i think you have  a problem with your delete code
it will be like..
public int delete_byID(int id)
        {
             sqLiteDatabase.delete(MYDATABASE_TABLE,KEY_ROWID + "=" +1,null) ;
             return -1;
        }
that will delete id number 1 from the table


text:
Q: Android - can't set margins for custom button I am using Holo.Light theme and I am trying to make buttons not be transparent. I accomplished that, but now I want to add margin to the buttons and I have not been able to do that. Here is the button xml I have:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_pressed="true">

        <shape>

            <solid android:color="#ffffff" />

            <stroke
                android:width="1dp"
                android:color="#E3E3E3" />

            <corners android:radius="4dip" />

            <margin
                android:left="15dp"
                android:right="15dp" />
        </shape>
    </item>

    <item>

        <shape>

            <solid android:color="#edeff1" />

            <stroke
                android:width="1dp"
                android:color="#E3E3E3" />

            <corners android:radius="4dip" />

            <margin
                android:left="15dp"
                android:right="15dp" />
        </shape>
    </item>
</selector>

How can I add margin? My current setting doesn't render.
Thanks!

A: Why not add it to your button in XML?
<Button android:id="@+id/mybutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="xyz"
android:background="@drawable/custom_button"
android:layout_marginleft="15dp"
android:layout_marginleft="15dp" />


text:
Q: Unable to get Apache Archiva working with LDAP I have uncommented the LDAP and UserMapper connectors in application.xml
I know my LDAP credentials (binddn, hostname, etc) are all working, because I use LDAP authentication and authorization for other apps on my server.
All I've done, is make the changes to application.xml and security.properties. Is there something else I'm supposed to do?
When I try to login with a user from LDAP, it is unsuccessful. Is there a log file I can check to see what's going wrong? I find the archiva documentation to be sparse and laconic.
Here is my security.properties file - some values have been altered, maybe someone can verify the structure is in-tact:
# LDAP
user.manager.impl=ldap
ldap.bind.authenticator.enabled=true
redback.default.admin=admin
security.policy.password.expiration.enabled=false

ldap.config.hostname=localhost
ldap.config.port=389
ldap.config.base.dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com
ldap.config.context.factory=com.sun.jndi.ldap.LdapCtxFactory
ldap.config.bind.dn=cn=Manager,dc=mydomain,dc=com
ldap.config.password=mypass

ldap.config.mapper.attribute.email=mail
ldap.config.mapper.attribute.fullname=displayName
ldap.config.mapper.attribute.password=userPassword
ldap.config.mapper.attribute.user.id=mail
ldap.config.mapper.attribute.user.base.dn=ou=Users
ldap.config.mapper.attribute.user.object.class=inetOrgPerson
ldap.config.mapper.attribute.user.filter=(objectclass=inetOrgPerson)

Also, the config.mapper.attribute.user.base.dn confuses me. The basedn of my users is here:
ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com
So does that mean for base DN I put: domainName=scoresecret.com,o=domains,dc=scoresecret,dc=com
and for config.mapper.attribute.user.base.dn: ou=Users
Let me know if I'm doing something wrong, if I'm forgetting to do something to "switch LDAP on", and if I can find some logs to point me in the right direction. Thanks a ton

A: Make sure you have configured an admin user that exists in LDAP - at the moment there's no way to use an internal user for that.
redback.default.admin=admin

Replace admin with a role account in your LDAP server that can be used for this.
Here is a configuration template I use which should show the values you'd need to populate:
https://github.com/maestrodev/puppet-archiva/blob/master/templates/security.properties.erb
It seems the main difference could be the user filter being empty?
(See also thread on users@archiva.apache.org: http://s.apache.org/KDj)


text:
Q: IntelliJ Idea common (MacOs/Win) keymap I'm employed company with strong it-security rules and I have to use their machines for the development (with Windows7 on board). For my pet projects I use my mac.
Intellij Idea 14 on both.
And it became ass-pain to switch my mind (and finger habits) between different keymaps. I can not use "MacOs 10.5+" on Windows because Meta-key is absent.
So my question (to people who have to live in same environment) – what is best approach to deal with this issue? What works for you?
Thanks a lot!


text:
Q: Pyspark - Convert mmddyy to YYYY-MM-DD I am working on a large file, which has one of the field in mmddyy format having string as datatype and I need to convert it into YYYY-MM-DD. I did tried creating UDF and convert referring to one of the post but its throwing error. Sample code:
Actual field in dataframe:
+-----------+
|DATE_OPENED|
+-----------+
|     072111|
|     090606|

Expected Output:
+---------------+
|    DATE_OPENED|
+---------------+
|     2011-07-21|
|     2006-06-09|

Sample Code:
func =  udf (lambda x: datetime.strptime(x, '%m%d%Y'), DateType())

newdf = olddf.withColumn('open_dt' ,date_format(func(col('DATE_OPENED')) , 'YYYY-MM-DD'))

Error:
Error : ValueError: time data '072111' does not match format '%m%d%Y'

A: I was able to solve it without creating a udf , I did refer to a similar post (pyspark substring and aggregation) on stack and it just worked perfectly.
from pyspark.sql.functions import *
format = 'mmddyy'
col = unix_timestamp(df1['DATE_OPENED'], format).cast('timestamp')
df1 = df1.withColumn("DATE_OPENED", col)

df2 = df.withColumn('open_dt', df['DATE_OPENED'].substr(1, 11))

A: This is possible without relying on a slow UDF. Instead, parse the data with unix_timestamp by specifying the correct format. Then cast the column to DateType which will give you the format you want by default (yyyy-mm-dd):
df.withColumn('DATE_OPENED', unix_timestamp('DATE_OPENED','mmddyy').cast(DateType()))

If you have Spark version 2.2+ there is an even more convenient method, to_date:
df.withColumn('DATE_OPENEND', to_date('DATE_OPENED','mmddyy'))


text:
Q: I've received an HTTP POST from an android app in my jsp server, how do I pass that data into a Javascript function I have this in my jsp file:
<form name='form1'>
<input type='hidden' name=NAME value=<%=request.getParameter("name")%> />
</form>

It works, I get the "name" when I submit it through android, but then it reverts back to null. How do I get it to stay "name"?
Also, I put the request.getParameter in a form to be able to access the value in my js code using 'document.form1.NAME.value'
To further clarify:
When I print what "request.getParameter" gives me in the server console, I get the value I'm sending through a submit button on my Android app, then two nulls.
So I get:
actual value
null
null
It seems like jsp is running three times?? and setting request.getParameter back to null?
Workflow:
I have an android app that, when you click the submit button, sends whatever string the user entered (in a text box on the app) to a Tomcat server that has a jsp file on it.
My jsp file then reads the request.
My javascript is what needs string (it takes the string, modifies it, and then displays an alert with the modified string).
Could it be since I'm opening up the jsp file AFTER I send my requests, that it can't find the previous requests?
HttpClient httpclient = new DefaultHttpClient();
            HttpPost httppost = new HttpPost("Tomcat server with my.jsp");

        EditText nameBox = (EditText)findViewById(R.id.name);
        String n = nameBox.getText().toString();

        try
        {
            List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
            nameValuePairs.add(new BasicNameValuePair("name", n));
            httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

            HttpResponse response = httpclient.execute(httppost);
        }

        catch (ClientProtocolException e)
        {
        }
        catch (IOException e)
        {
        }

        String url = "The same server and same.jsp file";
        Intent webIntent = new Intent(Intent.ACTION_VIEW);
        webIntent.setData(Uri.parse(url));
        startActivity(webIntent);

A: Try with proper quotes around:
<form name='form1'>
  <input type='hidden' name='NAME' value='<%= request.getParameter("name") %>' />
</form>

Try setting the script variable directly as
var name = '<%= request.getParameter ("name") %>';

EDIT :
Yes, you're making two different HTTP requests. webIntent.setData(Uri.parse(url)); would be making a new request that wouldn't submit the name post parameter. What you need is to somehow render the response collected before in your app.
HttpResponse response = httpclient.execute(httppost);

Since, this is the request where you set your name-value pairs, this would have the JavaScript variable set.


text:
Q: How to set spring bean properties in a .properties resource file Is this possible to set a spring bean's properties through a dot notation in a .properties file. For example suppose you have defined:
<bean name="myBean" class="MyBean" />

Is it possible to set MyBean.someProperty of myBean to a value defined in a properties file? For example by this properties file:
myBean.someProperty = aValue

I know about PropertyPlaceholderConfigurer, but my requirement is somewhat different from what it supports.

A: If you have a property in your xml like that, you can assign a value from a properties file like that
<property name="someProperty" value="${myBean.someProperty}" />

which has to deal with the PropertyPlaceholderConfigurer
But I think, you want to override your properties, so have a look at the documentation of the PropertyOverrideConfigurer

A: <context:property-placeholder location="classpath:/application.properties" />

<property name="myProperty" value="${myProperty.key.of.properties}" />

A: There's also a PropertyOverrideConfigurer available in the Spring distribution which does exactly what you're looking for.


text:
Q: What is the order of initializing local variables and running statements in a function (+memory order)? For the following code, will the Lock object be initialized after or before the first statement?
int* data = NULL;
int* example() {
  if (data) return data;

  Lock lock;
  data = new int[10];
  return data;
}

I know it should work as expected in this way:
int* data = NULL;
int* example() {
  if (data) return data;

  {
    Lock lock;
    if (!data)
      data = new int[10];
  }
  return data;
}

But do both methods above work in multiple threads on a weak memory order machine? I tried to search but couldn't find an answer.

A: Local variables are initialized when execution passes through the point of their definition. That is, your first implementation of example() is equivalent to (this even incorrect use of double-checked locking - it omits the second check in addition to having a data-race...):
int* example() {
    if (data)
        return data;

    {
        Lock lock; // (this really needs to reference some already initialized mutex
        data = new int[10];
        return data;
    }
}

Assuming your Lock class acquires a suitably initialized mutex, the code still has a data-race according to the C++ standard: reading data in the if-statement and the return-statement is not synchronized with setting data later. As a result, all of these functions result in undefined behavior according to the C++ standard. A simple fix avoiding all of the problems is to rely on the guarantees for initializating function-local static variables:
int* example() {
    static int* rc = new int[10];
    return rc;
}

The initialization of rc has to be done in a thread-safe way. If multiple threads try to initialize rc concurrently, only one thread will manage to do so while all other threads are blocked until the initializaton is complete.


text:
Q: Unexpected token after http JSONP Angular I would like to create an input field which uses the Google Places API to retrieve suggestions for the user to have it easier to fill in the field.
I am using MEAN.js and I have problems to retrieve the information using the Angular controller:
// Get places
$scope.getPlaces = function(val) {
    return $http.jsonp('https://maps.googleapis.com/maps/api/place/autocomplete/json?callback=JSON_CALLBACK', {
        params: {
            input: val,
            types: '(regions)',
            language: 'en',
            key: 'AIzaSyADMplvJfIzKFslb5KfOdZbCKK2SIYVl-E'
        }
    }).then(function(response){
            var places = [];
            angular.forEach(response.predictions, function(item){
                places.push(item.description);
            });
       return places;
    });
};

The view tries to retrieve the auto-suggestions using the typeahead component:
<div class="form-group">
    <input type="text" id="location" name="location" class="form-control" ng-model="asyncSelected" typeahead="place for place in getPlaces($viewValue)" typeahead-loading="loadingPlaces" placeholder="Location">
</div>

I checked the console and the requests return with a 200 OK, but I get an error in the console:
Uncaught SyntaxError: Unexpected token :
What is wrong with the http jsonp request?
How can I fix it?
Thanks
Cheers
Maurizio


text:
Q: Converting complex query with inner join to tableau I have a query like this, which we use to generate data for our custom dashboard (A Rails app) -
SELECT AVG(wait_time) FROM (
     SELECT TIMESTAMPDIFF(MINUTE,a.finished_time,b.start_time) wait_time
           FROM (
                SELECT max(start_time + INTERVAL avg_time_spent SECOND) finished_time, branch
                  FROM mytable
                 WHERE name IN ('test_name')
                   AND status = 'SUCCESS'
                 GROUP by branch) a
          INNER JOIN
                (
                SELECT MIN(start_time) start_time, branch
                  FROM mytable
                 WHERE name IN ('test_name_specific')
                GROUP by branch) b
          ON a.branch = b.branch
         HAVING avg_time_spent between 0 and 1000)t
GROUP BY week

Now I am trying to port this to tableau, and I am not being able to find a way to represent this data in tableau. I am stuck at how to represent the inner group by in a calculated field.  I can also try to just use a custom sql data source, but I am already using another data source.
columns in mytable -

*

*start_time

*avg_time_spent

*name

*branch

*status

I think this could be achieved new Level Of Details formulas, but unfortunately I am stuck at version 8.3

A: Save custom SQL for rare cases. This doesn't look like a rare case. Let Tableau generate the SQL for you.
If you simply connect to your table, then you can usually write calculated fields to get the information you want. I'm not exactly sure why you have test_name in one part of your query but test_name_specific in another, so ignoring that, here is a simplified example to a similar query.
If you define a calculated field called worst_case_test_time
datediff(min(start_time), dateadd('second', max(start_time), avg_time_spent)), which seems close to what your original query says.
It would help if you explained what exactly you are trying to compute. It appears to be some sort of worst case bound for avg test time. There may be an even simpler formula, but its hard to know without a little context.
You could filter on status = "Success" and avg_time_spent < 1000, and place branch and WEEK(start_time) on say the row and column shelves.
P.S. Your query seems a little off. Don't you need an aggregation function like MAX or AVG after the HAVING keyword?


text:
Q: Where can I find Amethyst? I recently bought Rune Factory: Tides of Destiny and I'm hooked despite my gaming tastes.
Now I'm in need for a better weapon so: Where can I find Amethyst, which is used to make Luck Blades(Dual Blades)?
I'm at the Flame Shrine now (final floor tough).

A: Amethysts are dropped by Monster Boxes, which are those toothy treasure-chest-looking guys that can be found on the Desert Island or the third floor of the Earth Spirit Shrine. They're also dropped by Mimics (blue Monster Boxes) and grown by Gigantuses (blue trolls), but I don't think you'll be able to get either of those until you get to the next shrine.


text:
Q: Access first stage and estimate impacts in splm::spgm? Is there a way to access the first stage regression in R's splm::spgm (it would be particularly be useful to access F-statistic)
Furthermore, it seems the function does not return the object model: is it possible to calculate direct, indirect and total impacts from this function. It doesn't seem to work with the spatialreg::impacts function


text:
Q: casting an object array to a JPA entity array? I am getting a casting exception every time I attempt to get an array of entities out of list of entities that I pull back from a jpa call.  Example...
QuickLaunch[] qLaunchArr = null;
List<QuickLaunch> listQL = null;
try
{
    System.out.println("testing 1..2..3");

    //qLaunchArr
    listQL = emf.createNamedQuery("getQuickLaunch").getResultList();
    Object[] objArr = listQL.toArray();
    //System.out.println(listQL.size());
    qLaunchArr = (QuickLaunch[]) listQL.toArray();
}
catch (Exception e)
{
    System.out.println("Bull Hockey!!!! I can't believe it's not butter!: "+e.toString());
}

[Ljava.lang.Object; incompatible with [Lcom.upmc.esdm.messaging.entities.QuickLaunch;

That was in my server logs... (I am using WID)
and I also get this exception...
commonj.connector.runtime.DataHandlerException: CWLAP0507E: The response bean class for java class  method GetAllQuickLaunchComponents cannot be created. Reason java.lang.IllegalArgumentException: argument type mismatch.

A: You can try TypedQuery to get the list of entities without explicit casting & prevent exceptions.
TypedQuery<QuickLaunch> listQL = em.createNamedQuery("QuickLaunch.getQuickLaunch", QuickLaunch.class);

List<QuickLaunch> products = listQL .getResultList();

Also, changed query name to identify its class or result type in more meaningful way.

A: Alright...  I think I found the answer.  It was inspired by this post...

https://stackoverflow.com/a/8060077/729820

I basically do this
try
    {
        System.out.println("testing 1..2..3");
        listQL = emf.createNamedQuery("getQuickLaunch").getResultList();
        System.out.println("What is the size of this list: number "+listQL.size());
        qLaunchArr = listQL.toArray(new QuickLaunch[listQL.size()]);
    }

All exceptions seem to clear right up.
Thanks for the help guys.

A: This isn't to do with JPA but Java, as it will not cast Object[] to QuickLaunch[].  Can you not use the Object array instead of a QuickLaunch[] array?


text:
Q: Change navigation bar height on iOS 7 Xcode5 How can I change the default height of the Navigation bar in a Navigation Controller?
I've come across "This" great article:
But this all just style and color and what not for the "NavigationBar".
And just so you know, I mean extend the total height, because the design I'm working on, the Nav Bar is bigger in height.

A: You can change the height of the nav bar programatically...
[navBar setFrame:CGRectMake(0, 0, 320, 64)];

becomes this

A: In iOS7 Frame starts below the status bar , so y=0 means it will be under the status bar.You should Change to y=20.

A: [[UINavigationBar appearance] setFrame:CGRectMake(0, 0, 320, 60)];


text:
Q: NextDateMatchingDay objective-c method - is there a better way than this code I've got? NextDateMatchingDay objective-c method - is there a better way than this code I've got?
- (NSDate*)NextDateMatchingDay:(NSDateComponents*)dayTime {
    // Find next date (including date & time) from current date, for which:
    // (a) the DayOfWeek(no time) matches that dayOfWeek from the input "dateTime" NSDateComponents
    // (b) the date is > currentDateTime
    // (c) the final date time will be based on the time passed in by "dateTime" NSDateComponents
    // e.g. dayTime=Sun10am's, currentDate=Sun1st2pm => result=Sun8th10am
    // e.g. dayTime=Sun10am's, currentDate=Sun1st9am => result=Sun1st10am
    // e.g. dayTime=Sun10am's, currentDate=Fri1st1pm => result=Sun8th10am

    // Prepare
    NSDate *currDate = [NSDate date];
    NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
    NSDateComponents *addComps = [[[NSDateComponents alloc] init] autorelease];

    unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit |  NSDayCalendarUnit;
    NSDateComponents* currComps =  [gregorian components:unitFlags fromDate:currDate];

    NSInteger daysCounter = 0;
    do {
        [addComps setDay:daysCounter];
        NSDate *futureDate = [gregorian dateByAddingComponents:addComps toDate:currDate options:0];
        NSDateComponents* futureComps = [gregorian components:unitFlags fromDate:futureDate];

        if ( [futureComps day] == [currComps day] && [futureComps month] == [currComps month] && [futureComps year]  == [currComps year] )
            return futureDate;

        daysCounter++;
    } while (daysCounter < 10);     // just a double check

    return nil;                     // double check - should not get to this
}

A: this seems to be an improvement - not sure if there's still a way to condense down further though?
+ (NSDate*)NextDateMatchingDay:(NSDateComponents*)dayTime sourceDate:(NSDate*)sourceDate {
    // Find next date (including date & time) from current date, for which:
    // (a) the DayOfWeek(no time) matches that dayOfWeek from the input "dateTime" NSDateComponents
    // (b) the date is > currentDateTime
    // (c) the final date time will be based on the time passed in by "dateTime" NSDateComponents
    // e.g. dayTime=Sun10am's, currentDate=Sun1st2pm => result=Sun8th10am
    // e.g. dayTime=Sun10am's, currentDate=Sun1st9am => result=Sun1st10am
    // e.g. dayTime=Sun10am's, currentDate=Fri1st1pm => result=Sun8th10am

    NSDate *returnDate = [sourceDate dateWithHoursMinsSecsComps:dayTime];

    // Check if is same day
    NSInteger configDOW = [dayTime weekday];
    NSInteger sourceDOW = [sourceDate dayOfWeek];
    if ( configDOW == sourceDOW ) {

        // source date is already the correct day - but is it before or after
        if ( [returnDate isBeforeThisDate:sourceDate] ) {
            // can't be source Date - so move forward 7 days
            returnDate = [returnDate dateByAddingDays:7];
            return returnDate;
        } else {
            // can be source Date (with new time)
            return returnDate;
        }
    }

    // source day is on another day-of-week other than the dayTime provided value
    NSInteger dayOfWeekDiff = (7 + (configDOW - sourceDOW)) % 7;

    returnDate = [returnDate dateByAddingDays:dayOfWeekDiff];
    return returnDate;
}


text:
Q: How do I use ejs templates/partials with webpack? I'm trying to create a full stack app using Express and ejs, and using webpack to bundle the client side assets.  When I set it up without ejs it all works perfectly.  The problem has come when I've tried to change the index.html to an index.ejs that uses partials for header, footer etc.  Ultimately this will be a multipage app which is why I'm using the ejs templates.
I've tried using ejs-loader (https://www.npmjs.com/package/ejs-loader), ejs-compiled-loader (https://github.com/bazilio91/ejs-compiled-loader) and ejs-html-loader (https://www.npmjs.com/package/ejs-html-loader) without any joy.
Any help would be appreciated.  I'm sure it's really straightforward but for the life of me I can't work out how to link up ejs to webpack and get the templates to work.
I've included the code that works with template.html below.  I need to know how to change that to use index.ejs?
My file structure looks like this:

*

*--dist (output from webpack)

*--src (containing index.ejs)

*----partials (containing partials for index.ejs)

*app.js

*webpack.common.js

*webpack.dev.js

*webpack.prod.js

*package.json
etc.

Index.ejs
<!DOCTYPE html>
<html lang="en">
<head>
 <% include partials/head %>
</head>
<body>
<main>
<% include partials/main %>
</main>
<% include partials/footer %>
</body>
</html>

And my config files look as follows (I've only included the two that merge to make the build congfig):
webpack.common.js
const path = require("path")

module.exports = {
  entry: {
    main: "./src/index.js",
    vendor: "./src/vendor.js"
  },
  module: {
    rules: [
      {
        test: /\.html$/,
      use: ["html-loader"]
      },
      {
        test: /\.(svg|png|jpg|gif)$/,
        use: {
          loader: "file-loader",
          options: {
            name: "[name].[hash].[ext]",
            outputPath: "imgs"
          }
        }
      }
    ]
  },
}

webpack.prod.js
const path = require("path")
const common = require("./webpack.common")
const merge = require("webpack-merge")
const {
  CleanWebpackPlugin
} = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const TerserPlugin = require("terser-webpack-plugin");
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = merge(common, {
  mode: "production",
  output: {
    filename: "[name].[contentHash].js",
    path: path.resolve(__dirname, "dist")
  },
  optimization: {
    minimizer: [
    new OptimizeCssAssetsPlugin(),
    new TerserPlugin(),
    new HtmlWebpackPlugin({
      template: "./src/template.html",
      minify: {
        removeAttributeQuotes: true,
        collapseWhitespace: true,
        removeComments: true,
      }
    })]
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: "[name].[contentHash].css",
    }),
    new CleanWebpackPlugin(),
  ],
  module: {
    rules: [{
      test: /\.scss$/,
      use: [
        MiniCssExtractPlugin.loader,
        "css-loader",
        "sass-loader"
      ]
    }]
  }
});

This is my first post, if I've not included anything crucial please let me know!
Thanks!


text:
Q: Eigenvalues of $5 \times 5$ matrix with real entries from given condition Suppose that $M$ is a $5 \times 5$ matrix with real entries and $p(x)= \text{det}( xI - M)$, then which of the following is true?

*

*$p(0)= \text{det}(M)$

*Every eigenvalue of $M$ is real if $p(1)+ p(2) = 0 = p(2)+ p(3).$

*$M^{-1}$ is necessarily a polynomial in $M$ of degree $4$ if $M$ is invertible.

*$M$ is not invertible if $M^2- 2M= 0.$
Option $1$ is false for $M= I_{5}$ , since then $p(0)= -1$ but $\text{det}(M)= \text{det} (I_{5})= 1.$
Also for $M= 2I$, $4$ is false.
$3$ is true by Cayley- Hamilton theorem, but I'm unable to construct a counter- example for $2$. Any suggestions for that?

A: 4 is $\color{red}{\text{false}}$, since if $M(M-2)=0$, then $x(x-2)$ is the minimal polynomial of $M$ and since the characteristic polynomial must be a multiple of $x(x-2)$ and therefore at least one of the eigenvalues is zero  which means $M$ is not invertible ($M$ is singuar), $\color{red}{\text{unless }M=2I}$ and that's why this statement is false, the only exception is $M=2I$.
2 is $\color{red}{\text{false}}$, since $p(x)=x^5+bx^4+cx^3+dx^2+ex+f$ is a monic polynomial of degree 5. with the given conditions we get two equations
$$\begin{cases}17a+9b+5c+3d+2e+33=0 \\
97a+35b+13c+5d+2e+275=0\end{cases}$$
by solving for $(d,e)$ and substituting in the characteristic polynomial $p(x)$ we get
$$p(x)=x^5+ax^4+bx^3+cx^2+(-4c-13b-40a-121)x+(\frac{7}{2}c+15b+\frac{103}{2}a+165)$$ This equation is very general and by a simple substitution of $a=b=c=0$ we get the polynomial $p(x)=x^5-121x+165$ which has two complex roots, so in general the second statement is false.


text:
Q: Grab lines from a delimited file based on a alphabetical range The problem I am working through is that I have a file that will contain fields delimited by a "|" and the file is sorted based on one of those fields.  What I have been trying to come up with is a way to grab lines based on a range of a certain field.
an example:
Sample input would be something like this where it is sorted based on the 2nd field.  So they are listed in alphabetical order
1234|abcd|3fgbe32
1234|abce|5fasdf3
5678|abcf|t438fjd
9876|abcg|57fshde

The range I want to get would then be "we want all records that fall in the range of abcd - abcf to be recorded into a different file. And the records remaining would be:
1234|abcd|3fgbe32
1234|abce|5fasdf33
5678|abcf|t438fjd

When I started I think I approached this in the wrong way.  I was looping through each line and then trying to check the line against a regular expression to see if I wanted the line or not.  But would there be a better way of doing this using awk and grep?

A:
all records that fall in the range of abcd - abcf

Simple awk solution:
awk -F'|' '$2~/^abc[d-f]$/' file

The output:
1234|abcd|3fgbe32
1234|abce|5fasdf3
5678|abcf|t438fjd

A: Another awk solution :
awk -F'|' '{if ($2 == "abcd") { l=1} else if ($2 == "abcg") { l=0} }l' file

A: A sed solution.
To delete the lines before the first in the range:
cat file | sed '/abcd/Q'

To delete the lines after the last in range:
cat file | sed -n '/abcf/,$p'

   -n : don't print non-matches
   ,$ : first match to end of file
   p  : print

Putting together:
cat file | sed '/abcd/Q | sed -n '/abcf/,$p'

The patterns will match any field in the line, so you would need a better pattern to match only the second field:
cat file | sed -r -n '/^[^\|]+\|abcd/,$p' | sed -r '/^[^\|]+\|abce/Q'

The very simple range using sed would be:
cat file | sed -n '/abc[def]/p'

A: records in the range of abcd - abcf using grep:
grep -E '^[^\|]+\|abc[d-f]\|'

A: All-in-one sed solution, writing the range from abcd to abcf to a file called other, while remaining lines are passed to stdout. So you don't have to go through the file twice.
sed -e '/|abcd|/,/|abcf|/{wother' -e 'd;}'


text:
Q: Java ProcessBuilder cant run ".\venv\Scripts\active" in windows Using Java's ProcessBuilder, I try to run a python script with activating virtual environment but i'm getting error like '.\venv\Scripts\activate" "' is not recognized as an internal or external command.
In command window cmd, I can use ".\venv\Scripts\activate" directly with no problem but in my code at below, error occured.
ProcessBuilder processBuilder = new ProcessBuilder("cmd.exe", "/c","cd C:\\Users\\onurc\\PycharmProjects\\OCR", "& .\\venv\\Scripts\\activate", "& python main.py");

A: That command doesn't look valid to me. You may be confused about what ProcessBuilder does / how windows (or any OS) works.
When you type a command in a dosbox or terminal, you're sending it to the shell - on linux, probably /bin/bash, or zsh or whatnot. On windows, you're sending it to cmd.exe. That program (so, bash or cmd) then decodes what you typed and does all sorts of fancy things to it, and then it in turns asks the underlying kernel to actually go run that app.
Java's ProcessBuilder does not invoke cmd/bash/zsh, it is a sibling to cmd/bash/zsh - it also does some fancy things, but far fewer fancy things. On windows, even the OS (or rather, the tool) does some fancy things whereas on linux it does not.
In general, trying to even guess whether the tool you run does fancy things, and which fancy things java's ProcessBuilder does, is not a sound way to write dependable software. Especially considering the relative hardship of testing this, given that it involves invoking external stuff.
Hence, you should opt out. Of all the fancy things. Thus:

*

*Always call the command with a complete and absolute path.

*Always use the multi-string/list version, never rely on java to split on spaces.

*Never use *, ? or any other glob. Write out each and every parameter in full.

*Do not try to use > or & or any other 'symbol that means something specific'. An OS doesn't support any of this stuff - you just pass [A] the full path to an executable and [B] a bunch of strings that the kernel will directly pass to the process without doing any processing on it. If you want to do stuff to standard out, error out, or standard in - then use Process's methods to do this.

Those &s in your command sure look like shellisms to me.
To fix:

*

*You can tell the process which directory to run in, so there is no need for a cd command.

*You should write the absolute path to CMD.exe. You can ask the environment. You're now relying on a combination of a properly configured PATH + the undefined behaviour of the JVM that does a bare minimum of fancy things (turning relative paths to absolute ones by PATH-scanning is a 'fancy thing' you should not be relying on).

*I don't know what that & thing is, but you don't want that.

*If activate is a script (shouldn't that end in .bat or .js or .vbs or whatnot?), run that, then run python separately. If activate sets things in the local environment table, make a script file that runs both and run the script instead.

*Running python is not a good idea. Run C:\whatever\python.exe.

You have the right idea for activate, more or less (you're in a known dir and then write an actual path. If python.exe is guaranteeed to be in that OCR dir, run .\\python.exe, not python.

A: Convert command as a single string instead of passing separate arguments to the ProcessBuilder.
ProcessBuilder processBuilder = new ProcessBuilder("cmd.exe", "/c","cd C:\\Users\\onurc\\PycharmProjects\\OCR & .\\venv\\Scripts\\activate & python main.py");

Another way could be, if all command has to run under same folder, then change ProcessBuilder working directory using directory method:
Path rootDir = Paths.get("C:\\Users\\onurc\\PycharmProjects\\OCR");
ProcessBuilder processBuilder = new ProcessBuilder("cmd", "/C", ".\\venv\\Scripts\\activate & python main.py");
processBuilder.directory(rootDir.toFile());
Process process = processBuilder.start();
process.waitFor();


text:
Q: Fullcalendar with resources won't start on monday For some reason, our Fullcalendar with resources does not want to start on monday, it always starts on the current day that we are. According to the docs, we should use firstDay, it also states that :

If weekNumberCalculation is set to 'ISO', this option defaults to 1 (Monday).

Which we did in our case, but no changes. We also tried upgrading to a different version (all above 5) but to no avail.
We are using version v5.11.3 of Fullcalendar (premium).
Anyone that can point us in the right direction?
In the screenshot that I've added, you can see it start on today (friday 18/11/2022).

var calendarEl = document.getElementById('calendar2');
var calendar = new FullCalendar.Calendar(calendarEl, {
    schedulerLicenseKey: 'xxx',
    timeZone: 'UTC',
    initialView: 'resourceTimelineWeek',
    hiddenDays: [0, 6],
    locale: 'nl-be',
    weekNumberCalculation: "ISO",
    droppable: true,
    eventStartEditable: false,
    headerToolbar: {
        left: 'prev,next',
        center: 'title',
        right: 'resourceTimelineDay,resourceTimelineWeek'
    },
    views: {
        resourceTimelineWeek: {
            duration: {days: 7},
            slotDuration: '24:00:00',
            buttonText: "Week",

        },
        resourceTimelineDay: {
            duration: {days: 1},
            slotDuration: '24:00:00',
            buttonText: "Dag"
        }
    },
    editable: true,
    events: {
        url: 'xxx.php',
        type: 'POST',
        error: function () {
            alert('there was an error while fetching events!');
        }
    },
    refetchResourcesOnNavigate: true,
    resources: {
        url: 'xxx.php',
        type: 'POST',
        error: function () {
            alert('there was an error while fetching events!');
        }

    }, eventReceive: function (info) {
        var resourceid = info.event._def.resourceIds[0];
        var date = info.event._instance.range.start.toLocaleString();
        var employeeid = info.draggedEl.dataset.employeeid;

        $.ajax({
            type: "POST",
            url: "xxx.php",
            cache: false,
            data: {
                'resourceid': resourceid,
                'date': date,
                'employeeid': employeeid
            },
            dataType: 'json',
            success: function (data) {
                var response = eval(data);

                info.revert();

                if (response.success) {
                    refetch();
                }
            }
        });
    }, eventContent: function (arg) {
        let divEl = document.createElement('div');
        let htmlTitle = arg.event._def.extendedProps.html;
        divEl.innerHTML = htmlTitle;

        let arrayOfDomNodes = [divEl];
        return {domNodes: arrayOfDomNodes}

    }
});

calendar.render();

function refetch() {
    //direct refetch doesn't work
    calendar.refetchEvents();
}


text:
Q: Linking one xml to another xml using ImageButton in Eclipse ADT? I am new to Android App Development and i am using Eclipse ADT. Basically I made my Home page for my app and my problem is I don't know how to link one xml file to another xml file. What i want to happen is, When I click the "Payment" on my homepage (Please refer to the screenshot..) I want it to redirect to another page (specifically on the 2nd screenshot). Please help me and I am having a hard time. I'm starting from scratch. :(( The "Payment" Button is an IMAGEBUTTON.
Btw. The homepages xml name is activity_main.xml and i want to redirect it to payvia.xml (Blank XML file). I just want to know how to do it. I know theres something to edit on the MainActivity.java and in the AndroidManifest.xml
Please I need your expert advices.
I cant attach screenshots because i lack reputation pts.

A: Oh man. You have to make two activity. One for your activity_main.xml and one for your payvia.xml . And after you have made the activity than you define your button on your main activity and set a Intent and say when you click the button then open a new intentand that new intent will be the second activity.  I hope you have solved it till now. otherwise tell me again. Anyway it is the basic thing of building apps on eclipse.


text:
Q: Проверить является ли дерево сбалансированным У меня есть свой, ученический вариант реализации двоичного дерева, и у меня задание проверить является ли оно сбалансированным. Если я правильно понял, если нет, пожалуйста поправьте меня, то сбалансированным дерево можно считать если, - любая вершина имеет разницу в длинах правого поддерева и левого, не больше чем на 1. И дело в том что мое дерево которое я должен проверить на сбалансированность, на самом деле не сбалансированное и его узлы выглядят так:
class Leaf<E> implements Comparable<E> {
    private Leaf<E> parent;
    private Leaf<E> right;
    private Leaf<E> left;
    private E element;

    private Leaf(E element) {
        this.element = element;
    }

    public E getElement() {
        return element;
    }

    @Override
    public int compareTo(Object obj) {
        Leaf<E> node = (Leaf<E>) obj;
        return this.hashCode() - node.hashCode();
    }

    @Override
    public int hashCode() {
        int hash = 31;
        hash = hash * 17 + element.hashCode();
        return hash;
    }
}

И как можно увидеть из кода, никакого balance factor у меня нет, разумеется, ведь дерево не сбалансированное.
И мой вопрос: как мне проверить является ли дерево сбалансированным или нет? Неужели мне придется проходить по всему дереву? А если оно случайно окажется сбалансированным, на пример в нем всего одно значение, или порядок добавления оказался таким, что в нем баланс получился, но как структура данных оно не сбалансированное?
Как мне точно это выяснить в духе:
boolean isBalanced(Если надо) {
    return хитрый алгоритм проверки;
}

Буду очень признателен за любые, конструктивные мысли по этому вопросу.

A: Да, это будет полный обход дерева. Рекурсия от двух поддеревьев.
public boolean isBalanced() {
     // ...
     return isBalanced(left) && isBalanced(right);
}

P.S. И не нужно хранить parent в узле. В 99% случаев можно без него обойтись.


text:
Q: History of the term "early stopping" Who first used "early stopping" to refer to a form of regularization by stopping training before convergence? I have attempted to search myself but I am not sure how to find the answer.
Was the term ever used in stats before neural networks for example?

A: It depends on how deep you want to go. Abraham Wald was studying sequential testing and stopping criteria in 1945. It was further studied in the 1960 and 1970s (cf Ferguson, 1989). In 1989 Pocock and Hughes described using early stopping for clinical trials (I'm not sure if this is the earliest paper like this). As about first citations of using it in machine learning, the paper by Morgan and Bourlard (1990) is sometimes quoted, for example by Prechelt (1997) or Finoff et al (1993).


text:
Q: dynamic checkbox with jquery I want to create a form with dynamic check box, when a user click the button the form will add the same form next after the previous form. I have tried a lot but didn't get it, also i tried with clone method, i get the form every time when I click the button but it was not clickable. Can anyone help?
Here is my JS below
$('#check-type').click(function(){
    $('.multiple-choice').show();
    var sth = $('.multiple-choice:first').clone().appendTo('.container');
    $('.multiple-choice:last').hide();
});

and my HTML
<button id="check-type" value="Multiple choice">Multiple choice</button>

<form class="multiple-choice">

Choice

Which features did you like?

        <input id="check1" onclick=uncheck(this) type="checkbox" name="check" value="check1" class="input-checkboxitem">
        Materials

        <input id="check2" onclick=uncheck(this) type="checkbox" name="check" value="check2" class="input-checkboxitem">
        Exam Method

        <input id="check6" onclick=uncheck(this) type="checkbox" name="check" value="check6" class="input-checkboxitem">
        None

</form>

A: Is there a reason why you are hiding the last element?
Simply commenting that line got the code running for me.
DEMO

A: you need to use the following code
$('#check-type').click(function () {
    $("#choice").clone().prependTo(".multiple-choice");
});

You can also check the code at
http://jsfiddle.net/Y538U/


text:
Q: core-scaffold and core-item (with link) and several contents I have read the examples of core-elements/demo.html and core-samplers/index.html and there is an example of Scaffold with some core-items. But the core-items have the same content.
How can I have a lot of core-items with differents contents ?
Do you have a real example ?
Thank you in advance,


text:
Q: I am looking for drivers for my Epson Stylus CX4300 for Ubuntu 12.04 LTS I haven't been able to find software drivers for my Epson Stylus CX4300.  This is a multi-function device consisting of a printer and scanner.
The articles on the forums refer to older versions of Ubuntu and furthermore, Avasis no longer provide drivers as suggested in the articles.
This morning I even phoned Epson in Johannesburg and they told me that my device is not compatible with Ubuntu.
How difficult is it to "translate", for example, Windows 7 drivers into what is required for Ubuntu?

A:
How difficult is it to "translate", for example, Windows 7 drivers into what is required for Ubuntu?

Difficult. Besides that you are not even allowed to look at the code since it is protected by copyright laws.

I am looking for drivers for my Epson Stylus CX4300 for Ubuntu 12.04 LTS

In general this is NOT how Linux works. We have -generic- drivers. This means we have a driver that supports a range of printers (and if you printer fits in that range it is supprted though specific options might not be in that driver).
This printer works with the standard printer utility. But you might need to choose a driver for it from the printer installation menu that is close to your printer.
It is not listed on http://gimp-print.sourceforge.net/p_Supported_Printers.php but similiar printers are...
Printer Model   Driver Name Epson
Stylus CX4100   escp2-cx4100 Epson
Stylus CX4200   escp2-cx4200 Epson
Stylus CX4400   escp2-cx4400 Epson
Stylus CX4500   escp2-cx450

So install it as a CX4200 or CX4400 and it will print.
The scanner is another matter. You can use this as a guide: How do I get an Epson Stylus DX4450 - All-In-One Printer/Scanner working?  but you need to get the printer to work 1st.


text:
Q: How do I bind a SelectedDateChanged event from a DatePicker to a Command in my VM I have this wpf file with an empty codebehind file (And I would like to keep the codebehind empty if possible)
http://pastebin.com/x1CTZDFK
And I then have this viewmodel file
using System;
using System.Collections.ObjectModel;
using System.Windows.Input;
using MVVM_Test.Model;
using MvvmFoundation.Wpf;

namespace MVVM_Test.ViewModel
{
    public class ViewModel : ObservableObject
    {
        private DateTime selectedDate;
        public DateTime SelectedDate
        {
            get
            {
                return selectedDate;
            }
            set
            {
                selectedDate = value;
                RaisePropertyChanged("SelectedDate");
            }
        }

        private DateTime startDate;
        public DateTime StartDate
        {
            get { return startDate; }
            set
            {
                startDate = value;
                RaisePropertyChanged("StartDate");
            }
        }

        private DateTime endDate;
        public DateTime EndDate
        {
            get { return endDate; }
            set
            {
                endDate = value;
                RaisePropertyChanged("EndDate");
            }
        }

        public ObservableCollection<Brick> SavedBricks { get; set; }

        public ViewModel()
        {
            SelectedDate = DateTime.Now;
            StartDate = new DateTime(2011, 1, 1);
            EndDate = new DateTime(2011, 7, 31);
            SavedBricks = new ObservableCollection<Brick>();
            //Brick b1 = new Brick(DateTime.Now, 50,50,50,300);
            //SavedBricks.Add(b1);
        }

        public ICommand PrevHistory_cmd
        {
            get { return new RelayCommand(PrevHistoryExecute, PrevHistoryCanExecute); }
        }

        private void PrevHistoryExecute()
        {
            SelectedDate = SelectedDate - new TimeSpan(1, 0, 0, 0);
        }

        private bool PrevHistoryCanExecute()
        {
            if (StartDate < SelectedDate)
                return true;
            return false;
        }

        public ICommand NextHistory_cmd
        {
            get { return new RelayCommand(NextHistoryExecute, NextHistoryCanExecute); }
        }

        private void NextHistoryExecute()
        {
            SelectedDate = SelectedDate + new TimeSpan(1, 0, 0, 0);
        }

        private bool NextHistoryCanExecute()
        {
            if(EndDate > SelectedDate)
                return true;
            return false;
        }

        public ICommand StartStopSort_cmd
        {
            get { return new RelayCommand(NextHistoryExecute, NextHistoryCanExecute); }
        }

        private void StartStopSortExecute()
        {

        }

        private bool StartStopSortCanExecute()
        {
            return true;
        }

        public ICommand DateSelectionChanged_cmd
        {
            get { return new RelayCommand(NextHistoryExecute, NextHistoryCanExecute); }
        }

        private void DateSelectionChangedExecute()
        {

        }

        private bool DateSelectionChangedCanExecute()
        {
            return true;
        }
    }
}

I then want the SelectedDateChanged event to execute my public ICommand DateSelectionChanged_cmd so that I can validate it in my view model. I tried getting the System.Windows.Interactivity to work but when I add it as a reference it wont compile and says it cant find the file, so now I wonder if there is any other way to do this, the way I wrote it in the xml file is just an example of how I would guess it would look (Which is the wrong way)

A: You can't bind an event directly to command. You could use an attached behavior as shown here, but actually you don't need to: since the binding SelectedDate is two-way, you just need to execute DateSelectionChangedExecute in the setter of the SelectedDate property:
    public DateTime SelectedDate
    {
        get
        {
            return selectedDate;
        }
        set
        {
            selectedDate = value;
            RaisePropertyChanged("SelectedDate");
            DateSelectionChangedExecute();
        }
    }


text:
Q: RichTextBox C# programmatically trigger certain functions I want to trigger the following functions programmatically in my RichTextBox Editor.
I have this already:
//Copy
TextRange range = new TextRange(doc.Editor.Selection.Start, doc.Editor.Selection.End);
                Clipboard.SetText(range.Text);
    //Paste
     Editor.Paste();
   // PageDown
     Editor.PageDown();
   // PageUp
     Editor.PageUp();
    //Text Size
     Editor.FontSize = number;
    //Undo
     Editor.Undo();
    //Redo
     Editor.Redo();

I want to apply the following to the currently selected text on a RichTextBox:

AlignLeft
  AlignRight
  Center
  Increase/Decrease line spacing
  Bold
  Underline
  Italic

A: As it turns out, there are two ways to set a RichTextBox's text styles.
One of them is by changing styles of the control's paragraphs. This only works on paragraphs - not selections.
You get at a collection of blocks, which can be casted to paragraphs, through the .Document.Blocks property of the RichTextBox. Here's a code sample that applies some styling to the first paragraph.
Paragraph firstParagraph = Editor.Document.Blocks.FirstBlock as Paragraph;
firstParagraph.TextAlignment = TextAlignment.Right;
firstParagraph.TextAlignment = TextAlignment.Left;
firstParagraph.FontWeight = FontWeights.Bold;
firstParagraph.FontStyle = FontStyles.Italic;
firstParagraph.TextDecorations = TextDecorations.Underline;
firstParagraph.TextIndent = 10;
firstParagraph.LineHeight = 20;

When possible, this is the preferred way of applying styles. Although it does require you to write more code, it provides compile-time type checking.
The other, would be to apply them to a text range

This permits you to apply styles to a selection, but is not type-checked.
TextRange selectionRange = Editor.Selection as TextRange;
selectionRange.ApplyPropertyValue(TextElement.FontWeightProperty, FontWeights.Bold);
selectionRange.ApplyPropertyValue(TextElement.FontStyleProperty, FontStyles.Italic);
selectionRange.ApplyPropertyValue(Inline.TextDecorationsProperty, TextDecorations.Underline);
selectionRange.ApplyPropertyValue(Paragraph.LineHeightProperty, 45.0);
selectionRange.ApplyPropertyValue(Paragraph.TextAlignmentProperty, TextAlignment.Right);

Be very careful to always pass correct types to the ApplyPropertyValue function, as it does not support compile-time type checking.
For instance, if the LineHeightProperty were set to 45, which is an Int32, instead of the expected Double, you will get a run-time ArgumentException.


text:
Q: Making RichTextBox for Touch I have a RichTextBox in a SurfaceWindow. I need the RichTextBox because I'm required to make something like a sticky note (text and images as input), and SurfaceTextBox can't seem to put in images.
The problem is, the RichTextBox doesn't respond when I touch it on the screen. It only focuses when I click it with the mouse. I understand that this is because RichTextBox is not made for Surface.
Is there any other way I can achieve this (making the RichTextBox focusable through touch)?


text:
Q: Do All Google Oauth 2.0 Client need verification? If I plan to use the following scope:
https://www.googleapis.com/auth/drive.file
Does Google need to verify my consent screen?
What does application type public mean? I'm assuming that if it is not accessible to everyone than it is not public.
Does sensitive scope always mean full access?

A: Verification is required if:

*

*Your application type is public, and

*You add a sensitive scope

A: Today, if you use a sensitive scope and trigger the Google OAuth authorization flow, you should see an unverified app screen that indicates that you need to apply for app verification.
You do not need to request a review if one of the following is true:

*

*Your app is an enterprise application built only for your enterprise users. You should make sure your Google Cloud Project is associated with your cloud organization

*You are building an app just for yourself or a few users. See the 'OAuth user quotas' section here.