text:
<!DOCTYPE html>

    <title>Tend.ru</title>

    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
    <meta name="keywords" content="">
    <meta name="description" content="Tend.ru">
    <meta name="author" content="">

    <meta name="robots" content="index, follow">
    <meta name="language" content="Russian">
    <meta name="msapplication-tooltip" content="Tend.ru">
    <meta name="msapplication-starturl" content="http://tend.ru">
    <meta name="msapplication-tap-highlight" content="no">

    <meta property="og:type" content="website">
    <meta property="og:title" content="Tend.ru">
    <meta property="og:site_name" content="Tend.ru">
    <meta property="og:url" content="http://tend.ru">
    <meta property="og:description" content="Tend.ru">
    <meta property="og:image" content="">

    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="http://tend.ru">
    <meta name="twitter:creator" content="">
    <meta name="twitter:url" content="">
    <meta name="twitter:title" content="Tend.ru">
    <meta name="twitter:description" content="Tend.ru">
    <meta name="twitter:image" content="">
    <meta name="twitter:domain" content="http://tend.ru">
    <link rel="canonical" href="/">
    <link rel="image_src" href="#">
    <link rel="shortlink" href="#">
    <link type="text/plain" rel="author" href="humans.txt">
    <link rel="stylesheet" href="css/style.css">

                  Продукция

                  Объекты

                  Сертификаты

                  Компания

                  Контакты

                  РУС

                  ENG

              +7 (812) 448-59-68

              заказать звонок

Сертификаты

              скачать все сертификаты

                Протокол испытаний на долговечность и определение физико-механических показателей (pdf, 25 kb)

                Протокол испытаний на определение паропроницанию и воздухопроницанию ткани TEND KM-0 (pdf 96 kb)

                Техническое Свидетельство о пригодности продукции для применения в строительстве на территории РФ (pdf 180 kb)

                Письмо заведующего центра противопожарных исследований ЦНИИСК им. В.А. Кучеренко Пестрицкого А.В. от 22.02.2011 (pdf 87 kb)

                Отчёт об испытаниях на пожарную опасность негорючей строительной ткани "TEND KM-0" проведёнными в ИЦ "СЗРЦ ТЕСТ" (pdf 750 kb)

                Протокол испытаний на долговечность и определение физико-механических показателей (pdf, 25 kb)

                Протокол испытаний на определение паропроницанию и воздухопроницанию ткани TEND KM-0 (pdf 96 kb)

                Техническое Свидетельство о пригодности продукции для применения в строительстве на территории РФ (pdf 180 kb)

                Письмо заведующего центра противопожарных исследований ЦНИИСК им. В.А. Кучеренко Пестрицкого А.В. от 22.02.2011 (pdf 87 kb)

                Отчёт об испытаниях на пожарную опасность негорючей строительной ткани "TEND KM-0" проведёнными в ИЦ "СЗРЦ ТЕСТ" (pdf 750 kb)

                Протокол испытаний на долговечность и определение физико-механических показателей (pdf, 25 kb)

                Протокол испытаний на определение паропроницанию и воздухопроницанию ткани TEND KM-0 (pdf 96 kb)

                Техническое Свидетельство о пригодности продукции для применения в строительстве на территории РФ (pdf 180 kb)

                Письмо заведующего центра противопожарных исследований ЦНИИСК им. В.А. Кучеренко Пестрицкого А.В. от 22.02.2011 (pdf 87 kb)

                Отчёт об испытаниях на пожарную опасность негорючей строительной ткани "TEND KM-0" проведёнными в ИЦ "СЗРЦ ТЕСТ" (pdf 750 kb)

                  Продукция

                  Объекты

                  Сертификаты

                  Компания

                  Контакты

                  Презентация ткани TEND (pdf, 5 мб)

                  Рекомендации по применению и схемы монтажа тканей TEND

                  Листовка (pdf, 5 мб)

                +7 (812) 448-59-68

191144, г. Санкт-Петербург, ул. Моисеенко, д.10

09:00–19:00 пн-пт

                info@tend-fr.ru

© 2016 ООО «Парагон»

Все права защищены.

TEND® является зарегистрированной торговой маркой компании ООО "Парагон"

        <form action="" method="">

Заказать звонок

            Имя
            <input class="form__input" type="text" name="Имя" />

            Телефон
            <input class="form__input" type="tel" name="Телефон" />

            Время для звонка
            <select class="form__select">
              <option>любое</option>
              <option>с 9 до 18</option>
              <option>с 18 до 22</option>
            </select>

            Перезвонить мне

        </form>


text:
package gc

import (
	"cmd/compile/internal/ssa"
	"cmd/compile/internal/types"
	"cmd/internal/dwarf"
	"cmd/internal/obj"
	"cmd/internal/objabi"
	"cmd/internal/src"
	"cmd/internal/sys"
	"fmt"
	"math/rand"
	"sort"
	"sync"
	"time"
)

// "Portable" code generation.

var (
	nBackendWorkers int     // number of concurrent backend workers, set by a compiler flag
	compilequeue    []*Node // functions waiting to be compiled
)

func emitptrargsmap(fn *Node) {
	if fn.funcname() == "_" {
		return
	}
	sym := lookup(fmt.Sprintf("%s.args_stackmap", fn.funcname()))
	lsym := sym.Linksym()

	nptr := int(fn.Type.ArgWidth() / int64(Widthptr))
	bv := bvalloc(int32(nptr) * 2)
	nbitmap := 1
	if fn.Type.NumResults() > 0 {
		nbitmap = 2
	}
	off := duint32(lsym, 0, uint32(nbitmap))
	off = duint32(lsym, off, uint32(bv.n))

	if fn.IsMethod() {
		onebitwalktype1(fn.Type.Recvs(), 0, bv)
	}
	if fn.Type.NumParams() > 0 {
		onebitwalktype1(fn.Type.Params(), 0, bv)
	}
	off = dbvec(lsym, off, bv)

	if fn.Type.NumResults() > 0 {
		onebitwalktype1(fn.Type.Results(), 0, bv)
		off = dbvec(lsym, off, bv)
	}

	ggloblsym(lsym, int32(off), obj.RODATA|obj.LOCAL)
}

// cmpstackvarlt reports whether the stack variable a sorts before b.
//
// Sort the list of stack variables. Autos after anything else,
// within autos, unused after used, within used, things with
// pointers first, zeroed things first, and then decreasing size.
// Because autos are laid out in decreasing addresses
// on the stack, pointers first, zeroed things first and decreasing size
// really means, in memory, things with pointers needing zeroing at
// the top of the stack and increasing in size.
// Non-autos sort on offset.
func cmpstackvarlt(a, b *Node) bool {
	if (a.Class() == PAUTO) != (b.Class() == PAUTO) {
		return b.Class() == PAUTO
	}

	if a.Class() != PAUTO {
		return a.Xoffset < b.Xoffset
	}

	if a.Name.Used() != b.Name.Used() {
		return a.Name.Used()
	}

	ap := types.Haspointers(a.Type)
	bp := types.Haspointers(b.Type)
	if ap != bp {
		return ap
	}

	ap = a.Name.Needzero()
	bp = b.Name.Needzero()
	if ap != bp {
		return ap
	}

	if a.Type.Width != b.Type.Width {
		return a.Type.Width > b.Type.Width
	}

	return a.Sym.Name < b.Sym.Name
}

// byStackvar implements sort.Interface for []*Node using cmpstackvarlt.
type byStackVar []*Node

func (s byStackVar) Len() int           { return len(s) }
func (s byStackVar) Less(i, j int) bool { return cmpstackvarlt(s[i], s[j]) }
func (s byStackVar) Swap(i, j int)      { s[i], s[j] = s[j], s[i] }

func (s *ssafn) AllocFrame(f *ssa.Func) {
	s.stksize = 0
	s.stkptrsize = 0
	fn := s.curfn.Func

	// Mark the PAUTO's unused.
	for _, ln := range fn.Dcl {
		if ln.Class() == PAUTO {
			ln.Name.SetUsed(false)
		}
	}

	for _, l := range f.RegAlloc {
		if ls, ok := l.(ssa.LocalSlot); ok {
			ls.N.(*Node).Name.SetUsed(true)
		}
	}

	scratchUsed := false
	for _, b := range f.Blocks {
		for _, v := range b.Values {
			if n, ok := v.Aux.(*Node); ok {
				switch n.Class() {
				case PPARAM, PPARAMOUT:
					// Don't modify nodfp; it is a global.
					if n != nodfp {
						n.Name.SetUsed(true)
					}
				case PAUTO:
					n.Name.SetUsed(true)
				}
			}
			if !scratchUsed {
				scratchUsed = v.Op.UsesScratch()
			}

		}
	}

	if f.Config.NeedsFpScratch && scratchUsed {
		s.scratchFpMem = tempAt(src.NoXPos, s.curfn, types.Types[TUINT64])
	}

	sort.Sort(byStackVar(fn.Dcl))

	// Reassign stack offsets of the locals that are used.
	lastHasPtr := false
	for i, n := range fn.Dcl {
		if n.Op != ONAME || n.Class() != PAUTO {
			continue
		}
		if !n.Name.Used() {
			fn.Dcl = fn.Dcl[:i]
			break
		}

		dowidth(n.Type)
		w := n.Type.Width
		if w >= thearch.MAXWIDTH || w < 0 {
			Fatalf("bad width")
		}
		if w == 0 && lastHasPtr {
			// Pad between a pointer-containing object and a zero-sized object.
			// This prevents a pointer to the zero-sized object from being interpreted
			// as a pointer to the pointer-containing object (and causing it
			// to be scanned when it shouldn't be). See issue 24993.
			w = 1
		}
		s.stksize += w
		s.stksize = Rnd(s.stksize, int64(n.Type.Align))
		if types.Haspointers(n.Type) {
			s.stkptrsize = s.stksize
			lastHasPtr = true
		} else {
			lastHasPtr = false
		}
		if thearch.LinkArch.InFamily(sys.MIPS, sys.MIPS64, sys.ARM, sys.ARM64, sys.PPC64, sys.S390X) {
			s.stksize = Rnd(s.stksize, int64(Widthptr))
		}
		n.Xoffset = -s.stksize
	}

	s.stksize = Rnd(s.stksize, int64(Widthreg))
	s.stkptrsize = Rnd(s.stkptrsize, int64(Widthreg))
}

func funccompile(fn *Node) {
	if Curfn != nil {
		Fatalf("funccompile %v inside %v", fn.Func.Nname.Sym, Curfn.Func.Nname.Sym)
	}

	if fn.Type == nil {
		if nerrors == 0 {
			Fatalf("funccompile missing type")
		}
		return
	}

	// assign parameter offsets
	dowidth(fn.Type)

	if fn.Nbody.Len() == 0 {
		// Initialize ABI wrappers if necessary.
		fn.Func.initLSym(false)
		emitptrargsmap(fn)
		return
	}

	dclcontext = PAUTO
	Curfn = fn

	compile(fn)

	Curfn = nil
	dclcontext = PEXTERN
}

func compile(fn *Node) {
	saveerrors()

	order(fn)
	if nerrors != 0 {
		return
	}

	walk(fn)
	if nerrors != 0 {
		return
	}
	if instrumenting {
		instrument(fn)
	}

	// From this point, there should be no uses of Curfn. Enforce that.
	Curfn = nil

	if fn.funcname() == "_" {
		// We don't need to generate code for this function, just report errors in its body.
		// At this point we've generated any errors needed.
		// (Beyond here we generate only non-spec errors, like "stack frame too large".)
		// See issue 29870.
		return
	}

	// Set up the function's LSym early to avoid data races with the assemblers.
	fn.Func.initLSym(true)

	// Make sure type syms are declared for all types that might
	// be types of stack objects. We need to do this here
	// because symbols must be allocated before the parallel
	// phase of the compiler.
	for _, n := range fn.Func.Dcl {
		switch n.Class() {
		case PPARAM, PPARAMOUT, PAUTO:
			if livenessShouldTrack(n) && n.Addrtaken() {
				dtypesym(n.Type)
				// Also make sure we allocate a linker symbol
				// for the stack object data, for the same reason.
				if fn.Func.lsym.Func.StackObjects == nil {
					fn.Func.lsym.Func.StackObjects = Ctxt.Lookup(fn.Func.lsym.Name + ".stkobj")
				}
			}
		}
	}

	if compilenow() {
		compileSSA(fn, 0)
	} else {
		compilequeue = append(compilequeue, fn)
	}
}

// compilenow reports whether to compile immediately.
// If functions are not compiled immediately,
// they are enqueued in compilequeue,
// which is drained by compileFunctions.
func compilenow() bool {
	return nBackendWorkers == 1 && Debug_compilelater == 0
}

const maxStackSize = 1 << 30

