text:
/*************************************************************************/
/*  script_create_dialog.cpp                                             */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                      https://godotengine.org                          */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md).   */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

#include "script_create_dialog.h"

#include "core/config/project_settings.h"
#include "core/io/file_access.h"
#include "core/io/resource_saver.h"
#include "core/string/string_builder.h"
#include "editor/create_dialog.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"

static String _get_parent_class_of_script(String p_path) {
	if (!ResourceLoader::exists(p_path, "Script")) {
		return "Object"; // A script eventually inherits from Object.
	}

	Ref<Script> script = ResourceLoader::load(p_path, "Script");
	ERR_FAIL_COND_V(script.is_null(), "Object");

	String class_name;
	Ref<Script> base = script->get_base_script();

	// Inherits from a built-in class.
	if (base.is_null()) {
		script->get_language()->get_global_class_name(script->get_path(), &class_name);
		return class_name;
	}

	// Inherits from a script that has class_name.
	class_name = script->get_language()->get_global_class_name(base->get_path());
	if (!class_name.is_empty()) {
		return class_name;
	}

	// Inherits from a plain script.
	return _get_parent_class_of_script(base->get_path());
}

static Vector<String> _get_hierarchy(String p_class_name) {
	Vector<String> hierarchy;

	String class_name = p_class_name;
	while (true) {
		// A registered class.
		if (ClassDB::class_exists(class_name)) {
			hierarchy.push_back(class_name);

			class_name = ClassDB::get_parent_class(class_name);
			continue;
		}

		// A class defined in script with class_name.
		if (ScriptServer::is_global_class(class_name)) {
			hierarchy.push_back(class_name);

			Ref<Script> script = EditorNode::get_editor_data().script_class_load_script(class_name);
			ERR_BREAK(script.is_null());
			class_name = _get_parent_class_of_script(script->get_path());
			continue;
		}

		break;
	}

	if (hierarchy.is_empty()) {
		if (p_class_name.is_valid_identifier()) {
			hierarchy.push_back(p_class_name);
		}
		hierarchy.push_back("Object");
	}

	return hierarchy;
}

void ScriptCreateDialog::_notification(int p_what) {
	switch (p_what) {
		case NOTIFICATION_ENTER_TREE: {
			String last_language = EditorSettings::get_singleton()->get_project_metadata("script_setup", "last_selected_language", "");
			if (!last_language.is_empty()) {
				for (int i = 0; i < language_menu->get_item_count(); i++) {
					if (language_menu->get_item_text(i) == last_language) {
						language_menu->select(i);
						current_language = i;
						break;
					}
				}
			} else {
				language_menu->select(default_language);
			}

			[[fallthrough]];
		}
		case NOTIFICATION_THEME_CHANGED: {
			for (int i = 0; i < ScriptServer::get_language_count(); i++) {
				Ref<Texture2D> language_icon = get_theme_icon(ScriptServer::get_language(i)->get_type(), SNAME("EditorIcons"));
				if (language_icon.is_valid()) {
					language_menu->set_item_icon(i, language_icon);
				}
			}

			path_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
			parent_browse_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
			parent_search_button->set_icon(get_theme_icon(SNAME("ClassList"), SNAME("EditorIcons")));
			status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
		} break;
	}
}

void ScriptCreateDialog::_path_hbox_sorted() {
	if (is_visible()) {
		int filename_start_pos = initial_bp.rfind("/") + 1;
		int filename_end_pos = initial_bp.length();

		if (!is_built_in) {
			file_path->select(filename_start_pos, filename_end_pos);
		}

		// First set cursor to the end of line to scroll LineEdit view
		// to the right and then set the actual cursor position.
		file_path->set_caret_column(file_path->get_text().length());
		file_path->set_caret_column(filename_start_pos);

		file_path->grab_focus();
	}
}

bool ScriptCreateDialog::_can_be_built_in() {
	return (supports_built_in && built_in_enabled);
}

void ScriptCreateDialog::config(const String &p_base_name, const String &p_base_path, bool p_built_in_enabled, bool p_load_enabled) {
	class_name->set_text("");
	class_name->deselect();
	parent_name->set_text(p_base_name);
	parent_name->deselect();
	internal_name->set_text("");

	if (!p_base_path.is_empty()) {
		initial_bp = p_base_path.get_basename();
		file_path->set_text(initial_bp + "." + ScriptServer::get_language(language_menu->get_selected())->get_extension());
		current_language = language_menu->get_selected();
	} else {
		initial_bp = "";
		file_path->set_text("");
	}
	file_path->deselect();

	built_in_enabled = p_built_in_enabled;
	load_enabled = p_load_enabled;

	_language_changed(current_language);
	_class_name_changed("");
	_path_changed(file_path->get_text());
}

void ScriptCreateDialog::set_inheritance_base_type(const String &p_base) {
	base_type = p_base;
}

bool ScriptCreateDialog::_validate_parent(const String &p_string) {
	if (p_string.length() == 0) {
		return false;
	}

	if (can_inherit_from_file && p_string.is_quoted()) {
		String p = p_string.substr(1, p_string.length() - 2);
		if (_validate_path(p, true) == "") {
			return true;
		}
	}

	return ClassDB::class_exists(p_string) || ScriptServer::is_global_class(p_string);
}

bool ScriptCreateDialog::_validate_class(const String &p_string) {
	if (p_string.length() == 0) {
		return false;
	}

	for (int i = 0; i < p_string.length(); i++) {
		if (i == 0) {
			// Cannot start with a number.
			if (p_string[0] >= '0' && p_string[0] <= '9') {
				return false;
			}
		}

		bool valid_char = is_ascii_identifier_char(p_string[i]) || p_string[i] == '.';

		if (!valid_char) {
			return false;
		}
	}

	return true;
}

String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must_exist) {
	String p = p_path.strip_edges();

	if (p.is_empty()) {
		return TTR("Path is empty.");
	}
	if (p.get_file().get_basename().is_empty()) {
		return TTR("Filename is empty.");
	}

	if (!p.get_file().get_basename().is_valid_filename()) {
		return TTR("Filename is invalid.");
	}

	p = ProjectSettings::get_singleton()->localize_path(p);
	if (!p.begins_with("res://")) {
		return TTR("Path is not local.");
	}

	{
		Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
		if (da->change_dir(p.get_base_dir()) != OK) {
			return TTR("Base path is invalid.");
		}
	}

	{
		// Check if file exists.
		Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
		if (da->dir_exists(p)) {
			return TTR("A directory with the same name exists.");
		} else if (p_file_must_exist && !da->file_exists(p)) {
			return TTR("File does not exist.");
		}
	}

	// Check file extension.
	String extension = p.get_extension();
	List<String> extensions;

	// Get all possible extensions for script.
	for (int l = 0; l < language_menu->get_item_count(); l++) {
		ScriptServer::get_language(l)->get_recognized_extensions(&extensions);
	}

	bool found = false;
	bool match = false;
	int index = 0;
	for (const String &E : extensions) {
		if (E.nocasecmp_to(extension) == 0) {
			found = true;
			if (E == ScriptServer::get_language(language_menu->get_selected())->get_extension()) {
				match = true;
			}
			break;
		}
		index++;
	}

	if (!found) {
		return TTR("Invalid extension.");
	}
	if (!match) {
		return TTR("Extension doesn't match chosen language.");
	}

	// Let ScriptLanguage do custom validation.
	String path_error = ScriptServer::get_language(language_menu->get_selected())->validate_path(p);
	if (!path_error.is_empty()) {
		return path_error;
	}

	// All checks passed.
	return "";
}

String ScriptCreateDialog::_get_class_name() const {
	if (has_named_classes) {
		return class_name->get_text();
	} else {
		return ProjectSettings::get_singleton()->localize_path(file_path->get_text()).get_file().get_basename();
	}
}

void ScriptCreateDialog::_class_name_changed(const String &p_name) {
	is_class_name_valid = _validate_class(class_name->get_text());
	_update_dialog();
}

void ScriptCreateDialog::_parent_name_changed(const String &p_parent) {
	is_parent_name_valid = _validate_parent(parent_name->get_text());
	_update_dialog();
}

void ScriptCreateDialog::_template_changed(int p_template) {
	const ScriptLanguage::ScriptTemplate &sinfo = _get_current_template();
	// Update last used dictionaries
	if (is_using_templates && !parent_name->get_text().begins_with("\"res:")) {
		if (sinfo.origin == ScriptLanguage::TemplateLocation::TEMPLATE_PROJECT) {
			// Save the last used template for this node into the project dictionary.
			Dictionary dic_templates_project = EditorSettings::get_singleton()->get_project_metadata("script_setup", "templates_dictionary", Dictionary());
			dic_templates_project[parent_name->get_text()] = sinfo.get_hash();
			EditorSettings::get_singleton()->set_project_metadata("script_setup", "templates_dictionary", dic_templates_project);
		} else {
			// Save template info to editor dictionary (not a project template).
			templates_dictionary[parent_name->get_text()] = sinfo.get_hash();
			// Remove template from project dictionary as we last used an editor level template.
			Dictionary dic_templates_project = EditorSettings::get_singleton()->get_project_metadata("script_setup", "templates_dictionary", Dictionary());
			if (dic_templates_project.has(parent_name->get_text())) {
				dic_templates_project.erase(parent_name->get_text());
				EditorSettings::get_singleton()->set_project_metadata("script_setup", "templates_dictionary", dic_templates_project);
			}
		}
	}
	// Update template label information.
	String template_info = String::utf8("•  ");
	template_info += TTR("Template:");
	template_info += " " + sinfo.name;
	if (!sinfo.description.is_empty()) {
		template_info += " - " + sinfo.description;
	}
	template_info_label->set_text(template_info);
	template_info_label->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
}

void ScriptCreateDialog::ok_pressed() {
	if (is_new_script_created) {
		_create_new();
	} else {
		_load_exist();
	}

	EditorSettings::get_singleton()->save();
	is_new_script_created = true;
	_update_dialog();
}

