text:
var evalExpr = require('../runtime/eval-expr');

/**
 * 初始化节点的 s-bind 数据
 *
 * @param {Object} node 节点对象
 * @param {Object} sBind bind指令对象
 * @return {boolean}
 */
function nodeSBindInit(node, sBind) {
    if (sBind && node.scope) {
        node._sbindData = evalExpr(sBind.value, node.scope, node.owner);
        return true;
    }
}

exports = module.exports = nodeSBindInit;


text:
using System;

namespace Domain.Port
{
    public interface IClock : DDD.Port
    {
        DateTimeOffset Now { get; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.github.messenger4j.internal.gson;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import java.time.Instant;
import java.util.Optional;

/**
 * @author Max Grabenhorst
 * @since 1.0.0
 */
public final class GsonUtil {

  private GsonUtil() {}

  private static Optional<JsonElement> getProperty(
      JsonObject jsonObject, Constants... propertyPath) {
    JsonObject internalValue = jsonObject;
    for (int i = 0; i <= propertyPath.length - 2; i++) {
      final JsonElement property = internalValue.get(propertyPath[i].value());
      if (property == null || !property.isJsonObject()) {
        return Optional.empty();
      }
      internalValue = property.getAsJsonObject();
    }
    final JsonElement property = internalValue.get(propertyPath[propertyPath.length - 1].value());
    return property == null || property.isJsonNull() ? Optional.empty() : Optional.of(property);
  }

  public static boolean hasProperty(JsonObject jsonObject, Constants... propertyPath) {
    return getProperty(jsonObject, propertyPath).isPresent();
  }

  public static Optional<String> getPropertyAsString(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsString);
  }

  public static Optional<Boolean> getPropertyAsBoolean(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsBoolean);
  }

  public static Optional<Integer> getPropertyAsInt(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsInt);
  }

  public static Optional<Long> getPropertyAsLong(JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsLong);
  }

  public static Optional<Instant> getPropertyAsInstant(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<Long> longValue = getPropertyAsLong(jsonObject, propertyPath);
    return longValue.map(Instant::ofEpochMilli);
  }

  public static Optional<Double> getPropertyAsDouble(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsDouble);
  }

  public static Optional<Float> getPropertyAsFloat(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsFloat);
  }

  public static Optional<JsonArray> getPropertyAsJsonArray(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsJsonArray);
  }

  public static Optional<JsonObject> getPropertyAsJsonObject(
      JsonObject jsonObject, Constants... propertyPath) {
    final Optional<JsonElement> jsonElement = getProperty(jsonObject, propertyPath);
    return jsonElement.map(JsonElement::getAsJsonObject);
  }

  /**
   * @author Max Grabenhorst
   * @since 1.0.0
   */
  public enum Constants {
    PROP_OBJECT("object"),
    PROP_ENTRY("entry"),
    PROP_MESSAGING("messaging"),
    PROP_SENDER("sender"),
    PROP_RECIPIENT("recipient"),
    PROP_ID("id"),
    PROP_TIMESTAMP("timestamp"),
    PROP_OPTIN("optin"),
    PROP_MESSAGE("message"),
    PROP_MID("mid"),
    PROP_IS_ECHO("is_echo"),
    PROP_QUICK_REPLY("quick_reply"),
    PROP_TEXT("text"),
    PROP_ATTACHMENTS("attachments"),
    PROP_PAYLOAD("payload"),
    PROP_TYPE("type"),
    PROP_URL("url"),
    PROP_COORDINATES("coordinates"),
    PROP_LAT("lat"),
    PROP_LONG("long"),
    PROP_REF("ref"),
    PROP_USER_REF("user_ref"),
    PROP_APP_ID("app_id"),
    PROP_METADATA("metadata"),
    PROP_POSTBACK("postback"),
    PROP_ACCOUNT_LINKING("account_linking"),
    PROP_STATUS("status"),
    PROP_AUTHORIZATION_CODE("authorization_code"),
    PROP_READ("read"),
    PROP_WATERMARK("watermark"),
    PROP_DELIVERY("delivery"),
    PROP_MIDS("mids"),
    PROP_RECIPIENT_ID("recipient_id"),
    PROP_MESSAGE_ID("message_id"),
    PROP_ATTACHMENT_ID("attachment_id"),
    PROP_ERROR("error"),
    PROP_CODE("code"),
    PROP_FB_TRACE_ID("fbtrace_id"),
    PROP_RESULT("result"),
    PROP_FIRST_NAME("first_name"),
    PROP_LAST_NAME("last_name"),
    PROP_PROFILE_PIC("profile_pic"),
    PROP_LOCALE("locale"),
    PROP_TIMEZONE("timezone"),
    PROP_GENDER("gender"),
    PROP_TITLE("title"),
    PROP_REFERRAL("referral"),
    PROP_SOURCE("source"),
    PROP_AD_ID("ad_id"),
    PROP_NLP("nlp"),
    PROP_ENTITIES("entities"),
    PROP_PRIOR_MESSAGE("prior_message"),
    PROP_IDENTIFIER("identifier"),
    PROP_GAME_PLAY("game_play"),
    PROP_GAME_ID("game_id"),
    PROP_PLAYER_ID("player_id"),
    PROP_CONTEXT_TYPE("context_type"),
    PROP_CONTEXT_ID("context_id"),
    PROP_SCORE("score");

    private final String value;

    Constants(String value) {
      this.value = value;
    }

    String value() {
      return value;
    }
  }
}


