text:
void RL_MapGeneratorHolderRegister(RL_MapGeneratorHolder* mgh, RL_MapGenerator* mg) {
	AL_Add(mgh->list, mg);
}

// use the holder to generate a map
// TODO make it blend maps so that it makes some sense
RL_Map *RL_GenerateMap(RL_MapGeneratorHolder* mgh, int w, int h, RL_Generator* gen)
{
	RL_MapGenerator* mg = AL_Get(mgh->list,1);
	return mg->Create(w,h,gen);
}

// create the map generator holder container
RL_MapGeneratorHolder* RL_CreateMapGeneratorHolder()
{
	RL_MapGeneratorHolder *mgh = calloc(1,sizeof(RL_MapGeneratorHolder));
	mgh->list = AL_New();
	mgh->Register = &RL_MapGeneratorHolderRegister;
	mgh->Generate = &RL_GenerateMap;
	return mgh;
}

void RL_DestroyMapGeneratorHolder(RL_MapGeneratorHolder *mgh)
{
	// force programmer to remove all of the elements in list
	// to prevent them from forgetting that they need to deal with the pointers
	// stored in there
	while(AL_Size(mgh->list) > 0){AL_RemoveLast(mgh->list);}
	AL_Destroy(mgh->list);
	free(mgh);
}

void RL_MapSave(RL_Map *map, const char *base_path) {
	const char *save_loc = "data/save/map.txt";
	int basePathLen = 0;
	int saveLocLen = 0;
	int i = 0;
	basePathLen = strnlen(base_path,256);
	saveLocLen = strnlen(save_loc,256);
	char *save_path = calloc((basePathLen + saveLocLen + 1), sizeof(char));
	for (i = 0; i < basePathLen; i++) {
		save_path[i] = base_path[i];
	}
	for (i = 0; i < saveLocLen; i++) {
		save_path[i + basePathLen] = save_loc[i];
	}
	save_path[basePathLen+saveLocLen] = '\0';
	RL_DebugMessage(LOG, save_path);
	FILE *f = fopen(save_path, "w");
	if (f) {
		for (i = 0; i < 4096; i++) {
			#ifdef __L64__
			fprintf(f, "%lu\n", map->initalGeneratorState.Q[i]);
			#else
			fprintf(f, "%u\n", map->initalGeneratorState.Q[i]);
			#endif
		}
		#ifdef __L64__
        fprintf(f, "%lu\n", map->initalGeneratorState.c);
        #else
        fprintf(f, "%u\n", map->initalGeneratorState.c);
        #endif
		fprintf(f, "%d\n", map->climate);
		fprintf(f, "%d\n", map->sizeX);
		fprintf(f, "%d\n", map->sizeY);
		fclose(f);
		RL_CreatureListSave(map->creatures,base_path);
	}
	free(save_path);
}

RL_Map* RL_MapLoadGenerate(RL_MapGeneratorHolder* mgh, RL_Generator* gen, int climate, int w, int h)
{
	RL_MapGenerator* mg = AL_Get(mgh->list,climate);
	return mg->Create(w,h,gen);
}

RL_Map* RL_MapLoad(RL_MapGeneratorHolder *mgh, const char *base_path) {
	RL_Map *map = NULL;
	RL_Generator gen;
	int climate;
	int sizeX;
	int sizeY;
	const char *load_loc = "data/save/map.txt";
	int basePathLen = 0;
	int loadLocLen = 0;
	int i = 0;
	basePathLen = strnlen(base_path,256);
	loadLocLen = strnlen(load_loc,256);
	char *load_path = calloc((basePathLen + loadLocLen + 1), sizeof(char));
	for (i = 0; i < basePathLen; i++) {
		load_path[i] = base_path[i];
	}
	for (i = 0; i < loadLocLen; i++) {
		load_path[i + basePathLen] = load_loc[i];
	}
	load_path[basePathLen+loadLocLen] = '\0';
	RL_DebugMessage(LOG, load_path);
	FILE *f = fopen(load_path, "r");
	if (f) {
		for (i = 0; i < 4096; i++) {
			#ifdef __L64__
			fscanf(f, "%lu\n", &(gen.Q[i]));
			#else
			fscanf(f, "%u\n", &(gen.Q[i]));
			#endif
		}
		#ifdef __L64__
		fscanf(f, "%lu\n", &(gen.c));
		#else
		fscanf(f, "%u\n", &(gen.c));
		#endif
		fscanf(f, "%d\n", &climate);
		fscanf(f, "%d\n", &sizeX);
		fscanf(f, "%d\n", &sizeY);
		fclose(f);
		gen.GenerateNumber = &CMWC4096;
		map = RL_MapLoadGenerate(mgh, &gen,climate, sizeX,sizeY);
	}

	free(load_path);
	return map;
}

void RL_PopulateMap(RL_Map* m, ArrayList* masterList)
{
	int numberOfCreatures = 10;
	while(numberOfCreatures > 0)
	{
		// TODO make better way to add creatures to a mpa
		// use the climate to determine what gets added
		// and then find some way to add a good distribution of them
		// also need to copy the creatuers over from the master list
		// as otherwise you modify the the creature for the entire game
		RL_Creature* creature = calloc(1, sizeof(RL_Creature));
		memcpy(creature, AL_Get(masterList,0), sizeof(RL_Creature));
		creature->ent.x = numberOfCreatures;
		creature->ent.y = numberOfCreatures;
		AL_Add(m->creatures, creature);
		numberOfCreatures--;
	}
}

// free the map pointer that we allocated
void RL_DestroyMap(RL_Map *m, int w)
{
    int i = 0;
    for (; i < w; i++) {
        free(m->map[i]);
    }
    free(m->map);
	free(m->obstacles);
	RL_Creature* c = AL_RemoveLast(m->creatures);
	while (c != NULL)
	{
		free(c);
		c = AL_RemoveLast(m->creatures);
	}
	// free the list
	// note only works if the list size is 0
	AL_Destroy(m->creatures);
	free(m);
}

// Check for a valid move based on a map, entity and a directon of movement
int RL_ValidMove(RL_Map *m, RL_Entity *ent, int dir)
{
    int b = 1;
    int i = 0;
    int x = ent->x;
    int y = ent->y;
    switch (dir) {
        case 0: // w
            y -= 1;
            break;
        case 1: // s
            y += 1;
            break;
        case 2: // a
            x -= 1;
            break;
        case 3: // d
            x += 1;
            break;
    }

	// make sure that x and y are within bounds
    if (x < 0) x = 0;
    if (y < 0) y = 0;

    if (x > (m->sizeX - 1))
    {
        x = m->sizeX - 1;
    }

    if (y > (m->sizeY - 1))
    {
        y = m->sizeY - 1;
    }

	// make sure that we are not moving through walls and such
    for (i = 0; i < m->obstaclesLen; i++) {
        if (m->map[x][y] == m->obstacles[i])
            b = 0;
    }
    return b;
}


