perfectly looping svg animation - animation

I am trying to loop an audio wave svg so that it's perfectly looping but I cannot figure it out. I currently have the below, however, as you will see the loop is not perfect. Is there an easy way to do this? Or can someone point me in the right direction?
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="waveform" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 220 100" style="enable-background:new 0 0 220 100;" xml:space="preserve">
<g id="waveform">
<path d="M186.4,0c-1.3,0.1-2.2,1.3-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6V2.6C188.6,1.1,187.7,0,186.4,0z"/>
<path d="M69.4,20.2c-1.3,0-2.2,1.2-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V22.8C71.6,21.3,70.7,20.2,69.4,20.2z"/>
<path d="M58.7,0c-1.2,0.1-2.2,1.3-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6V2.6C60.9,1.1,60,0,58.7,0z"/>
<path d="M101.2,11.9c-1.2,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6v-71C103.4,13,102.5,11.9,101.2,11.9z"/>
<path d="M48.2,20.2c-1.3,0-2.2,1.2-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6V22.8C50.4,21.3,49.4,20.2,48.2,20.2z"/>
<path d="M90.7,35.6c-1.3,0-2.2,1.2-2.2,2.6V62c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V38.2C92.9,36.7,91.9,35.6,90.7,35.6z"/>
<path d="M16.2,22.1C15,22.2,14,23.3,14,24.7v50.6c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6V24.7C18.4,23.2,17.4,22.1,16.2,22.1z"/>
<path d="M5.7,35.6c-1.3,0-2.2,1.2-2.2,2.6V62c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6V38.2C7.9,36.7,6.9,35.6,5.7,35.6z"/>
<path d="M37.4,11.9c-1.2,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6v-71C39.7,13,38.7,11.9,37.4,11.9z"/>
<path d="M26.9,35.6c-1.3,0-2.2,1.2-2.2,2.6V62c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V38.2C29.1,36.7,28.2,35.6,26.9,35.6z"/>
<path d="M80,11.9c-1.2,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6v-71C82.2,13,81.2,11.9,80,11.9z"/>
<path d="M154.4,35.6c-1.3,0-2.2,1.2-2.2,2.6V62c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V38.2C156.7,36.7,155.7,35.6,154.4,35.6z"/>
<path d="M165.2,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6v-71C167.4,13,166.4,11.9,165.2,11.9z"/>
<path d="M197,20.2c-1.3,0-2.2,1.2-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V22.8C199.2,21.3,198.2,20.2,197,20.2z"/>
<path d="M207.7,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6v-71C209.9,13,208.9,11.9,207.7,11.9z"/>
<path d="M175.7,20.2c-1.3,0-2.2,1.2-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V22.8C177.9,21.3,177,20.2,175.7,20.2z"/>
<path d="M122.7,0c-1.4,0.1-2.2,1.3-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V2.6C124.9,1.1,123.9,0,122.7,0z"/>
<path d="M111.9,20.2c-1.3,0-2.2,1.2-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V22.8
C114.2,21.3,113.2,20.2,111.9,20.2z"/>
<path d="M133.2,20.2c-1.3,0-2.2,1.2-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6V22.8
C135.4,21.3,134.4,20.2,133.2,20.2z"/>
<path d="M143.9,11.9c-1.4,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.1,2.2-2.6v-71C146.1,13,145.2,11.9,143.9,11.9z"/>
<path d="M-121.9,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C-119.7,21.2-120.6,20.1-121.9,20.1z"/>
<path d="M-89.9,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.2,0,2.2-1.1,2.2-2.6v-71C-87.7,13-88.6,11.9-89.9,11.9z"/>
<path d="M-111.4,0c-1.3,0-2.2,1.1-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6c1.4-0.1,2.2-1.3,2.2-2.6V2.6C-109.1,1.1-110.1,0-111.4,0z"/>
<path d="M-100.6,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C-98.4,21.2-99.4,20.1-100.6,20.1z"/>
<path d="M-79.4,35.4c-1.3,0-2.2,1.1-2.2,2.6v23.8c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V38C-77.2,36.5-78.1,35.4-79.4,35.4z"/>
<path d="M-68.6,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.2,0,2.2-1.1,2.2-2.6v-71C-66.4,13-67.4,11.9-68.6,11.9z"/>
<path d="M-36.9,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7C-34.6,21.2-35.6,20.1-36.9,20.1z"/>
<path d="M-47.4,0c-1.3,0-2.2,1.1-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6c1.2-0.1,2.2-1.3,2.2-2.6V2.6C-45.2,1.1-46.1,0-47.4,0z"/>
<path d="M-58.1,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7C-55.9,21.2-56.9,20.1-58.1,20.1z"/>
<path d="M-15.6,35.4c-1.3,0-2.2,1.1-2.2,2.6v23.8c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V38C-13.4,36.5-14.3,35.4-15.6,35.4z"/>
<path d="M-4.9,22.1c-1.3,0-2.2,1.1-2.2,2.6v50.6c0,1.5,1,2.6,2.2,2.6c1.2-0.1,2.2-1.2,2.2-2.6V24.7C-2.7,23.2-3.6,22.1-4.9,22.1z"/>
<path d="M-185.7,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C-183.4,21.2-184.4,20.1-185.7,20.1z"/>
<path d="M-196.4,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6v-71C-194.2,13-195.1,11.9-196.4,11.9z"/>
<path d="M-26.1,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.2,0,2.2-1.1,2.2-2.6v-71C-23.9,13-24.9,11.9-26.1,11.9z"/>
<path d="M-164.4,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C-162.2,21.2-163.1,20.1-164.4,20.1z"/>
<path d="M-175.1,0c-1.3,0-2.2,1.1-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6c1.3-0.1,2.2-1.3,2.2-2.6V2.6C-172.9,1.1-173.9,0-175.1,0z"/>
<path d="M-143.1,35.4c-1.3,0-2.2,1.1-2.2,2.6v23.8c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V38
C-140.9,36.5-141.9,35.4-143.1,35.4z"/>
<path d="M-153.9,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6v-71C-151.6,13-152.6,11.9-153.9,11.9z"/>
<path d="M-132.6,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.4,0,2.2-1.1,2.2-2.6v-71C-130.4,13-131.4,11.9-132.6,11.9z"/>
<path d="M282.2,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C284.4,21.2,283.4,20.1,282.2,20.1z"/>
<path d="M314.2,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.2,0,2.2-1.1,2.2-2.6v-71C316.4,13,315.4,11.9,314.2,11.9z"/>
<path d="M292.7,0c-1.3,0-2.2,1.1-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6c1.4-0.1,2.2-1.3,2.2-2.6V2.6C294.9,1.1,294,0,292.7,0z"/>
<path d="M303.4,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C305.7,21.2,304.7,20.1,303.4,20.1z"/>
<path d="M324.7,35.4c-1.3,0-2.2,1.1-2.2,2.6v23.8c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V38C326.9,36.5,325.9,35.4,324.7,35.4z"/>
<path d="M335.4,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.2,0,2.2-1.1,2.2-2.6v-71C337.6,13,336.7,11.9,335.4,11.9z"/>
<path d="M367.2,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C369.4,21.2,368.5,20.1,367.2,20.1z"/>
<path d="M356.7,0c-1.3,0-2.2,1.1-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6c1.2-0.1,2.2-1.3,2.2-2.6V2.6C358.9,1.1,357.9,0,356.7,0z"/>
<path d="M345.9,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C348.2,21.2,347.2,20.1,345.9,20.1z"/>
<path d="M388.5,35.4c-1.3,0-2.2,1.1-2.2,2.6v23.8c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V38C390.7,36.5,389.7,35.4,388.5,35.4z"/>
<path d="M401.4,24.7c0-1.5-1-2.6-2.2-2.6c-1.3,0-2.2,1.1-2.2,2.6v50.6c0,1.5,1,2.6,2.2,2.6c1.2-0.1,2.2-1.2,2.2-2.6"/>
<path d="M218.4,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C220.6,21.2,219.7,20.1,218.4,20.1z"/>
<path d="M377.9,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.2,0,2.2-1.1,2.2-2.6v-71C380.1,13,379.2,11.9,377.9,11.9z"/>
<path d="M239.7,20.1c-1.3,0-2.2,1.1-2.2,2.6v54.5c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V22.7
C241.9,21.2,240.9,20.1,239.7,20.1z"/>
<path d="M228.9,0c-1.3,0-2.2,1.1-2.2,2.6v94.8c0,1.5,1,2.6,2.2,2.6c1.3-0.1,2.2-1.3,2.2-2.6V2.6C231.2,1.1,230.2,0,228.9,0z"/>
<path d="M260.9,35.4c-1.3,0-2.2,1.1-2.2,2.6v23.8c0,1.5,1,2.6,2.2,2.6c1.3,0,2.2-1.2,2.2-2.6V38C263.1,36.5,262.2,35.4,260.9,35.4z"/>
<path d="M250.2,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6s2.2-1.1,2.2-2.6v-71C252.4,13,251.4,11.9,250.2,11.9z"/>
<path d="M271.4,11.9c-1.3,0-2.2,1.1-2.2,2.6v71c0,1.5,1,2.6,2.2,2.6c1.4,0,2.2-1.1,2.2-2.6v-71C273.7,13,272.7,11.9,271.4,11.9z"/>
<animateTransform attributeName="transform" type="translate" from="0 0" to="-160 0" repeatCount="indefinite" dur="2.5s"/></g>
</svg>
I also want this to be pure SVG - no JS solutions please

