text:
using content::RenderViewHost;

namespace {

const char kLocalizedStringsFile[] = "strings.js";
const char kOptionsBundleJsFile[]  = "options_bundle.js";

}  // namespace

namespace options {

////////////////////////////////////////////////////////////////////////////////
//
// OptionsUIHTMLSource
//
////////////////////////////////////////////////////////////////////////////////

class OptionsUIHTMLSource : public content::URLDataSource {
 public:
  // The constructor takes over ownership of |localized_strings|.
  explicit OptionsUIHTMLSource(DictionaryValue* localized_strings);

  // content::URLDataSource implementation.
  virtual std::string GetSource() OVERRIDE;
  virtual void StartDataRequest(
      const std::string& path,
      bool is_incognito,
      const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
  virtual std::string GetMimeType(const std::string&) const OVERRIDE;
  virtual bool ShouldDenyXFrameOptions() const OVERRIDE;

 private:
  virtual ~OptionsUIHTMLSource();

  // Localized strings collection.
  scoped_ptr<DictionaryValue> localized_strings_;

  DISALLOW_COPY_AND_ASSIGN(OptionsUIHTMLSource);
};

OptionsUIHTMLSource::OptionsUIHTMLSource(DictionaryValue* localized_strings) {
  DCHECK(localized_strings);
  localized_strings_.reset(localized_strings);
}

std::string OptionsUIHTMLSource::GetSource() {
  return chrome::kChromeUISettingsFrameHost;
}

void OptionsUIHTMLSource::StartDataRequest(
    const std::string& path,
    bool is_incognito,
    const content::URLDataSource::GotDataCallback& callback) {
  scoped_refptr<base::RefCountedMemory> response_bytes;
  webui::SetFontAndTextDirection(localized_strings_.get());

  if (path == kLocalizedStringsFile) {
    // Return dynamically-generated strings from memory.
    webui::UseVersion2 version;
    std::string strings_js;
    webui::AppendJsonJS(localized_strings_.get(), &strings_js);
    response_bytes = base::RefCountedString::TakeString(&strings_js);
  } else if (path == kOptionsBundleJsFile) {
    // Return (and cache) the options javascript code.
    response_bytes = ui::ResourceBundle::GetSharedInstance().
        LoadDataResourceBytes(IDR_OPTIONS_BUNDLE_JS);
  } else {
    // Return (and cache) the main options html page as the default.
    response_bytes = ui::ResourceBundle::GetSharedInstance().
        LoadDataResourceBytes(IDR_OPTIONS_HTML);
  }

  callback.Run(response_bytes);
}

std::string OptionsUIHTMLSource::GetMimeType(const std::string& path) const {
  if (path == kLocalizedStringsFile || path == kOptionsBundleJsFile)
    return "application/javascript";

  return "text/html";
}

bool OptionsUIHTMLSource::ShouldDenyXFrameOptions() const {
  return false;
}

OptionsUIHTMLSource::~OptionsUIHTMLSource() {}

////////////////////////////////////////////////////////////////////////////////
//
// OptionsPageUIHandler
//
////////////////////////////////////////////////////////////////////////////////

const char OptionsPageUIHandler::kSettingsAppKey[] = "settingsApp";

OptionsPageUIHandler::OptionsPageUIHandler() {
}

OptionsPageUIHandler::~OptionsPageUIHandler() {
}

bool OptionsPageUIHandler::IsEnabled() {
  return true;
}

// static
void OptionsPageUIHandler::RegisterStrings(
    DictionaryValue* localized_strings,
    const OptionsStringResource* resources,
    size_t length) {
  for (size_t i = 0; i < length; ++i) {
    string16 value;
    if (resources[i].substitution_id == 0) {
      value = l10n_util::GetStringUTF16(resources[i].id);
    } else {
      value = l10n_util::GetStringFUTF16(
          resources[i].id,
          l10n_util::GetStringUTF16(resources[i].substitution_id));
    }
    localized_strings->SetString(resources[i].name, value);
  }
}

void OptionsPageUIHandler::RegisterTitle(DictionaryValue* localized_strings,
                                         const std::string& variable_name,
                                         int title_id) {
  localized_strings->SetString(variable_name,
      l10n_util::GetStringUTF16(title_id));
  localized_strings->SetString(variable_name + "TabTitle",
      l10n_util::GetStringFUTF16(IDS_OPTIONS_TAB_TITLE,
          l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE),
          l10n_util::GetStringUTF16(title_id)));
}

////////////////////////////////////////////////////////////////////////////////
//
// OptionsUI
//
////////////////////////////////////////////////////////////////////////////////

OptionsUI::OptionsUI(content::WebUI* web_ui)
    : WebUIController(web_ui),
      initialized_handlers_(false) {
  DictionaryValue* localized_strings = new DictionaryValue();
  localized_strings->Set(OptionsPageUIHandler::kSettingsAppKey,
                         new DictionaryValue());

  CoreOptionsHandler* core_handler;
#if defined(OS_CHROMEOS)
  core_handler = new chromeos::options::CoreChromeOSOptionsHandler();
#else
  core_handler = new CoreOptionsHandler();
#endif
  core_handler->set_handlers_host(this);
  AddOptionsPageUIHandler(localized_strings, core_handler);

  AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler());

  BrowserOptionsHandler* browser_options_handler = new BrowserOptionsHandler();
  AddOptionsPageUIHandler(localized_strings, browser_options_handler);

  AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler());
  AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
  AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler());
  AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler());
  AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new MediaDevicesSelectionHandler());
  AddOptionsPageUIHandler(localized_strings, new MediaGalleriesHandler());
#if defined(OS_CHROMEOS)
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::CrosLanguageOptionsHandler());
#else
  AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler());
#endif
  AddOptionsPageUIHandler(localized_strings,
                          new LanguageDictionaryOverlayHandler());
  AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new ManagedUserPassphraseHandler());
  AddOptionsPageUIHandler(localized_strings, new ManagedUserSettingsHandler());
  AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler());
  AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler());
  AddOptionsPageUIHandler(localized_strings, new ImportDataHandler());
  AddOptionsPageUIHandler(localized_strings, new StartupPagesHandler());
  AddOptionsPageUIHandler(localized_strings, new OptionsSyncSetupHandler(
      g_browser_process->profile_manager()));
#if defined(OS_CHROMEOS)
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::AccountsOptionsHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::BluetoothOptionsHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::DisplayOptionsHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::DisplayOverscanHandler());
  AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::LanguageChewingHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::KeyboardHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::KioskAppsHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::LanguageHangulHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::LanguageMozcHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::LanguagePinyinHandler());

  chromeos::options::PointerHandler* pointer_handler =
      new chromeos::options::PointerHandler();
  AddOptionsPageUIHandler(localized_strings, pointer_handler);

  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::ProxyHandler());
  AddOptionsPageUIHandler(
      localized_strings,
      new chromeos::options::ChangePictureOptionsHandler());
  AddOptionsPageUIHandler(localized_strings,
                          new chromeos::options::StatsOptionsHandler());
#endif
#if defined(USE_NSS)
  AddOptionsPageUIHandler(localized_strings, new CertificateManagerHandler());
#endif
  AddOptionsPageUIHandler(localized_strings, new HandlerOptionsHandler());

  // |localized_strings| ownership is taken over by this constructor.
  OptionsUIHTMLSource* html_source =
      new OptionsUIHTMLSource(localized_strings);

  // Set up the chrome://settings-frame/ source.
  Profile* profile = Profile::FromWebUI(web_ui);
  content::URLDataSource::Add(profile, html_source);

  // Set up the chrome://theme/ source.
  ThemeSource* theme = new ThemeSource(profile);
  content::URLDataSource::Add(profile, theme);

