text:
Influences mainly come from `npm` and `opam` (for OCaml)

`elm-get install` can be used in a few ways:

 1. **entirely distributed**: you can just install packages directly from public
    or private github repos. This looks like `elm-get install tom/vector2d`,
    perhaps with a tag or SHA. This is for people who know what they are doing.
 2. **centralized & curated**: I'll create a central listing of "good" libraries.
    You can install these without specifying a user: `elm-get install vector2d`
 3. **private**: This is the same as (2), but it can be created privately within
    some company's intranet or whatever. The user will add the privately curated hub to
    some local list, in order of priority. So when downloading, `elm-get` will choose
    the first match for a given project. Disambiguate with (1).

# Questions

### How to detect version issues?

The versioning issues can be avoided entirely, but that comes at the cost of size of
generated code. It should be fine to use N different versions of the same library, but
that costs N times as many bits.

I'm not sure if working out dependencies should happen during installation
(annoying for everyone, especially beginner/starting project), or if there
should be tools for building things from source later on to minimize
duplication (annoying for professionals). The choice here may have ripple effects
in how people write and maintain libraries.

Either way, converging on a single version of each library will be
necessary eventually. To help with this, `opam` just spins up tons of
VMs to test a bunch of configurations. A simple approximation of this
is to have users report successes and failures when installing.


text:
namespace TAO_PEGTL_NAMESPACE
{
   namespace internal
   {
      template< typename F, F U >
      struct function;

      template< typename ParseInput, typename... States, bool ( *U )( ParseInput&, States... ) >
      struct function< bool ( * )( ParseInput&, States... ), U >
      {
         using rule_t = function;
         using subs_t = empty_list;

         template< apply_mode A,
                   rewind_mode M,
                   template< typename... >
                   class Action,
                   template< typename... >
                   class Control >
         [[nodiscard]] static bool match( ParseInput& in, States... st ) noexcept( noexcept( U( in, st... ) ) )
         {
            return U( in, st... );
         }
      };

      template< typename F, F U >
      inline constexpr bool enable_control< function< F, U > > = false;

   }  // namespace internal

   template< auto F >
   struct function
      : internal::function< decltype( F ), F >
   {};

}  // namespace TAO_PEGTL_NAMESPACE

#endif

redpajama_set_name: RedPajamaGithub


text:
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var DisplayObjectContainer = (function (_super) {
    __extends(DisplayObjectContainer, _super);
    function DisplayObjectContainer() {
        _super.apply(this, arguments);
        this.children = [];
    }
    DisplayObjectContainer.prototype.addChild = function (child) {
        this.children.push(child);
        child.parent = this;
    };
    DisplayObjectContainer.prototype.render = function (context2D) {
        for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
            var displayObject = _a[_i];
            displayObject.draw(context2D);
        }
    };
    DisplayObjectContainer.prototype.removeChild = function (displayObject) {
        var tempArray = this.children.concat();
        for (var _i = 0, tempArray_1 = tempArray; _i < tempArray_1.length; _i++) {
            var each = tempArray_1[_i];
            if (each == displayObject) {
                var index = this.children.indexOf(each);
                tempArray.splice(index, 1);
                this.children = tempArray;
                return;
            }
        }
    };
    DisplayObjectContainer.prototype.hitTest = function (x, y) {
        for (var i = this.children.length - 1; i >= 0; i--) {
            var child = this.children[i];
            var pointBaseOnChild = math.pointAppendMatrix(new math.Point(x, y), math.invertMatrix(child.matrix));
            var hitTestResult = child.hitTest(pointBaseOnChild.x, pointBaseOnChild.y); //遍历
            if (hitTestResult) {
                return hitTestResult;
            }
        }
        return null;
    };
    return DisplayObjectContainer;
}(DisplayObject));
var DisplayObject = (function () {
    function DisplayObject() {
        this.matrix = null;
        this.globalMatrix = null;
        this.x = 0;
        this.y = 0;
        this.scaleX = 1;
        this.scaleY = 1;
        this.rotation = 0;
        this.alpha = 1; //默认相对alpha
        this.globalAlpha = 1; //默认全局alpha
        this.parent = null;
        this.matrix = new math.Matrix();
        this.globalMatrix = new math.Matrix();
    }
    DisplayObject.prototype.remove = function () { };
    ;
    //点击判断函数,返回值代表是否被点击。
    DisplayObject.prototype.draw = function (context2D) {
        this.matrix.updateFromDisplayObject(this.x, this.y, this.scaleX, this.scaleY, this.rotation); //初始化矩阵
        //计算全局Alpha值
        if (this.parent) {
            this.globalAlpha = this.parent.globalAlpha * this.alpha;
            this.globalMatrix = math.matrixAppendMatrix(this.matrix, this.parent.globalMatrix);
        }
        else {
            this.globalAlpha = this.alpha;
            this.globalMatrix = this.matrix;
        }
        context2D.globalAlpha = this.globalAlpha;
        context2D.setTransform(this.globalMatrix.a, this.globalMatrix.b, this.globalMatrix.c, this.globalMatrix.d, this.globalMatrix.tx, this.globalMatrix.ty);
        this.render(context2D);
    };
    return DisplayObject;
}());
//# sourceMappingURL=DisplayObject.js.map