You can use <use/> to make a copy of the wave and render it on the right of the wave. You would have to however, adjust the <animateTransform/> element appropriately:
<animateTransform attributeName="transform" type="translate" from="0 0" to="-604.4 0" repeatCount="indefinite" dur="9.375s"/></g>
<use href="#waveform" x="604.4"/>

Related

Which Resharper Setting controls alignment of Lambdas

I have this code
ToggleAnalyzeCmd = new DelegateCommand(
() =>
{
if (IsAnalyzing)
CancelAnalysis();
else
Analyze(false);
},
() => IsAnalyzing)
.ObservesProperty(() => IsAnalyzing);
But when I type it or reformat it with Resharper (version 2022.3.1), it really wants those two lambdas to be lined up right under the DelegateCommand No matter how far to the right that is. Here is what I get if I select the block of code and use Resharper's "FormatCode" command
ToggleAnalyzeCmd = new DelegateCommand(
() =>
{
if (IsAnalyzing)
CancelAnalysis();
else
Analyze(false);
},
() => IsAnalyzing)
.ObservesProperty(() => IsAnalyzing);
Looking at Options >> Code Editing >> C# >> Tabs, Indents, Alignment, I am trying to find what setting controls this
I tried checking/unchecking the most obvious candidate; This setting:
Align multiline constructs >> Anonymous Method Body
It has no effect. My code still gets indented regardless. I don't see any other setting that looks like it could.
Anyone know what setting I am looking for?
EDIT: By request I am sharing my resharper settings file - just the code editing and code-style properties. This is long though
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/MethodImplementationKind/#EntryValue">ReturnDefaultValue</s:String>
<s:Boolean x:Key="/Default/CodeEditing/GenerateMemberBody/WrapIntoRegions/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/AutoCompleteSmartCompletion/#EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/EditorBrowsableProcessing/#EntryValue">Advanced</s:String>
<s:String x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/ParenthesesInsertType/#EntryValue">Left</s:String>
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/ReplaceKeywordsWithTemplates/#EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/NonCompletingCharacters/#EntryValue">.,;</s:String>
<s:String x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/NonCompletingCharacters/#EntryValue">.,;</s:String>
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/#EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeEditing/Intellisense/LookupWindow/ShowAnnotations/#EntryValue">All</s:String>
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/LookupWindow/UseCompletionFontForLookups/#EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeEditing/TypingAssist/BraceInsertType/#EntryValue">DISABLED</s:String>
<s:Boolean x:Key="/Default/CodeEditing/TypingAssist/InsertAsteriskInBlockComments/#EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeEditing/TypingAssist/SkipClosingBracesOnTabInIndentPosition/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeEditing/TypingAssist/SkipClosingBracesOnTabInStringLiterals/#EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeEditing/TypingAssist/SmartBackspace/#EntryValue">OFF</s:String>
<s:Boolean x:Key="/Default/CodeEditing/TypingAssist/SurroundTypingEnabled/#EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_BINARY_PATTERNS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_CALLS_CHAIN/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_EXTENDS_LIST/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_FOR_STMT/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_PARAMETER/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_STATEMENT_CONDITIONS/#EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTIPLE_DECLARATION/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_CONSTRAINS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_LIST/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_TUPLE_COMPONENTS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALLOW_FAR_ALIGNMENT/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_BRACES_INSIDE_STATEMENT_CONDITIONS/#EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_CASE_FROM_SWITCH/#EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_INVOCATION_PARS/#EntryValue">OUTSIDE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_METHOD_DECL_PARS/#EntryValue">OUTSIDE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_PARS/#EntryValue">OUTSIDE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_STATEMENT_PARS/#EntryValue">OUTSIDE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_TYPEARG_ANGLES/#EntryValue">OUTSIDE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_TYPEPARAM_ANGLES/#EntryValue">OUTSIDE</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_ASSIGNMENTS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_BINARY_EXPRESSIONS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_COMMENTS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_FIELDS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_INVOCATIONS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_METHODS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_NESTED_TERNARY/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_PARAMETERS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_PROPERTIES/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_PROPERTY_PATTERNS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_SWITCH_SECTIONS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INT_ALIGN_VARIABLES/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_DECLARATION_BLOCK_ARRANGEMENT/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/OUTDENT_COMMAS/#EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ABSTRACT_ACCESSORHOLDER_ON_SINGLE_LINE/#EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/STICK_COMMENT/#EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/USE_INDENT_FROM_VS/#EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_AFTER_DECLARATION_LPAR/#EntryValue">True</s:Boolean>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/#EntryValue">165</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/#KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/#EntryIndexedValue">False</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Naming/CSharpAutoNaming/IsNotificationDisabled/#EntryValue">True</s:Boolean></wpf:ResourceDictionary>

