text:
//--------------------------------------------------------------------------
// Example macro for running locally AliAnalysisTaskNorm task
//
//
//--------------------------------------------------------------------------

enum {kLocal, kInteractif_xml, kInteractif_ESDList};
Int_t GetMode(TString inputFileName);
TChain* CreateChainFromCollection(const char *xmlfile);
TChain* CreateChainFromAODFile(const char *rootfile,Bool_t isESD);
TChain* CreateChainFromESDList(const char *esdList);
TChain* CreateChain(TString inputFileName,Bool_t isESD);

void runNorm(TString inputFileName = "AliAOD.root", Int_t nEvents = 1e6, TString beamConf = "p-Pb", Bool_t isESD = kFALSE, Bool_t isMC = kFALSE, Int_t debugLevel = 0)
{

  TStopwatch timer;
  timer.Start();

  // Check runing mode
  Int_t mode = GetMode(inputFileName);
  if(mode < 0){
    Error("runAnalysis","Please provide either an ESD/AOD root file or a collection of ESDs/AODs.");
    return;
  }

  // Load common libraries
  gSystem->Load("libTree");
  gSystem->Load("libGeom");
  gSystem->Load("libVMC");
  gSystem->Load("libPhysics");
  gSystem->Load("libSTEERBase");
  //  gSystem->Load("libSTEER");
  gSystem->Load("libESD");
  gSystem->Load("libAOD");
  gSystem->Load("libANALYSIS");
  gSystem->Load("libANALYSISalice");
  gSystem->Load("libEventMixing");
  gSystem->Load("libCORRFW");
  gSystem->Load("libPWGmuon");
  gSystem->Load("libPWGmuondep");

  gSystem->AddIncludePath(Form("-I\"%s/include\" -I\"%s/include\"", gSystem->ExpandPathName("$ALICE_ROOT"),gSystem->ExpandPathName("$ALICE_PHYSICS")));
  gROOT->ProcessLine(Form(".include %s/include %s/include", gSystem->ExpandPathName("$ALICE_ROOT"), gSystem->ExpandPathName("$ALICE_PHYSICS")));

  // Create input chain
  TChain* chain = CreateChain(inputFileName,isESD);
  if (!chain) return;

  // Create the analysis manager
  AliAnalysisManager *mgr = new AliAnalysisManager("MuonTask");

  if ( isESD) {
    // ESD input handler
    AliESDInputHandler* esdH = new AliESDInputHandler();
    esdH->SetReadFriends(kFALSE);
    mgr->SetInputEventHandler(esdH);
  }
  else {
    // AOD input handler
    AliAODInputHandler* aodH = new AliAODInputHandler();
    mgr->SetInputEventHandler(aodH);
  }

  TString dataType = mgr->GetInputEventHandler()->GetDataType();
  Info("runLocal",Form("Manager with %s",dataType.Data()));

 // Enable MC event handler for ESDs
  if ( isMC && isESD ){
    AliVEventHandler* handler = new AliMCEventHandler;
    mgr->SetMCtruthEventHandler(handler);
  }

  // event selection and centrality framework
  if ( isESD ){
    gROOT->LoadMacro("$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C");
    AliPhysicsSelectionTask* physicsSelection = AddTaskPhysicsSelection(isMC);
    if ( !physicsSelection ) {
      Error("runLocal","AliPhysicsSelectionTask not created!");
      return;
    }
  }
  if ( isESD ){
    // event centrality
    gROOT->LoadMacro("$ALICE_PHYSICS/OADB/macros/AddTaskCentrality.C");
    AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();
    if ( !taskCentrality ) {
      Error("runLocal on ESD","AliCentralitySelectionTask not created!");
      return;
    }
    if ( isMC ) taskCentrality->SetMCInput();
    //taskCentrality->SetPass(1); // remember to set the pass you are processing!!!
  }
  /*else {
    //Only on full AOD, it is possible to reprocess the centrality framework
    gROOT->LoadMacro("$ALICE_PHYSICS/OADB/macros/AddTaskCentrality.C");
    AliCentralitySelectionTask *taskCentrality = AddTaskCentrality(kTRUE,kTRUE);
    if ( !taskCentrality ) {
      Error("runLocal on AOD","AliCentralitySelectionTask not created!");
      return;
    }
    if ( isMC ) taskCentrality->SetMCInput();
    }*/

  // Example analysis
  // Create task
  //Analysis task is on working directory
  //  gROOT->LoadMacro("AliAnalysisTaskNorm.cxx+g");
  //  gROOT->LoadMacro("AddTaskNorm.C");
  gROOT->LoadMacro("$ALICE_PHYSICS/../src/PWG/muon/AliAnalysisTaskNorm.cxx+g");
  gROOT->LoadMacro("$ALICE_PHYSICS/../src/PWG/muon/AddTaskNorm.C");
  AliAnalysisTaskNorm* task = AddTaskNorm(isESD,isMC,beamConf);
  if (!task) {
    Error("runAnalysis","AliAnalysisTaskNorm not created!");
    return;
  }
  task->SetDebugLevel(debugLevel);

  // Enable debug printouts
  mgr->SetDebugLevel(debugLevel);

  // start local analysis
  if (mgr->InitAnalysis()) {
    mgr->PrintStatus();
    if(debugLevel>=2) mgr->SetNSysInfo(100);
    mgr->StartAnalysis("local", chain, nEvents);
  }

  if(debugLevel>=2){
    mgr->ProfileTask("Task");
  }

  timer.Stop();
  timer.Print();
}

//______________________________________________________________________________
Int_t GetMode(TString inputFileName)
{
  if ( inputFileName.EndsWith(".xml") ) return kInteractif_xml;
  else if ( inputFileName.EndsWith(".txt") ) return kInteractif_ESDList;
  else if ( inputFileName.EndsWith(".root") ) return kLocal;
  return -1;
}

//______________________________________________________________________________
TChain* CreateChainFromCollection(const char *xmlfile)
{
  // Create a chain from the collection of tags.
  TGridCollection* coll = gGrid->OpenCollection(xmlfile);
  if (!coll) {
    ::Error("CreateChainFromTags", "Cannot create an AliEn collection from %s", xmlfile);
    return NULL;
  }

  TGridResult* tagResult = coll->GetGridResult("",kFALSE,kFALSE);
  AliTagAnalysis *tagAna = new AliTagAnalysis("ESD");
  tagAna->ChainGridTags(tagResult);

  AliRunTagCuts      *runCuts = new AliRunTagCuts();
  AliLHCTagCuts      *lhcCuts = new AliLHCTagCuts();
  AliDetectorTagCuts *detCuts = new AliDetectorTagCuts();
  AliEventTagCuts    *evCuts  = new AliEventTagCuts();

  // Check if the cuts configuration file was provided
  if (!gSystem->AccessPathName("ConfigureCuts.C")) {
    gROOT->LoadMacro("ConfigureCuts.C");
    ConfigureCuts(runCuts, lhcCuts, detCuts, evCuts);
  }

  TChain *chain = tagAna->QueryTags(runCuts, lhcCuts, detCuts, evCuts);
  if (!chain || !chain->GetNtrees()) return NULL;
  chain->ls();
  return chain;
}

//______________________________________________________________________________
TChain* CreateChainFromAODFile(const char *rootfile, Bool_t isESD)
{
  // Create a chain using the root file.
  TChain* chain = 0;
  if ( !isESD) chain = new TChain("aodTree");
  else chain = new TChain("esdTree");
  chain->Add(rootfile);
  if (!chain->GetNtrees()) return NULL;
  chain->ls();
  return chain;
}

//______________________________________________________________________________
TChain* CreateChainFromESDList(const char *esdList)
{
  // Create a chain using tags from the run list.
  TChain* chain = new TChain("esdTree");
  ifstream inFile(esdList);
  TString inFileName;
  if (inFile.is_open()) {
    while (! inFile.eof() ) {
      inFileName.ReadLine(inFile,kFALSE);
      if(!inFileName.EndsWith(".root")) continue;
      chain->Add(inFileName.Data());
    }
  }
  inFile.close();
  if (!chain->GetNtrees()) return NULL;
  chain->ls();
  return chain;
}

//______________________________________________________________________________
TChain* CreateChain(TString inputFileName, Bool_t isESD)
{
  printf("*******************************\n");
  printf("*** Getting the Chain       ***\n");
  printf("*******************************\n");
  Int_t mode = GetMode(inputFileName);
  if(mode == kInteractif_xml) return CreateChainFromCollection(inputFileName.Data());
  else if (mode == kInteractif_ESDList) return CreateChainFromESDList(inputFileName.Data());
  else if (mode == kLocal) return CreateChainFromAODFile(inputFileName.Data(),isESD);
  else return NULL;
}


text:
@interface SettingViewModel ()

@property(nonatomic, strong) NSArray *dataArray;

@end

@implementation SettingViewModel

- (NSArray *)dataArray {
    if (!_dataArray) {
        self.dataArray = @[@"检查更新", @"关于我们"];
    }
    return _dataArray;
}

