text:
using namespace std;
using namespace folly;

namespace relevanced {
namespace persistence {
using wangle::FutureExecutor;
using wangle::CPUThreadPoolExecutor;
using models::WordVector;
using models::ProcessedDocument;
using models::Centroid;
using util::UniquePointer;

Persistence::Persistence(
  UniquePointer<SyncPersistenceIf> syncHandle,
  shared_ptr<FutureExecutor<CPUThreadPoolExecutor>> threadPool
) : syncHandle_(std::move(syncHandle)), threadPool_(threadPool) {}

Future<bool> Persistence::doesDocumentExist(string id) {
  return threadPool_->addFuture([this, id]() {
    return syncHandle_->doesDocumentExist(id);
  });
}

Future<Try<bool>> Persistence::saveDocument(
    shared_ptr<ProcessedDocument> doc) {
  return threadPool_->addFuture([this, doc]() {
    return syncHandle_->saveDocument(doc);
  });
}

Future<Try<bool>> Persistence::saveNewDocument(
    shared_ptr<ProcessedDocument> doc) {
  return threadPool_->addFuture([this, doc]() {
    return syncHandle_->saveNewDocument(doc);
  });
}

Future<Try<bool>> Persistence::deleteDocument(string id) {
  return threadPool_->addFuture([this, id]() {
    return syncHandle_->deleteDocument(id);
  });
}

Future<vector<string>> Persistence::listAllDocuments() {
  return threadPool_->addFuture([this]() {
    return syncHandle_->listAllDocuments();
  });
}

Future<vector<string>> Persistence::listUnusedDocuments(size_t count) {
  return threadPool_->addFuture([this, count]() {
    return syncHandle_->listUnusedDocuments(count);
  });
}

Future<vector<string>> Persistence::listDocumentRangeFromId(
    string documentId, size_t count) {
  return threadPool_->addFuture([this, documentId, count]() {
    return syncHandle_->listDocumentRangeFromId(documentId, count);
  });
}

Future<vector<string>> Persistence::listDocumentRangeFromOffset(
    size_t offset, size_t count) {
  return threadPool_->addFuture([this, offset, count]() {
    return syncHandle_->listDocumentRangeFromOffset(offset, count);
  });
}

Future<Try<shared_ptr<ProcessedDocument>>> Persistence::loadDocument(
    string id) {
  return threadPool_->addFuture([this, id]() {
    return syncHandle_->loadDocument(id);
  });
}

Future<bool> Persistence::doesCentroidExist(string id) {
  return threadPool_->addFuture([this, id]() {
    return syncHandle_->doesCentroidExist(id);
  });
}

Future<Try<bool>> Persistence::createNewCentroid(string id) {
  return threadPool_->addFuture([this, id]() {
    return syncHandle_->createNewCentroid(id);
  });
}

Future<Try<bool>> Persistence::deleteCentroid(string id) {
  return threadPool_->addFuture([this, id]() {
    return syncHandle_->deleteCentroid(id);
  });
}

Future<Try<bool>> Persistence::saveCentroid(
    string id, shared_ptr<Centroid> centroid) {
  return threadPool_->addFuture([this, id, centroid]() {
    return syncHandle_->saveCentroid(id, centroid);
  });
}

Future<Try<shared_ptr<Centroid>>> Persistence::loadCentroid(
    string id) {
  return threadPool_->addFuture([this, id]() {
    return syncHandle_->loadCentroid(id);
  });
}

Future<Optional<util::UniquePointer<Centroid>>> Persistence::loadCentroidUniqueOption(
    string id) {
  return threadPool_->addFuture([this, id]() {
    return std::move(syncHandle_->loadCentroidUniqueOption(id));
  });
}

Future<vector<string>> Persistence::listAllCentroids() {
  return threadPool_->addFuture([this]() {
    return syncHandle_->listAllCentroids();
  });
}

Future<vector<string>> Persistence::listCentroidRangeFromOffset(
    size_t offset, size_t limit) {
  return threadPool_->addFuture([this, offset, limit]() {
    return syncHandle_->listCentroidRangeFromOffset(offset, limit);
  });
}

Future<vector<string>> Persistence::listCentroidRangeFromId(
    string startingCentroidId, size_t limit) {
  return threadPool_->addFuture([this, startingCentroidId, limit]() {
    return syncHandle_->listCentroidRangeFromId(startingCentroidId, limit);
  });
}

Future<Try<bool>> Persistence::addDocumentToCentroid(
    string centroidId, string docId) {
  return threadPool_->addFuture([this, centroidId, docId]() {
    return syncHandle_->addDocumentToCentroid(centroidId, docId);
  });
}

Future<Try<bool>> Persistence::removeDocumentFromCentroid(
    string centroidId, string docId) {
  return threadPool_->addFuture([this, centroidId, docId]() {
    return syncHandle_->removeDocumentFromCentroid(centroidId, docId);
  });
}

Future<Try<bool>> Persistence::doesCentroidHaveDocument(
    string centroidId, string docId) {
  return threadPool_->addFuture([this, centroidId, docId]() {
    return syncHandle_->doesCentroidHaveDocument(centroidId, docId);
  });
}

Future<Try<vector<string>>> Persistence::listAllDocumentsForCentroid(
    string centroidId) {
  return threadPool_->addFuture([this, centroidId]() {
    return syncHandle_->listAllDocumentsForCentroid(centroidId);
  });
}

Future<Optional<vector<string>>> Persistence::listAllDocumentsForCentroidOption(
    string centroidId) {
  return threadPool_->addFuture([this, centroidId]() {
    return syncHandle_->listAllDocumentsForCentroidOption(centroidId);
  });
}

Future<Try<vector<string>>> Persistence::listCentroidDocumentRangeFromOffset(
    string centroidId, size_t offset, size_t limit) {
  return threadPool_->addFuture([this, centroidId, offset, limit]() {
    return syncHandle_->listCentroidDocumentRangeFromOffset(
      centroidId, offset, limit
    );
  });
}

Future<Optional<vector<string>>>
Persistence::listCentroidDocumentRangeFromOffsetOption(
    string centroidId, size_t offset, size_t limit) {
  return threadPool_->addFuture([this, centroidId, offset, limit]() {
    return syncHandle_->listCentroidDocumentRangeFromOffsetOption(
      centroidId, offset, limit
    );
  });
}

Future<Try<vector<string>>>
Persistence::listCentroidDocumentRangeFromDocumentId(
    string centroidId, string documentId, size_t limit) {
  return threadPool_->addFuture([this, centroidId, documentId, limit]() {
    return syncHandle_->listCentroidDocumentRangeFromDocumentId(
      centroidId, documentId, limit
    );
  });
}

Future<Optional<vector<string>>>
Persistence::listCentroidDocumentRangeFromDocumentIdOption(
    string centroidId, string documentId, size_t limit) {
  return threadPool_->addFuture([this, centroidId, documentId, limit]() {
    return syncHandle_->listCentroidDocumentRangeFromDocumentIdOption(
      centroidId, documentId, limit
    );
  });
}

Future<Optional<string>> Persistence::getCentroidMetadata(
    string id, string metaName) {
  return threadPool_->addFuture([this, id, metaName]() {
    return syncHandle_->getCentroidMetadata(id, metaName);
  });
}

Future<Try<bool>> Persistence::setCentroidMetadata(
    string id, string metaName, string value) {
  return threadPool_->addFuture([this, id, metaName, value]() {
    return syncHandle_->setCentroidMetadata(id, metaName, value);
  });
}

Future<folly::Unit> Persistence::debugEraseAllData() {
  return threadPool_->addFuture([this](){
    syncHandle_->debugEraseAllData();
  });
}

} // persistence
} // relevanced


text:
import SyntheticUIEvent from './SyntheticUIEvent';

/**
 * @interface FocusEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var FocusEventInterface = {
  relatedTarget: null,
};

/**
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {string} dispatchMarker Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @extends {SyntheticUIEvent}
 */
function SyntheticFocusEvent(
  dispatchConfig,
  dispatchMarker,
  nativeEvent,
  nativeEventTarget,
) {
  return SyntheticUIEvent.call(
    this,
    dispatchConfig,
    dispatchMarker,
    nativeEvent,
    nativeEventTarget,
  );
}

SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);

export default SyntheticFocusEvent;

redpajama_set_name: RedPajamaGithub


text:
require 'cairo'
require 'squib/args/arg_loader'
require 'squib/args/color_validator'

module Squib
  # @api private
  module Args
    class Paint
      include ArgLoader
      include ColorValidator

      def self.parameters
        { alpha: 1.0,
          blend: :none,
          mask:  nil,
        }
      end

      def self.expanding_parameters
        parameters.keys # all of them are expandable
      end

      def self.params_with_units
        []
      end

      def initialize(custom_colors)
        @custom_colors = custom_colors
      end

      def validate_alpha(arg, _i)
        raise 'alpha must respond to to_f' unless arg.respond_to? :to_f
        arg.to_f
      end

      def validate_mask(arg, _i)
        colorify(arg, @custom_colors)
      end

    end
  end
