text:
from keystoneclient.v3 import client as ksclient

from monascaclient.openstack.common import jsonutils

def script_keystone_client(token=None):
    if token:
        ksclient.Client(auth_url='http://no.where',
                        insecure=False,
                        tenant_id='tenant_id',
                        token=token).AndReturn(FakeKeystone(token, None))
    else:
        ksclient.Client(auth_url='http://no.where',
                        insecure=False,
                        password='password',
                        project_name='project_name',
                        timeout=20,
                        username='username').AndReturn(FakeKeystone(
                                                       'abcd1234', 'test'))

def fake_headers():
    return {'X-Auth-Token': 'abcd1234',
            'Content-Type': 'application/json',
            'Accept': 'application/json',
            'User-Agent': 'python-monascaclient'}

class FakeServiceCatalog():

    def url_for(self, endpoint_type, service_type):
        return 'http://192.168.1.5:8004/v1/f14b41234'

class FakeKeystone():
    service_catalog = FakeServiceCatalog()

    def __init__(self, auth_token, project_id):
        self.auth_token = auth_token
        self.project_id = project_id

class FakeRaw():
    version = 110

class FakeHTTPResponse():

    version = 1.1

    def __init__(self, status_code, reason, headers, content):
        self.headers = headers
        self.content = content
        self.status_code = status_code
        self.reason = reason
        self.raw = FakeRaw()

    def getheader(self, name, default=None):
        return self.headers.get(name, default)

    def getheaders(self):
        return self.headers.items()

    def read(self, amt=None):
        b = self.content
        self.content = None
        return b

    def iter_content(self, chunksize):
        return self.content

    def json(self):
        return jsonutils.loads(self.content)


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
org.springframework.security.acls.domain Class Hierarchy (Spring Security 2.0.4 API)
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
      Use
    Tree
      Deprecated
      Index
      Help

Spring Security Framework

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Hierarchy For Package org.springframework.security.acls.domain

Package Hierarchies:
All Packages

Class Hierarchy

java.lang.Object

org.springframework.security.acls.domain.AbstractPermission (implements org.springframework.security.acls.Permission)

org.springframework.security.acls.domain.BasePermission
org.springframework.security.acls.domain.CumulativePermission

org.springframework.security.acls.domain.AccessControlEntryImpl (implements org.springframework.security.acls.AccessControlEntry, org.springframework.security.acls.AuditableAccessControlEntry)

org.springframework.security.acls.domain.AclAuthorizationStrategyImpl (implements org.springframework.security.acls.domain.AclAuthorizationStrategy)

org.springframework.security.acls.domain.AclImpl (implements org.springframework.security.acls.Acl, org.springframework.security.acls.AuditableAcl, org.springframework.security.acls.MutableAcl, org.springframework.security.acls.OwnershipAcl)

org.springframework.security.acls.domain.ConsoleAuditLogger (implements org.springframework.security.acls.domain.AuditLogger)

org.springframework.security.acls.domain.DefaultPermissionFactory (implements org.springframework.security.acls.domain.PermissionFactory)

Interface Hierarchy

org.springframework.security.acls.domain.AclAuthorizationStrategy
org.springframework.security.acls.domain.AuditLogger
org.springframework.security.acls.domain.PermissionFactory

      Overview
      Package
      Class
      Use
    Tree
      Deprecated
      Index
      Help

Spring Security Framework

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright © 2004-2008 SpringSource, Inc. All Rights Reserved.

redpajama_set_name: RedPajamaGithub


text:
package at.ac.tuwien.big.xmlintelledit.intelledit.scope;

import java.util.Iterator;
import java.util.Random;

import at.ac.tuwien.big.xmlintelledit.intelledit.scope.helper.CountingIterator;
import at.ac.tuwien.big.xmlintelledit.intelledit.transfer.EcoreTransferFunction;

public class EqualProbabilityIndexScope implements ValueScope<Integer,Boolean>{

	public static interface Sizer {
		public int size();

		public void transfer(EcoreTransferFunction func);
	}

	private Sizer sizer;

	public EqualProbabilityIndexScope(Sizer sizer) {
		this.sizer = sizer;
	}

	@Override
	public boolean contains(Integer sol) {
		return sol>=0 && sol < sizer.size();
	}

	@Override
	public Boolean getQuality(Integer sol) {
		return contains(sol);
	}

	@Override
	public Iterator<Integer> iterator() {
		return new CountingIterator(sizer.size());
	}

	@Override
	public boolean isFinite() {
		return true;
	}

	private Random random = new Random();

	@Override
	public Iterator<Integer> sample() {
		return new Iterator<Integer>() {

			@Override
			public boolean hasNext() {
				return sizer.size()>0;
			}

			@Override
			public Integer next() {
				return random.nextInt(sizer.size());
			}

		};
	}

	@Override
	public Integer sampled() {
		int max = sizer.size();
		if (max == 0) {
			return null;
		}
		return sample().next();
	}

	@Override
	public void transfer(EcoreTransferFunction transferFunc) {
		sizer.transfer(transferFunc);
	}
}


text:
/**
 * @author Kate Compton
 */
define(["common", "./edge", "threeUtils"], function(common, Edge, threeUtils) {'use strict';

    var graphCount = 0;

    // A graph is a collection of edges
    var Graph = Class.extend({
        init : function(name) {
            this.name = name;
            this.idNumber = graphCount;
            graphCount++;

            this.clear();

        },

        clear : function() {
            this.edges = [];
            this.nodes = [];
        },

        setBoundingBox : function() {
            this.boundingBox = new common.Rect();
            this.expandBoxToFit(this.boundingBox);
        },

        // Min box to hold all nodes and their control nodes
        expandBoxToFit : function(box) {

            $.each(this.nodes, function(index, pt) {
                box.stretchToContainPoint(pt);
            });
        },

        //======================================================
        //======================================================
        //======================================================
        //======================================================
        getNode : function(index) {
            return this.nodes[index];
        },

        // Make this into an exact copy of the original,
        //  but all the edges should connect to the nodes of the new one
        clone : function(original) {
            var graph = this;
            this.name = original.name + "(clone)";
            // Clone all hte nodes
            $.each(original.nodes, function(index, node) {
                var n = new Vector(node);
                graph.addNode(n);
            });

            // Connect up all the edges
            $.each(original.edges, function(index, edge) {
                var startIndex = edge.nodes[0].graphIndex;
                var endIndex = edge.nodes[1].graphIndex;
                var start = graph.getNode(startIndex);
                var end = graph.getNode(endIndex);
                var e = new Edge(start, end);
                e.clone(edge);
                graph.addEdge(e);
            });
        },

        //======================================================
        //======================================================
        //======================================================
        //======================================================

        applyToNodes : function(f, fControlHandles) {
            $.each(this.nodes, function(index, node) {
                f(node);
            });

            if (fControlHandles) {
                $.each(this.edges, function(index, edge) {
                    edge.applyToControlHandles(fControlHandles);
                })
            }
        },

        applyToEdges : function(f) {
            $.each(this.edges, function(index, edge) {
                f(edge);
            })
        },

        getRandomEdge : function() {
            return this.edges[Math.floor(Math.random() * this.edges.length)];
        },

        getRandomNode : function() {
            return this.nodes[Math.floor(Math.random() * this.nodes.length)];
        },

        addNode : function(pt) {
            pt.graphIndex = this.nodes.length;
            this.nodes.push(pt);
        },

        addEdge : function(edge) {
            this.edges.push(edge);
            return edge;
        },

        //==================================================================
        //==================================================================
        //==================================================================
        // Drawing

        drawNodes : function(context) {
            for (var i = 0; i < this.nodes.length; i++) {
                this.nodes[i].draw(context);
            }
        },

        drawEdges : function(context) {
            for (var i = 0; i < this.edges.length; i++) {
                this.edges[i].draw(context);
            }
        },

        //==================================================================
        //==================================================================
        //==================================================================

        debugOutput : function() {
            $.each(this.nodes, function(index, node) {
                console.log(index + ": " + node + "(" + node.graphIndex + ")");
            });

            $.each(this.edges, function(index, edge) {
                console.log(index + ": " + edge + "(" + edge.start.graphIndex + "-" + edge.end.graphIndex + ")");
            });

            $.each(this.paths, function(index, path) {
                path.debugOutput();
            })
        },

        toString : function() {
            return this.name + "(" + this.nodes.length + " nodes, " + this.edges.length + " edges)";
        },

        cleanup : function() {
            this.nodes = this.nodes.filter(function(node) {
                return !node.deleted;
            });

            this.edges = this.edges.filter(function(edge) {
                return !edge.deleted;
            });
        }
    });

    Graph.Edge = Edge;

    return Graph;

});


text:
const spawnSync = require('child_process').spawnSync;
const path = require('path');

// return the result of the spawned proccess:
//  [ 'status', 'signal', 'output', 'pid', 'stdout', 'stderr',
//    'envPairs', 'options', 'args', 'file' ]
module.exports = function runJest(dir, args) {
  return spawnSync('jest', args || [], {
    cwd: path.resolve(__dirname, dir),
  });
};


text:
package main

import (
	"fmt"
	"github.com/aarzilli/golua/lua"
	"github.com/mischief/goland/game"
	"github.com/mischief/goland/game/gnet"
	"github.com/mischief/goland/game/gutil"
	"github.com/stevedonovan/luar"
	"github.com/trustmaster/goflow"
	"image"
	"log"
	"net"
	"reflect"
)

var (
	Actions = map[game.Action]func(*GameServer, *ClientPacket){
		game.ACTION_ITEM_PICKUP:         Action_ItemPickup,
		game.ACTION_ITEM_DROP:           Action_ItemDrop,
		game.ACTION_ITEM_LIST_INVENTORY: Action_Inventory,
	}

	GS *GameServer
)

type GameServer struct {
	flow.Graph // graph for our procs; see goflow

	Listener   net.Listener       // acceptor of client connections
	PacketChan chan *ClientPacket // channel where clients packets arrive

	*game.DefaultSubject

	Sessions map[int]*WorldSession //client list

	Objects *game.GameObjectMap
	Map     *game.MapChunk

	config *gutil.LuaConfig

	Lua *lua.State
}

func NewGameServer(config *gutil.LuaConfig, ls *lua.State) (*GameServer, error) {
	gs := &GameServer{
		config: config,
	}

	GS = gs

	gs.InitGraphState()

	// add nodes
	gs.Add(NewPacketRouter(gs), "router")
	gs.Add(new(PacketLogger), "logger")

	// connect processes
	// Used to be this, was throwing an error about too many arguments to gs.Graph.Connect:
	// gs.Connect("router", "Log", "logger", "In", make(chan *ClientPacket))
	gs.Connect("router", "Log", "logger", "In")

	// map external ports
	gs.MapInPort("In", "router", "In")

	gs.PacketChan = make(chan *ClientPacket, 5)
	gs.SetInPort("In", gs.PacketChan)

	// observers setup
	gs.DefaultSubject = game.NewDefaultSubject()

	// objects setup
	gs.Objects = game.NewGameObjectMap()

	// lua state
	gs.Lua = ls

	return gs, nil
}

func (gs *GameServer) Debug() bool {
	if debug, err := gs.config.Get("debug", reflect.Bool); err != nil {
		log.Println("GameServer: 'debug' not found in config. defaulting to false")
		return false
	} else {
		return debug.(bool)
	}
}

func (gs *GameServer) Run() {
	gs.Start()

	for {
		conn, err := gs.Listener.Accept()
		if err != nil {
			log.Println("GameServer: acceptor: ", err)
			continue
		}

		ws := NewWorldSession(gs, conn)
		gs.Attach(ws)

		log.Printf("GameServer: New connection from %s", ws.Con.RemoteAddr())

		go ws.ReceiveProc()
	}

	gs.End()
}