#pragma mark- tableView代理

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.dataArray.count;;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 45 * kScaleForScreenHeight;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *reuseIdentifier = @"reuse";
    SettingCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    if (!cell) {
        cell = [[SettingCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
    }
    cell.titleL.text = self.dataArray[indexPath.row];
    return cell;
}

@end

redpajama_set_name: RedPajamaGithub


text:
package org.takes.servlet;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpCookie;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import org.cactoos.Text;
import org.cactoos.text.Lowered;
import org.cactoos.text.Split;
import org.cactoos.text.TextOf;
import org.cactoos.text.Trimmed;
import org.cactoos.text.UncheckedText;
import org.takes.Response;
import org.takes.misc.Equality;

/**
 * Takes response as servlet response.
 *
 * @since 2.0
 * @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
 */
final class ResponseOf {
    /**
     * Buffer size.
     */
    private static final int BUFSIZE = 8192;

    /**
     * Http response first line head pattern.
     */
    private static final Pattern HTTP_MATCHER = Pattern.compile(
        "^HTTP/(?:1\\.1|2) (?<code>\\d+).*$",
        Pattern.CANON_EQ | Pattern.DOTALL | Pattern.CASE_INSENSITIVE
    );

    /**
     * Origin response.
     */
    private final Response rsp;

    /**
     * Ctor.
     * @param response Origin takes response
     */
    ResponseOf(final Response response) {
        this.rsp = response;
    }

    /**
     * Apply to servlet response.
     * @param sresp Servlet response
     * @throws IOException If fails
     */
    public void applyTo(final HttpServletResponse sresp) throws IOException {
        final Iterator<String> head = this.rsp.head().iterator();
        final Matcher matcher = ResponseOf.HTTP_MATCHER.matcher(head.next());
        if (matcher.matches()) {
            sresp.setStatus(Integer.parseInt(matcher.group(1)));
            while (head.hasNext()) {
                ResponseOf.applyHeader(sresp, head.next());
            }
            try (
                InputStream body = this.rsp.body();
                OutputStream out = sresp.getOutputStream()
            ) {
                final byte[] buff = new byte[ResponseOf.BUFSIZE];
                // @checkstyle LineLengthCheck (1 line)
                for (int read = body.read(buff); read >= 0; read = body.read(buff)) {
                    out.write(buff);
                }
            }
        } else {
            throw new IOException("Invalid response: response code not found");
        }
    }

    /**
     * Apply header to servlet response.
     * @param sresp Response
     * @param header Header
     */
    @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
    private static void applyHeader(final HttpServletResponse sresp,
        final String header) {
        final Iterator<Text> split = new Split(header, ":").iterator();
        final UncheckedText name = new UncheckedText(new Trimmed(split.next()));
        final UncheckedText val = new UncheckedText(new Trimmed(split.next()));
        if (new Equality<Text>(
            new TextOf("set-cookie"),
            new Lowered(name)
        ).value()
        ) {
            for (final HttpCookie cck : HttpCookie.parse(header)) {
                sresp.addCookie(
                    new Cookie(cck.getName(), cck.getValue())
                );
            }
        } else {
            sresp.setHeader(name.asString(), val.asString());
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="lightgrey">#eee</color>
</resources>


text:
'use strict';
(function (angular, buildfire) {
  angular
    .module('eventsManualPluginContent')
    .controller('ContentEventCtrl', ['$scope', '$routeParams', 'Buildfire', 'DataStore', 'TAG_NAMES', 'ADDRESS_TYPE', '$location', 'Utils', '$timeout',
      function ($scope, $routeParams, Buildfire, DataStore, TAG_NAMES, ADDRESS_TYPE, $location, Utils, $timeout) {
        var ContentEvent = this;
        var currentUserDate = +new Date();
        var _data = {
          "title": "",
          "listImage": "",
          "deepLinkUrl": "",
          "carouselImages": [],
          "startDate": "",
          "endDate": "",
          "isAllDay": "",
          "timezone": "",
          "timeDisplay": "",
          "repeat": {},
          "addressTitle": "",
          "address": {},
          "description": "",
          "links": []
        };

        //Scroll current view to top when page loaded.
        if (buildfire.navigation.scrollTop) {
          buildfire.navigation.scrollTop();
        }
        ContentEvent.event = {
          data: angular.copy(_data)
        };
        ContentEvent.isUpdating = false;
        ContentEvent.isNewEventInserted = false;
        ContentEvent.unchangedData = true;
        ContentEvent.displayTiming = "USER";

        ContentEvent.isValidEvent = function (event) {
          if (event.isAllDay)
            return (event.startDate && event.title);
          else if (event.endTime)
            return (event.startDate && event.title && event.startTime && !(+new Date(event.startTime) == +new Date(event.endTime)));
          else
            return (event.startDate && event.title && event.startTime);
        };

        var updateMasterEvent = function (event) {
          ContentEvent.masterEvent = angular.copy(event);
        };

        var isUnchanged = function (event) {
          return angular.equals(event, ContentEvent.masterEvent);
        };

        function balanceDateTime() {
          var _obj = {};
          if(ContentEvent.event.data.startTime != ContentEvent.event.data.startDate && +ContentEvent.event.data.startTime) {
            _obj.time = new Date(ContentEvent.event.data.startTime);
            _obj.date = new Date(ContentEvent.event.data.startDate);
            ContentEvent.event.data.startDate = +new Date(
              _obj.date.getFullYear(),
              _obj.date.getMonth(),
              _obj.date.getDate(),
              _obj.time.getHours(),
              _obj.time.getMinutes()
            );
            ContentEvent.event.data.startTime = ContentEvent.event.data.startDate;
          }
          if(ContentEvent.event.data.endTime != ContentEvent.event.data.endDate && +ContentEvent.event.data.endTime) {
            _obj.time = new Date(ContentEvent.event.data.endTime);
            _obj.date = new Date(ContentEvent.event.data.endDate);
            ContentEvent.event.data.endDate = +new Date(
              _obj.date.getFullYear(),
              _obj.date.getMonth(),
              _obj.date.getDate(),
              _obj.time.getHours(),
              _obj.time.getMinutes()
            );
            ContentEvent.event.data.endTime = ContentEvent.event.data.endDate;
          }
        }

        ContentEvent.getItem = function (id) {
          var successEvents = function (result) {
            console.log("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", result);
            ContentEvent.event = result;
            balanceDateTime();
            if(ContentEvent.event.data.isAllDay) {
              ContentEvent.event.data.timezone = "";
              ContentEvent.event.data.timeDisplay = "USER";
              ContentEvent.displayTiming = "USER"
            }
            if (ContentEvent.event.data.address && ContentEvent.event.data.address.location) {
              ContentEvent.currentAddress = ContentEvent.event.data.address.location;
              ContentEvent.currentCoordinates = ContentEvent.event.data.address.location_coordinates;
            }
            if (ContentEvent.event.data.listImage) {
              listImage.loadbackground(ContentEvent.event.data.listImage);
            }
            if (ContentEvent.event.data.timeDisplay && ContentEvent.event.data.timeDisplay == 'SELECTED') {
              ContentEvent.displayTiming = ContentEvent.event.data.timeDisplay == "USER";
            }
            if (ContentEvent.event.data.repeat) {
              if (ContentEvent.event.data.repeat.endOn)
                ContentEvent.event.data.repeat.endOn = new Date(ContentEvent.event.data.repeat.endOn);
            }
            if (!ContentEvent.event.data.carouselImages)
              editor.loadItems([]);
            else
              editor.loadItems(ContentEvent.event.data.carouselImages);
            _data.dateCreated = result.data.dateCreated;
            updateMasterEvent(ContentEvent.event);
          }, errorEvents = function () {
            throw console.error('There was a problem fetching your data', err);
          };
          DataStore.getById(id, TAG_NAMES.EVENTS_MANUAL).then(successEvents, errorEvents);
        };

        ContentEvent.descriptionWYSIWYGOptions = {
          plugins: 'advlist autolink link image lists charmap print preview',
          skin: 'lightgray',
          trusted: true,
          theme: 'modern'
        };

        /**
         * link and sortable options
         */
        var linkOptions = {"icon": "true"};

        ContentEvent.linksSortableOptions = {
          handle: '> .cursor-grab'
        };

        ContentEvent.validCoordinatesFailure = false;

        // create a new instance of the buildfire carousel editor
        var editor = new Buildfire.components.carousel.editor("#carousel");
        // this method will be called when a new item added to the list
        editor.onAddItems = function (items) {
          if (!ContentEvent.event.data.carouselImages)
            ContentEvent.event.data.carouselImages = [];
          ContentEvent.event.data.carouselImages.push.apply(ContentEvent.event.data.carouselImages, items);
          $scope.$digest();
        };
        // this method will be called when an item deleted from the list
        editor.onDeleteItem = function (item, index) {
          ContentEvent.event.data.carouselImages.splice(index, 1);
          $scope.$digest();
        };
        // this method will be called when you edit item details
        editor.onItemChange = function (item, index) {
          ContentEvent.event.data.carouselImages.splice(index, 1, item);
          $scope.$digest();
        };
        // this method will be called when you change the order of items
        editor.onOrderChange = function (item, oldIndex, newIndex) {
          var items = ContentEvent.event.data.carouselImages,
            tmp = items[oldIndex],
            i;

          if (oldIndex < newIndex) {
            for (i = oldIndex + 1; i <= newIndex; i++) {
              items[i - 1] = items[i];
            }
          } else {
            for (i = oldIndex - 1; i >= newIndex; i--) {
              items[i + 1] = items[i];
            }
          }
          items[newIndex] = tmp;

          ContentEvent.event.data.carouselImages = items;
          $scope.$digest();
        };

        ContentEvent.addNewEvent = function () {
          ContentEvent.isNewEventInserted = true;
          ContentEvent.event.data.dateCreated = +new Date();
          localStorage.setItem('pluginLoadedFirst', true);

          ContentEvent.autoFillDates();

          var successEvents = function (result) {
            console.log("Inserted", result.id);
            ContentEvent.isUpdating = false;
            ContentEvent.event.id = result.id;
            _data.dateCreated = ContentEvent.event.data.dateCreated;
            updateMasterEvent(ContentEvent.event);
            ContentEvent.event.data.deepLinkUrl = Buildfire.deeplink.createLink({id: result.id});
            if (ContentEvent.event.id) {
              buildfire.messaging.sendMessageToWidget({
                id: ContentEvent.event.id,
                type: 'AddNewItem'
              });
            }
          }, errorEvents = function () {
            ContentEvent.isNewEventInserted = false;
            return console.error('There was a problem saving your data');
          };
          if (ContentEvent.event.data.repeat) {
            if (ContentEvent.event.data.repeat.endOn)
              ContentEvent.event.data.repeat.endOn = +new Date(ContentEvent.event.data.repeat.endOn);
          }
          DataStore.insert(ContentEvent.event.data, TAG_NAMES.EVENTS_MANUAL).then(successEvents, errorEvents);
        };

        ContentEvent.updateEventData = function () {
          if (ContentEvent.event.data.repeat) {
            if (ContentEvent.event.data.repeat.endOn)
              ContentEvent.event.data.repeat.endOn = +new Date(ContentEvent.event.data.repeat.endOn);
          }
          if(ContentEvent.event.data.isAllDay) {
            ContentEvent.event.data.timezone = "";
            ContentEvent.event.data.timeDisplay = "USER";
            ContentEvent.displayTiming = "USER"
          }
          balanceDateTime();
          DataStore.update(ContentEvent.event.id, ContentEvent.event.data, TAG_NAMES.EVENTS_MANUAL, function (err) {
            ContentEvent.isUpdating = false;
            if (err)
              return console.error('There was a problem saving your data');
          })
        };

        ContentEvent.autoFillDates = function () {
          var _endDateObj, _startTimeObj = {};
          if(!ContentEvent.event.data.isAllDay) {
            _startTimeObj.date = new Date(ContentEvent.event.data.startTime);
            _startTimeObj.minutes = _startTimeObj.date.getHours() * 60;
            _startTimeObj.minutes += _startTimeObj.date.getMinutes();
            _startTimeObj.millis = _startTimeObj.minutes * 60 * 1000;

            ContentEvent.event.data.startDate += _startTimeObj.millis;
            ContentEvent.event.data.startTime = ContentEvent.event.data.startDate;
            ContentEvent.event.data.endDate = ContentEvent.event.data.startDate;

            _endDateObj = new Date(ContentEvent.event.data.startDate);
            _endDateObj.setHours(_endDateObj.getHours() + 1);

            ContentEvent.event.data.endTime = _endDateObj.getTime();
          } else {
            ContentEvent.event.data.endDate = ContentEvent.event.data.startDate;
          }
        };

        var tmrDelayForEvent = null;

        var updateItemsWithDelay = function (event) {
          clearTimeout(tmrDelayForEvent);
          ContentEvent.isUpdating = false;
          ContentEvent.unchangedData = angular.equals(_data, ContentEvent.event.data);

          ContentEvent.isEventValid = ContentEvent.isValidEvent(ContentEvent.event.data);
          if (!ContentEvent.isUpdating && !isUnchanged(ContentEvent.event) && ContentEvent.isEventValid) {
            tmrDelayForEvent = setTimeout(function () {
              if (event.id) {
                ContentEvent.updateEventData();
              } else if (!ContentEvent.isNewEventInserted) {
                ContentEvent.addNewEvent();
              }
            }, 300);
          }
        };

        ContentEvent.changeRepeatType = function (type) {
          ContentEvent.event.data.repeat = {};
          ContentEvent.event.data.repeat.isRepeating = true;
          ContentEvent.event.data.repeat.repeatType = type;
        };

        /**
         * Add dynamic link
         */

        ContentEvent.addLink = function () {
          var options = {showIcons: false};
          var callback = function (error, result) {
            if (error) {
              return console.error('Error:', error);
            }
            if (!ContentEvent.event.data.links)
              ContentEvent.event.data.links = [];
            if (result.title)
              ContentEvent.event.data.links.push(result);
            $scope.$digest();
          };
          Buildfire.actionItems.showDialog(null, options, callback);
        };

        /**
         * Remove dynamic link
         */

        ContentEvent.removeLink = function (index) {
          if (ContentEvent.event.data && ContentEvent.event.data.links) {
            ContentEvent.event.data.links.splice(index, 1);
          }
        };

        /**
         * Edit dynamic link
         */

        ContentEvent.editLink = function (link, index) {
          Buildfire.actionItems.showDialog(link, linkOptions, function editLinkCallback(error, result) {
            if (error) {
              return console.error('Error:', error);
            }
            if (!ContentEvent.event.data.links) {
              ContentEvent.event.data.links = [];
            }
            if (result === null) {
              return console.error('Error:Can not save data, Null record found.');
            }
            ContentEvent.event.data.links.splice(index, 1, result);
            $scope.$digest();
          });
        };

        /**
         * Save selected place from google autocomplete as address
         */

        ContentEvent.setLocation = function (data) {
          ContentEvent.event.data.address = {
            type: ADDRESS_TYPE.LOCATION,
            location: data.location,
            location_coordinates: data.coordinates
          };
          ContentEvent.currentAddress = ContentEvent.event.data.address.location;
          ContentEvent.currentCoordinates = ContentEvent.event.data.address.location_coordinates;
          $scope.$digest();
        };

        /**
         * Change the address and map to dragged marker location
         */

        ContentEvent.setDraggedLocation = function (data) {
          ContentEvent.event.data.address = {
            type: ADDRESS_TYPE.LOCATION,
            location: data.location,
            location_coordinates: data.coordinates
          };
          ContentEvent.currentAddress = ContentEvent.event.data.address.location;
          ContentEvent.currentCoordinates = ContentEvent.event.data.address.location_coordinates;
          $scope.$digest();
        };

        /* Build fire thumbnail component to add thumbnail image*/
        var listImage = new Buildfire.components.images.thumbnail("#listImage", {
          title: "List Image",
          dimensionsLabel: "500x500"
        });

        listImage.onChange = function (url) {
          ContentEvent.event.data.listImage = url;
          if (!$scope.$$phase && !$scope.$root.$$phase) {
            $scope.$apply();
          }
        };

        listImage.onDelete = function (url) {
          ContentEvent.event.data.listImage = "";
          if (!$scope.$$phase && !$scope.$root.$$phase) {
            $scope.$apply();
          }
        };

        ContentEvent.clearAddress = function () {
          if (!ContentEvent.currentAddress) {
            ContentEvent.event.data.address = null;
            ContentEvent.currentCoordinates = null;
          }
        };

        ContentEvent.setCoordinates = function () {
          function successCallback(resp) {
            if (resp) {
              ContentEvent.event.data.address = {
                type: ADDRESS_TYPE.COORDINATES,
                location: resp.formatted_address || ContentEvent.currentAddress,
                location_coordinates: [ContentEvent.currentAddress.split(",")[0].trim(), ContentEvent.currentAddress.split(",")[1].trim()]
              };
              ContentEvent.currentAddress = ContentEvent.event.data.address.location;
              ContentEvent.currentCoordinates = ContentEvent.event.data.address.location_coordinates;
            } else {
              errorCallback();
            }
          }

          function errorCallback(err) {
            ContentEvent.validCoordinatesFailure = true;
            $timeout(function () {
              ContentEvent.validCoordinatesFailure = false;
            }, 5000);
          }

          Utils.validLongLats(ContentEvent.currentAddress).then(successCallback, errorCallback);
        };

        ContentEvent.gotToHome = function () {
          $location.path('#/');
        };

        ContentEvent.setEndDay = function () {
          if (ContentEvent.event.data.startDate && ContentEvent.event.data.isAllDay)
            ContentEvent.event.data.endDate = ContentEvent.event.data.startDate;
        };

        ContentEvent.showUserTimeZone = function () {
          var timezone = jstz.determine();
          return timezone.name() || "";
        };

        updateMasterEvent(ContentEvent.event);

        if ($routeParams.id) {
          ContentEvent.getItem($routeParams.id);

          /*
           Send message to widget that this page has been opened
           */
          buildfire.messaging.sendMessageToWidget({
            id: $routeParams.id,
            type: 'OpenItem'
          });
        }

        $scope.$watch(function () {
          return ContentEvent.event;
        }, updateItemsWithDelay, true);

      }]);
})(window.angular, window.buildfire);


text:
@implementation FindByIdResponse
@synthesize result;

- (id) initFromDictionary:(NSDictionary *)dict{
    self = [super initFromDictionary:dict];
    if(self){
        result = [[EntityManager sharedInstance] deserializeObject:[dict objectForKey:@"result"]];
    }

    return self;
}

- (NSDictionary*) toDictionary:(BOOL)isShell{
    NSMutableDictionary* dict = [super toDictionary:NO];
    [dict setObject:[self remoteClassName] forKey:@"cn"];

    if(!isShell){
        [dict setObject:[result toDictionary:YES] forKey:@"result"];
    }
    return dict;
}

- (NSString*) remoteClassName{
    return @"com.percero.agents.sync.vo.FindByIdResponse";
}

@end


text:
Webjar packaging for gridstack.js ( A Gridstack layout JQuery plugin )

upstream : http://troolee.github.io/gridstack.js/


text:
<script src="../../../resources/gc.js"></script>
<script>
setTimeout(function() {
    frameElement.src = "javascript:''";
    gc();
}, 0);
</script>


text:
The source of truth messages file is at `resources/original_messages.json`. It is encoded in the Chrome Apps JSON format. The translated files, consumed by the application's UI, live in `www/messages/<locale>.json`.

### Validation

To validate that all keys in the master messages file have been localized, run:

```
python scripts/l10n/validate_localized_keys.py
```

## Native Messages

### Android

Native Android strings are located at `cordova-plugin-outline/android/resources/strings/values-${LOCALE}/strings.xml`. The keys and messages for each locale must be present in the corresponding UI messages file.

To import new strings, update the keys in `scripts/l10n/import_native_android_strings.py` and run:

```
npm run action scripts/l10n/import_native_android_strings
```

### Windows

Native Windows strings must be present in the localized UI messages file, as they are dynamically retrieved by Electron's main process through IPC with the UI process.


text:
NSString * const DDPhotoSelectCollectionViewCellReuseIdentifier = @"DDPhotoSelectCollectionViewCell";

@interface DDPhotoSelectViewController ()<UICollectionViewDataSource, UICollectionViewDelegate>

@property (weak, nonatomic) IBOutlet UICollectionView *myCollectionView;

@property (nonatomic, strong) DDPhotoSelectViewControllerHandle *viewControllerHandle;

@end

@implementation DDPhotoSelectViewController

- (void)dealloc{
    self.myCollectionView.dataSource = nil;
    self.myCollectionView.delegate = nil;
}

- (instancetype)initWithAssetHandle:(DDAssetHandle *)assetHandle soureType:(DDPhotoSelectViewSoureType)type{
    self = [super init];
    if (self) {
        self.viewControllerHandle = [[DDPhotoSelectViewControllerHandle alloc] initWithAssetHandle:assetHandle soureType:type];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = self.viewControllerHandle.assetHandle.currentSelectGroup.groupName;
    [self.myCollectionView registerNib:[UINib nibWithNibName:DDPhotoSelectCollectionViewCellReuseIdentifier bundle:nil] forCellWithReuseIdentifier:DDPhotoSelectCollectionViewCellReuseIdentifier];
    self.myCollectionView.backgroundColor = [UIColor clearColor];

    self.viewControllerHandle.collectionView = self.myCollectionView;

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(assetsDidChangedNotification:) name:DDAssetsDidChangedNotification object:nil];
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    __weak __typeof(&*self)weakSelf = self;
    [self.viewControllerHandle fetchGroupAssetCompleteBlock:^(DDAssetGroup *group, NSArray *allAssets, NSError *error) {
        weakSelf.title = group.groupName;
        [weakSelf didFinishFetchAsset:allAssets];
    }];
}

- (void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    [self updateCachedAssets];
}

#pragma mark - Private Methods

- (void)didFinishFetchAsset:(NSArray *)assets{
    self.viewControllerHandle.dataSoure = assets;
    [self.myCollectionView reloadData];
    if ([self.viewControllerHandle.dataSoure count] > 1) {
        [self.myCollectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:self.viewControllerHandle.dataSoure.count - 1 inSection:0] atScrollPosition:UICollectionViewScrollPositionBottom animated:NO];
    }

}

- (void)updateCachedAssets{
    BOOL isViewVisible = [self isViewLoaded] && [[self view] window] != nil;
    if (!isViewVisible) {
        return;
    }
    [self.viewControllerHandle updateCachedAssets];
}

#pragma mark - UICollectionViewDataSource

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    return [self.viewControllerHandle.dataSoure count];
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    DDPhotoSelectCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:DDPhotoSelectCollectionViewCellReuseIdentifier forIndexPath:indexPath];
    // Increment the cell's tag
    NSInteger currentTag = cell.tag + 1;
    cell.tag = currentTag;
    [self.viewControllerHandle requestImageAtIndex:indexPath.row resultHandler:^(UIImage *result, NSDictionary *info) {
        if (cell.tag == currentTag) {
            cell.image = result;
        }
    }];
    return cell;
}

#pragma mark - UICollectionViewDelegate

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
    self.viewControllerHandle.assetHandle.currentAsset = self.viewControllerHandle.dataSoure[indexPath.row];
    DDPhotoEditViewController *viewController = [[DDPhotoEditViewController alloc] initWithAsset:self.viewControllerHandle.assetHandle.currentAsset];
    [self.navigationController pushViewController:viewController animated:YES];
}