void ScriptCreateDialog::_create_new() {
	String cname_param = _get_class_name();

	Ref<Script> scr;

	const ScriptLanguage::ScriptTemplate sinfo = _get_current_template();

	scr = ScriptServer::get_language(language_menu->get_selected())->make_template(sinfo.content, cname_param, parent_name->get_text());

	if (has_named_classes) {
		String cname = class_name->get_text();
		if (cname.length()) {
			scr->set_name(cname);
		}
	}

	if (is_built_in) {
		scr->set_name(internal_name->get_text());
	} else {
		String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
		scr->set_path(lpath);
		Error err = ResourceSaver::save(scr, lpath, ResourceSaver::FLAG_CHANGE_PATH);
		if (err != OK) {
			alert->set_text(TTR("Error - Could not create script in filesystem."));
			alert->popup_centered();
			return;
		}
	}

	emit_signal(SNAME("script_created"), scr);
	hide();
}

void ScriptCreateDialog::_load_exist() {
	String path = file_path->get_text();
	Ref<Resource> p_script = ResourceLoader::load(path, "Script");
	if (p_script.is_null()) {
		alert->set_text(vformat(TTR("Error loading script from %s"), path));
		alert->popup_centered();
		return;
	}

	emit_signal(SNAME("script_created"), p_script);
	hide();
}

void ScriptCreateDialog::_language_changed(int l) {
	language = ScriptServer::get_language(l);

	has_named_classes = language->has_named_classes();
	can_inherit_from_file = language->can_inherit_from_file();
	supports_built_in = language->supports_builtin_mode();
	if (!supports_built_in) {
		is_built_in = false;
	}

	String selected_ext = "." + language->get_extension();
	String path = file_path->get_text();
	String extension = "";
	if (!path.is_empty()) {
		if (path.contains(".")) {
			extension = path.get_extension();
		}

		if (extension.length() == 0) {
			// Add extension if none.
			path += selected_ext;
			_path_changed(path);
		} else {
			// Change extension by selected language.
			List<String> extensions;
			// Get all possible extensions for script.
			for (int m = 0; m < language_menu->get_item_count(); m++) {
				ScriptServer::get_language(m)->get_recognized_extensions(&extensions);
			}

			for (const String &E : extensions) {
				if (E.nocasecmp_to(extension) == 0) {
					path = path.get_basename() + selected_ext;
					_path_changed(path);
					break;
				}
			}
		}
	} else {
		path = "class" + selected_ext;
		_path_changed(path);
	}
	file_path->set_text(path);

	EditorSettings::get_singleton()->set_project_metadata("script_setup", "last_selected_language", language_menu->get_item_text(language_menu->get_selected()));

	_parent_name_changed(parent_name->get_text());
	_update_dialog();
}

void ScriptCreateDialog::_built_in_pressed() {
	if (internal->is_pressed()) {
		is_built_in = true;
		is_new_script_created = true;
	} else {
		is_built_in = false;
		_path_changed(file_path->get_text());
	}
	_update_dialog();
}

void ScriptCreateDialog::_use_template_pressed() {
	is_using_templates = use_templates->is_pressed();
	_update_dialog();
}

void ScriptCreateDialog::_browse_path(bool browse_parent, bool p_save) {
	is_browsing_parent = browse_parent;

	if (p_save) {
		file_browse->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
		file_browse->set_title(TTR("Open Script / Choose Location"));
		file_browse->set_ok_button_text(TTR("Open"));
	} else {
		file_browse->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
		file_browse->set_title(TTR("Open Script"));
	}

	file_browse->set_disable_overwrite_warning(true);
	file_browse->clear_filters();
	List<String> extensions;

	int lang = language_menu->get_selected();
	ScriptServer::get_language(lang)->get_recognized_extensions(&extensions);

	for (const String &E : extensions) {
		file_browse->add_filter("*." + E);
	}

	file_browse->set_current_path(file_path->get_text());
	file_browse->popup_file_dialog();
}

void ScriptCreateDialog::_file_selected(const String &p_file) {
	String path = ProjectSettings::get_singleton()->localize_path(p_file);
	if (is_browsing_parent) {
		parent_name->set_text("\"" + path + "\"");
		_parent_name_changed(parent_name->get_text());
	} else {
		file_path->set_text(path);
		_path_changed(path);

		String filename = path.get_file().get_basename();
		int select_start = path.rfind(filename);
		file_path->select(select_start, select_start + filename.length());
		file_path->set_caret_column(select_start + filename.length());
		file_path->grab_focus();
	}
}

void ScriptCreateDialog::_create() {
	parent_name->set_text(select_class->get_selected_type().split(" ")[0]);
	_parent_name_changed(parent_name->get_text());
}

void ScriptCreateDialog::_browse_class_in_tree() {
	select_class->set_base_type(base_type);
	select_class->popup_create(true);
	select_class->set_title(vformat(TTR("Inherit %s"), base_type));
	select_class->set_ok_button_text(TTR("Inherit"));
}

void ScriptCreateDialog::_path_changed(const String &p_path) {
	if (is_built_in) {
		return;
	}

	is_path_valid = false;
	is_new_script_created = true;

	String path_error = _validate_path(p_path, false);
	if (!path_error.is_empty()) {
		_msg_path_valid(false, path_error);
		_update_dialog();
		return;
	}

	// Check if file exists.
	Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
	String p = ProjectSettings::get_singleton()->localize_path(p_path.strip_edges());
	if (da->file_exists(p)) {
		is_new_script_created = false;
		_msg_path_valid(true, TTR("File exists, it will be reused."));
	}

	is_path_valid = true;
	_update_dialog();
}

void ScriptCreateDialog::_path_submitted(const String &p_path) {
	ok_pressed();
}

void ScriptCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
	error_label->set_text(String::utf8("•  ") + p_msg);
	if (valid) {
		error_label->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
	} else {
		error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
	}
}

void ScriptCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
	path_error_label->set_text(String::utf8("•  ") + p_msg);
	if (valid) {
		path_error_label->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
	} else {
		path_error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
	}
}

void ScriptCreateDialog::_update_template_menu() {
	bool is_language_using_templates = language->is_using_templates();
	template_menu->set_disabled(false);
	template_menu->clear();
	template_list.clear();

	if (is_language_using_templates) {
		// Get the latest templates used for each type of node from project settings then global settings.
		Dictionary last_local_templates = EditorSettings::get_singleton()->get_project_metadata("script_setup", "templates_dictionary", Dictionary());
		String inherits_base_type = parent_name->get_text();

		// If it inherits from a script, get its parent class first.
		if (inherits_base_type[0] == '"') {
			inherits_base_type = _get_parent_class_of_script(inherits_base_type.unquote());
		}

		// Get all ancestor node for selected base node.
		// There templates will also fit the base node.
		Vector<String> hierarchy = _get_hierarchy(inherits_base_type);
		int last_used_template = -1;
		int preselected_template = -1;
		int previous_ancestor_level = -1;

		// Templates can be stored in tree different locations.
		Vector<ScriptLanguage::TemplateLocation> template_locations;
		template_locations.append(ScriptLanguage::TEMPLATE_PROJECT);
		template_locations.append(ScriptLanguage::TEMPLATE_EDITOR);
		template_locations.append(ScriptLanguage::TEMPLATE_BUILT_IN);

		for (const ScriptLanguage::TemplateLocation &template_location : template_locations) {
			String display_name = _get_script_origin_label(template_location);
			bool separator = false;
			int ancestor_level = 0;
			for (const String &current_node : hierarchy) {
				Vector<ScriptLanguage::ScriptTemplate> templates_found;
				if (template_location == ScriptLanguage::TEMPLATE_BUILT_IN) {
					templates_found = language->get_built_in_templates(current_node);
				} else {
					String template_directory;
					if (template_location == ScriptLanguage::TEMPLATE_PROJECT) {
						template_directory = EditorPaths::get_singleton()->get_project_script_templates_dir();
					} else {
						template_directory = EditorPaths::get_singleton()->get_script_templates_dir();
					}
					templates_found = _get_user_templates(language, current_node, template_directory, template_location);
				}
				if (!templates_found.is_empty()) {
					if (!separator) {
						template_menu->add_separator();
						template_menu->set_item_text(-1, display_name);
						separator = true;
					}
					for (ScriptLanguage::ScriptTemplate &t : templates_found) {
						template_menu->add_item(t.inherit + ": " + t.name);
						int id = template_menu->get_item_count() - 1;
						// Check if this template should be preselected if node isn't in the last used dictionary.
						if (ancestor_level < previous_ancestor_level || previous_ancestor_level == -1) {
							previous_ancestor_level = ancestor_level;
							preselected_template = id;
						}
						// Check for last used template for this node in project settings then in global settings.
						if (last_local_templates.has(parent_name->get_text()) && t.get_hash() == String(last_local_templates[parent_name->get_text()])) {
							last_used_template = id;
						} else if (last_used_template == -1 && templates_dictionary.has(parent_name->get_text()) && t.get_hash() == String(templates_dictionary[parent_name->get_text()])) {
							last_used_template = id;
						}
						t.id = id;
						template_list.push_back(t);
						String icon = has_theme_icon(t.inherit, SNAME("EditorIcons")) ? t.inherit : "Object";
						template_menu->set_item_icon(id, get_theme_icon(icon, SNAME("EditorIcons")));
					}
				}
				ancestor_level++;
			}
		}

		if (last_used_template != -1) {
			template_menu->select(last_used_template);
		} else if (preselected_template != -1) {
			template_menu->select(preselected_template);
		}
	}
	_template_changed(template_menu->get_selected());
}

