I finally finished J TECH Grade 3.  You should look at:

J TECH Grade 3 Summary.docx
J TECH Grade 3 Summary code.ijs

Lots and lots of boxes!

https://www.dropbox.com/sh/cdxkvp920xwzb9g/AAC4-hFHK6nhiuao5ZVswRFda?dl=0

Maybe this will be helpful.

Linda


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Tuesday, March 3, 2015 3:43 PM
To: [email protected]
Subject: Re: [Jprogramming] Transform boxed data to html representation

Here's what I use a lot.  Run the code in jhs. Cut and paste into word.
Select default as the way to paste in the code. Then select it all again and
change to Courier New as the font.

Oncd there you can cut and paste it into boxes. You can even include png's
in the document. 

Linda

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of 'Pascal
Jasmin' via Programming
Sent: Tuesday, March 3, 2015 2:14 PM
To: [email protected]
Subject: Re: [Jprogramming] Transform boxed data to html representation

What is basically the same approach but using smaller utilities

strbracketF =: 0&{::@:[ , ] , 1&{::@:[
strbracket =: (0&({)@:[ , ] , 1&({)@:[)

('<table>';'</table>') (strbracketF >) ('<tr>';'</tr>')strbracket"1
(<'<td>';'</td>') strbracketF each ": each <"0  i.3 4

makes a lot of extra whitespace in result, but layout is readable.  There is
a copy/paste reusability for including formatting attributes and other
tweaks


----- Original Message -----
From: Devon McCormick <[email protected]>
To: J-programming forum <[email protected]>
Cc: 
Sent: Tuesday, March 3, 2015 1:37 PM
Subject: Re: [Jprogramming] Transform boxed data to html representation

I like Raul's and Joe's approaches better than the one I proposed.  However
I might modify, say Joe's version, to add some formatting like this:

buildTable =: 3 : 0
   cols =. ,"2 ('<td>'&,@]@,&'</td>') every y
   rows =.  , TAB,"1 LF,~"1('<tr>'&,@]@,&'</tr>')"1 cols
   table =.  '<table>',LF,rows,'</table>'
)

So (this probably won't survive gmail formatting but you can try it
yourself):

    buildTable data
<table>
<tr><td>abc</td><td>ab</td> <td>xyz</td><td>abc</td></tr> <tr><td>ab</td>
<td>xyz</td><td>abc</td><td>ab</td> </tr>
<tr><td>xyz</td><td>abc</td><td>ab</td> <td>xyz</td></tr> </table>


On Tue, Mar 3, 2015 at 11:12 AM, Joe Bogner <[email protected]> wrote:

> How about something like this?
>
> NB. some data that is slightly offset
> data=. 3 4 $ ;: 'abc ab xyz'
>
> buildTable =: 3 : 0
> cols =. ('<td>'&,@]@,&'</td>') every y rows =.  ,
> ('<tr>'&,@]@,&'</tr>')"2 cols table =.  '<table>',rows,'</table>'
> )
>
> buildTable data
>
> On Tue, Mar 3, 2015 at 9:40 AM, Chernin, Nadav <[email protected]>
> wrote:
>
> > Hi,
> > I need in my project to represent boxed data in html report I try to 
> > find some code that can help me to do that Thanks
> >
> > Nadav Chernin
> > --------------------------------------------------------------------
> > -- For information about J forums see 
> > http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



--
Devon McCormick, CFA

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to