end


text:
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)

# Set up gems listed in the Gemfile.
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require 'bootsnap/setup' if ENV['RAILS_ENV'] != 'production' || %w(1 yes true).include?(ENV['ENABLE_BOOTSNAP'])


text:
<?php
function icl_sitepress_get_capabilities() {
	return array(
		'wpml_manage_translation_management',
		'wpml_manage_languages',
		'wpml_manage_theme_and_plugin_localization',
		'wpml_manage_support',
		'wpml_manage_media_translation',
		'wpml_manage_navigation',
		'wpml_manage_sticky_links',
		'wpml_manage_string_translation',
		'wpml_manage_translation_analytics',
		'wpml_manage_wp_menus_sync',
		'wpml_manage_taxonomy_translation',
		'wpml_manage_troubleshooting',
		'wpml_manage_translation_options',
		'wpml_manage_woocommerce_multilingual',
		'wpml_operate_woocommerce_multilingual',
	);
}

function icl_get_home_url() {
    global $sitepress;
	$current_language = $sitepress->get_current_language();

	return $sitepress->language_url( $current_language );
}

// args:
// skip_missing (0|1|true|false)
// orderby (id|code|name)
// order (asc|desc)
function icl_get_languages($a='') {
    if ($a) {
        parse_str($a, $args);
    } else {
        $args = '';
    }
    global $sitepress;
    $langs = $sitepress->get_ls_languages($args);
    return $langs;
}

function icl_disp_language( $native_name, $translated_name = false, $lang_native_hidden = false, $lang_translated_hidden = false ) {
	$ret = '';

	if ( !$native_name && !$translated_name ) {
		$ret = '';
	} elseif ( $native_name && $translated_name ) {
		$hidden1 = $hidden2 = $hidden3 = '';
		if ( $lang_native_hidden ) {
			$hidden1 = 'style="display:none;"';
		}
		if ( $lang_translated_hidden ) {
			$hidden2 = 'style="display:none;"';
		}
		if ( $lang_native_hidden && $lang_translated_hidden ) {
			$hidden3 = 'style="display:none;"';
		}

		if ( $native_name != $translated_name ) {
			$ret =
				'' .
				$native_name .
				' (' .
				$translated_name .
				')';
		} else {
			$ret = '' . $native_name . '';
		}
	} elseif ( $native_name ) {
		$ret = $native_name;
	} elseif ( $translated_name ) {
		$ret = $translated_name;
	}

	return $ret;
}

function icl_link_to_element($element_id, $element_type='post', $link_text='',
        $optional_parameters=array(), $anchor='', $echoit = true,
        $return_original_if_missing = true) {
    global $sitepress, $wpdb, $wp_post_types, $wp_taxonomies;

    if ($element_type == 'tag')
        $element_type = 'post_tag';
    if ($element_type == 'page')
        $element_type = 'post';

    $post_types = array_keys((array) $wp_post_types);
    $taxonomies = array_keys((array) $wp_taxonomies);

    if (in_array($element_type, $taxonomies)) {
        $element_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id= %d AND taxonomy='{$element_type}'",
                        $element_id));
    } elseif (in_array($element_type, $post_types)) {
        $element_type = 'post';
    }

    if (!$element_id)
        return '';

    if (in_array($element_type, $taxonomies)) {
        $icl_element_type = 'tax_' . $element_type;
    } elseif (in_array($element_type, $post_types)) {
        $icl_element_type = 'post_' . $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$element_id}'");
    }

    $trid = $sitepress->get_element_trid($element_id, $icl_element_type);
    $translations = $sitepress->get_element_translations($trid,
            $icl_element_type);

    // current language is ICL_LANGUAGE_CODE
    if (isset($translations[ICL_LANGUAGE_CODE])) {
        if ($element_type == 'post') {
            $url = get_permalink($translations[ICL_LANGUAGE_CODE]->element_id);
            $title = $translations[ICL_LANGUAGE_CODE]->post_title;
        } elseif ($element_type == 'post_tag') {
            list($term_id, $title) = $wpdb->get_row($wpdb->prepare("SELECT t.term_id, t.name FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='post_tag'",
                            $translations[ICL_LANGUAGE_CODE]->element_id),
                    ARRAY_N);
            $url = get_tag_link($term_id);
            $title = apply_filters('single_cat_title', $title);
        } elseif ($element_type == 'category') {
            list($term_id, $title) = $wpdb->get_row($wpdb->prepare("SELECT t.term_id, t.name FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='category'",
                            $translations[ICL_LANGUAGE_CODE]->element_id),
                    ARRAY_N);
            $url = get_category_link($term_id);
            $title = apply_filters('single_cat_title', $title);
        } else {
            list($term_id, $title) = $wpdb->get_row($wpdb->prepare("SELECT t.term_id, t.name FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='{$element_type}'",
                            $translations[ICL_LANGUAGE_CODE]->element_id),
                    ARRAY_N);
            $url = get_term_link($term_id, $element_type);
            $title = apply_filters('single_cat_title', $title);
        }
    } else {
        if (!$return_original_if_missing) {
            if ($echoit) {
                echo '';
            }
            return '';
        }

        if ($element_type == 'post') {
            $url = get_permalink($element_id);
            $title = get_the_title($element_id);
        } elseif ($element_type == 'post_tag') {
            $url = get_tag_link($element_id);
            $my_tag = &get_term($element_id, 'post_tag', OBJECT, 'display');
            $title = apply_filters('single_tag_title', $my_tag->name);
        } elseif ($element_type == 'category') {
            $url = get_category_link($element_id);
            $my_cat = &get_term($element_id, 'category', OBJECT, 'display');
            $title = apply_filters('single_cat_title', $my_cat->name);
        } else {
            $url = get_term_link((int) $element_id, $element_type);
            $my_cat = &get_term($element_id, $element_type, OBJECT, 'display');
            $title = apply_filters('single_cat_title', $my_cat->name);
        }
    }

    if (!$url || is_wp_error($url))
        return '';

    if (!empty($optional_parameters)) {
        $url_glue = false === strpos($url, '?') ? '?' : '&';
        $url .= $url_glue . http_build_query($optional_parameters);
    }

    if (isset($anchor) && $anchor) {
        $url .= '#' . $anchor;
    }

    $link = '';
    if (isset($link_text) && $link_text) {
        $link .= $link_text;
    } else {
        $link .= $title;
    }
    $link .= '';

    if ($echoit) {
        echo $link;
    } else {
        return $link;
    }
}

/**
 * @param int    $element_id                 Use term_id for taxonomies, post_id for posts
 * @param string $element_type               Use comment, post, page, {custom post time name}, nav_menu, nav_menu_item, category, post_tag, etc.
 * @param bool   $return_original_if_missing If set to true it will always return a value (the original value, if translation is missing)
 * @param null   $ulanguage_code             If missing, it will use the current language, if set to a language code, it will return a translation for that language code (or the original, if missing and $return_original_if_missing is set to true).
 *
 * @return bool|mixed|null|string
 */