Why Upgrading to Alpinejs 3.2 menu does noes not work?

In Laravel 8 / Alpinejs 2.8 app I had toggle menu like
<!--Toggle button (hidden on large screens)-->
<button
#click="isOpen = !isOpen"
type="button"
class="block lg:hidden px-2 text-gray-500 hover:text-white focus:outline-none focus:text-white"
:class="{ 'transition transform-180': isOpen }"
>
<svg
class="h-6 w-6 fill-current"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
>
<path
x-show="isOpen"
fill-rule="evenodd"
clip-rule="evenodd"
d="M18.278 16.864a1 1 0 0 1-1.414 1.414l-4.829-4.828-4.828 4.828a1 1 0 0 1-1.414-1.414l4.828-4.829-4.828-4.828a1 1 0 0 1 1.414-1.414l4.829 4.828 4.828-4.828a1 1 0 1 1 1.414 1.414l-4.828 4.829 4.828 4.828z"
/>
<path
x-show="!isOpen"
fill-rule="evenodd"
d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"
/>
</svg>
</button>
<!--Menu-->
<div
class="w-full flex-grow lg:flex lg:items-center lg:w-auto"
:class="{ 'block shadow-3xl': isOpen, 'hidden': !isOpen }"
#click.away="isOpen = false"
x-show.transition="true"
>
<ul
class="pt-6 lg:pt-0 list-reset lg:flex justify-end flex-1 items-center"
>
<li class="mr-3">
and it worked ok.
Upgrading to Alpinejs 3.2 modified
#click.away="isOpen = false"
with #click.away="isOpen = false"
with
#click.outside="isOpen = false"
and
x-show.transition="true"
into
x-show="true"
x-transition
but after that drop down menu is not visible at all.
Why so and how it can be fixed?
MODIFIED # 1:
If to change x-show="isOpen" for menu then yes, on small devices menu works as expected, but
on big devices it is not visible at all
I need somehow to set init value to true on big devices. Condition :
x-show="isOpen"
md:x-show="true"
x-transition
does not work
I think I can use package https://github.com/jenssegers/agent to get this value depending on current device.
Are there better decision?
Could you please explain how devtools were usefull in this debugging?
Thanks!
If you check it in devtools it is actually works as expected when you toggle isOpen state. The problem is when you click button it is also considered as click.away out of menu. I'll suggest to set this click on a parent element. Also I change menu settings - x-show set to isOpen like x-show="isOpen" and toggle statement will handle visibility of element with Tailwind's visible class
<div
x-data="{ isOpen: false }"
#click.outside="isOpen = false"
>
<button
#click="isOpen = !isOpen"
type="button"
class="block lg:hidden px-2 text-gray-500 focus:outline-none"
:class="{ 'transition transform-180': isOpen }"
>
<svg
class="w-6 h-6 fill-current"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
>
<path
x-show="isOpen"
fill-rule="evenodd"
clip-rule="evenodd"
d="M18.278 16.864a1 1 0 0 1-1.414 1.414l-4.829-4.828-4.828 4.828a1 1 0 0 1-1.414-1.414l4.828-4.829-4.828-4.828a1 1 0 0 1 1.414-1.414l4.829 4.828 4.828-4.828a1 1 0 1 1 1.414 1.414l-4.828 4.829 4.828 4.828z"
/>
<path
x-show="!isOpen"
fill-rule="evenodd"
d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"
/>
</svg>
</button>
<!--Menu-->
<div
class="flex-grow w-full lg:flex shadow-3xl lg:items-center lg:w-auto"
:class="[ isOpen ? 'visible' : 'unvisible' ]"
x-show="isOpen"
x-transition
>
<ul
class="items-center justify-end flex-1 pt-6 lg:pt-0 list-reset lg:flex"
>
<li class="mr-3">Link 1</li>
<li class="mr-3">Link 2</li>
</ul>
</div>
</div>