// compileSSA builds an SSA backend function,
// uses it to generate a plist,
// and flushes that plist to machine code.
// worker indicates which of the backend workers is doing the processing.
func compileSSA(fn *Node, worker int) {
	f := buildssa(fn, worker)
	// Note: check arg size to fix issue 25507.
	if f.Frontend().(*ssafn).stksize >= maxStackSize || fn.Type.ArgWidth() >= maxStackSize {
		largeStackFramesMu.Lock()
		largeStackFrames = append(largeStackFrames, largeStack{locals: f.Frontend().(*ssafn).stksize, args: fn.Type.ArgWidth(), pos: fn.Pos})
		largeStackFramesMu.Unlock()
		return
	}
	pp := newProgs(fn, worker)
	defer pp.Free()
	genssa(f, pp)
	// Check frame size again.
	// The check above included only the space needed for local variables.
	// After genssa, the space needed includes local variables and the callee arg region.
	// We must do this check prior to calling pp.Flush.
	// If there are any oversized stack frames,
	// the assembler may emit inscrutable complaints about invalid instructions.
	if pp.Text.To.Offset >= maxStackSize {
		largeStackFramesMu.Lock()
		locals := f.Frontend().(*ssafn).stksize
		largeStackFrames = append(largeStackFrames, largeStack{locals: locals, args: fn.Type.ArgWidth(), callee: pp.Text.To.Offset - locals, pos: fn.Pos})
		largeStackFramesMu.Unlock()
		return
	}

	pp.Flush() // assemble, fill in boilerplate, etc.
	// fieldtrack must be called after pp.Flush. See issue 20014.
	fieldtrack(pp.Text.From.Sym, fn.Func.FieldTrack)
}

func init() {
	if raceEnabled {
		rand.Seed(time.Now().UnixNano())
	}
}

// compileFunctions compiles all functions in compilequeue.
// It fans out nBackendWorkers to do the work
// and waits for them to complete.
func compileFunctions() {
	if len(compilequeue) != 0 {
		sizeCalculationDisabled = true // not safe to calculate sizes concurrently
		if raceEnabled {
			// Randomize compilation order to try to shake out races.
			tmp := make([]*Node, len(compilequeue))
			perm := rand.Perm(len(compilequeue))
			for i, v := range perm {
				tmp[v] = compilequeue[i]
			}
			copy(compilequeue, tmp)
		} else {
			// Compile the longest functions first,
			// since they're most likely to be the slowest.
			// This helps avoid stragglers.
			sort.Slice(compilequeue, func(i, j int) bool {
				return compilequeue[i].Nbody.Len() > compilequeue[j].Nbody.Len()
			})
		}
		var wg sync.WaitGroup
		Ctxt.InParallel = true
		c := make(chan *Node, nBackendWorkers)
		for i := 0; i < nBackendWorkers; i++ {
			wg.Add(1)
			go func(worker int) {
				for fn := range c {
					compileSSA(fn, worker)
				}
				wg.Done()
			}(i)
		}
		for _, fn := range compilequeue {
			c <- fn
		}
		close(c)
		compilequeue = nil
		wg.Wait()
		Ctxt.InParallel = false
		sizeCalculationDisabled = false
	}
}

func debuginfo(fnsym *obj.LSym, curfn interface{}) ([]dwarf.Scope, dwarf.InlCalls) {
	fn := curfn.(*Node)
	if fn.Func.Nname != nil {
		if expect := fn.Func.Nname.Sym.Linksym(); fnsym != expect {
			Fatalf("unexpected fnsym: %v != %v", fnsym, expect)
		}
	}

	var automDecls []*Node
	// Populate Automs for fn.
	for _, n := range fn.Func.Dcl {
		if n.Op != ONAME { // might be OTYPE or OLITERAL
			continue
		}
		var name obj.AddrName
		switch n.Class() {
		case PAUTO:
			if !n.Name.Used() {
				// Text == nil -> generating abstract function
				if fnsym.Func.Text != nil {
					Fatalf("debuginfo unused node (AllocFrame should truncate fn.Func.Dcl)")
				}
				continue
			}
			name = obj.NAME_AUTO
		case PPARAM, PPARAMOUT:
			name = obj.NAME_PARAM
		default:
			continue
		}
		automDecls = append(automDecls, n)
		gotype := ngotype(n).Linksym()
		fnsym.Func.Autom = append(fnsym.Func.Autom, &obj.Auto{
			Asym:    Ctxt.Lookup(n.Sym.Name),
			Aoffset: int32(n.Xoffset),
			Name:    name,
			Gotype:  gotype,
		})
	}

	decls, dwarfVars := createDwarfVars(fnsym, fn.Func, automDecls)

	var varScopes []ScopeID
	for _, decl := range decls {
		pos := decl.Pos
		if decl.Name.Defn != nil && (decl.Name.Captured() || decl.Name.Byval()) {
			// It's not clear which position is correct for captured variables here:
			// * decl.Pos is the wrong position for captured variables, in the inner
			//   function, but it is the right position in the outer function.
			// * decl.Name.Defn is nil for captured variables that were arguments
			//   on the outer function, however the decl.Pos for those seems to be
			//   correct.
			// * decl.Name.Defn is the "wrong" thing for variables declared in the
			//   header of a type switch, it's their position in the header, rather
			//   than the position of the case statement. In principle this is the
			//   right thing, but here we prefer the latter because it makes each
			//   instance of the header variable local to the lexical block of its
			//   case statement.
			// This code is probably wrong for type switch variables that are also
			// captured.
			pos = decl.Name.Defn.Pos
		}
		varScopes = append(varScopes, findScope(fn.Func.Marks, pos))
	}

	scopes := assembleScopes(fnsym, fn, dwarfVars, varScopes)
	var inlcalls dwarf.InlCalls
	if genDwarfInline > 0 {
		inlcalls = assembleInlines(fnsym, dwarfVars)
	}
	return scopes, inlcalls
}

// createSimpleVars creates a DWARF entry for every variable declared in the
// function, claiming that they are permanently on the stack.
func createSimpleVars(automDecls []*Node) ([]*Node, []*dwarf.Var, map[*Node]bool) {
	var vars []*dwarf.Var
	var decls []*Node
	selected := make(map[*Node]bool)
	for _, n := range automDecls {
		if n.IsAutoTmp() {
			continue
		}

		decls = append(decls, n)
		vars = append(vars, createSimpleVar(n))
		selected[n] = true
	}
	return decls, vars, selected
}

func createSimpleVar(n *Node) *dwarf.Var {
	var abbrev int
	offs := n.Xoffset

	switch n.Class() {
	case PAUTO:
		abbrev = dwarf.DW_ABRV_AUTO
		if Ctxt.FixedFrameSize() == 0 {
			offs -= int64(Widthptr)
		}
		if objabi.Framepointer_enabled(objabi.GOOS, objabi.GOARCH) || objabi.GOARCH == "arm64" {
			// There is a word space for FP on ARM64 even if the frame pointer is disabled
			offs -= int64(Widthptr)
		}

	case PPARAM, PPARAMOUT:
		abbrev = dwarf.DW_ABRV_PARAM
		offs += Ctxt.FixedFrameSize()
	default:
		Fatalf("createSimpleVar unexpected class %v for node %v", n.Class(), n)
	}

	typename := dwarf.InfoPrefix + typesymname(n.Type)
	inlIndex := 0
	if genDwarfInline > 1 {
		if n.InlFormal() || n.InlLocal() {
			inlIndex = posInlIndex(n.Pos) + 1
			if n.InlFormal() {
				abbrev = dwarf.DW_ABRV_PARAM
			}
		}
	}
	declpos := Ctxt.InnermostPos(n.Pos)
	return &dwarf.Var{
		Name:          n.Sym.Name,
		IsReturnValue: n.Class() == PPARAMOUT,
		IsInlFormal:   n.InlFormal(),
		Abbrev:        abbrev,
		StackOffset:   int32(offs),
		Type:          Ctxt.Lookup(typename),
		DeclFile:      declpos.RelFilename(),
		DeclLine:      declpos.RelLine(),
		DeclCol:       declpos.Col(),
		InlIndex:      int32(inlIndex),
		ChildIndex:    -1,
	}
}

// createComplexVars creates recomposed DWARF vars with location lists,
// suitable for describing optimized code.
func createComplexVars(fn *Func) ([]*Node, []*dwarf.Var, map[*Node]bool) {
	debugInfo := fn.DebugInfo

	// Produce a DWARF variable entry for each user variable.
	var decls []*Node
	var vars []*dwarf.Var
	ssaVars := make(map[*Node]bool)

	for varID, dvar := range debugInfo.Vars {
		n := dvar.(*Node)
		ssaVars[n] = true
		for _, slot := range debugInfo.VarSlots[varID] {
			ssaVars[debugInfo.Slots[slot].N.(*Node)] = true
		}

		if dvar := createComplexVar(fn, ssa.VarID(varID)); dvar != nil {
			decls = append(decls, n)
			vars = append(vars, dvar)
		}
	}

	return decls, vars, ssaVars
}

// createDwarfVars process fn, returning a list of DWARF variables and the
// Nodes they represent.
func createDwarfVars(fnsym *obj.LSym, fn *Func, automDecls []*Node) ([]*Node, []*dwarf.Var) {
	// Collect a raw list of DWARF vars.
	var vars []*dwarf.Var
	var decls []*Node
	var selected map[*Node]bool
	if Ctxt.Flag_locationlists && Ctxt.Flag_optimize && fn.DebugInfo != nil {
		decls, vars, selected = createComplexVars(fn)
	} else {
		decls, vars, selected = createSimpleVars(automDecls)
	}

	dcl := automDecls
	if fnsym.WasInlined() {
		dcl = preInliningDcls(fnsym)
	}

	// If optimization is enabled, the list above will typically be
	// missing some of the original pre-optimization variables in the
	// function (they may have been promoted to registers, folded into
	// constants, dead-coded away, etc).  Input arguments not eligible
	// for SSA optimization are also missing.  Here we add back in entries
	// for selected missing vars. Note that the recipe below creates a
	// conservative location. The idea here is that we want to
	// communicate to the user that "yes, there is a variable named X
	// in this function, but no, I don't have enough information to
	// reliably report its contents."
	// For non-SSA-able arguments, however, the correct information
	// is known -- they have a single home on the stack.
	for _, n := range dcl {
		if _, found := selected[n]; found {
			continue
		}
		c := n.Sym.Name[0]
		if c == '.' || n.Type.IsUntyped() {
			continue
		}
		if n.Class() == PPARAM && !canSSAType(n.Type) {
			// SSA-able args get location lists, and may move in and
			// out of registers, so those are handled elsewhere.
			// Autos and named output params seem to get handled
			// with VARDEF, which creates location lists.
			// Args not of SSA-able type are treated here; they
			// are homed on the stack in a single place for the
			// entire call.
			vars = append(vars, createSimpleVar(n))
			decls = append(decls, n)
			continue
		}
		typename := dwarf.InfoPrefix + typesymname(n.Type)
		decls = append(decls, n)
		abbrev := dwarf.DW_ABRV_AUTO_LOCLIST
		isReturnValue := (n.Class() == PPARAMOUT)
		if n.Class() == PPARAM || n.Class() == PPARAMOUT {
			abbrev = dwarf.DW_ABRV_PARAM_LOCLIST
		} else if n.Class() == PAUTOHEAP {
			// If dcl in question has been promoted to heap, do a bit
			// of extra work to recover original class (auto or param);
			// see issue 30908. This insures that we get the proper
			// signature in the abstract function DIE, but leaves a
			// misleading location for the param (we want pointer-to-heap
			// and not stack).
			// TODO(thanm): generate a better location expression
			stackcopy := n.Name.Param.Stackcopy
			if stackcopy != nil && (stackcopy.Class() == PPARAM || stackcopy.Class() == PPARAMOUT) {
				abbrev = dwarf.DW_ABRV_PARAM_LOCLIST
				isReturnValue = (stackcopy.Class() == PPARAMOUT)
			}
		}
		inlIndex := 0
		if genDwarfInline > 1 {
			if n.InlFormal() || n.InlLocal() {
				inlIndex = posInlIndex(n.Pos) + 1
				if n.InlFormal() {
					abbrev = dwarf.DW_ABRV_PARAM_LOCLIST
				}
			}
		}
		declpos := Ctxt.InnermostPos(n.Pos)
		vars = append(vars, &dwarf.Var{
			Name:          n.Sym.Name,
			IsReturnValue: isReturnValue,
			Abbrev:        abbrev,
			StackOffset:   int32(n.Xoffset),
			Type:          Ctxt.Lookup(typename),
			DeclFile:      declpos.RelFilename(),
			DeclLine:      declpos.RelLine(),
			DeclCol:       declpos.Col(),
			InlIndex:      int32(inlIndex),
			ChildIndex:    -1,
		})
		// Append a "deleted auto" entry to the autom list so as to
		// insure that the type in question is picked up by the linker.
		// See issue 22941.
		gotype := ngotype(n).Linksym()
		fnsym.Func.Autom = append(fnsym.Func.Autom, &obj.Auto{
			Asym:    Ctxt.Lookup(n.Sym.Name),
			Aoffset: int32(-1),
			Name:    obj.NAME_DELETED_AUTO,
			Gotype:  gotype,
		})

	}

	return decls, vars
}