function icl_object_id($element_id, $element_type='post', $return_original_if_missing=false, $ulanguage_code=null) {
    global $sitepress, $wpdb, $wp_post_types, $wp_taxonomies;

	if ( is_null( $ulanguage_code ) ) {
		$ulanguage_code = $sitepress->get_current_language();
	}

	// special case of any - we assume it's a post type
    if($element_type == 'any' && $_dtype = $wpdb->get_var($wpdb->prepare("SELECT post_type FROM {$wpdb->posts} WHERE ID=%d", $element_id))){
        $element_type = $_dtype;
    }
    //

	$cache_key_args = array_filter( array( $element_id, $element_type, $return_original_if_missing, $ulanguage_code ) );
	$cache_key      = md5( json_encode( $cache_key_args ) );
	$cache_group    = 'icl_object_id';

	$ret_element_id = wp_cache_get($cache_key, $cache_group);
	if($ret_element_id) return $ret_element_id;

    static $fcache = array();
    $fcache_key = $element_id . '#' . $element_type . '#' . intval($return_original_if_missing) . '#' . $ulanguage_code;
    if (isset($fcache[$fcache_key])) {
        return $fcache[$fcache_key];
    }

    if ($element_id <= 0) {
        return $element_id;
    }

    $post_types = array_keys((array) $wp_post_types);
    $taxonomies = array_keys((array) $wp_taxonomies);
    $element_types = array_merge($post_types, $taxonomies);
    $element_types[] = 'comment';

    if (!$element_id) {
        trigger_error(__('Invalid object id', 'sitepress'), E_USER_NOTICE);
        return null;
    }

    if (in_array($element_type, $taxonomies)) {
		$icl_element_id_prepared = $wpdb->prepare( "SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id=%d AND taxonomy=%s", array($element_id, $element_type) );
		$icl_element_id = $wpdb->get_var( $icl_element_id_prepared );
    } else {
        $icl_element_id = $element_id;
    }

    if (in_array($element_type, $taxonomies)) {
        $icl_element_type = 'tax_' . $element_type;
    } elseif (in_array($element_type, $post_types)) {
        $icl_element_type = 'post_' . $element_type;
    } else {
        $icl_element_type = $element_type;
    }

    $trid = $sitepress->get_element_trid($icl_element_id, $icl_element_type);
		if (!$trid) {
			$trid = $sitepress->get_element_trid($icl_element_id, 'tax_'.$icl_element_type);
			if ($trid) {
				$icl_element_type = 'tax_'.$icl_element_type;
			} else {
				$trid = $sitepress->get_element_trid($icl_element_id, 'post_'.$icl_element_type);
				if ($trid) {
					$icl_element_type = 'post_'.$icl_element_type;
				}
			}
		}

		if ($trid) {
			$translations = $sitepress->get_element_translations($trid, $icl_element_type, false, true, true);
		}

    if (isset($translations[$ulanguage_code]->element_id)) {
        $ret_element_id = $translations[$ulanguage_code]->element_id;

        if (in_array($element_type, $taxonomies)) {
			$ret_element_id_prepared = $wpdb->prepare( "SELECT t.term_id FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy=%s", array($ret_element_id, $element_type) );
			$ret_element_id = $wpdb->get_var( $ret_element_id_prepared );
        }
    } else {
        $ret_element_id = $return_original_if_missing ? $element_id : null;
    }

    $fcache[$fcache_key] = $ret_element_id;

	wp_cache_set($cache_key, $ret_element_id, $cache_group);

    return $ret_element_id;
}

add_filter('translate_object_id', 'icl_object_id', 10, 4);

function icl_get_current_language() {
    global $sitepress;
    return $sitepress->get_current_language();
}

function icl_get_default_language() {
    global $sitepress;
    return $sitepress->get_default_language();
}

function icl_tf_determine_mo_folder($folder, $rec = 0) {
    global $sitepress;

    $dh = @opendir($folder);
    $lfn = $sitepress->get_locale_file_names();

    while ($file = readdir($dh)) {
        if (0 === strpos($file, '.'))
            continue;
        if (is_file($folder . '/' . $file) && preg_match('#\.mo$#i', $file) && in_array(preg_replace('#\.mo$#i',
                                '', $file), $lfn)) {
            return $folder;
        } elseif (is_dir($folder . '/' . $file) && $rec < 5) {
            if ($f = icl_tf_determine_mo_folder($folder . '/' . $file, $rec + 1)) {
                return $f;
            };
        }
    }

    return false;
}

function wpml_cf_translation_preferences($id, $custom_field = false,
        $class = 'wpml', $ajax = false, $default_value = 'ignore',
        $fieldset = false, $suppress_error = false) {
    $output = '';
    if ($custom_field) {
        $custom_field = @strval($custom_field);
    }
    $class = @strval($class);
    if ($fieldset) {
        $output .= '
<fieldset id="wpml_cf_translation_preferences_fieldset_' . $id
            . '" class="wpml_cf_translation_preferences_fieldset '
            . $class . '-form-fieldset form-fieldset fieldset">'
            . '<legend>' . __('Translation preferences', 'wpml') . '</legend>';
    }
    $actions = array('ignore' => 0, 'copy' => 1, 'translate' => 2);
    $action = isset($actions[@strval($default_value)]) ? $actions[@strval($default_value)] : 0;
    global $iclTranslationManagement;
    if ($custom_field) {
        if (defined('WPML_TM_VERSION') && !empty($iclTranslationManagement)) {
            if (isset($iclTranslationManagement->settings['custom_fields_translation'][$custom_field])) {
                $action = intval($iclTranslationManagement->settings['custom_fields_translation'][$custom_field]);
            }
			$xml_override = isset($iclTranslationManagement->settings['custom_fields_readonly_config']) ? in_array($custom_field, (array)$iclTranslationManagement->settings['custom_fields_readonly_config']) : false;
            $disabled = $xml_override;
            if ($disabled) {
                $output .= '
' . __('The translation preference for this field are being controlled by a language configuration XML file. If you want to control it manually, remove the entry from the configuration file.', 'wpml') . '
';
            }
        } else if (!$suppress_error) {
            $output .= ''
                    . __("To synchronize values for translations, you need to enable WPML's Translation Management module.",
                            'wpml')
                    . '';
            $disabled = true;
        }
    } else if (!$suppress_error) {
        $output .= ''
                    . __('Error: Something is wrong with field value. Translation preferences can not be set.',
                            'wpml')
                    . '';
        $disabled = true;
    }
    $disabled = !empty($disabled) ? ' readonly="readonly" disabled="disabled"' : '';
    $output .= '
'
            . __('Choose what to do when translating content with this field:',
                    'wpml')
            . '

<input';
    $output .= $action == 0 ? ' checked="checked"' : '';
    $output .= ' id="wpml_cf_translation_preferences_option_ignore_'
            . $id . '" name="wpml_cf_translation_preferences['
            . $id . ']" value="0" class="' . $class
            . '-form-radio form-radio radio" type="radio"' . $disabled . '> ' . __('Do nothing', 'wpml') . '

<input';
    $output .= $action == 1 ? ' checked="checked"' : '';
    $output .= ' id="wpml_cf_translation_preferences_option_copy_'
            . $id . '" name="wpml_cf_translation_preferences['
            . $id . ']" value="1" class="' . $class
            . '-form-radio form-radio radio" type="radio"' . $disabled . '> ' . __('Copy from original', 'wpml') . '

<input';
    $output .= $action == 2 ? ' checked="checked"' : '';
    $output .= ' id="wpml_cf_translation_preferences_option_translate_'
            . $id . '" name="wpml_cf_translation_preferences['
            . $id . ']" value="2" class="' . $class
            . '-form-radio form-radio radio" type="radio"' . $disabled . '> ' . __('Translate', 'wpml') . '

';
    if ($custom_field && $ajax) {
        $output .= '

<input type="button" onclick="icl_cf_translation_preferences_submit(\''
            . $id . '\', jQuery(this));" style="margin-top:5px;" class="button-secondary" value="'
            . __('Apply') . '" name="wpml_cf_translation_preferences_submit_'
            . $id . '" />
<input type="hidden" name="wpml_cf_translation_preferences_data_'
            . $id . '" value="custom_field=' . $custom_field
            . '&_icl_nonce='
            . wp_create_nonce('wpml_cf_translation_preferences_nonce') . '" />';
    }
    if ($fieldset) {
        $output .= '
</fieldset>
';
    }
    return $output;
}

function wpml_cf_translation_preferences_store($id, $custom_field) {
    if (defined('WPML_TM_VERSION')) {
        if (empty($id) || empty($custom_field)
                || !isset($_POST['wpml_cf_translation_preferences'][$id])) {
            return false;
        }
        $custom_field = @strval($custom_field);
        $action = @intval($_POST['wpml_cf_translation_preferences'][$id]);
        global $iclTranslationManagement;
        if (!empty($iclTranslationManagement)) {
            $iclTranslationManagement->settings['custom_fields_translation'][$custom_field] = $action;
            $iclTranslationManagement->save_settings();
            return true;
        } else {
            return false;
        }
    }
    return false;
}

/**
 * wpml_get_copied_fields_for_post_edit
 *
 * return a list of fields that are marked for copying and the
 * original post id that the fields should be copied from
 *
 * This should be used to popupate any custom field controls when
 * a new translation is selected and the field is marked as "copy" (sync)
 *
 * @param array $fields
 *
 * @return array
 */