How to redirect long string with single/double quotes var in Rundeck?

thank you for taking time reading this question.
I've a Rundeck job with multiple steps. Basically, step 1 and 2 is fetching a long string which is under ' '. Example:
'This is a long string.. and is also under "double quotes" '. -> This variable is stored as the following form: #option.mylongstring#
Third step of my Rundeck job is failing because I'm having issues with single and multiple quotes in my string. I want to extract specific values from that long string
My solution was to send the content of #option.mylongstring# in a temp file and apply sed to convert single quotes into double quotes (sed "s/'/\"/g") and from there, extract the information that I need.
Anyway, seems that the redirection is not happening in Rundeck: echo #option.mylongstring# &> $TEMPFILE is doing nothing, generating an empty file.
Anyone faced the same issue?
Using inline-script works without problems, let me share the job definition example:
<joblist>
<job>
<defaultTab>nodes</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>5e7123ce-c9b7-4bfa-a0e8-6484a9bd7c4f</id>
<loglevel>INFO</loglevel>
<name>LongStringExample</name>
<nodeFilterEditable>false</nodeFilterEditable>
<plugins />
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<fileExtension>.sh</fileExtension>
<script><![CDATA[echo 'hello "world"' > myfile.txt]]></script>
<scriptargs />
<scriptinterpreter>/bin/bash</scriptinterpreter>
</command>
</sequence>
<uuid>5e7123ce-c9b7-4bfa-a0e8-6484a9bd7c4f</uuid>
</job>
</joblist>
Using an option:
<joblist>
<job>
<context>
<options preserveOrder='true'>
<option name='opt1' />
</options>
</context>
<defaultTab>nodes</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>22d7286f-7be9-4aaf-92ae-8e5bf5277d67</id>
<loglevel>INFO</loglevel>
<name>AnotherLongStringExample</name>
<nodeFilterEditable>false</nodeFilterEditable>
<plugins />
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<fileExtension>.sh</fileExtension>
<script><![CDATA[echo 'this is another "#option.opt1#"' > another_file.txt]]></script>
<scriptargs />
<scriptinterpreter>/bin/bash</scriptinterpreter>
</command>
</sequence>
<uuid>22d7286f-7be9-4aaf-92ae-8e5bf5277d67</uuid>
</job>
</joblist>

Q: How to sanitise XML files with xmlstarlet?

I've got several xml files to sanitise via the command line tool xmlstarlet (1.6.1).
Sample 1
<?xml version="1.0" encoding="utf-8"?>
<!-- Some license comment
- with some link to http://example.com/foo/ -->
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Name Sample 1</ShortName>
<Description>Description Sample 1</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image height="16" width="16">data:...</Image>
<Url type="text/html" method="get" template="https://examplesearch.com/" rel="searchform">
<Param name="q" value="{searchTerms}"/>
<MozParam name="m1" condition="purpose" value="abc"/>
<MozParam name="m2" condition="purpose" value="cde"/>
</Url>
</OpenSearchDescription>
Sample 2
<!-- Some license comment
- with some link to http://example.com/foo/ -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Name Sample 2</ShortName>
<Description>Description Sample 2</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:...</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://www.examplesearch.com/search?client=firefox&q={searchTerms}"/>
<Url type="text/html" method="GET" template="https://examplesearch.com/search" rel="searchform">
<Param name="q" value="{searchTerms}"/>
</Url>
</SearchPlugin>
I try to clear the Description node first which works for sample 2:
xml ed -L -u "//_:SearchPlugin/_:Description" -v "" sample2.xml
The result is the node <Description/>, but the same logic does not work for sample 1:
xml ed -L -u "//_:OpenSearchDescription/_:Description" -v "" sample1.xml
I'd like to receive <Description><Description/> as results for both xml samples.
Update: The previous part has been solved.
Secondly, in sample 2 I'd like to remove client=firefox& out of the second Url template value:
"https://www.examplesearch.com/search?client=firefox&q={searchTerms}"
I've got no clue how to apply a regex/xslt operation on the value to achieve this. Any suggestions how this could be done?