func (gs *GameServer) Start() {
	var err error

	// load assets
	log.Print("GameServer: Loading assets")
	if gs.LoadAssets() != true {
		log.Printf("GameServer: LoadAssets failed")
		return
	}

	// setup tcp listener
	log.Printf("GameServer: Starting listener")

	var dialstr string
	defaultdialstr := ":61507"
	if dialconf, err := gs.config.Get("listener", reflect.String); err != nil {
		log.Println("GameServer: 'listen' not found in config. defaulting to ", defaultdialstr)
		dialstr = defaultdialstr
	} else {
		dialstr = dialconf.(string)
	}

	if gs.Listener, err = net.Listen("tcp", dialstr); err != nil {
		log.Fatalf("GameServer: %s", err)
	}

	// setup goflow network
	log.Print("GameServer: Starting flow")

	flow.RunNet(gs)
}

func (gs *GameServer) End() {
}

func (gs *GameServer) LoadMap(file string) bool {
	if gs.Map = game.MapChunkFromFile(file); gs.Map == nil {
		log.Printf("GameServer: LoadMap: failed loading %s", file)
		return false
	}

	log.Printf("GameServer: LoadMap: loaded map %s", file)
	return true
}

func (gs *GameServer) AddObject(obj game.Object) {
	log.Printf("Adding object %s", obj)

	// tell clients about new object
	gs.SendPkStrAll("Rnewobject", obj)
	gs.Objects.Add(obj)
}

func (gs *GameServer) LuaLog(fmt string, args ...interface{}) {
	log.Printf("GameServer: Lua: "+fmt, args...)
}

func (gs *GameServer) GetScriptPath() string {
	defaultpath := "../scripts/?.lua"
	if scriptconf, err := gs.config.Get("scriptpath", reflect.String); err != nil {
		log.Printf("GameServer: GetScriptPath defaulting to %s: %s", defaultpath, err)
		return defaultpath
	} else {
		return scriptconf.(string)
	}
}

// TODO: move these bindings into another file
func (gs *GameServer) BindLua() {
	luar.Register(gs.Lua, "", luar.Map{
		"gs": gs,
	})

	// add our script path here..
	pkgpathscript := `package.path = package.path .. ";" .. gs.GetScriptPath() --";../?.lua"`
	if err := gs.Lua.DoString(pkgpathscript); err != nil {
	}

	Lua_OpenObjectLib(gs.Lua)
}

// load everything from lua scripts
func (gs *GameServer) LoadAssets() bool {
	gs.BindLua()

	if err := gs.Lua.DoString("require('system')"); err != nil {
		log.Printf("GameServer: LoadAssets: %s", err)
		return false
	}

	return true
}

func (gs *GameServer) SendPkStrAll(tag string, data interface{}) {
	gs.SendPacketAll(gnet.NewPacket(tag, data))
}

// send a packet to all clients
func (gs *GameServer) SendPacketAll(pk *gnet.Packet) {
	gs.DefaultSubject.Lock()
	defer gs.DefaultSubject.Unlock()
	for s := gs.DefaultSubject.Observers.Front(); s != nil; s = s.Next() {
		s.Value.(*WorldSession).SendPacket(pk)
	}
}

func (gs *GameServer) HandlePacket(cp *ClientPacket) {

	switch cp.Tag {

	// Tchat: chat message from a client
	case "Tchat":
		// broadcast chat
		chatline := cp.Data.(string)
		gs.SendPacketAll(gnet.NewPacket("Rchat", fmt.Sprintf("[chat] %s: %s", cp.Client.Username, chatline)))

		// Taction: movement request
	case "Taction":
		gs.HandleActionPacket(cp)

		// Tconnect: user establishes new connection
	case "Tconnect":
		username, ok := cp.Data.(string)

		if !ok {
			cp.Reply(gnet.NewPacket("Rerror", "invalid username or conversion failed"))
			break
		} else {
			cp.Client.Username = username
		}

		// make new player for client
		var newplayer game.Object
		newplayer = game.NewGameObject(username)
		newplayer.SetTag("player", true)
		newplayer.SetTag("visible", true)

		// setting this lets players pick up other players, lol
		//newplayer.SetTag("gettable", true)
		newplayer.SetGlyph(game.GLYPH_HUMAN)
		newplayer.SetPos(256/2, 256/2)

		// set the session's object
		cp.Client.Player = newplayer

		// put player object in world
		gs.Objects.Add(newplayer)

		// tell client about all other objects
		for o := range gs.Objects.Chan() {
			if o.GetID() != newplayer.GetID() {
				cp.Reply(gnet.NewPacket("Rnewobject", o))
			}
		}

		// tell all clients about the new player
		gs.SendPacketAll(gnet.NewPacket("Rnewobject", newplayer))

		// greet our new player
		cp.Reply(gnet.NewPacket("Rchat", "Welcome to Goland!"))

	case "Tdisconnect":
		// notify clients this player went away
		Action_ItemDrop(gs, cp)
		gs.Objects.RemoveObject(cp.Client.Player)
		gs.Detach(cp.Client)
		gs.SendPacketAll(gnet.NewPacket("Rdelobject", cp.Client.Player))

	case "Tgetplayer":
		if cp.Client.Player != nil {
			cp.Reply(gnet.NewPacket("Rgetplayer", cp.Client.Player.GetID()))
		} else {
			cp.Reply(gnet.NewPacket("Rerror", "nil Player in WorldSession"))
		}

	case "Tloadmap":
		cp.Reply(gnet.NewPacket("Rloadmap", gs.Map))

	default:
		log.Printf("GameServer: HandlePacket: unknown packet type %s", cp.Tag)
	}
}

// Prevent User from re-adding / picking up item
// Disassociate item with map after action successful
func Action_ItemPickup(gs *GameServer, cp *ClientPacket) {
	p := cp.Client.Player

	// we assume our cp.Data is a game.Action of type ACTION_ITEM_PICKUP
	// act accordingly

	for o := range gs.Objects.Chan() {
		// if same pos.. and gettable
		if game.SamePos(o, p) && o.GetTag("gettable") {
			// pickup item.
			log.Printf("GameServer: Action_ItemPickup: %s picking up %s", p, o)
			o.SetTag("visible", false)
			o.SetTag("gettable", false)
			o.SetPos(0, 0)
			p.AddSubObject(o)

			// update clients with the new state of this object
			gs.SendPacketAll(gnet.NewPacket("Raction", o))
			cp.Reply(gnet.NewPacket("Rchat", fmt.Sprintf("You pick up a %s.", o.GetName())))
		}
	}
}

// Player drops the item indicated by the ID from their inventory
// TODO: this drops all items right now. make it drop individual items
func Action_ItemDrop(gs *GameServer, cp *ClientPacket) {
	p := cp.Client.Player
	for sub := range p.GetSubObjects().Chan() {
		log.Printf("GameServer: Action_ItemDrop: %s dropping %s", p, sub)

		// remove item from player
		p.RemoveSubObject(sub)
		// put it where the player was
		sub.SetPos(p.GetPos())
		// make it visible
		sub.SetTag("visible", true)
		sub.SetTag("gettable", true)

		// update clients with the new state of this object
		gs.SendPacketAll(gnet.NewPacket("Raction", sub))
		cp.Reply(gnet.NewPacket("Rchat", fmt.Sprintf("You drop a %s.", sub.GetName())))
	}
}

// List items in Player's inventory
func Action_Inventory(gs *GameServer, cp *ClientPacket) {
	plobj := cp.Client.Player

	inv := plobj.GetSubObjects().Chan()

	if len(inv) == 0 {
		cp.Reply(gnet.NewPacket("Rchat", "You have 0 items."))
	} else {
		counts := make(map[string]int)
		for sub := range inv {
			n := sub.GetName()
			if _, ok := counts[n]; ok {
				counts[n]++
			} else {
				counts[n] = 1
			}
		}

		for n, c := range counts {
			if c == 1 {
				cp.Reply(gnet.NewPacket("Rchat", fmt.Sprintf("You have a %s.", n)))
			} else {
				cp.Reply(gnet.NewPacket("Rchat", fmt.Sprintf("You have %d %ss.", c, n)))
			}

		}
	}

}

// Top level handler for Taction packets
func (gs *GameServer) HandleActionPacket(cp *ClientPacket) {
	action := cp.Data.(game.Action)
	p := cp.Client.Player

	_, isdir := game.DirTable[action]
	if isdir {
		gs.HandleMovementPacket(cp)
	}

	// check if this action is in our Actions table, if so execute it
	if f, ok := Actions[action]; ok {
		f(gs, cp)
	}

	gs.SendPacketAll(gnet.NewPacket("Raction", p))
}

// Handle Directionals
func (gs *GameServer) HandleMovementPacket(cp *ClientPacket) {
	action := cp.Data.(game.Action)
	p := cp.Client.Player
	offset := game.DirTable[action]
	oldposx, oldposy := p.GetPos()
	newpos := image.Pt(oldposx+offset.X, oldposy+offset.Y)
	valid := true

	// check terrain collision
	if !gs.Map.CheckCollision(nil, newpos) {
		valid = false
		cp.Reply(gnet.NewPacket("Rchat", "Ouch! You bump into a wall."))
	}

	// check gameobject collision
	for o := range gs.Objects.Chan() {

		// check if collision with Item and item name is flag
		px, py := o.GetPos()
		if px == newpos.X && py == newpos.Y {
			collfn := luar.NewLuaObjectFromName(gs.Lua, "collide")
			res, err := collfn.Call(p, o)
			if err != nil {
				log.Printf("GameServer: HandleMovementPacket: Lua error: %s", err)
				return
			}

			// only update position if collide returns true
			if thebool, ok := res.(bool); !ok || !thebool {
				log.Printf("GameServer: HandleMovementPacket: Lua collision failed")
				valid = false
			} else {
				// tell everyone that the colliders changed
				gs.SendPacketAll(gnet.NewPacket("Raction", o))
			}

			if o.GetTag("player") {
				cp.Reply(gnet.NewPacket("Rchat", fmt.Sprintf("Ouch! You bump into %s.", o.GetName())))

				// check if other player's got the goods
				for sub := range o.GetSubObjects().Chan() {
					if sub.GetTag("item") == true {
						// swap pop'n'lock

						// remove item from player
						swap := o.RemoveSubObject(sub)
						p.AddSubObject(swap)
						cp.Reply(gnet.NewPacket("Rchat", fmt.Sprintf("You steal a %s!", swap.GetName())))
					}
				}
			}

			if o.GetTag("item") && o.GetTag("gettable") && valid {
				cp.Reply(gnet.NewPacket("Rchat", fmt.Sprintf("You see a %s here.", o.GetName())))
			}
		}
	}

	if valid {
		cp.Client.Player.SetPos(newpos.X, newpos.Y)
		//gs.SendPacketAll(gnet.NewPacket("Raction", p))
	}

}


text:
ECHO "[COMPILING]"
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
uglifyjs jcomponent.js -c -m -o jcomponent.min.js


text:
package cvc3;

import java.util.*;

public abstract class Flags extends Embedded {
    // jni methods
    private static native Object[] jniGetFlags(Object Flags, String prefix) throws Cvc3Exception;
    private static native Object jniGetFlag(Object Flags, String name) throws Cvc3Exception;

    /// Constructor

    // create embedded object
    public Flags(Object Flags, EmbeddedManager embeddedManager) {
	super(Flags, embeddedManager);
    }

    /// API (immutable)

    // get names of all flags starting with prefix
    public List getFlags(String prefix) throws Cvc3Exception {
	Object[] flags = jniGetFlags(embedded(), prefix);
	assert(flags instanceof String[]);
	return Arrays.asList(flags);
    }