#pragma mark - UIScrollViewDelegate

- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
    [self updateCachedAssets];
}

#pragma mark - Notification
- (void)assetsDidChangedNotification:(NSNotification *)notification{
    if ([notification.object isKindOfClass:[NSDictionary class]]) {
        [self.viewControllerHandle resetCachedAssets];
        self.viewControllerHandle.dataSoure = notification.object[DDAssetDataSourceKey];
        BOOL onlyReload = [notification.object[DDAssetNeedReloadKey] boolValue];
        if (onlyReload) {
            [self.myCollectionView reloadData];
        }
        else {
            NSArray *removedIndexPaths = notification.object[DDAssetRemovedIndexPathsKey];
            NSArray *insertedIndexPaths = notification.object[DDAssetInsertedIndexPathsKey];
            NSArray *changedIndexPaths = notification.object[DDAssetChangedIndexPathsKey];
            [self.myCollectionView performBatchUpdates:^{
                if (removedIndexPaths) {
                    [self.myCollectionView deleteItemsAtIndexPaths:removedIndexPaths];
                }
                if (insertedIndexPaths) {
                    [self.myCollectionView insertItemsAtIndexPaths:insertedIndexPaths];
                }
                if (changedIndexPaths) {
                    [self.myCollectionView reloadItemsAtIndexPaths:changedIndexPaths];
                }
            } completion:NULL];
        }
    }
}

@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Mindscape.Raygun4Net.Breadcrumbs;
using NUnit.Framework;
using Tests.Model;

namespace Mindscape.Raygun4Net.Tests
{
  [TestFixture]
  public class RaygunBreadcrumbsTests
  {
    private RaygunBreadcrumbs _breadcrumbs;

    [SetUp]
    public void SetUp()
    {
      _breadcrumbs = new RaygunBreadcrumbs(new InMemoryBreadcrumbStorage());
    }

    [TearDown]
    public void TearDown()
    {
      RaygunSettings.Settings.BreadcrumbsLevel = RaygunBreadcrumbLevel.Info;
      RaygunSettings.Settings.BreadcrumbsLocationRecordingEnabled = false;
    }

    [Test]
    public void Set_ClassName_MethodName_And_LineNumber_Automatically_If_Configured()
    {
      RaygunSettings.Settings.BreadcrumbsLocationRecordingEnabled = true;
      var test = new BreadcrumbTestRecorder(_breadcrumbs);

      test.Record();
      var crumb = _breadcrumbs.First();

      Assert.That(crumb.ClassName, Is.EqualTo("Tests.Model.BreadcrumbTestRecorder"));
      Assert.That(crumb.MethodName, Is.EqualTo("Record"));
    }

    [Test]
    public void You_Can_Record_A_Breadcrumb()
    {
      _breadcrumbs.Record(new RaygunBreadcrumb() { Message = "test" });

      Assert.That(_breadcrumbs.First().Message, Is.EqualTo("test"));
    }

    [Test]
    public void It_Sets_The_Timestamp()
    {
      _breadcrumbs.Record(new RaygunBreadcrumb() { Message = "test" });

      Assert.That(_breadcrumbs.First().Timestamp, Is.GreaterThan(0));
    }

    [Test]
    public void It_Sets_The_Level_To_Info_If_Not_Set()
    {
      _breadcrumbs.Record(new RaygunBreadcrumb() { Message = "test" });

      Assert.That(_breadcrumbs.First().Level, Is.EqualTo(RaygunBreadcrumbLevel.Info));
    }

    [Test]
    public void It_Does_Not_Record_A_Breadcrumb_When_The_Breadcrumb_Level_Is_Too_High()
    {
      RaygunSettings.Settings.BreadcrumbsLevel = RaygunBreadcrumbLevel.Error;

      _breadcrumbs.Record(new RaygunBreadcrumb() { Message = "test", Level = RaygunBreadcrumbLevel.Info });

      Assert.That(_breadcrumbs, Is.Empty);
    }

    [Test]
    public void You_Can_Retrieve_Stored_Breadcrumbs()
    {
      _breadcrumbs = new RaygunBreadcrumbs(
         new InMemoryBreadcrumbStorage(
            new List<RaygunBreadcrumb>() { new RaygunBreadcrumb() }
         )
      );

      Assert.That(_breadcrumbs.Count(), Is.EqualTo(1));
    }