text:
layout: post
date: 2017-06-29
title: "Mia Mia Bridal Avalon 2015"
category: Mia Mia Bridal
tags: [Mia Mia Bridal,2015]
---
### Mia Mia Bridal Avalon
Just **$329.99**
### 2015

BRANDS	Mia Mia Bridal

Years	2015

Buy it: [https://www.readybrides.com/en/mia-mia-bridal/46314-mia-mia-bridal-avalon.html](https://www.readybrides.com/en/mia-mia-bridal/46314-mia-mia-bridal-avalon.html)


text:
package kr.kkiro.roguebox.game.entity;

import static kr.kkiro.roguebox.util.I18n._;
import kr.kkiro.roguebox.curses.TextGraphics;
import kr.kkiro.roguebox.util.ANSIColor;
import kr.kkiro.roguebox.util.DefinedIcon;

public class Door extends Entity {

  public Door(int x, int y) {
    super(x, y);
  }

  @Override
  public void render(TextGraphics g, int x, int y) {
    DefinedIcon.put('D', _("door"));
    g.setTextColor(ANSIColor.YELLOW);
    g.setBackColor(ANSIColor.BLACK);
    g.drawChar(x, y, 'D');
  }

  @Override
  public void tick() {
  }

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

  @Override
  public void interact(Entity e) {
    if(e instanceof Character) {
      getEntityMap().getMap().setMessage(_("doorOpen"), 100);
      this.setRemoval(true);
    }
  }

}


text:
package control

import (
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"strings"
	"syscall"
	"time"

	"github.com/codegangsta/cli"
	"github.com/rancher/os/pkg/log"
	"github.com/rancher/os/pkg/util"
)

const (
	dockerConf = "/var/lib/rancher/conf/docker"
	dockerDone = "/run/docker-done"
	dockerLog  = "/var/log/docker.log"
)

func dockerInitAction(c *cli.Context) error {
	// TODO: this should be replaced by a "Console ready event watcher"
	for {
		if _, err := os.Stat(consoleDone); err == nil {
			break
		}
		time.Sleep(200 * time.Millisecond)
	}

	dockerBin := ""
	dockerPaths := []string{
		"/usr/bin",
		"/opt/bin",
		"/usr/local/bin",
		"/var/lib/rancher/docker",
	}
	for _, binPath := range dockerPaths {
		if util.ExistsAndExecutable(path.Join(binPath, "dockerd")) {
			dockerBin = path.Join(binPath, "dockerd")
			break
		}
	}
	if dockerBin == "" {
		for _, binPath := range dockerPaths {
			if util.ExistsAndExecutable(path.Join(binPath, "docker")) {
				dockerBin = path.Join(binPath, "docker")
				break
			}
		}
	}
	if dockerBin == "" {
		err := fmt.Errorf("Failed to find either dockerd or docker binaries")
		log.Error(err)
		return err
	}
	log.Infof("Found %s", dockerBin)

	if err := syscall.Mount("", "/", "", syscall.MS_SHARED|syscall.MS_REC, ""); err != nil {
		log.Error(err)
	}
	if err := syscall.Mount("", "/run", "", syscall.MS_SHARED|syscall.MS_REC, ""); err != nil {
		log.Error(err)
	}

	mountInfo, err := ioutil.ReadFile("/proc/self/mountinfo")
	if err != nil {
		return err
	}

	for _, mount := range strings.Split(string(mountInfo), "\n") {
		if strings.Contains(mount, "/var/lib/user-docker /var/lib/docker") && strings.Contains(mount, "rootfs") {
			os.Setenv("DOCKER_RAMDISK", "true")
		}
	}

	args := []string{
		"bash",
		"-c",
		fmt.Sprintf(`[ -e %s ] && source %s; exec /usr/bin/dockerlaunch %s %s $DOCKER_OPTS >> %s 2>&1`, dockerConf, dockerConf, dockerBin, strings.Join(c.Args(), " "), dockerLog),
	}

	// TODO: this should be replaced by a "Docker ready event watcher"
	if err := ioutil.WriteFile(dockerDone, []byte(CurrentEngine()), 0644); err != nil {
		log.Error(err)
	}

	return syscall.Exec("/bin/bash", args, os.Environ())
}


text:
@interface PodsDummy_Pods_CloudSightExampleTests : NSObject
@end
@implementation PodsDummy_Pods_CloudSightExampleTests
@end


text:
"""Source model"""

from sqlalchemy import Column, Sequence, ForeignKey
from sqlalchemy.types import Integer, Unicode, UnicodeText, DateTime
from sqlalchemy.orm import relation
from onlinelinguisticdatabase.model.meta import Base, now

import logging
log = logging.getLogger(__name__)

class Source(Base):

    __tablename__ = 'source'

    def __repr__(self):
        return '<Source (%s)>' % self.id

    id = Column(Integer, Sequence('source_seq_id', optional=True), primary_key=True)
    file_id = Column(Integer, ForeignKey('file.id', ondelete='SET NULL'))
    file = relation('File')
    crossref_source_id = Column(Integer, ForeignKey('source.id', ondelete='SET NULL'))
    crossref_source = relation('Source', remote_side=[id])
    datetime_modified = Column(DateTime, default=now)

    # BibTeX data structure
    type = Column(Unicode(20))
    key = Column(Unicode(1000))

    # BibTeX fields
    address = Column(Unicode(1000))
    annote = Column(UnicodeText)
    author = Column(Unicode(255))
    booktitle = Column(Unicode(255))
    chapter = Column(Unicode(255))
    crossref = Column(Unicode(1000))
    edition = Column(Unicode(255))
    editor = Column(Unicode(255))
    howpublished = Column(Unicode(255))
    institution = Column(Unicode(255))
    journal = Column(Unicode(255))
    key_field = Column(Unicode(255))
    month = Column(Unicode(100))
    note = Column(Unicode(1000))
    number = Column(Unicode(100))
    organization = Column(Unicode(255))
    pages = Column(Unicode(100))
    publisher = Column(Unicode(255))
    school = Column(Unicode(255))
    series = Column(Unicode(255))
    title = Column(Unicode(255))
    type_field = Column(Unicode(255))
    url = Column(Unicode(1000))
    volume = Column(Unicode(100))
    year = Column(Integer)

    # Non-standard BibTeX fields
    affiliation = Column(Unicode(255))
    abstract = Column(Unicode(1000))
    contents = Column(Unicode(255))
    copyright = Column(Unicode(255))
    ISBN = Column(Unicode(20))
    ISSN = Column(Unicode(20))
    keywords = Column(Unicode(255))
    language = Column(Unicode(255))
    location = Column(Unicode(255))
    LCCN = Column(Unicode(20))
    mrnumber = Column(Unicode(25))
    price = Column(Unicode(100))
    size = Column(Unicode(255))

    def get_dict(self):
        """Return a Python dictionary representation of the Source.  This
        facilitates JSON-stringification, cf. utils.JSONOLDEncoder.  Relational
        data are truncated, e.g., source_dict['file'] is a dict with keys for
        'name', 'size', etc. (cf. get_mini_user_dict of the model superclass) and
        lacks keys for some attributes.
        """
        source_dict = self.__dict__
        source_dict['file'] = self.get_mini_file_dict(self.file)
        source_dict['crossref_source'] = self.get_mini_source_dict(self.crossref_source)
        return source_dict


text:
import java.util.*;

@interface ExpectInterfaces {
    String value();
}

@interface ExpectSupertype {
    String value();
}

interface OK {
    void m();
}

class InvalidSource {
    /*
     * The following annotations contain a simple description of the expected
     * representation of the superclass and superinterfaces of the corresponding
     * elements.
     * The strings contain a comma-separated list of descriptions.
     * Descriptions are composed as follows:
     * A leading "!:" indicates the type mirror has kind ERROR.
     * "empty" means that the corresponding element has no enclosed elements.
     * "clss", "intf" and "tvar" indicate the name refers to a class, interface
     * or type variable. Each is followed by the declared name of the element.
     * "pkg" indicates the name of a package element.
     * An enclosing element is shown in parentheses.
     * A trailing "!" indicates that the element's type has kind ERROR.
     */

    @ExpectSupertype("!:empty clss A!")
    class TestClassMissingClassA extends A { }

    @ExpectSupertype("!:empty clss (pkg A).B!")
    class TestClassMissingClassAB extends A.B { }

    @ExpectSupertype("!:empty clss (pkg java.util).A!")
    class TestClassMissingClass_juA extends java.util.A { }

    @ExpectSupertype("!:empty clss A!<tvar T>")
    class TestClassTMissingClassAT<T> extends A<T> { }

    @ExpectInterfaces("!:empty intf A!")
    class TestClassMissingIntfA implements A { }

    @ExpectInterfaces("!:empty intf (pkg A).B!")
    class TestClassMissingIntfAB implements A.B { }

    @ExpectInterfaces("!:empty intf A!, intf OK")
    abstract class TestClassMissingIntfAOK implements A, OK { }

    @ExpectInterfaces("intf OK, !:empty intf A!")
    abstract class TestClassOKMissingIntfA implements OK, A { }

    @ExpectInterfaces("!:empty intf A!, !:empty intf B!")
    class TestClassMissingIntfA_B implements A, B { }

    @ExpectInterfaces("!:empty intf A!")
    interface TestIntfMissingIntfA extends A { }

    @ExpectInterfaces("!:empty intf A!, intf OK")
    interface TestIntfMissingIntfAOK extends A, OK { }

    @ExpectInterfaces("intf OK, !:empty intf A!")
    interface TestIntfOKMissingIntfA extends OK, A { }

    @ExpectInterfaces("!:empty intf A!, !:empty intf B!")
    interface TestIntfMissingIntfAB extends A, B { }

    @ExpectInterfaces("!:empty intf A!<tvar T>")
    class TestClassTMissingIntfAT<T> implements A<T> { }

    @ExpectInterfaces("!:empty intf A!<tvar T>, !:empty intf B!")
    class TestClassTMissingIntfAT_B<T> implements A<T>, B { }

    @ExpectInterfaces("!:empty intf A!<tvar T>")
    interface TestIntfTMissingIntfAT<T> extends A<T> { }

    @ExpectInterfaces("!:empty intf A!<tvar T>, !:empty intf B!")
    interface TestIntfTMissingIntfAT_B<T> extends A<T>, B { }

    @ExpectInterfaces("intf (pkg java.util).List<!:empty clss X!>")
    abstract class TestClassListMissingX implements List<X> { }
}


text:
package com.gvip.snrb.sdk.constants;

/**
 * Created by Patrick on 1/25/2018.
 */

public class Codes {

    public static final int SEARCH_NUMBER_REQUEST = 1000;
    public static final int SEARCH_NUMBER_RESULT = 2000;

}


text:
package com.google.blockly.android.codegen;

/**
 * Defines the core language file to be used in code generation. To be used by the generator
 * Blockly needs to know the path to the file and the object that has the generator
 * functions. For example: {"javascript_compressed.js", "Blockly.JavaScript"}.
 */
// TODO (#378): Add the list of reserved keywords to the language definition.
public class LanguageDefinition {
    /**
     * Standard definition for the JavaScript language generator.
     */
    public final static LanguageDefinition JAVASCRIPT_LANGUAGE_DEFINITION
            = new LanguageDefinition("generators/javascript_compressed.js", "Blockly.JavaScript");

    /**
     * Standard definition for the Lua language generator. (Requires "full" flavor)
     */
    public final static LanguageDefinition LUA_LANGUAGE_DEFINITION
            = new LanguageDefinition("generators/lua_compressed.js", "Blockly.Lua");

    /**
     * Standard definition for the PHP language generator. (Requires "full" flavor)
     */
    public final static LanguageDefinition PHP_LANGUAGE_DEFINITION
            = new LanguageDefinition("generators/php_compressed.js", "Blockly.PHP");

    /**
     * Standard definition for the Python language generator. (Requires "full" flavor)
     */
    public final static LanguageDefinition PYTHON_LANGUAGE_DEFINITION
            = new LanguageDefinition("generators/python_compressed.js", "Blockly.Python");

    /**
     * Standard definition for the Dart language generator. (Requires "full" flavor)
     */
    public final static LanguageDefinition DART_LANGUAGE_DEFINITION
            = new LanguageDefinition("generators/dart_compressed.js", "Blockly.Dart");

    /**
     * The path to the language generation file relative to
     * file:///android_assets/background_compiler.html.
     */
    public final String mLanguageFilename;
    /**
     * The Generator object that is defined by the file and should be called to perform the code
     * generation, such as "Blockly.JavaScript".
     */
    public final String mGeneratorRef;

    /**
     * Create a language definition with the given filename and generator object.
     *
     * @param filename The path to the language generator file relative to
     *                 file:///android_assets/background_compiler.html.
     * @param generatorObject The generator object provided by the file, such as
     *                  "Blockly.JavaScript"
     */
    public LanguageDefinition(String filename, String generatorObject) {
        mLanguageFilename = filename;
        mGeneratorRef = generatorObject;
    }
}