Example #1
0
int main(){
	int choice;

	// populate the database
	/*	read file
		create insert statements
		execute sql statements
		close file */
	populate_sql();

	// menu //
	/*	Options
	**	1. Update record
	**	2. Delete all records
	**	3. Quit
	*/
	while (choice = menu()){
		if (choice == 4){
			return 0;
		}
		if (choice == 3){
			report();
		}
		else if (choice == 2){
			del_records();
		}
		else if (choice == 1){
			update_records();
		}
	}

	return 0;
}
void
evolutionary_solver<TFloat>::advance()
{
  transform();

  _population->swap_data_sets();

  evaluate_genomes();
  update_records();
  regenerate_prns();

  _generation_count++;
}
Example #3
0
int sc_update_dir(sc_card_t *card, sc_app_info_t *app)
{
	sc_path_t path;
	sc_file_t *file;
	int r;
	
	sc_format_path("3F002F00", &path);

	r = sc_select_file(card, &path, &file);
	SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, r, "unable to select EF(DIR)");
	if (file->ef_structure == SC_FILE_EF_TRANSPARENT)
		r = update_transparent(card, file);
	else if (app == NULL)
		r = update_records(card);
	else
		r = update_single_record(card, app);
	sc_file_free(file);
	return r;
}