<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can I Post JSL Code in Community Discussions</title>
    <link>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28470#M33</link>
    <description>&lt;P&gt;Yes the JSL syntax highlighter seems to be on vacation at the moment.&lt;/P&gt;
&lt;P&gt;Normally it would appear between the insert code icon and the insert link icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2016 21:56:14 GMT</pubDate>
    <dc:creator>stan_koprowski</dc:creator>
    <dc:date>2016-10-25T21:56:14Z</dc:date>
    <item>
      <title>Can I Post JSL Code</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28459#M29</link>
      <description>&lt;PRE&gt;Get DOE Factor Names = Function({table},{Default Local},
	
	lstFactors = {};
	dt = Open(table);
	For (i=1,i&amp;lt;=NCols(dt),i++,
		col = Column(dt,i);
		colName = col &amp;lt;&amp;lt; Get Name;
		changes = col &amp;lt;&amp;lt; Get Property("Factor Changes");
		If (!IsEmpty(changes),
			InsertInto(lstFactors,colName)
		);
	);
	Close(dt,NoSave);
	Return(lstFactors);
	
);&lt;BR /&gt;&lt;BR /&gt;The "insert code" icon seems to do its job.  There is also a link to a "jsl syntax highlighter" but I hot lost with that one.&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Oct 2016 21:25:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28459#M29</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2016-10-25T21:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Post JSL Code</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28463#M30</link>
      <description>&lt;P&gt;Here's code posted the "usual" way (copy/paste to MS-Word, and then to here). &amp;nbsp;Loses all formatting:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// This is a comment&lt;/P&gt;
&lt;P&gt;a = &lt;STRONG&gt;123&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;for &lt;STRONG&gt;(&lt;/STRONG&gt;k = &lt;STRONG&gt;1&lt;/STRONG&gt;, k &amp;lt;= &lt;STRONG&gt;99&lt;/STRONG&gt;, k++,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = k^&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is code posted with the insert code button. Loses syntax colorization.&lt;/P&gt;
&lt;PRE&gt;// This is a comment
a = 123;
for (k = 1, k &amp;lt;= 99, k++,
	m = k^2;
);
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 21:37:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28463#M30</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2016-10-25T21:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Post JSL Code</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28465#M31</link>
      <description>&lt;P&gt;(using reply button)&lt;/P&gt;
&lt;P&gt;So I'm glad we don't have to resort to the usual method of cut &amp;amp; paste via MS-Word, but it would be nice if that still worked&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 21:41:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28465#M31</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2016-10-25T21:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Post JSL Code</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28466#M32</link>
      <description>(using the quick reply button)&lt;BR /&gt;&lt;BR /&gt;but maintaining the colour formatting would be really helpful.  Or put another way, having a discussion forum that is so heavily focused on the scripting language, needs to be code-friendly</description>
      <pubDate>Tue, 25 Oct 2016 21:43:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28466#M32</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2016-10-25T21:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Post JSL Code</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28470#M33</link>
      <description>&lt;P&gt;Yes the JSL syntax highlighter seems to be on vacation at the moment.&lt;/P&gt;
&lt;P&gt;Normally it would appear between the insert code icon and the insert link icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 21:56:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28470#M33</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2016-10-25T21:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Post JSL Code</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28495#M35</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/706"&gt;@stan_koprowski﻿&lt;/a&gt;&amp;nbsp;is right. The icon for the insert JSL Code button&amp;nbsp;is missing but the functionality still works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click the gap between the insert code and insert link buttons and you'll get a dialog where you can paste your JSL code. It will appear unformatted until you post it but then, just like Dorothy landing in Oz, everything will be in color.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/*
TIMING CHART CREATOR
jay holavarri 10-13-2016

Requires a table with the columns Component, Start, End.
*/
Names Default to Here(1);
dt=current datatable();
maxTime = ColMax(:End);
Summarize(dt, compList = By(:Component));

dt2 = New Table("Timing Chart");
New Column("Component_", Character);
colTime = New Column("Time (ms)");
New Column("Bit Status");

Current Data Table(dt);

catListAll = {};
timeIndexAll = [];
timeIndex0 = Index(0, maxTime, 10);
bitMatrix = [];

//Loop for ON time of each component
For(i=1, i&amp;lt;=N Rows(dt), i++, 
	timeIndex = Index(:Start[i],:End[i],10);
	timeRows = N Cols(timeIndex);
	catString = Repeat(:Component[i] || ",", timeRows);
	catList = Words(catString, ","); 
	
	InsertInto(catListAll, catList);
	timeIndexAll = Concat(timeIndexAll, timeIndex); 
	
	bitMatrix ||= J(1, timeRows, 1); 
	
);


//Loop for OFF time of each component. Note that it puts a 0 for every available time,
//and the 1's appear in the chart by using the Max function in Graph Builder
For(i=1, i&amp;lt;= N Items(compList), i++,
	timeRows0 = N Cols(timeIndex0);
	catString0 = Repeat(compList[i] || ",", timeRows0);
	catList0 = Words(catString0, ","); 
	
	InsertInto(catListAll, catList0);
	timeIndexAll = Concat(timeIndexAll, timeIndex0); 
	
	bitMatrix ||= J(1, timeRows0, 0);
);

//Write to the datatable
dt2:Component_ &amp;lt;&amp;lt; Set Values(catListAll);
colTime &amp;lt;&amp;lt; Set Values(timeIndexAll);
dt2:bitStatus &amp;lt;&amp;lt; Set Values(bitMatrix);


dt2 &amp;lt;&amp;lt; Graph Builder(
	Variables( X( :Name( "Time (ms)" ) ), Y( :Bit Status ), Group Y( :Component_ ) ),
	Elements( Line( X, Y, Legend( 25 ), Summary Statistic( "Max" ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Oct 2016 00:22:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Can-I-Post-JSL-Code/m-p/28495#M35</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2016-10-26T00:22:15Z</dc:date>
    </item>
  </channel>
</rss>

