This is a typical structure of a <w:r> which contains shape(s).
<w:r w:rsidR="00D10BFA">
<w:rPr>
<w:noProof/>
<w:lang w:eastAsia="en-PH" />
</w:rPr>
<mc:AlternateContent>
<mc:Choice Requires="wps">
<w:drawing>
<wp:anchor distT="0" distB="0" distL="114300" distR="114300" simplePos="0" relativeHeight="251660288" behindDoc="0" locked="0" layoutInCell="1" allowOverlap="1">
<wp:simplePos x="0" y="0" />
<wp:positionH relativeFrom="column">
<wp:posOffset>2171700</wp:posOffset>
</wp:positionH>
<wp:positionV relativeFrom="paragraph">
<wp:posOffset>99203</wp:posOffset>
</wp:positionV>
<wp:extent cx="1943100" cy="1714500" />
<wp:effectExtent l="19050" t="19050" r="19050" b="19050" />
<wp:wrapNone/>
<wp:docPr id="2" name="Oval 2" />
<wp:cNvGraphicFramePr/>
<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">
<wps:wsp>
<wps:cNvSpPr/>
<wps:spPr>
<a:xfrm>
<a:off x="0" y="0" />
<a:ext cx="1943100" cy="1714500" />
</a:xfrm>
<a:prstGeom prst="ellipse">
<a:avLst/>
</a:prstGeom>
<a:solidFill>
<a:schemeClr val="accent4">
<a:lumMod val="75000" />
</a:schemeClr>
</a:solidFill>
<a:ln w="28575" cap="sq">
<a:solidFill>
<a:schemeClr val="accent6">
<a:lumMod val="75000" />
</a:schemeClr>
</a:solidFill>
</a:ln>
</wps:spPr>
<wps:style>
<a:lnRef idx="2">
<a:schemeClr val="accent1">
<a:shade val="50000" />
</a:schemeClr>
</a:lnRef>
<a:fillRef idx="1">
<a:schemeClr val="accent1" />
</a:fillRef>
<a:effectRef idx="0">
<a:schemeClr val="accent1" />
</a:effectRef>
<a:fontRef idx="minor">
<a:schemeClr val="lt1" />
</a:fontRef>
</wps:style>
<wps:txbx>
<w:txbxContent>
<w:p w:rsidR="00D10BFA" w:rsidRDefault="00D10BFA" w:rsidP="00D10BFA">
<w:pPr>
<w:jc w:val="center" />
</w:pPr>
<w:r>
<w:t>THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG.THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG.THEQUICKBROWFA</w:t>
</w:r>
</w:p>
</w:txbxContent>
</wps:txbx>
<wps:bodyPr rot="0" spcFirstLastPara="0" vertOverflow="overflow" horzOverflow="overflow" vert="horz" wrap="square" lIns="91440" tIns="45720" rIns="91440" bIns="45720" numCol="1" spcCol="0" rtlCol="0" fromWordArt="0" anchor="ctr" anchorCtr="0" forceAA="0" compatLnSpc="1">
<a:prstTxWarp prst="textNoShape">
<a:avLst/>
</a:prstTxWarp>
<a:noAutofit/>
</wps:bodyPr>
</wps:wsp>
</a:graphicData>
</a:graphic>
</wp:anchor>
</w:drawing>
</mc:Choice>
<mc:Fallback>
<w:pict>
<v:oval id="Oval 2" o:spid="_x0000_s1028" style="position:absolute;margin-left:171pt;margin-top:7.8pt;width:153pt;height:135pt;z-index:251660288;visibility:visible;mso-wrap-style:square;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;v-text-anchor:middle" o:gfxdata="UEsDBBQABgAIAAAAIQC2gziS/gAAAOEBAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbJSRQU7DMBBF
90jcwfIWJU67QAgl6YK0S0CoHGBkTxKLZGx5TGhvj5O2G0SRWNoz/78nu9wcxkFMGNg6quQqL6RA
0s5Y6ir5vt9lD1JwBDIwOMJKHpHlpr69KfdHjyxSmriSfYz+USnWPY7AufNIadK6MEJMx9ApD/oD
OlTrorhX2lFEilmcO2RdNtjC5xDF9pCuTyYBB5bi6bQ4syoJ3g9WQ0ymaiLzg5KdCXlKLjvcW893
SUOqXwnz5DrgnHtJTxOsQfEKIT7DmDSUCaxw7Rqn8787ZsmRM9e2VmPeBN4uqYvTtW7jvijg9N/y
JsXecLq0q+WD6m8AAAD//wMAUEsDBBQABgAIAAAAIQA4/SH/1gAAAJQBAAALAAAAX3JlbHMvLnJl
bHOkkMFqwzAMhu+DvYPRfXGawxijTi+j0GvpHsDYimMaW0Yy2fr2M4PBMnrbUb/Q94l/f/hMi1qR
JVI2sOt6UJgd+ZiDgffL8ekFlFSbvV0oo4EbChzGx4f9GRdb25HMsYhqlCwG5lrLq9biZkxWOiqY
22YiTra2kYMu1l1tQD30/bPm3wwYN0x18gb45AdQl1tp5j/sFB2T0FQ7R0nTNEV3j6o9feQzro1i
OWA14Fm+Q8a1a8+Bvu/d/dMb2JY5uiPbhG/ktn4cqGU/er3pcvwCAAD//wMAUEsDBBQABgAIAAAA
IQB6iRROswIAACAGAAAOAAAAZHJzL2Uyb0RvYy54bWysVMFu2zAMvQ/YPwi6r46zpGmDOkXQosOA
bi3WDj0rslQLkERNUuJkXz9Kdtx0DXYodrFFkXwkn0heXG6NJhvhgwJb0fJkRImwHGplnyv68/Hm
0xklITJbMw1WVHQnAr1cfPxw0bq5GEMDuhaeIIgN89ZVtInRzYsi8EYYFk7ACYtKCd6wiKJ/LmrP
WkQ3uhiPRqdFC752HrgIAW+vOyVdZHwpBY93UgYRia4o5hbz1+fvKn2LxQWbP3vmGsX7NNg7sjBM
WQw6QF2zyMjaqzdQRnEPAWQ84WAKkFJxkWvAasrRX9U8NMyJXAuSE9xAU/h/sPz75t4TVVd0TIll
Bp/obsM0GSdmWhfmaPDg7n0vBTymMrfSm/THAsg2s7kb2BTbSDhelueTz+UISeeoK2flZIoC4hQv
7s6H+EWAIelQUaG1ciFVzOZscxtiZ723StcBtKpvlNZZSF0irrQnmHJFGefCxkl212vzDerufoaB
95FzYyWXnMcrNG1JizScTWdTzJlhM4ZfGeuV1QBwGPP0fTGRCW0xkcRzx2w+xZ0WqTxtfwiJb4Nc
jrtEjtVbdqqG1aJLKVV7vNwMmJAlEjhg9wDHsbsX6O2Tq8hDNTiP/pVY5zx45Mhg4+BslAV/DEDH
su8U2dnvSeqoSSzF7Wrb9y2GSTcrqHfYyx66IQ+O3yhsq1sW4j3zONXYirip4h1+pAZ8a+hPlDTg
fx+7T/Y4bKilpMUtkXpizbygRH+1OIbn5WSS1koWJtPZGAV/qFkdauzaXAE2aok70fF8TPZR74/S
g3nChbZMUVHFLMfYFeXR74Wr2G0vXIlcLJfZDFeJY/HWPjiewBPPaWYet0/Mu362Io7ld9hvlDfz
1dkmTwvLdQSp8vC98Nq/AK6hPDn9ykx77lDOVi+LffEHAAD//wMAUEsDBBQABgAIAAAAIQAw7yw6
4AAAAAoBAAAPAAAAZHJzL2Rvd25yZXYueG1sTI/NTsMwEITvSLyDtUjcqENoozTEqfgVIIQEAYmr
Ey9JIF5HttuGt2c5wXFnRrPflJvZjmKHPgyOFJwuEhBIrTMDdQreXm9PchAhajJ6dIQKvjHApjo8
KHVh3J5ecFfHTnAJhUIr6GOcCilD26PVYeEmJPY+nLc68uk7abzec7kdZZokmbR6IP7Q6wmvemy/
6q1VcHftby7zZr1a378/fD4mz/XT3AxKHR/NF+cgIs7xLwy/+IwOFTM1bksmiFHB2TLlLZGNVQaC
A9kyZ6FRkOasyKqU/ydUPwAAAP//AwBQSwECLQAUAAYACAAAACEAtoM4kv4AAADhAQAAEwAAAAAA
AAAAAAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQA4/SH/1gAAAJQB
AAALAAAAAAAAAAAAAAAAAC8BAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQB6iRROswIAACAG
AAAOAAAAAAAAAAAAAAAAAC4CAABkcnMvZTJvRG9jLnhtbFBLAQItABQABgAIAAAAIQAw7yw64AAA
AAoBAAAPAAAAAAAAAAAAAAAAAA0FAABkcnMvZG93bnJldi54bWxQSwUGAAAAAAQABADzAAAAGgYA
AAAA
" fillcolor="#bf8f00 [2407]" strokecolor="#538135 [2409]" strokeweight="2.25pt">
<v:stroke joinstyle="miter" endcap="square" />
<v:textbox>
<w:txbxContent>
<w:p w:rsidR="00D10BFA" w:rsidRDefault="00D10BFA" w:rsidP="00D10BFA">
<w:pPr>
<w:jc w:val="center" />
</w:pPr>
<w:r>
<w:t>THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG.THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG.THEQUICKBROWFA</w:t>
</w:r>
</w:p>
</w:txbxContent>
</v:textbox>
</v:oval>
</w:pict>
</mc:Fallback>
</mc:AlternateContent>
It contains rPr and mc:AlternateContent. My problem here is that when I try to do r.getContent(), you would expect to have two elements rPr and mc:AlternateContent. But in actual result, you would only have pict, since the behavior goes like: r.getContent() only fetches elements inside the <mc:Fallback> tag.
What I want to have is, I want to retrieve <a:graphic> which is definitely inside <mc:Choice>.<w:drawing>.<wp:anchor>.
In general, the presence of an mc element causes an UnmarshalException, since it is invalid content according to the schemas used in docx4j.
When that happens, docx4j pre-processes the content through org/docx4j/jaxb/mc-preprocessor.xslt which usually selects the mc:Fallback content.
You have various options to override this behaviour:
easy: you can supply your own xslt, which does something different; see the property "docx4j.jaxb.JaxbValidationEventHandler" to point to its location
more complex and completely unsupported: alter the XSDs to allow mc namespace content in the element of interest, then regenerate the relevant classes using xsd
modify a jaxb implementation itself, to cope with how the markup compatibility mechanism works. This would be very cool!
For more, Google 'office openxml markup compatibility and extensibility' or try this TC45 final draft.
Related
I have this xml content stored in a clob column of a table, I have to loop through the "molecule" nodes under the "reactantList" node,and store each "molecule" node into another table containing a list of molecules,
Any help please?
I tried with xmltype, xmlsequence, xmltable etc but did not work, I also have to specify the namespace "xmlns=.." somewhere as an argument to xmltype I think, to be able to make it work...
<cml xmlns="http://www.chemaxon.com" version="ChemAxon file format v20.20.0, generated by vunknown" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com http://www.chemaxon.com/marvin/schema/mrvSchema_20_20_0.xsd">
<MDocument>
<MChemicalStruct>
<reaction>
<arrow type="DEFAULT" x1="-8.022119140625" y1="0.8333333333333334" x2="-3.5637858072916657" y2="0.8333333333333334" />
<reactantList>
<molecule molID="m1">
<atomArray>
<atom id="a1" elementType="C" x2="-13.938333333333334" y2="0.7083333333333333" />
<atom id="a2" elementType="O" x2="-15.478333333333333" y2="0.7083333333333333" lonePair="2" />
</atomArray>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1" />
</bondArray>
</molecule>
<molecule molID="m2">
<atomArray>
<atom id="a1" elementType="O" x2="-9.897119140624998" y2="0.8333333333333333" mrvValence="0" lonePair="3" />
</atomArray>
<bondArray />
</molecule>
</reactantList>
<agentList />
<productList />
</reaction>
</MChemicalStruct>
<MReactionSign toption="NOROT" fontScale="14.0" halign="CENTER" valign="CENTER" autoSize="true" id="o1">
<Field name="text">
<![CDATA[{D font=SansSerif,size=18,bold}+]]>
</Field>
<MPoint x="-11.730452473958332" y="0.6666666666666666" />
<MPoint x="-11.217119140624998" y="0.6666666666666666" />
<MPoint x="-11.217119140624998" y="1.18" />
<MPoint x="-11.730452473958332" y="1.18" />
</MReactionSign>
</MDocument>
</cml>
You can use:
INSERT INTO molecules (molecule)
SELECT x.molecule
FROM table_name t
CROSS APPLY XMLTABLE(
XMLNAMESPACES(
'http://www.w3.org/2001/XMLSchema-instance' AS "xsi",
DEFAULT 'http://www.chemaxon.com'
),
'/cml/MDocument/MChemicalStruct/reaction/reactantList/molecule'
PASSING XMLTYPE(t.xml)
COLUMNS
molecule XMLTYPE PATH '.'
) x
db<>fiddle here
How can I set the vehicle to drive at a constant speed? I find the speed of vehicle increases firstly and then drive at speed between 14.5 and 14.7 m/s in sumo. But I want the car drive at a constant speed in sumo. What shuould I do?
helloWorld.net.xml
<net version="1.3" junctionCornerDetail="5" limitTurnSpeed="5.50" >
<location netOffset="0.00,0.00" convBoundary="-300.00,0.00,300.00,0.00" origBoundary="10000000000.00,10000000000.00,-10000000000.00,-10000000000.00" projParameter="!"/>
<edge id=":1_0" function="internal">
<lane id=":1_0_0" index="0" speed="13.89" length="0.10" shape="0.00,-1.60 0.00,-1.60"/>
</edge>
<edge id="gneE0" from="0" to="1" priority="-1">
<lane id="gneE0_0" index="0" speed="13.89" length="300.00" shape="-300.00,-1.60 0.00,-1.60"/>
</edge>
<edge id="gneE1" from="1" to="3" priority="-1">
<lane id="gneE1_0" index="0" speed="13.89" length="300.00" shape="0.00,-1.60 300.00,-1.60"/>
</edge>
<junction id="0" type="dead_end" x="-300.00" y="0.00" incLanes="" intLanes="" shape="-300.00,0.00 -300.00,-3.20"/>
<junction id="1" type="priority" x="0.00" y="0.00" incLanes="gneE0_0" intLanes=":1_0_0" shape="0.00,0.00 0.00,-3.20 0.00,0.00">
<request index="0" response="0" foes="0" cont="0"/>
</junction>
<junction id="3" type="dead_end" x="300.00" y="0.00" incLanes="gneE1_0" intLanes="" shape="300.00,-3.20 300.00,0.00"/>
<connection from="gneE0" to="gneE1" fromLane="0" toLane="0" via=":1_0_0" dir="s" state="M"/>
<connection from=":1_0" to="gneE1" fromLane="0" toLane="0" dir="s" state="M"/>
</net>
hello.rou.xml
<routes >
<route edges="gneE0 gneE1" color="yellow" id="route_0"/>
<vehicle id="vehicle_0" depart="0.00" color="red" route="route_0"/>
</routes>
You need to disable random dawdling by setting sigma to 0 and start with the maximum speed. To do so you need to define a vehicle type:
<routes>
<vType sigma="0" id="t1"/>
<route edges="gneE0 gneE1" color="yellow" id="route_0"/>
<vehicle id="vehicle_0" depart="0.00" color="red" route="route_0" departSpeed="max" type="t1"/>
</routes>
I have this XML:
<?xml version="1.0" encoding="UTF-8" ?>
<cfdi:Comprobante xmlns:cfdi="http://www.sat.gob.mx/cfd/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="3.3" Serie="NG" Folio="55" Fecha="2017-08-02T20:08:58" FormaPago="99" SubTotal="5861.73" Descuento="778.38" Moneda="MXN" Total="5083.35" TipoDeComprobante="N" MetodoPago="PUE" LugarExpedicion="08400" Sello="yAfYBR0/bvvFgq/hNL+DSTTPt+kNtsE3DzxagXvG0M/alfaUrjp73IySCEBHIeo4nNF4uoscqnRoIowwfQPnNwC4LL6iD77rfykF2hq+i6VzqAlvbx0aawZUAcJpjNVWyS3zjfa3rYeU1TpNBrhSuU8r+4BoBz3jr1pB7yyCIm4JbwzNqy0TvTjD1XXnpy6v74+eqIoZqWZoi3CyiCqMS2B3FEfDMiXTfVlZ/3/evLYc5WvFPpBsm61I+SBID/rHhJvLQLjJDUX7Myt177N41xptITkIKQCJAIV6XN7mRGJTHKA3h3F7tSZaei8+LeONO9ZtlUZGw4dzLhrpNk/tuA==" xsi:schemaLocation="http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv33.xsd">
<cfdi:Emisor Rfc="BBBBBB" Nombre="S.A. de C.V." RegimenFiscal="601" />
<cfdi:Receptor Rfc="AAAAAAAA" Nombre="AZUCENA SAN " UsoCFDI="P01" />
<cfdi:Conceptos>
<cfdi:Concepto ClaveProdServ="84111505" Cantidad="1" ClaveUnidad="ACT" Descripcion="Pago de nómina" ValorUnitario="5861.73" Importe="5861.73" Descuento="778.38" />
</cfdi:Conceptos>
<cfdi:Complemento>
<nomina12:Nomina xmlns:nomina12="http://www.sat.gob.mx/nomina12" Version="1.2" TipoNomina="O" FechaPago="2017-07-16" FechaInicialPago="2017-07-01" FechaFinalPago="2017-08-15" NumDiasPagados="15.000" TotalPercepciones="5861.73" TotalDeducciones="778.38" xsi:schemaLocation="http://www.sat.gob.mx/nomina12 http://www.sat.gob.mx/sitio_internet/cfd/nomina/nomina12.xsd">
<nomina12:Emisor RegistroPatronal="Y6844621109" />
<nomina12:Receptor Curp="SASA850203MDFNNZ06" NumSeguridadSocial="39058519115" FechaInicioRelLaboral="2012-09-14" Antigüedad="P254W" TipoContrato="01" Sindicalizado="No" TipoJornada="03" TipoRegimen="02" NumEmpleado="073" Departamento="VENTAS" Puesto="GERENTE TIENDAS" RiesgoPuesto="1" PeriodicidadPago="04" SalarioBaseCotApor="183.33" SalarioDiarioIntegrado="356.57" ClaveEntFed="DIF" />
<nomina12:Percepciones TotalSueldos="5861.73" TotalGravado="5089.21" TotalExento="772.52">
<nomina12:Percepcion TipoPercepcion="001" Clave="0001" Concepto="Sueldos" ImporteGravado="1026.69" ImporteExento="0.00" />
<nomina12:Percepcion TipoPercepcion="020" Clave="0008" Concepto="Prima dominical" ImporteGravado="0" ImporteExento="78.36" />
<nomina12:Percepcion TipoPercepcion="001" Clave="0020" Concepto="Vacaciones" ImporteGravado="1466.69" ImporteExento="0" />
<nomina12:Percepcion TipoPercepcion="021" Clave="0009" Concepto="Prima Vacacional" ImporteGravado="0" ImporteExento="458.33" />
<nomina12:Percepcion TipoPercepcion="038" Clave="0022" Concepto="Bonos" ImporteGravado="1000" ImporteExento="0" />
<nomina12:Percepcion TipoPercepcion="028" Clave="0010" Concepto="Comisiones" ImporteGravado="1360" ImporteExento="0" />
<nomina12:Percepcion TipoPercepcion="019" Clave="0007" Concepto="Horas extras" ImporteGravado="235.83" ImporteExento="235.83">
<nomina12:HorasExtra Dias="2" TipoHoras="01" HorasExtra="2" ImportePagado="235.83" />
<nomina12:HorasExtra Dias="1" TipoHoras="02" HorasExtra="1" ImportePagado="235.83" />
</nomina12:Percepcion>
</nomina12:Percepciones>
<nomina12:Deducciones TotalOtrasDeducciones="122.73" TotalImpuestosRetenidos="655.65">
<nomina12:Deduccion TipoDeduccion="002" Clave="0013" Concepto="ISR" Importe="655.65" />
<nomina12:Deduccion TipoDeduccion="001" Clave="0012" Concepto="IMSS" Importe="122.73" />
</nomina12:Deducciones>
</nomina12:Nomina>
<tfd:TimbreFiscalDigital xmlns:tfd="http://www.sat.gob.mx/TimbreFiscalDigital" xsi:schemaLocation="http://www.sat.gob.mx/TimbreFiscalDigital http://www.sat.gob.mx/sitio_internet/cfd/timbrefiscaldigital/TimbreFiscalDigitalv11.xsd" Version="1.1" UUID="2A73927D-7E57-40C7-9A8B-2E062560AC9E" FechaTimbrado="2017-08-02T19:52:07" SelloCFD="yAfYBR0/bvvFgq/hNL+DSTTPt+kNtsE3DzxagXvG0M/alfaUrjp73IySCEBHIeo4nNF4uoscqnRoIowwfQPnNwC4LL6iD77rfykF2hq+i6VzqAlvbx0aawZUAcJpjNVWyS3zjfa3rYeU1TpNBrhSuU8r+4BoBz3jr1pB7yyCIm4JbwzNqy0TvTjD1XXnpy6v74+eqIoZqWZoi3CyiCqMS2B3FEfDMiXTfVlZ/3/evLYc5WvFPpBsm61I+SBID/rHhJvLQLjJDUX7Myt177N41xptITkIKQCJAIV6XN7mRGJTHKA3h3F7tSZaei8+LeONO9ZtlUZGw4dzLhrpNk/tuA==" NoCertificadoSAT="20001000000300022323" SelloSAT="FXfgRBNhWla+53sM4eGnMFbbmQFb6EIaWMt3GMaqXJn9XPxQ5DVNuz7oTJ+yUZV0ObM5myqzzsI4Zvx3g==" RfcProvCertif="EME000602QR9" />
</cfdi:Complemento>
</cfdi:Comprobante>
And I need to get the values of some attributes, I can get attributes from the node cfdi:Comprobante, but when I try to read an attribute from tfd:TimbreFiscalDigital I get object reference not set to an instance of an object.
Here is the code I'm using:
Dim doc As XmlDocument = New XmlDocument()
doc.Load("C:\Users\s_osr\Desktop\EjemplosCFDINomina12\HorasExtras\SIGN_XML_COMPROBANTE_3_0.xml")
Dim managerdoc As XmlNamespaceManager = New XmlNamespaceManager(doc.NameTable)
managerdoc.AddNamespace("cfdi", doc.DocumentElement.NamespaceURI)
managerdoc.AddNamespace("tfd", doc.DocumentElement.NamespaceURI)
Dim Sello As String = doc.SelectSingleNode("/cfdi:Comprobante/#Sello", managerdoc).InnerText
Dim SelloSat As String = doc.SelectSingleNode("/cfdi:Comprobante/cfdi:Complemento/tfd:TimbreFiscalDigital/#SelloSAT", managerdoc).InnerText
Sello is working, but I can´t get SelloSAT.
UPDATE:
Thanks to #Kaiido for the solution, the uri string for the second namespace:
managerdoc.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
I want to highlight syntax for my programming language of choice (proprietary) in Microsoft OneNote 2013 with a macro or script. I found a free Macro creator for MS OneNote '13 that allows creation of custom macros called "OneTastic". I created a macro that is given two arrays with lists of predefined words associated with different colors to give each list (ex: List 1 words = blue, list 2 words = orange, etc.)
API: https://www.omeratay.com/onetastic/docs/
Problem: The search logic is finding words inside of bigger words, like "IN" inside of the word "domain" (domaIN). My code is below:
<?xml version="1.0" encoding="utf-16"?>
<Macro name="CCL TEST 3" category="Color" description="" version="10">
<ModifyVar name="KEYWORDS1" op="set">
<Function name="String_Split">
<Param name="string" value="drop create program go %i declare call set end END execute else elseif protect constant curqual of subroutine to noconstant record free range in is protect define macro endmacro" />
<Param name="delimiter" value=" " />
</Function>
</ModifyVar>
<ModifyVar name="counter" op="set" value="0" />
<WhileVar name="counter" op="lt">
<Function name="Array_Length">
<Param name="array" var="KEYWORDS1" />
</Function>
<IsRootOp />
<ModifyVar name="keyword" op="set" var="KEYWORDS1">
<RightIndex var="counter" />
</ModifyVar>
<For each="Text">
<That hasProp="value" op="eq" var="keyword" />
<ModifyProp name="fontColor" op="set" value="blue" />
</For>
<ModifyVar name="counter" op="add" value="1" />
</WhileVar>
<ModifyVar name="KEYWORDS2" op="set">
<Function name="String_Split">
<Param name="string" value="datetimefind datetimediff cnvtdatetime cnvtalias format build concat findfile error alterlist alter initrec cnvtdate esmError echo max min avg sum count uar_get_code_meaning mod substring size trim hour day isnumeric expand locateval cnvtstring fillstring btestfindstring logical uar_get_code_display uar_get_meaning_by_codeset UAR_GET_CODE_BY sqltype cnvtreal echorecord cnvtupper cnvtlower cnvtdatetimeutc abs datetimediff year julian btest decode evaluate findstring asis replace validate nullterm parser value uar_timer_create uar_CreatePropList uar_SetPropString uar_CloseHandle uar_Timer_Destroy uar_Timer_Stop build2 patstring piece cnvtalphanum timestampdiff" />
<Param name="delimiter" value=" " />
</Function>
</ModifyVar>
<ModifyVar name="counter2" op="set" value="0" />
<WhileVar name="counter2" op="lt">
<Function name="Array_Length">
<Param name="array" var="KEYWORDS2" />
</Function>
<IsRootOp />
<ModifyVar name="keyword" op="set" var="KEYWORDS2">
<RightIndex var="counter2" />
</ModifyVar>
<For each="Text">
<That hasProp="value" op="eq" var="keyword" />
<ModifyProp name="fontColor" op="set" value="orange" />
</For>
<ModifyVar name="counter2" op="add" value="1" />
</WhileVar>
</Macro>
There is no such inbuilt feature available in OneNote but you can do it.
Use Visual Studio Code, it's free. Turn on right text copy/pasting. Write your code in in VS code. Copy it. It'll paste exactly as you see. Colors and all.
While this does not use VBA, I use and love the add-in NoteHightlight2016
If you don't find a language you can go through and add your own. I've added the Excel Formula keywords to the languages supported and I believe it is a bit easier than creating in OneTastic, which I also use and love.
I would like to show 2 series on the same chart, however I'm not sure how to update the following code:
<%# Control Language="C#" AutoEventWireup="true" CodeBehind="UcSalesSeries.ascx.cs" Inherits="Silverlight.ConfigEnhanced.Web.UcSalesSeries" %>
<asp:Chart ID="Chart1" runat="server" DataSourceID="LinqDataSource1"
Height="500px" Width="750px" >
<Series>
<asp:Series ChartType="Line" Name="Series1" XValueMember="EndOfMonth"
YValueMembers="Quantity" >
</asp:Series>
</Series>
<Series>
<asp:Series ChartType="Line" Name="Series2" XValueMember="EndOfMonth"
YValueMembers="Quantity" >
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas> <Legends>
<asp:Legend TableStyle="Auto" Docking="Top" >
</asp:Legend>
</Legends>
</asp:Chart>
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="Data.DataClasses1DataContext" EntityTypeName="" Select="new (EndOfMonth, Quantity)"
TableName="T_SalesDatas" OrderBy="EndOfMonth" Where="Model == #Model">
<WhereParameters>
<asp:Parameter DefaultValue="XXS" Name="Model" Type="String" />
</WhereParameters>
</asp:LinqDataSource>
the second serie I would like to see is the same as above, but I would be changing the parameter
<asp:Parameter DefaultValue="NEWVALUE" Name="Model" Type="String" />
The Chart does not support multiple DataSources so you will need to manually add the points from code behind to the chart when rendering the page. You create two tables from your data with the different parameters and iterate each table and adding them to the chart manually.
Read more in the section 'Manual' series population on this MSDN blog:
http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx