text:
!function ($) {

    var DateRangePicker = function (element, options, cb) {
        var hasOptions = typeof options == 'object'
        var localeObject;

        //state
        this.startDate = Date.today();
        this.endDate = Date.today();
        this.changed = false;
        this.ranges = {};
        this.opens = 'right';
        this.cb = function () { };
        this.format = 'MM/dd/yyyy';
        this.locale = {
            applyLabel:"Apply",
            fromLabel:"From",
            toLabel:"To",
            customRangeLabel:"Custom Range",
            daysOfWeek:['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa']
        };

        localeObject = this.locale;

        this.leftCalendar = {
            month: Date.today().set({ day: 1, month: this.startDate.getMonth(), year: this.startDate.getFullYear() }),
            calendar: Array()
        };

        this.rightCalendar = {
            month: Date.today().set({ day: 1, month: this.endDate.getMonth(), year: this.endDate.getFullYear() }),
            calendar: Array()
        };

        //element that triggered the date range picker
        this.element = $(element);

        if (this.element.hasClass('pull-right'))
            this.opens = 'left';

        if (this.element.is('input')) {
            this.element.on({
                click: $.proxy(this.show, this),
                focus: $.proxy(this.show, this),
                blur: $.proxy(this.hide, this)
            });
        } else {
            this.element.on('click', $.proxy(this.show, this));
        }

        if (hasOptions) {
            if(typeof options.locale == 'object') {
                $.each(localeObject, function (property, value) {
                    localeObject[property] = options.locale[property] || value;
                });
            }
        }

        var DRPTemplate = '
' +
                '

' +
                '

' +
                '
' +
                  '
' +
                    '
' +
                      '' + this.locale.fromLabel + '' +
                      '<input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" />' +
                    '
' +
                    '
' +
                      '' + this.locale.toLabel + '' +
                      '<input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" />' +
                    '
' +
                    '<button class="btn btn-small btn-success" disabled="disabled">' + this.locale.applyLabel + '</button>' +
                  '
' +
                '
' +
              '
';

        //the date range picker
        this.container = $(DRPTemplate).appendTo('body');

        if (hasOptions) {
            if (typeof options.ranges == 'object') {
                for (var range in options.ranges) {

                    var start = options.ranges[range][0];
                    var end = options.ranges[range][1];

                    if (typeof start == 'string')
                        start = Date.parse(start);
                    if (typeof end == 'string')
                        end = Date.parse(end);

                    this.ranges[range] = [start, end];
                }

                var list = '
';
                for (var range in this.ranges) {
                    list += '
' + range + '
';
                }
                list += '
' + this.locale.customRangeLabel + '
';
                list += '
';
                this.container.find('.ranges').prepend(list);
            }

            if (typeof options.format == 'string')
                this.format = options.format;

            if (typeof options.startDate == 'string')
                this.startDate = Date.parse(options.startDate, this.format);

            if (typeof options.endDate == 'string')
                this.endDate = Date.parse(options.endDate, this.format);

            if (typeof options.opens == 'string')
                this.opens = options.opens;
        }

        if (this.opens == 'right') {
            //swap calendar positions
            var left = this.container.find('.calendar.left');
            var right = this.container.find('.calendar.right');
            left.removeClass('left').addClass('right');
            right.removeClass('right').addClass('left');
        }

        if (typeof options == 'undefined' || typeof options.ranges == 'undefined')
            this.container.find('.calendar').show();

        if (typeof cb == 'function')
            this.cb = cb;

        this.container.addClass('opens' + this.opens);

        //event listeners
        this.container.on('mousedown', $.proxy(this.mousedown, this));
        this.container.find('.calendar').on('click', '.prev', $.proxy(this.clickPrev, this));
        this.container.find('.calendar').on('click', '.next', $.proxy(this.clickNext, this));
        this.container.find('.ranges').on('click', 'button', $.proxy(this.clickApply, this));

        this.container.find('.calendar').on('click', 'td', $.proxy(this.clickDate, this));
        this.container.find('.calendar').on('mouseenter', 'td', $.proxy(this.enterDate, this));
        this.container.find('.calendar').on('mouseleave', 'td', $.proxy(this.updateView, this));

        this.container.find('.ranges').on('click', 'li', $.proxy(this.clickRange, this));
        this.container.find('.ranges').on('mouseenter', 'li', $.proxy(this.enterRange, this));
        this.container.find('.ranges').on('mouseleave', 'li', $.proxy(this.updateView, this));

        this.element.on('keyup', $.proxy(this.updateFromControl, this));

        this.updateView();
        this.updateCalendars();

    };

    DateRangePicker.prototype = {

        constructor: DateRangePicker,

        mousedown: function (e) {
            e.stopPropagation();
            e.preventDefault();
        },

        updateView: function () {
            this.leftCalendar.month.set({ month: this.startDate.getMonth(), year: this.startDate.getFullYear() });
            this.rightCalendar.month.set({ month: this.endDate.getMonth(), year: this.endDate.getFullYear() });

            this.container.find('input[name=daterangepicker_start]').val(this.startDate.toString(this.format));
            this.container.find('input[name=daterangepicker_end]').val(this.endDate.toString(this.format));

            if (this.startDate.equals(this.endDate) || this.startDate.isBefore(this.endDate)) {
                this.container.find('button').removeAttr('disabled');
            } else {
                this.container.find('button').attr('disabled', 'disabled');
            }
        },

        updateFromControl: function () {
            if (!this.element.is('input')) return;

            var dateString = this.element.val().split(" - ");
            var start = Date.parseExact(dateString[0], this.format);
            var end = Date.parseExact(dateString[1], this.format);

            if (start == null || end == null) return;
            if (end.isBefore(start)) return;

            this.startDate = start;
            this.endDate = end;

            this.updateView();
            this.cb(this.startDate, this.endDate);
            this.updateCalendars();
        },

        notify: function () {
            this.updateView();

            if (this.element.is('input')) {
                this.element.val(this.startDate.toString(this.format) + ' - ' + this.endDate.toString(this.format));
            }
            this.cb(this.startDate, this.endDate);
        },

        move: function () {
            if (this.opens == 'left') {
                this.container.css({
                    top: this.element.offset().top + this.element.outerHeight(),
                    right: $(window).width() - this.element.offset().left - this.element.outerWidth(),
                    left: 'auto'
                });
            } else {
                this.container.css({
                    top: this.element.offset().top + this.element.outerHeight(),
                    left: this.element.offset().left,
                    right: 'auto'
                });
            }
        },

        show: function (e) {
            this.container.show();
            this.move();

            if (e) {
                e.stopPropagation();
                e.preventDefault();
            }

            this.changed = false;

            $(document).on('mousedown', $.proxy(this.hide, this));
        },

        hide: function (e) {
            this.container.hide();
            $(document).off('mousedown', this.hide);

            if (this.changed)
                this.notify();
        },

        enterRange: function (e) {
            var label = e.target.innerHTML;
            if (label == this.locale.customRangeLabel) {
                this.updateView();
            } else {
                var dates = this.ranges[label];
                this.container.find('input[name=daterangepicker_start]').val(dates[0].toString(this.format));
                this.container.find('input[name=daterangepicker_end]').val(dates[1].toString(this.format));
            }
        },

        clickRange: function (e) {
            var label = e.target.innerHTML;
            if (label == this.locale.customRangeLabel) {
                this.container.find('.calendar').show();
            } else {
                var dates = this.ranges[label];

                this.startDate = dates[0];
                this.endDate = dates[1];

                this.leftCalendar.month.set({ month: this.startDate.getMonth(), year: this.startDate.getFullYear() });
                this.rightCalendar.month.set({ month: this.endDate.getMonth(), year: this.endDate.getFullYear() });
                this.updateCalendars();

                this.changed = true;

                this.container.find('.calendar').hide();
                this.hide();
            }
        },

        clickPrev: function (e) {
            var cal = $(e.target).parents('.calendar');
            if (cal.hasClass('left')) {
                this.leftCalendar.month.add({ months: -1 });
            } else {
                this.rightCalendar.month.add({ months: -1 });
            }
            this.updateCalendars();
        },

        clickNext: function (e) {
            var cal = $(e.target).parents('.calendar');
            if (cal.hasClass('left')) {
                this.leftCalendar.month.add({ months: 1 });
            } else {
                this.rightCalendar.month.add({ months: 1 });
            }
            this.updateCalendars();
        },

        enterDate: function (e) {

            var title = $(e.target).attr('title');
            var row = title.substr(1, 1);
            var col = title.substr(3, 1);
            var cal = $(e.target).parents('.calendar');

            if (cal.hasClass('left')) {
                this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].toString(this.format));
            } else {
                this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].toString(this.format));
            }

        },

        clickDate: function (e) {
            var title = $(e.target).attr('title');
            var row = title.substr(1, 1);
            var col = title.substr(3, 1);
            var cal = $(e.target).parents('.calendar');

            if (cal.hasClass('left')) {
                startDate = this.leftCalendar.calendar[row][col];
                endDate = this.endDate;
            } else {
                startDate = this.startDate;
                endDate = this.rightCalendar.calendar[row][col];
            }

            cal.find('td').removeClass('active');

            if (startDate.equals(endDate) || startDate.isBefore(endDate)) {
                $(e.target).addClass('active');
                if (!startDate.equals(this.startDate) || !endDate.equals(this.endDate))
                    this.changed = true;
                this.startDate = startDate;
                this.endDate = endDate;
            }
        },

        clickApply: function (e) {
            this.hide();
        },

        updateCalendars: function () {

            this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.getMonth(), this.leftCalendar.month.getFullYear());
            this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.getMonth(), this.rightCalendar.month.getFullYear());
            this.container.find('.calendar.left').html(this.renderCalendar(this.leftCalendar.calendar, this.startDate));
            this.container.find('.calendar.right').html(this.renderCalendar(this.rightCalendar.calendar, this.endDate));

        },

        buildCalendar: function (month, year) {

            var firstDay = Date.today().set({ day: 1, month: month, year: year });
            var lastMonth = firstDay.clone().add(-1).day().getMonth();
            var lastYear = firstDay.clone().add(-1).day().getFullYear();

            var daysInMonth = Date.getDaysInMonth(year, month);
            var daysInLastMonth = Date.getDaysInMonth(lastYear, lastMonth);

            var dayOfWeek = firstDay.getDay();

            //initialize a 6 rows x 7 columns array for the calendar
            var calendar = Array();
            for (var i = 0; i < 6; i++) {
                calendar[i] = Array();
            }

            //populate the calendar with date objects
            var startDay = daysInLastMonth - dayOfWeek + 1;
            if (dayOfWeek == 0)
                startDay = daysInLastMonth - 6;

            var curDate = Date.today().set({ day: startDay, month: lastMonth, year: lastYear });
            for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = curDate.clone().add(1).day()) {
                if (i > 0 && col % 7 == 0) {
                    col = 0;
                    row++;
                }
                calendar[row][col] = curDate;
            }

            return calendar;

        },

        renderCalendar: function (calendar, selected) {

            var html = '
';
            html += '
';
            html += '
';
            html += '	';
            html += '' + calendar[1][1].toString("MMMM yyyy") + '	';
            html += '	';
            html += '
';
            html += '
';

            $.each(this.locale.daysOfWeek, function (index, dayOfWeek) {
                html += '' + dayOfWeek + '	';
            });

            html += '
';
            html += '
';
            html += '
';

            for (var row = 0; row < 6; row++) {
                html += '
';
                for (var col = 0; col < 7; col++) {
                    var cname = (calendar[row][col].getMonth() == calendar[1][1].getMonth()) ? '' : 'off';
                    if (calendar[row][col].equals(selected))
                        cname = 'active';
                    var title = 'r' + row + 'c' + col;
                    html += '' + calendar[row][col].getDate() + '	';
                }
                html += '
';
            }

            html += '
';
            html += '
';

            return html;

        }

    };

    $.fn.daterangepicker = function (options, cb) { new DateRangePicker(this, options, cb); };

} (window.jQuery);


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer
{
  public class JsonPropertyPropertyLevelSetting
  {
    #region Types
    public class Vessel
    {
      public string Name { get; set; }
      public string Class { get; set; }

      [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
      public DateTime? LaunchDate { get; set; }
    }
    #endregion

    public void Example()
    {
      #region Usage
      Vessel vessel = new Vessel
        {
          Name = "Red October",
          Class = "Typhoon"
        };

      string json = JsonConvert.SerializeObject(vessel, Formatting.Indented);

      Console.WriteLine(json);
      // {
      //   "Name": "Red October",
      //   "Class": "Typhoon"
      // }
      #endregion
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
/*global module:false*/
module.exports = function(grunt) {

  'Use strict';

  // show elapsed time at the end
  require('time-grunt')(grunt);

  // load all grunt tasks
  //require('load-grunt-tasks')(grunt);
  require('jit-grunt')(grunt,{
    'bump-only':'grunt-bump',
    'bump-commit':'grunt-bump',
    'coveralls':'grunt-karma-coveralls'
  });

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    meta: {
      bannerLocal: '/*! iFrame Resizer (iframeSizer.min.js ) - v<%= pkg.version %> - ' +
        '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
        ' *  Desc: Force cross domain iframes to size to content.\n' +
        ' *  Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.\n' +
        ' *  Copyright: (c) <%= grunt.template.today("yyyy") %> David J. Bradshaw - dave@bradshaw.net\n' +
        ' *  License: MIT\n */\n',
      bannerRemote: '/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v<%= pkg.version %> - ' +
        '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
        ' *  Desc: Include this file in any page being loaded into an iframe\n' +
        ' *        to force the iframe to resize to the content size.\n' +
        ' *  Requires: iframeResizer.min.js on host page.\n' +
        ' *  Copyright: (c) <%= grunt.template.today("yyyy") %> David J. Bradshaw - dave@bradshaw.net\n' +
        ' *  License: MIT\n */\n'
    },

    clean: ['coverage', 'coverageLcov'],

    qunit: {
      files: ['test/*.html']
    },

    karma: {
      options: {
        configFile: 'karma.conf.js'
      },
      travis:{
        singleRun: true,
        browsers: ['PhantomJS'],
        coverageReporter: {
          type : 'lcov',
          dir : 'coverageLcov/'
        },
      },
      single:{
        singleRun: true,
        browsers: ['Chrome', 'Firefox',  'PhantomJS'] // 'Safari' ,
      }
    },

    coveralls: {
      options: {
          debug: true,
          coverageDir: 'coverageLcov',
          dryRun: false,
          force: true,
          recursive: true
      }
    },

    jshint: {
      options: {
          globals: {
          jQuery:false,
          require:true,
          process:true
        },
      },
      gruntfile: {
        src: 'gruntfile.js'
      },
      code: {
        src: 'src/**/*.js'
      },
    },

    uglify: {
      options: {
        sourceMap:true,
        sourceMapIncludeSources:true,
        report:'gzip',
      },
      local: {
        options:{
          banner:'<%= meta.bannerLocal %>',
          sourceMapName: 'js/iframeResizer.map'
        },
        src: ['js/iframeResizer.js'],
        dest: 'js/iframeResizer.min.js',
      },
      remote: {
        options: {
          banner:'<%= meta.bannerRemote %>',
          sourceMapName: 'js/iframeResizer.contentWindow.map'
        },
        src: ['js/iframeResizer.contentWindow.js'],
        dest: 'js/iframeResizer.contentWindow.min.js',
      },
      polyfil: {
        options: {
          banner:'// IE8 polyfils for iframeResizer.js\n',
          sourceMapName: 'js/ie8.polyfils.map'
        },
        src: ['src/ie8.polyfils.js'],
        dest: 'js/ie8.polyfils.min.js',
      }
    },

    watch: {
      files: ['src/**/*'],
      tasks: 'default'
    },

    bump: {
      options: {
        files: ['package.json','bower.json','iframeResizer.jquery.json'],
        updateConfigs: ['pkg'],
        commit: true,
        commitMessage: 'Release v%VERSION%',
        commitFiles: ['-a'], // '-a' for all files
        createTag: true,
        tagName: 'v%VERSION%',
        tagMessage: 'Version %VERSION%',
        push: true,
        pushTo: 'origin',
        gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe'
      }
    },

    shell: {
      options:{
        stdout: true,
        stderr: true,
        failOnError: true
      },
      npm:{
        command: 'npm publish'
      },
      deployExample: {
        command: function(){

          var
            retStr = '',
            fs = require('fs');

          if (fs.existsSync('bin')) {
              retStr = 'bin/deploy.sh';
          }

          return retStr;
        }
      }
    },

    jsonlint: {
      json: {
        src: [ '*.json' ]
      }
    },

   removeBlock: {
      options : ["TEST CODE START", 'TEST CODE END'],
      files : [
        {src : 'src/iframeResizer.contentWindow.js', dest : 'js/iframeResizer.contentWindow.js'}
      ]
    },

    copy: {
      main: {
        nonull: true,
        src: 'src/iframeResizer.js',
        dest: 'js/iframeResizer.js',
      },
    },

  });

  grunt.registerTask('default', ['notest','karma:single']);
  grunt.registerTask('build',   ['removeBlock','copy','uglify']);
  grunt.registerTask('notest',  ['jsonlint','jshint','build']);
  grunt.registerTask('test',    ['clean','jshint','qunit','karma:single']);
  grunt.registerTask('travis',  ['clean','notest','qunit','karma:travis','coveralls']);

  grunt.registerTask('postBump',['build','bump-commit','shell']);
  grunt.registerTask('preBump', ['clean','notest','qunit']);
  grunt.registerTask('patch',   ['preBump','bump-only:patch','postBump']);
  grunt.registerTask('minor',   ['preBump','bump-only:minor','postBump']);
  grunt.registerTask('major',   ['preBump','bump-only:major','postBump']);

  grunt.registerMultiTask('removeBlock', function() {

    // set up a removal regular expression
    var removalRegEx = new RegExp('(\/\/ ' + this.options()[0] + ' \/\/)(?:[^])*?(\/\/ ' + this.options()[1] +  ' \/\/)', 'g');

    this.data.forEach(function(fileObj){

      var sourceFile = grunt.file.read( fileObj.src ),
          removedFile = sourceFile.replace( removalRegEx, '' ),
          targetFile = grunt.file.write( fileObj.dest, removedFile );

    });// for each loop end

  });

};


text:
/*jshint node:true*/

var fs          = require('fs');
var path        = require('path');
var walkSync    = require('walk-sync');
var stringUtil  = require('../../lib/utilities/string');
var uniq        = require('lodash/array/uniq');
var Blueprint   = require('../../lib/models/blueprint');
var SilentError = require('../../lib/errors/silent');
var date        = new Date();

module.exports = {
  description: 'The default blueprint for ember-cli addons.',

  generatePackageJson: function() {
    var packagePath = path.join(this._appBlueprint.path, 'files', 'package.json');
    var contents    = JSON.parse(fs.readFileSync(packagePath, { encoding: 'utf8' }));

    delete contents.private;
    contents.name = this.project.name();
    contents.description = this.description;
    contents.keywords = contents.keywords || [];
    contents.dependencies = contents.dependencies || {};

    // npm doesn't like it when we have something in both deps and devDeps
    // and dummy app still uses it when in deps
    contents.dependencies['ember-cli-babel'] = contents.devDependencies['ember-cli-babel'];
    delete contents.devDependencies['ember-cli-babel'];

    if (contents.keywords.indexOf('ember-addon') === -1) {
      contents.keywords.push('ember-addon');
    }

    // add `ember-disable-prototype-extensions` to addons by default
    contents.devDependencies['ember-disable-prototype-extensions'] = '^1.0.0';

    // add `ember-try` to addons by default
    contents.devDependencies['ember-try'] = '0.0.4';
    contents.scripts.test = "ember try:testall";

    contents['ember-addon'] = contents['ember-addon'] || {};
    contents['ember-addon'].configPath = 'tests/dummy/config';

    fs.writeFileSync(path.join(this.path, 'files', 'package.json'), JSON.stringify(contents, null, 2));
  },

  generateBowerJson: function() {
    var bowerPath = path.join(this._appBlueprint.path, 'files', 'bower.json');
    var contents  = JSON.parse(fs.readFileSync(bowerPath, { encoding: 'utf8' }));

    contents.name = this.project.name();

    fs.writeFileSync(path.join(this.path, 'files', 'bower.json'), JSON.stringify(contents, null, 2));
  },

  afterInstall: function() {
    var packagePath = path.join(this.path, 'files', 'package.json');
    var bowerPath = path.join(this.path, 'files', 'bower.json');

    [packagePath, bowerPath].forEach(function(filePath) {
      if (fs.existsSync(filePath)) {
        fs.unlinkSync(filePath);
      }
    });
  },

  locals: function(options) {
    var entity    = { name: 'dummy' };
    var rawName   = entity.name;
    var name      = stringUtil.dasherize(rawName);
    var namespace = stringUtil.classify(rawName);

    var addonEntity    = options.entity;
    var addonRawName   = addonEntity.name;
    var addonName      = stringUtil.dasherize(addonRawName);
    var addonNamespace = stringUtil.classify(addonRawName);

    return {
      name: name,
      modulePrefix: name,
      namespace: namespace,
      addonName: addonName,
      addonModulePrefix: addonName,
      addonNamespace: addonNamespace,
      emberCLIVersion: require('../../package').version,
      year: date.getFullYear()
    };
  },

  files: function() {
    if (this._files) { return this._files; }

    this._appBlueprint   = this.lookupBlueprint('app');
    var appFiles       = this._appBlueprint.files();

    this.generatePackageJson();
    this.generateBowerJson();

    var addonFiles   = walkSync(path.join(this.path, 'files'));

    return this._files = uniq(appFiles.concat(addonFiles));
  },

  mapFile: function(file, locals) {
    var result = this._super.mapFile.call(this, file, locals);
    return this.fileMapper(result);
  },

  fileMap: {
    '^app/.gitkeep': 'app/.gitkeep',
    '^app.*':        'tests/dummy/:path',
    '^config.*':     'tests/dummy/:path',
    '^public.*':     'tests/dummy/:path',

    '^addon-config/environment.js': 'config/environment.js',
    '^addon-config/ember-try.js'  : 'config/ember-try.js',

    '^npmignore': '.npmignore'
  },

  fileMapper: function(path) {
    for (var pattern in this.fileMap) {
      if ((new RegExp(pattern)).test(path)) {
        return this.fileMap[pattern].replace(':path', path);
      }
    }

    return path;
  },

  srcPath: function(file) {
    var filePath = path.resolve(this.path, 'files', file);
    if (fs.existsSync(filePath)) {
      return filePath;
    } else {
      return path.resolve(this._appBlueprint.path, 'files', file);
    }
  },

  normalizeEntityName: function(entityName) {
    entityName = Blueprint.prototype.normalizeEntityName.apply(this, arguments);

    if(this.project.isEmberCLIProject() && !this.project.isEmberCLIAddon()) {
      throw new SilentError('Generating an addon in an existing ember-cli project is not supported.');
    }

    return entityName;
  }
};


text:
body {
  -moz-user-select: none;
  min-height      : 0 !important; /* Override rule from defaultStyle.css. Don't know exactly why the min-height from defaultStyle fucks up, but it does.. */
}
.genericBar {
  border-top    : 1px solid #767676;
  border-bottom : 1px solid #767676;
}

.taskBar td {
  border       : 0;
  border-right : 1px dotted black;
}

.activeTask {
  background  : url("/images/system/genericbar_active_bg.png") repeat-x;
  font-weight : bold;
}

.activeTask div {
  background-repeat   : no-repeat;
  background-position : 5px 0;
  padding-left        : 22px;
}

.inactiveTask {
}

.inactiveTask div {
  background-repeat   : no-repeat;
  background-position : 5px 0;
  padding-left        : 22px;
}

.toolButton {
  width        : 80px;
  border-right : 1px dotted black;
}

.toolButton div {
  background-image    : url("/images/system/tools_16.gif");
  background-repeat   : no-repeat;
  background-position : 5px 0;
  padding-left        : 22px;
  font-weight         : bold;
}

td.toolButton:hover {
  background : url("/images/system/genericbar_active_bg.png") repeat-x;
}

td.toolButton:active {
  background : url("/images/system/genericbar_active_bg.png") repeat-x;
}

.showDesktopButton {
  border-right : 1px dotted black;
}
.showDesktopButton div {
  background-image    : url("/images/system/home_16.gif");
  background-repeat   : no-repeat;
  background-position : 4px 0;
  padding-right       : 2px;
  width               : 20px;
}

td.showDesktopButton:hover {
  background : url("/images/system/genericbar_active_bg.png") repeat-x;
}

td.showDesktopButton:active {}

.trashcan {
  width : 1%;
}
#trashcan {
  width   : 100%;
  padding : 0 6px;
}
.trashcan a img {
  border : 0;
}


text:
Function Based Views
====================

If you want to test function-based view you should do it like this:

.. code-block:: python

    from djet import testcases

    from fooapp.views import foo_view

    class FooViewTest(testcases.ViewTestCase):
        view_function = foo_view

        def test_foo_view_get(self):
            request = self.factory.get()
            # assertions for request

            response = self.view(request)
            # assertions for response


text:
```
docker build -t storybook-docker .
docker run -d -p 9009:9009 --name dockerbook storybook-docker
Point to http://0.0.0.0:9009/
```


text:
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.flowable.cmmn.test.repository;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.List;

import org.flowable.cmmn.api.repository.CaseDefinition;
import org.flowable.cmmn.api.repository.CmmnDeployment;
import org.flowable.cmmn.engine.test.FlowableCmmnTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * @author Tijs Rademakers
 */
public class CaseDefinitionCategoryTest extends FlowableCmmnTestCase {

    private String deploymentId1;

    @Before
    public void deployTestDeployments() {
        this.deploymentId1 = cmmnRepositoryService.createDeployment()
                .addClasspathResource("org/flowable/cmmn/test/repository/simple-case.cmmn")
                .deploy()
                .getId();
    }

    @After
    public void deleteTestDeployments() {
        List<CmmnDeployment> deployments = cmmnRepositoryService.createDeploymentQuery().list();
        for (CmmnDeployment cmmnDeployment : deployments) {
            cmmnRepositoryService.deleteDeployment(cmmnDeployment.getId(), true);
        }
    }

    @Test
    public void testUpdateCategory() {
        CaseDefinition caseDefinition = cmmnRepositoryService.createCaseDefinitionQuery().deploymentId(deploymentId1).singleResult();
        assertThat(caseDefinition.getCategory()).isEqualTo("http://flowable.org/cmmn");

        cmmnRepositoryService.setCaseDefinitionCategory(caseDefinition.getId(), "testCategory");
        caseDefinition = cmmnRepositoryService.createCaseDefinitionQuery().deploymentId(deploymentId1).singleResult();
        assertThat(caseDefinition.getCategory()).isEqualTo("testCategory");

        caseDefinition = cmmnRepositoryService.createCaseDefinitionQuery().deploymentId(deploymentId1).caseDefinitionCategory("testCategory").singleResult();
        assertThat(caseDefinition).isNotNull();
    }

    @Test
    public void testDescriptionPersistency() {
        CaseDefinition caseDefinition = cmmnRepositoryService.createCaseDefinitionQuery().deploymentId(deploymentId1).singleResult();
        assertThat(caseDefinition.getDescription()).isEqualTo("This is a sample description");
    }
}


text:
#include "server/ServerPathManagerImpl.hpp"

#include "ElementFactory.hpp"
#include "RTreeGeneric.hpp"

#include "followtherider/connector/osrm/OSRMConnectorFactory.hpp"
#include "followtherider/explore/RegionExplorer.hpp"
#include "followtherider/rider/RiderManager.hpp"
#include "followtherider/srtm/SRTMHandler.hpp"

using namespace FollowTheRider::App;
using namespace FollowTheRider::Element;
using namespace FollowTheRider::Explore;
using namespace FollowTheRider::Persistence;
using namespace FollowTheRider::Rider;
using namespace FollowTheRider::SRTM;
using namespace FollowTheRider::Connector::Osrm;

namespace FollowTheRider {
namespace Path {

/* static */ PathManagerUP PathManager::createInstance(const RTreeSP rtree,
                                                       const ElementFactorySP factory,
                                                       const RiderManagerSP riderManager,
                                                       const OSRMConnectorFactorySP osrmConnectorFactory,
                                                       const RegionExplorerSP regionExplorer,
                                                       const SRTMHandlerSP srtmHandler)  {
    return std::make_unique<ServerPathManagerImpl>(rtree, factory, riderManager, osrmConnectorFactory, regionExplorer, srtmHandler);
}

} // namespace Path
} // namespace FollowTheRider


text:
defineSuite([
        'Core/getBaseUri'
    ], function(
        getBaseUri) {
    'use strict';

    it('works as expected', function() {
        var result = getBaseUri('http://www.mysite.com/awesome?makeitawesome=true');
        expect(result).toEqual('http://www.mysite.com/');

        result = getBaseUri('http://www.mysite.com/somefolder/awesome.png#makeitawesome');
        expect(result).toEqual('http://www.mysite.com/somefolder/');
    });

    it('works with includeQuery flag', function() {
        var result = getBaseUri('http://www.mysite.com/awesome?makeitawesome=true', true);
        expect(result).toEqual('http://www.mysite.com/?makeitawesome=true');

        result = getBaseUri('http://www.mysite.com/somefolder/awesome.png#makeitawesome', true);
        expect(result).toEqual('http://www.mysite.com/somefolder/#makeitawesome');
    });

    it('throws with undefined parameter', function() {
        expect(function() {
            getBaseUri(undefined);
        }).toThrowDeveloperError();
    });
});


text:
namespace XFBType
{
	class Node;
}
namespace sol
{
	class state;
}

namespace XE {

	//forwarding
	class GameEntity;
	class AIEntity;
	class CharEntity;
	class GraphicsManager;
	class IDAL;
	class XEngine;
	class SceneListener;
	class OgreSceneManager;

	class Scene : public  entityx::EntityX
{

public:
	Scene(XEngine& engine, IDAL& idal, GraphicsManager& gmanager);
	~Scene();

	void registerObject(sol::state& lua);

	//IDALObject load/create functions
	void create(Uint16 sceneID, void* fbData = nullptr);
	void reload(void* fbData = nullptr);

	void createT(Uint16 sceneID) {}

	entityx::Entity  createEntityWithId(Uint16 entityID, bool replicateEntity);

	Uint16 getSceneID() {return m_sceneID;}

//KH	inline void setTerrain(Ogre::TerrainGroup* terrainGrp) { mTerrainGrp = terrainGrp; }
	virtual void update(float deltaTime);

	virtual void loadRendererResources() {};
	virtual void loadResources() {};

	//inline OgreDecal::BulletMesh& getWorldMesh() { return mWorldMesh; }
	inline DecalGenerator& getDecalGenerator() { return mDecalGenerator; }
//	void initDecalGenerator(btCollisionObject* meshPtr);

	virtual entityx::Entity createEntity(Int32 entityID, void* entityData, bool replicateEntity);
	static int callbackNewNode(Scene& scenePointer, Int32 entityID, char* entityData, bool replicateEntity);

	XEngine& getEngine() { return m_engine;  }
	void collision();

	GraphicsManager& getGraphicsManager() { return mGraphicsManager; }
	OgreSceneManager& getOgreSceneManager() { return m_OgreSceneManager; }

	void addListener(std::unique_ptr<SceneListener> obs);
	void removeListener(std::unique_ptr<SceneListener> obs);

	Uint16 nextRenderableID();

	void createSoundComponent( entityx::Entity entity, Uint16 scendId, const void* fbData);
	void updateSoundComponent( entityx::Entity entity, Uint16 scendId, const void* fbData);

	void createPhysicsComponent( entityx::Entity entity, Uint16 scendId, const void* fbData);
	void updatePhysicsComponent( entityx::Entity entity, Uint16 scendId, const void* fbData);

	//from network
	void createRenderableComponent( entityx::Entity entity, Uint16 scendId, const void* fbData);
	void updateRenderableComponent( entityx::Entity entity, Uint16 scendId, const void* fbData);

	void createBodyComponent( entityx::Entity entity, const void* fbData);
	void updateBodyComponent( entityx::Entity entity, const void* fbData);

	//from network
	void updateScene(Uint16 scendId, const void* fbData);

	void createSpawnPointComponent( entityx::Entity entity, const void* fbData);
	void updateSpawnPointComponent( entityx::Entity entity, const void* fbData);

	void createSpawnComponent(entityx::Entity entity, const void* fbData);
	void updateSpawnComponent(entityx::Entity entity, const void* fbData);

	void createLightComponent( entityx::Entity entity, const void* fbData);
	void updateLightComponent( entityx::Entity entity, const void* fbData);

	void createAnimationComponent( entityx::Entity entity, const void* fbData);
	void updateAnimationComponent( entityx::Entity entity, const void* fbData);

	bool createEntity(entityx::Entity entity,  Uint16 sceneID, Uint32 entityID, void* entityData, bool replicateEntity = false);

	Ogre::ColourValue ambientColor;

protected:

	virtual bool createEntityType(entityx::Entity entity, void* entityData) { return false; };

	XEngine& m_engine;
	IDAL& m_IDAL;
	DecalGenerator mDecalGenerator;
	GraphicsManager& mGraphicsManager;
	OgreSceneManager& m_OgreSceneManager;
	Uint16 m_sceneID;

private:
	std::vector<std::unique_ptr<SceneListener>> _listenerVector;

	Uint16 _renderableCount;

	//KH	Ogre::TerrainGroup* mTerrainGrp;
	bool mTerrainImported;
//geht!!!	OgreDecal::BulletMesh mWorldMesh;
};

class SceneListener
{
public:
	virtual void entityAdded(entityx::Entity entity) = 0;
	virtual void entityRemoved(entityx::Entity entity) = 0;
};

} // namespace XE

#endif // __SCENE_HPP__


text:
package io.apiman.manager.api.rest.contract.exceptions;

/**
 * Thrown when trying to get, update, or delete a contract that does not exist.
 *
 * @author eric.wittmann@redhat.com
 */
public class ContractNotFoundException extends AbstractNotFoundException {

    private static final long serialVersionUID = -8321449288246652304L;

    /**
     * Constructor.
     */
    public ContractNotFoundException() {
    }

    /**
     * Constructor.
     * @param message the message
     */
    public ContractNotFoundException(String message) {
        super(message);
    }

    /**
     * @see io.apiman.manager.api.rest.contract.exceptions.AbstractRestException#getErrorCode()
     */
    @Override
    public int getErrorCode() {
        return ErrorCodes.CONTRACT_NOT_FOUND;
    }

    /**
     * @see io.apiman.manager.api.rest.contract.exceptions.AbstractRestException#getMoreInfoUrl()
     */
    @Override
    public String getMoreInfoUrl() {
        return ErrorCodes.CONTRACT_NOT_FOUND_INFO;
    }

}


text:
import LinesMapper from '../../src/lib/lines-mapper';
import Style from '../../src/lib/style';

describe("LinesMapper", () => {
  describe("sources", () => {
    it("should return the expected sources and lines", () => {
      const linesMapper = new LinesMapper({
        urlName:'test-city',
        style: new Style([])
      });

      linesMapper.updateLayers();
      const sources = linesMapper.sources;

      expect(sources.length).toEqual(2);

      // Sections
      expect(sources[0].name).toEqual('sections_source');
      expect(sources[0].data).toEqual('/api/test-city/source/sections');
      expect(sources[0].layers.map(l => l.id)).
        toEqual(['sections_buildstart', 'sections_opening', 'sections_hover']);
      expect([...new Set(sources[0].layers.map(l => l.source))]).toEqual(['sections_source']);
      expect([...new Set(sources[0].layers.map(l => l.type))]).toEqual(['line']);
      sources[0].layers.map(layer => {
        expect(layer.paint).toBeTruthy();
        expect(layer.filter).toBeTruthy();
      });

      // Stations
      expect(sources[1].name).toEqual('stations_source');
      expect(sources[1].data).toEqual('/api/test-city/source/stations');
      expect(sources[1].layers.map(l => l.id)).
        toEqual(['stations_buildstart', 'stations_opening', 'stations_hover', 'stations_inner_layer']);
      expect([...new Set(sources[1].layers.map(l => l.source))]).toEqual(['stations_source']);
      expect([...new Set(sources[1].layers.map(l => l.type))]).toEqual(['circle']);
      sources[1].layers.map(layer => {
        expect(layer.paint).toBeTruthy();
        expect(layer.filter).toBeTruthy();
      });
    });
  })
});


text:
#ifndef _LZMQ_H_
#define _LZMQ_H_
#include "lua.h"

#include "zmq.h"

#if defined (_WIN32) || defined (_WINDOWS)
#  define __WINDOWS__
#endif

#ifdef _MSC_VER
#  define LUAZMQ_EXPORT __declspec(dllexport)
#else
#  define LUAZMQ_EXPORT
#endif

#ifndef LZMQ_SOCKET_COUNT
#  define LZMQ_SOCKET_COUNT 1
#endif

#ifndef LZMQ_AUTOCLOSE_SOCKET
#  define LZMQ_AUTOCLOSE_SOCKET 1
#endif

#define LUAZMQ_PREFIX  "LuaZMQ: "

typedef unsigned char uchar;
#define LUAZMQ_FLAG_CLOSED       (uchar)(0x01 << 0)
/*context only*/
#define LUAZMQ_FLAG_CTX_SHUTDOWN (uchar)(0x01 << 1)
#define LUAZMQ_FLAG_DONT_DESTROY (uchar)(0x01 << 2)
#define LUAZMQ_FLAG_MORE         (uchar)(0x01 << 3)

typedef struct{
  void  *ctx;
  uchar flags;
#if LZMQ_SOCKET_COUNT
  int socket_count;
#endif
  int autoclose_ref;
} zcontext;

typedef struct{
  void  *skt;
  uchar flags;
#if LZMQ_SOCKET_COUNT
  zcontext *ctx;
#endif
  int ctx_ref;
  int onclose_ref;
} zsocket;

typedef struct{
  int no;
} zerror;

struct ZMQ_Poller;
typedef struct ZMQ_Poller zpoller;

typedef struct{
  zmq_msg_t msg;
  uchar flags;
} zmessage;

extern const char *LUAZMQ_CONTEXT;
extern const char *LUAZMQ_SOCKET;
extern const char *LUAZMQ_ERROR;
extern const char *LUAZMQ_POLLER;
extern const char *LUAZMQ_MESSAGE;

zcontext *luazmq_getcontext_at (lua_State *L, int i);
#define luazmq_getcontext(L) luazmq_getcontext_at((L),1)

zsocket *luazmq_getsocket_at (lua_State *L, int i);
#define luazmq_getsocket(L) luazmq_getsocket_at((L),1)

zerror *luazmq_geterror_at (lua_State *L, int i);
#define luazmq_geterror(L) luazmq_geterror_at((L),1)

zpoller *luazmq_getpoller_at (lua_State *L, int i);
#define luazmq_getpoller(L) luazmq_getpoller_at((L),1)

zmessage *luazmq_getmessage_at (lua_State *L, int i);
#define luazmq_getmessage(L) luazmq_getmessage_at((L),1)

int luazmq_pass(lua_State *L);
int luazmq_fail_str(lua_State *L, zsocket *skt);
int luazmq_fail_obj(lua_State *L, zsocket *skt);
int luazmq_fail_no(lua_State *L, zsocket *skt);

#if   defined LUAZMQ_USE_ERR_TYPE_OBJECT
#  define luazmq_fail luazmq_fail_obj
#elif defined LUAZMQ_USE_ERR_TYPE_NUMBER
#  define luazmq_fail luazmq_fail_no
#elif defined LUAZMQ_USE_ERR_TYPE_STRING
#  define luazmq_fail luazmq_fail_str
#else /* default */
#  define luazmq_fail luazmq_fail_no
#endif

#ifdef LUAZMQ_USE_LUA_REGISTRY
#  define LUAZMQ_LUA_REGISTRY LUA_REGISTRYINDEX
#else
#  define LUAZMQ_LUA_REGISTRY lua_upvalueindex(1)
#endif

int luazmq_allocfail(lua_State *L);

#endif


text:
package org.apache.hadoop.hive.common;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.LinkedList;
import java.util.List;

import org.apache.commons.compress.archivers.ArchiveException;
import org.apache.commons.compress.archivers.ArchiveStreamFactory;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
import org.apache.commons.compress.utils.IOUtils;
import org.apache.tools.zip.ZipEntry;
import org.apache.tools.zip.ZipOutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * This class contains methods used for the purposes of compression, this class
 * should not be accessed from code run in Hadoop.
 */
public class CompressionUtils {

  static final Logger LOG = LoggerFactory.getLogger(CompressionUtils.class);

  /**
   * Archive all the files in the inputFiles into outputFile
   *
   * @param inputFiles
   * @param outputFile
   * @throws IOException
   */
  public static void tar(String parentDir, String[] inputFiles, String outputFile)
      throws IOException {

    FileOutputStream out = null;
    try {
      out = new FileOutputStream(new File(parentDir, outputFile));
      TarArchiveOutputStream tOut = new TarArchiveOutputStream(
          new GzipCompressorOutputStream(new BufferedOutputStream(out)));

      for (int i = 0; i < inputFiles.length; i++) {
        File f = new File(parentDir, inputFiles[i]);
        TarArchiveEntry tarEntry = new TarArchiveEntry(f, f.getName());
        tOut.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
        tOut.putArchiveEntry(tarEntry);
        FileInputStream input = new FileInputStream(f);
        try {
          IOUtils.copy(input, tOut); // copy with 8K buffer, not close
        } finally {
          input.close();
        }
        tOut.closeArchiveEntry();
      }
      tOut.close(); // finishes inside
    } finally {
      // TarArchiveOutputStream seemed not to close files properly in error situation
      org.apache.hadoop.io.IOUtils.closeStream(out);
    }
  }

  public static void zip(String parentDir, String[] inputFiles, String outputFile)
      throws IOException {
    ZipOutputStream output = null;
    try {
      output = new ZipOutputStream(new FileOutputStream(new File(parentDir, outputFile)));
      for (int i = 0; i < inputFiles.length; i++) {
        File f = new File(parentDir, inputFiles[i]);
        FileInputStream input = new FileInputStream(f);
        output.putNextEntry(new ZipEntry(inputFiles[i]));
        try {
          IOUtils.copy(input, output);
        } finally {
          input.close();
        }
      }
    } finally {
      org.apache.hadoop.io.IOUtils.closeStream(output);
    }
  }

  /**
   * Untar an input file into an output file.
   *
   * The output file is created in the output folder, having the same name as the input file, minus
   * the '.tar' extension.
   *
   * @param inputFileName the input .tar file
   * @param outputDirName the output directory file.
   * @throws IOException
   * @throws FileNotFoundException
   *
   * @return The {@link List} of {@link File}s with the untarred content.
   * @throws ArchiveException
   */
  public static List<File> unTar(final String inputFileName, final String outputDirName)
      throws FileNotFoundException, IOException, ArchiveException {
    return unTar(inputFileName, outputDirName, false);
  }

  /**
   * Untar an input file into an output file.
   *
   * The output file is created in the output folder, having the same name as the input file, minus
   * the '.tar' extension.
   *
   * @param inputFileName the input .tar file
   * @param outputDirName the output directory file.
   * @throws IOException
   * @throws FileNotFoundException
   *
   * @return The {@link List} of {@link File}s with the untarred content.
   * @throws ArchiveException
   */
  public static List<File> unTar(final String inputFileName, final String outputDirName,
      boolean flatten) throws FileNotFoundException, IOException, ArchiveException {

    File inputFile = new File(inputFileName);
    File outputDir = new File(outputDirName);

    final List<File> untarredFiles = new LinkedList<File>();
    InputStream is = null;

    try {
      if (inputFileName.endsWith(".gz")) {
        is = new GzipCompressorInputStream(new FileInputStream(inputFile));
      } else {
        is = new FileInputStream(inputFile);
      }

      final TarArchiveInputStream debInputStream =
              (TarArchiveInputStream) new ArchiveStreamFactory().createArchiveInputStream("tar", is);
      TarArchiveEntry entry = null;
      while ((entry = (TarArchiveEntry) debInputStream.getNextEntry()) != null) {
        final File outputFile = new File(outputDir, entry.getName());
        if (!outputFile.toPath().toAbsolutePath().normalize()
                .startsWith(outputDir.toPath().toAbsolutePath().normalize())) {
          throw new IOException("Untarred file is not under the output directory");
        }
        if (entry.isDirectory()) {
          if (flatten) {
            // no sub-directories
            continue;
          }
          LOG.debug(String.format("Attempting to write output directory %s.",
                  outputFile.getAbsolutePath()));
          if (!outputFile.exists()) {
            LOG.debug(String.format("Attempting to create output directory %s.",
                    outputFile.getAbsolutePath()));
            if (!outputFile.mkdirs()) {
              throw new IllegalStateException(String.format("Couldn't create directory %s.",
                      outputFile.getAbsolutePath()));
            }
          }
        } else {
          final OutputStream outputFileStream;
          if (flatten) {
            File flatOutputFile = new File(outputDir, outputFile.getName());
            LOG.debug(String.format("Creating flat output file %s.", flatOutputFile.getAbsolutePath()));
            outputFileStream = new FileOutputStream(flatOutputFile);
          } else if (!outputFile.getParentFile().exists()) {
            LOG.debug(String.format("Attempting to create output directory %s.",
                    outputFile.getParentFile().getAbsoluteFile()));
            if (!outputFile.getParentFile().getAbsoluteFile().mkdirs()) {
              throw new IllegalStateException(String.format("Couldn't create directory %s.",
                      outputFile.getParentFile().getAbsolutePath()));
            }
            LOG.debug(String.format("Creating output file %s.", outputFile.getAbsolutePath()));
            outputFileStream = new FileOutputStream(outputFile);
          } else {
            outputFileStream = new FileOutputStream(outputFile);
          }
          IOUtils.copy(debInputStream, outputFileStream);
          outputFileStream.close();
        }
        untarredFiles.add(outputFile);
      }
      debInputStream.close();
      return untarredFiles;

    } finally {
      if (is != null)  is.close();
    }
  }
}


text:
<?php

namespace SR\SocialBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * Friend
 *
 * @ORM\Entity(repositoryClass="SR\SocialBundle\Entity\FriendRepository")
 * @ORM\Table
 */

class Friend
{

    /**
    * @ORM\Id
    * @ORM\ManyToOne(targetEntity="SR\UserBundle\Entity\User",cascade={"persist"})
    */
    private $user;

    /**
    * @ORM\Id
    * @ORM\ManyToOne(targetEntity="SR\UserBundle\Entity\User",cascade={"persist"})
    */
    private $userFriend;

    /**
     * Set user
     *
     * @param \SR\UserBundle\Entity\User $user
     * @return Friend
     */
    public function setUser(\SR\UserBundle\Entity\User $user)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \SR\UserBundle\Entity\User
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * Set userFriend
     *
     * @param \SR\UserBundle\Entity\User $userFriend
     * @return Friend
     */
    public function setUserFriend(\SR\UserBundle\Entity\User $userFriend)
    {
        $this->userFriend = $userFriend;

        return $this;
    }

    /**
     * Get userFriend
     *
     * @return \SR\UserBundle\Entity\User
     */
    public function getUserFriend()
    {
        return $this->userFriend;
    }
}


text:
package main

import (
	"io"
	"io/ioutil"
	"os"

	"github.com/kubernetes-incubator/cri-o/libpod"
	"github.com/pkg/errors"
	"github.com/urfave/cli"
)

var (
	loadFlags = []cli.Flag{
		cli.StringFlag{
			Name:  "input, i",
			Usage: "Read from archive file, default is STDIN",
			Value: "/dev/stdin",
		},
		cli.BoolFlag{
			Name:  "quiet, q",
			Usage: "Suppress the output",
		},
		cli.StringFlag{
			Name:  "signature-policy",
			Usage: "`pathname` of signature policy file (not usually used)",
		},
	}
	loadDescription = "Loads the image from docker-archive stored on the local machine."
	loadCommand     = cli.Command{
		Name:        "load",
		Usage:       "load an image from docker archive",
		Description: loadDescription,
		Flags:       loadFlags,
		Action:      loadCmd,
		ArgsUsage:   "",
	}
)

// loadCmd gets the image/file to be loaded from the command line
// and calls loadImage to load the image to containers-storage
func loadCmd(c *cli.Context) error {

	args := c.Args()
	var image string
	if len(args) == 1 {
		image = args[0]
	}
	if len(args) > 1 {
		return errors.New("too many arguments. Requires exactly 1")
	}
	if err := validateFlags(c, loadFlags); err != nil {
		return err
	}

	runtime, err := getRuntime(c)
	if err != nil {
		return errors.Wrapf(err, "could not get runtime")
	}
	defer runtime.Shutdown(false)

	input := c.String("input")

	if input == "/dev/stdin" {
		fi, err := os.Stdin.Stat()
		if err != nil {
			return err
		}
		// checking if loading from pipe
		if !fi.Mode().IsRegular() {
			outFile, err := ioutil.TempFile("/var/tmp", "kpod")
			if err != nil {
				return errors.Errorf("error creating file %v", err)
			}
			defer outFile.Close()
			defer os.Remove(outFile.Name())

			inFile, err := os.OpenFile(input, 0, 0666)
			if err != nil {
				return errors.Errorf("error reading file %v", err)
			}
			defer inFile.Close()

			_, err = io.Copy(outFile, inFile)
			if err != nil {
				return errors.Errorf("error copying file %v", err)
			}

			input = outFile.Name()
		}
	}

	var writer io.Writer
	if !c.Bool("quiet") {
		writer = os.Stdout
	}

	options := libpod.CopyOptions{
		SignaturePolicyPath: c.String("signature-policy"),
		Writer:              writer,
	}

	src := libpod.DockerArchive + ":" + input
	if err := runtime.PullImage(src, options); err != nil {
		src = libpod.OCIArchive + ":" + input
		// generate full src name with specified image:tag
		if image != "" {
			src = src + ":" + image
		}
		if err := runtime.PullImage(src, options); err != nil {
			return errors.Wrapf(err, "error pulling %q", src)
		}
	}

	return nil
}


text:
# Asynchronous sockets in Jython.
#
# Copyright (c) 2002 brian zimmer <mailto:bzimmer@ziclix.com>

'''
Generate the errno module by extracting the values from CPython.

Better windows error messages could be derived by parsing:
 http://www.sockets.com/err_lst1.htm#DetailedErrorDescriptions
 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/errors_2036.asp
'''

import os
if os.name == 'java':
  raise ImportError('this script must be run by CPython')

import errno, sys

error_messages = {
  10035 : "The socket operation could not complete without blocking",
  10022 : "Invalid argument",
}

def gen_python(fp=None):
  print >> fp, "'''"
  print >> fp, "This file was autogenerated using:"
  print >> fp, " Python %s" % (" ".join(sys.version.split()))
  print >> fp, "'''"
  print >> fp, ""
  for a in errno.errorcode.keys():
                #if a < 1000:
    print >> fp, "%-25s = %d" % (errno.errorcode[a], a)
    if hasattr(fp, "flush"): fp.flush()

  print >> fp, ""
  print >> fp, "errorcode = {}"
  for a in errno.errorcode.keys():
                #if a < 1000:
    print >> fp, "errorcode[%s] = '%s'" % (errno.errorcode[a], errno.errorcode[a])
    if hasattr(fp, "flush"): fp.flush()

def gen_java(fp=None):
  print >> fp, "package org.python.modules;"
  print >> fp, ""
  print >> fp, "import org.python.core.*;"
  print >> fp, ""
  print >> fp, ""
  print >> fp, "public final class errno implements ClassDictInit {"
  print >> fp, ""
  print >> fp, "    private errno() {}"
  print >> fp, ""

  errors = [(e, getattr(errno, e)) for e in dir(errno) if e[0] == 'E']
  errors.sort(lambda x, y: cmp(x[1], y[1]))

  for name, code in errors:
    if code > 1000: continue
    print >> fp, "    public static final int %-25s = %d;" % (name, code)
    if hasattr(fp, "flush"): fp.flush()

  print >> fp, ""
  print >> fp, "    public static final PyObject errorcode = new PyDictionary();"
  print >> fp, "    private static final PyObject strerror = new PyDictionary();"
  print >> fp, ""
  print >> fp, "    public static void classDictInit(PyObject dict) throws PyIgnoreMethodTag {"

  for name, code in errors:
    if code > 1000: continue
    msg = error_messages.get(code, os.strerror(code));
    print >> fp, '        addcode(dict, %s, "%s", "%s");' % (name, name, msg)
    if hasattr(fp, "flush"): fp.flush()

  print >> fp, ""
  print >> fp, "    }"

  print >> fp, ""
  print >> fp, "    public static PyObject strerror(PyObject error) {"
  print >> fp, "        return strerror.__getitem__(error);"
  print >> fp, "    }"
  print >> fp, ""
  print >> fp, "    private static void addcode(PyObject dict, int errno,"
  print >> fp, "                                String err, String msg) {"
  print >> fp, "        PyObject errno_o = Py.newInteger(errno);"
  print >> fp, "        PyObject err_o = Py.newString(err);"

  print >> fp, "        strerror.__setitem__(errno_o, Py.newString(msg));"
  print >> fp, "        errorcode.__setitem__(errno_o, err_o);"
  print >> fp, "        dict.__setitem__(err_o, errno_o);"
  print >> fp, "    }"
  print >> fp, "}"

if __name__ == '__main__':
  gen_java(None)


text:
package com.codebroker.demo.client;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import com.codebroker.protocol.BaseByteArrayPacket;

import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;

public class ClientMain {

	static final String HOST = System.getProperty("host", "127.0.0.1");

	public static void main(String[] args) throws Exception {
		EventLoopGroup group = new NioEventLoopGroup();
		try {
			Bootstrap b = new Bootstrap();
			b.group(group)
					.channel(NioSocketChannel.class)
					.handler(new ClientInitializer());

			// Start the connection attempt.
			Channel ch = b.connect(HOST, 22334).sync().channel();

			// Read commands from the stdin.
			ChannelFuture lastWriteFuture = null;
			BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
			for (;;) {
				String line = in.readLine();
				if (line == null) {
					break;
				}
				BaseByteArrayPacket head=null;
				//登入或者注册
				if (line.startsWith(String.valueOf(SystemRequest.USER_LOGIN_OR_REGISTER.id))) {
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("name", "3451");
//					jsonObject.put("parm", "6789");
//					head=new BaseByteArrayPacket(SystemRequest.USER_LOGIN_OR_REGISTER.id,jsonObject.toString().getBytes());
				}
				//主动断开连接
				if (line.startsWith("2")) {
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("name", "3451");
//					head=new BaseByteArrayPacket(100,jsonObject.toString().getBytes());
				}
				//登入干一些事情
				else if (line.startsWith("3")) {
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("name", "1");
//					head=new BaseByteArrayPacket(101,jsonObject.toString().getBytes());
				}
				//主动退出
				else if (line.startsWith("3")) {
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("name", "1");
//					head=new BaseByteArrayPacket(101,jsonObject.toString().getBytes());
				}
				else if (line.startsWith("4")) {
//					String[] split = line.split(",");
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("roomid", split[1]);
//					head=new BaseByteArrayPacket(3,jsonObject.toString().getBytes());
				}
				else if (line.startsWith("5")) {
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("name", "1");
//					head=new BaseByteArrayPacket(4,jsonObject.toString().getBytes());
				}
				else if (line.startsWith("6")) {
//					JSONObject jsonObject=new JSONObject();
//					String[] split = line.split(",");
//					jsonObject.put("msg", split[1]);
//					head=new BaseByteArrayPacket(5,jsonObject.toString().getBytes());
				}
				else if (line.startsWith("8")) {
//					String[] split = line.split(",");
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("msg", split[1]);
//					head=new BaseByteArrayPacket(6,jsonObject.toString().getBytes());
				}
				else if (line.startsWith("9")) {
//					JSONObject jsonObject=new JSONObject();
//					jsonObject.put("name", "飞行员1");
//					jsonObject.put("img", "头像1");
//					head=new BaseByteArrayPacket(7,jsonObject.toString().getBytes());
				}
				// Sends the received line to the server.
				lastWriteFuture = ch.writeAndFlush(head);

			}

			// Wait until all messages are flushed before closing the channel.
			if (lastWriteFuture != null) {
				lastWriteFuture.sync();
			}
		} finally {
			group.shutdownGracefully();
		}
	}
}


text:
<?php

namespace League\Squery\Test\Runner;

use League\Squery\Builder\Builder;
use League\Squery\Factory;
use League\Squery\Process\Process;
use League\Squery\Runner\ProcessRunner;
use League\Squery\Test\Test;
use Mockery;

class ProcessRunnerTest extends Test
{
    /**
     * @test
     *
     * @expectedException PHPUnit_Framework_Error_Deprecated
     *
     * @return void
     */
    public function itRunsQueries()
    {
        $query = "\nmocked\n \t \nbuilder\n";

        $command = "echo '.mode csv\nmocked builder;' | osqueryi";

        $builder = $this->getNewBuilderMock();

        $builder->shouldReceive("__toString")
            ->andReturn($query);

        $process = $this->getNewProcessMock();

        $factory = $this->getNewFactoryMock();

        $runner = new ProcessRunner($factory);

        $this->assertRowsHandled($command, $process, $runner, $builder, $factory);

        $this->assertFactoryReturnsValidProcess($factory, $runner, $builder);

        $this->assertErrorsHandled($command, $process, $runner, $builder);
    }

    /**
     * @return Mockery\MockInterface
     */
    protected function getNewBuilderMock()
    {
        return Mockery::mock("League\\Squery\\Builder\\Builder");
    }

    /**
     * @return Mockery\MockInterface
     */
    protected function getNewProcessMock()
    {
        return Mockery::mock("League\\Squery\\Process\\Process");
    }

    /**
     * @return Mockery\MockInterface
     */
    protected function getNewFactoryMock()
    {
        return Mockery::mock("League\\Squery\\Factory");
    }

    /**
     * @param string        $command
     * @param Process       $process
     * @param ProcessRunner $runner
     * @param Builder       $builder
     * @param Factory       $factory
     *
     * @return void
     */
    protected function assertRowsHandled($command, Process $process, ProcessRunner $runner, Builder $builder, Factory $factory)
    {
        $buffer = "name\nfoo\nbar\n";

        $rows = [
            ["name"],
            ["foo"],
            ["bar"],
        ];

        $process->shouldReceive("run")
            ->once()
            ->with($command, Mockery::on(function ($callback) use ($buffer) {
                $callback($buffer);

                return true;
            }), null);

        $factory->shouldReceive("newInstance")
            ->once()
            ->andReturn($process);

        $result = null;

        $runner->run($builder, function (array $data) use (&$result) {
            $result = $data;
        });

        $this->assertEquals($rows, $result);
    }

    /**
     * @param Factory       $factory
     * @param ProcessRunner $runner
     * @param Builder       $builder
     *
     * @return void
     */
    protected function assertFactoryReturnsValidProcess(Factory $factory, ProcessRunner $runner, Builder $builder)
    {
        $this->setExpectedException("LogicException");

        $factory->shouldReceive("newInstance")
            ->andReturn($factory);

        $runner->run($builder);
    }

    /**
     * @param string        $command
     * @param Process       $process
     * @param ProcessRunner $runner
     * @param Builder       $builder
     *
     * @return void
     */
    protected function assertErrorsHandled($command, Process $process, ProcessRunner $runner, Builder $builder)
    {
        $process->shouldReceive("run")
            ->once()
            ->with($command, null, Mockery::on(function ($callback) {
                $callback("error");

                return true;
            }));

        $result = null;

        $runner->run($builder, null, function ($error) use (&$result) {
            $result = $error;
        });

        $this->assertEquals("error", $result);
    }
}


text:
package org.kodejava.example.itextpdf;

import com.itextpdf.text.*;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class PDFTableDemo {
    public static void main(String[] args) {
        String[] headers = new String[]{
                "No", "Username", "First Name", "Last Name"
        };
        String[][] data = new String[][]{
                {"1", "jdow", "John", "Dow"},
                {"2", "stiger", "Scott", "Tiger"},
                {"3", "fbar", "Foo", "Bar"}
        };

        // Create a new document.
        Document document = new Document(PageSize.LETTER.rotate());
        Font bold = new Font(Font.FontFamily.HELVETICA, 10, Font.BOLD);
        Font normal = new Font(Font.FontFamily.HELVETICA, 10, Font.NORMAL);

        try {
            // Get an instance of PdfWriter and create a Table.pdf file
            // as an output.
            PdfWriter.getInstance(document,
                    new FileOutputStream(new File("TableDemo.pdf")));
            document.open();

            // Create an instance of PdfPTable. After that we transform
            // the header and data array into a PdfPCell object. When
            // each table row is complete we have to call the
            // table.completeRow() method.
            //
            // For better presentation we also set the cell normal name,
            // size and weight. And we also define the background fill
            // for the cell.
            PdfPTable table = new PdfPTable(headers.length);
            for (String header : headers) {
                PdfPCell cell = new PdfPCell();
                cell.setGrayFill(0.9f);
                cell.setPhrase(new Phrase(header, bold));
                table.addCell(cell);
            }
            table.completeRow();

            for (String[] row : data) {
                for (String column : row) {
                    PdfPCell cell = new PdfPCell();
                    cell.setPhrase(new Phrase(column, normal));
                    table.addCell(cell);
                }
                table.completeRow();
            }

            document.addTitle("iText PDF Table Demo");
            document.add(table);
        } catch (DocumentException | FileNotFoundException e) {
            e.printStackTrace();
        } finally {
            document.close();
        }
    }
}


text:
<?php

namespace Mockery;

class VerificationExpectation extends Expectation
{
    public function clearCountValidators()
    {
        $this->_countValidators = array();
    }

    public function __clone()
    {
        parent::__clone();
        $this->_actualCount = 0;
    }
}


text:
package protobuf

import (
	"bytes"
	"testing"

	"github.com/stretchr/testify/assert"
	"go.uber.org/yarpc/api/transport"
	"go.uber.org/yarpc/yarpcerrors"
)

func TestUnhandledEncoding(t *testing.T) {
	assert.Equal(t, yarpcerrors.CodeInternal,
		yarpcerrors.FromError(unmarshal(transport.Encoding("foo"), bytes.NewReader([]byte("foo")), nil, newCodec(nil))).Code())
	_, _, err := marshal(transport.Encoding("foo"), nil, newCodec(nil))
	assert.Equal(t, yarpcerrors.CodeInternal, yarpcerrors.FromError(err).Code())
}


text:
@echo off
pushd %~dp0
"%VS120COMNTOOLS%..\IDE\mstest" /test:Microsoft.Protocols.TestSuites.MS_ASEMAIL.S01_Email.MSASEMAIL_S01_TC07_BothReadAndFlagChanged /testcontainer:..\..\MS-ASEMAIL\TestSuite\bin\Debug\MS-ASEMAIL_TestSuite.dll /runconfig:..\..\MS-ASEMAIL\MS-ASEMAIL.testsettings /unique
pause


text:
package org.osgi.service.component.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Identify the annotated method as the {@code modified} method of a Service
 * Component.
 *
 *

 * The annotated method is the modified method of the Component.
 *
 *

 * This annotation is not processed at runtime by Service Component Runtime. It
 * must be processed by tools and used to add a Component Description to the
 * bundle.
 *
 * @see "The modified attribute of the component element of a Component Description."
 * @author $Id: c4d0c68f20f6237ebd97ae7199394fb5240870d4 $
 * @since 1.1
 */
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.METHOD)
public @interface Modified {
	// marker annotation
}


text:
module Hex
  module Cms
    module LocaleModule
      extend ActiveSupport::Concern

      included do
        delegate :name, :code, :to => :locale, :prefix => true, :allow_nil => true
      end

      module ClassMethods
        # scope for finding item with given locale
        # returns rows that have this specific locale OR are shared across all locales
        def with_locale_id(locale_id)
          # TODO: db specific
          where("#{table_name}.locale_id = ? OR #{table_name}.locale_id IS NULL", locale_id)
        end

        def with_locale(locale)
          with_locale_id(locale.id)
        end
      end

      def locale
        return nil unless locale_id
        @locale ||= ::Hex::Cms::Locale.new(locale_id)
      end

      def locale_id=(locale_id)
        self[:locale_id] = locale_id
        @locale = nil
        locale_id
      end
    end
  end
end


text:
layout: default
---

{{ page.title }}

             {{ page.category }}

            Posted <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time> by {{ page.author }}

          {{ content }}

          Tweet

          {% if page.previous.url %}

Previous Post

                {{ page.previous.title }}

          {% endif %}
          {% if page.next.url %}

Next Post

                {{ page.next.title }}

          {% endif %}

{{ page.author }}

{{ page.author-desc }}

              {% if page.author-url %}

                {{ page.author-url }}

              {% endif %}

              {% if page.author-github %}

                 {{ page.author-github }}

              {% endif %}

              {% if page.author-twitter %}

                 @{{ page.author-twitter }}

              {% endif %}

      {% include disqus.html %}

        {% include carbon.html %}

          Latest Posts

          {% for post in site.posts offset: 0 limit: 5 %}

{{ post.title }}

              {{ page.date | date: "%b %-d, %Y" }}

          {% endfor %}

          View all posts


text:
/*!
 * Copyright (c) 2015 by Contributors
 * \file engine.cc
 * \brief Implementation of engine.
 */
#include <mxnet/engine.h>
#include <memory>
#include <cstdlib>
#include "./engine_impl.h"

namespace mxnet {
namespace engine {
inline Engine* CreateEngine() {
  const char *type = getenv("MXNET_ENGINE_TYPE");
  const bool default_engine = (type == nullptr);
  if (type == nullptr) type = "ThreadedEnginePerDevice";
  std::string stype = type;

  Engine *ret = nullptr;
  #if MXNET_PREDICT_ONLY == 0
  if (stype == "NaiveEngine") {
    ret = CreateNaiveEngine();
  } else if (stype == "ThreadedEngine") {
    ret = CreateThreadedEnginePooled();
  } else if (stype == "ThreadedEnginePerDevice") {
    ret = CreateThreadedEnginePerDevice();
  }
  #else
  ret = CreateNaiveEngine();
  #endif

  if (ret ==nullptr) {
    LOG(FATAL) << "Cannot find Engine " << type;
  }
  if (!default_engine) {
    LOG(INFO) << "MXNet start using engine: " << type;
  }
  return ret;
}
}  // namespace engine

std::shared_ptr<Engine> Engine::_GetSharedRef() {
  static std::shared_ptr<Engine> sptr(engine::CreateEngine());
  return sptr;
}

Engine* Engine::Get() {
  static Engine *inst = _GetSharedRef().get();
  return inst;
}
}  // namespace mxnet


text:
package com.systematic.trading.backtest.output.elastic.resource;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Response object expected from Elastic Search on a Bulk API request.
 *
 * There are a number of return elements, however only the boolean flag is needed as the use case is
 * all should succeed.
 *
 * @author CJ Hare
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class ElasticBulkApiResponseResource {

	private final boolean errors;

	@JsonCreator
	public ElasticBulkApiResponseResource( @JsonProperty("errors") final boolean errors ) {

		this.errors = errors;
	}

	public boolean hasErrors() {

		return errors;
	}
}


text:
package com.melon.modules.jdk8.sys.dao;

import com.melon.common.persistence.CrudDao;
import com.melon.common.persistence.annotation.MyBatisDao;
import com.melon.modules.jdk8.sys.entity.Menu;

import java.util.List;

/**
 * 菜单DAO接口
 *
 * @author Melon
 * @version 2014-05-16
 */
@MyBatisDao
public interface MenuDao extends CrudDao<Menu> {

    public List<Menu> findByParentIdsLike(Menu menu);

    public List<Menu> findByUserId(Menu menu);

    public int updateParentIds(Menu menu);

    public int updateSort(Menu menu);

}


text:
package layer.configuration

import java.io._

import scala.io._

class ProjectConfiguration(bi: ProjectBasicInfo) {
    def basicInfo = bi
    var violations = Map[String, List[String]]()
    var gtypes = List[String]()
    var ignores = List[((String, List[Int]), (String, List[Int]))]()
    var seps = Map[String, List[List[Int]]]()
}

class ProjectBasicInfo(n: String, root: String, out: String, pre: String, reanal: Boolean) {
    def name = n
    def rootpath = root
    def outpath = out
    def prefix = pre
    def reanalyze = reanal
    var additionalJars = List[String]()
    var retainPackages = List[String]()
    var removeFewerEdges = false
    var excludeTypes = List[String]()
    val isJar = rootpath.toLowerCase.endsWith(".jar")

    def requireReanalyze = {
        !(new File(outpath+ "/TypeStructure.lci")).exists || reanalyze
    }
    def getInputPath = {
        if (isJar) rootpath.substring(0, rootpath.lastIndexOf("/"))
        else rootpath
    }
    def getOutputPath = outpath

    override def toString = {
    	name + "\n" +
    	"Input path: " + rootpath + "\n" +
    	"Output path: " + outpath + "\n" +
    	"Prefix: " + prefix + "\n" +
    	"Classes to exclude: " + excludeTypes.mkString(", ") + "\n" +
    	"Packages to retain: " + retainPackages.mkString(", " )
    }

    def toFile = {
    	"project {\n" +
    	"\tname = \"" + name + "\"\n" +
    	"\trootpath = \"" + rootpath + "\"\n" +
    	"\toutputpath = \"" + outpath + "\"\n" +
    	"\tprefix = \"" + prefix + "\"\n" +
    	"\treanalysis = \"" + (if (reanalyze) "true" else "false") + "\"\n" +
    	"\tadditionalJars = (" + additionalJars.map(jar => if ( jar.length > 0) "\"" + jar + "\"" else "").mkString(", ") + ")\n" +
    	"\tremoveFewerEdges = \""+ (if (removeFewerEdges) "true" else "false") + "\"\n" +
    	"\texcludeTypes = (" + excludeTypes.map(t => if ( t.length > 0 ) "\"" + t + "\"" else "").mkString(", ") + ")\n" +
    	"}"
    }
}