    // get the value of a flag by name (without prefix -/+)
    public Flag getFlag(String name) throws Cvc3Exception {
	return new Flag(jniGetFlag(embedded(), name), embeddedManager());
    }
}


text:
const iOS = 'iOS';
const ANDROID = 'ANDROID';
const BLACKBERRY = 'BLACKBERRY';
const UNKNOWN = 'UNKNOWN';

export class DeviceUtil {
    private static devicePlatForm:string;

    private static getPlatform():string {
        if (!DeviceUtil.devicePlatForm) {
            var userAgent = navigator.userAgent || navigator.vendor || (<any>window).opera;
            if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i) || userAgent.match(/iPod/i)) {
                DeviceUtil.devicePlatForm = iOS;
            }
            else if (userAgent.match(/Android/i)) {
                DeviceUtil.devicePlatForm = ANDROID;
            }
            else if (userAgent.match(/BlackBerry/i)) {
                DeviceUtil.devicePlatForm = BLACKBERRY;
            }
            else {
                DeviceUtil.devicePlatForm = UNKNOWN;
            }
        }
        return DeviceUtil.devicePlatForm;
    }

    public static isAndroid():boolean {
        return DeviceUtil.getPlatform() === ANDROID;
    }

    public static isIOS():boolean {
        return DeviceUtil.getPlatform() === iOS;
    }
}


text:
void C_newSpeciesTable_Finalizer(SEXP cSpeciesTable) {
  if (L_isSpeciesTable(cSpeciesTable)) {
    CSpeciesTable *cSpeciesTablePtr =
      (CSpeciesTable*)R_ExternalPtrAddr(cSpeciesTable);
    CSpecies *species = cSpeciesTablePtr->species;
    CSpecies *maxSpecies = species + cSpeciesTablePtr->numSpecies;
    for( ; species < maxSpecies; species++) {
      Free(species->predators);
      Free(species->prey);
    }
    Free(cSpeciesTablePtr->species);
    Free(cSpeciesTablePtr);
  }
}

SEXP C_newSpeciesTable(SEXP numSpecies) {
  L_assertAnIntegerInRange("numSpecies", numSpecies, 0, MAX_NUM_SPECIES);
  CSpeciesTable *cSpeciesTablePtr =
    (CSpeciesTable*)Calloc(1, CSpeciesTable);
  cSpeciesTablePtr->tag        = CSpeciesTable_TAG;
  cSpeciesTablePtr->rngP       = 0;
  for (size_t i = 0; i < 16; i++) cSpeciesTablePtr->rngState[i] = 0;
  cSpeciesTablePtr->numSpecies = INTEGER(numSpecies)[0];
  cSpeciesTablePtr->species       =
    (CSpecies*)Calloc(cSpeciesTablePtr->numSpecies, CSpecies);
  CSpecies* species = cSpeciesTablePtr->species;
  CSpecies* maxSpecies = species + cSpeciesTablePtr->numSpecies;
  for(; species < maxSpecies; species++) {
    species->growthRate         = NA_REAL;
    species->carryingCapacity   = NA_REAL;
    species->timeLag            = 0;
    species->mortality          = NA_REAL;
    species->halfSaturation     = NA_REAL;
    species->reintroductionProb = 0.0;
    species->reintroductionSize = 0.0;
    species->predationFactor    = 0.0;
    species->numPredators       = 0;
    species->predators          = NULL;
    species->numPrey            = 0;
    species->prey               = NULL;
  }
  SEXP cSpeciesTable = R_MakeExternalPtr(cSpeciesTablePtr, R_NilValue, R_NilValue);
  R_RegisterCFinalizerEx(cSpeciesTable, (R_CFinalizer_t) &C_newSpeciesTable_Finalizer, TRUE);
  return cSpeciesTable;
}

SEXP C_isSpeciesTable(SEXP cSpeciesTable) {
  SEXP result = NEW_LOGICAL(1);
  LOGICAL(result)[0] = L_isSpeciesTable(cSpeciesTable);
  return result;
}

SEXP C_numSpecies(SEXP cTable) {
  SEXP result = NEW_INTEGER(1);
  INTEGER(result)[0] = 0;
  if (!L_isSpeciesTable(cTable)) return result;
  CSpeciesTable *cSpeciesTablePtr = (CSpeciesTable*)R_ExternalPtrAddr(cTable);
  INTEGER(result)[0] = cSpeciesTablePtr->numSpecies;
  return result;
}

SEXP C_getSpeciesValues(SEXP cSpeciesTable, SEXP speciesNum) {
  L_assertSpeciesTable("cSpeciesTable", cSpeciesTable);
  CSpeciesTable *cSpeciesTablePtr = (CSpeciesTable*)R_ExternalPtrAddr(cSpeciesTable);
  L_assertNotNull("cSpeciesTablePtr", cSpeciesTablePtr);
  L_assertAnIntegerInRange("speciesNum", speciesNum, 0, cSpeciesTablePtr->numSpecies);
  size_t speciesIndex = INTEGER(speciesNum)[0];
  CSpecies* speciesPtr = cSpeciesTablePtr->species + speciesIndex;
  SEXP result = NEW_NUMERIC(SPECIES_NUM_VALUES);
  REAL(result)[SPECIES_GROWTH_RATE]         = speciesPtr->growthRate;
  REAL(result)[SPECIES_CARRYING_CAPACITY]   = speciesPtr->carryingCapacity;
  REAL(result)[SPECIES_TIME_LAG]            = (double)speciesPtr->timeLag;
  REAL(result)[SPECIES_MORTALITY]           = speciesPtr->mortality;
  REAL(result)[SPECIES_HALF_SATURATION]     = speciesPtr->halfSaturation;
  REAL(result)[SPECIES_REINTRODUCTION_PROB] = speciesPtr->reintroductionProb;
  REAL(result)[SPECIES_REINTRODUCTION_SIZE] = speciesPtr->reintroductionSize;
  return result;
}

SEXP C_setSpeciesValues(SEXP cSpeciesTable, SEXP speciesNum, SEXP speciesValues) {
  SEXP result = NEW_LOGICAL(1);
  LOGICAL(result)[0] = FALSE;
  L_assertSpeciesTable("cSpeciedTable", cSpeciesTable);
  CSpeciesTable *cSpeciesTablePtr = (CSpeciesTable*)R_ExternalPtrAddr(cSpeciesTable);
  L_assertNotNull("cSpeciesTablePtr", cSpeciesTablePtr);
  L_assertAnIntegerInRange("speciesNum", speciesNum, 0, cSpeciesTablePtr->numSpecies);
  size_t speciesIndex = INTEGER(speciesNum)[0];
  CSpecies* speciesPtr = cSpeciesTablePtr->species + speciesIndex;
  L_assertDoubleVector("speciesValues", speciesValues, SPECIES_NUM_VALUES);
  speciesPtr->growthRate         = REAL(speciesValues)[SPECIES_GROWTH_RATE];
  speciesPtr->carryingCapacity   = REAL(speciesValues)[SPECIES_CARRYING_CAPACITY];
  speciesPtr->timeLag            = (int) (REAL(speciesValues)[SPECIES_TIME_LAG] + SMALLEST_DOUBLE);
  speciesPtr->mortality          = REAL(speciesValues)[SPECIES_MORTALITY];
  speciesPtr->halfSaturation     = REAL(speciesValues)[SPECIES_HALF_SATURATION];
  speciesPtr->reintroductionProb = REAL(speciesValues)[SPECIES_REINTRODUCTION_PROB];
  speciesPtr->reintroductionSize = REAL(speciesValues)[SPECIES_REINTRODUCTION_SIZE];
  LOGICAL(result)[0] = TRUE;
  return result;
}

SEXP L_getPredatorPreyCoefficients(int predatorPreyType, SEXP cSpeciesTable, SEXP speciesNum) {
  L_assertSpeciesTable("cSpeciesTable", cSpeciesTable);
  CSpeciesTable *cSpeciesTablePtr =
    (CSpeciesTable*)R_ExternalPtrAddr(cSpeciesTable);
  L_assertNotNull("cSpeciesTablePtr", cSpeciesTablePtr);
  L_assertAnIntegerInRange("speciesNum", speciesNum, 0, cSpeciesTablePtr->numSpecies);
  size_t speciesIndex = INTEGER(speciesNum)[0];
  CSpecies* speciesPtr = cSpeciesTablePtr->species + speciesIndex;

  size_t vecSize = 0;
  CInteraction *interactions = NULL;

  if (predatorPreyType == PREDATOR) {
    vecSize      = speciesPtr->numPredators;
    interactions = speciesPtr->predators;
  } else if (predatorPreyType == PREY) {
    vecSize      = speciesPtr->numPrey;
    interactions = speciesPtr->prey;
  } else return L_returnMessage("incorrect predatorPreyType");

  if (vecSize < 1) return R_NilValue;

  SEXP speciesNumVec            = NEW_INTEGER(vecSize);
  int *speciesNumData           = INTEGER(speciesNumVec);
  SEXP speciesAttackVec         = NEW_NUMERIC(vecSize);
  double *speciesAttackData     = REAL(speciesAttackVec);
  SEXP speciesConversionVec     = NEW_NUMERIC(vecSize);
  double *speciesConversionData = REAL(speciesConversionVec);
  SEXP speciesDeathRateVec      = NEW_NUMERIC(vecSize);
  double *speciesDeathRateData  = REAL(speciesDeathRateVec);
  SEXP speciesTimeLagVec        = NEW_INTEGER(vecSize);
  int *speciesTimeLagData       = INTEGER(speciesTimeLagVec);
  for(size_t i = 0; i < vecSize; i++) {
    speciesNumData[i]        = interactions[i].speciesIndex;
    speciesAttackData[i]     = interactions[i].attackRate;
    speciesConversionData[i] = interactions[i].conversionRate;
    speciesDeathRateData[i]  = interactions[i].deathRate;
    speciesTimeLagData[i]    = interactions[i].timeLag;
  }
  SEXP result = NEW_LIST(5);
  SET_VECTOR_ELT(result, 0, speciesNumVec);
  SET_VECTOR_ELT(result, 1, speciesAttackVec);
  SET_VECTOR_ELT(result, 2, speciesConversionVec);
  SET_VECTOR_ELT(result, 3, speciesDeathRateVec);
  SET_VECTOR_ELT(result, 4, speciesTimeLagVec);
  return result;
}

