<commit_before>// Open the database and create schema (if needed)
var db = Ti.Database.open('todo.sqlite');

db.execute('CREATE TABLE IF NOT EXISTS TODO_ITEMS (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, IS_COMPLETE INTEGER)');

// User interface (UI) construction
var win = Ti.UI.createWindow({
	backgroundColor: '#ffffff',
	title: 'To Do List'
});

var headerView = Ti.UI.createView({
	height: '50dp',
	width: '100%',
	backgroundColor: '#885511',
	layout: 'horizontal',
	top: 0
});

var txtTaskName = Ti.UI.createTextField({
	left: 15,
	width: '75%',
	height: Ti.UI.FILL,
	hintText: 'Enter New Task Name',
	borderColor: '#000000',
	backgroundColor: '#ffffff'
});
headerView.add(txtTaskName);

var btnAdd = Ti.UI.createButton({
	backgroundImage: 'add_button.png',
	left: 15,
	height: '45dp',
	width: '45dp'
});

btnAdd.addEventListener('click', function(e) {
	addTask(txtTaskName.value);
});

txtTaskName.addEventListener('return', function() {
	btnAdd.fireEvent('click');  
});

headerView.add(btnAdd);
win.add(headerView);

var taskView = Ti.UI.createView({
	top: '50dp',
	width: '100%',
	backgroundColor: '#eeeeee'
});

var taskList = Ti.UI.createTableView({
	width: Ti.UI.FILL,
	height: Ti.UI.FILL,
	separatorColor: '#bb8888',
	backgroundFocusedColor: '#eedddd'
});

taskList.addEventListener('click', function(e) {
	var todoItem = e.rowData;

	db.execute('UPDATE TODO_ITEMS SET IS_COMPLETE = ? WHERE ID = ?', 
				(todoItem.hasCheck ? 0 : 1), todoItem.id);
	refreshTaskList();
});

taskView.add(taskList);
win.add(taskView);<commit_msg>Removed unused property<commit_after>// Open the database and create schema (if needed)
var db = Ti.Database.open('todo.sqlite');

db.execute('CREATE TABLE IF NOT EXISTS TODO_ITEMS (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, IS_COMPLETE INTEGER)');

// User interface (UI) construction
var win = Ti.UI.createWindow({
	backgroundColor: '#ffffff',
	title: 'To Do List'
});

var headerView = Ti.UI.createView({
	height: '50dp',
	width: '100%',
	backgroundColor: '#885511',
	layout: 'horizontal',
	top: 0
});

var txtTaskName = Ti.UI.createTextField({
	left: 15,
	width: '75%',
	height: Ti.UI.FILL,
	hintText: 'Enter New Task Name',
	borderColor: '#000000',
	backgroundColor: '#ffffff'
});
headerView.add(txtTaskName);

var btnAdd = Ti.UI.createButton({
	backgroundImage: 'add_button.png',
	left: 15,
	height: '45dp',
	width: '45dp'
});

btnAdd.addEventListener('click', function(e) {
	addTask(txtTaskName.value);
});

txtTaskName.addEventListener('return', function() {
	btnAdd.fireEvent('click');  
});

headerView.add(btnAdd);
win.add(headerView);

var taskView = Ti.UI.createView({
	top: '50dp',
	width: '100%',
	backgroundColor: '#eeeeee'
});

var taskList = Ti.UI.createTableView({
	width: Ti.UI.FILL,
	height: Ti.UI.FILL,
	separatorColor: '#bb8888'
});

taskList.addEventListener('click', function(e) {
	var todoItem = e.rowData;

	db.execute('UPDATE TODO_ITEMS SET IS_COMPLETE = ? WHERE ID = ?', 
				(todoItem.hasCheck ? 0 : 1), todoItem.id);
	refreshTaskList();
});

taskView.add(taskList);
win.add(taskView);
{'fraction_non_alphanumeric': 0.16786179921773142, 'fraction_numerical': 0.025423728813559324, 'mean_word_length': 5.263265306122449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '739945', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1109, 'n_words': 257}