void ScriptCreateDialog::_update_dialog() {
	// "Add Script Dialog" GUI logic and script checks.
	_update_template_menu();
	bool script_ok = true;

	// Is script path/name valid (order from top to bottom)?

	if (!is_built_in && !is_path_valid) {
		_msg_script_valid(false, TTR("Invalid path."));
		script_ok = false;
	}
	if (has_named_classes && (is_new_script_created && !is_class_name_valid)) {
		_msg_script_valid(false, TTR("Invalid class name."));
		script_ok = false;
	}
	if (!is_parent_name_valid && is_new_script_created) {
		_msg_script_valid(false, TTR("Invalid inherited parent name or path."));
		script_ok = false;
	}

	if (script_ok) {
		_msg_script_valid(true, TTR("Script path/name is valid."));
	}

	// Does script have named classes?

	if (has_named_classes) {
		if (is_new_script_created) {
			class_name->set_editable(true);
			class_name->set_placeholder(TTR("Allowed: a-z, A-Z, 0-9, _ and ."));
			Color placeholder_color = class_name->get_theme_color(SNAME("font_placeholder_color"));
			placeholder_color.a = 0.3;
			class_name->add_theme_color_override("font_placeholder_color", placeholder_color);
		} else {
			class_name->set_editable(false);
		}
	} else {
		class_name->set_editable(false);
		class_name->set_placeholder(TTR("N/A"));
		Color placeholder_color = class_name->get_theme_color(SNAME("font_placeholder_color"));
		placeholder_color.a = 1;
		class_name->add_theme_color_override("font_placeholder_color", placeholder_color);
		class_name->set_text("");
	}

	// Is script Built-in?

	if (is_built_in) {
		file_path->set_editable(false);
		path_button->set_disabled(true);
		re_check_path = true;
	} else {
		file_path->set_editable(true);
		path_button->set_disabled(false);
		if (re_check_path) {
			re_check_path = false;
			_path_changed(file_path->get_text());
		}
	}

	if (!_can_be_built_in()) {
		internal->set_pressed(false);
	}
	internal->set_disabled(!_can_be_built_in());

	// Is Script created or loaded from existing file?

	builtin_warning_label->set_visible(is_built_in);

	path_controls[0]->set_visible(!is_built_in);
	path_controls[1]->set_visible(!is_built_in);
	name_controls[0]->set_visible(is_built_in);
	name_controls[1]->set_visible(is_built_in);

	// Check if the script name is the same as the parent class.
	// This warning isn't relevant if the script is built-in.
	script_name_warning_label->set_visible(!is_built_in && _get_class_name() == parent_name->get_text());

	bool is_new_file = is_built_in || is_new_script_created;

	parent_name->set_editable(is_new_file);
	parent_search_button->set_disabled(!is_new_file);
	parent_browse_button->set_disabled(!is_new_file || !can_inherit_from_file);
	template_inactive_message = "";
	String button_text = is_new_file ? TTR("Create") : TTR("Load");
	set_ok_button_text(button_text);

	if (is_new_file) {
		if (is_built_in) {
			_msg_path_valid(true, TTR("Built-in script (into scene file)."));
		}
		if (is_new_script_created && is_path_valid) {
			_msg_path_valid(true, TTR("Will create a new script file."));
		}
	} else {
		if (load_enabled) {
			template_inactive_message = TTR("Using existing script file.");
			if (is_path_valid) {
				_msg_path_valid(true, TTR("Will load an existing script file."));
			}
		} else {
			template_inactive_message = TTR("Using existing script file.");
			_msg_path_valid(false, TTR("Script file already exists."));
			script_ok = false;
		}
	}

	// Show templates list if needed.
	if (is_using_templates) {
		// Check if at least one suitable template has been found.
		if (template_menu->get_item_count() == 0 && template_inactive_message.is_empty()) {
			template_inactive_message = TTR("No suitable template.");
		}
	} else {
		template_inactive_message = TTR("Empty");
	}

	if (!template_inactive_message.is_empty()) {
		template_menu->set_disabled(true);
		template_menu->clear();
		template_menu->add_item(template_inactive_message);
	}
	template_info_label->set_visible(!template_menu->is_disabled());

	get_ok_button()->set_disabled(!script_ok);

	Callable entered_call = callable_mp(this, &ScriptCreateDialog::_path_submitted);
	if (script_ok) {
		if (!file_path->is_connected("text_submitted", entered_call)) {
			file_path->connect("text_submitted", entered_call);
		}
	} else if (file_path->is_connected("text_submitted", entered_call)) {
		file_path->disconnect("text_submitted", entered_call);
	}
}

ScriptLanguage::ScriptTemplate ScriptCreateDialog::_get_current_template() const {
	int selected_index = template_menu->get_selected();
	for (const ScriptLanguage::ScriptTemplate &t : template_list) {
		if (is_using_templates) {
			if (t.id == selected_index) {
				return t;
			}
		} else {
			// Using empty built-in template if templates are disabled.
			if (t.origin == ScriptLanguage::TemplateLocation::TEMPLATE_BUILT_IN && t.name == "Empty") {
				return t;
			}
		}
	}
	return ScriptLanguage::ScriptTemplate();
}

Vector<ScriptLanguage::ScriptTemplate> ScriptCreateDialog::_get_user_templates(const ScriptLanguage *language, const StringName &p_object, const String &p_dir, const ScriptLanguage::TemplateLocation &p_origin) const {
	Vector<ScriptLanguage::ScriptTemplate> user_templates;
	String extension = language->get_extension();

	String dir_path = p_dir.plus_file(p_object);

	Ref<DirAccess> d = DirAccess::open(dir_path);
	if (d.is_valid()) {
		d->list_dir_begin();
		String file = d->get_next();
		while (file != String()) {
			if (file.get_extension() == extension) {
				user_templates.append(_parse_template(language, dir_path, file, p_origin, p_object));
			}
			file = d->get_next();
		}
		d->list_dir_end();
	}
	return user_templates;
}

ScriptLanguage::ScriptTemplate ScriptCreateDialog::_parse_template(const ScriptLanguage *language, const String &p_path, const String &p_filename, const ScriptLanguage::TemplateLocation &p_origin, const String &p_inherits) const {
	ScriptLanguage::ScriptTemplate script_template = ScriptLanguage::ScriptTemplate();
	script_template.origin = p_origin;
	script_template.inherit = p_inherits;
	String space_indent = "    ";
	// Get meta delimiter
	String meta_delimiter = String();
	List<String> comment_delimiters;
	language->get_comment_delimiters(&comment_delimiters);
	for (const String &script_delimiter : comment_delimiters) {
		if (!script_delimiter.contains(" ")) {
			meta_delimiter = script_delimiter;
			break;
		}
	}
	String meta_prefix = meta_delimiter + " meta-";

	// Parse file for meta-information and script content
	Error err;
	Ref<FileAccess> file = FileAccess::open(p_path.plus_file(p_filename), FileAccess::READ, &err);
	if (!err) {
		while (!file->eof_reached()) {
			String line = file->get_line();
			if (line.begins_with(meta_prefix)) {
				// Store meta information
				line = line.substr(meta_prefix.length(), -1);
				if (line.begins_with("name")) {
					script_template.name = line.substr(5, -1).strip_edges();
				}
				if (line.begins_with("description")) {
					script_template.description = line.substr(12, -1).strip_edges();
				}
				if (line.begins_with("space-indent")) {
					String indent_value = line.substr(17, -1).strip_edges();
					if (indent_value.is_valid_int()) {
						space_indent = "";
						for (int i = 0; i < indent_value.to_int(); i++) {
							space_indent += " ";
						}
					} else {
						WARN_PRINT(vformat("Template meta-use_space_indent need to be a valid integer value. Found %s.", indent_value));
					}
				}
			} else {
				// Store script
				if (space_indent != "") {
					line = line.replace(space_indent, "_TS_");
				}
				script_template.content += line.replace("\t", "_TS_") + "\n";
			}
		}
	}

	script_template.content = script_template.content.lstrip("\n");

	// Get name from file name if no name in meta information
	if (script_template.name == String()) {
		script_template.name = p_filename.get_basename().replace("_", " ").capitalize();
	}

	return script_template;
}

String ScriptCreateDialog::_get_script_origin_label(const ScriptLanguage::TemplateLocation &p_origin) const {
	switch (p_origin) {
		case ScriptLanguage::TEMPLATE_BUILT_IN:
			return TTR("Built-in");
		case ScriptLanguage::TEMPLATE_EDITOR:
			return TTR("Editor");
		case ScriptLanguage::TEMPLATE_PROJECT:
			return TTR("Project");
	}
	return "";
}