    [Test]
    public void You_Can_Clear_The_Stored_Breadcrumbs()
    {
      _breadcrumbs = new RaygunBreadcrumbs(
         new InMemoryBreadcrumbStorage(
            new List<RaygunBreadcrumb>() { new RaygunBreadcrumb() }
         )
      );

      _breadcrumbs.Clear();

      Assert.That(_breadcrumbs.Count(), Is.EqualTo(0));
    }
  }
}


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

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 */
public class DeleteRuleRequest extends AmazonWebServiceRequest implements
        Serializable, Cloneable {

    /**
     *

     * The RuleId of the Rule that you want to delete.
     * RuleId is returned by CreateRule and by
     * ListRules.
     *

     */
    private String ruleId;
    /**
     *

     * The value returned by the most recent call to GetChangeToken.
     *

     */
    private String changeToken;

    /**
     *

     * The RuleId of the Rule that you want to delete.
     * RuleId is returned by CreateRule and by
     * ListRules.
     *

     *
     * @param ruleId
     *        The RuleId of the Rule that you want to
     *        delete. RuleId is returned by CreateRule and
     *        by ListRules.
     */
    public void setRuleId(String ruleId) {
        this.ruleId = ruleId;
    }

    /**
     *

     * The RuleId of the Rule that you want to delete.
     * RuleId is returned by CreateRule and by
     * ListRules.
     *

     *
     * @return The RuleId of the Rule that you want to
     *         delete. RuleId is returned by CreateRule and
     *         by ListRules.
     */
    public String getRuleId() {
        return this.ruleId;
    }

    /**
     *

     * The RuleId of the Rule that you want to delete.
     * RuleId is returned by CreateRule and by
     * ListRules.
     *

     *
     * @param ruleId
     *        The RuleId of the Rule that you want to
     *        delete. RuleId is returned by CreateRule and
     *        by ListRules.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public DeleteRuleRequest withRuleId(String ruleId) {
        setRuleId(ruleId);
        return this;
    }

    /**
     *

     * The value returned by the most recent call to GetChangeToken.
     *

     *
     * @param changeToken
     *        The value returned by the most recent call to
     *        GetChangeToken.
     */
    public void setChangeToken(String changeToken) {
        this.changeToken = changeToken;
    }

    /**
     *

     * The value returned by the most recent call to GetChangeToken.
     *

     *
     * @return The value returned by the most recent call to
     *         GetChangeToken.
     */
    public String getChangeToken() {
        return this.changeToken;
    }

    /**
     *

     * The value returned by the most recent call to GetChangeToken.
     *

     *
     * @param changeToken
     *        The value returned by the most recent call to
     *        GetChangeToken.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public DeleteRuleRequest withChangeToken(String changeToken) {
        setChangeToken(changeToken);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getRuleId() != null)
            sb.append("RuleId: " + getRuleId() + ",");
        if (getChangeToken() != null)
            sb.append("ChangeToken: " + getChangeToken());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DeleteRuleRequest == false)
            return false;
        DeleteRuleRequest other = (DeleteRuleRequest) obj;
        if (other.getRuleId() == null ^ this.getRuleId() == null)
            return false;
        if (other.getRuleId() != null
                && other.getRuleId().equals(this.getRuleId()) == false)
            return false;
        if (other.getChangeToken() == null ^ this.getChangeToken() == null)
            return false;
        if (other.getChangeToken() != null
                && other.getChangeToken().equals(this.getChangeToken()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode
                + ((getRuleId() == null) ? 0 : getRuleId().hashCode());
        hashCode = prime
                * hashCode
                + ((getChangeToken() == null) ? 0 : getChangeToken().hashCode());
        return hashCode;
    }

    @Override
    public DeleteRuleRequest clone() {
        return (DeleteRuleRequest) super.clone();
    }
}


text:
<?php

$LANG['email'] = 'Email ';
$LANG['or'] = 'Or';
$LANG['nickname'] = 'Nickname ';
$LANG['uid'] = 'User ID';
$LANG['regtime'] = 'Registration time';
$LANG['lastlogintime'] = 'Last logged-in';
$LANG['operation'] = 'Operation';
$LANG['password'] = 'Password ';
$LANG['cofirmpwd'] = 'Re-type Password';
$LANG['realname'] = 'Real name';
$LANG['enable_phpsso'] = 'Enable PHPSSO';
$LANG['enable_register'] = 'Registration';
$LANG['nameerror'] = 'Username is required';
$LANG['between_2_to_20'] = 'Between 2-20';
$LANG['between_2_to_20'] = 'Between 2-20';
$LANG['between_6_to_20'] = 'Between 6-20';
$LANG['between_1_to_20'] = 'Between 1-20';
$LANG['between_2_to_32'] = 'Between 2-32';
$LANG['between_7_to_32'] = 'Between 7-32';
$LANG['already_exist'] = 'Already exist';
$LANG['password_can_not_be_empty'] = 'Password is required';
$LANG['cannot_empty'] = ' is Required';
$LANG['passwords_not_match'] = 'Passwords do not match';
$LANG['old_password_incorrect'] = 'Old password is incorrect';
$LANG['old_password'] = 'Old password';
$LANG['new_password'] = 'New password';
$LANG['re_input'] = 'Re-type Password';
$LANG['passwords_match'] = 'Passwords matched';
$LANG['newpassword'] = 'New password is';
$LANG['forgetpasswordmessage'] = 'Retrieve password email';
$LANG['forgetpassword'] = 'Forgot your password?';
$LANG['no_phpcms_account'] = 'Not registered yet?';
$LANG['immediately'] = ' ';
$LANG['use_passport'] = 'Use external passport';
$LANG['other_passport'] = 'Other passports';
$LANG['other_passport_introduce'] = 'Introduce to passport';
$LANG['other_passport_info'] = 'PHPCMS supports third party logins';
$LANG['input'] = 'Please input ';
$LANG['checkcode'] = 'Auth code';
$LANG['validate'] = 'Validate';
$LANG['user'] = 'User';
$LANG['not_exists'] = 'Not exists';
$LANG['password_error'] = 'Password is incorrect';
$LANG['ait_1_hour'] = 'Please login after a hour';
$LANG['connecting_please_wait'] = 'Please wait...';
$LANG['not_change_the_password_please_leave_a_blank'] = 'Please leave blank if you do not want to change password';
$LANG['format_incorrect'] = 'Format is invalid';
$LANG['format_right'] = 'Format is valid';
$LANG['email_already_exist'] = 'Already exist';
$LANG['email_config_empty'] = 'Unable to send e-mail. Please contact the site administrator';
$LANG['email_error'] = 'Your email address seems incorrect. Please re-enter';
$LANG['login_email'] = 'Email ';
$LANG['login_email_authentication'] = 'Please go to email to validate your registration';
$LANG['email_deny'] = 'Unable to register';
$LANG['userid_banned_by_administrator'] = 'Access Denied';
$LANG['need_emial_authentication'] = 'Require email authentication';
$LANG['username_deny'] = 'Unable to register';
$LANG['regip'] = 'IP';
$LANG['lastip'] = 'Last Logged-in IP';
$LANG['sure_delete'] = 'Are you sure you want to remove?';
$LANG['delete'] = 'Remove';
$LANG['member'] = 'User ';
$LANG['info'] = ' ';
$LANG['fill_in'] = 'Fill in ';
$LANG['basic_configuration'] = 'Basic Info';
$LANG['more_configuration'] = 'Details';
$LANG['member_exist'] = 'Username already exists';
$LANG['password_format_incorrect'] = 'Format is invalid';
$LANG['username_format_incorrect'] = 'Format is invalid';
$LANG['email_format_incorrect'] = 'Format is invalid';
$LANG['need_more_param'] = 'Incomplete parameters';
$LANG['verify_pass'] = 'Approval';
$LANG['sure_verify_pass'] = 'Are you sure you want to pass the review?';
$LANG['amount'] = 'Amount';
$LANG['buy_point'] = 'Buy points';
$LANG['point'] = 'Points';
$LANG['point_notice'] = ', points will affect user group';
$LANG['lock'] = 'Locked';
$LANG['user_is_lock'] = 'Your account has been locked for security reasons.';
$LANG['unlock'] = 'Unlock';
$LANG['move'] = 'Move';
$LANG['deny_register'] = 'Registration denied';
$LANG['read_protocol'] = 'Please read our disclaimer before proceeding';
$LANG['click_read_protocol'] = 'Click to read';
$LANG['agree_protocol_post'] = 'I Agree. Submit the Form';
$LANG['already_have_account'] = 'Already have an account?
Please log in';
$LANG['forget_password_notice'] = 'Please reset your password within an hour after submitting';
$LANG['or'] = 'or';
$LANG['remember'] = 'Remember ';
$LANG['vip'] = 'VIP';
$LANG['isvip'] = 'Become an VIP';
$LANG['plsease_select'] = 'Please select';
$LANG['member_group'] = 'User group';
$LANG['ignore'] = 'Ignore';
$LANG['reject'] = 'Reject';
$LANG['modelinfo'] = 'Model info';
$LANG['sendemail'] = 'Email notice';
$LANG['regreason'] = 'Reason';
$LANG['verify_status'] = 'Status';
$LANG['verify'] = 'Review';
$LANG['verify_message'] = 'Review message';
$LANG['reg_reject'] = 'Your application is rejected';
$LANG['reg_ignore'] = 'Your application is ignored';
$LANG['reg_delete'] = 'Your application is deleted';
$LANG['reg_pass'] = 'Your application is approved';
$LANG['verify_message'] = 'Review info';
$LANG['verify_message'] = 'Review info';
$LANG['please_wait_administrator_verify'] = 'Please wait for reviewing';
$LANG['register_verify_message'] = 'Content of Email validation';
$LANG['need_verify'] = 'Require verify';
$LANG['pass_verify'] = 'Approval';
$LANG['nerver_pass'] = 'Duplicate name can not pass the review.';
$LANG['member_group_name'] = 'User group name';
$LANG['member_group_access'] = 'Allow to visit';
$LANG['member_group_search'] = 'Allow to search';
$LANG['member_group_publish'] = 'Allow to contribute';
$LANG['publish_deny'] = 'Get publishing banned';
$LANG['member_group_upgrade'] = 'Allow to self-upgraded';
$LANG['member_group_sendmessage'] = 'Allow to send message';
$LANG['member_group_publish_verify'] = 'Submissions do not require to review';
$LANG['member_group_dayprice'] = 'Daily';
$LANG['member_group_monthprice'] = 'Monthly';
$LANG['member_group_yearprice'] = 'Year';
$LANG['member_group_maxmessagenum'] = 'Max number of message';
$LANG['allowpostnum'] = 'Max number of contributions per day';
$LANG['zero_nolimit'] = '0 as unlimited';
$LANG['allowpostnum_deny'] = 'You have exceeded the maximum allowable contribution';
$LANG['member_group_username_color'] = 'The color of your username';
$LANG['not_less_than'] = 'not less than';
$LANG['not_more_than'] = 'not more than';
$LANG['member_group_icon'] = 'Icon of User group';
$LANG['member_group_deny'] = 'Disable';
$LANG['member_group_creditrange'] = 'Point less than';
$LANG['member_group_starnum'] = 'Star number';
$LANG['member_group_upgradeprice'] = 'Upgrade pice';
$LANG['member_group_sentmessage'] = 'Allow to send message';
$LANG['member_group_sentmessage'] = 'Allow to send message';
$LANG['send_message'] = 'Send message';
$LANG['member_group_description'] = 'Description';
$LANG['groupid'] = 'Group ID';
$LANG['groupname'] = 'User group name';
$LANG['issystem'] = 'System group';
$LANG['starnum'] = 'Star number';
$LANG['pointrange'] = 'Point less than';
$LANG['allowvisit'] = 'Access permissions';
$LANG['allowpost'] = 'Contribution permissions';
$LANG['allowsearch'] = 'Search permissions';
$LANG['allowupgrade'] = 'Self-upgrade';
$LANG['allowpostverify'] = 'Contribution review';
$LANG['allowsendmessage'] = 'Send message';
$LANG['message'] = 'Message';
$LANG['upgrade_price'] = 'Member price';
$LANG['price_y'] = 'Yearly';
$LANG['price_m'] = 'Monthly';
$LANG['price_d'] = 'Daily';
$LANG['need'] = 'Require';
$LANG['upgrade_date'] = 'Period';
$LANG['buy'] = 'Buy';
$LANG['year'] = 'Year';
$LANG['month'] = 'Month';
$LANG['day'] = 'Day';
$LANG['short_of_money'] = 'Your amount is insufficient';
$LANG['money_error'] = 'Format is invalid';
$LANG['disabled'] = 'Disable';
$LANG['description'] = 'Description';
$LANG['view'] = 'View';
$LANG['membernum'] = 'Users';
$LANG['sort'] = 'Ordering';
$LANG['between_2_to_8'] = 'Between 2 and 8';
$LANG['groupname_already_exist'] = 'User group name already exists';
$LANG['between_1_to_8_num'] = 'digits between 1 and 8';
$LANG['maxmessagenum'] = 'The number of messages';
$LANG['allow_register'] = 'allow new user to register';
$LANG['register_model'] = 'Select register model';
$LANG['need_more_memberinfo'] = 'Please fill out ALL INFORMATION for membership records';
$LANG['register_email_auth'] = 'Enable user registration with required email validation';
$LANG['enablemailcheck_notice'] = 'Require email settings. User registration verification will be invalid after enable email activation for registration';
$LANG['allow_memberlist'] = 'Allow to view a list of users on frontend';
$LANG['register_verify'] = 'New user registration requires user verification by admin';
$LANG['administrator'] = 'Administrator';
$LANG['member_verifycode'] = 'Enable registration auth code';
$LANG['click_change_validate'] = 'Try a new code';
$LANG['upgrade_method'] = 'Upgrade method';
$LANG['defualtpoint'] = 'Default points for new users';
$LANG['defualtamount'] = 'Giveaway points for new users';
$LANG['register_protocol'] = 'User Registration Agreement ';
$LANG['show_register_protocol'] = 'Enable show Registration Agreement';
$LANG['show_app_point'] = 'Enable application points exchange';
$LANG['rmb_point_rate'] = 'Buy the number of points per RMB';

$LANG['member_totalnum'] = 'Users';
$LANG['register'] = 'Register';
$LANG['register_notice'] = 'The page will be refreshed when you change user model. Please select user model first.';
$LANG['success'] = 'Success';
$LANG['agree'] = 'Agree';
$LANG['notice'] = 'Attention';
$LANG['member_verify_totalnum'] = 'Pending member';
$LANG['nolimit'] = 'Unlimited';
$LANG['member_search'] = 'Search users';
$LANG['member_vip_totalnum'] = 'VIP';
$LANG['member_research'] = 'Search again';
$LANG['normal'] = 'Normal';
$LANG['member_statistics'] = 'Users';
$LANG['member_todaynum'] = 'New user';
$LANG['normal'] = 'Normal';
$LANG['please_click'] = 'Please click';
$LANG['reg_verify_email'] = 'Email activation for registration';
$LANG['invalid_appid'] = 'Application is not approved. Pleas contact admin';

$LANG['model_name'] = 'Model name';
$LANG['all_site'] = 'All sites';
$LANG['belong_to_site'] = 'As a global model';
$LANG['site_have_no_model'] = 'Site has no user model';
$LANG['model_import'] = 'Import model';
$LANG['member_model_add'] = 'Add user model';
$LANG['member_model'] = 'User model';
$LANG['model_description'] = 'Model description';
$LANG['table_name'] = 'Table name';
$LANG['tablename_already_exist'] = 'Data form already exists';
$LANG['modelname_already_exist'] = 'Model name already exists';
$LANG['deny_model'] = 'Disable model';
$LANG['from_model_name'] = 'Model';
$LANG['to_model_name'] = 'Target model';
$LANG['model_member'] = 'User model';
$LANG['login_success'] = 'Logged in successfully';
$LANG['login_failure'] = 'Login Failed';
$LANG['already_login'] = 'Already login';
$LANG['logout_success'] = 'Logged out successfully';
$LANG['login'] = 'Log in';
$LANG['password_empty'] = 'Please input your password';
$LANG['username_empty'] = 'Please input your username';
$LANG['user_not_exist'] = 'User does not exist';

$LANG['fieldname'] = 'Field name';
$LANG['cnames'] = 'Alias';
$LANG['system'] = 'System';
$LANG['must_input'] = ' is Required';
$LANG['contribute'] = 'Contribute';
$LANG['member_modelfield_add'] = 'Add model field';
$LANG['enable'] = 'Enable';
$LANG['disable'] = 'Disable';
$LANG['modify'] = 'Modify';
$LANG['field'] = 'Field ';
$LANG['manage'] = 'Manage';
$LANG['export'] = 'Export';

$LANG['need_more_point'] = 'You need more points';
$LANG['need_more_amount'] = 'Your amount is insufficient';
$LANG['credit_setting_error'] = 'Failed to set point exchanging';
$LANG['site_no_category'] = 'The site does not have the column. Please select another site';
$LANG['please_login'] = 'Your session has expired. please log in again';
$LANG['overdue'] = 'Expired';
$LANG['overduedate'] = 'Expired date';
$LANG['view_more_info'] = 'Details';
$LANG['collect'] = 'Favourite';

$LANG['filedname_incorrect'] = 'Field name is incorrect';
$LANG['filedtype_need'] = 'Please select field type';
$LANG['filedtype'] = 'Field type';
$LANG['input_correct'] = 'Correct';
$LANG['filed_nickname_need'] = 'Please input your nickname';
$LANG['move_member_model_alert'] = 'This operation will delete all users info from original model. You cannot undo this.';
$LANG['move_member_model_index_alert'] = '1. Please carefully delete model. Please use "Move" function to move user model when there are users in model.
2. This operation will delete all users info from original model. You cannot undo this.';
$LANG['create_new_model_can_empty'] = '(new model is empty)';

$LANG['main_table_filed'] = 'As primary table field';
$LANG['filedname'] = 'Field name';
$LANG['username_rule'] = 'Only contains letters, digits and underscore. Also, it must start with letter and NOT end up with underscore';
$LANG['filed_nickname'] = 'Field alias';
$LANG['exaple_title'] = 'For example, article title';
$LANG['field_cue'] = 'Field hint';
$LANG['nickname_alert'] = 'As form input hints under field alias';
$LANG['correlation_param'] = 'Related parameter';
$LANG['correlation_attribute'] = 'Related properities';
$LANG['extra_attribute'] = 'Additional properities';
$LANG['add_javascript'] = 'Adding JavaScipt Event from here';
$LANG['form_css'] = 'Style name';
$LANG['user_form_css'] = 'Define CSS name of form';
$LANG['string_len_range'] = 'The range of characters length';
$LANG['post_alert'] = 'The system will check length validation. Please leave blank if you do not want to limit the length.';
$LANG['min'] = 'Min value';
$LANG['max'] = 'Max value';
$LANG['value'] = 'value';
$LANG['date_regular'] = 'Verify input with regular expressions';
$LANG['validity_alert'] = 'The system will verify data by using regular expressions. Please leave blank if you do not want to verify data.';
$LANG['common_regular'] = 'Common regular expressions';
$LANG['number'] = 'Number';
$LANG['int'] = 'Integer';
$LANG['alphabet'] = 'Letter';
$LANG['http'] = 'Hyperlink';
$LANG['mp'] = 'Mobile number';
$LANG['tel'] = 'Tel';
$LANG['postcode'] = 'Zip';
$LANG['error_alert'] = 'Data validation error message';
$LANG['form_error_alert'] = 'The data of form are not satisfied with the verification conditions. The system will show a prompt message.';
$LANG['unique'] = 'Unique value';
$LANG['can_empty'] = 'Required info';
$LANG['search_condition'] = 'As searching conditions';
$LANG['isadd_condition'] = 'Display on frontend';
$LANG['isomnipotent_condition'] = 'As Affiliated field of universal field';
$LANG['deny_set_field_group'] = 'Select user groups. These group users cannot set up field value';
$LANG['deny_set_field_role'] = 'Select role. These roles cannot set up field value';
$LANG['points_less_than'] = 'Your point is {point}, Contributing an article will reduce {need_point}point, you can obtain points by leaving comments';
$LANG['contributors_checked'] = 'Contributed successfully. Reviewing....';
$LANG['contributors_success'] = 'Already posted, thank you for your contribution';
$LANG['has_been_verified'] = 'Your contribution has been verified. Do NOT allow to modify';
$LANG['contribute_del_point'] = 'Submission deduction points';
$LANG['contribute_add_point'] = 'Submission reward points';

$LANG['member_center'] = 'User Center';
$LANG['manage_center'] = 'Manage';
$LANG['account_manage'] = 'Account manager';
$LANG['collection'] = 'Favorites';
$LANG['index'] = 'Homepage';
$LANG['logout'] = 'Log out';
$LANG['hellow'] = 'Hello';
$LANG['add_child_menu'] = 'Add sub menu';
$LANG['online_publish'] = 'Online Contribution';
$LANG['published_content'] = 'Published post';
$LANG['ssouser_can_not_modify_password'] = 'External passport user does not allow to change email password';
$LANG['reject_content'] = 'Reject';
$LANG['verify_content'] = 'Verifying';
$LANG['financial_management'] = 'Financial management';
$LANG['online_charge'] = 'Recharge online';
$LANG['pay_log'] = 'Payment records';
$LANG['cost_log'] = 'Records of consumption';
$LANG['credit_change'] = 'Buy point/exchange';
$LANG['input_box'] = 'Inbox';
$LANG['output_box'] = 'Sent';
$LANG['system_message'] = 'System message';
$LANG['deny_upgrade'] = 'Your user group is unable to self-upgraded.';

$LANG['memberinfo'] = 'Personal Info';
$LANG['account_remain'] = 'Balance';
$LANG['unit_yuan'] = 'Yuan';
$LANG['unit_point'] = 'point';
$LANG['in_model'] = 'Model';
$LANG['avatar'] = 'Display picture';
$LANG['grow_info'] = 'Level info';
$LANG['with_star_must_input'] = 'Required fields are marked *';
$LANG['security_setting'] = 'Security settings';
$LANG['click_login'] = 'click to login';
$LANG['sina_login'] = 'Use SINA account to login';
$LANG['sina_login_notice'] = 'Share on SINA miniblog';

$LANG['favorite_list'] = 'Favorite';
$LANG['adddate'] = 'Add date';
$LANG['buy_point'] = 'Buy point';
$LANG['not_sufficient_funds'] = 'Your account balance is running low';
$LANG['cost'] = 'Cost';
$LANG['can_change_point_num'] = 'Exchange points';
$LANG['app_each'] = 'App';
$LANG['please_select_cat'] = 'Please select column';
$LANG['site_name'] = 'Site name';
$LANG['all_site'] = 'All sites';
$LANG['in_site_name'] = 'Subsidiary site';
$LANG['site_info'] = 'Site description';
$LANG['select'] = 'Select';
$LANG['select_site'] = 'Select site';
$LANG['please_select_category'] = 'Please select column';
$LANG['member_group_permission'] = 'User permissions';
$LANG['no_permission'] = 'No permissions';
$LANG['copyfrom_tips'] = '≡Please select≡';
$LANG['goback'] = 'Back to';
$LANG['allowattachment'] = 'Allow to upload attachment';

$LANG['attachment_upload'] = 'Upload file';
$LANG['image_upload'] = 'Upload image';
$LANG['remove'] = 'remove';
$LANG['zhang'] = 'pictures';
$LANG['max_upload_num'] = 'Max number of uploading at a time';
$LANG['picutre_list'] = 'A list of pictures';
$LANG['select_picture'] = 'Select picture';

$LANG['isurl'] = 'External Links';
$LANG['url'] = 'External Links';
$LANG['info_top'] = 'Classified Info On top';
$LANG['info_top_not_setting_toptime'] = 'You have to set sticky date and type, please try again.';
$LANG['url'] = 'External Links';
?>


text:
{% macro render_tag(name, count=0, withCount=false) -%}

      {{ name }}
      {% if withCount %}
      {{ count }}
      {% endif %}

{%- endmacro %}

{% macro render_tag_input(tag, type="edit") %}
  <form action="" class="form tag-edit">

      <input type="text" value="{{ tag }}" data-original-value="{{ tag }}" class="form-control tag-entry-field" />
      {% if type == "edit" %}<button class="button save-btn">Save</button>{% endif %}
      <button class="button secondary-btn">Delete</button>

  </form>
{% endmacro %}

{% macro render_new_tag_input() %}

  <input type="text" class="form-control tag-entry-field" />
  {% if type == "edit" %}<button class="button button-secondary">Save</button>{% endif %}
  <button class="button msg-box-btn msg-box-btn--del">Delete</button>

{% endmacro %}

{% macro render_pagination( next_url, previous_url, end=false ) %}

    {% if previous_url %}

        Previous

    {% endif %}

        {% if end %}Finish{% else %}Next{% endif %}

{% endmacro %}


text:
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"
	login-required="true">

	<restrict>#{s:hasRole('message_management/create') or s:hasRole('message_management/update')}</restrict>
	<begin-conversation join="true" flush-mode="MANUAL" />

	<param name="messageInfoFrom" />
	<param name="messageInfoTheId" value="#{messageInfoHome.messageInfoTheId}" />

	<navigation from-action="#{messageInfoHome.persist}">
		<rule if-outcome="persisted">
			<end-conversation />
			<redirect view-id="/std/core/page/admin/MessageInfoList.xhtml" />
		</rule>
	</navigation>

	<navigation from-action="#{messageInfoHome.update}">
		<rule if-outcome="updated">
			<end-conversation />
			<redirect view-id="/std/core/page/admin/MessageInfoList.xhtml" />
		</rule>
	</navigation>

	<navigation from-action="#{messageInfoHome.remove}">
		<rule if-outcome="removed">
			<end-conversation />
			<redirect view-id="/std/core/page/admin/MessageInfoList.xhtml" />
		</rule>
		<rule if-outcome="failure">
			<end-conversation />
			<redirect view-id="/std/core/page/admin/MessageInfoList.xhtml" />
		</rule>
	</navigation>

</page>


text:
var Browser = require('zombie');

describe('GET /api/say', function () {

    var browser = new Browser();

    before(function (done) {
        browser.visit('http://localhost:3000/', done);
    });

    it('click try', function () {
        browser.assert.style('#cancel-button-get', 'display', 'none');
        browser.assert.style('#try-get', 'display', 'none');

        return browser.pressButton('#try-button-get');
    });

    it('displays contents', function () {
        browser.assert.style('#cancel-button-get', 'display', '');
        browser.assert.style('#try-get', 'display', '');
    });

    it('fills in values', function () {
        browser.fill('#cow-get', 'cow');
        browser.fill('#eyes-get', 'xx');
        browser.fill('#tongue-get', ' U');
    });

    it('submits text', function () {
        browser.assert.style('#results-header-get', 'display', 'none');
        browser.assert.text('#results-get', '');

        return browser.pressButton('#text-do-get');
    });

    it('shows text contents', function () {
        browser.assert.style('#results-header-get', 'display', '');
        //Fragile. Contains matcher?
        browser.assert.evaluate("$('#results-get').html().indexOf('Moo')", 12);
    });
});


text:
package com.github.JHXSMatthew.Controllers;

import org.bukkit.Bukkit;
import org.bukkit.inventory.Inventory;

public class BannerController {

	Inventory color = Bukkit.createInventory(null, 54,"Ñ¡ÔñÒ»¸öÑÕÉ«");
	Inventory partern = Bukkit.createInventory(null, 54,"Ñ¡ÔñÒ»¸öͼ°¸");

	public BannerController(){

	}

}


text:
require.module('./plugins/extend_for', function(module, exports, require) {
// start module: plugins/extend_for

var Token = require("../token");
module.exports = function(stream) {

  stream.each(function() {
    if(this.keyword && this.text == "for") {
      var text = "",
          bracket = this.next,
          skip = false,
          toks = [], var2, var1, loopWord,
          complex

      var closingBracket = bracket.matching

      bracket.next.find(function() {
        if(this.next == closingBracket) return true
        if(this.semi) { skip = true; return true }
        if(this.word && (this.text == "in" || this.text == "of") ) loopWord = this
        if(this.round) complex = true
        toks.push(this)
      })

      var var1 = toks[0]
      if(toks[1].text == ",") var2 = toks[2]
      if(skip) return closingBracket.next

      if(complex) {
        loopWord.next.next.cacheExpression()
      }

      var expressionText = loopWord.next.next.collectText(closingBracket.prev)
      if(expressionText.match(/ /)) expressionText = "(" + expressionText +")"
      var iter, val
      var closure = this.findClosure()

      /*function wrapSingleLineBlock() {
        if(!this.block) {
          var pair = Token.bracket.pair("{}")
          closingBracket.after(" ").after(pair.L)
          var nl = 2
          var indent = brace.indent()

          var next = pair.L.nextNW()
          if(next.block) {
            var tok = next.block.matching
            if(tok.next.whitespace)
              tok = tok.next
          }
          else if(next.bracelessBlock) {
            var tok = next.bracelessBlock.end
            if(tok.next.whitespace)
              tok = tok.next
          }
          else {
            var tok = closingBracket.find(function() {
              if(this.newline) nl--
              if(nl == 0) return true
            })
          }

          tok.after(pair.R)
          if(indent)
            pair.R.before(indent)
          pair.R.after("\n")
          pair.L.updateBlock()
        }
      }*/

      var brace = bracket.matching.find(function() { if(this.curly) return true })

      if(loopWord.text == "in") {
        if(!var2) return // nothing to do !

        brace.implied = false
        brace.matching.implied = false

        var2.prev.remove(var2)
        iter = var1.text
        val = var2.text
        closure.vars[iter] = true
        closure.vars[val] = true

      } else {
        brace.implied = false
        brace.matching.implied = false

        bracket.next.remove(closingBracket.prev)
        iter = var2 ? var2.text : closure.getUnusedVar()

        val = var1.text
        closure.vars[iter] = true
        closure.vars[val] = true

        var string = iter + " = 0; " + iter + " < " + expressionText + ".length; " + iter + "++"
        bracket.after(string)

      }

      var text = " "/* + this.indent()*/ + val + " = " + (complex ? "_xpr" : expressionText) + "[" + iter + "];"

      this.block.after(text)

      return
    }
  })
}