object Project {
/*    def main(args: Array[String]): Unit = {
        import experiments._
        val selproject = CommandLineMenus.selectProject
        PackageAnalysis.run(new StudyConfiguration(parse(selproject)))
    }*/

    var proj: ProjectBasicInfo = null

    def parse(filename: String): ProjectConfiguration = {
        val parser = new ProjectDSL
        parser.parse(Source.fromFile(new File(filename)).mkString)
        proj = parser.configuration.basicInfo
        parser.configuration
    }

    def setLoadedProject(p: ProjectBasicInfo) = proj = p

    def get: ProjectBasicInfo = proj
    def prefix = proj.prefix

    object StructureKind extends Enumeration {
        type StructureKind = Value
        val Type, Package, PackageNoSimplification, Layer, CompactLayer, PackageRestructured = Value
    }

    import StructureKind._
    import layer.module._
    var results = Map[StructureKind, DependencyGraph]() //Map[StructureKind, module.DependencyGraph]()

    def getStructure: (TypeStructure, PackageStructure, PackageStructure, LayerModuleStructure) = {
        (results(Type).asInstanceOf[TypeStructure],
            results(PackageNoSimplification).asInstanceOf[PackageStructure],
            results(Package).asInstanceOf[PackageStructure],
            Project.results(Layer).asInstanceOf[LayerModuleStructure])
    }
}