#if defined(OS_CHROMEOS)
  // Set up the chrome://userimage/ source.
  chromeos::options::UserImageSource* user_image_source =
      new chromeos::options::UserImageSource();
  content::URLDataSource::Add(profile, user_image_source);

  pointer_device_observer_.reset(
      new chromeos::system::PointerDeviceObserver());
  pointer_device_observer_->AddObserver(browser_options_handler);
  pointer_device_observer_->AddObserver(pointer_handler);
#endif
}

OptionsUI::~OptionsUI() {
  // Uninitialize all registered handlers. Deleted by WebUIImpl.
  for (size_t i = 0; i < handlers_.size(); ++i)
    handlers_[i]->Uninitialize();
}

// static
void OptionsUI::ProcessAutocompleteSuggestions(
    const AutocompleteResult& result,
    base::ListValue* const suggestions) {
  for (size_t i = 0; i < result.size(); ++i) {
    const AutocompleteMatch& match = result.match_at(i);
    AutocompleteMatch::Type type = match.type;
    if (type != AutocompleteMatch::HISTORY_URL &&
        type != AutocompleteMatch::HISTORY_TITLE &&
        type != AutocompleteMatch::HISTORY_BODY &&
        type != AutocompleteMatch::HISTORY_KEYWORD &&
        type != AutocompleteMatch::NAVSUGGEST)
      continue;
    base::DictionaryValue* entry = new base::DictionaryValue();
    entry->SetString("title", match.description);
    entry->SetString("displayURL", match.contents);
    entry->SetString("url", match.destination_url.spec());
    suggestions->Append(entry);
  }
}

// static
base::RefCountedMemory* OptionsUI::GetFaviconResourceBytes(
      ui::ScaleFactor scale_factor) {
  return ui::ResourceBundle::GetSharedInstance().
      LoadDataResourceBytesForScale(IDR_SETTINGS_FAVICON, scale_factor);
}

void OptionsUI::InitializeHandlers() {
  Profile* profile = Profile::FromWebUI(web_ui());
  DCHECK(!profile->IsOffTheRecord() || profile->IsGuestSession());

  // A new web page DOM has been brought up in an existing renderer, causing
  // this method to be called twice. If that happens, ignore the second call.
  if (!initialized_handlers_) {
    for (size_t i = 0; i < handlers_.size(); ++i)
      handlers_[i]->InitializeHandler();
    initialized_handlers_ = true;

#if defined(OS_CHROMEOS)
    pointer_device_observer_->Init();
#endif
  }

#if defined(OS_CHROMEOS)
  pointer_device_observer_->CheckDevices();
#endif

  // Always initialize the page as when handlers are left over we still need to
  // do various things like show/hide sections and send data to the Javascript.
  for (size_t i = 0; i < handlers_.size(); ++i)
    handlers_[i]->InitializePage();

  web_ui()->CallJavascriptFunction(
      "BrowserOptions.notifyInitializationComplete");
}

void OptionsUI::RenderViewCreated(content::RenderViewHost* render_view_host) {
  content::WebUIController::RenderViewCreated(render_view_host);
  for (size_t i = 0; i < handlers_.size(); ++i)
    handlers_[i]->PageLoadStarted();
}

void OptionsUI::RenderViewReused(content::RenderViewHost* render_view_host) {
  content::WebUIController::RenderViewReused(render_view_host);
  for (size_t i = 0; i < handlers_.size(); ++i)
    handlers_[i]->PageLoadStarted();
}

void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,
                                        OptionsPageUIHandler* handler_raw) {
  scoped_ptr<OptionsPageUIHandler> handler(handler_raw);
  DCHECK(handler.get());
  // Add only if handler's service is enabled.
  if (handler->IsEnabled()) {
    // Add handler to the list and also pass the ownership.
    web_ui()->AddMessageHandler(handler.release());
    handler_raw->GetLocalizedValues(localized_strings);
    handlers_.push_back(handler_raw);
  }
}

}  // namespace options


text:
// # Get Helper
// Usage: `{{#get "posts" limit="5"}}`, `{{#get "tags" limit="all"}}`
// Fetches data from the API
var proxy = require('./proxy'),
    _ = require('lodash'),
    Promise = require('bluebird'),
    jsonpath = require('jsonpath'),

    logging = proxy.logging,
    i18n = proxy.i18n,
    createFrame = proxy.hbs.handlebars.createFrame,

    api = proxy.api,
    labs = proxy.labs,
    pathAliases,
    get;

/**
 * v0.1: users, posts, tags
 * v2: authors, pagesPublic, posts, tagsPublic
 *
 * @NOTE: if you use "users" in v2, we should fallback to authors
 */
const RESOURCES = {
    posts: {
        alias: 'postsPublic',
        resource: 'posts'
    },
    tags: {
        alias: 'tagsPublic',
        resource: 'tags'
    },
    users: {
        alias: 'authorsPublic',
        resource: 'users'
    },
    pages: {
        alias: 'pagesPublic',
        resource: 'posts'
    },
    authors: {
        alias: 'authorsPublic'
    }
};

// Short forms of paths which we should understand
pathAliases = {
    'post.tags': 'post.tags[*].slug',
    'post.author': 'post.author.slug'
};

/**
 * ## Is Browse
 * Is this a Browse request or a Read request?
 * @param {Object} resource
 * @param {Object} options
 * @returns {boolean}
 */
function isBrowse(options) {
    var browse = true;

    if (options.id || options.slug) {
        browse = false;
    }

    return browse;
}

/**
 * ## Resolve Paths
 * Find and resolve path strings
 *
 * @param {Object} data
 * @param {String} value
 * @returns {String}
 */