// end module: plugins/extend_for
});


text:
<?php
namespace SmappSocialOAuth;

class Module
{
    public function getConfig()
    {
        return include __DIR__ . '/config/module.config.php';
    }

    public function getAutoloaderConfig()
    {
        return array(
            //'Zend\Loader\ClassMapAutoloader' => array(
            //        __DIR__ . '/autoload_classmap.php'
            //),
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ),
            ),
        );
    }
}

/*
 *

Client ID:
495906136833.apps.googleusercontent.com

Email address:
495906136833@developer.gserviceaccount.com

Client secret:
fwvu8LGq5LtGEgpRuBaliVbr

Redirect URIs:
http://epavel.ru/user/auth/oauth2callback

JavaScript origins: 	http://epavel.ru
 */


text:
namespace base {

namespace {

class PostTaskAndReplyWorkerPool : public internal::PostTaskAndReplyImpl {
 public:
  explicit PostTaskAndReplyWorkerPool(bool task_is_slow)
      : task_is_slow_(task_is_slow) {
  }

 private:
  virtual bool PostTask(const tracked_objects::Location& from_here,
                        const Closure& task) OVERRIDE {
    return WorkerPool::PostTask(from_here, task, task_is_slow_);
  }

  bool task_is_slow_;
};

// WorkerPoolTaskRunner ---------------------------------------------
// A TaskRunner which posts tasks to a WorkerPool with a
// fixed ShutdownBehavior.
//
// Note that this class is RefCountedThreadSafe (inherited from TaskRunner).
class WorkerPoolTaskRunner : public TaskRunner {
 public:
  explicit WorkerPoolTaskRunner(bool tasks_are_slow);