text:
class HttpClient

  class Response
    attr_reader :status, :body, :headers

    def initialize(closeable_response)
      @status = closeable_response.status_line.status_code
      @headers = closeable_response.all_headers.inject({}) do |headers, header|
        headers[header.name] = header.value
        headers
      end
      @body = read_body(closeable_response)
    end

    def success?
      status >= 200 && status <= 206
    end

    def json_body(options = {})
      @json_body ||= JSON.parse(body, options)
    end

  private

    def read_body(closeable_response)
      return "" unless entity = closeable_response.entity
      return "" unless entity.is_chunked? || entity.content_length > 0
      if content_encoding = entity.content_encoding
        entity = case content_encoding.value
          when "gzip", "x-gzip" then
            GzipDecompressingEntity.new(entity)
          when "deflate" then
            DeflateDecompressingEntity.new(entity)
          else
            entity
        end
      end
      EntityUtils.to_string(entity, "UTF-8")
    end
  end

end

redpajama_set_name: RedPajamaGithub


text:
@interface UIWebView (JKCanvas)
/// 创建一个指定大小的画布
- (void)jk_createCanvas:(NSString *)canvasId
               width:(NSInteger)width
              height:(NSInteger)height;
/// 在指定位置创建一个指定大小的画布
- (void)jk_createCanvas:(NSString *)canvasId
               width:(NSInteger)width
              height:(NSInteger)height
                   x:(NSInteger)x
                   y:(NSInteger)y;
/// 绘制矩形填充 context.fillRect(x,y,width,height)
- (void)jk_fillRectOnCanvas:(NSString *)canvasId
                       x:(NSInteger)x
                       y:(NSInteger)y
                   width:(NSInteger)width
                  height:(NSInteger)height
                 uicolor:(UIColor *)color;
/// 绘制矩形边框 context.strokeRect(x,y,width,height)
- (void)jk_strokeRectOnCanvas:(NSString *)canvasId
                         x:(NSInteger)x
                         y:(NSInteger)y
                     width:(NSInteger)width
                    height:(NSInteger)height
                   uicolor:(UIColor *)color
                 lineWidth:(NSInteger)lineWidth;
/// 清除矩形区域 context.clearRect(x,y,width,height)
- (void)jk_clearRectOnCanvas:(NSString *)canvasId
                        x:(NSInteger)x
                        y:(NSInteger)y
                    width:(NSInteger)width
                   height:(NSInteger) height;
/// 绘制圆弧填充 context.arc(x, y, radius, starAngle,endAngle, anticlockwise)
- (void)jk_arcOnCanvas:(NSString *)canvasId
            centerX:(NSInteger)x
            centerY:(NSInteger)y
             radius:(NSInteger)r
         startAngle:(float)startAngle
           endAngle:(float)endAngle
      anticlockwise:(BOOL)anticlockwise
            uicolor:(UIColor *)color;
/// 绘制一条线段 context.moveTo(x,y) context.lineTo(x,y)
- (void)jk_lineOnCanvas:(NSString *)canvasId
                  x1:(NSInteger)x1
                  y1:(NSInteger)y1
                  x2:(NSInteger)x2
                  y2:(NSInteger)y2
             uicolor:(UIColor *)color
           lineWidth:(NSInteger)lineWidth;
/// 绘制一条折线
- (void)jk_linesOnCanvas:(NSString *)canvasId
               points:(NSArray *)points
             unicolor:(UIColor *)color
            lineWidth:(NSInteger)lineWidth;
/// 绘制贝塞尔曲线 context.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y)
- (void)jk_bezierCurveOnCanvas:(NSString *)canvasId
                         x1:(NSInteger)x1
                         y1:(NSInteger)y1
                       cp1x:(NSInteger)cp1x
                       cp1y:(NSInteger)cp1y
                       cp2x:(NSInteger)cp2x
                       cp2y:(NSInteger)cp2y
                         x2:(NSInteger)x2
                         y2:(NSInteger)y2
                   unicolor:(UIColor *)color
                  lineWidth:(NSInteger)lineWidth;
/// 绘制二次样条曲线 context.quadraticCurveTo(qcpx,qcpy,qx,qy)
// coming soon...
/// 显示图像的一部分 context.drawImage(image,sx,sy,sw,sh,dx,dy,dw,dh)
- (void)jk_drawImage:(NSString *)src
         onCanvas:(NSString *)canvasId
               sx:(NSInteger)sx
               sy:(NSInteger)sy
               sw:(NSInteger)sw
               sh:(NSInteger)sh
               dx:(NSInteger)dx
               dy:(NSInteger)dy
               dw:(NSInteger)dw
               dh:(NSInteger)dh;