function resolvePaths(globals, data, value) {
    var regex = /\{\{(.*?)\}\}/g;

    value = value.replace(regex, function (match, path) {
        var result;

        // Handle aliases
        path = pathAliases[path] ? pathAliases[path] : path;
        // Handle Handlebars .[] style arrays
        path = path.replace(/\.\[/g, '[');

        if (path.charAt(0) === '@') {
            result = jsonpath.query(globals, path.substr(1));
        } else {
            // Do the query, which always returns an array of matches
            result = jsonpath.query(data, path);
        }

        // Handle the case where the single data property we return is a Date
        // Data.toString() is not DB compatible, so use `toISOString()` instead
        if (_.isDate(result[0])) {
            result[0] = result[0].toISOString();
        }

        // Concatenate the results with a comma, handles common case of multiple tag slugs
        return result.join(',');
    });

    return value;
}

/**
 * ## Parse Options
 * Ensure options passed in make sense
 *
 * @param {Object} data
 * @param {Object} options
 * @returns {*}
 */
function parseOptions(globals, data, options) {
    if (_.isString(options.filter)) {
        options.filter = resolvePaths(globals, data, options.filter);
    }

    return options;
}

/**
 * ## Get
 * @param {Object} resource
 * @param {Object} options
 * @returns {Promise}
 */
get = function get(resource, options) {
    options = options || {};
    options.hash = options.hash || {};
    options.data = options.data || {};

    const self = this;
    const data = createFrame(options.data);
    const ghostGlobals = _.omit(data, ['_parent', 'root']);
    const apiVersion = _.get(data, 'root._locals.apiVersion');
    let apiOptions = options.hash;

    if (!options.fn) {
        data.error = i18n.t('warnings.helpers.mustBeCalledAsBlock', {helperName: 'get'});
        logging.warn(data.error);
        return Promise.resolve();
    }

    if (!RESOURCES[resource]) {
        data.error = i18n.t('warnings.helpers.get.invalidResource');
        logging.warn(data.error);
        return Promise.resolve(options.inverse(self, {data: data}));
    }

    const controller = api[apiVersion][RESOURCES[resource].alias] ? RESOURCES[resource].alias : RESOURCES[resource].resource;
    const action = isBrowse(apiOptions) ? 'browse' : 'read';

    // CASE: no fallback defined e.g. v0.1 tries to fetch "authors"
    if (!controller) {
        data.error = i18n.t('warnings.helpers.get.invalidResource');
        logging.warn(data.error);
        return Promise.resolve(options.inverse(self, {data: data}));
    }

    // Parse the options we're going to pass to the API
    apiOptions = parseOptions(ghostGlobals, this, apiOptions);

    // @TODO: https://github.com/TryGhost/Ghost/issues/10548
    return api[apiVersion][controller][action](apiOptions).then(function success(result) {
        var blockParams;

        // block params allows the theme developer to name the data using something like
        // `{{#get "posts" as |result pageInfo|}}`
        blockParams = [result[resource]];
        if (result.meta && result.meta.pagination) {
            result.pagination = result.meta.pagination;
            blockParams.push(result.meta.pagination);
        }

        // Call the main template function
        return options.fn(result, {
            data: data,
            blockParams: blockParams
        });
    }).catch(function error(err) {
        logging.error(err);
        data.error = err.message;
        return options.inverse(self, {data: data});
    });
};

module.exports = function getLabsWrapper() {
    const self = this;
    const args = arguments;
    const apiVersion = _.get(args, '[1].data.root._locals.apiVersion');

    // If the API version is v0.1 return the labs enabled version of the helper
    if (apiVersion === 'v0.1') {
        return labs.enabledHelper({
            flagKey: 'publicAPI',
            flagName: 'Public API',
            helperName: 'get',
            // Even though this is a labs enabled helper, really we want users to upgrade to v2 API.
            errMessagePath: 'warnings.helpers.get.apiRequired.message',
            errContextPath: 'warnings.helpers.get.apiRequired.context',
            helpUrl: 'https://docs.ghost.org/api/handlebars-themes/packagejson/',
            async: true
        }, function executeHelper() {
            return get.apply(self, args);
        });
    }

    // Else, we just apply the helper normally
    return get.apply(self, args);
};

redpajama_set_name: RedPajamaGithub


text:
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'swf_embed'
require 'spec'
require 'spec/autorun'

Spec::Runner.configure do |config|

end


text:
package com.google.errorprone.matchers.method;

import com.google.common.base.Optional;
import com.google.errorprone.VisitorState;
import com.google.errorprone.util.ASTHelpers;

import com.sun.source.tree.ExpressionTree;
import com.sun.source.tree.MethodInvocationTree;
import com.sun.source.tree.NewClassTree;
import com.sun.tools.javac.code.Symbol;
import com.sun.tools.javac.code.Symbol.MethodSymbol;

/** Base matcher for member methods. */
abstract class MethodMatcher extends AbstractChainedMatcher<MatchState, MatchState> {
  private static final AbstractSimpleMatcher<MatchState> BASE_METHOD_MATCHER =
      new AbstractSimpleMatcher<MatchState>() {
        @Override
        public Optional<MatchState> matchResult(ExpressionTree tree, VisitorState state) {
          Symbol sym = ASTHelpers.getSymbol(tree);
          if (!(sym instanceof MethodSymbol)) {
            return Optional.absent();
          }
          if (tree instanceof NewClassTree) {
            // Don't match constructors as they are neither static nor instance methods.
            return Optional.absent();
          }
          if (tree instanceof MethodInvocationTree) {
            tree = ((MethodInvocationTree) tree).getMethodSelect();
          }
          return Optional.of(
              MatchState.create(ASTHelpers.getReceiverType(tree), (MethodSymbol) sym));
        }
      };

  MethodMatcher() {
    super(BASE_METHOD_MATCHER);
  }
}


text:
<?php
class AppController extends Zend_Controller_Action
{
    public function init()
    {
		global $mySession;
		$db=new Db();
		$myControllerName=Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
		$myActionName=Zend_Controller_Front::getInstance()->getRequest()->getActionName();
		$paramName = Zend_Controller_Front::getInstance()->getRequest()->getParam("ppty");
		$paramStep = Zend_Controller_Front::getInstance()->getRequest()->getParam("step");

                //pr($this->view->url());
                //canonicalization
                //$this->view->headLink()->headLink(array('rel' => 'canonical', 'href' => canonicalUrl()), 'PREPEND');

		/*if($myControllerName != "booking" && ($myActionName != "index" || $myActionName != "process" || $myActionName != "processbook" || $myActionName != "checkvaliduser" || $myActionName != "getvoucher" ) && ($myControllerName != "search" && $myActionName != "searchdetail"))
		{
			unset($mySession->noOfNights);
			unset($mySession->arrivalDate);
			unset($mySession->partySize);
			unset($mySession->totalCost);
			unset($mySession->steps);
			unset($mySession->bookingUser);

		}*/

	if($myControllerName == "booking" && $myActionName == "index" && $paramName != "")
	{
			if($mySession->step != '1' && $paramStep != "1" && !isset($mySession->noOfNights))
			{
					$mySession->step = '1';
					$this->_redirect(APPLICATION_URL."booking/index/ppty/".$paramName."/step/1");

			}

	}

		if(isset($mySession->LoggedUserId) and @$mySession->LoggedUserId!="" )
		{
			$loggedUserData=$db->runQuery("select * from ".USERS." where user_id='".$mySession->LoggedUserId."'");
			$this->view->loggedUserData=$loggedUserData[0];
			/** unsetting session for adding property **/

			if($myActionName != 'addproperty' && $myActionName != 'upload' &&
                                $myActionName != 'uploaded' && $myActionName != 'deleteimg' &&
                                $myActionName != 'sortimages' && $myActionName != 'setsession' &&
                                $myActionName != 'savecalendarstat' && $myActionName != 'processpage' &&
                                $myActionName != 'setcaption' && $myActionName != 'getstatebycountry' &&
                                $myActionName != 'getcitiesbystate' && $myActionName != 'getsubareabycity' &&
                                $myActionName != 'getlocalareabysub' && $myActionName != 'processphoto' &&
                                $myActionName != 'processcal' && $myActionName != 'getrates' &&
                                $myActionName != 'setrates' && $myActionName != 'deleterentalrate' &&
                                $myActionName != 'getextras' && $myActionName != 'saveextras' &&
                                $myActionName != 'deleteextras' && $myActionName != 'saveoffers' &&
                                $myActionName != 'deactivateoffers' && $myActionName != 'ownerimageupload' &&
                                $myActionName != 'processrental' && $myActionName != 'savereview' &&
                                $myActionName != 'checkheadline' && $myActionName != 'savereviewreply' &&
                                $myActionName != 'editproperty' && $myActionName != 'floorplan' &&
                                $myActionName != 'setcaldefault' && $myActionName != "setcurrency" &&
                                $myActionName != "instuctionupload" && $myActionName != "deleteinstruction" &&
                                $myActionName != "updaterate" && $myActionName != "preview" &&
                                $myActionName != 'deletefloorplan' && $myActionName != 'doajaxfileupload' &&
                                $myActionName != 'uptodate')
			{

                            //prd($myActionName);

                                //$this->_redirect(APPLICATION_URL.$myActionName);

				unset($mySession->activate);
				unset($mySession->property_id);
				unset($mySession->step);
				unset($mySession->ppty_no);
				unset($mySession->reviewImage);

			}

			/*if($myControllerName == "myaccount" && ($myActionName == "addproperty" || $myActionName == "editproperty") && $mySession->property_id == "" && $paramStep != "")
			{
					$this->_redirect(APPLICATION_URL."myaccount");

			}*/

		}
		else
		{

			if(  $myControllerName != "signin" && $myControllerName!="signup"  && $myControllerName!="index" && $myControllerName!="contents" && $myControllerName!="search" && $myControllerName!="booking"  && $myControllerName != "location"  && !isset($mySession->adminId))
			{
				$mySession->OneBackUrl="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
				echo "<script>parent.top.location='".APPLICATION_URL."signin/index';</script>";
			}

                        if(!isset($mySession->adminId))
			if( $myActionName == "changepassword" || $myActionName == "profile" || $myActionName == "booking" || $myControllerName == "myaccount")
			$this->_redirect();

		}

		$defineData=$db->runQuery("select * from ".ADMINISTRATOR." where admin_id='1'");
		define("ADMIN_EMAIL",$defineData[0]['admin_email']);
		define("SITE_NAME",$defineData[0]['site_title']);
		define("PAYPAL_EMAIL",$defineData[0]['paypal_email']);
	}
}
?>


text:
$(function(){
  window.timeUpdateInterval = false;
  $('.play').on('click', function(){
    window.playButtonClick();
    $('body').addClass('playing');
    var playStartTime = new Date().getTime();
    $('.pause').html('0 s');
    if(timeUpdateInterval) clearInterval(timeUpdateInterval);
    window.timeUpdateInterval = setInterval(function(){
      var currentTime = new Date().getTime();
      var val = Math.round((currentTime -playStartTime )/100)/10;
      $('.pause').html( val+ (val==Math.ceil(val)?'.0':'') + ' s');
    },100);
  });
  $('.pause').on('click', function(){
    window.stopButtonClick();
    $('body').removeClass('playing');
  });

  //38 will go to the next slide and 40 to the previous.

  $(window).on('keyup', function(e){
    console.log(e);
    if(e.keyCode == '37'){
      window.parent.impress().prev();
    } else if(e.keyCode == '39'){
      window.parent.impress().next();
    }
  });

});


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".HfActivity" >

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:orientation="vertical"
        tools:ignore="RtlHardcoded,UselessParent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:orientation="vertical"
            android:padding="5dp" >

            <ImageView
                android:id="@+id/imgHfReturn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:src="@drawable/frais_hf"
                tools:ignore="ContentDescription" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1.7"
            android:orientation="vertical"
            android:paddingTop="20dp" >

            <DatePicker
                android:id="@+id/datHf"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="0.8"
            android:orientation="horizontal"
            android:padding="5dp"
            tools:ignore="DisableBaselineAlignment">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:paddingLeft="10dp"
                tools:ignore="NestedWeights,RtlSymmetry,UselessLeaf">

            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="2"
                android:paddingRight="10dp"
                tools:ignore="RtlSymmetry">

                <EditText
                    android:id="@+id/txtHf"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_weight="1"
                    android:enabled="true"
                    android:gravity="right|center_vertical"
                    android:inputType="number"
                    tools:ignore="InefficientWeight">

                    <requestFocus />
                </EditText>

            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="horizontal"
                android:paddingLeft="5dp"
                tools:ignore="RtlSymmetry">

                <TextView
                    android:id="@+id/lblHfEuro"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="€"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    tools:ignore="HardcodedText" />

            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:orientation="horizontal"
            android:padding="5dp" >

            <EditText
                android:id="@+id/txtHfMotif"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:gravity="top|left"
                android:lines="3"
                tools:ignore="InefficientWeight,NestedWeights,TextFields" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="0.5"
            android:orientation="vertical" >

            <Button
                android:id="@+id/cmdHfAjouter"
                android:layout_width="200dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="@string/ajouter" />

        </LinearLayout>

    </LinearLayout>

</RelativeLayout>


text:
from datetime import datetime
from uuid import uuid4

from flask import render_template, request, make_response
from app import app, babel

@babel.localeselector
def get_locale():
    if hasattr(request, 'locale'):
        if request.locale in app.config['LOCALES'] and request.locale:
            return request.locale
        else:
            return request.accept_languages.best_match(app.config['LOCALES'])

@app.route('/')
@app.route('/<locale>')
def index_with_locale(locale=None):
    request.locale = locale

    countdown_target = datetime(
        day=12, month=7, year=2014, hour=10, minute=0, second=0
    )

    return render_template('index.html', countdown_to=countdown_target)


text:
<?php

return [

    /*
     * Stripe will sign each webhook using a secret. You can find the used secret at the
     * webhook configuration settings: https://dashboard.stripe.com/account/webhooks.
     */
    'signing_secret' => env('STRIPE_WEBHOOK_SECRET'),

    /*
     * You can define the job that should be run when a certain webhook hits your application
     * here. The key is the name of the Stripe event type with the `.` replaced by a `_`.
     *
     * You can find a list of Stripe webhook types here:
     * https://stripe.com/docs/api#event_types.
     */
    'jobs' => [
        'charge_succeeded' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeSucceededJob::class,
        'charge_dispute_closed' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeDisputeClosedJob::class,
        'charge_dispute_created' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeDisputeCreatedJob::class,
        'charge_dispute_funds_reinstated' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeDisputeFundsReinstatedJob::class,
        'charge_dispute_funds_withdrawn' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeDisputeFundsWithdrawnJob::class,
        'charge_dispute_updated' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeDisputeUpdatedJob::class,
        'charge_refund_updated' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeRefundUpdatedJob::class,
        'charge_refunded' => \App\Jobs\Banking\Stripe\Webhooks\HandleChargeRefundedJob::class,
    ],

    /*
     * The classname of the model to be used. The class should equal or extend
     * Spatie\StripeWebhooks\ProcessStripeWebhookJob.
     */
    'model' => \Spatie\StripeWebhooks\ProcessStripeWebhookJob::class,
];


text:
<?php

declare(strict_types=1);

namespace GrumPHP\Configuration\Compiler;

use GrumPHP\Collection\TasksCollection;
use GrumPHP\Configuration\Configurator\TaskConfigurator;
use GrumPHP\Configuration\Resolver\TaskConfigResolver;
use GrumPHP\Exception\TaskConfigResolverException;
use GrumPHP\Task\Config\LazyTaskConfig;
use GrumPHP\Task\Config\Metadata;
use GrumPHP\Task\Config\TaskConfig;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;

class TaskCompilerPass implements CompilerPassInterface
{
    private const TAG_GRUMPHP_TASK = 'grumphp.task';

    /**
     * {@inheritdoc}
     */
    public function process(ContainerBuilder $container): void
    {
        $tasksCollection = $container->findDefinition(TasksCollection::class);
        $availableTasks = $this->fetchAvailableTasksInfo($container);
        $configuredTasks = $container->getParameter('tasks') ?: [];
        $taskConfigResolver = $this->buildTaskConfigResolver($availableTasks);

        // Configure tasks
        foreach ($configuredTasks as $taskName => $config) {
            $taskConfig = $config ?? [];
            $metadata = new Metadata((array) ($taskConfig['metadata'] ?? []));
            $currentTaskName = $metadata->task() ?: $taskName;
            if (!array_key_exists($currentTaskName, $availableTasks)) {
                throw TaskConfigResolverException::unknownTask($currentTaskName);
            }

            // Determine Keys:
            $currentTaskService = $availableTasks[$currentTaskName];
            ['id' => $taskId, 'class' => $taskClass,] = $currentTaskService;
            $configuredTaskKey = $taskId.'.'.$taskName.'.configured';

            // Configure task:
            $taskBuilder = new Definition($taskClass, [
                new Reference($taskId),
                new LazyTaskConfig(
                    function () use ($taskName, $taskConfigResolver, $currentTaskName, $taskConfig, $metadata) {
                        return new TaskConfig(
                            $taskName,
                            $taskConfigResolver->resolve($currentTaskName, $taskConfig),
                            $metadata
                        );
                    }
                )
            ]);
            $taskBuilder->setFactory([new Reference(TaskConfigurator::class), '__invoke']);
            $taskBuilder->addTag('configured.task');

            // Register services:
            $container->setDefinition($configuredTaskKey, $taskBuilder);
            $tasksCollection->addMethodCall('add', [new Reference($configuredTaskKey)]);
        }

        // Register available and configured tasks for easy data usage in the application:
        $container->set(TaskConfigResolver::class, $taskConfigResolver);
        $container->setParameter('grumphp.tasks.configured', array_keys($configuredTasks));
    }

    private function getTaskTag(array $tags): array
    {
        static $taskTagResolver;
        if (null === $taskTagResolver) {
            $taskTagResolver = new OptionsResolver();

            // Instead of required task param : use this to enable the fallback for the deprecated tasks.
            $taskTagResolver->setDefined(['task']);
            $taskTagResolver->setAllowedTypes('task', ['string']);
            $taskTagResolver->setDefault('task', '');
            $taskTagResolver->setNormalizer('task', static function (Options $options, $value) {
                if (!$value && !$options->offsetExists('config')) {
                    throw new MissingOptionsException('The required option "task" is missing.');
                }

                return $value;
            });

            // Clean fallback for installation with old tasks.
            $taskTagResolver->setDefined('config');
            $taskTagResolver->setNormalizer(
                'config',
                static function (Options $options, $value) {
                    throw TaskConfigResolverException::deprectatedTask($value);
                }
            );
        }

        return $taskTagResolver->resolve(current($tags));
    }

    private function fetchAvailableTasksInfo(ContainerBuilder $container): array
    {
        $map = [];
        $taggedServices = $container->findTaggedServiceIds(self::TAG_GRUMPHP_TASK);

        foreach ($taggedServices as $serviceId => $tags) {
            $definition = $container->findDefinition($serviceId);
            // Make sure to set shared to false so that a new instance is always returned
            $definition->setShared(false);

            $taskInfo = $this->getTaskTag($tags);
            $name = $taskInfo['task'];
            $class = $definition->getClass();

            $map[$name] = [
                'id' => $serviceId,
                'class' => $class,
                'task' => $name,
            ];
        }

        return $map;
    }

    private function buildTaskConfigResolver(array $availableTasks): TaskConfigResolver
    {
        return new TaskConfigResolver(
            array_map(
                function ($availableTask): string {
                    return (string) ($availableTask['class'] ?? '');
                },
                $availableTasks
            )
        );
    }
}


text:
from typing import Optional

from superset.charts.commands.exceptions import (
    ChartAccessDeniedError,
    ChartNotFoundError,
)
from superset.datasets.commands.exceptions import (
    DatasetAccessDeniedError,
    DatasetNotFoundError,
)
from superset.explore.utils import check_access as explore_check_access
from superset.temporary_cache.commands.exceptions import (
    TemporaryCacheAccessDeniedError,
    TemporaryCacheResourceNotFoundError,
)
from superset.utils.core import DatasourceType

def check_access(
    datasource_id: int,
    chart_id: Optional[int],
    datasource_type: DatasourceType,
) -> None:
    try:
        explore_check_access(datasource_id, chart_id, datasource_type)
    except (ChartNotFoundError, DatasetNotFoundError) as ex:
        raise TemporaryCacheResourceNotFoundError from ex
    except (ChartAccessDeniedError, DatasetAccessDeniedError) as ex:
        raise TemporaryCacheAccessDeniedError from ex


text:
//go:build e2e
// +build e2e

package domainmapping

import (
	"context"
	"strings"
	"testing"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/util/wait"
	duckv1 "knative.dev/pkg/apis/duck/v1"
	"knative.dev/serving/pkg/apis/serving/v1beta1"
	"knative.dev/serving/test"
	e2e "knative.dev/serving/test/e2e"
	v1test "knative.dev/serving/test/v1"
)

const (
	wsServerTestImageName = "wsserver"
)

func TestDomainMappingWebsocket(t *testing.T) {
	if !test.ServingFlags.EnableBetaFeatures {
		t.Skip("Beta features not enabled")
	}

	if !strings.Contains(test.ServingFlags.IngressClass, "kourier") {
		t.Skip("Skip this test for non-kourier ingress.")
	}

	t.Parallel()
	clients := test.Setup(t)

	names := test.ResourceNames{
		Service: test.ObjectNameForTest(t),
		Image:   wsServerTestImageName,
	}

	test.EnsureTearDown(t, clients, &names)
	ctx := context.Background()

	ksvc, err := v1test.CreateServiceReady(t, clients, &names)
	if err != nil {
		t.Fatalf("Failed to create initial Service %v: %v", names.Service, err)
	}

	host := ksvc.Service.Name + ".example.org"
	if test.ServingFlags.CustomDomain != "" {
		host = ksvc.Service.Name + "." + test.ServingFlags.CustomDomain
	}

	dm := v1beta1.DomainMapping{
		TypeMeta: metav1.TypeMeta{},
		ObjectMeta: metav1.ObjectMeta{
			Name:        host,
			Namespace:   ksvc.Service.Namespace,
			Annotations: map[string]string{"kourier.knative.dev/disable-http2": "true"},
		},
		Spec: v1beta1.DomainMappingSpec{
			Ref: duckv1.KReference{
				APIVersion: "serving.knative.dev/v1",
				Name:       ksvc.Service.Name,
				Namespace:  ksvc.Service.Namespace,
				Kind:       "Service",
			},
		},
		Status: v1beta1.DomainMappingStatus{},
	}

	_, err = clients.ServingBetaClient.DomainMappings.Create(ctx, &dm, metav1.CreateOptions{})
	if err != nil {
		t.Fatalf("Problem creating DomainMapping %q: %v", host, err)
	}
	t.Cleanup(func() {
		clients.ServingBetaClient.DomainMappings.Delete(ctx, dm.Name, metav1.DeleteOptions{})
	})

	waitErr := wait.PollImmediate(test.PollInterval, test.PollTimeout, func() (bool, error) {
		var err error
		dm, err := clients.ServingBetaClient.DomainMappings.Get(ctx, dm.Name, metav1.GetOptions{})
		if err != nil {
			return true, err
		}

		return dm.IsReady(), nil
	})
	if waitErr != nil {
		t.Fatalf("The DomainMapping %s was not marked as Ready: %v", dm.Name, waitErr)
	}

	if err := e2e.ValidateWebSocketConnection(t, clients, names, ""); err != nil {
		t.Error(err)
	}
}


text:
package com.facebook.buck.query;

import com.facebook.buck.query.QueryEnvironment.Argument;
import com.facebook.buck.query.QueryEnvironment.ArgumentType;
import com.facebook.buck.query.QueryEnvironment.QueryFunction;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.ListeningExecutorService;

import java.util.Set;

/**
 * A "buildfile" query expression, which computes the build files that define the given targets.
 *
 *
expr ::= BUILDFILE '(' expr ')'

 */
public class BuildFileFunction implements QueryFunction {

  private static final ImmutableList<ArgumentType> ARGUMENT_TYPES =
      ImmutableList.of(ArgumentType.EXPRESSION);

  public BuildFileFunction() {
  }

  @Override
  public String getName() {
    return "buildfile";
  }

  @Override
  public int getMandatoryArguments() {
    return 1;
  }

  @Override
  public ImmutableList<ArgumentType> getArgumentTypes() {
    return ARGUMENT_TYPES;
  }

  @Override
  public ImmutableSet<QueryTarget> eval(
      QueryEnvironment env,
      ImmutableList<Argument> args,
      ListeningExecutorService executor) throws QueryException, InterruptedException {
    Set<QueryTarget> argumentSet = args.get(0).getExpression().eval(env, executor);
    return env.getBuildFiles(argumentSet);
  }

}


text:
package jp.plen.scenography.exceptions;

public class BluetoothUnavailableException extends PlenConnectionException {
    private static final long serialVersionUID = 977731427742912901L;

    public BluetoothUnavailableException() {
    }

    public BluetoothUnavailableException(String detailMessage) {
        super(detailMessage);
    }

    public BluetoothUnavailableException(String detailMessage, Throwable throwable) {
        super(detailMessage, throwable);
    }

    public BluetoothUnavailableException(Throwable throwable) {
        super(throwable);
    }
}


text:
class Evaluation < ActiveRecord::Base
  belongs_to :evaluator
  belongs_to :citation

  def parser
	  self[:parser]||'parscit'
	end
end


text:
from django.conf.urls.defaults import patterns, include, url

from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'fclover.views.home', name='home'),
    # url(r'^fclover/', include('fclover.foo.urls')),
    url(r'^$', 'fclover.activity.views.index'),

    url(r'^signup/$', 'fclover.account.views.signup'),
    url(r'^signin/$', 'fclover.account.views.signin'),

    url(r'^create/$', 'fclover.activity.views.create'),
    url(r'^delete/$', 'fclover.activity.views.delete'),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),

    url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
)


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="4d4ac19b-c853-4b85-b1c1-958de60555ba" name="Default" comment="" />
    <ignored path="COMP1073-Assignment01-BS.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path=".idea/dataSources.local.xml" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="COMP1073-Assignment01-BS" />
  </component>
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="index.html" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/index.html">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0">
              <caret line="189" column="55" selection-start-line="189" selection-start-column="55" selection-end-line="189" selection-end-column="55" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="app.css" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/Content/css/app.css">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="54" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="app.js" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/Scripts/app.js">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.60840106">
              <caret line="30" column="5" selection-start-line="30" selection-start-column="5" selection-end-line="30" selection-end-column="5" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FileTemplateManagerImpl">
    <option name="RECENT_TEMPLATES">
      <list>
        <option value="CSS File" />
      </list>
    </option>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/Content/css/bootstrap.css" />
        <option value="$PROJECT_DIR$/Content/css/creative.css" />
        <option value="$PROJECT_DIR$/Content/css/app.css" />
        <option value="$PROJECT_DIR$/index.html" />
        <option value="$PROJECT_DIR$/Scripts/app.js" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" />
  <component name="JsBuildToolPackageJson" detection-done="true" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
  </component>
  <component name="PhpServers">
    <servers />
  </component>
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectFrameBounds">
    <option name="x" value="-8" />
    <option name="y" value="-8" />
    <option name="width" value="1456" />
    <option name="height" value="876" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="Scratches" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01-BS" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01-BS" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01-BS" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Content" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="img" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01-BS" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Content" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="img" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="portfolio" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01-BS" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Content" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01-BS" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="COMP1073-Assignment01" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Content" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="css" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="list.type.of.created.stylesheet" value="CSS" />
    <property name="settings.editor.selected.configurable" value="vcs.Git" />
    <property name="settings.editor.splitter.proportion" value="0.2" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.npm" factoryName="npm">
      <command value="run-script" />
      <scripts />
      <envs />
      <method />
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="4d4ac19b-c853-4b85-b1c1-958de60555ba" name="Default" comment="" />
      <created>1455285856978</created>
      <option name="number" value="Default" />
      <updated>1455285856978</updated>
    </task>
    <task id="LOCAL-00001" summary="Remove app.css">
      <created>1455307859247</created>
      <option name="number" value="00001" />
      <option name="project" value="LOCAL" />
      <updated>1455307859247</updated>
    </task>
    <task id="LOCAL-00002" summary="Add .btn-border class to creative.css">
      <created>1455308781744</created>
      <option name="number" value="00002" />
      <option name="project" value="LOCAL" />
      <updated>1455308781744</updated>
    </task>
    <task id="LOCAL-00003" summary="Update header section in index.html">
      <created>1455309109362</created>
      <option name="number" value="00003" />
      <option name="project" value="LOCAL" />
      <updated>1455309109362</updated>
    </task>
    <task id="LOCAL-00004" summary="Add images to portfolio.">
      <created>1455310748926</created>
      <option name="number" value="00004" />
      <option name="project" value="LOCAL" />
      <updated>1455310748926</updated>
    </task>
    <task id="LOCAL-00005" summary="Add logo to  nav bar.">
      <created>1455324240177</created>
      <option name="number" value="00005" />
      <option name="project" value="LOCAL" />
      <updated>1455324240177</updated>
    </task>
    <option name="localTasksCounter" value="6" />
    <servers />
  </component>
  <component name="TodoView">
    <todo-panel id="selected-file">
      <is-autoscroll-to-source value="true" />
    </todo-panel>
    <todo-panel id="all">
      <are-packages-shown value="true" />
      <is-autoscroll-to-source value="true" />
    </todo-panel>
  </component>
  <component name="ToolWindowManager">
    <frame x="-8" y="-8" width="1456" height="876" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5111421" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3289689" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32843137" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3251634" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3289689" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <MESSAGE value="Remove app.css" />
    <MESSAGE value="Add .btn-border class to creative.css" />
    <MESSAGE value="Update header section in index.html" />
    <MESSAGE value="Add images to portfolio" />
    <MESSAGE value="Add images to portfolio." />
    <MESSAGE value="Add logo to  nav bar." />
    <option name="LAST_COMMIT_MESSAGE" value="Add logo to  nav bar." />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="189" column="55" selection-start-line="189" selection-start-column="55" selection-end-line="189" selection-end-column="55" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/app.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="54" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Scripts/app.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="189" column="55" selection-start-line="189" selection-start-column="55" selection-end-line="189" selection-end-column="55" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/app.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="54" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Scripts/app.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/app.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="54" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Scripts/app.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="1" column="10" selection-start-line="1" selection-start-column="10" selection-end-line="1" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/app.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="54" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Scripts/app.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="1" column="10" selection-start-line="1" selection-start-column="10" selection-end-line="1" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="28" column="72" selection-start-line="28" selection-start-column="72" selection-end-line="28" selection-end-column="72" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/creative.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="450" column="0" selection-start-line="450" selection-start-column="0" selection-end-line="450" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/app.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Scripts/app.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Scripts/app.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/bootstrap.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.2">
          <caret line="4197" column="9" selection-start-line="4197" selection-start-column="3" selection-end-line="4197" selection-end-column="9" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/creative.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="450" column="0" selection-start-line="450" selection-start-column="0" selection-end-line="450" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Content/css/app.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="54" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="189" column="55" selection-start-line="189" selection-start-column="55" selection-end-line="189" selection-end-column="55" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Scripts/app.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.60840106">
          <caret line="30" column="5" selection-start-line="30" selection-start-column="5" selection-end-line="30" selection-end-column="5" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Example: Set and Get Properties</title>
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic">
    <link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/css/main.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">