SEXP L_setPredatorPreyCoefficients(int predatorPreyType,
                                   SEXP cSpeciesTable,
                                   SEXP speciesNum,
                                   SEXP speciesNumVec,
                                   SEXP speciesAttackVec,
                                   SEXP speciesConversionVec,
                                   SEXP speciesDeathRateVec,
                                   SEXP speciesTimeLagVec) {
  SEXP result = NEW_LOGICAL(1);
  LOGICAL(result)[0] = FALSE;
  L_assertSpeciesTable("cSpeciesTable", cSpeciesTable);
  CSpeciesTable *cSpeciesTablePtr =
    (CSpeciesTable*)R_ExternalPtrAddr(cSpeciesTable);
  L_assertNotNull("cSpeciesTablePtr", cSpeciesTablePtr);
  L_assertAnIntegerInRange("speciesNum", speciesNum, 0, cSpeciesTablePtr->numSpecies);
  size_t speciesIndex = INTEGER(speciesNum)[0];
  CSpecies* speciesPtr = cSpeciesTablePtr->species + speciesIndex;
  L_assertIntegerVector("speciesNum", speciesNumVec, 0);
  int *speciesNumData = INTEGER(speciesNumVec);
  size_t vecSize = GET_LENGTH(speciesNumVec);
  L_assertDoubleVector("speciesAttack", speciesAttackVec, vecSize);
  double *speciesAttackData = REAL(speciesAttackVec);
  L_assertDoubleVector("speciesConversion", speciesConversionVec, vecSize);
  double *speciesConversionData = REAL(speciesConversionVec);
  L_assertDoubleVector("speciesDeathRate", speciesDeathRateVec, vecSize);
  double *speciesDeathRateData = REAL(speciesDeathRateVec);
  L_assertIntegerVector("speciesTimeLag", speciesTimeLagVec, vecSize);
  int *speciesTimeLagData = INTEGER(speciesTimeLagVec);
  CInteraction* interactions = (CInteraction*)Calloc(vecSize, CInteraction);
  for(size_t i = 0; i < vecSize; i++) {
    // check to ensure the species index is valid for this species table
    if ((speciesNumData[i] < 0) || (cSpeciesTablePtr->numSpecies <= speciesNumData[i])) {
      Free(interactions);
      return result;
    }
    interactions[i].speciesIndex   = speciesNumData[i];
    interactions[i].attackRate     = speciesAttackData[i];
    interactions[i].conversionRate = speciesConversionData[i];
    interactions[i].deathRate      = speciesDeathRateData[i];
    interactions[i].timeLag        = speciesTimeLagData[i];
  }
  if (predatorPreyType == PREDATOR) {
    if (speciesPtr->numPredators) {
      Free(speciesPtr->predators);
    }
    speciesPtr->numPredators = vecSize;
    speciesPtr->predators    = interactions;
  } else if (predatorPreyType == PREY) {
    if (speciesPtr->numPrey) {
      Free(speciesPtr->prey);
    }
    speciesPtr->numPrey = vecSize;
    speciesPtr->prey    = interactions;
  } else {
    Free(interactions);
    return result;
  }
  LOGICAL(result)[0] = TRUE;
  return result;
}

SEXP C_getPredatorCoefficients(SEXP cSpeciesTable, SEXP speciesNum) {
  return L_getPredatorPreyCoefficients(PREDATOR, cSpeciesTable, speciesNum);
}

SEXP C_setPredatorCoefficients(SEXP cSpeciesTable,
                               SEXP speciesNum,
                               SEXP speciesNumVec,
                               SEXP speciesAttackVec,
                               SEXP speciesConversionVec,
                               SEXP speciesDeathRateVec,
                               SEXP speciesTimeLagVec) {
  return L_setPredatorPreyCoefficients(PREDATOR,
                                       cSpeciesTable,
                                       speciesNum,
                                       speciesNumVec,
                                       speciesAttackVec,
                                       speciesConversionVec,
                                       speciesDeathRateVec,
                                       speciesTimeLagVec);
}

SEXP C_getPreyCoefficients(SEXP cSpeciesTable, SEXP speciesNum) {
  return L_getPredatorPreyCoefficients(PREY, cSpeciesTable, speciesNum);
}

SEXP C_setPreyCoefficients(SEXP cSpeciesTable,
                           SEXP speciesNum,
                           SEXP speciesNumVec,
                           SEXP speciesAttackVec,
                           SEXP speciesConversionVec,
                           SEXP speciesDeathRateVec,
                           SEXP speciesTimeLagVec) {
  return L_setPredatorPreyCoefficients(PREY,
                                       cSpeciesTable,
                                       speciesNum,
                                       speciesNumVec,
                                       speciesAttackVec,
                                       speciesConversionVec,
                                       speciesDeathRateVec,
                                       speciesTimeLagVec);
}

static R_CallMethodDef CModelBuilder_callMethods[] = {
  { "C_newSpeciesTable",         (DL_FUNC) &C_newSpeciesTable,         1},
  { "C_isSpeciesTable",          (DL_FUNC) &C_isSpeciesTable,          1},
  { "C_numSpecies",              (DL_FUNC) &C_numSpecies,              1},
  { "C_getSpeciesValues",        (DL_FUNC) &C_getSpeciesValues,        2},
  { "C_setSpeciesValues",        (DL_FUNC) &C_setSpeciesValues,        3},
  { "C_getPredatorCoefficients", (DL_FUNC) &C_getPredatorCoefficients, 2},
  { "C_setPredatorCoefficients", (DL_FUNC) &C_setPredatorCoefficients, 7},
  { "C_getPreyCoefficients",     (DL_FUNC) &C_getPreyCoefficients,     2},
  { "C_setPreyCoefficients",     (DL_FUNC) &C_setPreyCoefficients,     7},
  { NULL, NULL, 0}
};

void registerCModelBuilder(DllInfo *info) {
  R_registerRoutines(info, NULL, CModelBuilder_callMethods, NULL, NULL);
}


text:
package com.google.javascript.jscomp;

import com.google.common.collect.ImmutableList;
import com.google.javascript.jscomp.lint.CheckConstantCaseNames;
import com.google.javascript.jscomp.lint.CheckDefaultExportOfGoogModule;
import com.google.javascript.jscomp.lint.CheckDuplicateCase;
import com.google.javascript.jscomp.lint.CheckEmptyStatements;
import com.google.javascript.jscomp.lint.CheckEnums;
import com.google.javascript.jscomp.lint.CheckExtraRequires;
import com.google.javascript.jscomp.lint.CheckInterfaces;
import com.google.javascript.jscomp.lint.CheckJSDocStyle;
import com.google.javascript.jscomp.lint.CheckMissingSemicolon;
import com.google.javascript.jscomp.lint.CheckNullabilityModifiers;
import com.google.javascript.jscomp.lint.CheckPrimitiveAsObject;
import com.google.javascript.jscomp.lint.CheckPrototypeProperties;
import com.google.javascript.jscomp.lint.CheckProvidesSorted;
import com.google.javascript.jscomp.lint.CheckRequiresSorted;
import com.google.javascript.jscomp.lint.CheckUnusedLabels;
import com.google.javascript.jscomp.lint.CheckUselessBlocks;
import com.google.javascript.jscomp.lint.CheckVar;
import com.google.javascript.jscomp.parsing.parser.FeatureSet;
import java.util.List;

/**
 * A PassConfig for the standalone linter, which runs on a single file at a time. This runs a
 * similar set of checks to what you would get when running the compiler with the lintChecks
 * DiagnosticGroup enabled, but some of the lint checks depend on type information, which is not
 * available when looking at a single file, so those are omitted here.
 */
class LintPassConfig extends PassConfig.PassConfigDelegate {
  LintPassConfig(CompilerOptions options) {
    super(new DefaultPassConfig(options));
  }

  @Override
  protected List<PassFactory> getChecks() {
    return ImmutableList.of(
        gatherModuleMetadataPass,
        earlyLintChecks,
        variableReferenceCheck,
        closureRewriteClass,
        lateLintChecks);
  }

  @Override
  protected List<PassFactory> getOptimizations() {
    return ImmutableList.of();
  }

  private final PassFactory gatherModuleMetadataPass =
      PassFactory.builderForHotSwap()
          .setName(PassNames.GATHER_MODULE_METADATA)
          .setInternalFactory(
              (compiler) ->
                  new GatherModuleMetadata(
                      compiler,
                      compiler.getOptions().getProcessCommonJSModules(),
                      compiler.getOptions().getModuleResolutionMode()))
          .setFeatureSet(FeatureSet.latest())
          .build();

  private final PassFactory earlyLintChecks =
      PassFactory.builder()
          .setName("earlyLintChecks")
          .setInternalFactory(
              (compiler) ->
                  new CombinedCompilerPass(
                      compiler,
                      ImmutableList.of(
                          new CheckConstantCaseNames(compiler),
                          new CheckDefaultExportOfGoogModule(compiler),
                          new CheckDuplicateCase(compiler),
                          new CheckEmptyStatements(compiler),
                          new CheckEnums(compiler),
                          new CheckExtraRequires(compiler),
                          new CheckJSDocStyle(compiler),
                          new CheckJSDoc(compiler),
                          new CheckMissingSemicolon(compiler),
                          new CheckSuper(compiler),
                          new CheckPrimitiveAsObject(compiler),
                          new ClosureCheckModule(compiler, compiler.getModuleMetadataMap()),
                          new CheckNullabilityModifiers(compiler),
                          new CheckProvidesSorted(CheckProvidesSorted.Mode.COLLECT_AND_REPORT),
                          new CheckRequiresSorted(CheckRequiresSorted.Mode.COLLECT_AND_REPORT),
                          new CheckSideEffects(
                              compiler, /* report */ true, /* protectSideEffectFreeCode */ false),
                          new CheckTypeImportCodeReferences(compiler),
                          new CheckUnusedLabels(compiler),
                          new CheckUselessBlocks(compiler),
                          new CheckVar(compiler))))
          .setFeatureSet(FeatureSet.latest())
          .build();

  private final PassFactory variableReferenceCheck =
      PassFactory.builder()
          .setName("variableReferenceCheck")
          .setRunInFixedPointLoop(true)
          .setInternalFactory(VariableReferenceCheck::new)
          .setFeatureSet(FeatureSet.latest())
          .build();

  private final PassFactory closureRewriteClass =
      PassFactory.builderForHotSwap()
          .setName(PassNames.CLOSURE_REWRITE_CLASS)
          .setInternalFactory(ClosureRewriteClass::new)
          .setFeatureSet(FeatureSet.latest())
          .build();

  private final PassFactory lateLintChecks =
      PassFactory.builder()
          .setName("lateLintChecks")
          .setInternalFactory(
              (compiler) ->
                  new CombinedCompilerPass(
                      compiler,
                      ImmutableList.of(
                          new CheckInterfaces(compiler), new CheckPrototypeProperties(compiler))))
          .setFeatureSet(FeatureSet.latest())
          .build();
}


text:
from __future__ import absolute_import
from ... import *
import os

from numpy import genfromtxt

from talon.signature.learning import dataset as d

from talon.signature.learning.featurespace import features

def test_is_sender_filename():
    assert_false(d.is_sender_filename("foo/bar"))
    assert_false(d.is_sender_filename("foo/bar_body"))
    ok_(d.is_sender_filename("foo/bar_sender"))

def test_build_sender_filename():
    eq_("foo/bar_sender", d.build_sender_filename("foo/bar_body"))

def test_parse_msg_sender():
    sender, msg = d.parse_msg_sender(EML_MSG_FILENAME)
    # if the message in eml format
    with open(EML_MSG_FILENAME) as f:
        eq_(sender,
            " Alex Q <xxx@yahoo.com>")
        eq_(msg, f.read())

    # if the message sender is stored in a separate file
    sender, msg = d.parse_msg_sender(MSG_FILENAME_WITH_BODY_SUFFIX)
    with open(MSG_FILENAME_WITH_BODY_SUFFIX) as f:
        eq_(sender, u"john@example.com")
        eq_(msg, f.read())

def test_build_extraction_dataset():
    if os.path.exists(os.path.join(TMP_DIR, 'extraction.data')):
        os.remove(os.path.join(TMP_DIR, 'extraction.data'))
    d.build_extraction_dataset(os.path.join(EMAILS_DIR, 'P'),
                               os.path.join(TMP_DIR,
                                            'extraction.data'), 1)

    filename = os.path.join(TMP_DIR, 'extraction.data')
    file_data = genfromtxt(filename, delimiter=",")
    test_data = file_data[:, :-1]

    # the result is a loadable signature extraction dataset
    # 32 comes from 3 emails in emails/P folder, 11 lines checked to be
    # a signature, one email has only 10 lines
    eq_(test_data.shape[0], 32)
    eq_(len(features('')), test_data.shape[1])


text:
<!DOCTYPE html>

    <meta charset="UTF-8" />
    <title>React 实例</title>


text:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion

class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('branches', '0001_initial'),
        ('products', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Rel_Product_Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('availability', models.NullBooleanField()),
                ('id_branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='branches.Branch')),
                ('id_product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.Product')),
            ],
        ),
    ]


text:
{{ 'upload medium' | translate }}

<md-dialog-content>
  <form id="upload-medium-form">
    <md-input-container>
      <input mdInput placeholder="{{ 'title' | translate }}" [(ngModel)]="medium.title" name="title" required>
    </md-input-container>

    <md-input-container>
      <textarea
        mdInput
        mdTextareaAutosize
        #autosize="mdTextareaAutosize"
        placeholder="{{ 'description' | translate }}"
        [(ngModel)]="medium.description"
        name="desc"></textarea>
    </md-input-container>

      <md-select placeholder="{{ 'type' | translate }}" [(ngModel)]="medium.type" name="type" (ngModelChange)="setAcceptedTypes()">
        <md-option *ngFor="let type of types" [value]="type">{{ type | translate }}</md-option>
      </md-select>

      <input type="file" [accept]="acceptedTypes" (change)="fileSet($event)">

  </form>
</md-dialog-content>

<md-dialog-actions align="end">
  <button md-raised-button md-dialog-close>
    {{ 'cancel' | translate }}
    <md-icon>cancel</md-icon>
  </button>
  <button md-raised-button color="primary" (click)="dialogRef.close({media: medium, file: file})" [disabled]="!medium.isValid() && !file">
    {{ 'save' | translate }}
    <md-icon>save</md-icon>
  </button>
</md-dialog-actions>


text:
"""

There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it completes its moves.
The move sequence is represented by a string, and the character moves[i] represents its ith move. Valid moves are R (right), L (left), U (up), and D (down). If the robot returns to the origin after it finishes all of its moves, return true. Otherwise, return false.
Note: The way that the robot is "facing" is irrelevant. "R" will always make the robot move to the right once, "L" will always make it move left, etc. Also, assume that the magnitude of the robot's movement is the same for each move.

Example 1:

Input: moves = "UD"
Output: true
Explanation: The robot moves up once, and then down once. All moves have the same magnitude, so it ended up at the origin where it started. Therefore, we return true.

Example 2:

Input: moves = "LL"
Output: false
Explanation: The robot moves left twice. It ends up two "moves" to the left of the origin. We return false because it is not at the origin at the end of its moves.

Example 3:

Input: moves = "RRDD"
Output: false

Example 4:

Input: moves = "LDRRLRUULR"
Output: false

Constraints:

1 <= moves.length <= 2 * 104
moves only contains the characters 'U', 'D', 'L' and 'R'.

"""

class Solution(object):
    def judgeCircle(self, moves):
        """
        :type moves: str
        :rtype: bool
        """
        x, y = 0, 0
        for move in moves:
            if move == 'U':
                y += 1
            elif move == 'D':
                y -= 1
            elif move == 'L':
                x += 1
            else:
                x -= 1
        return ((x == 0) and (y == 0))


text:
/* $Header: term.h,v 1.2 92/04/13 13:16:12 philip Exp $ */

/* All terminal and terminal dependent stuff */

# ifndef _TERM_
# define PUBLIC extern
# else
# define PUBLIC
# endif

# if USG_TTY
# include <termio.h>
# elif POSIX_TTY
# include <termios.h>
# else
# include <sgtty.h>
# endif

#include <sys/types.h>
#include <signal.h>
#include <sys/ioctl.h>

/* Terminal setting */

PUBLIC int expandtabs;		/* Tabs need expanding? */
PUBLIC int stupid;		/* Stupid terminal */
PUBLIC int hardcopy;		/* Hardcopy terminal */

/* termcap stuff */
PUBLIC
char	*CE,			/* clear to end of line */
	*CL,			/* clear screen */
	*SO,			/* stand out */
	*SE,			/* stand end */
	*US,			/* underline start */
	*UE,			/* underline end */
	*UC,			/* underline character */
	*MD,			/* bold start */
	*ME,			/* attributes (like bold) off */
	*TI,			/* initialize for CM */
	*TE,			/* End of CM */
	*CM,			/* Cursor addressing */
	*TA,			/* Tab */
	*SR,			/* Scroll reverse */
	*AL;			/* insert line */
PUBLIC
int	LINES,			/* # of lines on screen */
	COLS,			/* # of colums */
	AM,			/* Automatic margins */
	XN,			/* newline ignored after wrap */
	DB;			/* terminal retains lines below */
PUBLIC
char	HO[20],			/* Sequence to get to home position */
	BO[20];			/* sequence to get to lower left hand corner */
PUBLIC
int	erasech,		/* users erase character */
	killch;			/* users kill character */
PUBLIC struct state *sppat;	/* Special patterns to be recognized */
PUBLIC char
	*BC;			/* Back space */

#define backspace()	putline(BC)
#define clrscreen()	tputs(CL,LINES,fputch)
#define clrtoeol()	tputs(CE,1,fputch)
#define scrollreverse()	tputs(SR,LINES,fputch)
#ifdef VT100_PATCH
#define insert_line(l)	ins_line(l)
#define standout()	tputs(SO,1,fputch)
#define standend()	tputs(SE,1,fputch)
#define underline()	tputs(US,1,fputch)
#define end_underline() tputs(UE,1,fputch)
#define bold()		tputs(MD,1,fputch)
#define end_bold()	tputs(ME,1,fputch)
#define underchar()	tputs(UC,1,fputch)
# else
#define insert_line()	tputs(AL,LINES,fputch)
#define standout()	putline(SO)
#define standend()	putline(SE)
#define underline()	putline(US)
#define end_underline() putline(UE)
#define bold()		putline(MD)
#define end_bold()	putline(ME)
#define underchar()	putline(UC)
# endif
#define givetab()	tputs(TA,1,fputch)

VOID	inittty();
/*
 * void inittty()
 *
 * Initialises the terminal (sets it in cbreak mode, etc)
 */

VOID	resettty();
/*
 * void resettty()
 *
 * resets the terminal to the mode in which it was before yap was invoked
 */

VOID	ini_terminal();
/*
 * void ini_terminal()
 *
 * Handles the termcap entry for your terminal. In some cases, the terminal
 * will be considered stupid.
 */

VOID	mgoto();
/*
 * void mgoto(n)
 * int n;		Line to go to
 *
 * Put the cursor at the start of the n'th screen line.
 * This can be done in several ways (of course).
 */

VOID	clrbline();
/*
 * void clrbline()
 *
 * clears the bottom line, by either clearing it to end of line,
 * or pushing it of the screen by inserting a line before it.
 */

VOID	home();
VOID	bottom();
/*
 * Obvious
 */

#ifdef WINDOW
int	window();
#endif
# undef PUBLIC


text:
"""Dedicates a Public IP range to an account"""
from baseCmd import *
from baseResponse import *

class dedicatePublicIpRangeCmd (baseCmd):
    typeInfo = {}

    def __init__(self):
        self.isAsync = "false"
        """the id of the VLAN IP range"""
        """Required"""
        self.id = None
        self.typeInfo['id'] = 'uuid'
        """domain ID of the account owning a VLAN"""
        """Required"""
        self.domainid = None
        self.typeInfo['domainid'] = 'uuid'
        """account who will own the VLAN"""
        self.account = None
        self.typeInfo['account'] = 'string'
        """project who will own the VLAN"""
        self.projectid = None
        self.typeInfo['projectid'] = 'uuid'
        self.required = ["id", "domainid", ]

class dedicatePublicIpRangeResponse (baseResponse):
    typeInfo = {}

    def __init__(self):
        """the ID of the VLAN IP range"""
        self.id = None
        self.typeInfo['id'] = 'string'
        """the account of the VLAN IP range"""
        self.account = None
        self.typeInfo['account'] = 'string'
        """the description of the VLAN IP range"""
        self.description = None
        self.typeInfo['description'] = 'string'
        """the domain name of the VLAN IP range"""
        self.domain = None
        self.typeInfo['domain'] = 'string'
        """the domain ID of the VLAN IP range"""
        self.domainid = None
        self.typeInfo['domainid'] = 'string'
        """the end ip of the VLAN IP range"""
        self.endip = None
        self.typeInfo['endip'] = 'string'
        """the end ipv6 of the VLAN IP range"""
        self.endipv6 = None
        self.typeInfo['endipv6'] = 'string'
        """the virtual network for the VLAN IP range"""
        self.forvirtualnetwork = None
        self.typeInfo['forvirtualnetwork'] = 'boolean'
        """the gateway of the VLAN IP range"""
        self.gateway = None
        self.typeInfo['gateway'] = 'string'
        """the cidr of IPv6 network"""
        self.ip6cidr = None
        self.typeInfo['ip6cidr'] = 'string'
        """the gateway of IPv6 network"""
        self.ip6gateway = None
        self.typeInfo['ip6gateway'] = 'string'
        """the netmask of the VLAN IP range"""
        self.netmask = None
        self.typeInfo['netmask'] = 'string'
        """the network id of vlan range"""
        self.networkid = None
        self.typeInfo['networkid'] = 'string'
        """the physical network this belongs to"""
        self.physicalnetworkid = None
        self.typeInfo['physicalnetworkid'] = 'string'
        """the Pod ID for the VLAN IP range"""
        self.podid = None
        self.typeInfo['podid'] = 'string'
        """the Pod name for the VLAN IP range"""
        self.podname = None
        self.typeInfo['podname'] = 'string'
        """the project name of the vlan range"""
        self.project = None
        self.typeInfo['project'] = 'string'
        """the project id of the vlan range"""
        self.projectid = None
        self.typeInfo['projectid'] = 'string'
        """the start ip of the VLAN IP range"""
        self.startip = None
        self.typeInfo['startip'] = 'string'
        """the start ipv6 of the VLAN IP range"""
        self.startipv6 = None
        self.typeInfo['startipv6'] = 'string'
        """the ID or VID of the VLAN."""
        self.vlan = None
        self.typeInfo['vlan'] = 'string'
        """the Zone ID of the VLAN IP range"""
        self.zoneid = None
        self.typeInfo['zoneid'] = 'string'


text:
(function() {
  'use strict';
  describe('Controller: AboutCtrl', function() {
    var AboutCtrl, scope;
    beforeEach(module('jpeopleApp'));
    AboutCtrl = {};
    scope = {};
    beforeEach(inject(function($controller, $rootScope) {
      scope = $rootScope.$new();
      return AboutCtrl = $controller('AboutCtrl', {
        $scope: scope
      });
    }));
    return it('should attach a list of awesomeThings to the scope', function() {
      return expect(scope.awesomeThings.length).toBe(3);
    });
  });

}).call(this);


text:
package org.jtwig.value.convert;

import java.util.Collection;

public class CompositeConverter<T> implements Converter<T> {
    private final Collection<Converter<T>> converters;

    public CompositeConverter(Collection<Converter<T>> converters) {
        this.converters = converters;
    }

    @Override
    public Result<T> convert(Object value) {
        for (Converter<T> converter : converters) {
            Result<T> convert = converter.convert(value);
            if (convert.isDefined()) return convert;
        }
        return Result.undefined();
    }
}


text:
package org.eknet.gitr

import org.eclipse.jgit.api.ResetCommand
import grizzled.slf4j.Logging

/**
 * @author Eike Kettner eike.kettner@gmail.com
 * @since 10.05.12 00:59
 */
case class Tandem(name: RepositoryName, bare: GitrRepository, workTree: GitrRepository) extends Logging {

  def updateWorkTree() = {
    synchronized {
      setupRemoteUrl()
      workTree.git.fetch().call()
      workTree.git.reset().setMode(ResetCommand.ResetType.HARD).setRef("origin/"+branch).call()
    }
  }

  def pushToBare() = synchronized {
    setupRemoteUrl()
    workTree.git.push().call()
  }

  def branch = workTree.getBranch

  private[this] def setupRemoteUrl() {
    val remoteUrl = workTree.getConfig.getString("remote", "origin", "url")
    val expected = bare.getDirectory.toURI.toString
    if (remoteUrl != expected) {
      info("Tandem repositories moved. Update remote url ...")
      workTree.getConfig.setString("remote", "origin", "url", expected)
      workTree.getConfig.save()
    }
  }

}

object Tandem {

  implicit def tandemToRepo(tandem: Tandem): GitrRepository = tandem.bare
}


text:
@class LACamliFile, LACamliClient;

@interface LACamliUploadOperation : NSOperation <NSURLSessionDelegate>

@property LACamliClient* client;
@property LACamliFile* file;
@property NSURLSession* session;
@property UIBackgroundTaskIdentifier taskID;

@property(readonly) BOOL failedTransfer;
@property(readonly) BOOL isExecuting;
@property(readonly) BOOL isFinished;

- (id)initWithFile:(LACamliFile*)file andClient:(LACamliClient*)client;
- (BOOL)isConcurrent;

- (NSString*)name;

@end


text:
namespace SDKTemplate
{
    value struct Scenario;

    partial ref class MainPage
    {
    internal:
        static property Platform::String^ FEATURE_NAME
        {
            Platform::String^ get()
            {
                return "DirectWrite Text Layout Line Spacing Modes";
            }
        }

        static property Platform::Array<Scenario>^ scenarios
        {
            Platform::Array<Scenario>^ get()
            {
                return scenariosInner;
            }
        }

    private:
        static Platform::Array<Scenario>^ scenariosInner;
    };

    public value struct Scenario
    {
        Platform::String^ Title;
        Platform::String^ ClassName;
    };
}


