Jekyll2021-11-19T00:56:17+11:00https://maxbarrass.com/feed.xmlMax BarrassMy Blog{"name"=>nil, "avatar"=>nil, "bio"=>nil, "location"=>nil, "email"=>nil, "links"=>[{"label"=>"Email", "icon"=>"fas fa-fw fa-envelope-square"}, {"label"=>"Website", "icon"=>"fas fa-fw fa-link"}, {"label"=>"Twitter", "icon"=>"fab fa-fw fa-twitter-square"}, {"label"=>"Facebook", "icon"=>"fab fa-fw fa-facebook-square"}, {"label"=>"GitHub", "icon"=>"fab fa-fw fa-github"}, {"label"=>"Instagram", "icon"=>"fab fa-fw fa-instagram"}]}Windows 11 installation has failed2021-11-18T00:00:00+11:002021-11-18T00:00:00+11:00https://maxbarrass.com/blog/2021/11/18/windows-11-installation-has-failed<p>If you have been attempting to upgrade to Windows 11 and having issues then read on!</p>
<p>It would be amazing if everyone would go out and buy the latest PC’s with the latest TPM and latest CPU and install windows 11 on it following the supported pathway. Well, in reality, most people will update their existing Windows 10 to Windows 11; that’s just logical, right?</p>
<p>So this is my case; I have updated my registry to allow installation with unsupported CPU as follows:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[HKEY_LOCAL_MACHINE\SYSTEM\Setup\MoSetup]
"AllowUpgradesWithUnsupportedTPMOrCPU"=dword:00000001
</code></pre></div></div>
<p>Downloaded an ISO from <a href="https://www.microsoft.com/software-download/windows11">Micorosfts Download Windows 11</a> and created a USB using <a href="https://rufus.ie/en/">Rufus</a>. Then I started setup from the USB and waited patiently for the 100% on this screen:</p>
<p><img src="/assets/images/posts/windows11upgrade/windows-11-setup-progress.png" alt="Windows 11 setup progress" /></p>
<p>Not surprisingly, this screen closed and just gave me an good-old self explanatory error message:</p>
<p><img src="/assets/images/posts/windows11upgrade/windows-11-installation-has-failed.png" alt="Windows 11 installation has failed" /></p>
<p>Typical as it is, googling will not help; no one knows why it is failing on my PC.</p>
<p>In this case, Uncle Bill is relying on you to fix your problem, as he has already given you all the tools and give you all the bread crumbs to follow.</p>
<p>So let’s see if you can find your issue and fix it.</p>
<ul>
<li>open Event Viewer</li>
<li>open Application Log</li>
<li>start at the top and look for information entry for the upgrade process failure (yeah, breadcrumbs)</li>
<li>when you find the log entry, it should list a bunch of log files, open the top Setup log file</li>
<li>scroll to the bottom of the setup log file and scroll up slowly, looking for ERROR lines; you can also search for the <code class="language-plaintext highlighter-rouge">aborting</code> keyword from the bottom up</li>
<li>now you should be finding some real breadcrumbs</li>
</ul>
<p>The log should tell you why it aborted the install. The reasons for this are specific to your PC, so you would need to do some googling to fix them.</p>
<p>My setup aborted because it detected a duplicate account without a profile, so I deleted that in the registry, restarted and ran the install successfully. You should be able to google all the issues that will appear in the log and fix them one by one. I feel that the upgrade process is probably the same as the old process, so it’s going to have similar issues and existing solutions.</p>
<p>I hope this will help; leave a comment if it did, or leave your errors for others to know about.</p>Max Barrassme@maxbarrass.comhttp://maxbarrass.comIf you have been attempting to upgrade to Windows 11 and having issues then read on!Google Photos Metadata 😗😙😚2020-05-20T23:00:00+10:002020-05-20T23:00:00+10:00https://maxbarrass.com/blog/2020/05/21/google-photos-metadata<p>My cousin Anton, in Moscow, and I making a cross-continental photo album. We have started scanning some old photos so that we can preserve the memory of our ancestors for generations.</p>
<p>We have all the latest scanning technology that black market offers. And we have managed to acquire all the photos we need to scan. Now the question is, how do we search for codes and text content that we want to preserve with the photos.</p>
<p>Well after a round of googling, it’s apparent that this information needs to be purchased from your favourite neighbourhood black market. After that, it turns out that, just setting properties on the file using your favourite windows file properties box, you can update file metadata.</p>
<p><img src="/assets/images/posts/google-photos-metadata/FileProperties.png" alt="File Properties" /></p>
<p>When you upload the photo back to google drive, the only file property that will appear in Google is the Title property.</p>
<p><img src="/assets/images/posts/google-photos-metadata/file-with-properties-in-google-photos.jpg" alt="File with properties in google photos" /></p>
<p>For us, this will be enough to smuggle additional information with the image. Here you can checkout the metadata on this image.</p>
<p><img src="/assets/images/posts/google-photos-metadata/cousin-anton-smiling.jpg" alt="Cousin anton smiling" /></p>
<p>Once you have done this, you can do a search to test your handy work.</p>
<p><img src="/assets/images/posts/google-photos-metadata/search-for-file-with-properties-in-google-photos.jpg" alt="Search for file with properties in google photos" /></p>
<p>I hope this will help you with your family albums or whatever you want it to call it.</p>Max Barrassme@maxbarrass.comhttp://maxbarrass.comMy cousin Anton, in Moscow, and I making a cross-continental photo album. We have started scanning some old photos so that we can preserve the memory of our ancestors for generations.Downloading Files from RSS with Jdownloader Packegizer 💻💥😍2020-04-09T23:00:00+10:002020-04-09T23:00:00+10:00https://maxbarrass.com/blog/2020/04/10/downloading-files-from-rss-with-jdownloader-packegizer<h1 id="intro">Intro</h1>
<p>I wanted to download some podcasts from an RSS feed, here is how to do this with help of RSS, XML Tools and JDownloader (be care full downloading this, Ill make a safe source verison of this some day)</p>
<p>To do this I just transformed the RSS into a list of good URLS with appended #TITLE and used JDownloaded Packagizer Rule to rename downloaded fiels.</p>
<h1 id="rss-source">RSS Source</h1>
<p>https://feeds.megaphone.fm/WWO4858695911</p>
<p>This source has a bunch of generated names but I want to use “# - Title” as good file name.</p>
<h1 id="xslt-for-rss">XSLT for RSS</h1>
<p>You can run it here https://maxbarrass.com/tools/xml-transform, download the RSS source and transform it, you will get a list of urls with #title, we will use this # in jdownloader to create proper names for files.</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?xml version="1.0" encoding="ISO-8859-1"?></span>
<span class="nt"><xsl:stylesheet</span> <span class="na">version=</span><span class="s">"2.0"</span> <span class="na">xmlns:xsl=</span><span class="s">"http://www.w3.org/1999/XSL/Transform"</span>
<span class="na">xmlns:itunes=</span><span class="s">"http://www.itunes.com/dtds/podcast-1.0.dtd"</span><span class="nt">></span>
<span class="nt"><xsl:output</span> <span class="na">method=</span><span class="s">"xml"</span> <span class="na">omit-xml-declaration=</span><span class="s">"yes"</span> <span class="na">indent=</span><span class="s">"yes"</span> <span class="na">encoding=</span><span class="s">"utf-16"</span><span class="nt">/></span>
<span class="nt"><xsl:template</span> <span class="na">match=</span><span class="s">"/"</span><span class="nt">></span>
<span class="nt"><xsl:apply-templates/></span>
<span class="nt"></xsl:template></span>
<span class="nt"><xsl:template</span> <span class="na">match=</span><span class="s">"//channel"</span><span class="nt">></span>
<span class="nt"><xsl:for-each</span> <span class="na">select=</span><span class="s">"//item"</span><span class="nt">></span>
<span class="nt"><xsl:apply-templates</span> <span class="na">select=</span><span class="s">"enclosure/@url"</span> <span class="na">mode=</span><span class="s">"fixtext"</span><span class="nt">/></span>
<span class="nt"><xsl:text></span>#<span class="nt"></xsl:text></span>
<span class="nt"><xsl:if</span> <span class="na">test=</span><span class="s">"not(string(itunes:episode))"</span><span class="nt">></span>
<span class="nt"><xsl:value-of</span> <span class="na">select=</span><span class="s">"concat(normalize-space(title),'.mp3')"</span><span class="nt">/></span>
<span class="nt"></xsl:if></span>
<span class="nt"><xsl:if</span> <span class="na">test=</span><span class="s">"string(itunes:episode)"</span><span class="nt">></span>
<span class="nt"><xsl:value-of</span> <span class="na">select=</span><span class="s">"concat(itunes:episode,' - ',normalize-space(title),'.mp3')"</span><span class="nt">/></span>
<span class="nt"></xsl:if></span>
<span class="nt"><xsl:text></span>
<span class="nt"></xsl:text></span>
<span class="nt"></xsl:for-each></span>
<span class="nt"></xsl:template></span>
<span class="nt"><xsl:template</span> <span class="na">match=</span><span class="s">"*"</span> <span class="na">mode=</span><span class="s">"fixtext"</span> <span class="nt">></span>
<span class="nt"><xsl:value-of</span> <span class="na">select=</span><span class="s">"normalize-space(.)"</span> <span class="nt">/></span>
<span class="nt"></xsl:template></span>
<span class="nt"></xsl:stylesheet></span>
</code></pre></div></div>
<h1 id="jdownloader-setup">Jdownloader Setup</h1>
<p>Packegizer rule - HTML RSS Links</p>
<ul>
<li>If
<ul>
<li>Sourceurls(s) using Regex: .<em>#(.</em>)
<ul>
<li>this will split url into group wich will be everything after #</li>
</ul>
</li>
</ul>
</li>
<li>Then
<ul>
<li>Filename: <jd:source:1>
<ul>
<li>this will grab proper name for our download file</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>Thats all save and copy your link you will now see a list of RSS link to download with proper titles.</p>
<h1 id="reference">Reference</h1>
<p>Here is a list of config variable that can be used in <a href="https://board.jdownloader.org/showpost.php?p=421993&postcount=2">Jdownloader Packegizer rules config</a>.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><jd:append>
-> this placeholder will be replaced by previous value where the placeholder is being used in
<jd:prop:KEY>
-> this placeholder reads out an internal property of the downloadlink itself. properties are plugin specific and there are plans that plugins can return a list of supported properties that can be used here
<jd:indexof>
-> this placeholder will be replaced by number of index of the downloadlink within its package. first link will be 1, second link will be 2 and so on. It's just the index within the package!
-> will be replaced in real time
<jd:subfolderbyplugin>
-> some plugins support recursive folder support. if supported by plugin, then the downloads will have same directory structure like shown in browser
<jd:env:KEY>
-> this placeholder will be replaced by KEY environment variable of your system
-> will be replaced in real time
<jd:orgfilename> <jd:orgfilename:number>
-> this placeholder will be replaced by original filename or matching group(number) of filename pattern
<jd:packagename>
-> this placeholder will be replaced by the current package name
-> will be replaced in real time
<jd:orgfiletype> <jd:orgfiletype:Pattern>
-> this placeholder will be replaced by the file extension of the file or the match of the given pattern
<jd:orgfilenamewithoutext>
-> this placeholder will be replaced by original filename without file extension
<jd:hoster:number>
-> this placeholder will be replaced by the matching group(number) of downloadurl pattern or the host itself if number is -1
<jd:source:(number)pattern>
-> this placeholder will be replaced by the match of sourceurl pattern. with number you can specify which sourceurl to process
<jd:simpledate:simpleDateFormatString>
-> this placeholder will be replaced by time formatted with simpleDateFormatString, see docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
-> will be replaced in real time
<jd:orgpackagename>
-> this placeholder will be replaced by the original package name
</code></pre></div></div>Max Barrassme@maxbarrass.comhttp://maxbarrass.comIntroLinkmoji 💪😎👍2016-11-04T00:00:00+11:002016-11-04T00:00:00+11:00https://maxbarrass.com/blog/2016/11/04/linkmoji<p>Linkmoji!</p>
<p>Something random doing the rounds online at the moment Linkmoji.</p>
<p>http://🎁🍊🎩🍍🐌🐱😐🐙.🍕💩.ws</p>
<p>Translates to:</p>
<p><a href="http://pizza-poop.ws/present-orange-tophat-pineapple-snail-kitty-speechless-tako">http://pizza-poop.ws/present-orange-tophat-pineapple-snail-kitty-speechless-tako</a></p>
<p>These guys wrote this service in an hour very impressive :)</p>
<p>Also, you can use emoji’s in you article url’s and I use this <a href="https://gist.github.com/rxaviers/7360908">list of emoji’s</a> to create URL and add some punch to my articles.</p>
<p>You can check <a href="https://github.com/wildone/maxbarrass.com/blob/master/_posts/2016-11-04-linkmoji.md">source</a> of this article to see how it’s done.</p>
<p>Let the linkmoji make your articles standout!</p>Max Barrassme@maxbarrass.comhttp://maxbarrass.comLinkmoji!AEM Capability Matrix2015-05-31T23:00:00+10:002015-05-31T23:00:00+10:00https://maxbarrass.com/blog/2015/06/01/aem-capability-matrix<p>I always get asked does AEM has any components that come out of the box (OOTB)? What is the list of OOTB component? Can I use them?</p>
<p>A lot of people don’t know and believe that AEM is a blank canvas and you just start from scratch. Obviously this assumptions are built on other platform people have used in the past. Now of course I would not be writing this if this was the case, but it can be cumbersome to get hand on this information.</p>
<p>Anyways, YES AEM does have OOTB component and yes you can use them for your projects and I would recommend use and build on them as needed. Primary reasons is that OOTB components:</p>
<ol>
<li>can and will save you development work</li>
<li>already have a Authoring Experience which you should pay attention to, as they already have tried and tested pattern that you should look at adopting. If you don’t consider them you end up with building lots of components with totally disconnected authoring experiences across components and you won’t be able to train your Authors how to use each and every component.</li>
</ol>
<p>Now before you jump in I suggest read additional information about AEM so that you understand AEM terminology etc:</p>
<ul>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/develop/components.html">What is a component?</a></li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/develop/the-basics/templates.html">What is a template?</a> (you must not have a lot of these in CMS)</li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/author/page-authoring/default-components.html">Default components in AEM</a> - You will notice that list on Adobe site is very short.</li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/develop/extending/granite/granite-reference.html">Granite UI Reference</a> - When you want to build and update new Authoring Experiences in “Touch UI”</li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/develop/the-basics/touch-ui-concepts.html">Touch UI Concepts</a></li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/develop/components/widgets.html">Classic UI Widgets</a> - Updating Classic UI</li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/ref/widgets-api/index.html">Classic UI Widgets API Library</a> - more detailed widget API reference</li>
</ul>
<p>So finally have had some time to compile and publish this list. This list is a combination of all components available in the Design Mode in each of the AEM version.</p>
<p>In addition to this many clients I have spoken to always ask about AEM Capabilities and Features, so I have started to put together a list of these so that it can be used for all sorts of Strategic and Analytical work.</p>
<p>You could use this list to drive your Discovery of AEM and use it to compare AEM to other CMS platform.</p>
<p>The document is located here please feel free to have a look and add comments if you wish:</p>
<p><a href="https://docs.google.com/spreadsheets/d/11sESEtCSf45j5JWknVLE3DJt9NOJaDHfeBBJFOsxt5o/edit?usp=sharing">AEM Capability Matrix</a></p>
<p>Have fun!</p>Max Barrassme@maxbarrass.comhttp://maxbarrass.comI always get asked does AEM has any components that come out of the box (OOTB)? What is the list of OOTB component? Can I use them?Lucene Index Configuration in AEM2014-05-27T23:00:00+10:002014-05-27T23:00:00+10:00https://maxbarrass.com/blog/2014/05/28/lucene-index-configuration-in-aem<p>If you need to update index configuration to speed up your searches in AEM, you will need to add add an indexing_config.xml to your quickstart.</p>
<p>A good example of why you would extend would be if you have searches that search cq:Page and cq:PageContent at the same time, or you may have multilevel search requirement and you are tempted to do traditional subquery mechanism. In this scenario you can just create an index with all the attributes you want to use for search.</p>
<p>Do note that the more indexes the more space this will take up. Also if you have a large dataset this will take a long time to create, so you need to think about this early on.</p>
<p>Location for the config:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>crx-quickstart/repository/workspaces/crx.default/indexing_config.xml
</code></pre></div></div>
<p>Default configuration can be found here: <a href="http://helpx.adobe.com/experience-manager/kb/SearchIndexingConfig.html">How to modify the search index configurations in CQ5</a></p>
<p>Extended configuration</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="cp"><?xml version="1.0"?></span>
<span class="cp"><!DOCTYPE configuration SYSTEM "http://jackrabbit.apache.org/dtd/indexing-configuration-1.2.dtd"></span>
<span class="nt"><configuration</span>
<span class="na">xmlns:cq=</span><span class="s">"http://www.day.com/jcr/cq/1.0"</span>
<span class="na">xmlns:dam=</span><span class="s">"http://www.day.com/dam/1.0"</span>
<span class="na">xmlns:nt=</span><span class="s">"http://www.jcp.org/jcr/nt/1.0"</span>
<span class="na">xmlns:jcr=</span><span class="s">"http://www.jcp.org/jcr/1.0"</span>
<span class="na">xmlns:sling=</span><span class="s">"http://sling.apache.org/jcr/sling/1.0"</span><span class="nt">></span>
<span class="c"><!-- Disable indexing of cq:AuditEvent --></span>
<span class="nt"><index-rule</span> <span class="na">nodeType=</span><span class="s">"cq:AuditEvent"</span><span class="nt">></index-rule></span>
<span class="c"><!-- Do not index content of subassets --></span>
<span class="nt"><index-rule</span> <span class="na">nodeType=</span><span class="s">"nt:resource"</span>
<span class="na">condition=</span><span class="s">"ancestor::subassets/@jcr:primaryType='{http://www.jcp.org/jcr/nt/1.0}unstructured'"</span><span class="nt">></span>
<span class="nt"></index-rule></span>
<span class="c"><!--
Exclude some well known properties from the node scope
fulltext index. Do not add rules below this one, since
this rule matches any node and acts as a default/fallback.
--></span>
<span class="nt"><index-rule</span> <span class="na">nodeType=</span><span class="s">"nt:base"</span><span class="nt">></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>analyticsProvider<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>analyticsSnippet<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>hideInNav<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>offTime<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>onTime<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:allowedTemplates<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:childrenOrder<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:cugEnabled<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:cugPrincipals<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:cugRealm<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:designPath<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:isCancelledForChildren<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:isDeep<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastModified<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastModifiedBy<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastPublished<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastPublishedBy<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastReplicated<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastReplicatedBy<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastReplicationAction<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastReplicationStatus<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastRolledout<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:lastRolledoutBy<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:name<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:parentPath<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:segments<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:siblingOrder<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:template<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:trigger<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>cq:versionComment<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>jcr:createdBy<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>jcr:lastModifiedBy<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>sling:alias<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>sling:resourceType<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">nodeScopeIndex=</span><span class="s">"false"</span><span class="nt">></span>sling:vanityPath<span class="nt"></property></span>
<span class="nt"><property</span> <span class="na">isRegexp=</span><span class="s">"true"</span><span class="nt">></span>.*:.*<span class="nt"></property></span>
<span class="nt"></index-rule></span>
<span class="c"><!-- Cq Page for jcr:contains(jcr:content, "...") searches --></span>
<span class="nt"><aggregate</span> <span class="na">primaryType=</span><span class="s">"cq:PageContent"</span><span class="nt">></span>
<span class="nt"><include></span>*<span class="nt"></include></span>
<span class="nt"><include></span>*/*<span class="nt"></include></span>
<span class="nt"><include></span>*/*/*<span class="nt"></include></span>
<span class="nt"><include></span>*/*/*/*<span class="nt"></include></span>
<span class="nt"></aggregate></span>
<span class="nt"><aggregate</span> <span class="na">primaryType=</span><span class="s">"dam:Asset"</span><span class="nt">></span>
<span class="nt"><include></span>jcr:content<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/metadata<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/metadata/*<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/renditions<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/renditions/original<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/renditions/original/jcr:content<span class="nt"></include></span>
<span class="c"><!-- child axis orderby index --></span>
<span class="nt"><include></span>jcr:content/renditions/original/jcr:content/jcr:lastModified<span class="nt"></include></span>
<span class="nt"></aggregate></span>
<span class="c"><!-- nt:file child axis orderby index --></span>
<span class="nt"><aggregate</span> <span class="na">primaryType=</span><span class="s">"nt:file"</span><span class="nt">></span>
<span class="nt"><include></span>jcr:content<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/jcr:lastModified<span class="nt"></include></span>
<span class="nt"></aggregate></span>
<span class="c"><!-- cq:Page child axis orderby index --></span>
<span class="nt"><aggregate</span> <span class="na">primaryType=</span><span class="s">"cq:Page"</span><span class="nt">></span>
<span class="nt"><include></span>jcr:content<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/cq:lastModified<span class="nt"></include></span>
<span class="nt"></aggregate></span>
<span class="c"><!-- cq:Page child axis orderby index --></span>
<span class="nt"><aggregate</span> <span class="na">primaryType=</span><span class="s">"cq:Page"</span><span class="nt">></span>
<span class="nt"><include></span>jcr:content<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/par/*/date<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/par/*/tags<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/par/*/sling:resourceType<span class="nt"></include></span>
<span class="nt"><include></span>jcr:content/cq:tags<span class="nt"></include></span>
<span class="nt"></aggregate></span>
<span class="nt"></configuration></span>
</code></pre></div></div>Max Barrassme@maxbarrass.comhttp://maxbarrass.comIf you need to update index configuration to speed up your searches in AEM, you will need to add add an indexing_config.xml to your quickstart.JCR Predicate Operations in AEM2014-05-26T23:00:00+10:002014-05-26T23:00:00+10:00https://maxbarrass.com/blog/2014/05/27/jcr-predicate-operations-in-aem<p>Here are some samples of JCR search in AEM. There is very little doco on this so here it goes.</p>
<p>Two things you maybe wondering, number one how to use the Operations on a predicate and second how to do full text case insensitive search on attributes. Well without any further ado:</p>
<ul>
<li><a href="http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=path%3D%2Fcontent%2Fgeometrixx%0D%0Atype%3Dcq%3APage%0D%0Aproperty%3Djcr%3Acontent%2Fcq%3Atoolbars%0D%0Aproperty.operation%3Dexists%0D%0A">Operation Exists</a></li>
<li><a href="http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=path%3D%2Fcontent%2Fgeometrixx%0D%0Atype%3Dcq%3APage%0D%0Aproperty%3Djcr%3Acontent%2Fjcr%3Atitle%0D%0Aproperty.operation%3Dlike%0D%0Aproperty.value%3D%25ac%25">Operation Like</a></li>
<li><a href="http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=path%3D%2Fcontent%2Fgeometrixx%0D%0Atype%3Dcq%3APage%0D%0Aproperty%3Djcr%3Acontent%2Fjcr%3Atitle%0D%0Aproperty.operation%3Dequals%0D%0Aproperty.value%3DContact">Operation Equals</a></li>
<li><a href="http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=path%3D%2Fcontent%2Fgeometrixx%0D%0Atype%3Dcq%3APage%0D%0Aproperty%3Djcr%3Acontent%2Fjcr%3Atitle%0D%0Aproperty.operation%3Dunequals%0D%0Aproperty.value%3DContact">Operation UnEquals</a></li>
<li><a href="http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=path%3D%2Fcontent%2Fgeometrixx%0D%0Atype%3Dcq%3APage%0D%0Aproperty%3Djcr%3Acontent%2Fcq%3Atoolbars%0D%0Aproperty.operation%3Dnot">Operation Not Exist</a></li>
<li><a href="http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=path%3D%2Fcontent%2Fgeometrixx%0D%0Atype%3Dcq%3APage%0D%0Agroup.p.or%3Dtrue%0D%0Agroup.1_fulltext%3D*Z*%0D%0Agroup.1_fulltext.relPath%3D%40jcr%3Acontent%2Fjcr%3Atitle%0D%0Agroup.2_fulltext%3D*tt*%0D%0Agroup.2_fulltext.relPath%3D%40jcr%3Acontent%2Fcq%3Atoolbars%0D%0A%0D%0A">Full Text Case-Insensitive Search Example</a></li>
</ul>
<p>You can find lots more examples in <a href="https://github.com/wildone/aem-links/blob/master/querybuilder_cheatsheet.md">Query Builder Cheat Sheet</a> and Adobe info <a href="http://dev.day.com/docs/en/cq/current/dam/customizing_and_extendingcq5dam/query_builder.html">AEM Query Builder API Docs</a></p>Max Barrassme@maxbarrass.comhttp://maxbarrass.comHere are some samples of JCR search in AEM. There is very little doco on this so here it goes.My move from Polar to Garmin2013-10-04T23:00:00+10:002013-10-04T23:00:00+10:00https://maxbarrass.com/blog/2013/10/05/my-move-from-polar-to-garmin<p>I’ve finally completed my journey from Polar to Garmin. Just after I started running 3 years ago and before my first marathon I bough my self a training watch and a GPS from Polar. The version at the time I settled for was RXS800 with a matching GPS unit. That watch saw me though my first marathon, several races, athletics events and another 3 marathons. I think it was a worthy investment now that I look over the amount of activities I accumulated in the Polar Pro Trainer.</p>
<p>Despite the times that Polar saw me though, before my last marathon I switched to a Garmin 900xt, this was largely because the GPS unit on Polar take way to long to find satellites, its not water-off (more on this later) and its separate from the watch (only so many times half way though your run you realize that GPS is back home and then you look with envy at all the Garmin users).</p>
<p>The GPS unit for Polar run of a AA battery, which you have to make sure you charge pretty much before each run. The unit it self gives you little indication that it will run out of juice by the time you are done. As I mentioned earlier its not actually water proof. I would say its splash proof, submersion proof or what ever you want to call it, but as long as it describes the usage withing first ~50 battery replacements after coming out of the box. This is is because after a while the O-ring on the round battery door stops being effective, as the whole door comes out! After this happens and you get it wet it turns into a paperweight.</p>
<p>Moving right along, I’ve switched to Garmin, I use their Garmin online offering [1] and I sync activities to Strava [2] automatically [3]! Cool right! Yes, but. All my polar activities still sat in the Polar Pro Trainer, which is a desktop software, its ok but in this day and age its a little 90’s nostalgia. I’ve tried Polar’s online offering and its not Garmin and its not Strava, its clinically sterile which is not always about fun.</p>
<p>Anyways, my transition Polar and Garmin was quick and it did not effect my training, but I can say that much for the amount of exercise data that I collected in the Polar Pro Trainer. There is no actual working migration tools available to do this painlessly and I did not want to write one. I tried all the tools available on both Mac and Windows including import and cleanup mechanisms and found the following process to work like a charm.</p>
<p>Over all process is to convert your Polar GPX and HRM files to TCX files [4] then import them into Garmin’s Training Center [5], then use Garmin Training Center and upload those activities in bulk to Garmin and you are in business! If you are syncing from Garmin to Strava [3], go to Garmin and set default activity privacy to Everyone before you do a bulk upload from Garmin Training Center. This will save you lots of time after :)</p>
<p>Good luck and keep running!</p>
<p>Links</p>
<ol>
<li>http://connect.garmin.com/</li>
<li>http://www.strava.com</li>
<li>http://www.copymysports.com/</li>
<li>http://github.com/wildone/gpx2tcx</li>
<li>http://www8.garmin.com/support/collection.jsp?product=999-99999-04</li>
</ol>Max Barrassme@maxbarrass.comhttp://maxbarrass.comI’ve finally completed my journey from Polar to Garmin. Just after I started running 3 years ago and before my first marathon I bough my self a training watch and a GPS from Polar. The version at the time I settled for was RXS800 with a matching GPS unit. That watch saw me though my first marathon, several races, athletics events and another 3 marathons. I think it was a worthy investment now that I look over the amount of activities I accumulated in the Polar Pro Trainer.VBA and Office 20132012-09-09T23:00:00+10:002012-09-09T23:00:00+10:00https://maxbarrass.com/blog/2012/09/10/vba-and-office-2013<p>I’ve installed office 2013 Preview and found one of my projects not working in my case it was WebBrowser component. Well turns out bunch of ActiveX controls are disabled to protect you from yourself. But nothing to complicated that a bit of registry magic did not fix.</p>
<p>The key and value is:</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\COM Compatibility\{8856F961-340A-11D0-A96B-00C04FD705A2}]
"Compatibility Flags"=dword:00000000
</code></pre></div></div>
<p>If you don’t do this you will get a surprisingly detailed message: “The subject is not trusted for the specified action.” to get you started with your investigation! :) Oh and you don’t even need to restart anything… it just works… like magic….</p>Max Barrassme@maxbarrass.comhttp://maxbarrass.comI’ve installed office 2013 Preview and found one of my projects not working in my case it was WebBrowser component. Well turns out bunch of ActiveX controls are disabled to protect you from yourself. But nothing to complicated that a bit of registry magic did not fix.VBA Try…Catch…Finally2011-09-08T23:00:00+10:002011-09-08T23:00:00+10:00https://maxbarrass.com/blog/2011/09/09/vba-try-catch-finally<p>When writing function and in particular custom error handling in VBA please remember this common patern for error handling when using “On Error”.</p>
<p>Function template:</p>
<p>Sub|Function SomeName()
On Error GoTo Err_SomeName ‘ Initialize error handling.
‘ Code to do something here.
Exit_SomeName: ‘ Label to resume after error.
Exit Sub|Function ‘ Exit before error handler.
Err_SomeName: ‘ Label to jump to on error.
Call MsgBox(Err.Number & Err.Description) ‘ Place error handling here.
Call Err.Clear ‘ Clear the error
Resume Exit_SomeName ‘ Pick up again and quit.
End Sub|Function</p>
<p>In-line template:</p>
<p>On Error Resume Next ‘ Initialize error handling.
‘ Code to do something here.
If Err.Number <> 0 Then ‘ Check if error occured
‘ Code to do something here on error
Call Err.Clear ‘ Clear the error
End If
On Error GoTo 0 ‘ Disable error handling in current procedure
‘ make other unexpected errors bubble up</p>
<p>Why you ask?! Well because VBA only has single Error object into which all function write their errors, so if you are going to use “On Error Resume Next”, handle the error and clear it, because when an error occurs its not cleared automatically when leave a function. Basically using this pattern you are mimicking the Try..Catch..Finally statements that are explicit in other languages.</p>
<p>This is particular important if you write a deterministic functions (functions that supposed to return a value, not an error) because you are going to use them to perform logic not a good idea to leave errors handing around!</p>
<p>Here is an example of a conundrum you could experience:</p>
<pre><code class="language-asp">Sub WhatOnEarth()
Dim ItsTrue As Boolean
On Error Resume Next
ItsTrue = IsItTrue
If Err.Number <> 0 Then
MsgBox Err.Description
ItsTrue = False
End If
If ItsTrue = True Then
Call MsgBox("Eureka!")
Else
Call MsgBox("Eureka!...NOT!!")
End If
End Sub
Function IsItTrue() As Boolean
Dim tester
On Error Resume Next
tester = 1 / 0
IsItTrue = True
End Function
</code></pre>
<p>And really this is all you should have experienced:</p>
<pre><code class="language-asp">Sub WhatOnEarth()
Dim ItsTrue As Boolean
On Error Resume Next
ItsTrue = IsItTrue
If Err.Number <> 0 Then
MsgBox Err.Description
ItsTrue = False
End If
If ItsTrue = True Then
Call MsgBox("Eureka!")
Else
Call MsgBox("Eureka!...NOT!!")
End If
End Sub
Function IsItTrue() As Boolean
Dim tester
On Error Resume Next 'try
tester = 1 / 0
If Err.Number <> 0 Then 'catch
Call Err.Clear
End If
IsItTrue = True 'finaly
End Function
</code></pre>
<p>glhf!</p>Max Barrassme@maxbarrass.comhttp://maxbarrass.comWhen writing function and in particular custom error handling in VBA please remember this common patern for error handling when using “On Error”.