void ScriptCreateDialog::_bind_methods() {
	ClassDB::bind_method(D_METHOD("config", "inherits", "path", "built_in_enabled", "load_enabled"), &ScriptCreateDialog::config, DEFVAL(true), DEFVAL(true));

	ADD_SIGNAL(MethodInfo("script_created", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script")));
}

ScriptCreateDialog::ScriptCreateDialog() {
	/* Main Controls */

	GridContainer *gc = memnew(GridContainer);
	gc->set_columns(2);

	/* Information Messages Field */

	VBoxContainer *vb = memnew(VBoxContainer);

	error_label = memnew(Label);
	vb->add_child(error_label);

	path_error_label = memnew(Label);
	vb->add_child(path_error_label);

	builtin_warning_label = memnew(Label);
	builtin_warning_label->set_text(
			TTR("Note: Built-in scripts have some limitations and can't be edited using an external editor."));
	vb->add_child(builtin_warning_label);
	builtin_warning_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
	builtin_warning_label->hide();

	script_name_warning_label = memnew(Label);
	script_name_warning_label->set_text(
			TTR("Warning: Having the script name be the same as a built-in type is usually not desired."));
	vb->add_child(script_name_warning_label);
	script_name_warning_label->add_theme_color_override("font_color", Color(1, 0.85, 0.4));
	script_name_warning_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
	script_name_warning_label->hide();

	template_info_label = memnew(Label);
	vb->add_child(template_info_label);
	template_info_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);

	status_panel = memnew(PanelContainer);
	status_panel->set_h_size_flags(Control::SIZE_FILL);
	status_panel->set_v_size_flags(Control::SIZE_EXPAND_FILL);
	status_panel->add_child(vb);

	/* Spacing */

	Control *spacing = memnew(Control);
	spacing->set_custom_minimum_size(Size2(0, 10 * EDSCALE));

	vb = memnew(VBoxContainer);
	vb->add_child(gc);
	vb->add_child(spacing);
	vb->add_child(status_panel);
	add_child(vb);

	/* Language */

	language_menu = memnew(OptionButton);
	language_menu->set_custom_minimum_size(Size2(350, 0) * EDSCALE);
	language_menu->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	gc->add_child(memnew(Label(TTR("Language:"))));
	gc->add_child(language_menu);

	default_language = -1;
	for (int i = 0; i < ScriptServer::get_language_count(); i++) {
		String lang = ScriptServer::get_language(i)->get_name();
		language_menu->add_item(lang);
		if (lang == "GDScript") {
			default_language = i;
		}
	}
	if (default_language >= 0) {
		language_menu->select(default_language);
	}
	current_language = default_language;

	language_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_language_changed));

	/* Inherits */

	base_type = "Object";

	HBoxContainer *hb = memnew(HBoxContainer);
	hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	parent_name = memnew(LineEdit);
	parent_name->connect("text_changed", callable_mp(this, &ScriptCreateDialog::_parent_name_changed));
	parent_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	hb->add_child(parent_name);
	parent_search_button = memnew(Button);
	parent_search_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_class_in_tree));
	hb->add_child(parent_search_button);
	parent_browse_button = memnew(Button);
	parent_browse_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path).bind(true, false));
	hb->add_child(parent_browse_button);
	gc->add_child(memnew(Label(TTR("Inherits:"))));
	gc->add_child(hb);

	/* Class Name */

	class_name = memnew(LineEdit);
	class_name->connect("text_changed", callable_mp(this, &ScriptCreateDialog::_class_name_changed));
	class_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	gc->add_child(memnew(Label(TTR("Class Name:"))));
	gc->add_child(class_name);

	/* Templates */
	gc->add_child(memnew(Label(TTR("Template:"))));
	HBoxContainer *template_hb = memnew(HBoxContainer);
	template_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);

	use_templates = memnew(CheckBox);
	use_templates->set_pressed(is_using_templates);
	use_templates->connect("pressed", callable_mp(this, &ScriptCreateDialog::_use_template_pressed));
	template_hb->add_child(use_templates);

	template_inactive_message = "";

	template_menu = memnew(OptionButton);
	template_menu->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	template_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_template_changed));
	template_hb->add_child(template_menu);

	gc->add_child(template_hb);

	/* Built-in Script */

	internal = memnew(CheckBox);
	internal->set_text(TTR("On"));
	internal->connect("pressed", callable_mp(this, &ScriptCreateDialog::_built_in_pressed));
	gc->add_child(memnew(Label(TTR("Built-in Script:"))));
	gc->add_child(internal);

	/* Path */

	hb = memnew(HBoxContainer);
	hb->connect("sort_children", callable_mp(this, &ScriptCreateDialog::_path_hbox_sorted));
	file_path = memnew(LineEdit);
	file_path->connect("text_changed", callable_mp(this, &ScriptCreateDialog::_path_changed));
	file_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	hb->add_child(file_path);
	path_button = memnew(Button);
	path_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path).bind(false, true));
	hb->add_child(path_button);
	Label *label = memnew(Label(TTR("Path:")));
	gc->add_child(label);
	gc->add_child(hb);
	path_controls[0] = label;
	path_controls[1] = hb;

	/* Name */

	internal_name = memnew(LineEdit);
	internal_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	internal_name->connect("text_submitted", callable_mp(this, &ScriptCreateDialog::_path_submitted));
	label = memnew(Label(TTR("Name:")));
	gc->add_child(label);
	gc->add_child(internal_name);
	name_controls[0] = label;
	name_controls[1] = internal_name;
	label->hide();
	internal_name->hide();

	/* Dialog Setup */

	select_class = memnew(CreateDialog);
	select_class->connect("create", callable_mp(this, &ScriptCreateDialog::_create));
	add_child(select_class);

	file_browse = memnew(EditorFileDialog);
	file_browse->connect("file_selected", callable_mp(this, &ScriptCreateDialog::_file_selected));
	file_browse->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
	add_child(file_browse);
	set_ok_button_text(TTR("Create"));
	alert = memnew(AcceptDialog);
	alert->get_label()->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
	alert->get_label()->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
	alert->get_label()->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
	alert->get_label()->set_custom_minimum_size(Size2(325, 60) * EDSCALE);
	add_child(alert);

	set_hide_on_ok(false);
	set_title(TTR("Attach Node Script"));
}

redpajama_set_name: RedPajamaGithub


In my searches to find stables & barns for my barns in HDR post I ran across pictures of stables from all over the world. So I started collecting non-HDR images too, it's interesting to see the variety of stables from such different places.
The flavor & personality of each one is unique, yet strangely all it takes is a warm animal to make it feel like home.
There is more stables of the world to come so stay tuned.
This entry was posted in Horseplay on September 25, 2009 by The Equinest.
Wow, I particularly like the Vermont and Qatar stables.
I like the Vermont and Qatar too!
You have the most awesome, interesting subjects!!!!! I LOVE seeing the quaint stables!!!! Always so many varieties and styles!!! You're facebook profile/postings are certainly my FAVORITE!!!!
The vermont stable is the UVM Morgan horse farm. It is an amazing place, go visit if you can.


Inthenetmarketingblog.wordpress.com is a blog with the purpose of providing its visitors a valuable information about Internet Marketing, search engine optimization, Web Design, Social media tips and techniques and many more. We are trying to attract the visitors with the help of latest information based on all internet marketing strategies.
Inthenet Marketing, Inc., is a USA Based SEO web design & development company located in Redlands, California and Las Vegas, Nevada. We are a company that blends creativity, idea and aptitude to produce smart solutions and experiences. We offer a bouquet of custom-made services providing a focus on creativity, brand development and intelligent solutions. We are committed to create, develop and produce a profitable global business, by providing cost effective, original and value added services to our customers to automate their business.


Hearts and Flowers in Cardiff are qualified florists. Buy flowers online, we look forward to receiving your flower order. We deliver floral arrangements for any occasion throughout Cardiff, South Glamorgan area.
Great service, helpful, delivered on the date booked and recipient was very happy with the quality of the bouquet.
Excellent service, will use again, beautiful flowers for my wife on mother's day, she loved them.
Excellent service! Beautiful flowers. I drive by the florist when I am in Cardiff. One day I will drop in to thank them! Five stars!
Failed to deliver flowers within a specific 6 hour time slot that I had emailed and arranged with them weeks before, this was the main reason I went with this florist. Flower selection was poor and quality/freshness was sub standard for the price. I have used other florists in the past and will go back with them. Very dissapointed and won't be returning.
Amazing bunch of flowers, my girlfriend loved them!
Excellent service. Very reliable. Lovely flowers delivered on time making friend very happy. Will use again and recommend.
I ordered these online and they were delivered within a few hours , my girlfriend is over the moon with them and made her day , the flowers are even more beautiful than I thought and nothing like you get in the supermarkets , thankyou so much !
Flowers were beautiful - very good value also.
I was very impressed with the communication between myself and this company. I have yet to see my order as I am attending the funeral shortly. However, with the customer service I received which instilled trust, I am very hopeful I will not be disappointed. Diolch yn fawr iawn.
Flowers were beautiful and I was really happy that they included freesias as per my special request thank you!
Excellent service, flowers delivered as requested.
Wow thw flowers were BEAUTIFUL! I've ordered from different places before and I paid a little less but you get what you pay for... this time I decided to try a different site and spend a bit more and what a difference! The bouquet was stunning!!!! My friend who received them for her birthday has been messaging me and sending me photos of them non-stop for 2 days, Thank you for the best flowers I ever oredered ????
Excellent. Very convenient. Sent flowers to Wales (I live in Canada). They were delivered in good time.
Lovely flowers. Really pleased with service, the shop called to check details and were friendly and helpful. Will use again and recommend to others.
The service was excellent, the flowers were apparently magnificent, my mother was delighted. Hearts and Flowers have yet again delivered a superb service.
Beautiful arrangement arrived on time. Great to be able to rely on prompt delivery.
Really good same day service and the flower arrangement was stunning.
I was delighted with the funeral tribute.Many thanks.
This is the second time we have used their delivery, and have been very satisfied with the service and delivery. So nice to send flowers to relatives in Cardiff from Canada and know that they will get them on time and are beautiful.
Flowers were beautiful, fresh and in excellent condition.
It was easy to order from here in New Zealand and the confirmation about delivery was great. The only improvement I can suggest would be providing the sender with a picture of the product with the confirmation email. Just a quick snap on the phone would be fine!
Very easy to use website and a very prompt service. Flowers were beautiful. My daughter was very pleased with them.
I live in Australia and quite often send flowers to loved ones back home. My husband used to always get my flowers from here when I lived in Cardiff and they were always beautiful. Which is why they are my go to florist....I have never been disappointed with them, always gorgeous when they arrive.
Excellent value and expertly put together.
Arrived within an hour of ordering and a beautiful flower arrangement.
I'm bowled over, a truly efficient and faultless online experience and simply stunning flowers, not only that I received a picture of the bouquet, how fantastic, so impressed, thank you for your excellent service from beginning to end!
First class. The flowers were really nice and well presented. I did not order till 0830am flowers delivered by 12 noon. Great service.
Thank you for a beautiful arrangement and brilliant delivery considering that I didn't order till 4.00pm. Definitely worth 5 stars.
Delivered as requested and have been told that flowers were beautiful.
Amazing service! Created a beautiful bunch of flowers for my fiance??. Was more than happy to accommodate to have them delivered as a surprise to a hotel for us. Would definitely recommend and use again! Thanks you.
Bursitis flowers and a great service!
I ordered a flower bouquet for my daughter's 18th birthday. She's an overseas student in Cardiff and was having her big day away from home! I'm so glad that I found Hearts & Flowers online which didn't disappoint me nor my daughter. The bouquet delivered was true to the photo posted on their website and delivery was on time! Their prices are reasonable too!
I sent a birthday bouquet to my friend in Cardiff from London, so I had to rely on her to tell me what they were like. I was delighted when she phoned to say thank you for the flowers and adding that they were one of the most beautiful bouquets she had ever received! Thank you from both of us Hearts and Flowers!
Beautiful bouquet, unbelievably fast delivery. Will definitely use again.
Top class service from Hearts and Flowers, as our customer gave us the wrong house number for delivery, but Hearts and Flowers tried several properties and found the recipient. Brilliant service, thank you.
Friendly and efficient service, a beautiful bunch of flowers and one happy mum! I was so pleased to be able to order and have the flowers delivered on the same day, even on the morning. Thank you.
Repeat customer as excellent communication and first class service.
Flowers were beautiful and the recipient was delighted with them.
Oriental Lily hand tied, ready arranged to place straight in your vase.


text:
<?php
namespace Oro\Bundle\FormBundle\Tests\Unit\DependencyInjection;