  // TaskRunner implementation
  virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
                               const Closure& task,
                               TimeDelta delay) OVERRIDE;
  virtual bool RunsTasksOnCurrentThread() const OVERRIDE;

 private:
  virtual ~WorkerPoolTaskRunner();

  // Helper function for posting a delayed task. Asserts that the delay is
  // zero because non-zero delays are not supported.
  bool PostDelayedTaskAssertZeroDelay(
      const tracked_objects::Location& from_here,
      const Closure& task,
      base::TimeDelta delay);

  const bool tasks_are_slow_;

  DISALLOW_COPY_AND_ASSIGN(WorkerPoolTaskRunner);
};

WorkerPoolTaskRunner::WorkerPoolTaskRunner(bool tasks_are_slow)
    : tasks_are_slow_(tasks_are_slow) {
}

WorkerPoolTaskRunner::~WorkerPoolTaskRunner() {
}

bool WorkerPoolTaskRunner::PostDelayedTask(
    const tracked_objects::Location& from_here,
    const Closure& task,
    TimeDelta delay) {
  return PostDelayedTaskAssertZeroDelay(from_here, task, delay);
}

bool WorkerPoolTaskRunner::RunsTasksOnCurrentThread() const {
  return WorkerPool::RunsTasksOnCurrentThread();
}

bool WorkerPoolTaskRunner::PostDelayedTaskAssertZeroDelay(
    const tracked_objects::Location& from_here,
    const Closure& task,
    base::TimeDelta delay) {
  DCHECK_EQ(delay.InMillisecondsRoundedUp(), 0)
      << "WorkerPoolTaskRunner does not support non-zero delays";
  return WorkerPool::PostTask(from_here, task, tasks_are_slow_);
}

struct TaskRunnerHolder {
  TaskRunnerHolder() {
    taskrunners_[0] = new WorkerPoolTaskRunner(false);
    taskrunners_[1] = new WorkerPoolTaskRunner(true);
  }
  scoped_refptr<TaskRunner> taskrunners_[2];
};

base::LazyInstance<TaskRunnerHolder>::Leaky
    g_taskrunners = LAZY_INSTANCE_INITIALIZER;

}  // namespace

bool WorkerPool::PostTaskAndReply(const tracked_objects::Location& from_here,
                                  const Closure& task,
                                  const Closure& reply,
                                  bool task_is_slow) {
  return PostTaskAndReplyWorkerPool(task_is_slow).PostTaskAndReply(
      from_here, task, reply);
}

// static
const scoped_refptr<TaskRunner>&
WorkerPool::GetTaskRunner(bool tasks_are_slow) {
  return g_taskrunners.Get().taskrunners_[tasks_are_slow];
}

}  // namespace base


text:
package multiThreading.synchronizingCode.SCJP6;
/**Objectives: Synchronization test and throw a null pointer exception in
 * case a non static object var is used without assigned to an instance object.
 * And given these two fragments:
I. synchronized void chat(long id) {
II. void chat(long id) {
When fragment I or fragment II is inserted at line 5, which are true? (Choose all that apply.)
A. An exception is thrown at runtime
B. With fragment I, compilation fails
C. With fragment II, compilation fails
D. With fragment I, the output could be yo dude dude yo
E. With fragment I, the output could be dude dude yo yo
F. With fragment II, the output could be yo dude dude yo

Answer:
✓ F is correct. With fragment I, the chat method is synchronized, so the two threads can't

swap back and forth. With either fragment, the first output must be yo.

 A, B, C, D, and E are incorrect based on the above. (Objective 4.3)
 * @author salim
 *
 */
	class Dudes {
		static long flag = 0;

		// insert code here
		//synchronized void chat(long id) {
			void chat(long id) {
		if(flag == 0) flag = id;

		for(int x = 1; x < 3; x++) {

		if(flag == id) System.out.print("yo ");

		else System.out.print("dude ");

		}

		}
 }


text:
<?php

namespace Caesar\AdminBundle\DependencyInjection\Security\Factory;

use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;

class CaesarUserFactory implements SecurityFactoryInterface {

    public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) {
        $providerId = 'security.authentication.provider.admin.' . $id;
        $container
                ->setDefinition($providerId, new DefinitionDecorator('caesar_admin.security.authentication.provider'));

        $listenerId = 'security.authentication.listener.admin.' . $id;
        $listener = $container->setDefinition($listenerId, new DefinitionDecorator('caesar_admin.security.authentication.listener'));

        return array($providerId, $listenerId, $defaultEntryPoint);
    }

    public function getKey() {
        return 'http_basic';
    }

    public function getPosition() {
        return 'pre_auth';
    }

    public function addConfiguration(NodeDefinition $builder) {

    }

}


text:
/** \file libswd_cmdq.c */

#include <libswd.h>

/*******************************************************************************
 * \defgroup libswd_cmdq Command Queue helper functions
 * @{
 ******************************************************************************/

/** Initialize new queue element in memory that becomes a queue root.
 * \param *cmdq pointer to the command queue element of type libswd_cmd_t
 * \return LIBSWD_OK on success, LIBSWD_ERROR_CODE code on failure
 */
int libswd_cmdq_init(libswd_cmd_t *cmdq){
 cmdq=(libswd_cmd_t *)calloc(1,sizeof(libswd_cmd_t));
 if (cmdq==NULL) return LIBSWD_ERROR_OUTOFMEM;
 cmdq->prev=NULL;
 cmdq->next=NULL;
 return LIBSWD_OK;
}