function wpml_get_copied_fields_for_post_edit( $fields = array() ) {
    global $sitepress, $wpdb, $sitepress_settings, $pagenow;

    $copied_cf = array('fields' => array());
    $translations = null;

    if (defined('WPML_TM_VERSION')) {

        if(($pagenow == 'post-new.php' || $pagenow == 'post.php')) {
            if (isset($_GET['trid'])){
                $post_type = isset($_GET['post_type'])?$_GET['post_type']:'post';

                $translations = $sitepress->get_element_translations($_GET['trid'], 'post_' . $post_type);

                $source_lang = isset($_GET['source_lang'])?$_GET['source_lang']:$sitepress->get_default_language();
                $lang_details = $sitepress->get_language_details($source_lang);
            } else if (isset($_GET['post'])) {
                $post_id = @intval($_GET['post']);
                $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$post_id}'");
                $trid = $sitepress->get_element_trid($post_id, 'post_' . $post_type);
                $original_id = $wpdb->get_var($wpdb->prepare("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE source_language_code IS NULL AND trid=%d", $trid));
                if ($original_id != $post_id) {
                    // Only return information if this is not the source language post.
                    $translations = $sitepress->get_element_translations($trid, 'post_' . $post_type);
                    $source_lang = $wpdb->get_var($wpdb->prepare("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE source_language_code IS NULL AND trid=%d", $trid));
                    $lang_details = $sitepress->get_language_details($source_lang);
                }
            }

            if ($translations) {
                $original_custom = get_post_custom($translations[$source_lang]->element_id);

                $copied_cf['original_post_id'] = $translations[$source_lang]->element_id;
                $ccf_note = '';
                $copied_cf['copy_message'] = $ccf_note . sprintf(__('WPML will copy this field from %s when you save this post.', 'sitepress'), $lang_details['display_name']);

                foreach((array)$sitepress_settings['translation-management']['custom_fields_translation'] as $key=>$sync_opt){
                    /*
                     * Added parameter $fields so except checking if field exist in DB,
                     * it can be checked if set in pre-defined fields.
                     * Noticed when testing checkbox field that does not save
                     * value to DB if not checked (omitted from list of copied fields).
                     * https://icanlocalize.basecamphq.com/projects/2461186-wpml/todo_items/169933388/comments
                     */
                    if( $sync_opt == 1
                            && ( isset($original_custom[$key]) || in_array( $key, $fields ) )
                    ){
                        $copied_cf['fields'][] = $key;
                    }
                }
            }
        }
    }

    return $copied_cf;

}

function wpml_get_language_information($post_id = null){
    global $sitepress;

    if(is_null($post_id)){
        $post_id = get_the_ID();
    }
    if(empty($post_id)) return new WP_Error('missing_id', __('Missing post ID', 'sitepress'));

    $post = get_post($post_id);
    if(empty($post)) return new WP_Error('missing_post', sprintf(__('No such post for ID = %d', 'sitepress'), $post_id));

    $language = $sitepress->get_language_for_element($post_id, 'post_' . $post->post_type);
    $language_information = $sitepress->get_language_details($language);

	$current_language = $sitepress->get_current_language();
	$info = array(
        'locale'                => $sitepress->get_locale($language),
        'text_direction'        => $sitepress->is_rtl($language),
        'display_name'          => $sitepress->get_display_language_name($language, $current_language ),
        'native_name'           => $language_information['display_name'],
        'different_language'    => $language != $current_language

    );

    return $info;

}

function wpml_custom_post_translation_options($type_id){
    global $sitepress, $sitepress_settings;

    $out = '

' . __('Translation',
                'sitepress') . '

';

    $type = get_post_type_object($type_id);

    $translated = $sitepress->is_translated_post_type($type_id);
    if(defined('WPML_TM_VERSION')){
        $link = admin_url('admin.php?page=' . WPML_TM_FOLDER . '/menu/main.php&sm=mcsetup#icl_custom_posts_sync_options');
        $link2 = admin_url('admin.php?page=' . WPML_TM_FOLDER . '/menu/main.php&sm=mcsetup#icl_slug_translation');

    }else{
        $link = admin_url('admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translation-options.php#icl_custom_posts_sync_options');
        $link2 = admin_url('admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translation-options.php#icl_slug_translation');
    }

    if($translated){

        $out .= sprintf(__('%s is translated via WPML. %sClick here to change translation options.%s', 'sitepress'),
            '' . $type->labels->singular_name . '', '', '');

        if($type->rewrite['enabled']){

            if($sitepress_settings['posts_slug_translation']['on']){
                if(empty($sitepress_settings['posts_slug_translation']['types'][$type_id])){
                    $out .= '

' . __('Slugs are currently not translated.', 'sitepress') . '

';
                }else{
                    $out .= '

' . __('Slugs are currently translated. Click the link above to edit the translations.', 'sitepress') . '

';
                }
            }else{
                $out .= '

' . sprintf(__('Slug translation is currently disabled in WPML. %sClick here to enable.%s', 'sitepress'),
                    '', '') . '

';
            }

        }

    }else{

        $out .= sprintf(__('%s is not translated. %sClick here to make this post type translatable.%s', 'sitepress'),
            '' . $type->labels->singular_name . '', '', '');

    }

    $out .= '

';

    return $out;

}

/**
 * Choose appropriate template file when paged and not default language
 *
 * Some fix when somebody uses 'page_on_front', set page with custom Template,
 * this page has Loop of posts. Before that, when you changed language to
 * non-default and paged, WPML looses page Template and uses index.php from theme
 *
 * @since 3.1.5
 *
 * @param string $template Template path retrieved from @see wp-includes/template-loader.php
 *
 * @return string New template path (or default)
 *
 */
function icl_template_paged($template) {
   global $wp_query, $sitepress;

   // we don't want to run this on default language
   if (ICL_LANGUAGE_CODE == icl_get_default_language()) return $template;

   // seems WPML overwrite 'page' param too early, let's fix this
   if ( $sitepress->get_setting('language_negotiation_type') == 3) {
       set_query_var('page', get_query_var('paged'));
   }

   // if template is chosen correctly there is no need to change it
   if ($template != get_home_template()) return $template;

   // this is a place where real error occurs. on paged page result we loose
   // $wp_query->queried_object. so if it set correctly, there is no need to
   // change template
   if ($wp_query->get_queried_object() != null) return $template;

   // does our site really use custom page as front page?
   if (1 > intval( get_option('page_on_front') )) return $template;

   // get template slug for custom page chosen as front page
   $template_slug = get_page_template_slug( get_option('page_on_front') );

   // "The function get_page_template_slug() returns an empty string when the value of '_wp_page_template' is either empty or 'default'."
   if ( !$template_slug ) return $template;

   $templates = array();

   $templates[] = $template_slug;

   $template = get_query_template( 'page', $templates );

   return $template;
}

// apply this filter only on non default language
add_filter('template_include', 'icl_template_paged');

function icl_language_selector() {
	global $sitepress;
	return $sitepress->get_language_selector();
}

function icl_language_selector_footer() {
	return SitePressLanguageSwitcher::get_language_selector_footer();
}

/**
 * Returns an HTML hidden input field with name="lang" and value of current language
 * This is for theme authors, to make their themes compatible with WPML when using the search form.
 * In order to make the search form work properly, they should use standard WordPress template tag get_search_form()
 * In this case WPML will handle the the rest.
 * If for some reasons the template function can't be used and form is created differently,
 * authors must the following code between inside the form
 * <?php
 * if (function_exists('wpml_the_language_input_field')) {
 *	wpml_the_language_input_field();
 * }
 *
 * @global SitePress $sitepress
 * @return string|null HTML input field or null
 */
function wpml_get_language_input_field() {
	global $sitepress;
	if (isset($sitepress)) {
		return "<input type='hidden' name='lang' value='" . $sitepress->get_current_language() . "' />";
	}
	return null;
}

/**
 * Echoes the value returned by \wpml_the_language_input_field
 *
 * @since 3.1.7.3
 */
function wpml_the_language_input_field() {
	echo wpml_get_language_input_field();
}


text:
using Machine.Specifications;

namespace ExpectedObjects.Specs
{
    class DoubleSpecs
    {
        [Subject("Doubles")]
        class when_comparing_equal_doubles_for_equality
        {
            static double _actual;
            static double _expected;
            static bool _result;

            Establish context = () =>
            {
                _expected = 111.397720540215d;
                _actual = 111.397720540215d;
            };

            Because of = () => _result = _expected.ToExpectedObject().Equals(_actual);

            It should_be_equal = () => _result.ShouldBeTrue();
        }

        [Subject("Doubles")]
        class when_comparing_unequal_doubles_for_equality
        {
            static double _actual;
            static double _expected;
            static bool _result;

            Establish context = () =>
            {
                _expected = 111.397720540215d;
                _actual = 111.397720540216d;
            };

            Because of = () => _result = _expected.ToExpectedObject().Equals(_actual);

            It should_not_be_equal = () => _result.ShouldBeFalse();
        }
    }
}


text:
package sailfish.remoting.handler;

import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.netty.util.Recycler;
import sailfish.remoting.channel.ExchangeChannelGroup;
import sailfish.remoting.constants.RemotingConstants;
import sailfish.remoting.exceptions.SailfishException;
import sailfish.remoting.executor.SimpleExecutor;
import sailfish.remoting.processors.Processors;
import sailfish.remoting.processors.RequestProcessor;
import sailfish.remoting.processors.Response;
import sailfish.remoting.protocol.Protocol;
import sailfish.remoting.protocol.RequestProtocol;
import sailfish.remoting.protocol.ResponseProtocol;
import sailfish.remoting.utils.ParameterChecker;
import sailfish.remoting.utils.StrUtils;