@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sohu.tv</groupId>
    <artifactId>cachecloud-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <modules>
        <module>cachecloud-web</module>
        <module>cachecloud-custom</module>
    </modules>

    <properties>
        <spring.boot.version>2.2.9.RELEASE</spring.boot.version>
        <spring.cloud.version>Hoxton.SR4</spring.cloud.version>
        <logback.version>1.2.11</logback.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <quartz.version>2.2.1</quartz.version>
        <mysql.java.version>8.0.29</mysql.java.version>
        <druid-version>1.1.3</druid-version>
        <mybatis-spring-boot.version>1.3.1</mybatis-spring-boot.version>
        <junit.version>4.13.1</junit.version>
        <jedis.version>3.7.0</jedis.version>
        <protostuff.version>1.0.8</protostuff.version>
        <jackson.version>2.3.2</jackson.version>
        <httpcomponents.version>4.5.13</httpcomponents.version>
        <apache.commons.collections>4.4</apache.commons.collections>
        <maven.compiler.plugin>3.1</maven.compiler.plugin>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.surefire.plugin>2.16</maven.surefire.plugin>
        <maven.clean.plugin>2.5</maven.clean.plugin>
        <ganymed.ssh.version>build210</ganymed.ssh.version>
        <sshj.version>0.26.0</sshj.version>
        <commons.collections.version>3.2.1</commons.collections.version>
        <guava.version>30.1.1-jre</guava.version>
        <janino.version>3.0.6</janino.version>
        <commons-lang.version>3.8.1</commons-lang.version>
        <json-lib.version>2.4</json-lib.version>
        <commons.configuration.version>1.6</commons.configuration.version>
        <swagger-starter.version>1.0.3-SNAPSHOT</swagger-starter.version>
        <flexmark.version>0.42.12</flexmark.version>
        <fastjson.version>1.2.83</fastjson.version>
        <hystrix.version>1.5.6</hystrix.version>
        <maven.deloy.plugin>2.8.1</maven.deloy.plugin>
        <maven-source-plugin>2.2.1</maven-source-plugin>
        <maven-resources-plugin>2.6</maven-resources-plugin>
        <logstash-logback-encoder.version>5.3</logstash-logback-encoder.version>
        <!-- open -->
        <cachecloud-cloud.version>1.0-SNAPSHOT</cachecloud-cloud.version>
        <springfox-swagger2.version>2.9.2</springfox-swagger2.version>
        <swagger-ui.version>2.9.2</swagger-ui.version>
        <apache.ant.version>1.10.11</apache.ant.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.quartz-scheduler</groupId>
                <artifactId>quartz</artifactId>
                <version>${quartz.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>slf4j-api</artifactId>
                        <groupId>org.slf4j</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql.java.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
            </dependency>

            <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>${jedis.version}</version>
            </dependency>

            <dependency>
                <groupId>com.dyuproject.protostuff</groupId>
                <artifactId>protostuff-runtime</artifactId>
                <version>${protostuff.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dyuproject.protostuff</groupId>
                <artifactId>protostuff-core</artifactId>
                <version>${protostuff.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpcomponents.version}</version>
            </dependency>

            <!-- SSH远程 -->
            <dependency>
                <groupId>ch.ethz.ganymed</groupId>
                <artifactId>ganymed-ssh2</artifactId>
                <version>${ganymed.ssh.version}</version>
            </dependency>

            <!-- ssh -->
            <dependency>
                <groupId>com.hierynomus</groupId>
                <artifactId>sshj</artifactId>
                <version>${sshj.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${apache.commons.collections}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang.version}</version>
            </dependency>

            <dependency>
                <groupId>net.sf.json-lib</groupId>
                <artifactId>json-lib</artifactId>
                <version>${json-lib.version}</version>
                <classifier>jdk15</classifier>
            </dependency>

            <dependency>
                <groupId>commons-configuration</groupId>
                <artifactId>commons-configuration</artifactId>
                <version>${commons.configuration.version}</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.netflix.hystrix</groupId>
                <artifactId>hystrix-core</artifactId>
                <version>${hystrix.version}</version>
            </dependency>

            <dependency>
                <groupId>org.codehaus.janino</groupId>
                <artifactId>janino</artifactId>
                <version>${janino.version}</version>
            </dependency>

            <!--markdown to html-->
            <dependency>
                <groupId>com.vladsch.flexmark</groupId>
                <artifactId>flexmark</artifactId>
                <version>${flexmark.version}</version>
            </dependency>
            <!--表格渲染插件-->
            <dependency>
                <groupId>com.vladsch.flexmark</groupId>
                <artifactId>flexmark-ext-tables</artifactId>
                <version>${flexmark.version}</version>
            </dependency>
            <!--markdown to html end-->

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid</artifactId>
                <version>${druid-version}</version>
            </dependency>

            <dependency>
                <groupId>org.mybatis.spring.boot</groupId>
                <artifactId>mybatis-spring-boot-starter</artifactId>
                <version>${mybatis-spring-boot.version}</version>
            </dependency>

            <!-- sohu dependency -->
            <dependency>
                <groupId>com.sohu.tv.custom</groupId>
                <artifactId>cachecloud-custom</artifactId>
                <version>${cachecloud-cloud.version}</version>
            </dependency>

            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox-swagger2.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${swagger-ui.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant</artifactId>
                <version>${apache.ant.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin}</version>
                    <configuration>
                        <source>${maven.compiler.target}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.plugin}</version>
                    <configuration>
                        <skipTests>true</skipTests>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven.clean.plugin}</version>
                    <configuration>
                        <filesets>
                            <fileset>
                                <directory>${basedir}/src/main/webapp/WEB-INF/classes</directory>
                            </fileset>
                            <fileset>
                                <directory>${basedir}/src/main/webapp/WEB-INF/lib</directory>
                            </fileset>
                        </filesets>
                    </configuration>
                </plugin>

                <plugin>
	            	<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven.deloy.plugin}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin}</version>
					<configuration>
						<attach>true</attach>
					</configuration>
					<executions>
						<execution>
							<phase>compile</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
	                <groupId>org.apache.maven.plugins</groupId>
	                <artifactId>maven-resources-plugin</artifactId>
	                <version>${maven-resources-plugin}</version>
	                <configuration>
	                    <encoding>UTF-8</encoding>
	                </configuration>
	            </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <repositories>
        <repository>
            <id>central</id>
            <url>http://central.maven.org/maven2/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>com.springsource.repository.maven.release</id>
            <url>http://repo.springsource.org/release/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>aliyunmaven</id>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>


text:
from django.core.management.base import BaseCommand
from django.db.models import get_models, get_app
from django.contrib.auth.management import create_permissions

class Command(BaseCommand):
    args = '<app app ...>'
    help = 'reloads permissions for specified apps.'

    def handle(self, *args, **options):

        apps = []
        for arg in args:
            apps.append(get_app(arg))

        for app in apps:
            create_permissions(app, None, options.get('verbosity', 0))


text:
package io.finch

import java.util.UUID

import cats.Eval
import com.twitter.concurrent.AsyncStream
import com.twitter.finagle.http.{Cookie, Method, Request}
import com.twitter.finagle.http.exp.Multipart.FileUpload
import com.twitter.finagle.netty3.ChannelBufferBuf
import com.twitter.io.{Buf, Charsets}
import com.twitter.util.{Base64StringEncoder, Future, Try}
import io.finch.internal.TooFastString
import shapeless._

/**
 * A collection of [[Endpoint]] combinators.
 */
trait Endpoints {

  private[this] val hnilFutureOutput: Eval[Future[Output[HNil]]] =
    Eval.now(Future.value(Output.payload(HNil)))

  type Endpoint0 = Endpoint[HNil]
  type Endpoint2[A, B] = Endpoint[A :: B :: HNil]
  type Endpoint3[A, B, C] = Endpoint[A :: B :: C :: HNil]

  /**
   * An universal [[Endpoint]] that matches the given string.
   */
  private[finch] class Matcher(s: String) extends Endpoint[HNil] {
    def apply(input: Input): Endpoint.Result[HNil] =
      input.headOption.flatMap {
        case `s` => Some((input.drop(1), hnilFutureOutput))
        case _ => None
      }

    override def toString = s
  }

  implicit def stringToMatcher(s: String): Endpoint0 = new Matcher(s)
  implicit def intToMatcher(i: Int): Endpoint0 = new Matcher(i.toString)
  implicit def booleanToMatcher(b: Boolean): Endpoint0 = new Matcher(b.toString)

  /**
   * An universal extractor that extracts some value of type `A` if it's possible to fetch the value
   * from the string.
   */
  private[finch] case class Extractor[A](name: String, f: String => Option[A]) extends Endpoint[A] {
    def apply(input: Input): Endpoint.Result[A] =
      for {
        ss <- input.headOption
        aa <- f(ss)
      } yield (input.drop(1), Eval.now(Future.value(Output.payload(aa))))

    def apply(n: String): Endpoint[A] = copy[A](name = n)

    override def toString: String = s":$name"
  }

  private[finch] case class StringExtractor(name: String) extends Endpoint[String] {
    def apply(input: Input): Endpoint.Result[String] =
      input.headOption.map(s => (input.drop(1), Eval.now(Future.value(Output.payload(s)))))

    def apply(n: String): Endpoint[String] = copy(name = n)

    override def toString: String = s":$name"
  }

  /**
   * An extractor that extracts a value of type `Seq[A]` from the tail of the route.
   */
  private[finch] case class TailExtractor[A](
      name: String,
      f: String => Option[A]) extends Endpoint[Seq[A]] {
    def apply(input: Input): Endpoint.Result[Seq[A]] =
      Some((input.copy(path = Nil), Eval.now(Future.value(Output.payload(for {
        s <- input.path
        a <- f(s)
      } yield a)))))

    def apply(n: String): Endpoint[Seq[A]] = copy[A](name = n)

    override def toString: String = s":$name*"
  }