Example: Set and Get Properties

<link href="../assets/node/node.css" rel="stylesheet" type="text/css">

This example demonstrates how to retrieve and use a Node instance
    and access DOM properties.

Press a button to get or set the offsetWidth of the div
    containing the corn image.

? px

    Width:
    <input id="input" size="2" value="550"> px
    <button class="yui3-button btn-set">Set</button>
    <button class="yui3-button btn-get">Get</button>

Image derived from

"ear of corn", by normanack

Setting up the HTML

<div id="ruler"></div>
<div id="corn">
    <div class="ruler-marker"></div>
    <div id="output">? px</div>
</div>
<label>Width:</label>
<input id="input" size="2" value="550"> px
<button class="yui3-button btn-set">Set</button>
<button class="yui3-button btn-get">Get</button>

Getting a Node Instance

The Y.one method accepts a Selector or HTML element and
returns a Node instance.  First we'll set up some variables
for the node's representing our HTML.

var corn = Y.one('#corn'),
    input = Y.one('.example #input'),
    output = Y.one('.example #output');

Accessing Node Properties

The properties of a node can be accessed via its set and
get methods.

In most cases, simple type of properties (strings, numbers, Booleans)
pass directly to/from the underlying DOM node, however properties representing
other DOM nodes return Node or NodeList instances.

