<commit_before>﻿:Class TableSimple : MiPageSample
⍝ Control::     _DC.Table
⍝ Description:: Display tabular data with a bit of styling

    :Include #.HTMLUtils ⍝ For ScriptFollows

    ∇ Compose;lmt;i10;data;myTable
      :Access public 
     
      Add _.style ScriptFollows
      ⍝ .myStyle table {
      ⍝     border-collapse: collapse;
      ⍝ }
      ⍝ .myStyle table, th, td {
      ⍝     border: 1px solid black;
      ⍝ }
      ⍝ .myStyle th, td {
      ⍝     width: 30px;
      ⍝     text-align: right;
      ⍝     padding: 2px;
      ⍝ }
      ⍝ .myStyle tr td: first-of-type {
      ⍝     font-weight: bold;
      ⍝ }
     
      Add _.h2'The Little Multiplication Table'
     
      lmt←∘.×⍨i10←⍳10
      data←(' ',i10)⍪i10,lmt
      myTable←'myTable .myStyle'Add _.Table data
      myTable.HeaderRows←1
    ∇

:EndClass

<commit_msg>Hmm... though I'd already done this...<commit_after>﻿:Class TableSimple : MiPageSample
⍝ Control::     _DC.Table
⍝ Description:: Display tabular data with a bit of styling

    :Include #.HTMLUtils ⍝ For ScriptFollows

    ∇ Compose;lmt;i10;data;myTable;aTable
      :Access public 
     
      Add _.h2'The Little Multiplication Table'
     
      lmt←∘.×⍨i10←⍳10           ⍝ Compute the table
      data←(' ',i10)⍪i10,lmt    ⍝ Add row and column headings
      myTable←'myTable .myStyle'Add _.Table data ⍝ Give it class .myStyle
      myTable.HeaderRows←1      ⍝ Declare first row to be headers (<th> elements)
     
      Add _.h2'... With Default Formatting'
      (aTable←Add _.Table data).HeaderRows←1 ⍝ Add another table with the same data
     
      ⍝ And now describe how to style the .myStyle class
     
      Add _.style ScriptFollows
      ⍝ .myStyle table,
      ⍝ .myStyle th,
      ⍝ .myStyle td {
      ⍝     border: 1px solid black;
      ⍝     border-collapse: collapse;
      ⍝ }
      ⍝ .myStyle td,
      ⍝ .myStyle th {
      ⍝     width: 30px;
      ⍝     text-align: right;
      ⍝     padding: 2px;
      ⍝     background-color: orange;
      ⍝ }
      ⍝ #myTable th,
      ⍝ #myTable td:first-of-type {
      ⍝     font-weight: bold;
      ⍝     background-color: brown;
      ⍝ }
     
    ∇

:EndClass


{'fraction_non_alphanumeric': 0.11009174311926606, 'fraction_numerical': 0.015596330275229359, 'mean_word_length': 1.8547120418848169, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7038663', 'n_tokens_mistral': 849, 'n_tokens_neox': 819, 'n_words': 232}