// Given a function that was inlined at some point during the
// compilation, return a sorted list of nodes corresponding to the
// autos/locals in that function prior to inlining. If this is a
// function that is not local to the package being compiled, then the
// names of the variables may have been "versioned" to avoid conflicts
// with local vars; disregard this versioning when sorting.
func preInliningDcls(fnsym *obj.LSym) []*Node {
	fn := Ctxt.DwFixups.GetPrecursorFunc(fnsym).(*Node)
	var rdcl []*Node
	for _, n := range fn.Func.Inl.Dcl {
		c := n.Sym.Name[0]
		// Avoid reporting "_" parameters, since if there are more than
		// one, it can result in a collision later on, as in #23179.
		if unversion(n.Sym.Name) == "_" || c == '.' || n.Type.IsUntyped() {
			continue
		}
		rdcl = append(rdcl, n)
	}
	return rdcl
}

// stackOffset returns the stack location of a LocalSlot relative to the
// stack pointer, suitable for use in a DWARF location entry. This has nothing
// to do with its offset in the user variable.
func stackOffset(slot ssa.LocalSlot) int32 {
	n := slot.N.(*Node)
	var base int64
	switch n.Class() {
	case PAUTO:
		if Ctxt.FixedFrameSize() == 0 {
			base -= int64(Widthptr)
		}
		if objabi.Framepointer_enabled(objabi.GOOS, objabi.GOARCH) || objabi.GOARCH == "arm64" {
			// There is a word space for FP on ARM64 even if the frame pointer is disabled
			base -= int64(Widthptr)
		}
	case PPARAM, PPARAMOUT:
		base += Ctxt.FixedFrameSize()
	}
	return int32(base + n.Xoffset + slot.Off)
}

// createComplexVar builds a single DWARF variable entry and location list.
func createComplexVar(fn *Func, varID ssa.VarID) *dwarf.Var {
	debug := fn.DebugInfo
	n := debug.Vars[varID].(*Node)

	var abbrev int
	switch n.Class() {
	case PAUTO:
		abbrev = dwarf.DW_ABRV_AUTO_LOCLIST
	case PPARAM, PPARAMOUT:
		abbrev = dwarf.DW_ABRV_PARAM_LOCLIST
	default:
		return nil
	}

	gotype := ngotype(n).Linksym()
	typename := dwarf.InfoPrefix + gotype.Name[len("type."):]
	inlIndex := 0
	if genDwarfInline > 1 {
		if n.InlFormal() || n.InlLocal() {
			inlIndex = posInlIndex(n.Pos) + 1
			if n.InlFormal() {
				abbrev = dwarf.DW_ABRV_PARAM_LOCLIST
			}
		}
	}
	declpos := Ctxt.InnermostPos(n.Pos)
	dvar := &dwarf.Var{
		Name:          n.Sym.Name,
		IsReturnValue: n.Class() == PPARAMOUT,
		IsInlFormal:   n.InlFormal(),
		Abbrev:        abbrev,
		Type:          Ctxt.Lookup(typename),
		// The stack offset is used as a sorting key, so for decomposed
		// variables just give it the first one. It's not used otherwise.
		// This won't work well if the first slot hasn't been assigned a stack
		// location, but it's not obvious how to do better.
		StackOffset: stackOffset(debug.Slots[debug.VarSlots[varID][0]]),
		DeclFile:    declpos.RelFilename(),
		DeclLine:    declpos.RelLine(),
		DeclCol:     declpos.Col(),
		InlIndex:    int32(inlIndex),
		ChildIndex:  -1,
	}
	list := debug.LocationLists[varID]
	if len(list) != 0 {
		dvar.PutLocationList = func(listSym, startPC dwarf.Sym) {
			debug.PutLocationList(list, Ctxt, listSym.(*obj.LSym), startPC.(*obj.LSym))
		}
	}
	return dvar
}

// fieldtrack adds R_USEFIELD relocations to fnsym to record any
// struct fields that it used.
func fieldtrack(fnsym *obj.LSym, tracked map[*types.Sym]struct{}) {
	if fnsym == nil {
		return
	}
	if objabi.Fieldtrack_enabled == 0 || len(tracked) == 0 {
		return
	}

	trackSyms := make([]*types.Sym, 0, len(tracked))
	for sym := range tracked {
		trackSyms = append(trackSyms, sym)
	}
	sort.Sort(symByName(trackSyms))
	for _, sym := range trackSyms {
		r := obj.Addrel(fnsym)
		r.Sym = sym.Linksym()
		r.Type = objabi.R_USEFIELD
	}
}

type symByName []*types.Sym

func (a symByName) Len() int           { return len(a) }
func (a symByName) Less(i, j int) bool { return a[i].Name < a[j].Name }
func (a symByName) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

redpajama_set_name: RedPajamaGithub


text:
import os

TEST_DIR = os.path.dirname(os.path.realpath(__file__))


text:
namespace Errlock.Lib.Modules.PublicFinderModule
{
    public class PublicFinderConfig : ModuleConfig
    {
        public bool UsePermutations { get; set; }
        public bool DetectSuspicious { get; set; }
        public bool UseGetRequests { get; set; }
        public string UserWordsList { get; set; }
    }
}


text:
package promotionSystem.razas.castas.orco;

import promotionSystem.Constantes;
import promotionSystem.razas.Orco;

public class GuerreroOrco extends Orco{

	public GuerreroOrco(){
		casta="GuerreroOrco";
		energia=Constantes.ENERGIA_GUERRERO_ORCO;
		energiaMaxima=Constantes.ENERGIA_MAXIMA_GUERRERO_ORCO;
		salud=Constantes.SALUD_GUERRERO_ORCO;
		saludMaxima=Constantes.SALUD_MAXIMA_GUERRERO_ORCO;
		ataque=Constantes.ATAQUE_GUERRERO_ORCO;
		defensa=Constantes.DEFENSA_GUERRERO_ORCO;
		magia=Constantes.MAGIA_GUERRERO_ORCO;
		velocidad=Constantes.VELOCIDAD_GUERRERO_ORCO;
	}

	@Override
	public void subirStats(int cantidadDeNivelesSubidos) {
		energia+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_NORMAL;
		energiaMaxima+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_NORMAL;
		saludMaxima+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_ESPECIAL;
		salud+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_NORMAL;
		ataque+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_ESPECIAL;
		defensa+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_NORMAL;
		magia+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_NORMAL;
		velocidad+=cantidadDeNivelesSubidos*Constantes.MULTIPLICADOR_DE_NIVEL_NORMAL;
	}
}


text:
@interface TSAppDelegate : NSObject <NSApplicationDelegate>

@property (assign) IBOutlet NSWindow *window;

@end


text:
package auth

import (
	"net/http"
)

type Provider interface {
	SessionHandler() func(w http.ResponseWriter, r *http.Request)
	UserHandler() func(w http.ResponseWriter, r *http.Request)
	Filter(delegate func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
}


text:
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using Telerik.Charting;
using Windows.UI;
using Windows.UI.Xaml.Media;

namespace UWP.Models {
    public partial class ChartModel : ObservableObject {
        /// <summary>
        /// List of ChartPoints containing the values for the chart
        /// </summary>
        [ObservableProperty]
        private List<ChartPoint> chartData = new List<ChartPoint>();

        /// <summary>
        /// Tuple with the minimum and maximum value to adjust the chart
        /// </summary>
        [ObservableProperty]
        private (double Min, double Max) pricesMinMax = (0, 100);

        [ObservableProperty]
        private double volumeMax = 0;

        [ObservableProperty]
        private bool isLoading = false;

        /// <summary>
        /// Stroke and two semi-transparent fills to paint the charts
        /// </summary>
        [ObservableProperty]
        private SolidColorBrush chartStroke = new SolidColorBrush(Color.FromArgb(224, 127, 127, 127));

        /// <summary>
        /// Attributes to adjust the axis to the plotted time interval
        /// </summary>
        [ObservableProperty]
        private string labelFormat = "{0:HH:mm}";

        [ObservableProperty]
        private TimeInterval majorStepUnit = TimeInterval.Minute;

        [ObservableProperty]
        private int majorStep = 10;

        [ObservableProperty]
        private DateTime minimum = DateTime.Now.AddHours(-1);

        [ObservableProperty]
        private int tickInterval = 10;

        /// <summary>
        ///
        /// </summary>
        [ObservableProperty]
        private string timeSpan = "1w";
    }
}


text:
package com.elmakers.mine.bukkit.api.data;

import java.util.ArrayList;
import java.util.List;

import com.elmakers.mine.bukkit.api.block.UndoList;

/**
 * This class is a placeholder for the eventuality of having a DAO
 * for UndoQueue data.
 *
 * <p>The complexity in implementing this requires a stopgap solution.
 */
public class UndoData {
    private final List<UndoList> blockList;

    public UndoData() {
        this.blockList = new ArrayList<>();
    }

    public List<UndoList> getBlockList() {
        return blockList;
    }
}


text:
import React from 'react'

const LeftColumn = ({ children }) => {
  return

}

const RightColumn = ({ children }) => {
  return

}

const Container = ({ children }) => {
  return

}

const Column = ({ children }) => {
  return

}

export {
	LeftColumn,
	RightColumn,
  Container,
  Column,
}


text:
import jsonschema from 'jsonschema';
import jsonSchemaDefaults from 'json-schema-defaults';
import dot from 'dot-object';
import mergeWithArrays from 'utils/mergeWithArrays';
import type { JsonSchema } from 'types/JsonSchema';
import type { FormErrorMessages } from 'types/FormErrorMessages.js';

export default function (
	values,
	schema: JsonSchema = {},
	errorMessages: FormErrorMessages = {},
) {
	const defaultValues = jsonSchemaDefaults(schema);
	const dataToValidate = mergeWithArrays({}, defaultValues, values);
	const validate = jsonschema.validate(dataToValidate, schema);
	const errors = validate.valid ?
		{}
		:
		dot.object(
			validate.errors.reduce((allErrs, err) => {
				const errorPath = (err.name === 'required' ?
					`${err.property}.${err.argument}`
					:
					err.property
				).replace('instance.', '');
				const errorMessage = dot.pick(`${errorPath}.${err.name}`, errorMessages)
					|| `Error: ${err.name}`;

				return mergeWithArrays(
					{},
					allErrs,
					{
						[errorPath]: [errorPath].errorMessage ?
							`${[errorPath].errorMessage} ${errorMessage}`
							:
							errorMessage,
					}
				);
			}, {})
		);

	return errors;
}


text:
typedef NS_ENUM(NSUInteger, DBCrashReportDetailsTableViewControllerSection) {
    DBCrashReportDetailsTableViewControllerSectionDetails,
    DBCrashReportDetailsTableViewControllerSectionContext,
    DBCrashReportDetailsTableViewControllerSectionUserInfo,
    DBCrashReportDetailsTableViewControllerSectionStackTrace
};

static NSString *const DBCrashReportDetailsTableViewControllerTitleValueCellIdentifier = @"DBTitleValueTableViewCell";
static NSString *const DBCrashReportDetailsTableViewControllerContextCellIdentifier = @"ContextCell";
static NSString *const DBCrashReportDetailsTableViewControllerStackTraceCellIdentifier = @"StackTraceCell";

@interface DBCrashReportDetailsTableViewController () <MFMailComposeViewControllerDelegate>

@property (nonatomic, weak) IBOutlet UIBarButtonItem *shareButton;
@property (nonatomic, strong) NSArray <DBTitleValueTableViewCellDataSource *> *detailCellDataSources;
@property (nonatomic, strong) NSArray <DBTitleValueTableViewCellDataSource *> *userInfoCellDataSources;
@property (nonatomic, strong) MFMailComposeViewController *mailComposeViewController;

@end

@implementation DBCrashReportDetailsTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupDetailCellDataSources];
    [self setupUserInfoCellDataSources];
    [self setupShareButton];
    NSBundle *bundle = [NSBundle debugToolkitBundle];
    [self.tableView registerNib:[UINib nibWithNibName:@"DBTitleValueTableViewCell" bundle:bundle]
         forCellReuseIdentifier:DBCrashReportDetailsTableViewControllerTitleValueCellIdentifier];
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.estimatedRowHeight = 44.0;
}