use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\ArrayNode;
use Symfony\Component\Config\Definition\Processor;

use Oro\Bundle\FormBundle\DependencyInjection\Configuration;

class ConfigurationTest extends \PHPUnit_Framework_TestCase
{
    public function testGetConfigTreeBuilder()
    {
        $configuration = new Configuration();
        $builder = $configuration->getConfigTreeBuilder();
        $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\TreeBuilder', $builder);

        /** @var $root ArrayNode */
        $root = $builder->buildTree();
        $this->assertInstanceOf('Symfony\Component\Config\Definition\ArrayNode', $root);
        $this->assertEquals('oro_form', $root->getName());
    }
}


text:
Thu, 6 February 2020
Leadership in Times of War
Andrew Roberts, General Sir Rupert Smith and Hannah MacInnes
The Royal Institution
21 Albemarle St, London
W1S 4BS
Historian Andrew Roberts meets 'Britain's outstanding soldier of modern times' (Telegraph), Rupert Smith, to deliver essential lessons on the qualities of leadership in the modern world.
International warfare tests the mettle of a leader like no other trial. What qualities doom a leader to failure – and what lessons can be learned from those who are victorious? After two decades of Western military interventions have failed to deliver peace and political resolution, must we conclude that our leaders lack the qualities needed for success – or have they simply failed to recognise the changing nature of conflict in the modern world?
To answer these questions, How To Academy brings together two outstanding figures in the study and practice of leadership and war.
Andrew Roberts is the nation's preeminent biographer and historian of military conflict. The prize-winning biographer of Churchill and Napoleon, Professor of War Studies at Kings College and a frequent broadcaster in both the UK and the United States, Prof Roberts has analysed the lives of the political and military leaders who fundamentally shaped the conflicts in which their nations were embroiled – from Eisenhower to Thatcher, Nelson to de Gaulle – in his new book Leadership in War.
He is joined by General Sir Rupert Smith. As General Officer Commanding Northern Ireland at the end of the Troubles, UN Protection Force Commander in Bosnia, and Deputy Supreme Allied Commander Europe in the Kosovo War, General Smith is one of the most senior international practitioners in the use of force and author of a book informed by his four decades of professional military experience, The Utility of Force. His theory of a paradigm shift in global warfare – from the 'industrial warfare' begun by Napoleon to the terrorist and guerrilla led 'war of the people' – has been widely heralded as a profound and essential analysis that ought to be read by all politicians and military leaders.
Don't miss this meeting between two of the greatest living thinkers on leadership and the art of war.
Praise for Rupert Smith:
'One of the most provocative and startling books ever written by a British commander … an update of the two great thinkers on war and peace, Clausewitz and Sun Tsu, for our time … it is for anyone interested in the well-being of our world' – Robert Fox, Evening Standard
'Britain's outstanding soldier of modern times … a book that will assure his reputation as a serious and original thinker among soldiers and strategists' Sir – John Keegan, Daily Telegraph
'It is hard to overstate the devastating nature of this book as an indictment of almost everything the West has done in recent years, and is doing today' – Sir Max Hastings, Sunday Telegraph
Praise for Andrew Roberts:
'It's the sort of biography that, one feels, Churchill himself would have wanted. Colossal, energetic, deeply knowledgeable, properly critical, but also sympathetic and, in places, deliciously funny' – Noel Malcolm, Sunday Telegraph
'A stupendous achievement: lucid, erudite, intelligent, but also inspiring. Roberts catches the imperishable grandeur of Churchill's life as no other historian has done' – Daniel Johnson, Standpoint
'A work of unequalled scholarship. Read it and you will not have to bother with the previous 1,000 biographies' – Paul Routledge, Tablet
'Brilliant, breathtaking, unputdownable … All Roberts's past life has been but a preparation for this hour and this work, and this brilliant book is a fitting crown to his own career' – Michael Gove, Evening Standard
General Sir Rupert Smith
General Sir Rupert Smith KCB DSO OBE QGM is one of the most senior international practitioners in the use of force. In his forty year career in the British Army he commanded the UK Armoured Division in the 1990-91 Gulf War, commanded the UN forces in Bosnia in 1995, was GOC Northern Ireland, and served as Deputy Supreme Allied Commander Europe (DSACEUR) of NATO. He was a member of the Strategic Advisory Panel to the UK Chief of Defence and was the military member of the UK National Security Forum advising the Prime Minister and the Cabinet between 2008-2010.
Andrew Roberts is a biographer and historian of international renown whose books include Salisbury: Victorian Titan, Masters and Commanders, The Storm of War, Napoleon the Great and Churchill: Walking with Destiny, which was acclaimed as 'the best single-volume life imaginable' (Daily Telegraph), won the Arthur Ross Book Award and was a major bestseller in the UK and the USA. His most recent book is Leadership in War. Roberts is a Fellow of the Royal Societies of Literature and the Royal Historical Society, and a Trustee of the International Churchill Society.
London W1S 4BS
Wed, 5 February 2020
How to Ditch the Ladder, Discover Opportunity and Design Your Career
Helen Tupper and Sarah Ellis
Develop the skills you need for a meaningful and successful career with the help of Amazing If co-founders and hosts of the smash hit Squiggly Career podcast, Helen Tupper and Sarah Ellis.
Thu, 5 March 2020
How to Make Decisions for an Unknowable Future
Mervyn King, John Kay and Linda Yueh
Many of the world's problems stem from the false belief that we can accurately predict the future. Can we make better decisions by acknowledging radical uncertainty? Mervyn King and John Kay build a powerful case.
Mon, 10 February 2020
How To Understand Our Times: An Evening with Paul Krugman
In Conversation with Matthew d'Ancona
For more than forty years Nobel laureate, bestselling economist and New York Times columnist Paul Krugman has fought for a fair, just and liberal future.

redpajama_set_name: RedPajamaCommonCrawl


These 350 g ultra-plush microfiber towels are superior for removing smudges, dust and bugs from clearcoat, chrome and windshields. Use as a finishing towel with Cycle Care Formula 3, Windshield, Paint and Chrome Polish and Cycle Care 33, Spray, Wipe and Polish Cleaner. Penetrates and absorbs all particles to give a deep-down shine without scratching.


Hammonton is located in New Jersey. Hammonton, New Jersey 08037 has a population of 14,618.
The median household income in Hammonton, New Jersey 08037 is $61,235. The median household income for the surrounding county is $54,392 compared to the national median of $53,482. The median age of people living in Hammonton 08037 is 43.3 years.
I am interested in 118 S Route 73, Hammonton, NJ 08037.


text:
"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.PositiveIntegerField = void 0;
var Field_1 = require("./Field");
var PositiveIntegerField = /** @class */ (function (_super) {
    __extends(PositiveIntegerField, _super);
    function PositiveIntegerField() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Object.defineProperty(PositiveIntegerField.prototype, "value", {
        get: function () {
            return this._value;
        },
        set: function (data) {
            var oldValue = this.value;
            if (data == null) {
                this._value = null;
                return;
            }
            else if (typeof (data) == 'string')
                data = parseInt(data);
            if (data <= 0)
                data = 0;
            this._value = data;
            this.trigger('change', {
                oldValue: oldValue,
                value: data
            });
        },
        enumerable: false,
        configurable: true
    });
    return PositiveIntegerField;
}(Field_1.Field));
exports.PositiveIntegerField = PositiveIntegerField;
//# sourceMappingURL=PositiveNumberField.js.map


text:
Evaluation of the Effects of Lactational Exposure to Hyoscyamine Fraction of Datura stramonium L. Seeds on Learning and Memory in Wistar Rats (Rattus norvegicus)
Idris Tela Abdu1, Sunday Abraham Musa2, Ibrahim Abdullahi Iliya3, James Oliver Nzalak2
1 Anatomy Department, Faculty of Basic Medical Sciences, College of Health Sciences, Bayero University, Kano, Nigeria
2 Department of Veterinary Anatomy, Faculty of Veterinary Medicine, Ahmadu Bello University, Zaria, Kaduna State, Nigeria
3 Department of Human Anatomy, Federal University Dutse, Jigawa State, Nigeria
Idris Tela Abdu
Department of Anatomy, Faculty of Basic Medical Sciences, College of Health Science, Bayero University Kano
Background: Datura stramonium (D. stramonium), is a family member of Solanaceae, an annual plant known for its medicinal and toxic properties. Aims and Objectives: The study was designed to determine whether lactational exposure to hyoscyamine fraction of Datura stramonium L. (D. stramonium) seeds affect the cognitive, spatial learning and memory functions of the hippocampus in Wistar rats at adulthood. Materials and Methods: Fresh seeds of D. stramonium L. were procured, macerated and fractionated. Eight (8) Wistar rats weighed 150-250 grams of equal gender were used for the study. The rats were mated and divided into control and treatment groups. Equivalent body weight of normal saline and 400 mg/kgbwt of hyoscyamine fraction were orally administered to the breastfeeding rats respectively on lactational days (LD) 1-21. At adulthood, the rats were subjected to neurobehavioural tests using novel objects recognition (NORT) and Morris water maze (MWM) respectively. The data obtained were expressed as mean ± SEM, independent two samples t-test and General Linear Model (GLM) repeated-measures ANOVA with Fisher's multiple comparisons post-hoc tests were used to show the mean differences using Minitab 17 (LLC., U.K.) statistical package software. P < 0.05 was considered statistically significant. Results: A significant increase in the meantime of exploration between the groups (p = 0.049) was observed during the NORT. No statistically significant increase (p = 0.626) in the meantime to locate the escape platform between the groups during the MWM test. The CA1 region of the treated group showed mild nuclear hyperchromasia, cytoplasmic vacuolations and pyknosis. Conclusion: In conclusion, exposure to hyoscyamine fraction of D. stramonium L. seeds at lactation caused neuronal lesions in the CA1 region, impaired novel objects recognition but not spatial learning and memory in Wistar rats at adulthood.
Abdu IT
Musa SA
Iliya IA
Nzalak JO
D. stramonium
hyoscyamine