/**
 * @author spccold
 * @version $Id: DefaultMsgHandler.java, v 0.1 2016年11月25日 上午11:51:51 spccold Exp $
 */
public class DefaultMsgHandler implements MsgHandler<Protocol> {

	private static final Logger logger = LoggerFactory.getLogger(DefaultMsgHandler.class);

	private final Processors processors;

	public DefaultMsgHandler(List<RequestProcessor> requestProcessors) {
		ParameterChecker.checkNotNull(requestProcessors, "requestProcessors");
		processors = new Processors();
		for (RequestProcessor processor : requestProcessors) {
			processors.registerProcessor(processor.opcode(), processor);
		}
	}

	@Override
	public void handle(final ExchangeChannelGroup channelGroup, Protocol msg) {
		if (msg.request()) {
			RequestProtocol requestProtocol = (RequestProtocol) msg;
			handleRequest(channelGroup, requestProtocol);
		} else {// response
			channelGroup.getTracer().erase((ResponseProtocol) msg);
		}
	}

	private void handleRequest(final ExchangeChannelGroup channelGroup, final RequestProtocol requestProtocol) {
		int opcode = requestProtocol.opcode();
		final RequestProcessor processor = processors.findProcessor(opcode);
		//cache responseProtocol in DefaultEventExecutor's inner thread(benefit from FastThreadLocalThread)
		final ResponseProtocol responseProtocol = ResponseProtocol.newInstance();
		if (null == processor) {
			String errorMsg = String.format("request processor not found for opcode[%d]", opcode);
			doResponse(channelGroup, requestProtocol, newErrorResponse(responseProtocol, requestProtocol.packetId(), errorMsg));
			return;
		}

		Executor executor = (null != processor.executor()) ? processor.executor() : SimpleExecutor.INSTANCE;
		//cache output instance in DefaultEventExecutor's inner thread(benefit from FastThreadLocalThread)
		final DefaultOutputImpl output = DefaultOutputImpl.newInstance(channelGroup, requestProtocol, responseProtocol);
		try {
			executor.execute(new Runnable() {
				@Override
				public void run() {
					try {
						processor.handleRequest(requestProtocol.toRequest(), output);
					} catch (Throwable cause) {
						String errorMsg = StrUtils.exception2String(cause);
						doResponse(channelGroup, requestProtocol, newErrorResponse(responseProtocol, requestProtocol.packetId(),
								errorMsg));
					}
				}
			});
		} catch (RejectedExecutionException cause) {
			processor.onRejectedExecutionException(requestProtocol.toRequest(), output);
		}
	}

	static final class DefaultOutputImpl implements RequestProcessor.Output {
		private static final Recycler<DefaultOutputImpl> RECYCLER = new Recycler<DefaultOutputImpl>() {
			@Override
			protected DefaultOutputImpl newObject(Handle<DefaultOutputImpl> handle) {
				return new DefaultOutputImpl(handle);
			}
		};

		private static DefaultOutputImpl newInstance(ExchangeChannelGroup channelGroup,
				RequestProtocol requestProtocol, ResponseProtocol responseProtocol) {
			DefaultOutputImpl output = RECYCLER.get();
			output.responseProtocol = responseProtocol;
			output.channelGroup = channelGroup;
			output.requestProtocol = requestProtocol;
			return output;
		}

		private final Recycler.Handle<DefaultOutputImpl> handle;
		private ResponseProtocol responseProtocol;
		private ExchangeChannelGroup channelGroup;
		private RequestProtocol requestProtocol;

		private DefaultOutputImpl(Recycler.Handle<DefaultOutputImpl> handle) {
			this.handle = handle;
		}

		public void recycle() {
			responseProtocol = null;
			channelGroup = null;
			requestProtocol = null;
			handle.recycle(this);
		}

		@Override
		public void response(Response response) {
			if (null == response) {
				recycle();
				return;
			}
			responseProtocol.packetId(requestProtocol.packetId());
			responseProtocol.serializeType(response.getSerializeType());
			responseProtocol.compressType(response.getCompressType());
			responseProtocol.body(response.getResponseData());
			responseProtocol
					.result(response.isSuccess() ? RemotingConstants.RESULT_SUCCESS : RemotingConstants.RESULT_FAIL);
			doResponse(channelGroup, requestProtocol, responseProtocol);
			recycle();
		}
	}

	private static void doResponse(ExchangeChannelGroup channelGroup, RequestProtocol requestProtocol,
			ResponseProtocol responseProtocol) {
		try {
			channelGroup.response(responseProtocol);
		} catch (SailfishException cause) {
			logger.error(String.format("response error, RequestProtocol[%s], ResponseProtocol[%s]",
					requestProtocol.toString(), responseProtocol.toString()), cause);
		}finally {
			requestProtocol.recycle();
		}
	}

	 public ResponseProtocol newErrorResponse(ResponseProtocol instance, int packetId, String errorStack){
		 instance.packetId(packetId);
		 instance.errorStack(errorStack);
		 instance.result(RemotingConstants.RESULT_FAIL);
	     return instance;
	 }
}


text:
`kdb mount [<path> <mount point>] [<plugin> [<config>] [..]]`

- Where `path` is the path to the file the user wants to mount.
  See `kdb plugin-info resolver` for details what an absolute and relative path means.
  See also IMPORTANT below.

- `mountpoint` is where in the key database the new backend should be mounted.
  For a cascading mount point, `mountpoint` should start with `/`.
  See also IMPORTANT below.

- A list of such plugins with a configuration for each of them can be given:
  - `plugin` should be an Elektra plugin.
  - Plugins may be followed by a `,` separated list of `keys=values` pairs which will be used as plugin configuration.

## DESCRIPTION

This command allows a user to persistently mount a new _backend_.
Mounting in Elektra allows the user to mount a file into the current key database like a user may mount a partition into the current file system.
This functionality is key to Elektra as it allows users to build a global key database comprised of many different configuration files.

A backend acts as a worker to allow Elektra to interpret configuration files as keys in the central key database such that any edits to the keys are reflected in the file and vice versa.
Additionally, the user can use this command to list the currently mounted backends by running the command with no arguments.
More about mounting is explained in [elektra-mounting(7)](elektra-mounting.md).

## IMPORTANT

This command writes into the `/etc` directory to make the mounting persistent.
As such it requires root permissions.
Use `kdb file system:/elektra/mountpoints` to find out where exactly it will write to.

Absolute paths are still relative to their namespace (see `kdb plugin-info resolver`).
Only system+spec mount points are actually absolute.
Read [elektra-namespaces(7)](elektra-namespaces.md) for further information.

For cascading mount points (starting with `/`) a mount point for the namespace
`dir`, `user` and `system` is created. Each of this mount point uses a different
configuration file, either below current directory, below home directory
or anywhere in the system.
Use `kdb file <path>` to determine where the file(s) are.

## OPTIONS

- `-H`, `--help`:
  Show the man page.
- `-V`, `--version`:
  Print version info.
- `-p`, `--profile <profile>`:
  Use a different kdb profile.
- `-C`, `--color <when>`:
  Print never/auto(default)/always colored output.
- `-v`, `--verbose`:
  Explain what is happening. Prints additional information in case of errors/warnings.
- `-d`, `--debug`:
  Give debug information or ask debug questions (in interactive mode). Prints additional information in case of errors/warnings.
- `-q`, `--quiet`:
  Suppress non-error messages.
- `-i`, `--interactive`:
  Instead of passing all mounting information by parameters ask the user interactively.
