How can I highlight syntax in Microsoft OneNote 2013? - vba

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.

Related

loop / Extract nodes from clob xml column in oracle pl sql

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

Convert SQL to FetchXML error?

Just a quick one trying to convert the below to Fetch XML, however have the error below.
Error: Error occurred when parsing the SQL script: Unsupported statement type: DECLARE
DECLARE
#OrganisationId uniqueidentifier
SELECT
cil.mm_topprioritystatus,
cil.mm_achievedcatalogproductName,
cil.mm_achievedcatalogproductstatus,
ci.mm_key
FROM
mm_catalogitemtorganisationlinker cil
INNER JOIN
mm_catalogitem ci on
ci.mm_catalogitemId = cil.mm_catalogitem
where
mm_organisation = #OrganisationId
and ci.mm_key in (
'LEVEL1',
'LEVEL2',
'LEVEL3',
'LEVEL4'
)
Please advise for the fetchXML version of above.
This is one possible solution:
<fetch>
<entity name='mm_catalogitemtorganisationlinker' >
<attribute name='mm_topprioritystatus' />
<attribute name='mm_achievedcatalogproductName' />
<attribute name='mm_achievedcatalogproductstatus' />
<filter>
<condition attribute='mm_organisation' operator='eq' value='{organizationid}' />
</filter>
<link-entity name='mm_catalogitem' from='mm_catalogitemid' to='mm_catalogitem' link-type='inner' alias='ci' >
<attribute name='mm_key' />
<filter>
<condition attribute='mm_key' operator='in' >
<value>LEVEL1</value>
<value>LEVEL2</value>
<value>LEVEL3</value>
<value>LEVEL4</value>
</condition>
</filter>
</link-entity>
</entity>
</fetch>
Of course you have to replace the {organizationid} placeholder by code.

Fetch data inside <mc:Choice Requires="wps"> (docx4j)

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
OlT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APAAAAAAAAAAAAAAAAAA0FAABkcnMvZG93bnJldi54bWxQSwUGAAAAAAQABADzAAAAGgYA
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.

DbUnit Assertion floating-point numbers

I'm testing my DAO layer using DbUnit. I'm prefilling database from XML dataset, doing some actions and then asserting against known result.
Assertion.assertEquals(expectedDataSet, actualDataSet);
Dataset contains column with floating point number. Then these columns are compared, I get:
junit.framework.ComparisonFailure: value (table=OrderLine_T, row=2, col=price) expected:<2.99[]> but was:<2.99[0000009536743]>.
The values are equal, but because floating-point numbers cannot be exactly represented in binary form, the assertion fails.
In JUnit we have assertEquals(double expected, double actual, double delta). How do we set some delta in DbUnit for floating-point number comparison ?
Initial dataset:
<dataset>
<Customer_T id="1" name="Anthony"/>
<Customer_T id="2" name="John"/>
<Order_T id="1" date="2012-06-07 14:30" customer_id="1" />
<Order_T id="2" date="2012-06-07 15:31" customer_id="2" />
<OrderLine_T id="1" order_id="1" product_id="1" price="2.99" quantity="5" />
<OrderLine_T id="2" order_id="2" product_id="2" price="3.49" quantity="10" />
</dataset>
Expected result:
<dataset>
<Customer_T id="1" name="Anthony"/>
<Customer_T id="2" name="John"/>
<Order_T id="1" date="2012-06-07 14:30" customer_id="1" />
<Order_T id="2" date="2012-06-07 15:31" customer_id="2" />
<OrderLine_T id="1" order_id="1" product_id="1" price="2.99" quantity="5" />
<OrderLine_T id="2" order_id="2" product_id="2" price="3.49" quantity="10" />
<!-- Below added -->
<Order_T id="3" date="1987-06-07 9:15:10" customer_id="2" />
<OrderLine_T id="3" order_id="3" product_id="1" price="2.99" quantity="2" />
<OrderLine_T id="4" order_id="3" product_id="5" price="3.55" quantity="8" />
</dataset>
Code:
/* Should save order correctly (including order lines) */
#Test
public void save() throws Exception {
/* Create new order */
Set<OrderLine> lines = new HashSet<OrderLine>();
lines.add(new OrderLine(1, (float)2.99, 2));
lines.add(new OrderLine(5, (float)3.55, 8));
Calendar cal = Calendar.getInstance();
cal.set(1987, 6, 7, 9, 15, 10);
Date date = cal.getTime();
Customer customer = customerDAO.findById(2); // John
Order order = new Order(date, lines, customer);
orderDAO.save(order);
entityManager.flush();
/* Assert order is saved */
IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream("data-set-afterAddOrder.xml"));
IDataSet actualDataSet = getDatabaseConnection().createDataSet();
Assertion.assertEquals(expectedDataSet, actualDataSet);
}
Edit:
Probably need to mention what I'm using in-memory HSQLDB. Just tried MySQL and it passes successfully.
Tried setting ToleratedDelta without success:
IDatabaseConnection connection = new DatabaseConnection(((SessionImpl) (entityManager.getDelegate())).connection());
HsqldbDataTypeFactory dataTypeFactory = new HsqldbDataTypeFactory();
dataTypeFactory.addToleratedDelta(new ToleratedDelta("OrderLine_T", "price", 0.01));
connection.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, dataTypeFactory);
Edit2:
I was using hibernate.hbm2ddl.auto = create, to export schema to database. After got idea from fredt, I changed the type of field price on my entity to BigDecimal and added additional column precision and scale params:
#Column(precision=10, scale=4)
private BigDecimal price;
This gets translated to PRICE NUMERIC(10,4). Problem solved, thanks to fredt.
If the column is defined as DECIMAL or NUMERIC with the required precision and scale, the value will have the exace number of digits after the decimal point and the issue can be avoided.

2 series on my chart

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