  private[this] def extractUUID(s: String): Option[UUID] =
    if (s.length != 36) None
    else try Some(UUID.fromString(s)) catch { case _: Exception => None }

  private[this] def result[A](i: Input, a: A): (Input, Eval[Future[Output[A]]]) =
    (i.drop(1), Eval.now(Future.value(Output.payload(a))))

  /**
   * A matching [[Endpoint]] that reads a string value from the current path segment.
   *
   * @note This is an experimental API and might be removed without any notice.
   */
  val path: Endpoint[String] = new Endpoint[String] {
    def apply(input: Input): Endpoint.Result[String] =
      input.headOption.map(s => result(input, s))

    override def toString: String = ":path"
  }

  /**
   * A matching [[Endpoint]] that reads a value of type `A` (using the implicit
   * [[internal.Capture]] instances defined for `A`) from the current path segment.
   */
  def path[A](implicit c: internal.Capture[A]): Endpoint[A] = new Endpoint[A] {
    def apply(input: Input): Endpoint.Result[A] = for {
      ss <- input.headOption
      aa <- c(ss)
    } yield result(input, aa)

    override def toString: String = ":path"
  }

  /**
   * A matching [[Endpoint]] that reads an integer value from the current path segment.
   */
  object int extends Extractor("int", _.tooInt)

  /**
   * A matching [[Endpoint]] that reads an integer tail from the current path segment.
   */
  object ints extends TailExtractor("int", _.tooInt)

  /**
   * A matching [[Endpoint]] that reads a long value from the current path segment.
   */
  object long extends Extractor("long", _.tooLong)

  /**
   * A matching [[Endpoint]] that reads a long tail from the current path segment.
   */
  object longs extends TailExtractor("long", _.tooLong)

  /**
   * A matching [[Endpoint]] that reads a string value from the current path segment.
   */
  object string extends StringExtractor("string")

  /**
   * A matching [[Endpoint]] that reads a string tail from the current path segment.
   */
  object strings extends TailExtractor("string", s => Some(s))

  /**
   * A matching [[Endpoint]] that reads a boolean value from the current path segment.
   */
  object boolean extends Extractor("boolean", _.tooBoolean)

  /**
   * A matching [[Endpoint]] that reads a boolean tail from the current path segment.
   */
  object booleans extends TailExtractor("boolean", _.tooBoolean)

  /**
   * A matching [[Endpoint]] that reads an UUID value from the current path segment.
   */
  object uuid extends Extractor("uuid", extractUUID)

  /**
   * A matching [[Endpoint]] that reads an UUID tail from the current path segment.
   */
  object uuids extends TailExtractor("uuid", extractUUID)

  /**
   * An [[Endpoint]] that skips all path segments.
   */
  object * extends Endpoint[HNil] {
    def apply(input: Input): Endpoint.Result[HNil] =
      Some((input.copy(path = Nil), hnilFutureOutput))

    override def toString: String = "*"
  }

  /**
   * An identity [[Endpoint]].
   */
  object / extends Endpoint[HNil] {
    def apply(input: Input): Endpoint.Result[HNil] =
      Some((input, hnilFutureOutput))

    override def toString: String = ""
  }

  private[this] def method[A](m: Method)(r: Endpoint[A]): Endpoint[A] = new Endpoint[A] {
    def apply(input: Input): Endpoint.Result[A] =
      if (input.request.method == m) r(input)
      else None

    override def toString: String = s"${m.toString().toUpperCase} /${r.toString}"
  }

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `GET` and the underlying
   * endpoint succeeds on it.
   */
  def get[A]: Endpoint[A] => Endpoint[A] = method(Method.Get)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `POST` and the underlying
   * endpoint succeeds on it.
   */
  def post[A]: Endpoint[A] => Endpoint[A] = method(Method.Post)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `PATCH` and the underlying
   * endpoint succeeds on it.
   */
  def patch[A]: Endpoint[A] => Endpoint[A] = method(Method.Patch)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `DELETE` and the
   * underlying endpoint succeeds on it.
   */
  def delete[A]: Endpoint[A] => Endpoint[A] = method(Method.Delete)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `HEAD` and the underlying
   * endpoint succeeds on it.
   */
  def head[A]: Endpoint[A] => Endpoint[A] = method(Method.Head)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `OPTIONS` and the
   * underlying endpoint succeeds on it.
   */
  def options[A]: Endpoint[A] => Endpoint[A] = method(Method.Options)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `PUT` and the underlying
   * endpoint succeeds on it.
   */
  def put[A]: Endpoint[A] => Endpoint[A] = method(Method.Put)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `CONNECT` and the
   * underlying endpoint succeeds on it.
   */
  def connect[A]: Endpoint[A] => Endpoint[A] = method(Method.Connect)

  /**
   * A combinator that wraps the given [[Endpoint]] with additional check of the HTTP method. The
   * resulting [[Endpoint]] succeeds on the request only if its method is `TRACE` and the underlying
   * router endpoint on it.
   */
  def trace[A]: Endpoint[A] => Endpoint[A] = method(Method.Trace)

  // Helper functions.
  private[this] def requestParam(param: String)(req: Request): Option[String] =
    req.params.get(param)
      .orElse(req.multipart.flatMap(m => m.attributes.get(param).flatMap(_.headOption)))

  private[this] def requestParams(params: String)(req: Request): Seq[String] =
    req.params.getAll(params).toList.flatMap(_.split(","))

  private[this] def requestHeader(header: String)(req: Request): Option[String] =
    req.headerMap.get(header)

  private[this] def requestCookie(cookie: String)(req: Request): Option[Cookie] =
    req.cookies.get(cookie)

  private[this] def requestBody(req: Request): Option[String] =
    req.contentLength match {
      case Some(n) if n > 0 =>
        val buffer = ChannelBufferBuf.Owned.extract(req.content)
        // Note: We usually have an array underneath the ChannelBuffer (at least on Netty 3).
        // This check is mostly about a safeguard.
        // TODO: Use proper charset
        if (buffer.hasArray) Some(new String(buffer.array(), 0, buffer.readableBytes(), "UTF-8"))
        else Some(buffer.toString(Charsets.Utf8))
      case _ => None
    }

  private[this] def requestUpload(upload: String)(req: Request): Option[FileUpload] =
    Try(req.multipart).getOrElse(None).flatMap(m => m.files.get(upload).flatMap(fs => fs.headOption))

  private[this] def option[A](item: items.RequestItem)(f: Request => A): Endpoint[A] =
    Endpoint.embed(item)(input =>
      Some((input, Eval.later(Future.value(Output.payload(f(input.request))))))
    )

  private[this] def exists[A](item: items.RequestItem)(f: Request => Option[A]): Endpoint[A] =
    Endpoint.embed(item)(input =>
      f(input.request).map(s => (input, Eval.now(Future.value(Output.payload(s)))))
    )

  private[this] def matches[A]
    (item: items.RequestItem)
    (p: Request => Boolean)
    (f: Request => A): Endpoint[A] = Endpoint.embed(item)(input =>
      if (p(input.request)) Some((input, Eval.later(Future.value(Output.payload(f(input.request))))))
      else None
    )