The Get Method

We can use the get method to read the offsetWidth of the div
containing the corn image,
which includes the style width, padding, and border.

width = corn.get('offsetWidth');

The Set Method

The Set method can be used to set the value of objects

input.set('value', 237);

The offsetWidth property of an HTML element is read only, however YUI
makes this writeable.  This assures that the final offsetWidth
matches the value that is set, regardless of borders, padding, or box model.

corn.set('offsetWidth', value);

Listening for Node Events

We will update the value offsetWidth property of the div
containing the corn image when the Set button is pressed.

Y.one('.example .btn-set').on('click', function(e) {
    ...
    corn.set('offsetWidth', value);
    ...
};

Complete Example Source

<style>
.example #corn{
    position: relative;
    background: url(../assets/node/images/corn.jpg);
    width: 232px;
    height: 181px;
    -moz-box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.4);
    -webkit-box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.4);
    margin: 2px 0 1em;
    border: none;
}
.example #ruler{
    width: 650px;
    height: 42px;
    background: url("../assets/node/images/ruler_ticks.png") repeat-x scroll -1px 24px #DDCEB7;
}
.example .yui3-button {
    margin: 0 0.2em;
}
.example .btn-get{
    margin-left: 4em;
}
#input {
    height: 1.6em;
    width: 4em;
}
#output{
    position: absolute;
    top: -40px;
    width: 100px;
    height: 40px;
    right: -50px;
    text-align: center;
    cursor: pointer;
}
#corn .ruler-marker{
    position: absolute;
    top:  -20px;
    right: 0;
    height: 30px;
    border-right: solid 1px #f00;
}
</style>