/** Find queue root (first element).
 * \param *cmdq pointer to any queue element
 * \return libswd_cmd_t* pointer to the first element (root), NULL on failure
 */
libswd_cmd_t* libswd_cmdq_find_head(libswd_cmd_t *cmdq){
 if (cmdq==NULL) return NULL;
 libswd_cmd_t *cmd=cmdq;
 while (cmd->prev!=NULL) cmd=cmd->prev;
 return cmd;
}

/** Find queue tail (last element).
 * \param  *cmdq pointer to any queue element
 * \return libswd_cmd_t* pointer to the last element (tail), NULL on failure
 */
libswd_cmd_t* libswd_cmdq_find_tail(libswd_cmd_t *cmdq){
 if (cmdq==NULL) return NULL;
 libswd_cmd_t *cmd=cmdq;
 while (cmd->next!=NULL) cmd=cmd->next;
 return cmd;
}

/** Find last executed element from the *cmdq.
 * Start search at *cmdq head, return element pointer or NULL if not found.
 * \param *cmdq queue that contains elements.
 * \return libswd_cmd_t* pointer to the last executed element or NULL on error.
 */
libswd_cmd_t* libswd_cmdq_find_exectail(libswd_cmd_t *cmdq){
 if (cmdq==NULL) return NULL;
 libswd_cmd_t *cmd=libswd_cmdq_find_head(cmdq);
 if (cmd==NULL) return NULL;
 for (cmd=libswd_cmdq_find_head(cmdq);cmd;cmd=cmd->next){
  if (cmd->done) {
   if (cmd->next){
    if (!cmd->next->done) return cmd;
   } else return cmd;
  }
 }
 return NULL;
}

/** Append element pointed by *cmd at the end of the quque pointed by *cmdq.
 * After this operation queue will be pointed by appended element (ie. last
 * element added becomes actual quque pointer to show what was added recently).
 * \param *cmdq pointer to any element on command queue
 * \param *cmd pointer to the command to be appended
 * \return number of appended elements (one), LIBSWD_ERROR_CODE on failure
 */
int libswd_cmdq_append(libswd_cmd_t *cmdq, libswd_cmd_t *cmd){
 if (cmdq==NULL) return LIBSWD_ERROR_NULLQUEUE;
 if (cmd==NULL) return LIBSWD_ERROR_NULLPOINTER;
 if (cmdq->next != NULL){
  libswd_cmd_t *lastcmd;
  lastcmd=libswd_cmdq_find_tail(cmdq);
  lastcmd->next=cmd;
  cmd->prev=lastcmd;
 } else {
  cmdq->next=cmd;
  cmd->prev=cmdq;
 }
 return 1;
}

/** Free queue pointed by *cmdq element.
 * \param *cmdq pointer to any element on command queue
 * \return number of elements destroyed, LIBSWD_ERROR_CODE on failure
 */
int libswd_cmdq_free(libswd_cmd_t *cmdq){
 if (cmdq==NULL) return LIBSWD_ERROR_NULLQUEUE;
 int cmdcnt=0;
 libswd_cmd_t *cmd, *nextcmd;
 cmd=libswd_cmdq_find_head(cmdq);
 while (cmd!=NULL) {
  nextcmd=cmd->next;
  free(cmd);
  cmd=nextcmd;
  cmdcnt++;
 }
 return cmdcnt;
}

/** Free queue head up to *cmdq element.
 * \param *cmdq pointer to the element that becomes new queue root.
 * \return number of elements destroyed, or LIBSWD_ERROR_CODE on failure.
 */
int libswd_cmdq_free_head(libswd_cmd_t *cmdq){
 if (cmdq==NULL) return LIBSWD_ERROR_NULLQUEUE;
 int cmdcnt=0;
 libswd_cmd_t *cmdqroot, *nextcmd;
 cmdqroot=libswd_cmdq_find_head(cmdq);
 while(cmdqroot!=cmdq){
  nextcmd=cmdqroot->next;
  free(cmdqroot);
  cmdqroot=nextcmd;
  cmdcnt++;
 }
 cmdqroot->prev=NULL;
 return cmdcnt;
}

/** Free queue tail starting after *cmdq element.
 * \param *cmdq pointer to the last element on the new queue.
 * \return number of elements destroyed, or LIBSWD_ERROR_CODE on failure.
 */
int libswd_cmdq_free_tail(libswd_cmd_t *cmdq){
 if (cmdq==NULL) return LIBSWD_ERROR_NULLQUEUE;
 int cmdcnt=0;
 libswd_cmd_t *cmdqend;
 if (cmdq->next==NULL) return 0;
 cmdqend=libswd_cmdq_find_tail(cmdq->next);
 if (cmdqend==NULL) return LIBSWD_ERROR_QUEUE;
 while(cmdqend!=cmdq){
  cmdqend=cmdqend->prev;
  free(cmdqend->next);
  cmdcnt++;
 }
 cmdq->next=NULL;
 return cmdcnt;
}

/** Flush command queue contents into interface driver and update **cmdq.
 * Operation is specified by LIBSWD_OPERATION and can be used to select
 * how to flush the queue, ie. head-only, tail-only, one, all, etc.
 * This function is not only used to flush libswdctx->cmdq but also other
 * queues (i.e. error handling) so the parameter is **cmdq not libswdctx itself.
 * This is the only place where **cmdq is updated to the last executed element.
 * Double pointer is used because we update pointer element not its data.
 * \param *cmdq pointer to queue to be flushed.
 * \param operation tells how to flush the queue.
 * \return number of commands transmitted, or LIBSWD_ERROR_CODE on failure.
 * !TODO: HOW WE WANT TO UPDATE CMDQ ELEMENT AFTER PROCESSING WITHOUT DOUBLE POINTER?
 */
int libswd_cmdq_flush(libswd_ctx_t *libswdctx, libswd_cmd_t **cmdq, libswd_operation_t operation){
 if (libswdctx==NULL) return LIBSWD_ERROR_NULLCONTEXT;
 if (*cmdq==NULL||cmdq==NULL) return LIBSWD_ERROR_NULLQUEUE;
 if (operation<LIBSWD_OPERATION_FIRST || operation>LIBSWD_OPERATION_LAST)
  return LIBSWD_ERROR_BADOPCODE;

 int res, cmdcnt=0;
 libswd_cmd_t *cmd, *firstcmd, *lastcmd;

 switch (operation){
  case LIBSWD_OPERATION_TRANSMIT_HEAD:
   firstcmd=libswd_cmdq_find_head(*cmdq);
   lastcmd=*cmdq;
   break;
  case LIBSWD_OPERATION_TRANSMIT_TAIL:
   firstcmd=*cmdq;
   lastcmd=libswd_cmdq_find_tail(*cmdq);
   break;
  case LIBSWD_OPERATION_EXECUTE:
  case LIBSWD_OPERATION_TRANSMIT_ALL:
   firstcmd=libswd_cmdq_find_head(*cmdq);
   lastcmd=libswd_cmdq_find_tail(*cmdq);
   break;
  case LIBSWD_OPERATION_TRANSMIT_ONE:
   firstcmd=*cmdq;
   lastcmd=*cmdq;
   break;
  case LIBSWD_OPERATION_TRANSMIT_LAST:
   firstcmd=libswd_cmdq_find_tail(*cmdq);
   lastcmd=firstcmd;
   break;
  default:
   return LIBSWD_ERROR_BADOPCODE;
 }

 if (firstcmd==NULL) return LIBSWD_ERROR_QUEUEROOT;
 if (lastcmd==NULL) return LIBSWD_ERROR_QUEUETAIL;

 if (firstcmd==lastcmd){
  if (!firstcmd->done) {
   res=libswd_drv_transmit(libswdctx, firstcmd);
   if (res<0) return res;
   *cmdq=firstcmd;
  }
  return 1;
 }

 for (cmd=firstcmd;;cmd=cmd->next){
  if (cmd->done){
   if (cmd->next){
    continue;
   } else break;
  }
  res=libswd_drv_transmit(libswdctx, cmd);
  if (res<0) return res;
  cmdcnt=+res;
  if (cmd==lastcmd) break;
 }
 *cmdq=cmd;
 return cmdcnt;
}

/** @} */


text:
package org.apache.ignite.internal.processors.cache.query.continuous;

import java.util.concurrent.CountDownLatch;
import javax.cache.event.CacheEntryEvent;
import javax.cache.event.CacheEntryUpdatedListener;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cache.query.ContinuousQuery;
import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.lang.IgniteOutClosure;
import org.apache.ignite.resources.LoggerResource;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;

import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;

/**
 *
 */
public class IgniteCacheContinuousQueryClientTest extends GridCommonAbstractTest {
    /** */
    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);

    /** */
    private boolean client;

    /** {@inheritDoc} */
    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
        IgniteConfiguration cfg = super.getConfiguration(gridName);

        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);

        CacheConfiguration ccfg = new CacheConfiguration();

        ccfg.setCacheMode(PARTITIONED);
        ccfg.setAtomicityMode(ATOMIC);
        ccfg.setWriteSynchronizationMode(FULL_SYNC);

        cfg.setCacheConfiguration(ccfg);

        cfg.setClientMode(client);

        return cfg;
    }

    /** {@inheritDoc} */
    @Override protected void afterTest() throws Exception {
        super.afterTest();

        stopAllGrids();
    }

    /**
     * @throws Exception If failed.
     */
    public void testNodeJoins() throws Exception {
        startGrids(2);

        client = true;

        final int CLIENT_ID = 3;

        Ignite clientNode = startGrid(CLIENT_ID);

        client = false;

        final CacheEventListener lsnr = new CacheEventListener();

        ContinuousQuery<Object, Object> qry = new ContinuousQuery<>();

        qry.setLocalListener(lsnr);

        QueryCursor<?> cur = clientNode.cache(null).query(qry);

        for (int i = 0; i < 10; i++) {
            log.info("Start iteration: " + i);

            lsnr.latch = new CountDownLatch(1);

            Ignite joined1 = startGrid(4);

            IgniteCache<Object, Object> joinedCache1 = joined1.cache(null);

            joinedCache1.put(primaryKey(joinedCache1), 1);

            assertTrue("Failed to wait for event.", lsnr.latch.await(5, SECONDS));

            lsnr.latch = new CountDownLatch(1);

            Ignite joined2 = startGrid(5);

            IgniteCache<Object, Object> joinedCache2 = joined2.cache(null);

            joinedCache2.put(primaryKey(joinedCache2), 2);

            assertTrue("Failed to wait for event.", lsnr.latch.await(5, SECONDS));

            stopGrid(4);

            stopGrid(5);
        }

        cur.close();
    }

    /**
     * @throws Exception If failed.
     */
    public void testNodeJoinsRestartQuery() throws Exception {
        startGrids(2);

        client = true;

        final int CLIENT_ID = 3;

        Ignite clientNode = startGrid(CLIENT_ID);

        client = false;

        for (int i = 0; i < 10; i++) {
            log.info("Start iteration: " + i);

            final CacheEventListener lsnr = new CacheEventListener();

            ContinuousQuery<Object, Object> qry = new ContinuousQuery<>();

            qry.setLocalListener(lsnr);

            QueryCursor<?> cur = clientNode.cache(null).query(qry);

            lsnr.latch = new CountDownLatch(1);

            Ignite joined1 = startGrid(4);

            IgniteCache<Object, Object> joinedCache1 = joined1.cache(null);

            joinedCache1.put(primaryKey(joinedCache1), 1);

            assertTrue("Failed to wait for event.", lsnr.latch.await(5, SECONDS));

            cur.close();

            lsnr.latch = new CountDownLatch(1);

            Ignite joined2 = startGrid(5);

            IgniteCache<Object, Object> joinedCache2 = joined2.cache(null);

            joinedCache2.put(primaryKey(joinedCache2), 2);

            assertFalse("Unexpected event received.", GridTestUtils.waitForCondition(new GridAbsPredicate() {
                @Override public boolean apply() {
                    return 1 != lsnr.latch.getCount();
                }
            }, 1000));

            stopGrid(4);

            stopGrid(5);
        }
    }

    /**
     * @throws Exception If failed.
     */
    public void testServerNodeLeft() throws Exception {
        startGrids(3);

        client = true;

        final int CLIENT_ID = 3;

        Ignite clnNode = startGrid(CLIENT_ID);

        client = false;

        IgniteOutClosure<IgniteCache<Integer, Integer>> rndCache =
            new IgniteOutClosure<IgniteCache<Integer, Integer>>() {
                int cnt = 0;

                @Override public IgniteCache<Integer, Integer> apply() {
                    ++cnt;

                    return grid(CLIENT_ID).cache(null);
                }
            };

        final CacheEventListener lsnr = new CacheEventListener();

        ContinuousQuery<Object, Object> qry = new ContinuousQuery<>();

        qry.setLocalListener(lsnr);

        QueryCursor<?> cur = clnNode.cache(null).query(qry);

        boolean first = true;

        int keyCnt = 1;

        for (int i = 0; i < 10; i++) {
            log.info("Start iteration: " + i);

            if (first)
                first = false;
            else {
                for (int srv = 0; srv < CLIENT_ID - 1; srv++)
                    startGrid(srv);
            }

            lsnr.latch = new CountDownLatch(keyCnt);

            for (int key = 0; key < keyCnt; key++)
                rndCache.apply().put(key, key);

            assertTrue("Failed to wait for event. Left events: " + lsnr.latch.getCount(),
                lsnr.latch.await(10, SECONDS));

            for (int srv = 0; srv < CLIENT_ID - 1; srv++)
                stopGrid(srv);
        }

        cur.close();
    }

    /**
     *
     */
    private static class CacheEventListener implements CacheEntryUpdatedListener<Object, Object> {
        /** */
        private volatile CountDownLatch latch = new CountDownLatch(1);

        /** */
        @LoggerResource
        private IgniteLogger log;

        /** {@inheritDoc} */
        @Override public void onUpdated(Iterable<CacheEntryEvent<?, ?>> evts) {
            for (CacheEntryEvent<?, ?> evt : evts) {
                log.info("Received cache event: " + evt);

                latch.countDown();
            }
        }
    }
}