text:
A simple Python script to convert a list of publications in [Endnote XML](https://gist.github.com/low-decarie/3831049) format into HTML or LaTeX formats. I use [BibDesk](http://bibdesk.sourceforge.net/) to manage my publication list, and it supports Endnote XML format as an output format.

The HTML output generated by this script employs some custom [CSS](http://blog.rguha.net/wp-content/themes/hellish-simplicity/custom-css/style-1109.css) ([example](http://blog.rguha.net/?page_id=1109)). The LaTeX generates output that assumes you're using the publication list in a CV built using the [CuRve](https://www.ctan.org/pkg/curve) package. See the _Publications_ section in my [CV](http://www.rguha.net/cv.pdf).

Example usage is
```
./genpubs.py -t html -o pubs.html pubs.xml
```
Use the `-h` argument to see all available options.


text:
<?php

namespace Devtronic\CmsBundle\Repository;

/**
 * MenuItemRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class MenuItemRepository extends \Doctrine\ORM\EntityRepository
{
}


text:
using System;
using Xunit;

namespace HelloXUnit
{
	public class XUnitTests
	{
		[Fact]
		public void PassingTest()
		{
			Assert.True (true);
		}

		[Fact]
		public void FailingTest()
		{
			Assert.True (false);
		}
	}
}


text:
package geetest

import (
	"context"
	"crypto/tls"
	"go-common/app/interface/main/creative/conf"
	"go-common/app/interface/main/creative/model/geetest"
	"go-common/library/ecode"
	"go-common/library/log"
	httpx "go-common/library/net/http/blademaster"
	"io/ioutil"
	"net"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"time"
)

const (
	_register = "/register.php"
	_validate = "/validate.php"
)

// Dao is account dao.
type Dao struct {
	c *conf.Config
	// url
	registerURI string
	validateURI string
	// http client
	client  *http.Client
	clientx *httpx.Client
}

// New new a dao.
func New(c *conf.Config) (d *Dao) {
	d = &Dao{
		c:           c,
		registerURI: c.Host.Geetest + _register,
		validateURI: c.Host.Geetest + _validate,
		// http client
		client:  NewClient(c.HTTPClient),
		clientx: httpx.NewClient(c.HTTPClient.Slow),
	}
	return
}

// PreProcess preprocessing the geetest and get to challenge
func (d *Dao) PreProcess(c context.Context, mid int64, ip, clientType string, newCaptcha int) (challenge string, err error) {
	var (
		req    *http.Request
		res    *http.Response
		bs     []byte
		params url.Values
	)
	params = url.Values{}
	params.Set("user_id", strconv.FormatInt(mid, 10))
	params.Set("new_captcha", strconv.Itoa(newCaptcha))
	params.Set("client_type", clientType)
	params.Set("ip_address", ip)
	params.Set("gt", d.c.Geetest.CaptchaID)
	if req, err = http.NewRequest("GET", d.registerURI+"?"+params.Encode(), nil); err != nil {
		log.Error("d.preprocess uri(%s) params(%s) error(%v)", d.registerURI, params.Encode(), err)
		err = ecode.CreativeGeetestAPIErr
		return
	}
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	if res, err = d.client.Do(req); err != nil {
		log.Error("client.Do(%s) error(%v)", d.registerURI+"?"+params.Encode(), err)
		err = ecode.CreativeGeetestAPIErr
		return
	}
	defer res.Body.Close()
	if res.StatusCode >= http.StatusInternalServerError {
		log.Error("gtServerErr uri(%s) error(%v)", d.registerURI+"?"+params.Encode(), err)
		err = ecode.CreativeGeetestAPIErr
		return
	}
	if bs, err = ioutil.ReadAll(res.Body); err != nil {
		log.Error("ioutil.ReadAll(%s) uri(%s) error(%v)", bs, d.registerURI+"?"+params.Encode(), err)
		return
	}
	if len(bs) != 32 {
		log.Error("d.preprocess len(%s) the length not equate 32byte", string(bs))
		return
	}
	challenge = string(bs)
	return
}

// Validate recheck the challenge code and get to seccode
func (d *Dao) Validate(c context.Context, challenge, seccode, clientType, ip, captchaID string, mid int64) (res *geetest.ValidateRes, err error) {
	params := url.Values{}
	params.Set("seccode", seccode)
	params.Set("challenge", challenge)
	params.Set("captchaid", captchaID)
	params.Set("client_type", clientType)
	params.Set("ip_address", ip)
	params.Set("json_format", "1")
	params.Set("sdk", "golang_3.0.0")
	params.Set("user_id", strconv.FormatInt(mid, 10))
	params.Set("timestamp", strconv.FormatInt(time.Now().Unix(), 10))
	req, err := http.NewRequest("POST", d.validateURI, strings.NewReader(params.Encode()))
	if err != nil {
		log.Error("http.NewRequest error(%v) | uri(%s) params(%s)", err, d.validateURI, params.Encode())
		err = ecode.CreativeGeetestAPIErr
		return
	}
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	if err = d.clientx.Do(c, req, &res); err != nil {
		log.Error("d.client.Do error(%v)", err)
		err = ecode.CreativeGeetestAPIErr
		return
	}
	return
}

// NewClient new a http client.
func NewClient(c *conf.HTTPClient) (client *http.Client) {
	var (
		transport *http.Transport
		dialer    *net.Dialer
	)
	dialer = &net.Dialer{
		Timeout:   time.Duration(c.Slow.Timeout),
		KeepAlive: time.Duration(c.Slow.KeepAlive),
	}
	transport = &http.Transport{
		DialContext:     dialer.DialContext,
		TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	}
	client = &http.Client{
		Transport: transport,
	}
	return
}


text:
<?php
if (!defined('ACTIVE')) die(__FILE__);

$c = new TFileFormer('.');
$screen[] = $c->transform('login.html');
$CONTENT = $screen;
$TEMPLATE = 'center.html';

?>


text:
GHCJS CommonJS argument passing example.

## Building
Running:
```
npm install
```
Will install dependencies. To build you can run:
```
npm run build
```

## Running
The generated code should be executable in **Node.js** and the **Browser**.


text:
def hello
  "Hello"
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">

<TITLE>
Xerces2 Implementation: Class  RangeImpl
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Serialized
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

org.apache.xerces.dom

Class  RangeImpl

java.lang.Object
  |
  +--org.apache.xerces.dom.RangeImpl

All Implemented Interfaces:
org.w3c.dom.ranges.Range

public class RangeImpl
extends java.lang.Object
implements org.w3c.dom.ranges.Range

The RangeImpl class implements the org.w3c.dom.range.Range interface.

 Please see the API documentation for the interface classes
  and use the interfaces in your client programs.

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

Version:
$Id: RangeImpl.java 515302 2007-03-06 21:07:10Z mrglavas $

Fields inherited from interface org.w3c.dom.ranges.Range

END_TO_END, END_TO_START, START_TO_END, START_TO_START

Constructor Summary

RangeImpl(DocumentImpl document)

          The constructor.

Method Summary

 org.w3c.dom.DocumentFragment
cloneContents()

          Duplicates the contents of a Range

 org.w3c.dom.ranges.Range
cloneRange()

          Produces a new Range whose boundary-points are equal to the
 boundary-points of the Range.

 void
collapse(boolean toStart)

          Collapse a Range onto one of its boundary-points

 short
compareBoundaryPoints(short how,
                      org.w3c.dom.ranges.Range sourceRange)

          Compare the boundary-points of two Ranges in a document.

 void
deleteContents()

          Removes the contents of a Range from the containing document or
 document fragment without returning a reference to the removed
 content.

 void
detach()

          Called to indicate that the Range is no longer in use and that the
 implementation may relinquish any resources associated with this
 Range.

 org.w3c.dom.DocumentFragment
extractContents()

          Moves the contents of a Range from the containing document or document
 fragment to a new DocumentFragment.

 boolean
getCollapsed()

          TRUE if the Range is collapsed

 org.w3c.dom.Node
getCommonAncestorContainer()

          The deepest common ancestor container of the Range's two
 boundary-points.

 org.w3c.dom.Node
getEndContainer()

          Node within which the Range ends

 int
getEndOffset()

          Offset within the ending node of the Range.

 org.w3c.dom.Node
getStartContainer()

          Node within which the Range begins

 int
getStartOffset()

          Offset within the starting node of the Range.

 void
insertedNodeFromDOM(org.w3c.dom.Node node)

          This function is called from the DOM.

 void
insertNode(org.w3c.dom.Node newNode)

          Inserts a node into the Document or DocumentFragment at the start of
 the Range.

 void
selectNode(org.w3c.dom.Node refNode)

          Select a node and its contents

 void
selectNodeContents(org.w3c.dom.Node refNode)

          Select the contents within a node

 void
setEnd(org.w3c.dom.Node refNode,
       int offset)

          Sets the attributes describing the end of a Range.

 void
setEndAfter(org.w3c.dom.Node refNode)

          Sets the end of a Range to be after a node

 void
setEndBefore(org.w3c.dom.Node refNode)

          Sets the end position to be before a node.

 void
setStart(org.w3c.dom.Node refNode,
         int offset)

          Sets the attributes describing the start of the Range.

 void
setStartAfter(org.w3c.dom.Node refNode)

          Sets the start position to be after a node

 void
setStartBefore(org.w3c.dom.Node refNode)

          Sets the start position to be before a node

 void
surroundContents(org.w3c.dom.Node newParent)

          Reparents the contents of the Range to the given node and inserts the
 node at the position of the start of the Range.

 java.lang.String
toString()

          Returns the contents of a Range as a string.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RangeImpl

public RangeImpl(DocumentImpl document)

The constructor. Clients must use DocumentRange.createRange(),
  because it registers the Range with the document, so it can
  be fixed-up.

Method Detail

getStartContainer

public org.w3c.dom.Node getStartContainer()

Description copied from interface: org.w3c.dom.ranges.Range

Node within which the Range begins

Specified by:
getStartContainer in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

getStartOffset

public int getStartOffset()

Description copied from interface: org.w3c.dom.ranges.Range

Offset within the starting node of the Range.

Specified by:
getStartOffset in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

getEndContainer

public org.w3c.dom.Node getEndContainer()

Description copied from interface: org.w3c.dom.ranges.Range

Node within which the Range ends

Specified by:
getEndContainer in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

getEndOffset

public int getEndOffset()

Description copied from interface: org.w3c.dom.ranges.Range

Offset within the ending node of the Range.

Specified by:
getEndOffset in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

getCollapsed

public boolean getCollapsed()

Description copied from interface: org.w3c.dom.ranges.Range

TRUE if the Range is collapsed

Specified by:
getCollapsed in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

getCommonAncestorContainer

public org.w3c.dom.Node getCommonAncestorContainer()

Description copied from interface: org.w3c.dom.ranges.Range

The deepest common ancestor container of the Range's two
 boundary-points.

Specified by:
getCommonAncestorContainer in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

setStart

public void setStart(org.w3c.dom.Node refNode,
                     int offset)
              throws org.w3c.dom.ranges.RangeException,
                     org.w3c.dom.DOMException

Description copied from interface: org.w3c.dom.ranges.Range

Sets the attributes describing the start of the Range.

Specified by:
setStart in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - The refNode value. This parameter must be
   different from null.
offset - The startOffset value.
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if refNode or an ancestor
   of refNode is an Entity, Notation, or DocumentType
   node.
org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if offset is negative or greater
   than the number of child units in refNode. Child units
   are 16-bit units if refNode is a type of CharacterData
   node (e.g., a Text or Comment node) or a ProcessingInstruction
   node. Child units are Nodes in all other cases.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

setEnd

public void setEnd(org.w3c.dom.Node refNode,
                   int offset)
            throws org.w3c.dom.ranges.RangeException,
                   org.w3c.dom.DOMException

Description copied from interface: org.w3c.dom.ranges.Range

Sets the attributes describing the end of a Range.

Specified by:
setEnd in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - The refNode value. This parameter must be
   different from null.
offset - The endOffset value.
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if refNode or an ancestor
   of refNode is an Entity, Notation, or DocumentType
   node.
org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if offset is negative or greater
   than the number of child units in refNode. Child units
   are 16-bit units if refNode is a type of CharacterData
   node (e.g., a Text or Comment node) or a ProcessingInstruction
   node. Child units are Nodes in all other cases.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

setStartBefore

public void setStartBefore(org.w3c.dom.Node refNode)
                    throws org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Sets the start position to be before a node

Specified by:
setStartBefore in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - Range starts before refNode
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if the root container of
   refNode is not an Attr, Document, or DocumentFragment
   node or if refNode is a Document, DocumentFragment,
   Attr, Entity, or Notation node.
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

setStartAfter

public void setStartAfter(org.w3c.dom.Node refNode)
                   throws org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Sets the start position to be after a node

Specified by:
setStartAfter in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - Range starts after refNode
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if the root container of
   refNode is not an Attr, Document, or DocumentFragment
   node or if refNode is a Document, DocumentFragment,
   Attr, Entity, or Notation node.
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

setEndBefore

public void setEndBefore(org.w3c.dom.Node refNode)
                  throws org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Sets the end position to be before a node.

Specified by:
setEndBefore in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - Range ends before refNode
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if the root container of
   refNode is not an Attr, Document, or DocumentFragment
   node or if refNode is a Document, DocumentFragment,
   Attr, Entity, or Notation node.
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

setEndAfter

public void setEndAfter(org.w3c.dom.Node refNode)
                 throws org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Sets the end of a Range to be after a node

Specified by:
setEndAfter in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - Range ends after refNode.
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if the root container of
   refNode is not an Attr, Document or DocumentFragment
   node or if refNode is a Document, DocumentFragment,
   Attr, Entity, or Notation node.
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

collapse

public void collapse(boolean toStart)

Description copied from interface: org.w3c.dom.ranges.Range

Collapse a Range onto one of its boundary-points

Specified by:
collapse in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
toStart - If TRUE, collapses the Range onto its start; if FALSE,
   collapses it onto its end.
Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

selectNode

public void selectNode(org.w3c.dom.Node refNode)
                throws org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Select a node and its contents

Specified by:
selectNode in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - The node to select.
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if an ancestor of refNode
   is an Entity, Notation or DocumentType node or if
   refNode is a Document, DocumentFragment, Attr, Entity,
   or Notation node.
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

selectNodeContents

public void selectNodeContents(org.w3c.dom.Node refNode)
                        throws org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Select the contents within a node

Specified by:
selectNodeContents in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
refNode - Node to select from
Throws:
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if refNode or an ancestor
   of refNode is an Entity, Notation or DocumentType node.
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

WRONG_DOCUMENT_ERR: Raised if refNode was created
   from a different document than the one that created this range.

compareBoundaryPoints

public short compareBoundaryPoints(short how,
                                   org.w3c.dom.ranges.Range sourceRange)
                            throws org.w3c.dom.DOMException

Description copied from interface: org.w3c.dom.ranges.Range

Compare the boundary-points of two Ranges in a document.

Specified by:
compareBoundaryPoints in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
how - A code representing the type of comparison, as defined
   above.
sourceRange - The Range on which this current
   Range is compared to.
Returns:
-1, 0 or 1 depending on whether the corresponding
   boundary-point of the Range is respectively before, equal to, or
   after the corresponding boundary-point of sourceRange.
Throws:
org.w3c.dom.DOMException - WRONG_DOCUMENT_ERR: Raised if the two Ranges are not in the same
   Document or DocumentFragment.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.

deleteContents

public void deleteContents()
                    throws org.w3c.dom.DOMException

Description copied from interface: org.w3c.dom.ranges.Range

Removes the contents of a Range from the containing document or
 document fragment without returning a reference to the removed
 content.

Specified by:
deleteContents in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if any portion of the content of
   the Range is read-only or any of the nodes that contain any of the
   content of the Range are read-only.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.

extractContents

public org.w3c.dom.DocumentFragment extractContents()
                                             throws org.w3c.dom.DOMException

Description copied from interface: org.w3c.dom.ranges.Range

Moves the contents of a Range from the containing document or document
 fragment to a new DocumentFragment.

Specified by:
extractContents in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Returns:
A DocumentFragment containing the extracted contents.
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if any portion of the content of
   the Range is read-only or any of the nodes which contain any of the
   content of the Range are read-only.

HIERARCHY_REQUEST_ERR: Raised if a DocumentType node would be
   extracted into the new DocumentFragment.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.

cloneContents

public org.w3c.dom.DocumentFragment cloneContents()
                                           throws org.w3c.dom.DOMException

Description copied from interface: org.w3c.dom.ranges.Range

Duplicates the contents of a Range

Specified by:
cloneContents in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Returns:
A DocumentFragment that contains content equivalent to this
   Range.
Throws:
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if a DocumentType node would be
   extracted into the new DocumentFragment.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.

insertNode

public void insertNode(org.w3c.dom.Node newNode)
                throws org.w3c.dom.DOMException,
                       org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Inserts a node into the Document or DocumentFragment at the start of
 the Range. If the container is a Text node, this will be split at the
 start of the Range (as if the Text node's splitText method was
 performed at the insertion point) and the insertion will occur
 between the two resulting Text nodes. Adjacent Text nodes will not be
 automatically merged. If the node to be inserted is a
 DocumentFragment node, the children will be inserted rather than the
 DocumentFragment node itself.

Specified by:
insertNode in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
newNode - The node to insert at the start of the Range
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of the
   start of the Range is read-only.

WRONG_DOCUMENT_ERR: Raised if newNode and the
   container of the start of the Range were not created from the same
   document.

HIERARCHY_REQUEST_ERR: Raised if the container of the start of
   the Range is of a type that does not allow children of the type of
   newNode or if newNode is an ancestor of
   the container.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.
org.w3c.dom.ranges.RangeException - INVALID_NODE_TYPE_ERR: Raised if newNode is an Attr,
   Entity, Notation, or Document node.

surroundContents

public void surroundContents(org.w3c.dom.Node newParent)
                      throws org.w3c.dom.DOMException,
                             org.w3c.dom.ranges.RangeException

Description copied from interface: org.w3c.dom.ranges.Range

Reparents the contents of the Range to the given node and inserts the
 node at the position of the start of the Range.

Specified by:
surroundContents in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Parameters:
newParent - The node to surround the contents with.
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of
   either boundary-point of the Range is read-only.

WRONG_DOCUMENT_ERR: Raised if  newParent and the
   container of the start of the Range were not created from the same
   document.

HIERARCHY_REQUEST_ERR: Raised if the container of the start of
   the Range is of a type that does not allow children of the type of
   newParent or if newParent is an ancestor
   of the container or if node would end up with a child
   node of a type not allowed by the type of node.

INVALID_STATE_ERR: Raised if detach() has already
   been invoked on this object.
org.w3c.dom.ranges.RangeException - BAD_BOUNDARYPOINTS_ERR: Raised if the Range partially selects a
   non-text node.

INVALID_NODE_TYPE_ERR: Raised if  node is an Attr,
   Entity, DocumentType, Notation, Document, or DocumentFragment node.

cloneRange

public org.w3c.dom.ranges.Range cloneRange()

Description copied from interface: org.w3c.dom.ranges.Range

Produces a new Range whose boundary-points are equal to the
 boundary-points of the Range.

Specified by:
cloneRange in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Returns:
The duplicated Range.
Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

toString

public java.lang.String toString()

Description copied from interface: org.w3c.dom.ranges.Range

Returns the contents of a Range as a string. This string contains only
 the data characters, not any markup.

Specified by:
toString in interface org.w3c.dom.ranges.Range
Overrides:
toString in class java.lang.Object

Following copied from interface: org.w3c.dom.ranges.Range

Returns:
The contents of the Range.
Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

detach

public void detach()

Description copied from interface: org.w3c.dom.ranges.Range

Called to indicate that the Range is no longer in use and that the
 implementation may relinquish any resources associated with this
 Range. Subsequent calls to any methods or attribute getters on this
 Range will result in a DOMException being thrown with an
 error code of INVALID_STATE_ERR.

Specified by:
detach in interface org.w3c.dom.ranges.Range

Following copied from interface: org.w3c.dom.ranges.Range

Throws:
org.w3c.dom.DOMException - INVALID_STATE_ERR: Raised if detach() has already been
   invoked on this object.

insertedNodeFromDOM

public void insertedNodeFromDOM(org.w3c.dom.Node node)

This function is called from the DOM.
  This node has already been inserted into the DOM.
  Fix-up any offsets.

      Overview
      Package
    Class
      Tree
      Serialized
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.


text:
package group_chats.server;

import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;

/**
 * Service that runs in the background to removal groups of zero after 30 seconds.
 */
public class GroupRemovalService {
  private ScheduledExecutorService executor;
  private Map<Long, LocalGroup> allGroups;
  private ScheduledFuture future;
  private final long duration;
  private final TimeUnit durationUnit;

  /**
   * Create service with executor to submit removal tasks and iterator tasks of finding
   * groups to remove.
   *
   * @param executor     Executor to run scheduled tasks
   * @param allGroups    Same map of all groups which will be used to iterate over and remove
   *                     groups
   * @param duration     duration to check for empty groups
   * @param durationUnit unit of duration
   */
  public GroupRemovalService(ScheduledExecutorService executor, Map<Long, LocalGroup> allGroups,
                             long duration, TimeUnit durationUnit) {
    this.executor = executor;
    this.allGroups = allGroups;
    this.duration = duration;
    this.durationUnit = durationUnit;
  }

  /**
   * Start background service to purge old groups.
   */
  public synchronized void start() {
    future = executor.scheduleAtFixedRate(() -> {
      Iterator<LocalGroup> groupIterator = allGroups.values().iterator();
      while (groupIterator.hasNext()) {
        LocalGroup group = groupIterator.next();
        long curTime = System.currentTimeMillis();
        int activeUsers = group.getActiveUsers();
        // Remove group if last time was over 30 seconds
        if (activeUsers == 0 && curTime - group.getLastCheckTime() >= durationUnit.toMillis(duration)) {
          // Close and remove from collections
          group.close();
          groupIterator.remove();
        } else {
          group.setLastCheckTime(curTime);
        }
      }
    }, duration, duration, durationUnit);
  }

  /**
   * Cancel running tasks.
   */
  public synchronized void stop() {
    future.cancel(false);
  }

}


text:
package dom

import (
	"io"

	xml "github.com/andaru/flexml"
	"github.com/pkg/errors"
)

// Marshaler is able to emit Node as XML or JSON output.
//
// The type implements the XML and JSON standard marshaler interfaces:
//   (encoding/xml).Marshaler
//   (encoding/json).Marshaler
//
// Specific XML and JSON io.WriterTo encoders are provided by functions:
//   XMLWriter() io.WriterTo
//   JSONWriter() io.WriterTo
type Marshaler struct {
	Node

	opts           bitflag
	emitExplicitNS bool
}

const (
	marshalExplicitNS bitflag = 1 << iota
)

// NewMarshaler returns a marshaler for node, configured with options provided.
func NewMarshaler(node Node, opts ...MarshalerOption) *Marshaler {
	e := &Marshaler{Node: node}
	for _, opt := range opts {
		opt(e)
	}
	return e
}

// MarshalerOption is a constructor option for a Node marshaler.
type MarshalerOption func(*Marshaler)

// WithExplicitNS is a marshaler option which causes the XML namespace to be
// emitted with every element, even if the namespace matches the parent element
// namespace.
func WithExplicitNS() MarshalerOption { return func(e *Marshaler) { e.opts.Add(marshalExplicitNS) } }

// XMLWriter returns an XML io.WriterTo for the Node
func (m *Marshaler) XMLWriter() io.WriterTo { return writerXML{m} }

// MarshalXML encodes .Node to the XML encoder.
func (m *Marshaler) MarshalXML(enc *xml.Encoder, se xml.StartElement) error {
	if err := treeOrder(m, enc); err != nil {
		return err
	}
	return enc.Flush()
}

type writerXML struct{ *Marshaler }

func (wx writerXML) WriteTo(w io.Writer) (n int64, err error) {
	cw := &countWriter{w, 0}
	enc := xml.NewEncoder(cw)
	err = treeOrder(wx.Marshaler, enc)
	err2 := enc.Flush()
	if err == nil {
		err = err2
	}
	return cw.n, err
}

type countWriter struct {
	io.Writer
	n int64
}

func (w *countWriter) Write(b []byte) (n int, err error) {
	n, err = w.Writer.Write(b)
	w.n += int64(n)
	return
}

var xmlnsDefault = xml.Name{Local: "xmlns"}

type encoderStack struct {
	d []func() (*node, error)
}

func (s *encoderStack) len() int { return len(s.d) }
func (s *encoderStack) push(fn func() (*node, error)) {
	s.d = append(s.d, fn)
}
func (s *encoderStack) pop() (fn func() (*node, error)) {
	fn, s.d = s.d[len(s.d)-1], s.d[:len(s.d)-1]
	return
}

func treeOrder(e *Marshaler, enc *xml.Encoder) error {
	s := &encoderStack{}
	s.push(encodeNodeValueStart(e, enc, e.Node.nodePtr()))
	for s.len() > 0 {
		n, err := s.pop()()
		if err != nil {
			return errors.WithStack(err)
		} else if n == nil {
			continue
		}
		s.push(encodeNodeValueEnd(e, enc, n))
		if n.firstChild == nil {
			continue
		}
		s.push(encodeNodeValueStart(e, enc, n.firstChild.prevSib))
		for it := n.firstChild.prevSib.prevSib; it.nextSib != nil; it = it.prevSib {
			s.push(encodeNodeValueStart(e, enc, it))
		}
	}
	return nil
}

func endElementForNode(n *node, explicitNS bool) xml.EndElement {
	name := n.xmlName()
	if n.parent != nil && !explicitNS && n.parent.xmlName().Space == name.Space {
		name.Space = ""
	}
	return xml.EndElement{Name: name}
}

func encodeNodeValueStart(e *Marshaler, enc *xml.Encoder, n *node) func() (*node, error) {
	return func() (*node, error) {
		var err error
		switch n.NodeType() {
		case NodeTypeElement:
			name := n.xmlName()
			if n.parent != nil && !e.opts.Has(marshalExplicitNS) && n.parent.xmlName().Space == name.Space {
				name.Space = ""
			}
			var attrs []xml.Attr
			for it := n.firstAttr; it != nil; it = it.nextSib {
				this := it.value.(*attribute).Attr
				if this.Name != xmlnsDefault {
					attrs = append(attrs, this)
				}
			}
			err = enc.EncodeToken(xml.StartElement{Name: name, Attr: attrs})
		case NodeTypeComment:
			err = enc.EncodeToken(xml.Comment(n.asComment().text.value))
		case NodeTypeText:
			err = enc.EncodeToken(n.asText().charData())
		case NodeTypeDeclaration:
			err = enc.EncodeToken(n.asDeclaration().declaration.ProcInst)
		case NodeTypeProcessingInstruction:
			err = enc.EncodeToken(n.asProcInst().procinst.ProcInst)
		case NodeTypeDocumentFragment, NodeTypeDocument:
			// these nodes have no value to encode
		default:
			err = errors.Errorf("MarshalXML called on unexpected node type %s", n.NodeType())
		}
		if err != nil {
			return n, errors.WithStack(err)
		}
		return n, nil
	}
}

func encodeNodeValueEnd(e *Marshaler, enc *xml.Encoder, n *node) func() (*node, error) {
	return func() (*node, error) {
		switch n.NodeType() {
		case NodeTypeElement:
			if err := enc.EncodeToken(endElementForNode(n, e.emitExplicitNS)); err != nil {
				return nil, errors.WithStack(err)
			}
		}
		return nil, nil
	}
}


text:
class Coinmux::DataStore
  include Singleton

  import 'java.io.IOException'
  import 'net.tomp2p.p2p.Peer'
  import 'net.tomp2p.p2p.PeerMaker'
  import 'net.tomp2p.peers.Number160'
  import 'java.util.Random'

  def startup
    @peer = PeerMaker.new(Number160.new(Random.new)).setPorts(14141).makeAndListen()
    @peer.getConfiguration().setBehindFirewall(true)
  end

  def shutdown
    @peer.shutdown if @peer
  end
end


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Gen. Amer. bor. 1:162. 1848

#### Original name
Vesicaria didymocarpa Hook.

### Remarks
null


text:
package com.fil.shauni.command.support;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.ResultSetExtractor;

/**
 *
 * @author Filippo Testino (filippo.testino@gmail.com)
 */
public interface Exportable extends Convertable, Displayable {
    default <T> T export(String obj, JdbcTemplate jdbc, ResultSetExtractor<T> rse) {
        return jdbc.query(obj, rse);
    }
}


text:
require 'spec_helper'

describe Esearch::Command::Index::Refresh, '.run' do
  subject { object.run(context) }

  let(:object)   { described_class  }

  let(:expected_request) do
    Esearch::Request.new(:post, '/foo/_refresh', {}, {})
  end

  expect_presenter(Esearch::Presenter::Index::Refresh)
end


text:
namespace gpopt
{
	//---------------------------------------------------------------------------
	//	@class:
	//		CBitmapTest
	//
	//	@doc:
	//		Unittests
	//
	//---------------------------------------------------------------------------
	class CBitmapTest
	{
		private:

			// counter used to mark last successful test
			static
			ULONG m_ulBitmapTestCounter;

		public:

			// unittests
			static
			GPOS_RESULT EresUnittest();

			static
			GPOS_RESULT EresUnittest_RunTests();

	}; // class CBitmapTest
}

#endif // !GPOPT_CBitmapTest_H

// EOF


text:
angular.module('RDash')
    .controller('LogCtrl', ['$scope', '$http', LogCtrl]);

function LogCtrl($scope, $http) {
	if(!$scope.checkAccess())
		return;

	$scope.logLines = "";
	$scope.setPageTitle("Live Log");
	$scope.subscribeTo("admin", "log");

	$scope.$on("log", function (event, arg) {
		$scope.logLines += arg + "\n";
	});

	$http.post(APIURL + '/getLogs', {sessionid: $scope.Self.SessionId})
	.success(function (data) {
		$scope.logLines = data;
	})
	.error(function (data, status) {
		$scope.parseError(data, status);
		$scope.addAlert("Can't get past log");
    });

    $scope.clearLog = function() {
        $scope.logLines = "";
    };
}


text:
    Le mot de passe utilisé pour s'authentifier avec le serveur proxy (si le serveur proxy nécessite une authentification).

    Documentation de configuration de Crowd


text:
<!--
* Copyright 2012 Research In Motion Limited.
*
* 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.
-->
<!doctype html>
<html>
  <head>

<script type="text/javascript" src="cordova.js"></script>
<link rel="stylesheet" type="text/css" href="assets/bbui.css"></link>
<script type="text/javascript" src="assets/bbui.js"></script>
<script type="text/javascript" src="assets/orientation.js"></script>
<script type="text/javascript">
  window.addEventListener('load', function(e) {
    document.addEventListener('deviceready', function(e) {
      bb.init({actionBarDark: true,
        controlsDark: true,
        listsDark: true,
        // Fires "before" styling is applied and "before" the screen is inserted in the DOM
        onscreenready: function(element, id) {
        },
        // Fires "after" styling is applied and "after" the screen is inserted in the DOM
        ondomready: function(element, id) {
            displayOrientation();
            displayLockStatus();
        }
      });
      blackberry.event.addEventListener("orientationchange", displayOrientation);
      bb.pushScreen('main.html', 'main');
    }, false);
  }, false);
</script>
</head>
<body>
</body>
</html>


text:
<?php
	require("vendor/autoload.php");
?><!doctype html>

        	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        	<meta http-equiv="content-language" content="fr"/>
        	<meta name="language" content="fr"/>
        	<meta name="viewport" content="width=device-width, initial-scale=1.0">
        	<title>Accueil :: SupTrainCommander</title>
			<link href='https://fonts.googleapis.com/css?family=Lato|Indie+Flower' rel='stylesheet' type='text/css'>
        	<link rel="stylesheet" type="text/css" href="vendor/zurb/foundation/dist/foundation.min.css">
        	<link rel="stylesheet" type="text/css" href="css/app.css"/>

					<?php require_once('require/header.block.php'); ?>

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fuga, quam.

Espace Membre

								<?php
									echo SupTrainCommander\Form::init("post", "", "");
									echo SupTrainCommander\Form::inputEmail("Votre email...", "inputEmail", "Votre email...", "", "required", "");
									echo SupTrainCommander\Form::inputPassword("Votre password...", "inputPassword", "Votre mot de passe...", "", "required", "");
									echo SupTrainCommander\Form::submit("inputSubmit", "login");
									echo SupTrainCommander\Form::reset("inputReset", "Cancel");
									echo SupTrainCommander\Form::close();
								?>

					<?php require_once('require/footer.block.php'); ?>


text:
layout: redirect
redirect: ../operations/assemble_vector.html
---