  /**
   * An evaluating [[Endpoint]] that reads an optional query-string param `name` from the request
   * into an `Option`.
   */
  def paramOption(name: String): Endpoint[Option[String]] =
    option(items.ParamItem(name))(requestParam(name)).noneIfEmpty

  /**
   * An evaluating [[Endpoint]] that reads a required query-string param `name` from the
   * request or raises an [[Error.NotPresent]] exception when the param is missing; an
   * [[Error.NotValid]] exception is the param is empty.
   */
  def param(name: String): Endpoint[String] =
    paramOption(name).failIfNone.shouldNot(beEmpty)

  /**
   * A matching [[Endpoint]] that only matches the requests that contain a given query-string
   * param `name`.
   */
  def paramExists(name: String): Endpoint[String] =
    exists(items.ParamItem(name))(requestParam(name))

  /**
   * An evaluating [[Endpoint]] that reads an optional (in a meaning that a resulting
   * `Seq` may be empty) multi-value query-string param `name` from the request into a `Seq`.
   */
  def params(name: String): Endpoint[Seq[String]] =
    option(items.ParamItem(name))(i => requestParams(name)(i).filter(_.nonEmpty))

  /**
   * An evaluating [[Endpoint]] that reads a required (in a meaning that a resulting `Seq` will have
   * at least one element) multi-value query-string param `name` from the request into a `Seq` or
   * raises a [[Error.NotPresent]] exception when the params are missing or empty.
   */
  def paramsNonEmpty(name: String): Endpoint[Seq[String]] =
    option(items.ParamItem(name))(requestParams(name)).mapAsync({
      case Nil => Future.exception(Error.NotPresent(items.ParamItem(name)))
      case unfiltered => Future.value(unfiltered.filter(_.nonEmpty))
    }).shouldNot("be empty")(_.isEmpty)

  /**
   * An evaluating [[Endpoint]] that reads a required HTTP header `name` from the request or raises
   * an [[Error.NotPresent]] exception when the header is missing.
   */
  def header(name: String): Endpoint[String] =
    option(items.HeaderItem(name))(requestHeader(name)).failIfNone.shouldNot(beEmpty)

  /**
   * An evaluating [[Endpoint]] that reads an optional HTTP header `name` from the request into an
   * `Option`.
   */
  def headerOption(name: String): Endpoint[Option[String]] =
    option(items.HeaderItem(name))(requestHeader(name)).noneIfEmpty

  /**
   * A matching [[Endpoint]] that only matches the requests that contain a given header `name`.
   */
  def headerExists(name: String): Endpoint[String] =
    exists(items.HeaderItem(name))(requestHeader(name))

  /**
   * An evaluating [[Endpoint]] that reads a binary request body, interpreted as a `Array[Byte]`,
   * into an `Option`. The returned [[Endpoint]] only matches non-chunked (non-streamed) requests.
   */
  val binaryBodyOption: Endpoint[Option[Array[Byte]]] =
    matches(items.BodyItem)(!_.isChunked)(req =>
      req.contentLength match {
        case Some(n) if n > 0 => Some(Buf.ByteArray.Shared.extract(req.content))
        case _ => None
      }
    )

  /**
   * An evaluating [[Endpoint]] that reads a required binary request body, interpreted as an
   * `Array[Byte]`, or throws a [[Error.NotPresent]] exception. The returned [[Endpoint]] only
   * matches non-chunked (non-streamed) requests.
   */
  val binaryBody: Endpoint[Array[Byte]] = binaryBodyOption.failIfNone

  /**
   * An evaluating [[Endpoint]] that reads an optional request body, interpreted as a `String`, into
   * an `Option`. The returned [[Endpoint]] only matches non-chunked (non-streamed) requests.
   */
  val bodyOption: Endpoint[Option[String]] = matches(items.BodyItem)(!_.isChunked)(requestBody)

  /**
   * An evaluating[[Endpoint]] that reads the required request body, interpreted as a `String`, or
   * throws an [[Error.NotPresent]] exception. The returned [[Endpoint]] only matches non-chunked
   * (non-streamed) requests.
   */
  val body: Endpoint[String] = bodyOption.failIfNone

  /**
   * An evaluating [[Endpoint]] that reads a required chunked streaming binary body, interpreted as
   * an `AsyncStream[Buf]`. The returned [[Endpoint]] only matches chunked (streamed) requests.
   */
  val asyncBody: Endpoint[AsyncStream[Buf]] =
    matches(items.BodyItem)(_.isChunked)(req => AsyncStream.fromReader(req.reader))

  /**
   * An evaluating [[Endpoint]] that reads an optional HTTP cookie from the request into an
   * `Option`.
   */
  def cookieOption(name: String): Endpoint[Option[Cookie]] =
    option(items.CookieItem(name))(requestCookie(name))

  /**
   * An evaluating [[Endpoint]] that reads a required cookie from the request or raises an
   * [[Error.NotPresent]] exception when the cookie is missing.
   */
  def cookie(name: String): Endpoint[Cookie] = cookieOption(name).failIfNone

  /**
   * An evaluating[[Endpoint]] that reads an optional file upload from a multipart/form-data request
   * into an `Option`.
   */
  def fileUploadOption(name: String): Endpoint[Option[FileUpload]] =
    matches(items.ParamItem(name))(!_.isChunked)(requestUpload(name))

  /**
   * An evaluating [[Endpoint]] that reads a required file upload from a multipart/form-data
   * request.
   */
  def fileUpload(name: String): Endpoint[FileUpload] = fileUploadOption(name).failIfNone

  /**
   * An [[Exception]] representing a failed authorization with [[BasicAuth]].
   */
  object BasicAuthFailed extends Exception {
    override def getMessage: String = "Wrong credentials"
  }

  /**
   * Maintains Basic HTTP Auth for an arbitrary [[Endpoint]].
   */
  case class BasicAuth(user: String, password: String) {
    private[this] val userInfo = s"$user:$password"
    private[this] val expected = "Basic " + Base64StringEncoder.encode(userInfo.getBytes)

    def apply[A](e: Endpoint[A]): Endpoint[A] = new Endpoint[A] {
      private[this] val failedOutput: Eval[Future[Output[A]]] =
        Eval.now(Future.value(Unauthorized(BasicAuthFailed)))

      def apply(input: Input): Endpoint.Result[A] =
        input.request.authorization.flatMap {
          case `expected` => e(input)
          case _ => Some((input.copy(path = Seq.empty), failedOutput))
        }

      override def toString: String = s"BasicAuth($e)"
    }
  }

  private[finch] val beEmpty: ValidationRule[String] = ValidationRule("be empty")(_.isEmpty)
}


text:
package com.guojianyiliao.eryitianshi.View.activity;

import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.guojianyiliao.eryitianshi.Data.Http_data;
import com.guojianyiliao.eryitianshi.R;
import com.guojianyiliao.eryitianshi.Utils.MyBaseActivity;
import com.guojianyiliao.eryitianshi.Utils.SharedPsaveuser;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;

import okhttp3.Call;
/**
 *
 */