port, local officials confiscated Nyein Aye's fishing nets.
The 36-year-old fisherman was among hundreds banned from fishing a stretch of water near the entry point for a pipeline that pumps oil 770 kilometers (480 miles) across Burma to southwest China and forms a crucial part of Beijing's "Belt and Road" project to deepen its economic links with Asia and beyond.
The pipeline is part of the nearly US$10 billion Kyaukphyu Special Economic Zone, a scheme at the heart of fast-warming Burma-China relations and whose success is crucial for the Southeast Asian nation's leader Daw Aung San Suu Kyi.
Embattled Daw Aung San Suu Kyi needs a big economic win to stem criticism that her first year in office has seen little progress on reform. China's support is also key to stabilizing their shared border, where a spike in fighting with ethnic armed groups threatens the peace process Daw Aung San Suu Kyi says is her top priority.
China's state-run CITIC Group, the main developer of the Kyaukphyu Special Economic Zone, says it will create 100,000 jobs in the northwestern state of Arakan, one of Burma's poorest regions.
Suspicion of China runs deep in Burma, and public hostility due to environmental and other concerns has delayed or derailed Chinese mega-projects in the country in the past.
Since Beijing signaled it may abandon the huge Myitsone Dam hydroelectric project in Burma earlier this year, it has pushed for concessions on other strategic undertakings—including the Bay of Bengal port at Kyaukphyu—which gives it an alternative route for energy imports from the Middle East.
The Kyaukphyu Special Economic Zone will cover more than 4,200 acres (17 sq kilometers). It includes the $7.3 billion deep sea port and a $2.3 billion industrial park, with plans to attract industries such as textiles and oil refining.
"There will be a huge project in the zone and many buildings will be built, so people who live in the area will be relocated," said Than Htut Oo, administrator of Kyaukphyu, who also sits on the management committee of the economic zone.
In April, Burma's President Htin Kyaw signed two agreements on the pipeline and the Kyaukphyu port with his Chinese counterpart Xi Jinping, as Beijing pushed to revive a project that had stalled since its inception in 2009.
While the studies are expected to take up to 15 months and have not yet started, CITIC has asked Burma to finalize contract terms by the end of this year so that the construction can start in 2018, said Soe Win, who leads the Burma management committee of the zone.
Although large-scale land demarcation for the project has not yet started, 26 families have been displaced from farmland due to acquisitions that took place in 2014 for the construction of two dams, according to land documents and the land owners. Experts say this violates Burma's environmental laws.
"Carrying out land acquisition before completing environmental impact assessments and resettlement plans is incompatible with national law," said Sean Bain, Burma-based legal consultant for human rights watchdog International Commission of Jurists.
But villagers in Kyaukphyu say they fear the project would not contribute to the development of the area because the operating companies employ mostly Chinese workers.
Petrochina did not respond to requests for comment. In a recent report it said Burma citizens made up 72 percent of its workforce in the country overall and it would continue to hire locally.