text:
FILE(REMOVE_RECURSE
  "CMakeFiles/man-beectl"
  "beectl.1"
)

# Per-language clean rules from dependency scanning.
FOREACH(lang)
  INCLUDE(CMakeFiles/man-beectl.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)


text:
Gulp JSModule (AMD) reconciler plugin
===================
Gulp plugin for reconciling AMD dependency trees in JavaScript projects.
###Installation    [![npm version](https://badge.fury.io/js/gulp-jsmodule.svg)](http://badge.fury.io/js/gulp-jsmodule)
```sh
npm install gulp-jsmodule
```
###Simple Usage
```javascript
var jsmodule = require("gulp-jsmodule");

/**
 * Build JS
 */
gulp.task('js', function () {
  gulp.src(['./src/**/*.js'])
    .pipe(jsmodule('out.js'))
    .pipe(gulp.dest('./dist/'));
});
```


text:
CREATE TABLE IF NOT EXISTS `kwc_structured_data` (
  `component_id` varchar(255) NOT NULL,
  `content` text NOT NULL,
  PRIMARY KEY (`component_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <array name="swipeRefreshColors">
        <item>@color/colorAccent</item>
        <item>@color/colorPrimary</item>
    </array>
</resources>


text:
'use strict';

var gulp = require('gulp');

var util = require('util');
var browserSync = require('browser-sync');
var middleware = require('./proxy');
var nodemon = require('gulp-nodemon');

function browserSyncInit(baseDir, files, browser) {
  browser = browser === undefined ? 'default' : browser;

  var routes = null;
  if (baseDir === 'src' || (util.isArray(baseDir) && baseDir.indexOf('src') !== -1)) {
    routes = {
      // Should be '/bower_components': '../bower_components'
      // Waiting for https://github.com/shakyShane/browser-sync/issues/308
      '/bower_components': 'bower_components',
      '/data': 'data'
    };
  }

  browserSync.instance = browserSync.init(files, {
    startPath: '/',
    server: {
      baseDir: baseDir,
      middleware: middleware,
      routes: routes
    },
    browser: browser
    //logLevel: 'debug'
  });

}

gulp.task('serve', ['watch', 'api'], function () {
  browserSyncInit([
    'src',
    '.tmp',
    'data'
  ], [
    'data/**/*.*',
    '.tmp/{app,components}/**/*.css',
    'src/assets/images/**/*',
    'src/*.html',
    'src/{app,components}/**/*.html',
    'src/{app,components}/**/*.js'
  ]);
});

gulp.task('api', function() { //TODO: todo ;)
  nodemon({
    script: 'srv/app.js'
  });
});

gulp.task('serve:dist', ['build', 'api'], function () {
  browserSyncInit('dist');
});

gulp.task('serve:e2e', ['wiredep', 'injector:js', 'injector:css'], function () {
  browserSyncInit(['src', '.tmp'], null, []);
});

gulp.task('serve:e2e-dist', ['build'], function () {
  browserSyncInit('dist', null, []);
});


text:
#ifndef CONDOR_SYSTEM_H
#define CONDOR_SYSTEM_H

/******************************
** Windows specifics
******************************/
#if defined(WIN32)
# include "condor_sys_nt.h"
#endif

/******************************
** Unix specifics
******************************/
#if !defined( WIN32 )

/* Things we want defined on all Unix systems */

#ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
#endif

#ifndef UNIX
# define UNIX
#endif

/**********************************************************************
** These system-specific files will "fix" anything that needs fixing,
** define platform-specific functionality flags we want to use, etc.
**********************************************************************/

#if defined(LINUX)
#	include "condor_sys_linux.h"
#elif defined(HPUX)
#	include "condor_sys_hpux.h"
#elif defined(Solaris)
#	include "condor_sys_solaris.h"
#elif defined(Darwin)
#	include "condor_sys_bsd.h"
#elif defined(AIX)
#	include "condor_sys_aix.h"
#elif defined(CONDOR_FREEBSD)
#	include "condor_sys_bsd.h"
#else
#   error "condor_system.h: Don't know what Unix this is!"
#endif

/********************************************************************
** Declare base system types (currently the int64_t types, but will
** probably grow beyond this charter).
*********************************************************************/
#include "condor_sys_types.h"

/**********************************************************************
** Files that need to be fixed on all (or nearly all) platforms
**********************************************************************/
#include "condor_fix_access.h"
#include "condor_fix_assert.h"

#if defined(WIN32)
#include <iomanip.h>
#endif

/**********************************************************************
** Clean-up, default definitions, etc.
**********************************************************************/

#if !defined(HAS_U_TYPES)
    typedef unsigned int	u_int;
    typedef unsigned char	u_char;
    typedef unsigned short	u_short;
    typedef unsigned long	u_long;
#endif

#if !defined(NO_VOID_SIGNAL_RETURN)
#	define VOID_SIGNAL_RETURN	1
#endif

#if !defined(SIGISMEMBER_IS_BROKEN)
#	define SIGISMEMBER_IS_BROKEN 0
#endif

#if !defined(HAS_F_DUP2FD)
#	define HAS_F_DUP2FD 0
#endif

#if !defined(NBBY)
#	define NBBY 8
#endif

#if !defined(NFDS)
#	define NFDS(x) (x)
#endif

/* If WCOREFLAG is defined but WCOREFLG is not, define WCOREFLG since
   that's what we use in our code. */
#if defined(WCOREFLAG) && !defined(WCOREFLG)
#	define WCOREFLG WCOREFLAG
#endif

#ifndef _POSIX_PATH_MAX
#	define _POSIX_PATH_MAX 255
#endif

#ifndef _POSIX_ARG_MAX
#	define _POSIX_ARG_MAX 4096
#endif

/**********************************************************************
** We'll also include everything we use after this so we make sure
** we've got what we need on all platforms.  Headers that have already
** been fixed will simply be ignored since they define their own flags
** to prevent multiple inclusions.
**********************************************************************/

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <stdarg.h>
#include <signal.h>
#include <string.h>
#include <strings.h>
#include <sys/param.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/uio.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <sys/resource.h>
#include <limits.h>
#include <ctype.h>
#include <fcntl.h>
#include <errno.h>
#include <pwd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
#include <float.h>
#include <math.h>
#include <utime.h>

/* select() on all our platforms takes an fd_set pointer, so we can
   just define this here for everyone.  We don't really need it
   anymore, but we might hit a platform that has a different select,
   so the level of indirection is worth keeping around. */
typedef fd_set *SELECT_FDSET_PTR;

#include "condor_unsetenv.h"

#endif /* UNIX */

/* This stuff here is shared by all archs, *INCLUDING* NiceTry */

#include "condor_snutils.h"

/* Pull in some required types */
#if defined( HAVE_SYS_TYPES_H )
#  include <sys/types.h>
#endif
#if defined( HAVE_STDINT_H )
#  include <stdint.h>
#endif

/* Define _O_BINARY, etc. if they're not defined as zero */
#ifndef _O_BINARY
#  define _O_BINARY		0x0
#endif
#ifndef _O_SEQUENTIAL
#  define _O_SEQUENTIAL	0x0
#endif
#ifndef O_LARGEFILE
#  define O_LARGEFILE	0x0
#endif

#include "condor_sys_formats.h"

#ifndef WIN32
#	include <dirent.h>

/* Some convenient definitions to make it easier to use readdir64()
 * when available.  This is important so that 32-bit builds of condor
 * can see directory entries that have 64-bit inode values.  Using the
 * 32-bit readdir() has caused procapi to not be able to see entries
 * in /proc, which can lead to improper cleanup, procd exiting because
 * it thinks its parent is gone, and general badness.
 */

  #if defined(AIX) && HAVE_READDIR64

    typedef DIR64 condor_DIR;
    #define condor_opendir opendir64
    #define condor_closedir closedir64
    #define condor_rewinddir rewinddir64

  #else

    typedef DIR condor_DIR;
    #define condor_opendir opendir
    #define condor_closedir closedir
    #define condor_rewinddir rewinddir

  #endif

  #if HAVE_READDIR64
    typedef struct dirent64 condor_dirent;
    #define condor_readdir readdir64
  #else
    typedef struct dirent condor_dirent;
    #define condor_readdir readdir
  #endif

#endif // !WIN32

/* This defines macros that can disable certain gcc warnings */
/* If not using gcc, macros are null defines */
#include "gcc_diag.h"

#endif /* CONDOR_SYSTEM_H */


text:
@interface ZJUURLCache : NSURLCache

@end


text:
<?php
namespace Nexus\AdminBundle\Admin;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Route\RouteCollection;

class WeeklyUpdateAdmin extends Admin
{
    protected $translationDomain = 'SonataCustomAdmin'; // default is 'messages'

    protected function configureRoutes(RouteCollection $collection)
    {
        $collection->remove('delete');
        $collection->remove('edit');
    }

    // Fields to be shown on create/edit forms
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
            ->add('file', 'file', array(
                    'label'                 => 'admin.weekly_update.file_upload',
                    'translation_domain'    =>  'SonataCustomAdmin',
                    'mapped'                => false,
                ))
        ;
    }

    public function prePersist($weeklyUpdate) {
        $this->manageFileUpload($image);
    }

    public function preUpdate($weeklyUpdate) {
        $this->manageFileUpload($file);
    }

    private function manageFileUpload($weeklyUpdate) {
        if ($weeklyUpdate->getFile()) {
            $weeklyUpdate->refreshUpdated();
        }
    }

    // Fields to be shown on filter forms
    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
            ->add('character.user', null, array(
                    'label'                 => 'admin.weekly_update.character',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('armor', null, array(
                    'label'                 => 'admin.weekly_update.armor',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('resist', null, array(
                    'label'                 => 'admin.weekly_update.resist',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('mitigation', null, array(
                    'label'                 => 'admin.weekly_update.mitigation',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('attackSpeed', null, array(
                    'label'                 => 'admin.weekly_update.attack_speed',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('healthLost', null, array(
                    'label'                 => 'admin.weekly_update.health_lost',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('date', null, array(
                    'label'                 => 'admin.weekly_update.date',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
        ;
    }

    // Fields to be shown on lists
    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper
            ->add('character.user', null, array(
                    'label'                 => 'admin.weekly_update.character',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('armor', null, array(
                    'label'                 => 'admin.weekly_update.armor',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('resist', null, array(
                    'label'                 => 'admin.weekly_update.resist',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('mitigation', null, array(
                    'label'                 => 'admin.weekly_update.mitigation',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('attackSpeed', null, array(
                    'label'                 => 'admin.weekly_update.attack_speed',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('healthLost', null, array(
                    'label'                 => 'admin.weekly_update.health_lost',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
            ->add('date', null, array(
                    'label'                 => 'admin.weekly_update.date',
                    'translation_domain'    =>  'SonataCustomAdmin',
                ))
        ;
    }
}
?>