- (void)dealloc {
    [self.mailComposeViewController dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark - Share button

- (void)setupShareButton {
    self.shareButton.enabled = [MFMailComposeViewController canSendMail];
}

- (IBAction)shareButtonAction:(id)sender {
    self.mailComposeViewController = [[MFMailComposeViewController alloc] init];
    self.mailComposeViewController.mailComposeDelegate = self;
    [self.mailComposeViewController setSubject:[self mailSubject]];
    [self.mailComposeViewController setMessageBody:[self mailHTMLBody] isHTML:YES];

    if (self.crashReport.screenshot) {
        NSData *screenshotData = UIImageJPEGRepresentation(self.crashReport.screenshot, 1);
        [self.mailComposeViewController addAttachmentData:screenshotData mimeType:@"image/jpeg" fileName:@"screenshot"];
    }

    [self presentViewController:self.mailComposeViewController animated:YES completion:NULL];
}

#pragma mark - UITableViewDataSource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 4;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    switch (section) {
        case DBCrashReportDetailsTableViewControllerSectionDetails:
            return self.detailCellDataSources.count;
        case DBCrashReportDetailsTableViewControllerSectionContext:
            return 2;
        case DBCrashReportDetailsTableViewControllerSectionUserInfo:
            return self.crashReport.userInfo.count;
        case DBCrashReportDetailsTableViewControllerSectionStackTrace:
            return self.crashReport.callStackSymbols.count;
        default:
            return 0;
    }
}

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
    if ([self tableView:tableView numberOfRowsInSection:section] == 0) {
        return nil;
    }

    switch (section) {
        case DBCrashReportDetailsTableViewControllerSectionDetails:
            return @"Details";
        case DBCrashReportDetailsTableViewControllerSectionContext:
            return @"Context";
        case DBCrashReportDetailsTableViewControllerSectionUserInfo:
            return @"User info";
        case DBCrashReportDetailsTableViewControllerSectionStackTrace:
            return @"Stack trace";
        default:
            return nil;
    }
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    switch (indexPath.section) {
        case DBCrashReportDetailsTableViewControllerSectionDetails: {
            DBTitleValueTableViewCell *titleValueCell = [self.tableView dequeueReusableCellWithIdentifier:DBCrashReportDetailsTableViewControllerTitleValueCellIdentifier];
            DBTitleValueTableViewCellDataSource *dataSource = self.detailCellDataSources[indexPath.row];
            [titleValueCell configureWithDataSource:dataSource];
            [titleValueCell setSeparatorInset:UIEdgeInsetsZero];
            return titleValueCell;
        }
        case DBCrashReportDetailsTableViewControllerSectionContext: {
            UITableViewCell *contextCell = [tableView dequeueReusableCellWithIdentifier:DBCrashReportDetailsTableViewControllerContextCellIdentifier];
            if (contextCell == nil) {
                contextCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                                     reuseIdentifier:DBCrashReportDetailsTableViewControllerContextCellIdentifier];
                contextCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
            }
            contextCell.textLabel.text = indexPath.row == 0 ? @"Screenshot" : @"Console output";
            return contextCell;
        }
        case DBCrashReportDetailsTableViewControllerSectionUserInfo: {
            DBTitleValueTableViewCell *titleValueCell = [self.tableView dequeueReusableCellWithIdentifier:DBCrashReportDetailsTableViewControllerTitleValueCellIdentifier];
            DBTitleValueTableViewCellDataSource *dataSource = self.userInfoCellDataSources[indexPath.row];
            [titleValueCell configureWithDataSource:dataSource];
            [titleValueCell setSeparatorInset:UIEdgeInsetsZero];
            return titleValueCell;
        }
        case DBCrashReportDetailsTableViewControllerSectionStackTrace: {
            UITableViewCell *stackTraceCell = [tableView dequeueReusableCellWithIdentifier:DBCrashReportDetailsTableViewControllerStackTraceCellIdentifier];
            if (stackTraceCell == nil) {
                stackTraceCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                                        reuseIdentifier:DBCrashReportDetailsTableViewControllerStackTraceCellIdentifier];
                stackTraceCell.textLabel.numberOfLines = 0;
                stackTraceCell.textLabel.font = [UIFont systemFontOfSize:12];
                stackTraceCell.selectionStyle = UITableViewCellSelectionStyleNone;
            }
            stackTraceCell.textLabel.text = self.crashReport.callStackSymbols[indexPath.row];
            return stackTraceCell;
        }
    }
    return nil;
}

#pragma mark - UITableViewDelegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.section != DBCrashReportDetailsTableViewControllerSectionContext) {
        return;
    }

    if (indexPath.row == 0) {
        [self openScreenshotPreview];
    } else {
        [self openConsoleOutputPreview];
    }
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return [self heightForFooterAndHeaderInSection:section];
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return [self heightForFooterAndHeaderInSection:section];
}

#pragma mark - MFMailComposeViewControllerDelegate

- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
    [self dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark - Private methods

#pragma mark - - Detail cells

- (void)setupDetailCellDataSources {
    NSMutableArray *detailCellDataSources = [NSMutableArray array];
    [detailCellDataSources addObject:[DBTitleValueTableViewCellDataSource dataSourceWithTitle:@"Name"
                                                                                value:self.crashReport.name]];
    [detailCellDataSources addObject:[DBTitleValueTableViewCellDataSource dataSourceWithTitle:@"Date"
                                                                                value:self.crashReport.dateString]];
    if (self.crashReport.reason) {
        [detailCellDataSources addObject:[DBTitleValueTableViewCellDataSource dataSourceWithTitle:@"Reason"
                                                                                value:self.crashReport.reason]];
    }
    [detailCellDataSources addObject:[DBTitleValueTableViewCellDataSource dataSourceWithTitle:@"App version"
                                                                                value:self.crashReport.appVersion]];
    [detailCellDataSources addObject:[DBTitleValueTableViewCellDataSource dataSourceWithTitle:@"System version"
                                                                                value:self.crashReport.systemVersion]];
    self.detailCellDataSources = [detailCellDataSources copy];
}

#pragma mark - - User info cells

- (void)setupUserInfoCellDataSources {
    NSMutableArray *userInfoCellDataSources = [NSMutableArray array];
    for (NSString *key in self.crashReport.userInfo.allKeys) {
        NSString *value = [NSString stringWithFormat:@"%@", self.crashReport.userInfo[key]];
        DBTitleValueTableViewCellDataSource *dataSource = [DBTitleValueTableViewCellDataSource dataSourceWithTitle:key
                                                                                value:value];
        [userInfoCellDataSources addObject:dataSource];
    }
    self.userInfoCellDataSources = [userInfoCellDataSources copy];
}

#pragma mark - - Section heights

- (CGFloat)heightForFooterAndHeaderInSection:(NSInteger)section {
    return [self tableView:self.tableView numberOfRowsInSection:section] > 0 ? UITableViewAutomaticDimension : CGFLOAT_MIN;
}

#pragma mark - - Opening context screens

- (void)openScreenshotPreview {
    NSBundle *bundle = [NSBundle debugToolkitBundle];
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"DBImageViewViewController" bundle:bundle];
    DBImageViewViewController *imageViewViewController = [storyboard instantiateInitialViewController];
    [imageViewViewController configureWithTitle:@"Screenshot"
                                          image:self.crashReport.screenshot
                                placeholderText:@"No screenshot available."];
    [self.navigationController pushViewController:imageViewViewController animated:YES];
}

- (void)openConsoleOutputPreview {
    NSBundle *bundle = [NSBundle debugToolkitBundle];
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"DBTextViewViewController" bundle:bundle];
    DBTextViewViewController *textViewViewController = [storyboard instantiateInitialViewController];
    [textViewViewController configureWithTitle:@"Console output" text:self.crashReport.consoleOutput isInConsoleMode:YES];
    [self.navigationController pushViewController:textViewViewController animated:YES];
}

#pragma mark - - Email content

- (NSString *)mailSubject {
    return [NSString stringWithFormat:@"%@ - Crash report: %@, %@", NSBundle.buildInfoString,
                                                                    self.crashReport.name,
                                                                    self.crashReport.dateString];
}