text:
package ecologylab.bigsemantics.metadata.builtins.declarations.person.author;

import ecologylab.bigsemantics.metadata.builtins.Document;
import ecologylab.bigsemantics.metadata.builtins.MetadataBuiltinsTypesScope;
import ecologylab.bigsemantics.metadata.builtins.RichDocument;
import ecologylab.bigsemantics.metadata.builtins.creativeWork.CreativeWork;
import ecologylab.bigsemantics.metadata.builtins.person.Person;
import ecologylab.bigsemantics.metadata.mm_name;
import ecologylab.bigsemantics.metadata.scalar.MetadataString;
import ecologylab.bigsemantics.metametadata.MetaMetadataCompositeField;
import ecologylab.bigsemantics.namesandnums.SemanticsNames;
import ecologylab.serialization.annotations.simpl_collection;
import ecologylab.serialization.annotations.simpl_composite;
import ecologylab.serialization.annotations.simpl_inherit;
import ecologylab.serialization.annotations.simpl_scalar;
import ecologylab.serialization.annotations.simpl_scope;
import ecologylab.serialization.annotations.simpl_wrap;
import java.lang.String;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 *An author of an article or creative work.
 */
@simpl_inherit
public class AuthorDeclaration extends Person
{
	@simpl_scalar
	private MetadataString affiliation;

	@simpl_scalar
	private MetadataString city;

	@simpl_collection("creative_work")
	@mm_name("creative_works")
	private List<CreativeWork> creativeWorks;

	@simpl_composite
	@simpl_wrap
	@simpl_scope("repository_documents")
	@mm_name("webpage")
	private Document webpage;

	@simpl_composite
	@mm_name("twitter_profile")
	private RichDocument twitterProfile;

	public AuthorDeclaration()
	{ super(); }

	public AuthorDeclaration(MetaMetadataCompositeField mmd) {
		super(mmd);
	}

	public MetadataString	affiliation()
	{
		MetadataString	result = this.affiliation;
		if (result == null)
		{
			result = new MetadataString();
			this.affiliation = result;
		}
		return result;
	}

	public String getAffiliation()
	{
		return this.affiliation == null ? null : affiliation().getValue();
	}

	public MetadataString getAffiliationMetadata()
	{
		return affiliation;
	}

	public void setAffiliation(String affiliation)
	{
		if (affiliation != null)
			this.affiliation().setValue(affiliation);
	}

	public void setAffiliationMetadata(MetadataString affiliation)
	{
		this.affiliation = affiliation;
	}

	public MetadataString	city()
	{
		MetadataString	result = this.city;
		if (result == null)
		{
			result = new MetadataString();
			this.city = result;
		}
		return result;
	}

	public String getCity()
	{
		return this.city == null ? null : city().getValue();
	}

	public MetadataString getCityMetadata()
	{
		return city;
	}

	public void setCity(String city)
	{
		if (city != null)
			this.city().setValue(city);
	}

	public void setCityMetadata(MetadataString city)
	{
		this.city = city;
	}

	public List<CreativeWork> getCreativeWorks()
	{
		return creativeWorks;
	}

  // lazy evaluation:
  public List<CreativeWork> creativeWorks()
  {
    if (creativeWorks == null)
      creativeWorks = new ArrayList<CreativeWork>();
    return creativeWorks;
  }

  // addTo:
  public void addToCreativeWorks(CreativeWork element)
  {
    creativeWorks().add(element);
  }

  // size:
  public int creativeWorksSize()
  {
    return creativeWorks == null ? 0 : creativeWorks.size();
  }

	public void setCreativeWorks(List<CreativeWork> creativeWorks)
	{
		this.creativeWorks = creativeWorks;
	}

	public Document getWebpage()
	{
		return webpage;
	}

	public void setWebpage(Document webpage)
	{
		this.webpage = webpage;
	}

	public RichDocument getTwitterProfile()
	{
		return twitterProfile;
	}

	public void setTwitterProfile(RichDocument twitterProfile)
	{
		this.twitterProfile = twitterProfile;
	}
}


text:
'''
SuffixArray.py - sarry frontend
===============================

:Author: Andreas Heger
:Release: $Id$
:Date: |today|
:Tags: Python

Code
----

'''

import os
import string
import sys

ParamExecutableLookup = "sary"

def Search(pattern, suffix_arrays):

    matches = []

    for suffix_array in suffix_arrays:
        statement = "%s %s %s" % (ParamExecutableLookup, pattern, suffix_array)
        matches += map(lambda x: x[:-1], os.popen(statement).readlines())

    return matches


text:
package org.igu.teamcity;

/**
 * Created by iguissouma on 02/06/2015.
 */
public class YammerMessage {
    public static String doFormatMessage(String project, String build, String statusText) {
        return   project + " #" + build + " " + statusText ;
    }
}


text:
<assembly>
	<id>bin</id>
	<formats>
		<format>zip</format>
	</formats>
	<includeBaseDirectory>false</includeBaseDirectory>
	<files>
		<file>
			<source>target/dd-plist.jar</source>
			<outputDirectory></outputDirectory>
			<destName>dd-plist.jar</destName>
        </file>
    </files>
  <fileSets>
    <fileSet>
    	<directory>target/javadoc</directory>
    	<outputDirectory>javadoc</outputDirectory>
	</fileSet>
  </fileSets>
</assembly>


text:
import { Component, OnInit } from '@angular/core';
import { AppStoreService } from '../../services/app-store.service';
import { Project } from '../../entities/project';
import { LearnerSetupApiService } from '../../services/api/learner-setup-api.service';
import { LearnerSetup } from '../../entities/learner-setup';
import { ToastService } from '../../services/toast.service';
import { LearnerApiService } from '../../services/api/learner-api.service';
import { Router } from '@angular/router';
import { PromptService } from '../../services/prompt.service';
import { LearnerSetupsCreateEditView } from './learner-setups-create-edit-view';

@Component({
  selector: 'learner-setups-create-view',
  templateUrl: './learner-setups-create-view.component.html'
})
export class LearnerSetupsCreateViewComponent extends LearnerSetupsCreateEditView implements OnInit {

  constructor(private appStore: AppStoreService,
              private learnerSetupApi: LearnerSetupApiService,
              private toastService: ToastService,
              private learnerApi: LearnerApiService,
              private promptService: PromptService,
              private router: Router) {
    super();
  }

  ngOnInit() {
    this.setup = new LearnerSetup();
    this.setup.environments = [this.project.getDefaultEnvironment()];
  }

  saveLearnerSetup(): void {
    const setup = this.createLearnerSetup();
    this.learnerSetupApi.create(this.project.id, setup).subscribe(
      () => {
        this.toastService.success('The learner setup has been saved.');
        this.router.navigate(['/app', 'projects', this.project.id, 'learner', 'setups']);
      },
      res => this.toastService.danger(`The setup could not be saved. ${res.error.message}`)
    );
  }

  startLearning(): void {
    this.promptService.prompt('Enter a comment for the learning process', {
      required: false,
      okBtnText: 'Run',
    })
      .then(comment => {
        const config = {
          setup: this.createLearnerSetup(),
          options: {
            comment
          }
        };

        this.learnerApi.start(this.project.id, config).subscribe(
          result => {
            this.toastService.success('Learner process started successfully.');
            this.router.navigate(['/app', 'projects', this.project.id, 'learner'], {
              queryParams: {
                testNo: result.testNo
              }
            });
          },
          res => this.toastService.danger(`The process could not be started. ${res.error.message}`)
        );
      });
  }

  get project(): Project {
    return this.appStore.project;
  }

  private createLearnerSetup(): LearnerSetup {
    const setup = this.setup.copy();
    setup.symbols.forEach(ps => ps.symbol = {id: ps.symbol.id} as any);
    setup.preSymbol.symbol = {id: setup.preSymbol.symbol.id} as any;
    if (setup.postSymbol != null) {
      setup.postSymbol.symbol = {id: setup.postSymbol.symbol.id} as any;
    }
    return setup;
  }
}


text:
title: "Red Butte Garden Gift Shop"
layout: "default"
---

Your purchase helps support the Garden!

Garden members receive 10% off purchases made in the Red Butte Garden Gift Shop.

Looking for a special gift for yourself or a loved one? The Red Butte Garden Gift Shop offers a unique selection of local products and a wide variety of botanical and garden-inspired gifts that you may not find anywhere else. Our collection of fine jewelry, accessories, books, notecards, kids' items, fairy garden supplies, and indoor/outdoor home and holiday decor is sure to delight any garden enthusiast. Or share the beauty of the Garden with a
Gift Membership!

The gift shop is located on the main floor inside the Red Butte Garden Visitor Center and is open year-round during regular Garden business hours. There is always something new and fun to consider, so visit us often! No admission fee required to shop.


text:
{{ atleta.partida.partida_data | formatDataHoraPartida }}

    {{ atleta.partida.local }}

      {{ atleta.partida.clube_casa_posicao }}º

      x

      {{ atleta.partida.clube_visitante_posicao }}º

Em {{ atleta.jogos_num }} jogos:

{{ atleta.scout.SG + 0 }} jogos sem sofrer gols

{{ atleta.scout.DD + 0 }} defesas difíceis

{{ atleta.scout.DP + 0 }} defesas de pênalti

{{ atleta.scout.GS + 0 }} gols sofridos

{{ atleta.scout.CA + 0 }} cartões amarelos

{{ atleta.scout.CV + 0 }} cartões vermelhos


text:
export default {
  loadMovieTemplate: function() {
    $('#active').removeAttr("id");
    var filename = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
    $(".navbar-nav a[href*=" + filename + "]").attr("id", "active");

    $('#site-slogan-title').text('Movies section');
    $('#site-slogan-text').text('Oh it\' movie time already...');
    $('#site-slogan-btn').css("display", "none");

    $('#carousel').addClass("movies");
    $('#carousel').removeClass('movies-info');
    $('#carousel').removeClass('games');
    $('#carousel').removeClass('location');
    $('#carousel').removeClass('games-info');
  }
};


text:
@import UIKit;

@interface AAPLDatePickerController : UIViewController
@end


text:
var mongoose=require('mongoose');
var cellSchema = new mongoose.Schema({
  row: Number,
  col: Number,
  val: {},
  table: {
    name: String
  }
});
var Tupd = mongoose.model('Tupd', cellSchema);

module.exports = {
  Tupd: Tupd,
  getNewId: mongoose.Types.ObjectId,
}


text:
package db

import (
	"strings"
	"database/sql"
)

var SQL *sql.DB

func IsErrUniqueConstraint(err error) bool {
	if strings.Contains(err.Error(), "UNIQUE") {
		return true
	}

	return false
}


text:
from contextlib import contextmanager

@contextmanager
def temp_change_dir(new_dir):
    cwd = os.getcwd()
    os.chdir(new_dir)
    yield
    os.chdir(cwd)