text:
require 'rubygems'

# puts $LOADED_FEATURES.select {|feature| feature.include?("github")}
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]

SimpleCov.start  do
  add_filter "/spec/"
  add_filter "/internal/"
  add_group "Controllers", "app/controllers"
  add_group "Streamworker", "lib/streamworker/"
  add_group "Config", "config"
end

require 'bundler'

require 'rails'
Bundler.require :default, :test

require 'capybara/rspec'
require 'be_valid_asset'

Combustion.initialize! :active_record, :action_controller, :action_view, :sprockets do
  require 'slim'
end

require 'rspec/rails'
require 'capybara/rails'

Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each {|f|  require f}

RSpec.configure do |config|
  config.use_transactional_fixtures = true
end


text:
package com.handycodeworks.tweety;

import winterwell.jtwitter.Twitter;
import winterwell.jtwitter.Twitter.Status;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.provider.BaseColumns;
import android.util.Log;

public class DatabaseOpenHelper extends SQLiteOpenHelper{
    static final String TAG = "DatabaseOpenHelper";
    static final String DATABASE_NAME = "timeline.sqlite";
    static final int DATABASE_VERSION = 7;
    static final String TABLE = "timeline";
    static final String C_ID = BaseColumns._ID;
    static final String C_CREATED_AT ="created_at";
    static final String C_TEXT ="status";
    static final String C_USER ="user";

    public DatabaseOpenHelper(Context context) {
	super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
	Twitter.Status.class.getMethods();
	String sql = String.format(
		"CREATE table %s (" +
		"%s integer NOT NULL primary key," +
		"%s timestamp, %s TEXT, %s TEXT)", TABLE, C_ID, C_CREATED_AT, C_TEXT, C_USER);
	Log.d(TAG, "Created SQLite database: " + sql);
	db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	db.execSQL("DROP TABLE IF EXISTS "+TABLE+";");
	this.onCreate(db);
    }

    public static ContentValues statusToContentValues(Status status){
	ContentValues cv = new ContentValues();
	cv.put(C_ID, status.id);
	cv.put(C_CREATED_AT, status.createdAt.getTime());
	cv.put(C_TEXT, status.text);
	cv.put(C_USER, status.user.screenName);
	return cv;
    }
}


text:
NS_ASSUME_NONNULL_BEGIN

extern NSString * const MGSColourSchemeKeySyntaxGroupOptions;

@interface MGSColourSchemeGroupData : NSObject

- (instancetype)initWithOptionDictionary:(NSDictionary<MGSColourSchemeGroupOptionKey, id> *)optionDictionary;
- (NSDictionary<MGSColourSchemeGroupOptionKey, id> *)optionDictionary;

@property (nonatomic) BOOL enabled;
@property (nonatomic, nullable) NSColor *color;
@property (nonatomic) MGSFontVariant fontVariant;

@end

@interface MGSColourScheme ()
{
    @protected
    NSMutableDictionary<MGSSyntaxGroup, MGSColourSchemeGroupData *> *_groupData;
}

- (BOOL)loadFromSchemeFileURL:(NSURL *)file error:(NSError **)err;

@property (nonatomic, strong) NSString *displayName;

@property (nonatomic, strong) NSColor *textColor;
@property (nonatomic, strong) NSColor *backgroundColor;
@property (nonatomic, strong) NSColor *defaultSyntaxErrorHighlightingColour;
@property (nonatomic, strong) NSColor *textInvisibleCharactersColour;
@property (nonatomic, strong) NSColor *currentLineHighlightColour;
@property (nonatomic, strong) NSColor *insertionPointColor;
@property (nonatomic, strong) NSColor *selectionBackgroundColor;
@property (nonatomic, strong) NSColor *gutterTextColor;
@property (nonatomic, strong) NSColor *gutterBackgroundColor;

@property (nonatomic, copy) NSDictionary<MGSSyntaxGroup, NSDictionary<MGSColourSchemeGroupOptionKey, id> *> *syntaxGroupOptions;

@end

NS_ASSUME_NONNULL_END


text:
package com.lei.lib.java.rxhttp.interceptors;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import okhttp3.Headers;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

public class HeadInterceptor implements Interceptor {
    Map<String, String> headers = new HashMap<>();
    public static final String USER_AGENT = "User-Agent";

    public HeadInterceptor(Map<String, String> headers) {
        if (headers != null)
            this.headers = headers;
    }

    @Override
    public Response intercept(Chain chain) throws IOException {
        Request.Builder builder = chain.request().newBuilder();
        Request request = null;
        Headers.Builder headersBuilder = new Headers.Builder();
        for (String key : headers.keySet()) {
            headersBuilder.add(key, headers.get(key));
        }

        request = builder.headers(headersBuilder.build()).build();
        return chain.proceed(request);
    }

}