<body>
    <div id="ruler"></div>
    <div id="corn">
        <div class="ruler-marker"></div>
        <div id="output">? px</div>
    </div>
    <label>Width:</label>
    <input id="input" size="2" value="550"> px
    <button class="yui3-button btn-set">Set</button>
    <button class="yui3-button btn-get">Get</button>
<script>
YUI().use('node', 'button', function(Y) {
    var corn = Y.one('#corn'),
        input = Y.one('.example #input'),
        output = Y.one('.example #output');

    var getWidth = function(){
       var width = corn.get('offsetWidth');
       output.setHTML(width + 'px'); // display width near the get button
    }

    Y.one('.example .btn-get').on('click', getWidth);
    output.on('click', getWidth); // also allows getting width by clicking on ruler width label

    Y.one('.example .btn-set').on('click', function(e) {
        var value = input.get('value'),
            width = corn.get('offsetWidth');
        if (value == '') {
            input.set('value', width);
        } else if (!isNaN(parseInt(value))) { // if the value in the input is a number
            corn.set('offsetWidth', value);
            output.setHTML('? ' + 'px'); // clear out the width label on the ruler
        }
    });
});
</script>

Examples

                                            Set and Get Properties

                                            DOM Methods

                                            DOM Methods - Store

                                            Handling DOM Events

                                            Using NodeList - Simple

                                            Using NodeList - Ducks Game

                                            Delegating Node Events

                                            Node Positioning

                                            Node Styling

                                            Adding Node Content - Burger Builder

                                            Showing and Hiding