- `-s`, `--strategy`:
  (experimental, use with care)
  By default mounting is rejected if the mountpoint already exists. With the strategy
  _unchanged_ you can change the behavior to be successful if _exactly_ the same config
  would be written (see #1306 why this does not always work correctly).
- `-R`, `--resolver <resolver>`
  Specify the resolver plugin to use if no resolver is given, the default resolver is used.
  See also [below in KDB](#KDB).
- `-0`, `--null`:
  Use binary 0 termination.
- `-1`, `--first`:
  Suppress the first column.
- `-2`, `--second`:
  Suppress the second column.
- `-c`, `--plugins-config <plugins-config>`:
  Add a plugin configuration for all plugins.
- `-W`, `--with-recommends`:
  Also add recommended plugins and warn if they are not available.
- `-f`, `--force`:
  Unmount before mounting: Does not fail on already existing mount points.

## KDB

- `/sw/elektra/kdb/#0/current/quiet`:
  Same as `-q`: Suppress default messages.

- `/sw/elektra/kdb/#0/current/resolver`:
  The resolver that will be added automatically, if `-R` is not given.

- `/sw/elektra/kdb/#0/current/plugins`:
  It contains a space-separated list of plugins and their configs
  which are added automatically (by default sync).
  The plugin-configuration syntax is as described above in the
  [synopsis](#SYNOPSIS).

## EXAMPLES

To list the currently mounted backends:

`kdb mount`

To mount a system configuration file using the ini format:

`kdb mount /etc/configuration.ini system:/example ini`

Print a null-terminated output of paths and backend names:

`kdb mount -02 | xargs -0n 2 echo`

To mount the /etc/file system file with two plugins with a respective configuration option each:

`kdb mount /etc/file system:/file plugin1 plugin1config=config1 plugin2 plugin2config=config2`

To mount the /etc/file system file with two plugins and setting both to be verbose:

`kdb mount -c verbose=1 /etc/file system:/file plugin1 plugin2`

To recode and rename a configuration file using Elektra:

`kdb mount recode.txt dir:/recode ni rename cut=path iconv to=utf8,from=latin1`

## SEE ALSO

- [elektra-glossary(7)](elektra-glossary.md).
- [kdb-spec-mount(1)](kdb-spec-mount.md).
- [kdb-umount(1)](kdb-umount.md).
- [elektra-mounting(7)](elektra-mounting.md).


text:
<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Vendor_EmailTest/default',
    __DIR__
);


text:
package com.oozinoz.recommendation;

import com.oozinoz.firework.Firework;

/**
 * Implement the Advisor interface by relying on the LikeMyStuff engine that
 * models a customer's preferences on his or her eariler purchases.
 */
public class ItemAdvisor implements Advisor {
    /**
     * @return Recommend a nice item for this customer, based on a model of the
     *         customer's recent spending with us.
     * @param c the customer to cross-sell
     */
    public Firework recommend(Customer c) {
        return (Firework) LikeMyStuff.suggest(c);
    }
}


text:
import { TimingSpecifier } from '../../models';
export { validate, };
declare function validate(param: TimingSpecifier): void;


text:
package com.langwen.admin.bean;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Banner entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "banner", catalog = "langwen")
public class Banner implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer zhiding;
	private String miaoshu;
	private String lianjie;
	private String tupian;
	private String faburen;
	private String fabushijian;
	private String gengxinren;
	private Timestamp gengxinshijian;
	private Timestamp zhidingshijian;

	// Constructors

	/** default constructor */
	public Banner() {
	}

	/** minimal constructor */
	public Banner(Integer zhiding, String tupian) {
		this.zhiding = zhiding;
		this.tupian = tupian;
	}

	/** full constructor */
	public Banner(Integer zhiding, String miaoshu, String lianjie,
			String tupian, String faburen, String fabushijian,
			String gengxinren, Timestamp gengxinshijian,
			Timestamp zhidingshijian) {
		this.zhiding = zhiding;
		this.miaoshu = miaoshu;
		this.lianjie = lianjie;
		this.tupian = tupian;
		this.faburen = faburen;
		this.fabushijian = fabushijian;
		this.gengxinren = gengxinren;
		this.gengxinshijian = gengxinshijian;
		this.zhidingshijian = zhidingshijian;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "zhiding", nullable = false)
	public Integer getZhiding() {
		return this.zhiding;
	}

	public void setZhiding(Integer zhiding) {
		this.zhiding = zhiding;
	}

	@Column(name = "miaoshu")
	public String getMiaoshu() {
		return this.miaoshu;
	}

	public void setMiaoshu(String miaoshu) {
		this.miaoshu = miaoshu;
	}

	@Column(name = "lianjie")
	public String getLianjie() {
		return this.lianjie;
	}

	public void setLianjie(String lianjie) {
		this.lianjie = lianjie;
	}

	@Column(name = "tupian", nullable = false)
	public String getTupian() {
		return this.tupian;
	}

	public void setTupian(String tupian) {
		this.tupian = tupian;
	}

	@Column(name = "faburen")
	public String getFaburen() {
		return this.faburen;
	}

	public void setFaburen(String faburen) {
		this.faburen = faburen;
	}

	@Column(name = "fabushijian", length = 122)
	public String getFabushijian() {
		return this.fabushijian;
	}

	public void setFabushijian(String fabushijian) {
		this.fabushijian = fabushijian;
	}

	@Column(name = "gengxinren")
	public String getGengxinren() {
		return this.gengxinren;
	}

	public void setGengxinren(String gengxinren) {
		this.gengxinren = gengxinren;
	}

	@Column(name = "gengxinshijian", length = 19)
	public Timestamp getGengxinshijian() {
		return this.gengxinshijian;
	}

	public void setGengxinshijian(Timestamp gengxinshijian) {
		this.gengxinshijian = gengxinshijian;
	}

	@Column(name = "zhidingshijian", length = 19)
	public Timestamp getZhidingshijian() {
		return this.zhidingshijian;
	}

	public void setZhidingshijian(Timestamp zhidingshijian) {
		this.zhidingshijian = zhidingshijian;
	}

	@Override
	public String toString() {
		return "Banner [faburen=" + faburen + ", fabushijian=" + fabushijian
				+ ", gengxinren=" + gengxinren + ", gengxinshijian="
				+ gengxinshijian + ", id=" + id + ", lianjie=" + lianjie
				+ ", miaoshu=" + miaoshu + ", tupian=" + tupian + ", zhiding="
				+ zhiding + ", zhidingshijian=" + zhidingshijian + "]";
	}

}


text:
package com.amazonaws.services.s3.model;

import com.amazonaws.services.s3.model.lifecycle.LifecycleFilter;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * Container for bucket lifecycle configuration operations.
 */
public class BucketLifecycleConfiguration implements Serializable {

    /**
     * Constant for an enabled rule.
     *
     * @see Rule#setStatus(String)
     */
    public static final String ENABLED = "Enabled";

    /**
     * Constant for a disabled rule.
     *
     * @see Rule#setStatus(String)
     */
    public static final String DISABLED = "Disabled";

    private List<Rule> rules;

    /**
     * Returns the list of rules that comprise this configuration.
     */
    public List<Rule> getRules() {
        return rules;
    }

    /**
     * Sets the rules that comprise this configuration.
     */
    public void setRules(List<Rule> rules) {
        this.rules = rules;
    }

    /**
     * Sets the rules that comprise this configuration and returns a reference
     * to this object for easy method chaining.
     */
    public BucketLifecycleConfiguration withRules(List<Rule> rules) {
        setRules(rules);
        return this;
    }

    /**
     * Convenience array style method for
     * {@link BucketLifecycleConfiguration#withRules(List)}
     */
    public BucketLifecycleConfiguration withRules(Rule... rules) {
        setRules(Arrays.asList(rules));
        return this;
    }

    /**
     * Constructs a new {@link BucketLifecycleConfiguration} object with the
     * rules given.
     *
     * @param rules
     */
    public BucketLifecycleConfiguration(List<Rule> rules) {
        this.rules = rules;
    }

    public BucketLifecycleConfiguration() {
        super();
    }

    public static class Rule implements Serializable {

        private String id;
        private String prefix;
        private String status;
        private LifecycleFilter filter;

        /**
         * The time, in days, between when the object is uploaded to the bucket
         * and when it expires. Should not coexist with expirationDate within
         * one lifecycle rule.
         */
        private int expirationInDays = -1;

        private boolean expiredObjectDeleteMarker = false;

        /**
         * The time, in days, between when a new version of the object is
         * uploaded to the bucket and when older versions of the object
         * expire.
         */
        private int noncurrentVersionExpirationInDays = -1;

        /**
         * The expiration date of the object and should not coexist with expirationInDays within
         * one lifecycle rule.
         */
        private Date expirationDate;

        /**
         * Transition rules for the objects in the bucket.
         */
        private List<Transition> transitions;

        /**
         * Transition rules for the non current objects in the bucket.
         */
        private List<NoncurrentVersionTransition> noncurrentVersionTransitions;

        /**
         * Specifies the days since the initiation of an Incomplete Multipart Upload that Lifecycle will wait before permanently removing all parts of the upload.
         */
        private AbortIncompleteMultipartUpload abortIncompleteMultipartUpload;

        /**
         * Sets the ID of this rule. Rules must be less than 255 alphanumeric
         * characters, and must be unique for a bucket. If you do not assign an
         * ID, one will be generated.
         */
        public void setId(String id) {
            this.id = id;
        }

        /**
         * Sets the key prefix for which this rule will apply.
         *
         * @deprecated Use {@link LifecycleFilter} instead.
         */
        @Deprecated
        public void setPrefix(String prefix) {
            this.prefix = prefix;
        }

        /**
         * Sets the time, in days, between when an object is uploaded to the
         * bucket and when it expires.
         */
        public void setExpirationInDays(int expirationInDays) {
            this.expirationInDays = expirationInDays;
        }

        /**
         * Sets the time, in days, between when a new version of the object is
         * uploaded to the bucket and when older versions of the object expire.
         */
        public void setNoncurrentVersionExpirationInDays(int value) {
            this.noncurrentVersionExpirationInDays = value;
        }