Generating number circles in SVG - how to centre the text [duplicate]

This question already has an answer here:
How to draw a number centered inside a circle with inline svg?
(1 answer)
Closed 7 years ago.
I have written a script to generate SVG files showing 1 numbers in circles. This is for use in a drawing app as clipart.
Here is the script:
if [ ! -d circleNums ]
then
mkdir circleNums
fi
rm circleNums/index.html
# Add this line for center guide <line x1="63" y1="0" x2="63" y2="128" style="stroke:rgb(255,127,64);stroke-width:2"/>
for I in {1..9}
do
cat <<EOF > circleNums/$I.svg
<svg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg' version='1.1' >
<circle cx="64" cy="64" r="62" fill="rgb(0,100,0)" stroke="red" stroke-width="2"/>
<text x="35" y="95" font-family="sans-serif" font-size="90px" fill="white">$I</text>
</svg>
EOF
echo "<img src=\"$I.svg\" >" >> circleNums/index.html
done
for I in {10..99}
do
cat <<EOF > circleNums/$I.svg
<svg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg' version='1.1' >
<circle cx="64" cy="64" r="62" fill="rgb(0,100,0)" stroke="red" stroke-width="2"/>
<text x="15" y="95" font-family="sans-serif" font-size="90px" fill="white">$I</text>
</svg>
EOF
echo "<img src=\"$I.svg\" >" >> circleNums/index.html
done
ls circleNums
Example of output, 1.svg:
<svg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg' version='1.1' >
<circle cx="64" cy="64" r="62" fill="rgb(0,100,0)" stroke="red" stroke-width="2"/>
<text x="35" y="95" font-family="sans-serif" font-size="90px" fill="white">1</text>
</svg>
99.svg:
<svg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg' version='1.1' >
<circle cx="64" cy="64" r="62" fill="rgb(0,100,0)" stroke="red" stroke-width="2"/>
<text x="15" y="95" font-family="sans-serif" font-size="90px" fill="white">99</text>
</svg>
As you can see the centring is guess work and experimentation based. How can I get the text to centre about a particular point, in this case x=64, y=64?
I made small changes to your script:
I merged two loops into one
I replaced x and y to 50% like you'd expect from a centered text
I used text-anchor="middle" property to make the text render centered (relative to image center)
I used dy=".35em" to correct vertical shift - it looks good enough to me. Other fonts might need other values.
if [ ! -d circleNums ]
then
mkdir circleNums
fi
rm circleNums/index.html
# Add this line for center guide <line x1="63" y1="0" x2="63" y2="128" style="stroke:rgb(255,127,64);stroke-width:2"/>
for I in {1..99}
do
cat <<EOF > circleNums/$I.svg
<svg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg' version='1.1' >
<circle cx="64" cy="64" r="62" fill="rgb(0,100,0)" stroke="red" stroke-width="2"/>
<text text-anchor="middle" x="50%" y="50%" dy=".35em" font-family="sans-serif" font-size="90px" fill="white">$I</text>
</svg>
EOF
echo "<img src=\"$I.svg\" >" >> circleNums/index.html
done
ls circleNums
Result:

Resources