public class PhonechangeActivity extends MyBaseActivity {
    private EditText et_verificationcode, et_phone;
    private TextView tv_pas;
    private LinearLayout ll_rutphone;
    SharedPsaveuser sp;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_phonechange);
        try {

            sp=new SharedPsaveuser(this);
            findView();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void findView() {
        et_verificationcode = (EditText) findViewById(R.id.et_verificationcode);
        et_phone = (EditText) findViewById(R.id.et_phone);
        tv_pas = (TextView) findViewById(R.id.tv_pas);
        ll_rutphone = (LinearLayout) findViewById(R.id.ll_rutphone);
        et_verificationcode.addTextChangedListener(textListener);
        et_phone.addTextChangedListener(textListener);
        ll_rutphone.setOnClickListener(listener);
        tv_pas.setOnClickListener(listener);
    }

    private TextWatcher textListener = new TextWatcher() {
        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {

        }

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            if (et_phone.length() != 0 && et_verificationcode.length() != 0) {
                tv_pas.setTextColor(android.graphics.Color.parseColor("#6fc9e6"));
            } else {
                tv_pas.setTextColor(android.graphics.Color.parseColor("#e0e0e0"));
            }
        }

        @Override
        public void afterTextChanged(Editable s) {

        }
    };
    private View.OnClickListener listener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            switch (v.getId()) {
                case R.id.ll_rutphone:
                    finish();
                    break;
                case R.id.tv_pas:
                    OkHttpUtils
                            .post()
                            .url(Http_data.http_data + "/bingding")
                            .addParams("id", sp.getTag().getId() + "")
                            .addParams("phone", et_phone.getText().toString())
                            .addParams("code", et_verificationcode.getText().toString())
                            .build()
                            .execute(new StringCallback() {
                                @Override
                                public void onError(Call call, Exception e, int id) {
                                    Toast.makeText(PhonechangeActivity.this, "网络连接失败", Toast.LENGTH_SHORT).show();
                                }

                                @Override
                                public void onResponse(String response, int id) {
                                    finish();

                                }
                            });
                    break;
            }
        }
    };
}


text:
/*
 *  This file is part of the WebKit open source project.
 *  This file has been generated by generate-bindings.pl. DO NOT MODIFY!
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Library General Public
 *  License as published by the Free Software Foundation; either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Library General Public License for more details.
 *
 *  You should have received a copy of the GNU Library General Public License
 *  along with this library; see the file COPYING.LIB.  If not, write to
 *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 *  Boston, MA 02110-1301, USA.
 */

#if !defined(__WEBKITDOM_H_INSIDE__) && !defined(BUILDING_WEBKIT)
#error "Only <webkitdom/webkitdom.h> can be included directly."
#endif

#ifndef WebKitDOMTestTypedefs_h
#define WebKitDOMTestTypedefs_h

#include <glib-object.h>
#include <webkitdom/WebKitDOMObject.h>
#include <webkitdom/webkitdomdefines.h>

G_BEGIN_DECLS

#define WEBKIT_TYPE_DOM_TEST_TYPEDEFS            (webkit_dom_test_typedefs_get_type())
#define WEBKIT_DOM_TEST_TYPEDEFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOM_TEST_TYPEDEFS, WebKitDOMTestTypedefs))
#define WEBKIT_DOM_TEST_TYPEDEFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_DOM_TEST_TYPEDEFS, WebKitDOMTestTypedefsClass)
#define WEBKIT_DOM_IS_TEST_TYPEDEFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOM_TEST_TYPEDEFS))
#define WEBKIT_DOM_IS_TEST_TYPEDEFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_DOM_TEST_TYPEDEFS))
#define WEBKIT_DOM_TEST_TYPEDEFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_DOM_TEST_TYPEDEFS, WebKitDOMTestTypedefsClass))

struct _WebKitDOMTestTypedefs {
    WebKitDOMObject parent_instance;
};

struct _WebKitDOMTestTypedefsClass {
    WebKitDOMObjectClass parent_class;
};

WEBKIT_API GType
webkit_dom_test_typedefs_get_type (void);

/**
 * webkit_dom_test_typedefs_func:
 * @self: A #WebKitDOMTestTypedefs
 * @x: A #WebKitDOMlong[]
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_func(WebKitDOMTestTypedefs* self, WebKitDOMlong[]* x);

/**
 * webkit_dom_test_typedefs_set_shadow:
 * @self: A #WebKitDOMTestTypedefs
 * @width: A #gfloat
 * @height: A #gfloat
 * @blur: A #gfloat
 * @color: A #gchar
 * @alpha: A #gfloat
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_set_shadow(WebKitDOMTestTypedefs* self, gfloat width, gfloat height, gfloat blur, const gchar* color, gfloat alpha);

/**
 * webkit_dom_test_typedefs_nullable_array_arg:
 * @self: A #WebKitDOMTestTypedefs
 * @arrayArg: A #WebKitDOMDOMString[]
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_nullable_array_arg(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* arrayArg);

/**
 * webkit_dom_test_typedefs_immutable_point_function:
 * @self: A #WebKitDOMTestTypedefs
 *
 * Returns: (transfer none):
 *
**/
WEBKIT_API WebKitDOMSVGPoint*
webkit_dom_test_typedefs_immutable_point_function(WebKitDOMTestTypedefs* self);

/**
 * webkit_dom_test_typedefs_string_array_function:
 * @self: A #WebKitDOMTestTypedefs
 * @values: A #WebKitDOMDOMString[]
 * @error: #GError
 *
 * Returns: (transfer none):
 *
**/
WEBKIT_API WebKitDOMDOMString[]*
webkit_dom_test_typedefs_string_array_function(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* values, GError** error);

/**
 * webkit_dom_test_typedefs_string_array_function2:
 * @self: A #WebKitDOMTestTypedefs
 * @values: A #WebKitDOMDOMString[]
 * @error: #GError
 *
 * Returns: (transfer none):
 *
**/
WEBKIT_API WebKitDOMDOMString[]*
webkit_dom_test_typedefs_string_array_function2(WebKitDOMTestTypedefs* self, WebKitDOMDOMString[]* values, GError** error);

/**
 * webkit_dom_test_typedefs_method_with_exception:
 * @self: A #WebKitDOMTestTypedefs
 * @error: #GError
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_method_with_exception(WebKitDOMTestTypedefs* self, GError** error);

/**
 * webkit_dom_test_typedefs_get_unsigned_long_long_attr:
 * @self: A #WebKitDOMTestTypedefs
 *
 * Returns:
 *
**/
WEBKIT_API guint64
webkit_dom_test_typedefs_get_unsigned_long_long_attr(WebKitDOMTestTypedefs* self);

/**
 * webkit_dom_test_typedefs_set_unsigned_long_long_attr:
 * @self: A #WebKitDOMTestTypedefs
 * @value: A #guint64
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_set_unsigned_long_long_attr(WebKitDOMTestTypedefs* self, guint64 value);

/**
 * webkit_dom_test_typedefs_get_immutable_serialized_script_value:
 * @self: A #WebKitDOMTestTypedefs
 *
 * Returns: (transfer none):
 *
**/
WEBKIT_API WebKitDOMSerializedScriptValue*
webkit_dom_test_typedefs_get_immutable_serialized_script_value(WebKitDOMTestTypedefs* self);