Examples That Use This Component

                                            Photo Browser

                                            Portal Style Example

                                            Accessible Toolbar

                                            Accessible Menu Button

                                            Simple DOM Events

                                            Request XML data from Yahoo! Weather

                                            Request JSON using Yahoo! Pipes


text:
package com.martinkampjensen.thesis.model.impl;

import com.martinkampjensen.thesis.model.ZMatrix;

/**
 * This class provides a skeletal implementation of the {@link ZMatrix}
 * interface, to minimize the effort required to implement this interface.
 */
public abstract class AbstractZMatrix extends AbstractComparableModel
implements ZMatrix
{
	protected AbstractZMatrix()
	{
	}

	@Override
	public final double getAngle(int id)
	{
		return getTorsionAngle(id);
	}

	@Override
	public final void setAngle(int id, double value)
	{
		setTorsionAngle(id, value);
	}

	@Override
	public final int additionalSize()
	{
		return NUMBER_OF_REFERENCE_ROWS;
	}
}


text:
from supriya.tools import osctools
from supriya.tools.requesttools.Request import Request

class SynthDefReceiveRequest(Request):
    r'''A /d_recv request.
    '''

    ### CLASS VARIABLES ###

    __slots__ = (
        '_completion_message',
        '_synthdefs',
        )

    ### INITIALIZER ###

    def __init__(
        self,
        completion_message=None,
        synthdefs=None,
        ):
        from supriya.tools import synthdeftools
        Request.__init__(self)
        self._completion_message = completion_message
        if synthdefs:
            prototype = synthdeftools.SynthDef
            if isinstance(synthdefs, prototype):
                synthdefs = (synthdefs,)
            assert all(isinstance(x, prototype) for x in synthdefs)
            synthdefs = tuple(synthdefs)
        self._synthdefs = synthdefs

    ### PUBLIC METHODS ###

    def to_osc_message(self):
        from supriya.tools import synthdeftools
        request_id = int(self.request_id)
        compiled_synthdefs = synthdeftools.SynthDefCompiler.compile_synthdefs(
            self.synthdefs,
            )
        compiled_synthdefs = bytearray(compiled_synthdefs)
        contents = [
            request_id,
            compiled_synthdefs,
            ]
        if self.completion_message:
            completion_message = self.completion_message.to_datagram()
            completion_message = bytearray(completion_message)
            contents.append(completion_message)
        message = osctools.OscMessage(*contents)
        return message

    ### PUBLIC PROPERTIES ###

    @property
    def completion_message(self):
        return self._completion_message

    @property
    def response_specification(self):
        from supriya.tools import responsetools
        return {
            responsetools.DoneResponse: {
                'action': ('/d_recv',),
                },
            }

    @property
    def request_id(self):
        from supriya.tools import requesttools
        return requesttools.RequestId.SYNTHDEF_RECEIVE

    @property
    def synthdefs(self):
        return self._synthdefs


text:
var insertImageBoardAfterCreate = true;