        /**
         * Returns the ID of this rule.
         */
        public String getId() {
            return id;
        }

        /**
         * Sets the ID of this rule and returns a reference to this object for
         * method chaining.
         *
         * @see Rule#setId(String)
         */
        public Rule withId(String id) {
            this.id = id;
            return this;
        }

        /**
         * Returns the key prefix for which this rule will apply.
         *
         * This method should be used only if prefix was set using
         * {@link #setPrefix(String)}.
         *
         * @deprecated The method returns prefix only if was was set using
         *              {@link #setPrefix(String)}. Otherwise, Use {@link LifecycleFilter}.
         */
        @Deprecated
        public String getPrefix() {
            return prefix;
        }

        /**
         * Sets the key prefix for this rule and returns a reference to this
         * object for method chaining.
         *
         * @see Rule#setPrefix(String)
         * @deprecated Use {@link LifecycleFilter} instead.
         */
        @Deprecated
        public Rule withPrefix(String prefix) {
            this.prefix = prefix;
            return this;
        }

        /**
         * Returns the time in days from an object's creation to its expiration.
         */
        public int getExpirationInDays() {
            return expirationInDays;
        }

        /**
         * Sets the time, in days, between when an object is uploaded to the
         * bucket and when it expires, and returns a reference to this object
         * for method chaining.
         *
         * @see Rule#setExpirationInDays(int)
         */
        public Rule withExpirationInDays(int expirationInDays) {
            this.expirationInDays = expirationInDays;
            return this;
        }

        /**
         * Returns the time, in days, between when a new version of the object
         * is uploaded to the bucket and when older versions of the object
         * expire.
         */
        public int getNoncurrentVersionExpirationInDays() {
            return noncurrentVersionExpirationInDays;
        }

        /**
         * Sets the time, in days, between when a new version of the object is
         * uploaded to the bucket and when older versions of the object expire,
         * and returns a reference to this object for method chaining.
         */
        public Rule withNoncurrentVersionExpirationInDays(int value) {
            setNoncurrentVersionExpirationInDays(value);
            return this;
        }

        /**
         * Returns the status of this rule.
         *
         * @see BucketLifecycleConfiguration#DISABLED
         * @see BucketLifecycleConfiguration#ENABLED
         */
        public String getStatus() {
            return status;
        }

        /**
         * Sets the status of this rule.
         *
         * @see BucketLifecycleConfiguration#DISABLED
         * @see BucketLifecycleConfiguration#ENABLED
         */
        public void setStatus(String status) {
            this.status = status;
        }

        /**
         * Sets the status of this rule and returns a reference to this object
         * for method chaining.
         *
         * @see Rule#setStatus(String)
         * @see BucketLifecycleConfiguration#DISABLED
         * @see BucketLifecycleConfiguration#ENABLED
         */
        public Rule withStatus(String status) {
            setStatus(status);
            return this;
        }

        /**
         * Sets the expiration date of the object.
         */
        public void setExpirationDate(Date expirationDate) {
            this.expirationDate = expirationDate;
        }

        /**
         * Returns the expiration date of the object.
         */
        public Date getExpirationDate() {
            return this.expirationDate;
        }

        /**
         * Sets the expiration date of the object and returns a reference to this
         * object(Rule) for method chaining.
         */
        public Rule withExpirationDate(Date expirationDate) {
            this.expirationDate = expirationDate;
            return this;
        }

        /**
         * Sets the transition describing how this object will move between
         * different storage classes in Amazon S3. Bucket Life cycle
         * configuration can now accept multiple transitions in a rule. Note :
         * This method overwrites all the existing transitions with given
         * transition. @Deprecated in favor of {@link #setTransitions(List)}
         */
        @Deprecated
        public void setTransition(Transition transition) {
            setTransitions(Arrays.asList(transition));
        }

        /**
         * Returns the transition associated with the rule. If there are more
         * than one transition associated with a given rule, this method returns
         * the last transition rule.
         * @Deprecated in favor of {@link #getTransitions()}
         */
        @Deprecated
        public Transition getTransition() {
            final List<Transition> transitions = getTransitions();
            return (transitions != null && !transitions.isEmpty())
                    ? transitions.get(transitions.size() - 1)
                    : null;
        }

        /**
         * Sets the transition describing how this object will move between
         * different storage classes in Amazon S3. Bucket Life cycle
         * configuration can now accept multiple transitions in a rule.
         * @Deprecated in favor of {@link #withTransitions(List)}
         * Returns an updated reference of this object.
         */
        @Deprecated
        public Rule withTransition(Transition transition) {
            setTransitions(Arrays.asList(transition));
            return this;
        }

        /**
         * Sets the transition describing how non-current versions of objects
         * will move between different storage classes in Amazon S3. Bucket Life
         * cycle configuration can now accept multiple non current transitions
         * in a rule. Note: This method overwrites all the existing transitions
         * with given transition. @Deprecated in favor of
         * {@link #setNoncurrentVersionTransitions(List)}
         */
        @Deprecated
        public void setNoncurrentVersionTransition(
                NoncurrentVersionTransition nonCurrentVersionTransition) {

            setNoncurrentVersionTransitions(Arrays
                    .asList(nonCurrentVersionTransition));
        }

        /**
         * Returns the non-current transition associated with the life cycle
         * configuration rule. If there are more than one transitions associated
         * with a rule, this method returns the last transition in the rule. @Deprecated
         * in favor of {@link #getNoncurrentVersionTransitions()}
         */
        @Deprecated
        public NoncurrentVersionTransition getNoncurrentVersionTransition() {
            final List<NoncurrentVersionTransition> transitions = getNoncurrentVersionTransitions();
            return (transitions != null && !transitions.isEmpty())
                    ? transitions.get(transitions.size() - 1)
                    : null;
        }

        /**
         * Sets the transition describing how non-current versions of objects
         * will move between different storage classes in Amazon S3. Bucket Life
         * cycle configuration can now accept multiple non current transitions
         * in a rule. @Deprecated in favor of
         * {@link #withNoncurrentVersionTransitions(List)}
         * Returns a updated reference of this object.
         */
        @Deprecated
        public Rule withNoncurrentVersionTransition(
                NoncurrentVersionTransition nonCurrentVersionTransition) {

            setNoncurrentVersionTransitions(Arrays
                    .asList(nonCurrentVersionTransition));
            return this;
        }

        /**
         * Returns the Amazon S3 object transition rules associated with the
         * given rule.
         */
        public List<Transition> getTransitions() {
            return transitions;
        }

        /**
         * Sets the Amazon S3 object transition rules for the given bucket.
         */
        public void setTransitions(List<Transition> transitions) {
            this.transitions = new ArrayList<Transition>(transitions);
        }

        /**
         * Sets the Amazon S3 object transition rules for the given bucket.
         * Returns an updated version of this object.
         */
        public Rule withTransitions(List<Transition> transitions) {
            setTransitions(transitions);
            return this;
        }

        /**
         * Adds a new transition to the rule.
         */
        public Rule addTransition(Transition transition) {
            if (transition == null) {
                throw new IllegalArgumentException("Transition cannot be null.");
            }

            if (transitions == null) {
                transitions = new ArrayList<BucketLifecycleConfiguration.Transition>();
            }
            transitions.add(transition);
            return this;
        }

        /**
         * Returns the Amazon S3 non current object transition rules associated
         * with the given rule.
         */
        public List<NoncurrentVersionTransition> getNoncurrentVersionTransitions() {
            return noncurrentVersionTransitions;
        }

        /**
         * Sets the Amazon S3 non current object transition rules for the given bucket.
         */
        public void setNoncurrentVersionTransitions(
                List<NoncurrentVersionTransition> noncurrentVersionTransitions) {
            this.noncurrentVersionTransitions = new ArrayList<NoncurrentVersionTransition>(
                    noncurrentVersionTransitions);
        }

        /**
         * Sets the Amazon S3 non current object transition rules for the given bucket.
         * Returns an updated version of this object.
         */
        public Rule withNoncurrentVersionTransitions(
                List<NoncurrentVersionTransition> noncurrentVersionTransitions) {
            setNoncurrentVersionTransitions(noncurrentVersionTransitions);
            return this;
        }

        /**
         * Adds a new Non current transition to the rule.
         */
        public Rule addNoncurrentVersionTransition(
                NoncurrentVersionTransition noncurrentVersionTransition) {
            if (noncurrentVersionTransition == null) {
                throw new IllegalArgumentException(
                        "NoncurrentVersionTransition cannot be null.");
            }

            if (noncurrentVersionTransitions == null) {
                noncurrentVersionTransitions = new ArrayList<BucketLifecycleConfiguration.NoncurrentVersionTransition>();
            }
            noncurrentVersionTransitions.add(noncurrentVersionTransition);
            return this;
        }