/**
 * webkit_dom_test_typedefs_set_immutable_serialized_script_value:
 * @self: A #WebKitDOMTestTypedefs
 * @value: A #WebKitDOMSerializedScriptValue
 *
 * Returns: (transfer none):
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_set_immutable_serialized_script_value(WebKitDOMTestTypedefs* self, WebKitDOMSerializedScriptValue* value);

/**
 * webkit_dom_test_typedefs_get_attr_with_getter_exception:
 * @self: A #WebKitDOMTestTypedefs
 * @error: #GError
 *
 * Returns:
 *
**/
WEBKIT_API glong
webkit_dom_test_typedefs_get_attr_with_getter_exception(WebKitDOMTestTypedefs* self, GError** error);

/**
 * webkit_dom_test_typedefs_set_attr_with_getter_exception:
 * @self: A #WebKitDOMTestTypedefs
 * @value: A #glong
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_set_attr_with_getter_exception(WebKitDOMTestTypedefs* self, glong value);

/**
 * webkit_dom_test_typedefs_get_attr_with_setter_exception:
 * @self: A #WebKitDOMTestTypedefs
 *
 * Returns:
 *
**/
WEBKIT_API glong
webkit_dom_test_typedefs_get_attr_with_setter_exception(WebKitDOMTestTypedefs* self);

/**
 * webkit_dom_test_typedefs_set_attr_with_setter_exception:
 * @self: A #WebKitDOMTestTypedefs
 * @value: A #glong
 * @error: #GError
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_set_attr_with_setter_exception(WebKitDOMTestTypedefs* self, glong value, GError** error);

/**
 * webkit_dom_test_typedefs_get_string_attr_with_getter_exception:
 * @self: A #WebKitDOMTestTypedefs
 * @error: #GError
 *
 * Returns:
 *
**/
WEBKIT_API gchar*
webkit_dom_test_typedefs_get_string_attr_with_getter_exception(WebKitDOMTestTypedefs* self, GError** error);

/**
 * webkit_dom_test_typedefs_set_string_attr_with_getter_exception:
 * @self: A #WebKitDOMTestTypedefs
 * @value: A #gchar
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_set_string_attr_with_getter_exception(WebKitDOMTestTypedefs* self, const gchar* value);

/**
 * webkit_dom_test_typedefs_get_string_attr_with_setter_exception:
 * @self: A #WebKitDOMTestTypedefs
 *
 * Returns:
 *
**/
WEBKIT_API gchar*
webkit_dom_test_typedefs_get_string_attr_with_setter_exception(WebKitDOMTestTypedefs* self);

/**
 * webkit_dom_test_typedefs_set_string_attr_with_setter_exception:
 * @self: A #WebKitDOMTestTypedefs
 * @value: A #gchar
 * @error: #GError
 *
 *
**/
WEBKIT_API void
webkit_dom_test_typedefs_set_string_attr_with_setter_exception(WebKitDOMTestTypedefs* self, const gchar* value, GError** error);

G_END_DECLS

#endif /* WebKitDOMTestTypedefs_h */


