<commit_before>
class ListItem extends KDListItemView

  partial : ->

    {randomIndex, id} = @getData()
    "#{id} numarali itemim ulan indexim de #{randomIndex or 'yok'}!!"


mainView = new KDView
KDView.appendToDOMBody mainView

listController = new KDListViewController
  boxed : yes
  itemClass : ListItem


id = 0
mainView.addSubView new KDButtonView
  title    : 'Random indexli eleman ekle'
  callback : ->
    if listController.itemsOrdered.length > 3
      randomIndex = KD.utils.getRandomNumber listController.itemsOrdered.length
    listController.addItem {title : Date.now(), id : ++id, randomIndex}, randomIndex

mainView.addSubView listController.getView()

# And append it to DOM
<commit_msg>ListView: more playground<commit_after>
class ListItem extends KDListItemView

  partial : ->

    {randomIndex, id} = @getData()
    "#{id} numarali itemim ulan indexim de #{randomIndex or 'yok'}!!<br><br>"


mainView = new KDView
KDView.appendToDOMBody mainView

listController = new KDListViewController
  boxed : yes
  itemClass : ListItem


id = 0
mainView.addSubView new KDButtonView
  title    : 'Random indexli eleman ekle'
  callback : ->
    if listController.itemsOrdered.length > 3
      randomIndex = KD.utils.getRandomNumber listController.itemsOrdered.length
    listController.addItem {title : Date.now(), id : ++id, randomIndex}, randomIndex
    log listController.itemsOrdered.map (item) -> item.data.id


mainView.addSubView listController.getView()

# And append it to DOM

{'fraction_non_alphanumeric': 0.09387483355525965, 'fraction_numerical': 0.002663115845539281, 'mean_word_length': 4.21875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '2721745', 'n_tokens_mistral': 487, 'n_tokens_neox': 461, 'n_words': 128}