I created this recipe for a blog event (IMBB #15). It's a nice starter and I like the colours :-) For the mousses: Peel the asparagus spears below the buds, cut off the ends and cut the spears into pieces. Put the peels in a small saucepan, add butter, salt and sugar and water to cover, bring to a boil. Cook for 20 minutes, then strain through a sieve set over a bowl, discarding the peels. Put the liquid back into the bowl. Soak the gelatin sheets in a bowl with cold water. Cook the asparagus in the stock, removing the tips with a slotted spoon when they are just tender and set aside. The rest of the asparagus should be really soft. Remove from the liquid and puree. Pass through a sieve, add salt to taste and melt 3 sheets of gelatin in the still hot asparagus puree. Now cook the broccoli in the stock until soft, puree, add salt and pepper to taste and mix with the minced parsley. Stir in the rest of the soaked gelatin sheets. When both purees are beginning to set, whip the cream and separately fold into the purees. Rinse ramekins with cold water, then divide white asparagus puree among them, cover with green broccoli puree. Chill for at least 4 hours, preferably over night. For the vinaigrette: Trim and finely chop the scallion into fine slices. Cut radishes in slices holding them together, then turn 90 degrees and slice again. Cut reserved asparagus tips diagonally in slices. Make a vinaigrette from vinegar, sugar, salt, pepper and oil, toss with scallions and radishes. To unmold and serve, carefully dip bottom of each ramekin in a bowl of hot water briefly. Run a thin knife around edge of each ramekin to loosen it from the inside of the bowl and invert the mousse onto the plate, carefully lift off ramekin. Divide vinaigrette around the mousse and sprinkle with cress and freshly ground black pepper. Note: if don't like it jelly-like, use less gelatin.


text:
Baron de Sigognac is an Armagnac brand produced by the Domaine de Bordeneuve company.

Awards
 Craft Armagnac Producer of the Year 2018, 2019, 2020 & 2021
 Best Artisanal Armagnac of the Year, 2019 & 2020: Baron de Sigognac 10 Ans d'Âge Excellence
 Best Craft Armagnac collection 2021: Baron de Sigognac
 Best Independent Craft Distillery South-West France 2021 (EU Business News Initiative Awards).
 Beverage Testing Institute of Chicago
 International Spirits Challenge of London
 International Wine & Spirit Competition of London
 Bruxelles Competition

External links
 Armagnac Baron de Sigognac
 Eaux-de-vie from France

Brandies
Armagnac

redpajama_set_name: RedPajamaWikipedia


text:
Q: Disable link using javascript I have following HTML and would like to disable the link using javascript.

Install

The JavaScript I am using are :
  document.getElementById("uc_ii_lnkInstall").disabled = true;

However , it does not work , I could still click this this link after I have disabled the link using the above javascript.I look at the html , it does not seem to have the disable attribute in the a tag.Can anyone help me to explain this please?

A: document.getElementById("uc_ii_lnkInstall").onclick = function() { return false; };

The return value of false in the old-style event handler prevents the default action (i.e. loading the javascript: URL).
If you want to gray out the image link, you would also need to swap out the image's src URL with one pointing to a grayed-out version of the icon and change the text's color using .style.color = "gray";.

A: I don't think the 'disable' attribute will work on links, it work mostly on form elements such as inputs, textarea, button, etc.
But as @idealmachine said normal links  can be disabled by returning false 'return false' in javascript/jquery.

A: For example:
let link_example = document.querySelector("#top-content .view-content a");
link_example.removeAttribute("href");

A: Here is a short and easy way to disable a link.
My link is disabled

redpajama_set_name: RedPajamaStackExchange


Everybody talks about the influence of social media on elections, and how sites like Facebook and Twitter customize what you see. But when it comes to election campaigns, email remains the networking tool of choice for learning about constituents—and rounding up financial contributions.
While Facebook and Twitter were used to drive engagement, the real money in political donations literally comes from email solicitations, according to a study on President Barack Obama's use of technology in his campaigns for the highest office.
"Obama's most successful fundraising email [of the 2012 campaign]? The subject heading was 'hey,' all lowercase," says Will Conway, the director of politics and advocacy at political-campaign tech advisory firm NationBuilder. "What 2012 did was introduce the concept of iterating. In 2016, people have been iterating emails and donation landing pages for years. It's actually becoming manipulative," he says.
Savvy political campaigns should use emails to learn about constituents, Conway said. For example, they should address recipients by name in emails, but they shouldn't ask for money from someone who told them two days before that he can't afford to send his kids to college.
Although Facebook is the most popular social network, and Twitter is heavily used in certain communities, email remains the most important means of electronic communication to date. It's the one access point nearly everybody who uses the Internet has, and so it's the most reliable way for political campaigns to reach their target audiences. More than that, though, email is often the keystone by which campaigns can connect pieces of information on their constituents collected across multiple databases.
According to the Center for Responsive Politics, a nonprofit that focuses on the influence of money on U.S. politics and policy, the current presidential hopefuls have raised more than $1.1 billion in donations, with two weeks to go before Election Day. Hillary Clinton's official campaign committee, which receives direct donations, has outraised Donald Trump's, $383 million to $169.5 million.
Neither the Clinton nor Trump campaigns returned requests for comment.
From Conway's perspective, Clinton is running a campaign based around organizing, while Donald Trump is running one that focuses on communicating at scale and through mass media. "They're both seeing success," he says.
The keys to the kingdom, says David Kralik, a former political consultant who worked for Republican Newt Gingrich in 2008 and 2009, are a voter's first name, last name, ZIP code, and email address. From just that information alone, he says, campaigns can create voter profiles using Census data to reveal likely ethnic demographics and income, which help campaigns better target their messaging. And better-targeted messages, he says, lead to more voter engagement and donations.
The general way that campaigns use email is as a focal point around which other data is collected, says Terry McCormick, communications director for the Massachusetts Republican party.
"Social media doesn't get you a ton" of information, he says. "It gets us interactions with our channels. If they share a post or 'like' something, that gets logged and paints a fuller picture" of your influencers, he adds, which campaigns can use to identify "who the best folks are to go to for asks," including volunteering as well as financial contributions.
Software built by Conway's NationBuilder automatically calls Facebook, Twitter, and LinkedIn when a voter email address is added to a campaign's database, and it pulls in corresponding profiles for that public email address.
As campaigns continue their push into analytics and targeted messaging, and refine how best to convince voters to donate their time and money, there will be more pressure on them to add more data to their voter lists. What's coming next, Conway says, may push the boundaries of some Federal Election Commission rules.
The next level of solicitation we can expect in future campaigns, he says, connects not only political campaigns to each other but to other like-minded organizations that are targeting the same people. While it may be acceptable for a campaign to buy another campaign's email list and voter database, it may not be legal for a campaign to sell that information to a lobbyist group.


text:
Megastar Chiranjeevi To Play A Dual Role As Twin Brothers In His Upcoming Film Acharya Koratala Siva To Direct The Film
Megastar Chiranjeevi to play a dual role as twin brothers in his upcoming film Acharya; Koratala Siva to direct the film
From the time the film Acharya got launched, there are several rumours about the story of the movie and the character that Chiranjeevi is essaying in this Koratala Siva directorial and we now hear that Chiru plays a dual role.
By Anoop Sai Bandi, July 19, 2020 18:18 IST
After the success of Sye Raa Narasimha Reddy, Megastar Chiranjeevi is now working for his next film Acharya. This movie is being directed by Koratala Siva. If the latest grapevine is anything to go by, Chiranjeevi is playing a dual role in this movie. It seems that he is playing the roles of twin brothers in the film.
According to the sources, one of the roles will be of a college lecturer. Another one will be of a family man. It is already known that his son Ram charan is essaying a key role in the movie. Charan's character will be a college student. Chiru's role will be mentoring Charan's character in the film. Kajal Aggarwal is playing the female lead role in it. This is her second film with Chiru, after the 2017 action drama Khaidi No:150.
The shooting of Acharya is currently in the midway stages. The shoot is currently on hold due to the ongoing coronavirus pandemic. It will resume once the situation gets back to a normal state. Mani Sharma is composing the music of this movie. Thiru is handling the cinematography of it. Acharya is being produced jointly by Ram Charan and Niranjan Reddy under their respective banners Konidela Production Company and Matinee Entertainments. The makers are planning to release this film during the Sankranthi festive season of 2021. After this film, Chiru might do a project with director Bobby.
ALSO READ: Antariksham actor Rahman to play the baddie in Megastar Chiranjeevi's Lucifer remake; Reports in media confirm the same
Ram Charan Megastar Chiranjeevi Koratala Siva Kajal Aggarwal Niranjan Reddy
Rajasekhar And Shivani Rajasekhar Join Hands For Shekar
Composer Thaman Tests Negative For Covid-19
After Mahesh Babu And Thaman, Keerthy Suresh Tests Covid Positive
Covid Positive Lakshmi Manchu Talks About Her Symptoms And The Struggle Of Isolation
Siddharth Apologises To Saina Nehwal For His Insensitive Joke
Trisha Tests Positive For Covid-19
Fahadh Faasil Talks About His Role In Pushpa: The Rise
Mahesh Babu And Thaman Test Positive For Covid-19 After Meeting In Dubai


Groups marked with an * are open to the public. Contact those groups if you are interested and would like to participate in their program at Wildacres Retreat.
The "it was a dark and stormy night pottery guild" will meet for their 10th Annual Fall Pottery Retreat. Similar to the Summer version, both emerging and established potters will spend a week of "throwing their life away" as they learn new techniques and refocus on weaker areas. They will use the wheel and hand building to create both functional and artistic pieces. They will fire Sagger, Raku and Cone 10 gas reduction firing methods under the watchful eye of instructor Gary Lee to finish their work.
This Retreat is open to all potters. Contact Rising Sun Pottery for information.
Eastern Federation of Mineralogical and Lapidary Societies The Eastern Federation has enjoyed holding workshops at Wildacres for the past 45 years. During the week-long sessions, we offer participants of member clubs the opportunity to take classes in gem cutting, jewelry making and various other aspects of the earth science hobby. The sessions also feature prominent speakers and field trips as well as other interesting activities.
Our weekend retreat brings together oncology nurses from throughout the southeast. This will be our 21st annual retreat, with the last thirteen being at Wildacres. In addition to having a speaker and offering continuing education credits, we offer yoga, massage, and evening entertainment. Our goal is to give attendees an opportunity to relax, rejuvenate, and network with other nurses. For more information, please contact Pearl Abernathy.
A.R.E. Members' Retreat at Wildacres: Edgar Cayce's Association for Research and Enlightenment, Inc. (A.R.E.®), is a not-for-profit organization founded in 1931 by Edgar Cayce (1877-1945), to research and explore transpersonal subjects such as holistic health, ancient mysteries, personal spirituality, dreams and dream interpretation, intuition, philosophy and reincarnation. This year will be the 33rd Annual retreat at Wildacres. The Triangle Area A.R.E. Team (including Raleigh, Chapel Hill, and Durham, NC) currently facilitates the headquarters retreat for A.R.E. members and guests. Attendees hail from various locations including (but not limited to) NC, TN, GA, FL, VA and Canada!
For more information about this year's retreat, including online registration, please visit the A.R.E. website.
MUSIC FOR PEOPLE is dedicated to re-vitalizing your music-making and promoting music as a means of self-expression. We welcome everyone - regardless of musical experience. Maximum 30 folks for this event.
The 16th annual Carolinas WPA fall conference brings together writing program administrators, writing center administrators, and interested faculty and students to participate in small and large group discussions about current issues facing WPAs across the Carolinas. For more information, please contact us via email.
The SFMS sponsors four Gem, Jewelry and Mineral workshops each year. Two of these workshops are held at Wildacres. This is our 42nd year of Wildacres workshops. Our classes this year include some traditional classes such as Advanced Casting, Beginning Chain/Fusing, Cold Connections, Intro to Gem ID, Metal Clay, Stone Inlay, Electro-Etching/Wood Inlay, and Silver 1. All instructors are volunteers who are not paid for the highly skilled and professional experience that they bring to the workshops.
Our workshop website SFMSworkshops.com contains schedules, class descriptions, instructor bios, registration forms, and the latest information on class availability.
We look forward to seeing you at one of our workshops this year. They are really a lot of fun and the education opportunities are excellent.
Using slabs, pinch and coil methods, beginning to advanced students will make pieces with a flare of decorative sculptural embellishments. These items can be functional or simply for decorative use. Demonstrations include small wall ornaments, plates and bowls.
Don Pedi has been playing the dulcimer since 1969. He's been practicing T'ai Chi Ch'uan and related healing and meditation arts since 1971. A gifted player and teacher, Don shares his knowledge in a relaxed, friendly, and non-competitive manner, creating an atmosphere conducive to everyone learning at their own pace. All levels of experience are welcomed. Bruce Greene will be joining Don for the Saturday night concert. Visit Don's website for details and a complete workshop schedule.
Since 1992, a group of Gardner-Webb University faculty has gathered at Wildacres for a fall weekend to write, read, and talk about Writing across the Curriculum. Collaborative, active examination—in the magical atmosphere of Wildacres Retreat—of how to use writing to learn and how to improve students' (and faculty's) ability to write in their disciplines has contributed significantly to the improvement of teaching and learning at Gardner-Webb. The retreat is open only to Gardner-Webb full-time and part-time faculty.
Hands on Pottery Workshop. Plan on a week of learning and exploring, focusing on drinking and pouring vessels: mugs, goblets, sake bottles, teapots, etc.
This watermedia class for painters of all levels teaches techniques for producing creative and exciting works of art. Learn to express yourself in an entirely new way. Some collage techniques with rice or other oriental papers will be included. Join us for a fun and creative adventure. For more information, please contact Billie Shelburn.
This magical art form reveals its mystery while we learn to break the rules and resurrect those old ceramic vessels, shards, or found items. In this class we will be creating a mosaic for home or garden based on the theme of Altars, Temples and Shrines.
This year will mark NAMA's 22nd year of celebrating our regional foray at Wildacres. We continue to be excited about the impressive collection of fungal data we have gathered over the years, with new records every year. We expect that to continue. We look forward to seeing old friends again, and welcoming new attendees to the foray. We will spend our days exploring and collecting fungi in areas along the Blue Ridge Parkway and Mount Mitchell, and then examining and cataloging our finds in the pottery shed with the aid of foray participants. Dr. Brandon Matheny, Associate Professor at University of Tennessee-Knoxville, will serve as chief mycologist, with support from other mycologists and our gifted amateurs. Evening programs are also planned.
This foray is limited to NAMA membership.
See our website for additional details.
If you are curious about your own spiritual path and the stories and experiences of others, then join us to explore the holiness of the ordinary in our lives. This shared experience offers space to see and make sense of one's life and experience through discussion, writing exercises, drawing and reading with the intent of producing a short spiritual autobiography. Perhaps you seek continuity between your inner world and the outer world, between your past self and who you are now, or between what you claim to believe and how you live. Perhaps you sense a power beyond yourself that influences and gives greater meaning to your life. It is with this intention, that we write our stories. Contact Kathleen Moloney-Tarr.
The East Tennessee Chapter of the PMC Guild has a mission to gather local PMC artisans of all skill levels and interests together in a creative atmosphere to provide education, share knowledge, encourage and inspire each other, and advance our artistic development. We are an informal group dedicated to sharing our passion for all types of metal clay through good fun, food, and fellowship. We do this by creating an open environment in monthly meetings where we can share ideas and technical information, as well as by hosting demonstrations, workshops and retreats for our members.
Join us for a week in the Blue Ridge Mountains during beautiful peak color season. This art/yoga therapy retreat has class options for everybody. This week includes all lodging, meals, classes, yoga and entertainment. Just bring yourself and an open mind.
Art therapist Micah Goguen MA will lead a class on Hand building in Clay: Face Planters; Artist Brenda Pinnick will lead a class in Painting: Capturing Nature; Yoga provided daily by Pegi Vaughn of Breathe Studio in Forsyth. We will also have a special drawing workshop by Koreloy McWhirter who is a local artist and printmaker. She and her husband Bruce Greene will also offer live musical entertainment that represents the Appalachian heritage.
Massage service offered by Rachel Swinney.
Ours is a group that meets regularly to discuss books on topics we find relevant to today's society. If nothing else, the retreat promises to encourage open dialogue and fresh thinking. This meeting is not open to the public.


text:
Q: Changing a Sum to Closed Form Okay so I have the probability of an event as being equal to
$$P_=\left( \frac 78\right)^{i-1}\times \frac 19\times \left(\frac {14}{15}\right)^{n-i}$$
And I'm wondering how if at all I can translate this equation into the form $\sum_{i=1}^{n}P$. Or in other words, I'm wondering if generally we can get all the $n$ terms on one side to get a cleaner easier to work with equation.
If you have any tips or ideas, they would be very appreciated!

A: First you need to separate everything which doesn't contain $i$:
$$\left( \frac 78\right)^{i-1} \frac 19 \left(\frac {14}{15}\right)^{n-i}=\frac19 \cdot \frac87 \left( \frac{14}{15} \right)^n  \left( \frac 78 \times \frac{15}{14} \right)^i$$
$$\left( \frac 78 \times \frac{15}{14} \right)^i=\left( \frac{15}{16} \right)^i$$
Now since we have a geometric sum (and remembering Donald Splutterwit comment):
$$\sum_{i=1}^n \left( \frac{15}{16} \right)^i=\frac{\frac{15}{16} \left(1- \left( \frac{15}{16} \right)^n \right)}{1-\frac{15}{16}}=15 \left(1- \left( \frac{15}{16} \right)^n\right)$$
Finally:
$$\sum_{i=1}^n \left( \frac 78\right)^{i-1} \frac 19 \left(\frac {14}{15}\right)^{n-i}=\frac{40}{21}  \left( \frac{14}{15} \right)^n \left(1- \left( \frac{15}{16} \right)^n\right)=$$