var _csrf = $('meta[name=csrf-token]').attr('content');
var uploader = new Q.Uploader({
    url: "/imageupload?type=file&_csrf=" + _csrf,
    target: document.getElementById("upload_area"),
    view: document.getElementById("preview"),
    allows: ".jpg,.png,.gif,.bmp,.jpeg",
    auto: false,
    multiple: false,
    dataType: "json",
    data: {title: 'test'},
    //图片缩放
    // DONE(hhdem) 如果服务器是在win环境下, 打开图片缩放将无法成功上传
    // scale: {
    //     //最大图片大小(width|height)
    //     maxWidth: 700
    // },
    UI: {
        init: function () {
            console.info('UI init method');
        },
        draw: function (task) {
            var self = this,
                ops = self.ops,
                boxView = ops.view;

            if (!boxView) return;

            var name = task.name;

            var li = '';
            loadImage(task.file,
                function (img, data) {
                    img.style.width = '100%';
                    var html =
                        '

';
                    var taskId = task.id,
                        box = Q.createEle("div", "u-item", html);

                    box.taskId = taskId;

                    var boxImage = Q.getFirst(box);

                    task.box = box;
                    boxImage.appendChild(img);
                    //添加到视图中
                    boxView.appendChild(box);

                    //---------------- 预览图片并更新UI ----------------
                    $('#preview-desc').html(name);
                    $('#preview').append(img);
                },
                {orientation: true} // Options
            );

            //self.previewImage(boxImage, task, ops);
        },
        update: function (task) {

        }
    },
    on: {
        //添加之前触发
        add: function (task) {
            if (task.disabled) {return alert("允许上传的文件格式为:" + this.ops.allows)}
            $('#upload_view').show();
            $('#upload_area').hide();
        },
        //图片预览后触发
        preview: function (data) {
            console.log(data.task.name + " : " + data.src);
        },
        //图片压缩后触发,如果图片或浏览器不支持压缩,则不触发
        scale: function (data) {
            console.log(data.task.name + " : 已压缩!");
        },
        //上传之前触发
        upload: function (task) {
            //可针对单独的任务配置参数(POST方式)
            var boardSelected = $('#image_upload .right-part .boardlist .item.selected');
            uploader.data = {
                title: $('#preview-desc').val(),
                board: boardSelected.data("id")
            };
        },
        //上传完成后触发
        complete: function (task) {
            if (task.state != Q.Uploader.COMPLETE) {return console.log(task.name + ": " + Q.Uploader.getStatusText(task.state) + "!")}

            var json = task.json;
            if (!json.success) {
                $('#board_message_alert .alert-content').html(json.msg);
                $('#board_message_alert').fadeIn();
                return console.error(task.name + ": 服务器未返回正确的数据!", json.msg);
            }

            console.log(task.name + ": 服务器返回 " + (task.response || ""));
            // 如果需要插入则把新创建的图片插入到列表中
            if (insertImageBoardAfterCreate && gridMasonry) {
                var resJson = JSON.parse(task.response);
                var item = resJson.data[0];
                var itemHtml = $("#picBoxTmp").tmpl({
                    item: item,
                    highlight: true,
                    image: $('#preview').children('canvas').html()
                });

                var jpicelements = $(itemHtml);
                // 上传成功后, 直接把预览里的 canvas 加入 _pic_box 里面
                jpicelements.children('#pic_' + item.id).children('img').remove();
                jpicelements.children('#pic_' + item.id).prepend($('#preview').children('canvas'));
                // TODO 把预览里的board信息也添加到 _pic_box 里面
                //var jpicelements = $('

');

                //gridMasonry.append(jpicelements)
                //    .masonry('prepended', jpicelements);
                if (!!gridMasonry) {
                    gridMasonry.append(jpicelements).masonry('insertItems', 1, jpicelements);
                    gridMasonry.imagesLoaded().progress(function () {
                        gridMasonry.masonry('layout');
                    });
                }
            }
            //this.list  为上传任务列表
            //this.index 为当前上传任务索引
            if (this.index >= this.list.length - 1) {
                //所有任务上传完成
                console.log("所有任务上传完成:" + new Date());
                $('#image_upload').modal('hide');
                $('#upload-submit').button('reset');
            }
        }

    }
});

// 开始上传图片
document.getElementById("upload-submit").onclick = function () {
    var $this = $(this);
    if(boardList.length == 0) {
        // 如果没有 Board 提示创建
        $('#board_message_alert .alert-content').html('请先创建一个 Board 吧!');
        $('#board_message_alert').fadeIn();
        return;
    }
    $this.button('loading');
    uploader.start();
};

$('#image_upload').on('hidden.bs.modal', function (e) {
    $('#upload-submit').button('reset');
    $('#upload_area').show();
    $('#upload_view').hide();
    $('#preview').html('');
});
$('#image_upload').on('hide.bs.modal', function (e) {
    $('#upload-submit').button('reset');
    $('#upload_area').show();
    $('#upload_view').hide();
    $('#preview').html('');
});

function isInsertImageBoardAfterCreate (isInsert) {
    insertImageBoardAfterCreate = isInsert;
}


text:
ansible-lemp
=========

> [Ansible](http://www.ansible.com) role to install the LEMP stack in Ubuntu Trusty.

Requirements
------------

None.

Role Variables
--------------

- `lemp_upload_max_filesize`: value of variable `upload_max_filesize` in php.ini, by default 10M
- `lemp_post_max_size`: value of variable `post_max_size` in php.ini, by default 12M

Dependencies
------------

This role depends on the roles `larixsource.ec2-mysql` and `azavea.nginx`.

Install Playbook
----------------

`
    ansible-galaxy install larixsource.lemp
`
Example Playbook
----------------

```yml
- hosts: servers
  vars:
    - mysql_use_ebs: true
    - mysql_ebsdev: 'xvdg'
    - mysql_root_password: 'supersecret'
    - nginx_delete_default_site: true
    - lemp_upload_max_filesize: 10M
    - lemp_post_max_size: 22M
  roles:
     - larixsource.lemp
```

Also, there's an example of provisioning with Vagrant in a local VM in the directory `test`.

License
-------

Apache-2.0

Author Information
------------------

Courtesy of [Larix](http://www.larix.cl) team.


text:
"use strict";

var _core = require("6to5-runtime/core-js")["default"];
var _regeneratorRuntime = require("6to5-runtime/regenerator")["default"];
var _to5Helpers = require("6to5-runtime/helpers")["default"];

/**
Reads a given filePath using `fs.readFile`, returning a promise
that resolves with the UTF8 contents of the file in a string

@async
@method readFile
@param filePath {String} Filepath to read from
@Return {String} UTF-8 encoded file contents
**/
exports.readFile = readFile;

/**
Parses a given peice of LESS as a string, and compiles an Abstract
Syntax Tree using the LESS libraries `parse` method.

@async
@method parse
@param filePath {String} Filepath to read contents from
@param [options] LESS Parser options
@return {Object} Object containg LESS AST Object instance and it's imports
**/
exports.parse = parse;

/**
Generates CSS output from a given AST node

@method toCSS
@param ast {Object} Root AST node to generate CSS for
@param imports {Object} Imports for the given AST
@param options {Object} LESS configuration obect
@return {String} Generated CSS
**/
exports.toCSS = toCSS;
var less = _to5Helpers.interopRequire(require("less"));

var fs = _to5Helpers.interopRequire(require("fs"));

var Parser = _to5Helpers.interopRequire(require("./parser"));

function readFile(filePath) {
	return _regeneratorRuntime.async(function readFile$(context$1$0) {
		while (1) switch (context$1$0.prev = context$1$0.next) {
			case 0:
				return context$1$0.abrupt("return", new _core.Promise(function (resolve, reject) {
					fs.readFile(filePath, function (err, contents) {
						if (err) {
							reject(err);
						}
						resolve(contents.toString("utf8"));
					});
				}));
			case 1:
			case "end":
				return context$1$0.stop();
		}
	}, null, this);
}function parse(filePath, options) {
	var contents;
	return _regeneratorRuntime.async(function parse$(context$1$0) {
		while (1) switch (context$1$0.prev = context$1$0.next) {
			case 0:
				context$1$0.next = 2;
				return readFile(filePath);
			case 2:
				contents = context$1$0.sent;
				return context$1$0.abrupt("return", new _core.Promise(function (resolve, reject) {
					less.parse(contents, options, function (err, root, imports, options) {
						if (err) {
							reject(err);
						}
						resolve({ root: root, imports: imports });
					});
				}));
			case 4:
			case "end":
				return context$1$0.stop();
		}
	}, null, this);
}function toCSS(ast, imports, options) {
	return new less.ParseTree(ast, imports, options).toCSS(options).css;
}
Object.defineProperty(exports, "__esModule", {
	value: true
});


text:
/**
 * Available user interfaces.
 */
package jermit.ui;


text:
@interface TLFormFieldImage : TLFormField

@end