        public AbortIncompleteMultipartUpload getAbortIncompleteMultipartUpload() {
            return abortIncompleteMultipartUpload;
        }

        public void setAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload abortIncompleteMultipartUpload) {
            this.abortIncompleteMultipartUpload = abortIncompleteMultipartUpload;
        }

        public Rule withAbortIncompleteMultipartUpload
                (AbortIncompleteMultipartUpload abortIncompleteMultipartUpload) {
            setAbortIncompleteMultipartUpload(abortIncompleteMultipartUpload);
            return this;
        }

        /**
         * Returns whether the current expiration policy for the object is set to remove objects
         * when only a delete marker is left
         * <p>
         * If set to true the lifecycle policy will delete the current version of an object if and
         * only if the current version is a expired object delete marker. This option only makes sense to use
         * for versioned buckets and cannot be used in conjunction with expirationInDays or
         * expirationDate. Note that the current version can only be removed if all non-current
         * versions have been removed (either through a non-current version expiration policy or
         * being explicitly deleted)
         * </p>
         *
         * @return True if this lifecycle's configuration is configured to delete the current
         *         version of an object if it's the only version left and it's a delete marker.
         *         False otherwise
         */
        public boolean isExpiredObjectDeleteMarker() {
            return expiredObjectDeleteMarker;
        }

        /**
         * Sets the value of the ExpiredObjectDeleteMarkers attribute.
         *
         * @param expiredObjectDeleteMarker
         *            True to allow the current expiration policy to remove the current version of
         *            the object if it's the only version left and it's a delete marker. False has
         *            no effect on the current expiration policy
         */
        public void setExpiredObjectDeleteMarker(boolean expiredObjectDeleteMarker) {
            this.expiredObjectDeleteMarker = expiredObjectDeleteMarker;
        }

        /**
         * Fluent method for setting the value of the ExpiredObjectDeleteMarkers attributes. See
         * {@link #setExpiredObjectDeleteMarker(boolean)}
         *
         * @param expiredObjectDeleteMarker
         * @return This object for method chaining
         */
        public Rule withExpiredObjectDeleteMarker(boolean expiredObjectDeleteMarker) {
            this.expiredObjectDeleteMarker = expiredObjectDeleteMarker;
            return this;
        }

        /**
         * Returns a {@link LifecycleFilter} that is used to identify objects that a Lifecycle Rule applies to.
         */
        public LifecycleFilter getFilter() {
            return filter;
        }

        /**
         * Sets the {@link LifecycleFilter} that is used to identify objects that a Lifecycle Rule applies to.
         * A rule cannot have both {@link LifecycleFilter} and the deprecated {@link #prefix}.
         *
         * @param filter {@link LifecycleFilter}
         */
        public void setFilter(LifecycleFilter filter) {
            this.filter = filter;
        }

        /**
         * Fluent method to set the {@link LifecycleFilter} that is used to identify objects
         * that a Lifecycle Rule applies to. A rule cannot have both {@link LifecycleFilter}
         * and the deprecated {@link #prefix}.
         *
         * @param filter {@link LifecycleFilter}
         * @return This object for method chaining.
         */
        public Rule withFilter(LifecycleFilter filter) {
            setFilter(filter);
            return this;
        }
    }

    /**
     * The transition attribute of the rule describing how this object will move
     * between different storage classes in Amazon S3.
     */
    public static class Transition implements Serializable {

        /**
         * The time, in days, between when the object is uploaded to the bucket
         * and when it expires. Should not coexist with expirationDate within
         * one lifecycle rule.
         */
        private int days = -1;

        /**
         * The expiration date of the object and should not coexist with expirationInDays within
         * one lifecycle rule.
         */
        private Date date;

        private String storageClass;

        /**
         * Sets the time, in days, between when an object is uploaded to the bucket and when it
         * expires.
         */
        public void setDays(int expirationInDays) {
            this.days = expirationInDays;
        }

        /**
         * Returns the time in days from an object's creation to its expiration.
         */
        public int getDays() {
            return days;
        }

        /**
         * Sets the time, in days, between when an object is uploaded to the
         * bucket and when it expires, and returns a reference to this object
         * for method chaining.
         *
         * @see Rule#setExpirationInDays(int)
         */
        public Transition withDays(int expirationInDays) {
            this.days = expirationInDays;
            return this;
        }

        /**
         * Sets the storage class of this object.
         */
        public void setStorageClass(StorageClass storageClass) {
            if (storageClass == null) {
                setStorageClass((String) null);
            } else {
                setStorageClass(storageClass.toString());
            }
        }

        /**
         * Sets the storage class of this object.
         */
        public void setStorageClass(String storageClass) {
            this.storageClass = storageClass;
        }

        /**
         * Returns the storage class of this object.
         *
         * @deprecated This method should not be used. Use {@link #getStorageClassAsString()}
         *             instead.
         */
        @Deprecated
        public StorageClass getStorageClass() {
            try {
                return StorageClass.fromValue(this.storageClass);
            } catch (IllegalArgumentException ignored) {
                return null;
            }
        }

        /**
         * Returns the storage class of this object.
         */
        public String getStorageClassAsString() {
            return this.storageClass;
        }

        /**
         * Sets the storage class of this object and returns a reference to this object for method
         * chaining.
         */
        public Transition withStorageClass(StorageClass storageClass) {
            setStorageClass(storageClass);
            return this;
        }

        /**
         * Sets the storage class of this object and returns a reference to this object for method
         * chaining.
         */
        public Transition withStorageClass(String storageClass) {
            setStorageClass(storageClass);
            return this;
        }

        /**
         * Set the expiration date of this object.
         */
        public void setDate(Date expirationDate) {
            this.date = expirationDate;
        }

        /**
         * Returns the expiration date of this object.
         */
        public Date getDate() {
            return this.date;
        }

        /**
         * Set the expiration date of this object and returns a reference to
         * this object(Transition) for method chaining.
         */
        public Transition withDate(Date expirationDate) {
            this.date = expirationDate;
            return this;
        }

    }

    /**
     * The non-current-version transition attribute of the rule, describing
     * how non-current versions of objects will move between different storage
     * classes in Amazon S3.
     */
    public static class NoncurrentVersionTransition implements Serializable {

        /**
         * The time, in days, between when a new version of the object is
         * uploaded to the bucket and when older version are archived.
         */
        private int days = -1;

        private String storageClass;

        /**
         * Sets the time, in days, between when a new version of the object
         * is uploaded to the bucket and when older versions are archived.
         */
        public void setDays(int expirationInDays) {
            this.days = expirationInDays;
        }

        /**
         * Returns the time in days from when a new version of the object
         * is uploaded to the bucket and when older versions are archived.
         */
        public int getDays() {
            return days;
        }

        /**
         * Sets the time in days from when a new version of the object
         * is uploaded to the bucket and when older versions are archived,
         * and returns a reference to this object for method chaining.
         */
        public NoncurrentVersionTransition withDays(int expirationInDays) {
            this.days = expirationInDays;
            return this;
        }

        /**
         * Sets the storage class of this object.
         */
        public void setStorageClass(StorageClass storageClass) {
            if (storageClass == null) {
                setStorageClass((String) null);
            } else {
                setStorageClass(storageClass.toString());
            }
        }

        /**
         * Sets the storage class of this object.
         */
        public void setStorageClass(String storageClass) {
            this.storageClass = storageClass;
        }

        /**
         * Returns the storage class of this object.
         *
         * @deprecated This method should not be used. Use {@link #getStorageClassAsString()}
         *             instead.
         */
        @Deprecated
        public StorageClass getStorageClass() {
            try {
                return StorageClass.fromValue(this.storageClass);
            } catch (IllegalArgumentException ignored) {
                return null;
            }
        }

        /**
         * Returns the storage class of this object.
         */
        public String getStorageClassAsString() {
            return this.storageClass;
        }

        /**
         * Sets the storage class of this object and returns a reference to this object for method
         * chaining.
         */
        public NoncurrentVersionTransition withStorageClass(StorageClass storageClass) {
            setStorageClass(storageClass);
            return this;
        }

        /**
         * Sets the storage class of this object and returns a reference to this object for method
         * chaining.
         */
        public NoncurrentVersionTransition withStorageClass(String storageClass) {
            setStorageClass(storageClass);
            return this;
        }
    }

}


text:
@interface YATabBarController : UITabBarController

@end


text:
using System;

namespace Cassandra.Mapping.Attributes
{
    /// <summary>
    /// Tells the mapper to ignore mapping this property.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
    public class IgnoreAttribute : Attribute
    {
    }
}


text:
from django.core.management.base import BaseCommand
from main.tweet_api import TweetAPI

class Command(BaseCommand):
    def handle(self, *args, **options):
        pass