$$=\frac{40}{21} \left(\left( \frac{14}{15} \right)^n- \left( \frac{7}{8} \right)^n\right)$$

You can check for several values of $n$ to make sure this formula holds.
Comment: notice that $\frac{7}{8}=\frac{14}{16}$ and $\frac{14}{15}$ are very close.
If you want, try to tell how does the answer depend on $n$ and why?

I'm sure you can also write the general closed form for:
$$\sum_{i=1}^n x^i y^{n-i}$$


text:
Genocide and Intervention
The Living War: World War I
The Essence of Ethics
Rwandan refugees, July 25, 1994. CREDIT: United Nations Assistance Mission for Rwanda (CC)
In focusing on issues concerning ethics and war, Carnegie Council examines the root causes of genocide and steps for prevention. Our materials voice the opinions of leaders on the ground: those fighting for justice in Serbia and during the Rwandan genocide, former prosecutors in the International Criminal Court, executives from organizations concerning genocide prevention and memory, and more.
Global Ethics Corner: This short, two minute multimedia educational series examines political, economic, environmental, and philosophical issues from an ethical perspective. It challenges the viewer to analyze social studies phenomena and respond thoughtfully.
This series is great for high school "Do Now" hook writing exercises and accompanying conversations, argumentative writing, and debates. Transcripts are available for students to annotate or for classrooms withut multimedia systems.
Short Expert Videos: These short, two to six-minute video clips from academic experts and prominent leaders feature discussions on politics, economics, the environment, and philosophy.
These primary and secondary sources make great complements to lectures and readings. They enable the student to gain a deeper understanding and explore different positions. It will work well in a college-bound high school or college classroom as well as in the flipped classroom.
Lest We Forget: The 20th Anniversary of the Rwandan Genocide: As we remember this
tragedy when so many innocent Rwandans died, we must examine why genocide occurs, and learn how to prevent such atrocities from happening again. Are we ignoring ongoing genocides today? Are the victims and their families receiving justice? These resources provide a guide not only to the past, but also to the present and future.
An Ambassador's Reflections on a Bloodbath by Thomas Patrick Melady: Everyone knows of the 1994 genocide in Rwanda, when Hutus massacred Tutsis. But few have heard of the 1972 genocide in neighboring Burundi, when Tutsis slaughtered 80,000-210,000 Hutus. U.S. Ambassador Melady was an eyewitness. In this 1974 article, he discusses Burundi and other countries where hostile groups live side by side.
Ethics on Film: Discussion of "Hotel Rwanda" Based on the true story of a Rwandan hotel manager who saved the lives of over 1,200 refugees during the 1994 genocide, this film points blame at the international community and the UN for doing almost nothing to intervene.
The Problems of Doing Good: Somalia as a Case Study in Humanitarian Intervention (Case Study Series)
Why was Somalia selected for intervention, when so many areas are in crisis? The realist argues that the U.S. must be selective; the globalist that global order and standards are essential to national interest (1997).
A Problem from Hell: America and the Age of Genocide by Samantha Power
Carnegie Council lecture
Shake Hands with the Devil: The Failure of Humanity in Rwanda by Romeo Dallaire
All the Missing Souls: A Personal History of the War Crimes Tribunals by David Scheffer
Teaching about Genocide: Issues, Approaches, and Resources by Samuel Totten
Materials Designed for Educators:
Crisis Guide: Darfur (CFR)
Timeline: Leaders Facing Justice (CFR)
Facing History and Ourselves
United States Holocaust Memorial Museum (Genocide Section)
Watchers of the Sky


text:
Q: Compiling for VxWorks I realize this may be a really dumb question.  Please humor me:
True or False: The only way to compile a program to run on a VxWorks platform is to purchase a development environment like Tornado or Workbench from WindRiver.
(I'm looking for an free/open-source solution to compile for a VxWorks platform.)

A: Outside of an academic license (which would use a VxWorks installation anyway), there is not any way to legally compile your code for a vxWorks platform.
Technically, you CAN obtain the GNU toolchain used to compile code for VxWorks.
The issue you will run into is that you won't have access to the header files necessary for compiling your code or the libraries to link against.

A: One can use a generic GNU cross-compiler to generate ELF files, and load them onto a running VxWorks system using the ld command. However, I don't recommend it for anything beyond proof-of-concept or initial experimentation -- the VxWorks libraries and Wind River's superb documentation of them are both necessary.
On the development host:
powerpc-elf-eabi-gcc -c foo.c

Then on the target-resident shell, that has mounted a filesystem from the development host (for example, over NFS):
-> ld < foo.o
-> main()

(Where the function main() comes from foo.c)

A: Since VxWorks is proprietary, they made it so you need their tools (Workbench/Tornado), which they supply, in order to develop for their OS.


Wicking action to keep your feet dry - Great for all sports and fitness activities.Colored Coolmax Socks are a short ankle sock that is a perfect blend of style, comfort and performance. Color blocking makes them easy to coordinate with any apparel. Made with a mix of moisture wicking Coolmax(TM) to draw moisture away form the foot with knitted in ruggedness with nylon and spandex yarns for durability and excellent stretchy fit, these socks are a great addition to your fitness wardrobe.
Also available Coolmax Sock in both solid black or solid white. Machine Wash, normal temperature, no bleach, tumble dry.
CoolMax - by Invista, is a tetra - channel polyester, which pulls, or "wicks", moisture away from your skin to the outer layer of the fabric. COOLMAX fabric enables the wearer to improve personal performance. It allows consumers to perform at their optimum for longer because it keeps bodies cool, dry and comfortable. As a result, the fabric can help improve focus and enhance endurance. Coolmax is the brand for high achievers who never settle for the regular polyester. It is used for high design and technically engineered clothing. COOLMAX fabric is a brand for consumers on the cutting edge.
Close-up of four-channel fiber used in CoolMax fabric. Channels speed moisture to outer surface of fabric.
Very comfortable. Breathable and socks up moisture.
Cool and comfortable. Well made.
Color blocks add fun to a high quality.
Love the softness and comfortable feel to these socks.
Never thought I'd pay $7 for a pair of socks.
They are some very nice socks. I was just thinking "well, I'll get the free shipping if I get the socks, so why not?"
I will definitely be buying a few more pairs.
They're well made and feel really good.
Good, solid sock at reasonable price - made in USA (which is good, whether you realize it or not).
Super comfy, nice fit, don't shrink, stay up and a great price.
Got a couple of pairs for cycling, they are so comfortable I ordered 6 black pair to go to work in.
Great socks, but they are really small for size XL. Based upon how small the XL is, I suggest you buy a size larger than you think you need.
Very good quality product, nicely light and cool. Very comfortable to wear.
Very comfortable socks. They fit great, look great, and the price was very reasonable. I'd buy again.
I bike in a suburban/urban environment. Based upon my experience, the more high visibility you can work into what you wear the better. These socks are very comfortable. I bought another pair several years ago so I know they hold up well.
I have been using a thinner sock and initially thought they might be be uncomfortable and make the shoe to tight. Not so. They fit well and are very comfortable.
These sock have a nice cushion feel to them. I ride with sandals and clipless peddles and they work great.
For the price you can't beat this sock. It's just as good as other brands "special bike socks" that cost 2 or 3 times as much. The only question I have is how long it last, but it seems to be well made and should be comparable to other synthetic fabric socks.
Got these for cycling but now husband also wears for tennis. Loves them. They fit, wick away and look good.
Hove used these for several years and have found them to be durable and a good value.
Enough cushioning for just about any biking style.
Excellent socks, comfortable, fit right, feel great on short or long rides.
Great socks, I'm a size 12, I ordered large, fit is great. ATD is no Amazon, slow on shipping, the only reason I didn't give them 5 star.
These are nice if you like thin socks. I have ordered several more pairs.


text:
It is unknown which route was taken for the exodus. It could have been the route by Twin Mountains or the route along Black Beaver Road. Because Chisholm had a trading post at Council Grove and he returned there to Indian Territory at the end of the war with goods, probably via a trail which marked by the Black River Route, it has been assumed this was the route taken. Either way it is clear the confederates moved the "loyals" to the furthest west point of Indian Civilization. Pleading for reinforcements were going on at Beaver Creek after the Yahola exodus.
A spokesman for the "loyal" Creeks spoke at the end of the war with the US government explaining that they tried to keep their safety by moving west. Eight years after this a US agent to the Cherokees informed the commissioner of Indian Affairs "They tried to avoid a fight, to make their way peacefully to the Union army in Kansas by a far western route."
In the late 1930's elderly Creeks stated there was a group settled at the mouth of the Deep Fork. James Scott specifically stated there was an immobilization camp there and went on to explain how two camps merged and eventually several camps filled the main camp. Again and again there were statements made that meetings had been set up to make and keep peace, although these stories can't all be believed.
Stories have it that one of the camps had been moved above the "Big Pond" near the head of Big Fork. The "Big Pond" was more south, so it was sure the referenced was to "The Little Deep Fork" for there have been statements made that others had joined this group at the mobilization camp which was at a location called "Slick."
Yohola's camp was found but deserted. There was however a trail left which was in a north westward direction that led to new camp at a place by "Round Mountains" in Cherokee country. Now "Twin Mountains" could be a probable site for the battle. The land had been surveyed and followed the present day Payne-Pawnee County line.
When a full report was made of this, finding the abandoned camp and then locating the new camp, it was never revealed exactly where it all took place. From reading what was written at the time and following locations it seems the route was more north than northwest.
With all of this being on the Payne-Pawnee County line, I can see how stories could have developed from young people who lived in the area. I grew up thinking there was Cherokee blood carried in my father's line, which at this point is unproven. I am anxious to read where my relative comes into the story, whether it is important or not, and to again find out the story of the Cimarron that my father used to tell me. Of course, at the time I was told the story it didn't mean much to me. I have notes on it somewhere (which I will try to locate), but I plan to talk with Dad about this again also.
Cimarron Civil War Oklahoma Pawnee Payne Yohola