- (NSString *)mailHTMLBody {
    NSMutableString *mailHTMLBody = [NSMutableString string];

    // Environment.
    [mailHTMLBody appendString:@"Environment:
"];

    // App version.
    [mailHTMLBody appendFormat:@"App version: %@
", NSBundle.buildInfoString];

    // System version.
    [mailHTMLBody appendFormat:@"System version: %@
", [self.deviceInfoProvider systemVersion]];

    // Device model.
    [mailHTMLBody appendFormat:@"Device model: %@

", [self.deviceInfoProvider deviceModel]];

    // Details.
    [mailHTMLBody appendString:@"Details:
"];

    // Name.
    [mailHTMLBody appendFormat:@"Name: %@
", self.crashReport.name];

    // Date.
    [mailHTMLBody appendFormat:@"Date: %@
", self.crashReport.dateString];

    // Reason.
    if (self.crashReport.reason) {
        [mailHTMLBody appendFormat:@"Reason: %@
", self.crashReport.reason];
    }

    // User info.
    if (self.crashReport.userInfo.count > 0) {
        [mailHTMLBody appendString:@"
User info:
"];
        for (NSString *key in self.crashReport.userInfo.allKeys) {
            NSString *value = self.crashReport.userInfo[key];
            [mailHTMLBody appendFormat:@"%@: %@
", key, value];
        }
    }

    // Stack trace.
    NSString *stackTrace = [self.crashReport.callStackSymbols componentsJoinedByString:@"\n"];
    NSString *stackTraceWithIgnoredHTMLTags = [stackTrace stringByReplacingOccurrencesOfString:@"<" withString:@"&lt"];
    NSString *stackTraceWithProperNewlines = [stackTraceWithIgnoredHTMLTags stringByReplacingOccurrencesOfString:@"\n" withString:@"
"];
    [mailHTMLBody appendFormat:@"
Stack trace:
%@
", stackTraceWithProperNewlines];

    // Console output.
    NSString *consoleOutputWithIgnoredHTMLTags = [self.crashReport.consoleOutput stringByReplacingOccurrencesOfString:@"<" withString:@"&lt"];
    NSString *consoleOutputWithProperNewlines = [consoleOutputWithIgnoredHTMLTags stringByReplacingOccurrencesOfString:@"\n" withString:@"
"];
    [mailHTMLBody appendFormat:@"
Console output:
%@
", consoleOutputWithProperNewlines];

    return mailHTMLBody;
}

@end


text:
//********************************************************************
//*
//* Warning: This file was generated by ecore4CPP Generator
//*
//********************************************************************

#ifndef OCL_EXPRESSIONS_UNSPECIFIEDVALUEEXP_HPP
#define OCL_EXPRESSIONS_UNSPECIFIEDVALUEEXP_HPP

#include <memory>
#include <string>
// forward declarations

//*********************************
// generated Includes
#include <map> // used for Persistence
#include <vector> // used for Persistence
namespace persistence
{
	namespace interfaces
	{
		class XLoadHandler; // used for Persistence
		class XSaveHandler; // used for Persistence
	}
}

namespace ocl
{
	class oclFactory;
}

//Forward Declaration for used types
namespace ocl::Evaluations
{
	class OclExpEval;
}
namespace ocl::Expressions
{
	class CallExp;
	class CollectionRange;
	class ExpressionInOcl;
	class IfExp;
	class LoopExp;
	class NavigationCallExp;
	class OperationCallExp;
	class Variable;
}
namespace ecore
{
	class EAnnotation;
	class EClassifier;
	class EGenericType;
}

// namespace macro header include
#include "ocl/ocl.hpp"

// base class includes
#include "ocl/Expressions/OclExpression.hpp"

//*********************************
namespace ocl::Expressions
{

	class OCL_API UnspecifiedValueExp: virtual public OclExpression
	{
		public:
 			UnspecifiedValueExp(const UnspecifiedValueExp &) {}

		protected:
			UnspecifiedValueExp(){}

		public:
			virtual std::shared_ptr<ecore::EObject> copy() const = 0;

			//destructor
			virtual ~UnspecifiedValueExp() {}

			//*********************************
			// Operations
			//*********************************

			//*********************************
			// Attribute Getters & Setters
			//*********************************

			//*********************************
			// Reference Getters & Setters
			//*********************************

			//*********************************
			// Union Reference Getters
			//*********************************

			//*********************************
			// Container Getter
			//*********************************
			virtual std::shared_ptr<ecore::EObject> eContainer() const = 0;

			//*********************************
			// Persistence Functions
			//*********************************
			virtual void load(std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler) = 0;
			virtual void resolveReferences(const int featureID, std::vector<std::shared_ptr<ecore::EObject> > references) = 0;
			virtual void save(std::shared_ptr<persistence::interfaces::XSaveHandler> saveHandler) const = 0;

		protected:
			//*********************************
			// Attribute Members
			//*********************************

			//*********************************
			// Reference Members
			//*********************************
	};
}
#endif /* end of include guard: OCL_EXPRESSIONS_UNSPECIFIEDVALUEEXP_HPP */


text:
/* Listing 26-5 */

#include <signal.h>
#include <sys/wait.h>
#include "print_wait_status.h"
#include "curr_time.h"
#include "tlpi_hdr.h"

static volatile int numLiveChildren = 0;
                /* Number of children started but not yet waited on */

static void
sigchldHandler(int sig)
{
    int status, savedErrno;
    pid_t childPid;

    /* UNSAFE: This handler uses non-async-signal-safe functions
       (printf(), printWaitStatus(), currTime(); see Section 21.1.2) */

    savedErrno = errno;         /* In case we modify 'errno' */

    printf("%s handler: Caught SIGCHLD\n", currTime("%T"));

    while ((childPid = waitpid(-1, &status, WNOHANG)) > 0) {
        printf("%s handler: Reaped child %ld - ", currTime("%T"),
                (long) childPid);
        printWaitStatus(NULL, status);
        numLiveChildren--;
    }

    if (childPid == -1 && errno != ECHILD)
        errMsg("waitpid");

    sleep(5);           /* Artificially lengthen execution of handler */
    printf("%s handler: returning\n", currTime("%T"));

    errno = savedErrno;
}

int
main(int argc, char *argv[])
{
    int j, sigCnt;
    sigset_t blockMask, emptyMask;
    struct sigaction sa;

    if (argc < 2 || strcmp(argv[1], "--help") == 0)
        usageErr("%s child-sleep-time...\n", argv[0]);

    setbuf(stdout, NULL);       /* Disable buffering of stdout */

    sigCnt = 0;
    numLiveChildren = argc - 1;

    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;
    sa.sa_handler = sigchldHandler;
    if (sigaction(SIGCHLD, &sa, NULL) == -1)
        errExit("sigaction");

    /* Block SIGCHLD to prevent its delivery if a child terminates
       before the parent commences the sigsuspend() loop below */

    sigemptyset(&blockMask);
    sigaddset(&blockMask, SIGCHLD);
    if (sigprocmask(SIG_SETMASK, &blockMask, NULL) == -1)
        errExit("sigprocmask");

    for (j = 1; j < argc; j++) {
        switch (fork()) {
        case -1:
            errExit("fork");

        case 0:         /* Child - sleeps and then exits */
            sleep(getInt(argv[j], GN_NONNEG, "child-sleep-time"));
            printf("%s Child %d (PID=%ld) exiting\n", currTime("%T"),
                    j, (long) getpid());
            _exit(EXIT_SUCCESS);

        default:        /* Parent - loops to create next child */
            break;
        }
    }

    /* Parent comes here: wait for SIGCHLD until all children are dead */

    sigemptyset(&emptyMask);
    while (numLiveChildren > 0) {
        if (sigsuspend(&emptyMask) == -1 && errno != EINTR)
            errExit("sigsuspend");
        sigCnt++;
    }

    printf("%s All %d children have terminated; SIGCHLD was caught "
            "%d times\n", currTime("%T"), argc - 1, sigCnt);

    exit(EXIT_SUCCESS);
}


text:
#ifndef TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_H_
#define TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_H_

// This file requires the following include because it uses GpuAtomicMax:
// #include "tensorflow/core/util/gpu_kernel_helper.h"

// Unfortunately we can't add the #include, since it breaks compilation for
// non-GPU targets. This only breaks in clang, because it's more strict for
// template code and GpuAtomicMax is used in template context.

#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/tensor_types.h"

namespace tensorflow {

class OpKernelContext;

namespace functor {

#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
typedef Eigen::GpuDevice GPUDevice;
// Functor for SegmentSumGPUOp.
// output_rows: the number of output segments (unique segment ids in
//                'segment_ids').
// segment_ids_shape: shape of 'segment_ids' tensor.
// segment_ids: unsorted map from input to output segment ids at which to
//                perform segment sum operation.
// data_size: size of input data tensor.
// data: input data tensor.
// output: output reshaped to {output_rows, output.size/output_rows}
template <typename T, typename Index>
struct SegmentSumFunctor {
  void operator()(OpKernelContext* ctx, const GPUDevice& d,
                  const Index output_rows, const TensorShape& segment_ids_shape,
                  typename TTypes<Index>::ConstFlat segment_ids,
                  const Index data_size, const T* data,
                  typename TTypes<T, 2>::Tensor output);
};

#endif

template <typename Device, typename T, typename Index, typename InitialValueF,
          typename ReductionF>
struct UnsortedSegmentFunctor {
  void operator()(OpKernelContext* ctx, const TensorShape& segment_ids_shape,
                  typename TTypes<Index>::ConstFlat segment_ids,
                  typename TTypes<T, 2>::ConstTensor data,
                  typename TTypes<T, 2>::Tensor output);
};

#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
// reduction functors for the gpu
template <typename T>
struct SumOpGpu {
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(T* dest,
                                                        const T& value) {
    GpuAtomicAdd(dest, value);
  }
};

template <typename T>
struct ProdOpGpu {
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(T* dest,
                                                        const T& value) {
    GpuAtomicMul(dest, value);
  }
};

template <typename T>
struct MaxOpGpu {
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(T* dest,
                                                        const T& value) {
    GpuAtomicMax(dest, value);
  }
};

template <typename T>
struct MinOpGpu {
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(T* dest,
                                                        const T& value) {
    GpuAtomicMin(dest, value);
  }
};

#endif  // GOOGLE_CUDA || TENSORFLOW_USE_ROCM

// initial value functors
template <typename T>
struct Zero {
  EIGEN_STRONG_INLINE T operator()() const { return T(0); }
};

template <typename T>
struct One {
  EIGEN_STRONG_INLINE T operator()() const { return T(1); }
};

template <typename T>
struct Lowest {
  EIGEN_STRONG_INLINE T operator()() const {
    return Eigen::NumTraits<T>::lowest();
  }
};

template <typename T>
struct Highest {
  EIGEN_STRONG_INLINE T operator()() const {
    return Eigen::NumTraits<T>::highest();
  }
};

}  // namespace functor
}  // namespace tensorflow

#endif  // TENSORFLOW_CORE_KERNELS_SEGMENT_REDUCTION_OPS_H_


text:
package pl.gdela.socomo.maven.enforce;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

class Row {
    final List<Cell> cells = new ArrayList<Cell>();

    /**
     * Returns all cells contained in this row and all it's subgrids.
     * @return
     */
    public Set<Cell> getAllCells() {
        HashSet<Cell> result = new HashSet<Cell>();
        result.addAll(cells);
        for (Cell cell : cells) {
            result.addAll(cell.getAllSubCells());
        }
        return result;
    }

    @Override
    public String toString() {
        String result = "";
        for (Cell cell : cells) {
            result += cell + " ";
        }
        return result.trim();
    }
}


text:
package translation

import (
	"code.gitea.io/gitea/modules/log"
	"code.gitea.io/gitea/modules/options"
	"code.gitea.io/gitea/modules/setting"

	"github.com/unknwon/i18n"
	"golang.org/x/text/language"
)

// Locale represents an interface to translation
type Locale interface {
	Language() string
	Tr(string, ...interface{}) string
}

// LangType represents a lang type
type LangType struct {
	Lang, Name string
}

var (
	matcher       language.Matcher
	allLangs      []LangType
	supportedTags []language.Tag
)

// AllLangs returns all supported langauages
func AllLangs() []LangType {
	return allLangs
}

// InitLocales loads the locales
func InitLocales() {
	i18n.Reset()
	localeNames, err := options.Dir("locale")
	if err != nil {
		log.Fatal("Failed to list locale files: %v", err)
	}

	localFiles := make(map[string][]byte)
	for _, name := range localeNames {
		localFiles[name], err = options.Locale(name)
		if err != nil {
			log.Fatal("Failed to load %s locale file. %v", name, err)
		}
	}

	supportedTags = make([]language.Tag, len(setting.Langs))
	for i, lang := range setting.Langs {
		supportedTags[i] = language.Raw.Make(lang)
	}

	matcher = language.NewMatcher(supportedTags)
	for i := range setting.Names {
		key := "locale_" + setting.Langs[i] + ".ini"
		if err = i18n.SetMessageWithDesc(setting.Langs[i], setting.Names[i], localFiles[key]); err != nil {
			log.Error("Failed to set messages to %s: %v", setting.Langs[i], err)
		}
	}
	i18n.SetDefaultLang("en-US")

	allLangs = make([]LangType, 0, i18n.Count()-1)
	langs := i18n.ListLangs()
	names := i18n.ListLangDescs()
	for i, v := range langs {
		allLangs = append(allLangs, LangType{v, names[i]})
	}
}

// Match matches accept languages
func Match(tags ...language.Tag) language.Tag {
	_, i, _ := matcher.Match(tags...)
	return supportedTags[i]
}

// locale represents the information of localization.
type locale struct {
	Lang string
}

// NewLocale return a locale
func NewLocale(lang string) Locale {
	return &locale{
		Lang: lang,
	}
}

func (l *locale) Language() string {
	return l.Lang
}

// Tr translates content to target language.
func (l *locale) Tr(format string, args ...interface{}) string {
	return i18n.Tr(l.Lang, format, args...)
}


text:
FROM learninglayers/base

MAINTAINER Dominik Renzel

# add content to data volumes
ADD etc /opt/mobsos-surveys/etc
ADD doc /opt/mobsos-surveys/doc

# do necessary replacements by environment variable values (
CMD sed -i "s#SURVEYS_DB_NAME#${SURVEYS_DB_NAME}#g" /opt/mobsos-surveys/etc/sql/schema.sql && \
	sed -i "s#SURVEYS_DB_USER#${SURVEYS_DB_USER}#g" /opt/mobsos-surveys/etc/sql/schema.sql && \
	sed -i "s#SURVEYS_DB_PASS#${SURVEYS_DB_PASS}#g" /opt/mobsos-surveys/etc/sql/schema.sql && \
	sed -i "s#LAYERS_API_URI#${LAYERS_API_URI}#g" /opt/mobsos-surveys/etc/i5.las2peer.webConnector.WebConnector.properties && \
	sed -i "s#LAYERS_API_URI#${LAYERS_API_URI}#g" /opt/mobsos-surveys/etc/i5.las2peer.services.mobsos.SurveyService.properties && \
	sed -i "s#SURVEYS_DB_NAME#${SURVEYS_DB_NAME}#g" /opt/mobsos-surveys/etc/i5.las2peer.services.mobsos.SurveyService.properties && \
	sed -i "s#SURVEYS_DB_USER#${SURVEYS_DB_USER}#g" /opt/mobsos-surveys/etc/i5.las2peer.services.mobsos.SurveyService.properties && \
	sed -i "s#SURVEYS_DB_PASS#${SURVEYS_DB_PASS}#g" /opt/mobsos-surveys/etc/i5.las2peer.services.mobsos.SurveyService.properties && \
	sed -i "s#SURVEYS_OIDC_CLIENT_ID#${SURVEYS_OIDC_CLIENT_ID}#g" /opt/mobsos-surveys/etc/i5.las2peer.services.mobsos.SurveyService.properties

# provide directories etc and log as volumes
VOLUME ["/opt/mobsos-surveys/doc/", "/opt/mobsos-surveys/etc/"]


text:
$(function() {
	$("[id^=toolBtn]").button(); // find all id's that start with "toolBtn" and set them as buttons.

	$('#toolBtnSynthuse').click(function () {
		$.get("?synth&dialog", function( data ) {
			if (data) {
				//outputText('| do | ' + data + ' |\n');
				alert(data); //exception thrown
			}
			else { //no errors
				setInterval("updateActionsContent();", 2000 );
			}
		});
		return false;
	});
});

function updateActionsContent()
{
	$.get("?synth&actions", function( data ) {
		if (data) {
			outputText(data);
		}
	});
}

jQuery.fn.extend({
insertAtCaret: function(myValue){
  return this.each(function(i) {
    if (document.selection) {
      //For browsers like Internet Explorer
      this.focus();
      var sel = document.selection.createRange();
      sel.text = myValue;
      this.focus();
    }
    else if (this.selectionStart || this.selectionStart == '0') {
      //For browsers like Firefox and Webkit based
      var startPos = this.selectionStart;
      var endPos = this.selectionEnd;
      var scrollTop = this.scrollTop;
      this.value = this.value.substring(0, startPos)+myValue+this.value.substring(endPos,this.value.length);
      this.focus();
      this.selectionStart = startPos + myValue.length;
      this.selectionEnd = startPos + myValue.length;
      this.scrollTop = scrollTop;
    } else {
      this.value += myValue;
      this.focus();
    }
  });
}
});

function outputText(text) {
	var tbox = $("#pageContent");
	tbox.insertAtCaret(text);
	//tbox.val(tbox.val() + text);
	//tbox.scrollTop(tbox[0].scrollHeight);
	tbox.focus();
}


text:
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>

int main(
    int /*argc*/,
    char** /*argv*/)
{
    osg::DisplaySettings::instance()->setStereoMode(
        osg::DisplaySettings::ANAGLYPHIC);
    osg::DisplaySettings::instance()->setEyeSeparation(0.05f);
    osg::DisplaySettings::instance()->setStereo(true);

    osg::ref_ptr<osg::Node> model = osgDB::readNodeFile("cessna.osg");
    osgViewer::Viewer viewer;
    viewer.setSceneData(model.get());
    return viewer.run();
}


text:
{% extends "base.html" %}

{% block content %}
name: {{ username }}

今どうしてる?

<form action="{% url post %}" method="post">{% csrf_token %}
  <textarea name="tweet" maxlength="140" rows="4" cols="40" style="font-size:20px;"></textarea>
  <input type="submit" value="ツイート" />
</form>

タイムライン

{% if timeline_list %}
{% for timeline in timeline_list %}

author: {{ timeline.author.screen_name }}
created_at: {{ timeline.created_at }}

text: {{ timeline.text }}
{% endfor %}
{% endif %}
{% endblock %}


text:
license: >
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you 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.
---

FileUploadResult
========

`FileUploadResult` オブジェクトは、 FileTransfer の upload メソッドの呼び出しが成功した時に、成功コールバック関数に渡されるオブジェクトです。

プロパティー
----------

- __bytesSent:__ 送信されたバイト数を表します (long)
- __responseCode:__ サーバーから返された HTTP のレスポンスコードを表します (long)
- __response:__ サーバーから返された HTTP のレスポンスを表します (DOMString)

概要
-----------

`FileUploadResult` オブジェクトは、 FileTransfer の upload メソッドの呼び出しが成功した時に、成功コールバック関数に渡されるオブジェクトです。

iOS に関する注意点
----------
- iOS では、成功コールバック関数に渡される FileUploadResult オブジェクトには、 responseCode も bytesSent も含まれません。


text:
class ProjectsController < ApplicationController

  def new
    if (current_user)
      @project = Project.new
    else
        flash[:notice] = "You need to login"
        redirect_to "/login"
    end
  end

  def create
    @project = Project.new(params[:project])
    session[:repository_id] = nil
    current_user.projects << @project
    success = @project && @project.save
    if success && @project.errors.empty?
      redirect_to ("/projects/get/#{@project.id}")
      flash[:notice] = "new Project added !"
    else
      flash[:error]  = "We couldn't set up the project, sorry.  Please try again, or contact an admin (link is above)."
      render :action => 'new'
    end
  end

  def index
    @projects = Project.find(:all)
    session[:repository_id] = nil
  end

  def get
    @project = Project.find(params[:id])
    session[:project_id] = @project.id
    if (@project.repositories.size > 0)
			if (@project.repositories.find_by_name('origin') != nil)
				if (session[:repository_id] and Repository.find(session[:repository_id]))
					active_repo = Repository.find(session[:repository_id])
				else
					active_repo = @project.repositories.find_by_name('origin')
				end
			else
				active_repo = @project.repositories[0]
			end
			session[:repository_id] = active_repo.id
			events = []
      active_repo.commits.reverse.each { |c| events << c }
      active_repo.bugs.reverse.each { |b| events << b }
      events.sort! { |a,b| a.created_at <=> b.created_at }
      @events = events.reverse
			# pagination
			a_page = 1
			a_ppage = 10
			if (params[:page] != nil)
				a_page = params[:page]
			end
			if (params[:per_page] != nil)
				a_ppage = params[:per_page] || 10
			end
			options = {:page => a_page, :per_page => a_ppage}
			@page_results = @events.paginate(options)
    else
      session[:repository_id] = nil
			@events = []
			@page_results = []
    end
    render :layout => 'project'
  end

  def branch
    @project = Project.find(session[:project_id])
    branch = Branch.find(params[:id])
    if (session[:repository_id])
      active_repo = @project.repositories.find(session[:repository_id])
    else
      active_repo = @project.repositories.find_by_name('origin')
    end
    events = []
    branch.commits.last(10).reverse.each { |c| events << c }
    branch.repository.bugs.last(10).reverse.each { |b| events << b }
    events.sort! { |a,b| a.created_at <=> b.created_at }
    @events = events.reverse
		# pagination
		a_page = 1
		a_ppage = 10
		if (params[:page] != nil)
			a_page = params[:page]
		end
		if (params[:per_page] != nil)
			a_ppage = params[:per_page] || 10
		end
		options = {:page => a_page, :per_page => a_ppage}
		@page_results = @events.paginate(options)
    render :partial => 'lately'
  end

end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>MapObject — LBD Mobile client Alpha documentation</title>

    <link rel="stylesheet" href="../../../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />

    <link rel="top" title="LBD Mobile client Alpha documentation" href="../../../../index.html" />
    <link rel="up" title="fi.lbd.mobile.mapobjects" href="package-index.html" />
    <link rel="next" title="MapObjectSelectionManager" href="MapObjectSelectionManager.html" />
    <link rel="prev" title="MapModelController" href="MapModelController.html" />

Navigation

          index

          next |

          previous |

LBD Mobile client Alpha documentation »

fi.lbd.mobile.mapobjects »

MapObject¶

public interface <tt class="descname">MapObject</tt> extends Serializable¶

Interface for map objects. Created by Tommi.

Methods¶

getAdditionalProperties¶

 Map<String, String> <tt class="descname">getAdditionalProperties</tt><big>(</big><big>)</big>¶

Returns a map of the objects properties.

getId¶

 String <tt class="descname">getId</tt><big>(</big><big>)</big>¶

Returns map objects id.

getMetadataProperties¶

 Map<String, String> <tt class="descname">getMetadataProperties</tt><big>(</big><big>)</big>¶

Returns a map of the objects metadata

getPointLocation¶

 PointLocation <tt class="descname">getPointLocation</tt><big>(</big><big>)</big>¶

Returns map objects location.

isMinimized¶

 boolean <tt class="descname">isMinimized</tt><big>(</big><big>)</big>¶

Returns true if the object is in minimized format and doesn’t contain all the information the object actually has.

Table Of Contents

MapObject

Methods

getAdditionalProperties

getId

getMetadataProperties

getPointLocation

isMinimized

Previous topic

MapModelController

Next topic

MapObjectSelectionManager

This Page

Show Source

Quick search

    <form class="search" action="../../../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          next |

          previous |

LBD Mobile client Alpha documentation »

fi.lbd.mobile.mapobjects »

        © Copyright 2015, Tommi und Ossi.
      Created using Sphinx 1.2.2.


text:
#pragma once
#ifndef EL_FLAMEPART_MERGE_HPP
#define EL_FLAMEPART_MERGE_HPP

namespace El {

// Horizontally merge two contiguous matrices
// ==========================================
template<typename T>
void Merge1x2( Matrix<T>& A, Matrix<T>& BL, Matrix<T>& BR );
template<typename T>
void Merge1x2
( ElementalMatrix<T>& A,
  ElementalMatrix<T>& BL, ElementalMatrix<T>& BR );

template<typename T>
void LockedMerge1x2( Matrix<T>& A, const Matrix<T>& BL, const Matrix<T>& BR );
template<typename T>
void LockedMerge1x2
(       ElementalMatrix<T>& A,
  const ElementalMatrix<T>& BL, const ElementalMatrix<T>& BR );

// Return by value
// ^^^^^^^^^^^^^^^
template<typename T>
Matrix<T> Merge1x2( Matrix<T>& BL, Matrix<T>& BR );
template<typename T,Dist U,Dist V>
DistMatrix<T,U,V> Merge1x2( DistMatrix<T,U,V>& BL, DistMatrix<T,U,V>& BR );

template<typename T>
Matrix<T> LockedMerge1x2( const Matrix<T>& BL, const Matrix<T>& BR );
template<typename T,Dist U,Dist V>
DistMatrix<T,U,V> LockedMerge1x2
( const DistMatrix<T,U,V>& BL, const DistMatrix<T,U,V>& BR );

// Vertically merge two contiguous matrices
// ========================================
template<typename T>
void Merge2x1( Matrix<T>& A, Matrix<T>& BT, Matrix<T>& BB );
template<typename T>
void Merge2x1
( ElementalMatrix<T>& A,
  ElementalMatrix<T>& BT, ElementalMatrix<T>& BB );

template<typename T>
void LockedMerge2x1( Matrix<T>& A, const Matrix<T>& BT, const Matrix<T>& BB );
template<typename T>
void LockedMerge2x1
(       ElementalMatrix<T>& A,
  const ElementalMatrix<T>& BT,
  const ElementalMatrix<T>& BB );

// Return by value
// ^^^^^^^^^^^^^^^
template<typename T>
Matrix<T> Merge2x1( Matrix<T>& BT, Matrix<T>& BB );
template<typename T,Dist U,Dist V>
DistMatrix<T,U,V> Merge2x1( DistMatrix<T,U,V>& BT, DistMatrix<T,U,V>& BB );

template<typename T>
Matrix<T> LockedMerge2x1( const Matrix<T>& BT, const Matrix<T>& BB );
template<typename T,Dist U,Dist V>
DistMatrix<T,U,V> LockedMerge2x1
( const DistMatrix<T,U,V>& BT, const DistMatrix<T,U,V>& BB );

// Merge a contiguous 2x2 block of matrices
// ========================================
template<typename T>
void Merge2x2
( Matrix<T>& A,
  Matrix<T>& BTL, Matrix<T>& BTR,
  Matrix<T>& BBL, Matrix<T>& BBR );
template<typename T>
void Merge2x2
( ElementalMatrix<T>& A,
  ElementalMatrix<T>& BTL, ElementalMatrix<T>& BTR,
  ElementalMatrix<T>& BBL, ElementalMatrix<T>& BBR );

template<typename T>
void LockedMerge2x2
(       Matrix<T>& A,
  const Matrix<T>& BTL, const Matrix<T>& BTR,
  const Matrix<T>& BBL, const Matrix<T>& BBR );
template<typename T>
void LockedMerge2x2
(       ElementalMatrix<T>& A,
  const ElementalMatrix<T>& BTL, const ElementalMatrix<T>& BTR,
  const ElementalMatrix<T>& BBL, const ElementalMatrix<T>& BBR );

// Return by value
// ^^^^^^^^^^^^^^^

template<typename T>
Matrix<T> Merge2x2
( Matrix<T>& BTL, Matrix<T>& BTR,
  Matrix<T>& BBL, Matrix<T>& BBR );
template<typename T,Dist U,Dist V>
DistMatrix<T,U,V> Merge2x2
( DistMatrix<T,U,V>& BTL, DistMatrix<T,U,V>& BTR,
  DistMatrix<T,U,V>& BBL, DistMatrix<T,U,V>& BBR );

template<typename T>
Matrix<T> LockedMerge2x2
( const Matrix<T>& BTL, const Matrix<T>& BTR,
  const Matrix<T>& BBL, const Matrix<T>& BBR );
template<typename T,Dist U,Dist V>
DistMatrix<T,U,V> LockedMerge2x2
( const DistMatrix<T,U,V>& BTL, const DistMatrix<T,U,V>& BTR,
  const DistMatrix<T,U,V>& BBL, const DistMatrix<T,U,V>& BBR );

} // namespace El

#endif // ifndef EL_FLAMEPART_MERGE_HPP


text:
#if !defined(FUSION_INCLUDE_BACK)
#define FUSION_INCLUDE_BACK

#include <lslboost/fusion/sequence/intrinsic/back.hpp>

#endif


text:
get '/questions/:id/answers/new' do
  redirect '/login' unless session_current_user
  @question = Question.find(params[:id])
  if request.xhr?
    erb :'answers/_new', layout: false
  else
    erb :'answers/new'
  end
end

post '/questions/:id/answers/' do
  redirect '/login' unless session_current_user
  @question = Question.find(params[:id])
  @answer = Answer.new(params[:answer])
  @answer.question_id = @question.id
  @answer.author_id = session_current_user.id
  if @answer.save
    if request.xhr?
      erb :'answers/_answer', layout: false, locals: { :answer => @answer }
    else
      redirect "/questions/#{@question.id}"
    end
  else
    status 422
    @errors = @answer.errors.full_messages
    if request.xhr?
      erb :'_error', layout: false
    else
      erb :'answers/new'
    end
  end
end


text:
module.exports.hello = {
  handler: function (request, reply) {
    return reply({ result: 'Hello hapi!' });
  }
};

module.exports.restricted = {
  auth: 'jwt',
  handler: function (request, reply) {
    return reply({ result: 'Restricted!' });
  }
};

module.exports.notFound = {
  handler: function (request, reply) {
    return reply({ result: 'Oops, 404 Page!' }).code(404);
  }
};


text:
]]
--GLOBAL NAMESPACE
local _G = _G;
--LUA
local unpack        = _G.unpack;
local select        = _G.select;
local assert        = _G.assert;
local error         = _G.error;
local print         = _G.print;
local pairs         = _G.pairs;
local next          = _G.next;
local rawset      	= _G.rawset;
local type  		= _G.type;

--BLIZZARD API
local CreateFrame   = _G.CreateFrame;
local UnitExists 	= _G.UnitExists;

local parent, ns = ...
local oUF = ns.oUF

local format = string.format
local tinsert, tremove = table.insert, table.remove
local _PATTERN = '%[..-%]+'

local _ENV = {
	Hex = function(r, g, b)
		if type(r) == "table" then
			if r.r then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end
		end
		return format("|cff%02x%02x%02x", r*255, g*255, b*255)
	end,
	ColorGradient = oUF.ColorGradient,
}
local _PROXY = setmetatable(_ENV, {__index = _G})

local tagStrings = {
	["creature"] = [[function(u)
		return UnitCreatureFamily(u) or UnitCreatureType(u)
	end]],

	["dead"] = [[function(u)
		if(UnitIsDead(u)) then
			return 'Dead'
		elseif(UnitIsGhost(u)) then
			return 'Ghost'
		end
	end]],

	["difficulty"] = [[function(u)
		if UnitCanAttack("player", u) then
			local l = UnitLevel(u)
			return Hex(GetQuestDifficultyColor((l > 0) and l or 99))
		end
	end]],

	["leader"] = [[function(u)
		if(UnitIsGroupLeader(u)) then
			return 'L'
		end
	end]],

	["leaderlong"]  = [[function(u)
		if(UnitIsGroupLeader(u)) then
			return 'Leader'
		end
	end]],

	["level"] = [[function(u)
		local l = UnitLevel(u)
		if ( UnitIsWildBattlePet(u) or UnitIsBattlePetCompanion(u) ) then
			l = UnitBattlePetLevel(u)
		end

		if(l > 0) then
			return l
		else
			return '??'
		end
	end]],

	["missinghp"] = [[function(u)
		local current = UnitHealthMax(u) - UnitHealth(u)
		if(current > 0) then
			return current
		end
	end]],

	["missingpp"] = [[function(u)
		local current = UnitPowerMax(u) - UnitPower(u)
		if(current > 0) then
			return current
		end
	end]],

	["name"] = [[function(u, r)
		return UnitName(r or u)
	end]],

	["offline"] = [[function(u)
		if(not UnitIsConnected(u)) then
			return 'Offline'
		end
	end]],

	["perhp"] = [[function(u)
		local m = UnitHealthMax(u)
		if(m == 0) then
			return 0
		else
			return math.floor(UnitHealth(u)/m*100+.5)
		end
	end]],

	["perpp"] = [[function(u)
		local m = UnitPowerMax(u)
		if(m == 0) then
			return 0
		else
			return math.floor(UnitPower(u)/m*100+.5)
		end
	end]],

	["plus"] = [[function(u)
		local c = UnitClassification(u)
		if(c == 'elite' or c == 'rareelite') then
			return '+'
		end
	end]],

	["pvp"] = [[function(u)
		if(UnitIsPVP(u)) then
			return 'PvP'
		end
	end]],

	["raidcolor"] = [[function(u)
		local _, x = UnitClass(u)
		if(x) then
			return Hex(_COLORS.class[x])
		end
	end]],

	["rare"] = [[function(u)
		local c = UnitClassification(u)
		if(c == 'rare' or c == 'rareelite') then
			return 'Rare'
		end
	end]],

	["resting"] = [[function(u)
		if(u == 'player' and IsResting()) then
			return 'zzz'
		end
	end]],

	["sex"] = [[function(u)
		local s = UnitSex(u)
		if(s == 2) then
			return 'Male'
		elseif(s == 3) then
			return 'Female'
		end
	end]],

	["smartclass"] = [[function(u)
		if(UnitIsPlayer(u)) then
			return _TAGS['class'](u)
		end

		return _TAGS['creature'](u)
	end]],

	["status"] = [[function(u)
		if(UnitIsDead(u)) then
			return 'Dead'
		elseif(UnitIsGhost(u)) then
			return 'Ghost'
		elseif(not UnitIsConnected(u)) then
			return 'Offline'
		else
			return _TAGS['resting'](u)
		end
	end]],

	["threat"] = [[function(u)
		local s = UnitThreatSituation(u)
		if(s == 1) then
			return '++'
		elseif(s == 2) then
			return '--'
		elseif(s == 3) then
			return 'Aggro'
		end
	end]],

	["threatcolor"] = [[function(u)
		return Hex(GetThreatStatusColor(UnitThreatSituation(u)))
	end]],

	["cpoints"] = [[function(u)
		local cp
		if(UnitHasVehicleUI'player') then
			cp = GetComboPoints('vehicle', 'target')
		else
			cp = GetComboPoints('player', 'target')
		end

		if(cp > 0) then
			return cp
		end
	end]],

	['smartlevel'] = [[function(u)
		local c = UnitClassification(u)
		if(c == 'worldboss') then
			return 'Boss'
		else
			local plus = _TAGS['plus'](u)
			local level = _TAGS['level'](u)
			if(plus) then
				return level .. plus
			else
				return level
			end
		end
	end]],

	["classification"] = [[function(u)
		local c = UnitClassification(u)
		if(c == 'rare') then
			return 'Rare'
		elseif(c == 'rareelite') then
			return 'Rare Elite'
		elseif(c == 'elite') then
			return 'Elite'
		elseif(c == 'worldboss') then
			return 'Boss'
		elseif(c == 'minus') then
			return 'Affix'
		end
	end]],

	["shortclassification"] = [[function(u)
		local c = UnitClassification(u)
		if(c == 'rare') then
			return 'R'
		elseif(c == 'rareelite') then
			return 'R+'
		elseif(c == 'elite') then
			return '+'
		elseif(c == 'worldboss') then
			return 'B'
		elseif(c == 'minus') then
			return '-'
		end
	end]],

	["group"] = [[function(unit)
		local name, server = UnitName(unit)
		if(server and server ~= "") then
			name = format("%s-%s", name, server)
		end

		for i=1, GetNumGroupMembers() do
			local raidName, _, group = GetRaidRosterInfo(i)
			if( raidName == name ) then
				return group
			end
		end
	end]],

	["deficit:name"] = [[function(u)
		local missinghp = _TAGS['missinghp'](u)
		if(missinghp) then
			return '-' .. missinghp
		else
			return _TAGS['name'](u)
		end
	end]],

	['pereclipse'] = [[function(u)
		local m = UnitPowerMax('player', SPELL_POWER_ECLIPSE)
		if(m == 0) then
			return 0
		else
			return math.abs(UnitPower('player', SPELL_POWER_ECLIPSE)/m*100)
		end
	end]],

	['curmana'] = [[function(unit)
		return UnitPower(unit, SPELL_POWER_MANA)
	end]],

	['maxmana'] = [[function(unit)
		return UnitPowerMax(unit, SPELL_POWER_MANA)
	end]],

	['soulshards'] = [[function()
		local num = UnitPower('player', SPELL_POWER_SOUL_SHARDS)
		if(num > 0) then
			return num
		end
	end]],

	['holypower'] = [[function()
		local num = UnitPower('player', SPELL_POWER_HOLY_POWER)
		if(num > 0) then
			return num
		end
	end]],

	['chi'] = [[function()
		local num = UnitPower('player', SPELL_POWER_CHI)
		if(num > 0) then
			return num
		end
	end]],

	['shadoworbs'] = [[function()
		local num = UnitPower('player', SPELL_POWER_SHADOW_ORBS)
		if(num > 0) then
			return num
		end
	end]],

	['affix'] = [[function(u)
		local c = UnitClassification(u)
		if(c == 'minus') then
			return 'Affix'
		end
	end]],
}

local tags = setmetatable(
	{
		curhp = UnitHealth,
		curpp = UnitPower,
		maxhp = UnitHealthMax,
		maxpp = UnitPowerMax,
		class = UnitClass,
		faction = UnitFactionGroup,
		race = UnitRace,
	},

	{
		__index = function(self, key)
			local tagFunc = tagStrings[key]
			if(tagFunc) then
				local func, err = loadstring('return ' .. tagFunc)
				if(func) then
					func = func()

					-- Want to trigger __newindex, so no rawset.
					self[key] = func
					tagStrings[key] = nil

					return func
				else
					error(err, 3)
				end
			end
		end,
		__newindex = function(self, key, val)
			if(type(val) == 'string') then
				tagStrings[key] = val
			elseif(type(val) == 'function') then
				-- So we don't clash with any custom envs.
				if(getfenv(val) == _G) then
					setfenv(val, _PROXY)
				end

				rawset(self, key, val)
			end
		end,
	}
)

_ENV._TAGS = tags

local onUpdateDelay = {}
local tagEvents = {
	["curhp"]               = "UNIT_HEALTH",
	["dead"]                = "UNIT_HEALTH",
	["leader"]              = "PARTY_LEADER_CHANGED",
	["leaderlong"]          = "PARTY_LEADER_CHANGED",
	["level"]               = "UNIT_LEVEL PLAYER_LEVEL_UP",
	["maxhp"]               = "UNIT_MAXHEALTH",
	["missinghp"]           = "UNIT_HEALTH UNIT_MAXHEALTH",
	["name"]                = "UNIT_NAME_UPDATE",
	["perhp"]               = "UNIT_HEALTH UNIT_MAXHEALTH",
	["pvp"]                 = "UNIT_FACTION",
	["resting"]             = "PLAYER_UPDATE_RESTING",
	["smartlevel"]          = "UNIT_LEVEL PLAYER_LEVEL_UP UNIT_CLASSIFICATION_CHANGED",
	["threat"]              = "UNIT_THREAT_SITUATION_UPDATE",
	["threatcolor"]         = "UNIT_THREAT_SITUATION_UPDATE",
	['cpoints']             = 'UNIT_COMBO_POINTS PLAYER_TARGET_CHANGED',
	['affix']				= 'UNIT_CLASSIFICATION_CHANGED',
	['plus']				= 'UNIT_CLASSIFICATION_CHANGED',
	['rare']                = 'UNIT_CLASSIFICATION_CHANGED',
	['classification']      = 'UNIT_CLASSIFICATION_CHANGED',
	['shortclassification'] = 'UNIT_CLASSIFICATION_CHANGED',
	["group"]               = "GROUP_ROSTER_UPDATE",
	["curpp"]               = 'UNIT_POWER',
	["maxpp"]               = 'UNIT_MAXPOWER',
	["missingpp"]           = 'UNIT_MAXPOWER UNIT_POWER',
	["perpp"]               = 'UNIT_MAXPOWER UNIT_POWER',
	["offline"]             = "UNIT_HEALTH UNIT_CONNECTION",
	["status"]              = "UNIT_HEALTH PLAYER_UPDATE_RESTING UNIT_CONNECTION",
	["pereclipse"]          = 'UNIT_POWER',
	['curmana']             = 'UNIT_POWER UNIT_MAXPOWER',
	['maxmana']             = 'UNIT_POWER UNIT_MAXPOWER',
	['soulshards']          = 'UNIT_POWER',
	['holypower']           = 'UNIT_POWER',
	['chi']                 = 'UNIT_POWER',
	['shadoworbs']          = 'UNIT_POWER',
}

local unitlessEvents = {
	PLAYER_LEVEL_UP = true,
	PLAYER_UPDATE_RESTING = true,
	PLAYER_TARGET_CHANGED = true,

	PARTY_LEADER_CHANGED = true,

	GROUP_ROSTER_UPDATE = true,

	UNIT_COMBO_POINTS = true
}

local events = {}
local frame = CreateFrame"Frame"
frame:SetScript('OnEvent', function(self, event, unit)
	local strings = events[event]
	if(strings) then
		for k, fontstring in next, strings do
			if(fontstring:IsVisible() and (unitlessEvents[event] or fontstring.parent.unit == unit)) then
				fontstring:UpdateTag()
			end
		end
	end
end)

local OnUpdates = {}
local eventlessUnits = {}

local createOnUpdate = function(timer)
	local OnUpdate = OnUpdates[timer]

	if(not OnUpdate) then
		local total = timer
		local frame = CreateFrame'Frame'
		local strings = eventlessUnits[timer]

		frame:SetScript('OnUpdate', function(self, elapsed)
			if(total >= timer) then
				for k, fs in next, strings do
					if(fs.parent:IsShown() and UnitExists(fs.parent.unit)) then
						fs:UpdateTag()
					end
				end

				total = 0
			end

			total = total + elapsed
		end)

		OnUpdates[timer] = frame
	end
end

local OnShow = function(self)
	for _, fs in next, self.__tags do
		fs:UpdateTag()
	end
end

local getTagName = function(tag)
	local s = (tag:match('>+()') or 2)
	local e = tag:match('.*()<+')
	e = (e and e - 1) or -2

	return tag:sub(s, e), s, e
end

local RegisterEvent = function(fontstr, event)
	if(not events[event]) then events[event] = {} end

	frame:RegisterEvent(event)
	tinsert(events[event], fontstr)
end

local RegisterEvents = function(fontstr, tagstr)
	for tag in tagstr:gmatch(_PATTERN) do
		tag = getTagName(tag)
		local tagevents = tagEvents[tag]
		if(tagevents) then
			for event in tagevents:gmatch'%S+' do
				RegisterEvent(fontstr, event)
			end
		end
	end
end

local UnregisterEvents = function(fontstr)
	for event, data in pairs(events) do
		for k, tagfsstr in pairs(data) do
			if(tagfsstr == fontstr) then
				if(#data == 1) then
					frame:UnregisterEvent(event)
				end

				tremove(data, k)
			end
		end
	end
end

local OnEnter = function(self)
	for _, fs in pairs(self.__mousetags) do
		fs:SetAlpha(1)
	end
end

local OnLeave = function(self)
	for _, fs in pairs(self.__mousetags) do
		fs:SetAlpha(0)
	end
end

local tagPool = {}
local funcPool = {}
local tmp = {}
local escapeSequences = {
	["||c"] = "|c",
	["||r"] = "|r",
	["||T"] = "|T",
	["||t"] = "|t",
}

local Tag = function(self, fs, tagstr)
	if(not fs or not tagstr) then return end

	if(not self.__tags) then
		self.__tags = {}
		self.__mousetags = {}
		tinsert(self.__elements, OnShow)
	else
		-- Since people ignore everything that's good practice - unregister the tag
		-- if it already exists.
		for _, tag in pairs(self.__tags) do
			if(fs == tag) then
				-- We don't need to remove it from the __tags table as Untag handles
				-- that for us.
				self:Untag(fs)
			end
		end
	end

	fs.parent = self

	for escapeSequence, replacement in pairs(escapeSequences) do
		while tagstr:find(escapeSequence) do
			tagstr = tagstr:gsub(escapeSequence, replacement)
		end
	end

	if tagstr:find('%[mouseover%]') then
		tinsert(self.__mousetags, fs)
		fs:SetAlpha(0)
		if not self.__HookFunc then
			self:HookScript('OnEnter', OnEnter)
			self:HookScript('OnLeave', OnLeave)
			self.__HookFunc = true;
		end
		tagstr = tagstr:gsub('%[mouseover%]', '')
	else
		for index, fontString in pairs(self.__mousetags) do
			if fontString == fs then
				self.__mousetags[index] = nil;
				fs:SetAlpha(1)
			end
		end
	end

	local containsOnUpdate
	for tag in tagstr:gmatch(_PATTERN) do
		if not tagEvents[tag:sub(2, -2)] then
			containsOnUpdate = onUpdateDelay[tag:sub(2, -2)] or 0.15;
		end
	end

	local func = tagPool[tagstr]
	if(not func) then
		local format, numTags = tagstr:gsub('%%', '%%%%'):gsub(_PATTERN, '%%s')
		local args = {}

		for bracket in tagstr:gmatch(_PATTERN) do
			local tagFunc = funcPool[bracket] or tags[bracket:sub(2, -2)]

			if(not tagFunc) then
				local tagName, s, e = getTagName(bracket)
				local tag = tags[tagName]
				if(tag) then
					s = s - 2
					e = e + 2

					if(s ~= 0 and e ~= 0) then
						local pre = bracket:sub(2, s)
						local ap = bracket:sub(e, -2)

						tagFunc = function(u,r)
							local str = tag(u,r)
							if(str) then
								return pre..str..ap
							end
						end
					elseif(s ~= 0) then
						local pre = bracket:sub(2, s)

						tagFunc = function(u,r)
							local str = tag(u,r)
							if(str) then
								return pre..str
							end
						end
					elseif(e ~= 0) then
						local ap = bracket:sub(e, -2)

						tagFunc = function(u,r)
							local str = tag(u,r)
							if(str) then
								return str..ap
							end
						end
					end

					funcPool[bracket] = tagFunc
				end
			end

			if(tagFunc) then
				tinsert(args, tagFunc)
			else
				numTags = -1
				func = function(self)
					return self:SetFormattedText('[error]')
				end
			end
		end

		if(numTags == 1) then
			func = function(self)
				local parent = self.parent
				local realUnit
				if(self.overrideUnit) then
					realUnit = parent.realUnit
				end

				_ENV._COLORS = parent.colors
				return self:SetFormattedText(
					format,
					args[1](parent.unit, realUnit) or ''
				)
			end
		elseif(numTags == 2) then
			func = function(self)
				local parent = self.parent
				local unit = parent.unit
				local realUnit
				if(self.overrideUnit) then
					realUnit = parent.realUnit
				end

				_ENV._COLORS = parent.colors
				return self:SetFormattedText(
					format,
					args[1](unit, realUnit) or '',
					args[2](unit, realUnit) or ''
				)
			end
		elseif(numTags == 3) then
			func = function(self)
				local parent = self.parent
				local unit = parent.unit
				local realUnit
				if(self.overrideUnit) then
					realUnit = parent.realUnit
				end

				_ENV._COLORS = parent.colors
				return self:SetFormattedText(
					format,
					args[1](unit, realUnit) or '',
					args[2](unit, realUnit) or '',
					args[3](unit, realUnit) or ''
				)
			end
		elseif numTags ~= -1 then
			func = function(self)
				local parent = self.parent
				local unit = parent.unit
				local realUnit
				if(self.overrideUnit) then
					realUnit = parent.realUnit
				end

				_ENV._COLORS = parent.colors
				for i, func in next, args do
					tmp[i] = func(unit, realUnit) or ''
				end

				-- We do 1, numTags because tmp can hold several unneeded variables.
				return self:SetFormattedText(format, unpack(tmp, 1, numTags))
			end
		end

		if numTags ~= -1 then
			tagPool[tagstr] = func
		end
	end
	fs.UpdateTag = func

	local unit = self.unit
	if((unit and unit:match'%w+target') or fs.frequentUpdates) or containsOnUpdate then
		local timer
		if(type(fs.frequentUpdates) == 'number') then
			timer = fs.frequentUpdates
		elseif containsOnUpdate then
			timer = containsOnUpdate
		else
			timer = .5
		end

		if(not eventlessUnits[timer]) then eventlessUnits[timer] = {} end
		tinsert(eventlessUnits[timer], fs)

		createOnUpdate(timer)
	else
		RegisterEvents(fs, tagstr)
	end

	tinsert(self.__tags, fs)
end

local Untag = function(self, fs)
	if(not fs) then return end

	UnregisterEvents(fs)
	for _, timers in next, eventlessUnits do
		for k, fontstr in next, timers do
			if(fs == fontstr) then
				tremove(timers, k)
			end
		end
	end

	for k, fontstr in next, self.__tags do
		if(fontstr == fs) then
			tremove(self.__tags, k)
		end
	end

	fs.UpdateTag = nil
end

oUF.Tags = {
	Methods = tags,
	Events = tagEvents,
	SharedEvents = unitlessEvents,
	OnUpdateThrottle = onUpdateDelay,
}
oUF:RegisterMetaFunction('Tag', Tag)
oUF:RegisterMetaFunction('Untag', Untag)


text:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
  <string name="app_name">CoolBreeze</string>
</resources>


text:
define([ "AllyCard", "AttachmentCard", "EventCard", "HeroCard", "game/CardInstance", "game/PlayerDeck" ], function(
        AllyCard, AttachmentCard, EventCard, HeroCard, CardInstance, PlayerDeck)
{
    "use strict";
    var DeckBuilders = [];

    var BeornsPath1DeckBuilder = new PlayerDeckBuilder("Beorn's Path #1", 2013, "Leadership/Lore", function()
    {
        var heroTokens = [];
        addHero(heroTokens, HeroCard.ARAGORN_CORE);
        addHero(heroTokens, HeroCard.THEODRED);
        addHero(heroTokens, HeroCard.DENETHOR);

        var playerTokens = [];
        addAlly(playerTokens, AllyCard.HENAMARTH_RIVERSONG, 1);
        addAlly(playerTokens, AllyCard.SNOWBOURN_SCOUT, 3);
        addAlly(playerTokens, AllyCard.GUARD_OF_THE_CITADEL, 3);
        addAlly(playerTokens, AllyCard.EREBOR_HAMMERSMITH, 2);
        addAlly(playerTokens, AllyCard.MINER_OF_THE_IRON_HILLS, 2);
        addAlly(playerTokens, AllyCard.GLEOWINE, 2);
        addAlly(playerTokens, AllyCard.SON_OF_ARNOR, 2);
        addAlly(playerTokens, AllyCard.DAUGHTER_OF_THE_NIMRODEL, 3);
        addAlly(playerTokens, AllyCard.FARAMIR, 2);
        addAlly(playerTokens, AllyCard.GANDALF_CORE, 3);

        addAttachment(playerTokens, AttachmentCard.STEWARD_OF_GONDOR, 2);
        addAttachment(playerTokens, AttachmentCard.PROTECTOR_OF_LORIEN, 2);
        addAttachment(playerTokens, AttachmentCard.FOREST_SNARE, 2);
        addAttachment(playerTokens, AttachmentCard.SELF_PRESERVATION, 2);
        addAttachment(playerTokens, AttachmentCard.CELEBRIANS_STONE, 1);

        addEvent(playerTokens, EventCard.VALIANT_SACRIFICE, 2);
        addEvent(playerTokens, EventCard.SNEAK_ATTACK, 2);
        addEvent(playerTokens, EventCard.FOR_GONDOR, 2);
        addEvent(playerTokens, EventCard.RADAGASTS_CUNNING, 2);

        return new PlayerDeck(heroTokens, playerTokens);
    });
    DeckBuilders.push(BeornsPath1DeckBuilder);

    var BeornsPath2DeckBuilder = new PlayerDeckBuilder("Beorn's Path #2", 2013, "Spirit/Tactics", function()
    {
        var heroTokens = [];
        addHero(heroTokens, HeroCard.EOWYN);
        addHero(heroTokens, HeroCard.GIMLI);
        addHero(heroTokens, HeroCard.THALIN);

        var playerTokens = [];
        addAlly(playerTokens, AllyCard.GONDORIAN_SPEARMAN, 3);
        addAlly(playerTokens, AllyCard.VETERAN_AXEHAND, 3);
        addAlly(playerTokens, AllyCard.HORSEBACK_ARCHER, 2);
        addAlly(playerTokens, AllyCard.LORIEN_GUIDE, 1);
        addAlly(playerTokens, AllyCard.NORTHERN_TRACKER, 2);
        addAlly(playerTokens, AllyCard.GANDALF_CORE, 1);
        addAlly(playerTokens, AllyCard.BEORN, 1);

        addAttachment(playerTokens, AttachmentCard.HORN_OF_GONDOR, 1);
        addAttachment(playerTokens, AttachmentCard.BLADE_OF_GONDOLIN, 2);
        addAttachment(playerTokens, AttachmentCard.DWARVEN_AXE, 2);
        addAttachment(playerTokens, AttachmentCard.CITADEL_PLATE, 2);
        addAttachment(playerTokens, AttachmentCard.THE_FAVOR_OF_THE_LADY, 2);
        addAttachment(playerTokens, AttachmentCard.UNEXPECTED_COURAGE, 1);

        addEvent(playerTokens, EventCard.FEINT, 2);
        addEvent(playerTokens, EventCard.QUICK_STRIKE, 2);
        addEvent(playerTokens, EventCard.SWIFT_STRIKE, 1);
        addEvent(playerTokens, EventCard.A_TEST_OF_WILL, 2);
        addEvent(playerTokens, EventCard.HASTY_STROKE, 2);
        addEvent(playerTokens, EventCard.THE_GALADHRIMS_GREETING, 2);
        addEvent(playerTokens, EventCard.DWARVEN_TOMB, 1);
        addEvent(playerTokens, EventCard.A_LIGHT_IN_THE_DARK, 2);
        addEvent(playerTokens, EventCard.STAND_AND_FIGHT, 3);

        return new PlayerDeck(heroTokens, playerTokens);
    });
    DeckBuilders.push(BeornsPath2DeckBuilder);

    function PlayerDeckBuilder(name, year, description, buildFunction)
    {
        InputValidator.validateNotNull("name", name);
        InputValidator.validateNotNull("year", year);
        InputValidator.validateNotNull("description", description);
        InputValidator.validateNotNull("buildFunction", buildFunction);

        this.name = function()
        {
            return name;
        };

        this.year = function()
        {
            return year;
        };

        this.description = function()
        {
            return description;
        };

        this.buildDeck = function()
        {
            return buildFunction();
        };
    }

    function addAlly(array, cardKey, count)
    {
        InputValidator.validateNotNull("cardKey", cardKey);

        for (var i = 0; i < count; i++)
        {
            array.push(CardInstance.ally(cardKey));
        }
    }

    function addAttachment(array, cardKey, count)
    {
        InputValidator.validateNotNull("cardKey", cardKey);

        for (var i = 0; i < count; i++)
        {
            array.push(CardInstance.attachment(cardKey));
        }
    }

    function addEvent(array, cardKey, count)
    {
        InputValidator.validateNotNull("cardKey", cardKey);

        for (var i = 0; i < count; i++)
        {
            array.push(CardInstance.event(cardKey));
        }
    }

    function addHero(array, cardKey)
    {
        InputValidator.validateNotNull("cardKey", cardKey);

        array.push(CardInstance.hero(cardKey));
    }

    return (
    {
        BeornsPath1DeckBuilder: BeornsPath1DeckBuilder,
        BeornsPath2DeckBuilder: BeornsPath2DeckBuilder,
        DeckBuilders: DeckBuilders,
        PlayerDeckBuilder: PlayerDeckBuilder,
    });
});