text:
* [Drupal 8 Configuration Development flow ](https://www.youtube.com/watch?v=vFsgNjhGr4Y) Apr 2016
* [Happy Ever Afters With CI Workflow](https://goo.gl/S0k0Xn) September 6, 2015
* [MoldCamp - multidimentional testing workflow. CIBox](http://www.slideshare.net/podarok/moldcamp-multidimentional-testing-workflow-cibox), May 30, 2015
* [CIbox - OpenSource solution for making your #devops better](http://www.slideshare.net/podarok/cibox-opensource-solutio)
* [Drupal Continuous Integration Workflow](http://www.slideshare.net/podarok/drupal-continuous-integration-workflow)
* [Start using vagrant now!](http://www.slideshare.net/podarok/start-using-vagrant-now)
* [Live deployment, CI, Drupal](http://www.slideshare.net/podarok/live-deployment-ci-drupal)

## DrupalCon sessions:
* [CIBox - full stack open source Continuous Integration flow for Drupal/Symfony teams](http://www.slideshare.net/podarok/cibox-full-stack-open-source-continuous-integration-flow-for-drupalsymfony-teams)
* [Multidimensional testing workflow before merge to master](https://events.drupal.org/losangeles2015/sessions/multidimensional-testing-workflow-merge-master)

## Videos:
* [DrupalCon Barcelona 2015: CIBox - full stack open source Continuous Integration flow](https://www.youtube.com/watch?v=4-Ol8kN_A0M)
* [DrupalCamp Kyiv 2015: Workshop. How to start using Continuous Integration Box](https://www.youtube.com/watch?t=303&v=HgVZm0cxC0I)
* [DrupalCon Los Angeles 2015: Multidimensional testing workflow before merge to master](https://www.youtube.com/watch?v=o0pqKqnhWgw)
* [CIbox - OpenSource solution for making your #devops better - DrupalCafe Kyiv](http://druler.com/node/888)

## Screencasts:
* [How to setup cibox and github repo](https://www.youtube.com/watch?v=EJZcqTcycf0), **outdated**


text:
<!DOCTYPE html>

		<title>Visit Two Ridges Presbyterian Church</title>
		<?php require_once("include/head.php"); ?>

		<link href="css/responsive-embed.css" rel="stylesheet">

	<?php require_once("include/navbar.php"); ?>

	<?php require_once("include/js.php"); ?>


text:
def calculate(text_input):
    pass


text:
package org.etower.repository.main;

import org.etower.core.domain.EtUser;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

/**
 * 用户DAO接口
 *
 * @author dawei.li
 *
 */
public interface EtUserDao extends CrudRepository<EtUser, Long> {

//	public Pagination getPage(String username, String email, Integer siteId,
//			Integer groupId, Boolean disabled, Boolean admin, Integer rank,
//			int pageNo, int pageSize);
//
//	@SuppressWarnings("rawtypes")
//	public List getList(String username, String email, Integer siteId,
//			Integer groupId, Boolean disabled, Boolean admin, Integer rank);
//
//	public List<EtUser> getAdminList(Integer siteId, Boolean allChannel,
//			Boolean disabled, Integer rank);

//	public EtUser findOne(Long id);

	public EtUser findByUserName(String userName);

//	public int countByUsername(String username);
//
//	public int countMemberByUsername(String username);
//
//	public int countByEmail(String email);

	@SuppressWarnings("unchecked")
	public EtUser save(EtUser bean);

	@Modifying
	@Query("delete from EtUser user where user.id = ?1")
	public EtUser deleteById(Long id);
}


text:
package robotTetris.tetrisGame.modele;

public enum TetrominoType
{
	O, I, J, L, S, Z, T;

	public static TetrominoType getRandomTetrominoType()
	{
		int r = (int) (Math.random() * values().length);
		return values()[r];
	}
}


text:
package com.maxifier.guice.events;

import java.lang.reflect.Method;

/**
 * Created by IntelliJ IDEA.
 * User: dalex
 * Date: 18.06.2009
 * Time: 11:44:47
 * <p/>
 */
public abstract class HandlerInvocator<T, L> {
    protected final Method method;
    protected final Class paramType;

    public HandlerInvocator(Method method) {
        this.method = method;

        Class<?>[] pt = method.getParameterTypes();
        if (pt.length > 1) {
            throw new RuntimeException("Handler method couldn't have more than one parameter: " + method);
        }
        paramType = pt.length == 1 ? pt[0] : null;
    }

    public Class<T> getParamType() {
        //noinspection unchecked
        return paramType;
    }

    public Method getMethod() {
        return method;
    }

    public abstract Object invoke(L instance, T t) throws Exception;

    @Override
    public String toString() {
        return method.toString();
    }
}


text:
/*
 * Structure definitions for the Cardbus Bridge driver
 */

struct cbb_intrhand {
	driver_filter_t	*filt;
	driver_intr_t	*intr;
	void 		*arg;
	struct cbb_softc *sc;
	void		*cookie;
};

struct cbb_reslist {
	SLIST_ENTRY(cbb_reslist) link;
	struct	resource *res;
	int	type;
	int	rid;
		/* note: unlike the regular resource list, there can be
		 * duplicate rid's in the same list.  However, the
		 * combination of rid and res->r_dev should be unique.
		 */
	bus_addr_t cardaddr; /* for 16-bit pccard memory */
};

#define	CBB_AUTO_OPEN_SMALLHOLE 0x100
#define CBB_NSLOTS		4

struct cbb_softc {
	device_t	dev;
	struct exca_softc exca[CBB_NSLOTS];
	struct		resource *base_res;
	struct		resource *irq_res;
	void		*intrhand;
	bus_space_tag_t bst;
	bus_space_handle_t bsh;
	uint32_t	domain;
	unsigned int	pribus;
	unsigned int	secbus;
	unsigned int	subbus;
	struct mtx	mtx;
	int		cardok;
	u_int32_t	flags;
#define	CBB_16BIT_CARD		0x20000000
#define	CBB_KTHREAD_RUNNING	0x40000000
#define	CBB_KTHREAD_DONE	0x80000000
	int		chipset;		/* chipset id */
#define	CB_UNKNOWN	0		/* NOT Cardbus-PCI bridge */
#define	CB_TI113X	1		/* TI PCI1130/1131 */
#define	CB_TI12XX	2		/* TI PCI12xx/14xx/44xx/15xx/45xx */
#define	CB_TI125X	3		/* TI PCI1250/1251(B)/1450 */
#define	CB_RF5C47X	4		/* RICOH RF5C475/476/477 */
#define	CB_RF5C46X	5		/* RICOH RF5C465/466/467 */
#define	CB_CIRRUS	6		/* Cirrus Logic CLPD683x */
#define	CB_TOPIC95	7		/* Toshiba ToPIC95 */
#define	CB_TOPIC97	8		/* Toshiba ToPIC97/100 */
#define	CB_O2MICRO	9		/* O2Micro chips */
	SLIST_HEAD(, cbb_reslist) rl;
	device_t	cbdev;
	struct proc	*event_thread;
	void (*chipinit)(struct cbb_softc *);
	int	powerintr;
	struct root_hold_token *sc_root_token;
};

/* result of detect_card */
#define	CARD_UKN_CARD	0x00
#define	CARD_5V_CARD	0x01
#define	CARD_3V_CARD	0x02
#define	CARD_XV_CARD	0x04
#define	CARD_YV_CARD	0x08

/* for power_socket */
#define	CARD_VCC(X)	(X)
#define CARD_VPP_VCC	0xf0
#define CARD_VCCMASK	0xf
#define CARD_VCCSHIFT	0
#define XV		2
#define YV		1

#define CARD_OFF	(CARD_VCC(0))

extern int cbb_debug;
extern devclass_t cbb_devclass;

int	cbb_activate_resource(device_t brdev, device_t child,
	    int type, int rid, struct resource *r);
struct resource	*cbb_alloc_resource(device_t brdev, device_t child,
	    int type, int *rid, u_long start, u_long end, u_long count,
	    u_int flags);
void	cbb_child_detached(device_t brdev, device_t child);
int	cbb_child_present(device_t parent, device_t child);
int	cbb_deactivate_resource(device_t brdev, device_t child,
	    int type, int rid, struct resource *r);
int	cbb_detach(device_t brdev);
void	cbb_disable_func_intr(struct cbb_softc *sc);
void	cbb_driver_added(device_t brdev, driver_t *driver);
void	cbb_event_thread(void *arg);
int	cbb_pcic_set_memory_offset(device_t brdev, device_t child, int rid,
	    uint32_t cardaddr, uint32_t *deltap);
int	cbb_pcic_set_res_flags(device_t brdev, device_t child, int type,
	    int rid, u_long flags);
int	cbb_power(device_t brdev, int volts);
int	cbb_power_enable_socket(device_t brdev, device_t child);
int	cbb_power_disable_socket(device_t brdev, device_t child);
int	cbb_read_ivar(device_t brdev, device_t child, int which,
	    uintptr_t *result);
int	cbb_release_resource(device_t brdev, device_t child,
	    int type, int rid, struct resource *r);
int	cbb_resume(device_t self);
int	cbb_setup_intr(device_t dev, device_t child, struct resource *irq,
	    int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg,
	    void **cookiep);
int	cbb_suspend(device_t self);
int	cbb_teardown_intr(device_t dev, device_t child, struct resource *irq,
	    void *cookie);
int	cbb_write_ivar(device_t brdev, device_t child, int which,
	    uintptr_t value);

/*
 */
static __inline void
cbb_set(struct cbb_softc *sc, uint32_t reg, uint32_t val)
{
	bus_space_write_4(sc->bst, sc->bsh, reg, val);
}

static __inline uint32_t
cbb_get(struct cbb_softc *sc, uint32_t reg)
{
	return (bus_space_read_4(sc->bst, sc->bsh, reg));
}

static __inline void
cbb_setb(struct cbb_softc *sc, uint32_t reg, uint32_t bits)
{
	cbb_set(sc, reg, cbb_get(sc, reg) | bits);
}

static __inline void
cbb_clrb(struct cbb_softc *sc, uint32_t reg, uint32_t bits)
{
	cbb_set(sc, reg, cbb_get(sc, reg) & ~bits);
}


text:
package example

case class PersonCaseClass(firstName: String, lastName: String, email: String)


text:
<?php

  namespace osCommerce\OM\Core\Site\Admin\Application\Languages\Model;

  use osCommerce\OM\Core\OSCOM;
  use osCommerce\OM\Core\Cache;
  use osCommerce\OM\Core\Site\Admin\Application\Languages\Languages;

  class updateDefinition {
    public static function execute($data) {
      $definitions = $data['definitions'];

      unset($data['definitions']);

      foreach ( $definitions as $key => $value ) {
        $data['key'] = $key;
        $data['value'] = $value;

        OSCOM::callDB('Admin\Languages\UpdateDefinition', $data);

        Cache::clear('languages-' . Languages::get($data['language_id'], 'code') . '-' . $data['group']);
      }

      return true;
    }
  }
?>